text
stringlengths
2.85k
2.55M
label
class label
11 classes
IEEE ACCESS 1 Dynamic Output Feedback Guaranteed-Cost Synchronization for Multiagent Networks with Given Cost Budgets arXiv:1802.07923v1 [cs.SY] 22 Feb 2018 Jianxiang Xi, Cheng Wang, Hao Liu, Zhong Wang Abstract—The current paper addresses the distributed guaranteed-cost synchronization problems for general high-order linear multiagent networks. Existing works on the guaranteedcost synchronization usually require all state information of neighboring agents and cannot give the cost budget previously. For both leaderless and leader-following interaction topologies, the current paper firstly proposes a dynamic output feedback synchronization protocol with guaranteed-cost constraints, which can realize the tradeoff design between the energy consumption and the synchronization regulation performance with the given cost budget. Then, according to different structure features of interaction topologies, leaderless and leader-following guaranteedcost synchronization analysis and design criteria are presented, respectively, and an algorithm is proposed to deal with the impacts of nonlinear terms by using both synchronization analysis and design criteria. Especially, an explicit expression of the synchronization function is shown for leaderless cases, which is independent of protocol states and the given cost budget. Finally, numerical examples are presented to demonstrate theoretical results. Index Terms—Multiagent network, guaranteed-cost synchronization, dynamic output feedback, cost budget. I. I NTRODUCTION I N recent years, synchronization of multiagent networks with distributed control protocols has obtained great attention by researchers from different fields, formation and containment control, sensor networks, multiple agent supporting systems, distributed computation, multiple robot systems and network congestion alleviation, et al. [1]-[15]. According to different structures, multiagent networks are usually categorized into two types: leader-following ones and leaderless ones, which are associated with leader-following synchronization and leaderless synchronization, respectively. Moreover, the motions of multiagent networks contain two parts: the whole motion and the relative motions among agents. For leaderfollowing multiagent networks, the whole motion is the motion of the leader. However, for leaderless multiagent networks, the whole motion is associated with the interaction topology and initial states of all agents and is often described by the synchronization function. In [16], some novel conclusions for robust This work was supported by the National Natural Science Foundation of China under Grants 61374054, 61503012, 61703411, 61503009, 61333011 and 61421063, Innovation Foundation of High-Tech Institute of Xi’an (2015ZZDJJ03) and Youth Foundation of High-Tech Institute of Xi’an (2016QNJJ004), also supported by Innovation Zone Project under Grants 17163-11-ZT-004-017-01. Jianxiang Xi, Cheng Wang, Zhong Wang are with High-Tech Institute of Xi’an, Xi’an, 710025, P.R. China, and Hao Liu is with School of Astronautics, Beihang University, Beijing, 100191, P.R. China. (Corresponding author: Hao Liu, [email protected]) synchronization were given. Sakthivel et al. [17] proposed an inspirational method to deal with stochastic faulty actuatorbased reliable synchronization problems. The literatures [18][22] also proposed some new results on synchronization. It should be pointed out that the performance optimization was not considered in [16]-[22]. However, in practical multiagent networks, the control energy is usually limited, so it is required to simultaneously consider the following two factors: the synchronization regulation performance and the energy consumption, which can be modeled as certain optimal or suboptimal problems with different cost functions to realize the tradeoff design between them. By optimizing the cost function of each agent, some synchronization control strategies were shown to achieve global goals in [23] and [24]. By constructing the global performance index based on the linear quadratic cost function, Cao and Ren [25] presented an optimal synchronization criteria for first-order linear multiagent networks under the condition that the interaction topology is a complete graph. For firstorder nonlinear multiagent networks, optimal synchronization criteria were proposed by convex and coercive properties of the cost function in [26] and [27]. For second-order linear multiagent networks, synchronization regulation performance problems were discussed by hybrid impulsive control approaches in [28] and [29], where the energy consumption was not considered. Cheng et al. [30] dealt with leader-following guaranteed-cost synchronization of second-order multiagent networks, which can realize the suboptimal synchronization tracking, and investigated the applications of theoretical results to interconnected pendulums. In [23]-[30], the dynamics of each agent has a specific structure, which can simplify the synchronization analysis and design problems. Due to the complex structure of general high-order multiagent networks, optimal synchronization is usually difficult to be achieved and guaranteed-cost synchronization is more challenging than first-order and second-order multiagent networks. Zhao et al. [31] discussed guaranteed-cost synchronization for general high-order linear multiagent networks with the linear quadratic cost function based on state errors among neighboring agents and control inputs of all agents. Zhou et al. [32] proposed an event-triggered guaranteed-cost control method to decrease the energy consumption. In [33], sampleddata information was used to design guaranteed-cost synchronization prototols and an input delay approch was applied to give guaranteed-cost synchronization criteria. In [31]-[33], the linear matrix inequality (LMI) synchronization design criteria contain the Laplacian matrix and the dimensions of variables IEEE ACCESS are associated with the number of agents, which cannot ensure the scalability of multiagent networks since the computational complexity greatly increases as the number of agents increases. To overcome this flaw, the state decomposition approach was shown to deal with guaranteed-cost synchronization in [34][36], where LMI synchronization design criteria are only dependent on the nonzero eigenvalues of the Laplacian matrix and the dimensions of all the variables are identical with the one of each agent. Moreover, Xie and Yang [37] proposed sufficient conditions for guaranteed-cost fault-tolarant synchronization by introducing a coupling weight larger than the reciprocal of the minimum nonzero eigenvalue of the Laplacian matrix, where the dimension of the variable of the algebraic Riccati equality is independent of the number of agents. Although some significant research results on guaranteedcost synchronization were presented, there still exist many very challenging and open problems. The current paper mainly focuses on the following two aspects: (i) The cost budget is given previously. For practical multiagent networks, each agent usually has the limited energy, so the cost budget cannot be infinite and should be a finite value given previously. In [31]-[37], different upper bounds of the guaranteed cost were determined, but they cannot be given previously; (ii) The outputs instead of the states of neighboring agents are used to construct the synchronization protocol. In practical applications, each agent often can only observe its neighbors and obtain output information which may be partial states or linear combinations of states. It is well-known that output feedback synchronization control is more complex and challengeable than state feedback synchronization control. In [31]-[37], all state information of neighboring agents is required to realize the guaranteed-cost synchronization control. For leaderless and leader-following general high-order linear multiagent networks with the given cost budgets, the current paper proposes a dynamic output feedback synchronization protocol with a specific structure to deal with guaranteedcost synchronization analysis and design problems. For leaderless cases, the relationship between the given cost budget and the LMI variable is constructed by initial states of all agents and the Laplacian matrix of a complete graph, guaranteedcost synchronization analysis and design criteria are proposed, respectively, and the synchronization function is determined. For leader-following cases, the relationship between the given cost budget and the LMI variable is determined via initial states of all agents and the Laplacian matrix of a star graph, and sufficient conditions for guaranteed-cost synchronization criteria are presented by LMI tools. Moreover, based on the cone complementarity approach, an algorithm is proposed to check guaranteed-cost synchronization design criteria which contain nonlinear matrix inequality constraints. Compared with closely related works on guaranteed-cost synchronization, the current paper has two critical innovations. The first one is that the cost budget is given previously in the current paper. The literatures [31]-[37] only determined different upper bounds of the guaranteed cost, but cannot previously give the cost budget. The second one is that the current paper proposes dynamic output feedback synchronization protocols 2 with the linear quadratic optimization index. The literatures [31]-[37] required all state information of neighboring agents to construct guaranteed-cost synchronization protocols. The remainder of the current paper is organized as follows. In Section II, some preliminaries on graph theory and the problem description are presented, respectively. Section III gives guaranteed-cost synchronization criteria for leaderless multiagent networks with dynamic output feedback synchronization protocols and the given cost budget, and determines an explicit expression of the synchronization function. Section IV presents leader-following guaranteed-cost synchronization criteria. Section V shows numerical examples to illustrate theoretical results. Some concluding remarks are given in Section VI. Notations: Rn is the n-dimensional real column vector space and Rn×n is the set of n × n dimensional real matrices. In represents the n-dimensional identity matrix. 1 denotes a column vector with all components 1. 0 and 0 stand for the zero number and the zero column vector with a compatible dimension, respectively. The notation ∗ in a symmetric matrix denotes the symmetric term. The symbol ⊗ represents the Kronecker product. P T = P < 0 and P T = P > 0 mean that the symmetric matrix P is negative definite and positive definite, respectively. The notation diag {d1 , d2 , · · · , dN } represents a diagonal matrix with the diagonal elements d1 , d2 , · · · , dN . The notation tr (P ) denotes the trace of the matrix P . II. P RELIMINARIES AND PROBLEM DESCRIPTION A. Preliminaries on graph theory The current paper models the interaction topology of a multiagent network with N identical agents by a graph G= (V (G), E(G)), which is composed by a nonempty vertex set V (G) = {v1 , v2 , · · · , vN } and the edge set E(G) = {eij = (vi , vj )}. The vertex vi represents agent i, the edge eij denotes the interaction channel from agent i to agent j, and the edge weight wji of eij stands for the interaction strength from agent i to agent j. The index of the set of all neighbors of vertex vj is denoted by Nj = {i : (vi , vj ) ∈ E(G)}. A path between vertex vi1 and vertexvil is a sequence of edges (vi1 , vi2 ) , (vi2 , vi3 ) , · · · , vil−1 , vil . An undirected graph is said to be connected if there at least exists an undirected path between any two vertices. A directed graph has a spanning tree if there exists a root node which has a directed path to any other nodes. Define the Laplacian matrix P of the graph G as L = [lji ] ∈ RN ×N with ljj = i∈Nj wji and lji = −wji (j 6= i). If the undirected graph is connected, then zero is a simple eigenvalue of L, and all the other N − 1 eigenvalues are positive. If the directed graph has a spanning tree, then zero is a simple eigenvalue of L, and all the other N −1 eigenvalues have positive real parts. More basic concepts and conclusions on graph theory can be found in [38]. B. Problem description For multiagent networks consisting of N identical highorder linear agents, the dynamics of the jth agent is described by  ẋj (t) = Axj (t) + Buj (t), (1) yj (t) = Cxj (t), IEEE ACCESS 3 where j = 1, 2, · · · , N , A ∈ Rn×n , B ∈ Rn×m , C ∈ Rd×n and xj (t), yj (t) and uj (t) are the state, the output and the control input, respectively. For QT = Q > 0 and RT = R > 0, a dynamic output feedback synchronization protocol with a linear quadratic optimization index is proposed as follows:   φ̇ (t) = (A + BKP u ) φj (t)   j   wji (φi (t) − φj (t)) − K C φ    i∈Nj P (2) wji (yi (t) − yj (t)) , + Kφ  i∈Nj     uj (t) R= Ku φj (t),   ∞  Js = 0 (Ju (t) + Jxφ (t)) dt, where j = 1, 2, · · · , N , φj (t) with φj (0) = 0 is the protocol state, Ku and Kφ are gain matrices with compatible dimensions to be determined, Nj represents the neighbor set of agent j and N X uTj (t)Ruj (t), Ju (t) = j=1 Jxφ (t) = N X X j=1 i∈Nj T wji (xi (t) − xj (t) − φi (t) + φj (t)) ×Q (xi (t) − xj (t) − φi (t) + φj (t))) . Furthermore, Ju (t) and Jxφ (t) are called the energy consumption term and the synchronization regulation term, respectively, and the tradeoff design between the energy consumption and the synchronization regulation performance can be realized by choosing proper R and Q. It should be pointed out that there also exists the linear quadratic index to realize guaranteed-cost control for isolated systems as shown in [40], but its structure is different with the one in (2). For isolated systems, the linear quadratic index is constructed by state information, which is convergent. For multiagent networks, it is required that state errors among agents are convergent, but states of each agent may be divergent. Hence, the linear quadratic index for multiagent networks should be constructed by state errors as shown in (2), and cannot use state information. Furthermore, guaranteed-cost control can be clarified into two types. The first one is to calculate the upper bound of the linear quadratic index for given gain matrices as shown in [31][37]. The second one is to determine gain matrices of synchronization protocols for the given upper bound of the linear quadratic index; that is, theP given cost budget. Moreover, it can be shown that −Kφ C i∈Nj wji (φi (t) − φj (t)) + P P Kφ i∈Nj wji (yi (t) − yj (t)) = Kφ C i∈Nj wji (xi (t) − xj (t) −φi (t) + φj (t)), which means that the term P i∈Nj wji (xi (t)− xj (t) − φi (t) + φj (t)) directly impacts on the derivative of the protocol state and indirectly impacts on the derivative of the state of each agent. Hence, we choose Jxφ (t) as the index function of the synchronization regulation performance. Let Js∗ > 0 be a given cost budget, then the definition of guaranteed-cost synchronization of multiagent networks with the given cost budget is proposed as follows. Definition 1: For any given Js∗ > 0, multiagent network (1) is said to be guaranteed-cost synchronizable by protocol (2) if there exist Ku and Kφ such that limt→∞ (xj (t) − c(t)) = 0 (j = 1, 2, · · · , N ) and Js ≤ Js∗ for any bounded disagreement initial states xj (0)(j = 1, 2, · · · , N ), where c(t) is said to be the synchronization function. The main objects of the current paper are to design Ku and Kφ such that multiagent network (1) with leaderless and leader-following structures achieves guaranteed-cost synchronization under the condition that the cost budget is given, and to determine the impacts of the state of the synchronization protocol and the given cost budget on the synchronization function for leaderless cases. Remark 1: Compared with guaranteed-cost synchronization protocols in [31]-[37], protocol (2) has two critical features. The first one is that outputs instead of states of neighboring agents are applied to construct synchronization protocols. For dynamic output feedback synchronization protocols, the key challenge is that the upper bound of the optimization index is difficult to be determined since both the energy consumption term and the synchronization regulation term are dependent on protocol states. The second one is that the cost budget is given previously. In this case, the key challenge is to determine the relationship between the upper bound of the optimization index and the given cost budget and to design gain matrices of synchronization protocols such that the upper bound is less than the given cost budget. Moreover, compared with the traditional dynamic output feedback controller for isolated systems as shown in classic literatures [39] and [40], the key difference is that output errors between one agent and its neighbors are used to construct synchronization protocols for multiagent networks as shown in (2). It should be pointed out that the state of each agent may be not convergent, but it is required that state errors among all agents are convergent under protocol (2). However, it is needed that the states of an isolated system are convergent by designing the dynamic output feedback controller. III. G UARANTEED - COST SYNCHRONIZATION FOR LEADERLESS MULTIAGENT NETWORKS For high-order linear multiagent networks with leaderless connected topologies, this section gives sufficient conditions for guaranteed-cost synchronization design and analysis with the given cost budget, respectively, where the guaranteedcost synchronization design criterion contains a nonlinear constraint, so an algorithm is proposed to determine gain matrices on the basis of the cone complementarity approach. Moreover, an explicit expression of the synchronization function is shown, which is independent of the protocol state and the given cost budget.  T Let x(t) = xT1 (t), xT2 (t), · · · , xTN (t) and φ(t) = [φT1 (t), φT2 (t), · · · , φTN (t)]T , then the dynamics of multiagent network (1) with protocol (2) can be written as   ẋ(t) = (IN ⊗ A) x(t) + (IN ⊗ BKu ) φ(t), (3) φ̇(t) = (IN ⊗ (A + BKu ) + (L ⊗ Kφ C)) φ(t)  − (L ⊗ Kφ C) x(t). Because the interaction topology is undirected, the Laplacian matrix L is symmetric and positive semi-definite. Due to L1 = IEEE ACCESS 4 h .√ i 0, there exists an orthonormal matrix U = 1 N , Û such that U T LU = diag {0, ∆}, where ∆ = diag {λ2 , λ3 , · · · , λN } with 0 < λ2 ≤ λ3 ≤ · · · ≤ λN . Let   T x̂(t) = U T ⊗ In x(t) = x̂T1 (t), x̂T2 (t), · · · , x̂TN (t) , (4) h iT  φ̂(t) = U T ⊗ In φ(t) = φ̂T1 (t), φ̂T2 (t), · · · , φ̂TN (t) , then multiagent network (3) can be transformed into ( x̂˙ 1 (t) = Ax̂1 (t) + BKu φ̂1 (t), ˙ φ̂1 (t) = (A + BKu ) φ̂1 (t),    x̂˙ j (t) = Ax̂j (t) + BKu φ̂j (t), ˙ φ̂j (t) = (A + BKu + λj Kφ C) φ̂j (t)   − λj Kφ C x̂j (t), (5) (6) (7) where j = 2, 3, · · · , N . The N -dimensional column vector with the jth element 1 and 0 elsewhere is denoted by ej (j = 2, 3, · · · , N ). Define ∆ xe (t) = N X j=2 U ej ⊗ x̂j (t), 1 ∆ xs (t) = √ 1 ⊗ x̂1 (t), N (8) (9) then one can show by (8) that  T xe (t) = (U ⊗ In ) 0T , x̂T2 (t), x̂T3 (t), · · · , x̂TN (t) . (10) .√  T N and e1 ⊗ x̂1 (t) = x̂T1 (t), 0T , it can be By U e1 = 1 derived from (9) that T  xs (t) = (U ⊗ In ) x̂T1 (t), 0T . (11) Since U is nonsingular, xe (t) and xs (t) are linearly independent by (10) and (11). From (4), one can obtain that x(t) = xe (t) + xs (t). By the structure of xs (t) given in (9), multiagent network (3) achieves leaderless synchronization if. and only if limt→∞ x̂j (t) = 0 (j = 2, 3, · · · , N ) and √ x̂1 (t) N is a valid candidate of the synchronization function. Thus, xe (t) and xs (t) can be regarded as the error state among agents and the synchronization state of multiagent network (3), which stands for the disagreement part and the agreement part, respectively. Furthermore, one can find by (7) that limt→∞ [φ̂Tj (t), x̂Tj (t)]T = 0 (j = 2, 3, · · · , N ) can guarantee that multiagent network (1) with protocol (2) achieves leaderless synchronization. Based on the above analysis, the following theorem presents an approach to determine gain matrices Ku and Kφ such that multiagent network (1) with protocol (2) achieves leaderless guaranteed-cost synchronization with a given cost budget. Theorem 1: For any given Js∗ > 0, multiagent network (1) is leaderless guaranteed-cost synchronizable by protocol (2) if there exist PxT = Px > 0, P̂xT = P̂x > 0, P̂φT = P̂φ > 0, and K̂u such that   Ξ̂1 = xT (0) IN − N −1 11T ⊗ In x(0)Px − Js∗ In ≤ 0,  Ξ11 Ξ̂j =  ∗ ∗ −λj P̂x C T C Ξj22 0  K̂uT R 0  < 0 (j = 2, N ) , −R Px P̂x = In , where Ξ11 = AP̂φ + P̂φ AT + B K̂u + K̂uT B T and Ξj22 = Px A + AT Px − 2λj C T C + 2λj Q. In this case, Ku = K̂u P̂φ−1 and Kφ = −P̂x C T . Proof: First of all, we give sufficient conditions by h i LMI techniques such that limt→∞ φ̂Tj (t), x̂Tj (t) (j =2, 3, · · · , N ). One can derive that      φ̂j (t) In 0 φ̂j (t) = , In −In x̂j (t) φ̂j (t) − x̂j (t) T so subsystems (7) can be converted into #  "  ˙ φ̂j (t) A + BKu λj Kφ C = ˙ 0 A + λj Kφ C φ̂j (t) − x̂˙ j (t)   φ̂j (t) × . φ̂j (t) − x̂j (t) = 0 (12) (13) Let Pφ and Px be symmetric and positive definite matrices, then we construct a Lyapunov function candidate as follows Vj (t) = Vφj (t) + Vxj (t), (14) where j = 2, 3, · · · , N and Vφj (t) = φ̂Tj (t)Pφ φ̂j (t),  T   Vxj (t) = φ̂j (t) − x̂j (t) Px φ̂j (t) − x̂j (t) . From (13) to (14), one can show that   T V̇φj = φ̂Tj (t) Pφ (A + BKu ) + (A + BKu ) Pφ φ̂j (t)   + 2λj φ̂Tj (t)Pφ Kφ C φ̂j (t) − x̂j (t) ,  T V̇xj = φ̂j (t) − x̂j (t) (Px (A + λj Kφ C)   T +(A + λj Kφ C) Px φ̂j (t) − x̂j (t) . Thus, it can be derived that limt→∞ φ̂j (t) = 0 and  limt→∞ φ̂j (t) − x̂j (t) = 0 if  T Pφ (A + BKu ) + (A + BKu ) Pφ Θj = ∗  (15) λj Pφ Kφ C < 0, Px (A + λj Kφ C) + (A + λj Kφ C)T Px where j = 2, 3, · · · , N , which means that multiagent network (1) with protocol (2) achieves leaderless synchronization due h i T to limt→∞ φ̂Tj (t), x̂Tj (t) = 0 (j = 2, 3, · · · , N ). In the following, the guaranteed-cost performance is discussed. Due to φj (0) = 0 (j = 1, 2, · · · , N ), one can show that φ̂1 (0) = 0. By (6), one has φ̂1 (t) ≡ 0. Thus, it can be obtained by (4) and (5) that  Ju (t) = φT (t) IN ⊗ KuT RKu φ(t) IEEE ACCESS 5 = N X φ̂Tj (t)KuT RKu φ̂j (t), (16) Js∗ = xT (0) j=2 T Jxφ (t) = (φ(t) − x(t)) (2L ⊗ Q) (φ(t) − x(t)) N  T   X 2λj φ̂j (t) − x̂j (t) Q φ̂j (t) − x̂j (t) . (17) = j=2 For T ≥ 0, we can derive from (15) to (17) that ∆ RT JsT = 0 (Ju (t) + Jxφ (t)) dt RT = 0 (Ju (t) + Jxφ (t)) dt  N R P T V̇ (t)dt − V (T ) + V (0) + j j j 0 j=2 = N R  P T 0  φ̂Tj (t)Pφ (A + BKu ) Pφ−1 j=2  T +Pφ−1 (A + BKu ) + Pφ−1 KuT RKu Pφ−1 Pφ φ̂j (t)    T +2λj φ̂Tj (t)Pφ Kφ C φ̂j (t)−x̂j (t) + φ̂j (t)−x̂j (t)   T × Px (A + λj Kφ C) + (A + λj Kφ C) Px + 2λj Q   N P × φ̂j (t) − x̂j (t) dt − (Vj (T ) − Vj (0)). j=2 Let K̂u = Ku P̂φ with P̂φ = Pφ−1 and Kφ = −P̂x C T with P̂x = Px−1 . By Schur Complement Lemma in [41] , if Ξ̂j < 0 (j = 2, 3, · · · , N ), then as T tends to infinity, one has Js ≤ N X Vj (0). j=2 Due to φj (0) = 0 (j = 1, 2, · · · , N ), one has φ̂j (0) = 0 (j = 1, 2, · · · , N ) by (5), which means that Vφj (0) = 0 and Vxj (0) = x̂Tj (0)Px x̂j (0). Thus, one can find that Js ≤ N X x̂Tj (0)Px x̂j (0) j=2   0T = xT (0) (U ⊗ In ) (IN −1 ⊗ Px ) I(N −1)n    × 0, I(N −1)n U T ⊗ In x(0). (18) Since U U T = IN , it can be shown that Û Û T = IN − N −1 11T . (19) Due to  0, I(N −1)n   U T ⊗ In = Û T ⊗ In , one can derive by (18) and (19) that   Js ≤ xT (0) IN − N −1 11T ⊗ Px x(0). (20) Because xj (0) (j = 1, 2, · · · , N ) are disagreement, there exists some x̂j (0) 6= 0 (j ∈ {2, 3, · · · , N }). Thus, one can derive that xT (0) N X   x̂Tj (0)x̂j (0) > 0. IN − N −1 11T ⊗ In x(0) = j=2 Hence, one can set that γ= xT (0) ((IN − Js∗ −1 N 11T ) ⊗ In ) x(0) that is, ;   IN − N −1 11T ⊗ γIn x(0). (21) Since IN − N −1 11T has a simple zero eigenvalue and N − 1 nonzero eigenvalues, Px ≤ γIn can guarantee that Js ≤ Js∗ by (20) and (21). Based on the above analysis, by the convex property of LMIs, the conclusion of Theorem 1 can be obtained.  Remark 2: The specific structures of coefficient matrices of protocol (2) make subsystems (7) satisfy some separation principle; that is, their dynamics can transformed into the ones in (13). In this case, Ku and Kφ can be independently designed such that A + BKu and A + λj Kφ C (j = 2, 3, · · · , N ) are Hurwitz, which can guarantee that multiagent network (1) with protocol (2) but without the optimization index Js achieves leaderless synchronization. However, when the guaranteedcost performance is considered, the impacts of the term λj Kφ C in (13) cannot be neglected since φ̂j (t)− x̂j (t) can directly influence the derivative of φ̂j (t) via the term λj Kφ C. In this case, by o right-multiplying Θj (j = 2, 3, · · · , N ) n left- and −1 with diag Pφ , In , Ku can be determined but Kφ cannot. Here, by introducing a specific structure Kφ = −P̂x C T , the gain matrices Ku and Kφ can be determined simultaneously. Remark 3: In the associated works about guaranteed-cost control, the value of the Lyapunov function candidate at time zero is used to determine the guaranteed cost. Since φ̂j (t) and x̂j (t) in (7) couple with each other, it seems difficult to construct a Lyapunov function candidate such that the expression of the upper bound of Js does not contain initial states of synchronization protocols. Based on the separation principle, a Lyapunov function candidate is proposed in (14), which makes an upper bound of Js only dependent on initial states of all agents under the assumption that initial states of protocol (2) are zero. In this case, the relationship between the upper bound of Js and Js∗ can be determined by the property of IN − N −1 11T , which actually is the Laplacian matrix of a complete graph with edge weights equal to N −1 . It should be pointed out that it will become very difficult to determine the relationship between Js and Js∗ if initial states of protocol (2) are nonzero, and the assumption that initial states of protocol (2) are zero is reasonable for practical multiagent networks. In the proof of Theorem 1, the changing variable method is used to determine gain matrices Ku and Kφ , which makes the guaranteed-cost synchronization design criterion contain the nonlinear constraint Px P̂x = In . However, if Ku and Kφ are given previously, then this nonlinear constraint can be eliminated. The following corollary gives a leaderless guaranteed-cost synchronization analysis criterion. Corollary 1: For any given Js∗ > 0, Ku and Kφ , multiagent network (1) with protocol (2) achieves leaderless guaranteedcost synchronization if there exist PxT = Px > 0 and PφT = Pφ > 0 such that   Θ̂1 = xT (0) IN − N −1 11T ⊗ In x(0)Px − Js∗ In ≤ 0,   Θ11 λj Pφ Kφ C KuT R Θ̂j =  ∗ Θj22 0  < 0 (j = 2, N ) , ∗ 0 −R IEEE ACCESS 6 T where Θ11 = Pφ (A + BKu ) + (A + BKu ) Pφ and Θj22 = T Px (A + λj Kφ C) + (A + λj Kφ C) Px + 2λj Q. In Theorem 1, the leaderless guaranteed-cost synchronization criterion contains a nonlinear constraint, which cannot be directly checked by LMI tools. Based on Corollary 1, the cone complementarity approach proposed by Ghaoui et al. in [42] can deal with this nonlinear constraint by minimizing the trace of Px P̂x . The feasibility problem of matrix inequalities in Theorem 1 can be transformed into the following minimization one: min tr(Px P̂x ) sbuject to Ξ̂1 < 0,  Ξ̂j < 0(j = 2, N ), Px I ≥ 0. Ξ̂3 = ∗ P̂x The following algorithm is presented to solve the above minimization problem. Algorithm 1: Step 1: Set k = 0. Check the feasibility of Ξ̂1 < 0, Ξ̂j < 0 (j = 2, N ), and Ξ̂3 ≥ 0, and give Px,0 = Px and P̂x,0 = P̂x . Step 2: Minimize the trace of Px P̂x,k + Px,k P̂x subject to Ξ̂1 < 0, Ξ̂j < 0 (j = 2, N ), and Ξ̂3 ≥ 0. Let Px,k+1 = Px and P̂x,k+1 = P̂x . Step 3: Let Ku = K̂u P̂φ−1 and Kφ = −P̂x C T . If Θ̂1 < 0 and Θ̂j < 0 (j = 2, N ) in Corollary 1 are feasible and tr(Px P̂x ) − 4n < δ for some sufficiently small scalar δ > 0, then stop and give Ku and Kφ . Step 4: If k is larger than the maximum allowed iteration number, then stop. Step 5: Set k = k + 1 and go to Step 2. .√ By the above analysis, x̂1 (t) N is a valid candidate of the synchronization function. Due to φj (0) = 0 (j = 1, 2, · · · , N ), one can obtain that φ̂1 (t) ≡ 0 and x̂˙ 1 (t) = Ax̂1 (t) by (6), which means that protocol states do not influence the synchronization function when initial protocol states are equal to zero. Moreover, it can .√ be shown  PN T T that x̂1 (0) = e1 U ⊗ In x(0) = j=1 xj (0) N , so the following corollary can be obtained, which gives an explicit expression of the synchronization function. Corollary 2: If multiagent network (1) with protocol (2) achieves leaderless guaranteed-cost synchronization, then the synchronization function satisfies that   N X 1 lim c(t) − eAt xj (0) = 0. t→∞ N j=1 Remark 4: Xiao et al. in [43] first introduced the concept of the synchronization function to describe the whole feature of a multiagent network, where the synchronization protocol was constructed by state information of neighboring agents. For dynamic output feedback synchronization protocols, by Corollary 2, protocol states do not impact the synchronization function. Actually, if initial protocol states are not zero, then protocol states influence the explicit expression of the synchronization function in an input control way, which was shown in [44]. Furthermore, the synchronization function is closely related to the autonomous dynamics of each agent and the average of initial states of all agents, and is identical for multiagent network (1) with different undirected interaction topologies; that is, connected undirected interaction topologies with different structures do not impact the whole feature of multiagent networks. However, it should be also pointed out that this conclusion is no longer valid if the interaction topology is directed. IV. E XTENSIONS TO LEADER - FOLLOWING MULTIAGENT NETWORKS For high-order linear multiagent networks with leaderfollowing structures and given cost budgets, this section gives guaranteed-cost synchronization design and analysis criteria, respectively, which are similar to leaderless cases, but the relationship between the cost budget and the LMI variable is different with leaderless cases. For the leaderless multiagent networks, without loss of generality, we set that agent 1 is the leader and the other N −1 agents are followers. The whole interaction topology has a spanning tree with the root node representing the leader, where the leader does not receive any information from followers, only some followers can receive the outputs of the leader, and the local interaction topology among followers is undirected and can be unconnected. If multiagent network (1) with a leader-following interaction topology achieves guaranteedcost synchronization, then the synchronization function is the state of the leader; that is, limt→∞ (xj (t) − x1 (t))= 0 (j = 2, 3, · · · , N ). Since the leader does not receive any information and φ1 (0)=0, one can obtain that φ1 (t)=0. Hence, one has u1 (t) ≡ 0. Let x̃j (t) = xj (t) − x1 (t) (j = 2, 3, · · · , N ) ,   T x̃(t) = x̃T2 (t), x̃T3 (t), · · · , x̃TN (t) , and φ̃(t) = φT2 (t), T φT3 (t), · · · , φTN (t) , then the dynamics of multiagent network (1) with protocol (2) can be written as  ˙  = (IN −1 ⊗ A) x̃(t) + (IN −1 ⊗ BKu ) φ̃(t),  x̃(t) ˙φ̃(t) = (I (22) N −1 ⊗ (A + BKu ) + (Lf f + Λf l )   ⊗Kφ C) φ̃(t) − ((Lf f + Λf l ) ⊗ Kφ C) x̃(t), where Lf f is the Laplacian matrix of the interaction topology among followers and Λf l = diag {w21 , w31 , · · · , wN 1 } denotes the interaction from the leader to followers. Let T lf l = [w21 , w31 , · · · , wN 1 ] , then the Laplacian matrix of the whole interaction topology is   0 0 . L= −lf l Lf f + Λf l Since the whole interaction topology has a spanning tree and the local interaction topology among followers is undirected, there exists an orthonormal matrix Ũ such that Ũ T (Lf f + Λf l ) Ũ = diag {λ2 , λ3 , · · · , λN } with 0 < λ2 ≤ λ3 ≤ · · · ≤ λN being nonzero eigenvalues of L. Let iT  h T  ⌢ ⌢T ⌢T Ũ T ⊗ In x̃(t) = x 2 (t), x 3 (t), · · · , x N (t) , IEEE ACCESS  T 7   ⌢T ⌢T ⌢T Ũ ⊗ In φ̃(t) = φ 2 (t), φ 3 (t), · · · , φ N (t) T , then one can obtain by (22) that  ⌢ ⌢ ˙ ⌢ x j (t)=A x j (t) + BKu φ j (t), ⌢ ˙ ⌢ ⌢ φ j (t)= (A + BKu + λj Kφ C) φ j (t)−λj Kφ C x j (t), (23) where j = 2, 3, · · · , N. One can find that if limt→∞ x̃(t) = 0, then multiagent network (1) with protocol (2) achieves leader-following synchronization, which is equivalent to ⌢ limt→∞ x j (t) = 0 (j = 2, 3, · · · , N ) since Ũ ⊗ In is nonsingular. For the symmetric and positive Px , it can be shown that N P ⌢T ⌢ x j (0)Px x j (0) j=2    (24) N − 1 −1TN −1 ⊗ Px x(0). = xT (0) −1N −1 IN −1 Based on the above facts, by the similar analysis to Theorem 1 and Corollary 1, sufficient conditions for leader-following guaranteed-cost synchronization design and analysis with the given cost budget are given as follows. Theorem 2: For any given Js∗ > 0, multiagent network (1) is leader-following guaranteed-cost synchronizable by protocol (2) if there exist PxT = Px > 0, P̂xT = P̂x > 0, P̂φT = P̂φ > 0, and K̂u such that    N − 1 −1TN −1 T ⊗ In x(0)Px − Js∗ In ≤ 0, x (0) −1N −1 IN −1   Ξ11 −λj P̂x C T C K̂uT R  ∗ Ξj22 0  < 0 (j = 2, N ) , ∗ 0 −R Px P̂x = In , where Ξ11 = AP̂φ + P̂φ AT + B K̂u + K̂uT B T and Ξj22 = Px A + AT Px − 2λj C T C + 2λj Q. In this case, Ku = K̂u P̂φ−1 and Kφ = −P̂x C T . Corollary 3: For any given Js∗ > 0, Ku and Kφ , multiagent network (1) with protocol (2) achieves leader-following guaranteed-cost synchronization if there exist PxT = Px > 0, PφT = Pφ > 0 such that    N − 1 −1TN −1 T ⊗ In x(0)Px − Js∗ In ≤ 0, x (0) −1N −1 IN −1   Θ11 λj Pφ Kφ C KuT R  ∗ Θj22 0  < 0 (j = 2, N ) , ∗ 0 −R where Θ11 = Pφ (A + BKu ) + (A + BKu )T Pφ and Θj22 = Px (A + λj Kφ C) + (A + λj Kφ C)T Px + 2λj Q. By the cone complementarity approach, the feasible problem of the matrix inequalities in Theorem 2 can also be converted into a minimization one, which can be checked by a similar algorithm to Algorithm 1. Here, the detail description is omitted due to the length limitation. Furthermore, the variable changing method and the cone complementarity approach are applied to determine gain matrices of synchronization protocols. The variable changing method does not introduce any conservatism since it is an equivalent transformation. However, the cone complementarity approach may bring in some conservatism to deal with the impacts of nonlinearity. In [42], the conservatism of the cone complementarity approach was discussed detailedly and it was shown that less conservatism may be introduced by numerical simulations. Moreover, there are three key difficulties in obtaining Theorems 1 and 2. The first one is to construct the relationship between the linear quadratic optimization index and the Laplacian matrix of the interaction topology, as shown in (16) and (17). The second one is to construct the relationship between the given cost budget and the variable of LMI criteria, as given in (19) and (20). The third one is to transform the leaderfollowing synchronization problem into the leaderless one with the different structure matrix, as shown in (23) and (24). Remark 5: For guaranteed-cost synchronization criteria of leaderless and leader-following multiagent networks, the key distinction is that the relationship matrices between the given cost budget and the LMI variable are different. For leaderless cases, the relationship matrix IN − N −1 11T is the Laplacian matrix of a complete graph with edge weights N −1 . For leader-following cases, the relationship matrix   N − 1 −1TN −1 is the Laplacian matrix of a star graph −1N −1 IN −1 with edge weights 1 and the central node is the leader. The two relationships intrinsically reflect the structure characteristics of multiagent networks; that is, the average of the initial states of all agents determines the whole motion for leaderless structures, but the whole motion only depends on the leader for leader-following structures. Remark 6: The LMI criteria for guaranteed-cost synchronization are dependent on the Laplacian matrices of interaction topologies in [31]-[33]. In this case, the dimensions of the variables are identical with the number of agents, so it is timecost to check those criteria when multiagent networks consist of a large number of agents. However, the LMI criteria in Theorems 1 and 2 are only dependent on the minimum and maximum nonzero eigenvalues of the Laplacian matrix, so the computational complexity is lower. Meanwhile, it should be pointed out that the cone complementarity approach is used to deal with the impacts of nonlinear terms in Theorems 1 and 2. Because this method is an iteration algorithm, the computational complexity may increase and the associated algorithm may be not robust. Ghaoui et al. in [42] showed that this method is robust and has lower computational complexity by many numerical simulations. V. I LLUSTRATIVE EXAMPLES In this section, two numerical examples are presented to illustrate the effectiveness of main results on leaderless and leader-following multiagent networks, respectively. A 3-dimensional multiagent network is considered, where it is composed of six agents labeled from 1 to 6. The dynamics of each agent is described as (1) with   0.2 3.5 0 A =  −1.5 0.8 −1.3  , 1 0 −2.6 IEEE ACCESS 8   2 0 4 , B =  −1.5 0 −0.4   2 0 2 C= . −1.5 3 0 The initial states are T T x1 (0) = [−13, 20, − 3] , x2 (0) = [−16, − 8, 15] , x3 (0) = [26, 10, − 12]T , x4 (0) = [−3, − 8, 19]T , x5 (0) = [12, 22, − 6]T , x6 (0) = [8, − 13, 16]T . The interaction topologies for the Leaderless case and the Leader-following case are respectively given as G1 and G2 in Fig. 1. xj1 (t) (j = 1, 2, · · · , 6) 90 agent1 agent2 agent3 agent4 agent5 agent6 c(t) 60 30 0 −30 −60 0 1 2 Time 3 4 Fig. 2. State trajectories of xj1 (t) (j = 1, 2, · · · , 6). xj2 (t) (j = 1, 2, · · · , 6) 50 agent1 agent2 agent3 agent4 agent5 agent6 c(t) 40 30 20 10 0 −10 −20 −30 Fig. 1. The interaction topology G. The given cost budget is Js∗ = 6000, which is an upper bound of the linear quadratic index in (2) and includes the energy consumption and the synchronization regulation performance. Thus, according to Algorithm 1, one has   5.1141 8.0251 −0.5324 Ku = , −44.4484 −63.8269 3.1964   −2.1446 1.1269 Kφ =  −0.3219 −1.6096  . −1.1376 −0.0013 It should be pointed out that Ku and Kφ cannot be determined by Algorithm 1 if the limited cost budget cannot provide the enough energy. In this case, Ξ̂1 ≤ 0 in Theorem 1 is not feasible. The state trajectories of the multiagent network are shown in Figs. 2 to 4, where the trajectories marked by circles denote the curves of the synchronization function c(t) obtained by Corollary 2, which satisfies limt→∞ (c(t) − eAt [2.3333, 3.8333, 4.8333]T ) = 0. Fig. 5 shows the trajectories of the linear quadratic optimization index. It is clear 1 2 Time 3 4 Fig. 3. State trajectories of xj2 (t) (j = 1, 2, · · · , 6). 30 xj3 (t) (j = 1, 2, · · · , 6) Example 1: (Leaderless case) The interaction topology G1 is given as Fig.1, where the weights of edges of the interaction topology are 1. In the linear quadratic optimization index, the matrices Q and R are given as   0.3 0.06 0 Q =  0.06 0.3 0.06  , 0 0.06 0.3   0.8 0.08 R= . 0.08 0.8 −40 0 agent1 agent2 agent3 agent4 agent5 agent6 c(t) 15 0 −15 0 1 2 Time 3 4 Fig. 4. State trajectories of xj3 (t) (j = 1, 2, · · · , 6). that this multiagent network achieves leaderless guaranteedcost synchronization with the given cost budget. Example 2: (Leader-following case) In this case, agent 1 is the leader and the other 5 agents are followers. The interaction topology G2 is given as Fig. 1, where the weights of edges are 1. In this case, it is set that   0.25 0.05 0.05 0 , Q =  0.05 0.25 0.05 0 0.25 R=  0.75 0.15 0.15 0.75  . IEEE ACCESS 9 xj2 (t) − x12 (t) (j = 2, · · · , 6) 9000 * s J 8000 J s 7000 Cost 6000 5000 4000 3000 2000 1000 0 0 1 2 Time 3 50 x (t)−x (t) 12 x (t)−x (t) 32 30 12 x (t)−x (t) 42 20 12 x (t)−x (t) 52 10 12 x (t)−x (t) 62 12 0 −10 −20 −30 −40 0 4 22 40 1 2 Time 3 4 Fig. 7. State trajectories of xj2 (t) − x12 (t) (j = 2, · · · , 6). Fig. 5. Trajectories of cost. The trajectories of state errors xj (t) − x1 (t) (j = 2, 3, · · · , N ) of this multiagent network are shown in Figs. 9 to 11, and the trajectories of the linear quadratic optimization index are given in Fig. 12. Thus, it can be found that this multiagent network achieves leader-following guaranteed-cost synchronization with the given cost budget. xj3 (t) − x13 (t) (j = 2, · · · , 6) The given cost budget is Js∗ = 10000. Thus, according to Theorem 2, one has   1.5586 2.8988 −0.2717 Ku = , −8.8966 −12.9081 0.6719   −2.5652 1.6794 Kφ =  −0.3525 −1.9704  . −1.0104 −0.2843 25 x (t)−x (t) 23 20 13 x (t)−x (t) 33 13 x43(t)−x13(t) 15 x53(t)−x13(t) 10 x63(t)−x13(t) 5 0 −5 −10 0 1 2 Time 3 4 Fig. 8. State trajectories of xj3 (t) − x13 (t) (j = 2, · · · , 6). 40 30 x21(t)−x11(t) 14000 x31(t)−x11(t) 12000 x41(t)−x11(t) 10000 20 x51(t)−x11(t) 10 x61(t)−x11(t) s 8000 0 6000 −10 4000 −20 2000 −30 −40 0 0 0 1 2 Time 3 J*s J Cost xj1 (t) − x11 (t) (j = 2, · · · , 6) 16000 50 1 4 2 Time 3 4 Fig. 9. Trajectories of cost. Fig. 6. State trajectories of xj1 (t) − x11 (t) (j = 2, · · · , 6). VI. C ONCLUSION Both leaderless and leader-following guaranteed-cost synchronization analysis and design problems for multiagent networks with the given cost budget were investigated by using output information of neighboring agents. The guaranteedcost synchronization analysis and design criteria independent of the number of agents were proposed by constructing dynamic output feedback synchronization protocols and the relationships between the given cost budget and the LMI variable, where synchronization protocols satisfy a specific separation principle and those relationships depend on the structures of interaction topologies. Especially, the specific separation principle can simplify the synchronization design, but nonlinear terms are still introduced due to guaranteedcost constraints. Moreover, an algorithm was presented to deal with nonlinear constraints and to determine gain matrices of synchronization protocols. Furthermore, the future research topic can focus on two aspects. The first one is to deal with the impacts of time-varying delays and directed interaction topologies on guaranteed-cost synchronization of multiagent networks with dynamic output feedback synchronization protocols. The second one is to investigate the practical applications of multiagent networks combining the main results in the current paper with structure features of practical multiagent networks, such as multiple IEEE ACCESS 10 agent supporting systems, network congestion control systems and single-link manipulator systems with a flexible joint, et al. VII. ACKNOWLEDGEMENT The authors would like to thank Jie Gao for providing numerical analysis and simulation. R EFERENCES [1] X. Liu and Z. Ji, Controllability of multi-agent systems based on path and cycle graphs, International Journal of Robust and Nonlinear Control, vol. 28, no. 1, pp. 296-309, Jun. 2017. [2] Z. Ji and H. Yu, A new perspective to graphical characterization of multiagent controllability, IEEE Transactions on Cybernetics, vol. 47, no. 6, pp. 1471-1483, Jun. 2017. [3] N. Cai, C. Diao, and M. J. Khan, A novel clustering method based on quasi-consensus motions of dynamical multi-agent systems, Complexity, 4978613, 2017. [4] R. Wang, X. Dong, Q. Li, and Z. Ren, Distributed adaptive formation control for linear swarm systems with time-varying formation and switching topologies, IEEE Access, vol. 4, pp. 8995-9004, Dec. 2016. [5] N. Cai, M. He, Q. Wu, and M. J. Khan, On almost controllability of dynamical complex networks with noises, Journal of Systems Science and Complexity, 2018, DOI: 10.1007/s11424-017-6273-7. [6] W. Yu, G. Chen, Z. Wang, and W. Yang, Distributed consensus filtering in sensor networks, IEEE Transactions on Systems, Man, and Cybernetics– Part B Cybernetics, vol. 39, no. 6, pp. 1568-1577, May 2009. [7] N. Ilić, M. S. Stanković, and S. S. Stanković, Adaptive consensus-based distributed target tracking in sensor networks with limited sensing range, IEEE Transactions on Control Systems Technology, vol. 22, no. 2, pp. 778-785, Mar. 2014. [8] J. Xi, Z. Shi, and Y. Zhong, Consensus analysis and design for high-order linear swarm systems with time-varying delays, Physica A: Statistical Mechanics and its Applications, vol. 390, no. 23, pp. 4114-4123, Jun. 2011. [9] X. Wu, K. Zhang, and M. Cheng, Computational method for optimal machine scheduling problem with maintenance and production, International Journal of Production Research, vol. 55, no. 6, pp. 1791-1814, Jun. 2017. [10] X. Wu, K. Zhang, and M. Cheng, Computational method for optimal control of switched systems with input and state constraints, Nonlinear Analysis: Hybrid Systems, vol. 26, pp. 1-18, Nov. 2017. [11] H. Du, G. Wen, Y. Cheng, Y. He, and R. Jia, Distributed finite-time cooperative control of multiple high-order nonholonomic mobile robots, IEEE Transactions on Neural Networks and Learning Systems, vol. 28, no. 12, pp. 2998-3006, Dec. 2017. [12] B. Xu and F. Sun, Composite intelligent learning control of strictfeedback systems with disturbance, IEEE Transactions on Cybernetics, vol. 48, no. 2, pp. 730-741, Feb. 2018. [13] B. Xu, D. Wang, Y. Zhang, and Z. Shi, DOB based neural control of flexible hypersonic flight vehicle considering wind effects, IEEE Transactions on Industrial Electronics, vol. 64, no. 11, pp. 8676-8685, Nov. 2017. [14] H. Du and S. Li, Attitude synchronization for flexible spacecraft with communication delays, IEEE Transactions on Automatic Control, vol. 61, no. 11, pp. 3625-3630, Nov. 2016. [15] X. Yang, S. Xu, and Z. Li, Consensus congestion control in multirouter networks based on multiagent system, Complexity, 3574712, 2017. [16] B. Kaviarasan, R. Sakthivel, and S. Abbas, Robust consensus of nonlinear multi-agent systems via reliable control with probabilistic time delay, Complexity, vol. 21, no. S2, pp. 138-150, Nov./Dec. 2016. [17] R. Sakthivel, B. Kaviarasan, C. K. Ahn, and H. R. Karimi, Observer and stochastic faulty actuator-based reliable consensus protocol for multiagent system, IEEE Transactions on Systems, Man, and Cybernetics: Systems, 2017, DOI: 10.1109/TSMC.2017.2758902. [18] G. Wen, W. Yu, G. Hu, J. Cao, and X. Yu, Pinning synchronization of directed networks with switching topologies: A multiple Lyapunov functions approach. IEEE Transactions on Neural Networks and Learning Systems, vol. 26, no. 12, pp. 3239-3250, Dec. 2015. [19] Z. Li, Michael Z. Q. Chen, and Z. Ding, Distributed adaptive controllers for cooperative output regulation of heterogeneous agents over directed graphs, Automatica, vol. 68, pp. 179-183, Jun. 2016. [20] Z. Wu, Y. Xu, R. Lu, Y. Wu, and T. Huang, Event-triggered control for consensus of multi-agent systems with fixed/switching topologies, IEEE Transactions on Systems, Man and Cybernetics: Systems, 2018, DOI: 10.1109/TSMC.2017.2744671. [21] Z. Wu, Y. Xu, Y. Pan, H. Su, and Y. Tang, Event-triggered control for consensus problem in multi-agent systems with quantized relative state measurement and external disturbance, IEEE Transactions on Circuit and Systems I: Regular paper, 2018, DOI: 10.1109/TCSI.2017.2777504. [22] Z. Liu, X. Yu, Z. Guan, B. Hu, and C. Li, Pulse-modulated intermittent control in consensus of multi-agent systems, IEEE Transactionson Systems, Man, and Cybernetics: Systems, vol. 47, no. 5, pp. 783-793, May 2017. [23] E. Semsar-Kazerooni and K. Khorasani, An optimal cooperation in a team of agents subject to partial information, International Journal of Control, vol. 82, no. 3, pp. 571-583, Mar. 2009. [24] K. G. Vamvoudakis, F. L. Lewis, and G. R. Hudas, Multi-agent differential graphical games: Online adaptive learning solution for synchronization with optimality, Automatica, vol. 48, no. 8, pp. 1598-1611, Aug. 2012. [25] Y. C. Cao and W. Ren, Optimal linear-consensus algorithms: An LQR perspective, IEEE Transactions on Systems, Man, and Cybernetics–Part B Cybernetics, vol. 40, no. 3, pp. 819-829, Mar. 2010. [26] Z. Qiu, S. Liu, and L. Xie, Distributed constrained optimal consensus of multi-agent systems, Automatica, vol. 68, pp. 209-215, Jun. 2016. [27] Y. Xie and Z. Lin, Global optimal consensus for multi-agent systems with bounded controls, Systems & Control Letters, vol. 102, pp. 104-111, Apr. 2017. [28] Z. H. Guan, B. Hu, M. Chi, D. X. He, and X. M. Cheng, Guaranteed performance consensus in second-order multi-agent systems with hybrid impulsive control, Automatica, vol. 50, no. 9, pp. 2415-2418, Sept. 2014. [29] B. Hu, Z. H. Guan, X. W. Jiang, M. Chi, and L. Yu, On consensus performance of nonlinear multi-agent systems with hybrid control, Journal of the Franklin Institute, vol. 353, no. 13, pp. 3133-3150, Sept. 2016. [30] Y. Cheng, V. Ugrinovskii, and G. Wen, Guaranteed cost tracking for uncertain coupled multi-agent systems using consensus over a directed graph, Proceedings of 2013 Australian Control Conference, pp. 375-378, Nov. 2013. [31] Y. Zhao, G. Guo, and L. Ding, Guaranteed cost control of mobile sensor networks with Markov switching topologies, ISA Transactions, vol. 58, no. 9, pp. 206-213, Sept. 2015. [32] X. Zhou, P. Shi, C. Lim, C Yang, and W. Gui, Event based guaranteedcost consensus for distributed multi-agent systems, Journal of the Franklin Institute, vol. 352, no. 9, pp. 3546-3563, Mar. 2015. [33] Y. Zhao and W. Zhang, Guaranteed cost consensus protocol design for linear multi-agent systems with sampled-data information: An input delay approach, ISA Transactions, vol. 67, pp. 87-97, Mar. 2017. [34] J. Xi, M. He, H. Liu, and J. Zheng, Admissible output consensualization control for singular multi-agent systems with time delays, Journal of the Franklin Institute, vol. 353, no. 16, pp. 4074-4090, Nov. 2016. [35] Z. Wang, M. He, T. Zheng, Z. Fan, and G. Liu, Guaranteed cost consensus for high-dimensional multi-agent systems with timevarying delays, IEEE/CAA Journal of Automatica Sinica, 2017, DOI: 10.119/JAS.2017.7510430. [36] J. Xi, Z. Fan, H. Liu, and T. Zheng, Guaranteed-cost consensus for multiagent networks with Lipschitz nonlinear dynamics and switching topologies, International Journal of Robust and Nonlinear Control, 2018, https://doi.org/10.1002/rnc.4051. [37] C. H. Xie and G. H. Yang, Cooperative guaranteed cost fault-tolerant control for multi-agent systems with time-varying actuator faults, Neurocomputing, vol. 214, pp. 382-390, Nov. 2016. [38] C. Godsil and G. Royal, Algebraic Graph Theory, New York: SpringerVerlag, 2001. [39] M. V. Thuan, V. N. Phat, and H. Trinh, Observer-based controller design of time-delay systems with an interval time-varying delay, International Journal of Applied Mathematics and Computer Science, vol. 22, no. 4, pp. 921-927, Jan. 2012. [40] M. V. Thuan, V. N. Phat, and H. M. Trinh, Dynamic output feedback guaranteed cost control for linear systems with interval time-varying delays in states and outputs, Applied Mathematics and Computation, vol. 218, no. 21, pp. 10697-10707, Jul. 2012. [41] S. Boyd, L. E. Ghaoui, E. Feron, and V. Balakrishnan, Linear Matrix Inequalities in System and Control Theory, SIAM, Philadelphia, PA, 1994. [42] L. E. Ghaoui, F. Oustry, and M. AitRami, A cone complementarity linearization algorithm for static output-feedback and related problems, IEEE Transactions on Automatic Control, vol. 42, no. 8, pp. 1171-1176, Jul. 1997. IEEE ACCESS [43] F. Xiao and L. Wang, Consensus problems for high-dimensional multiagent systems, IET Control Theory & Applications, vol. 1, no. 3, pp. 830-837, May 2007. [44] J. Xi, Z. Shi, and Y. Zhong, Output consensus analysis and design for high-order linear swarm systems: Partial stability method, Automatica, vol. 48, no. 9, pp. 2335-2343, Sept. 2012. [45] A. Berman and X. D. Zhang, Lower bounds for the eigenvalues of Laplacian matrices, Linear Algebra and its Applications, vol. 316, no. 1-3, pp. 13-20, Sept. 2000. [46] K. Yoonsoo and M. Mesbahi, On maximizing the second smallest eigenvalue of a state-dependent graph Laplacian, IEEE Transactions on Automatic Control, vol. 51, no. 1, pp. 116-120, Jan. 2006. 11
3cs.SY
meProp: Sparsified Back Propagation for Accelerated Deep Learning with Reduced Overfitting arXiv:1706.06197v4 [cs.LG] 31 Oct 2017 Xu Sun 1 2 Xuancheng Ren 1 2 Shuming Ma 1 2 Houfeng Wang 1 2 Abstract We propose a simple yet effective technique for neural network learning. The forward propagation is computed as usual. In back propagation, only a small subset of the full gradient is computed to update the model parameters. The gradient vectors are sparsified in such a way that only the top-k elements (in terms of magnitude) are kept. As a result, only k rows or columns (depending on the layout) of the weight matrix are modified, leading to a linear reduction (k divided by the vector dimension) in the computational cost. Surprisingly, experimental results demonstrate that we can update only 1–4% of the weights at each back propagation pass. This does not result in a larger number of training iterations. More interestingly, the accuracy of the resulting models is actually improved rather than degraded, and a detailed analysis is given. The code is available at https://github.com/jklj077/meProp. 1. Introduction Neural network learning is typically slow, where back propagation usually dominates the computational cost during the learning process. Back propagation entails a high computational cost because it needs to compute full gradients and update all model parameters in each learning step. It is not uncommon for a neural network to have a massive number of model parameters. In this study, we propose a minimal effort back propagation method, which we call meProp, for neural network learning. The idea is that we compute only a very small but critical portion of the gradient information, and update only the 1 School of Electronics Engineering and Computer Science, Peking University, China 2 MOE Key Laboratory of Computational Linguistics, Peking University, China. Correspondence to: Xu Sun <[email protected]>. Proceedings of the 34 th International Conference on Machine Learning, Sydney, Australia, PMLR 70, 2017. Copyright 2017 by the author(s). corresponding minimal portion of the parameters in each learning step. This leads to sparsified gradients, such that only highly relevant parameters are updated and other parameters stay untouched. The sparsified back propagation leads to a linear reduction in the computational cost. To realize our approach, we need to answer two questions. The first question is how to find the highly relevant subset of the parameters from the current sample in stochastic learning. We propose a top-k search method to find the most important parameters. Interestingly, experimental results demonstrate that we can update only 1–4% of the weights at each back propagation pass. This does not result in a larger number of training iterations. The proposed method is general-purpose and it is independent of specific models and specific optimizers (e.g., Adam and AdaGrad). The second question is whether or not this minimal effort back propagation strategy will hurt the accuracy of the trained models. We show that our strategy does not degrade the accuracy of the trained model, even when a very small portion of the parameters is updated. More interestingly, our experimental results reveal that our strategy actually improves the model accuracy in most cases. Based on our experiments, we find that it is probably because the minimal effort update does not modify weakly relevant parameters in each update, which makes overfitting less likely, similar to the dropout effect. The contributions of this work are as follows: • We propose a sparsified back propagation technique for neural network learning, in which only a small subset of the full gradient is computed to update the model parameters. Experimental results demonstrate that we can update only 1–4% of the weights at each back propagation pass. This does not result in a larger number of training iterations. • Surprisingly, our experimental results reveal that the accuracy of the resulting models is actually improved, rather than degraded. We demonstrate this effect by conducting experiments on different deep learning models (LSTM and MLP), various optimization methods (Adam and AdaGrad), and diverse tasks (natural Sparsified Back Propagation for Accelerated Deep Learning with Reduced Overfitting Figure 1. An illustration of meProp. language processing and image recognition). 2. Proposed Method We propose a simple yet effective technique for neural network learning. The forward propagation is computed as usual. During back propagation, only a small subset of the full gradient is computed to update the model parameters. The gradient vectors are “quantized” so that only the top-k components in terms of magnitude are kept. We first present the proposed method and then describe the implementation details. 2.1. meProp Forward propagation of neural network models, including feedforward neural networks, RNN, LSTM, consists of linear transformations and non-linear transformations. For simplicity, we take a computation unit with one linear transformation and one non-linear transformation as an example: y = Wx (1) z = σ(y) (2) m n n where W ∈ R , x ∈ R , y ∈ R , z ∈ R , m is the dimension of the input vector, n is the dimension of the output vector, and σ is a non-linear function (e.g., relu, tanh, and sigmoid). During back propagation, we need to compute the gradient of the parameter matrix W and the input vector x: ′ ∂z = σi xTj (1 ≤ i ≤ n, 1 ≤ j ≤ m) (3) ∂Wij n×m X ′ ∂z WijT σj (1 ≤ j ≤ n, 1 ≤ i ≤ m) = ∂xi j ′ The proposed meProp uses approximate gradients by keeping only top-k elements based on the magnitude values. That is, only the top-k elements with the largest absolute values are kept. For example, suppose a vector v = h1, 2, 3, −4i, then top2 (v) = h0, 0, 3, −4i. ′ We denote the indices of vector σ (y)’s top-k values as {t1 , t2 , ..., tk }(1 ≤ k ≤ n), and the approximate gradient of the parameter matrix W and input vector x is: ′ ∂z ← σi xTj if i ∈ {t1 , t2 , ..., tk } else 0 ∂Wij (5) X ′ ∂z WijT σj if j ∈ {t1 , t2 , ..., tk } else 0 (6) ← ∂xi j As a result, only k rows or columns (depending on the layout) of the weight matrix are modified, leading to a linear reduction (k divided by the vector dimension) in the computational cost. Figure 1 is an illustration of meProp for a single computation unit of neural models. The original back propagation uses the full gradient of the output vectors to compute the gradient of the parameters. The proposed method selects the top-k values of the gradient of the output vector, and backpropagates the loss through the corresponding subset of the total model parameters. As for a complete neural network framework with a loss L, the original back propagation computes the gradient of the parameter matrix W as: ∂L ∂y ∂L = · ∂W ∂y ∂W (7) while the gradient of the input vector x is: (4) ∂zi . We can see that the computawhere σi ∈ Rn means ∂y i tional cost of back propagation is directly proportional to the dimension of output vector n. ∂L ∂y ∂L = · ∂x ∂x ∂y (8) The proposed meProp selects top-k elements of the gradient ∂L ∂y to approximate the original gradient, and passes Sparsified Back Propagation for Accelerated Deep Learning with Reduced Overfitting Figure 2. An illustration of the computational flow of meProp. them through the gradient computation graph according to the chain rule. Hence, the gradient of W goes to: ∂L ∂L ∂y ← topk ( )· ∂W ∂y ∂W (9) while the gradient of the vector x is: ∂y ∂L ∂L ← · topk ( ) ∂x ∂x ∂y (10) Figure 2 shows an illustration of the computational flow of meProp. The forward propagation is the same as traditional forward propagation, which computes the output vector via a matrix multiplication operation between two input tensors. The original back propagation computes the full gradient for the input vector and the weight matrix. For meProp, back propagation computes an approximate gradient by keeping top-k values of the backward flowed gradient and masking the remaining values to 0. Figure 3 further shows the computational flow of meProp for the mini-batch case. 2.2. Implementation We have coded two neural network models, including an LSTM model for part-of-speech (POS) tagging, and a feedforward NN model (MLP) for transition-based dependency parsing and MNIST image recognition. We use the optimizers with automatically adaptive learning rates, including Adam (Kingma & Ba, 2014) and AdaGrad (Duchi et al., 2011). In our implementation, we make no modification to the optimizers, although there are many zero elements in the gradients. Most of the experiments on CPU are conducted on the framework coded in C# on our own. This framework builds a dynamic computation graph of the model for each sample, making it suitable for data in variable lengths. A typical training procedure contains four parts: building the computation graph, forward propagation, back propagation, and parameter update. We also have an implementation based on the PyTorch framework for GPU based experiments. 2.2.1. W HERE TO APPLY ME P ROP The proposed method aims to reduce the complexity of the back propagation by reducing the elements in the computationally intensive operations. In our preliminary observations, matrix-matrix or matrix-vector multiplication consumed more than 90% of the time of back propagation. In our implementation, we apply meProp only to the back propagation from the output of the multiplication to its in- Sparsified Back Propagation for Accelerated Deep Learning with Reduced Overfitting Figure 3. An illustration of the computational flow of meProp on a mini-batch learning setting. puts. For other element-wise operations (e.g., activation functions), the original back propagation procedure is kept, because those operations are already fast enough compared with matrix-matrix or matrix-vector multiplication operations. If there are multiple hidden layers, the top-k sparsification needs to be applied to every hidden layer, because the sparsified gradient will again be dense from one layer to another. That is, in meProp the gradients are sparsified with a top-k operation at the output of every hidden layer. While we apply meProp to all hidden layers using the same k of top-k, usually the k for the output layer could be different from the k for the hidden layers, because the output layer typically has a very different dimension compared with the hidden layers. For example, there are 10 tags in the MNIST task, so the dimension of the output layer is 10, and we use an MLP with the hidden dimension of 500. Thus, the best k for the output layer could be different from that of the hidden layers. 2.2.2. C HOICE OF TOP -k ALGORITHMS Instead of sorting the entire vector, we use the well-known min-heap based top-k selection method, which is slightly changed to focus on memory reuse. The algorithm has a time complexity of O(n log k) and a space complexity of O(k). 3. Related Work Riedmiller and Braun (1993) proposed a direct adaptive method for fast learning, which performs a local adaptation of the weight update according to the behavior of the error function. Tollenaere (1990) also proposed an adaptive acceleration strategy for back propagation. Dropout (Srivastava et al., 2014) is proposed to improve training speed and reduce the risk of overfitting. Sparse coding is a class of unsupervised methods for learning sets of over-complete bases to represent data efficiently (Olshausen & Field, 1996). Ranzato et al. (2006) proposed a sparse autoencoder model for learning sparse over-complete features. The proposed method is quite different compared with those prior studies on back propagation, dropout, and sparse coding. The sampled-output-loss methods (Jean et al., 2015) are limited to the softmax layer (output layer) and are only based on random sampling, while our method does not have those limitations. The sparsely-gated mixture-ofexperts (Shazeer et al., 2017) only sparsifies the mixtureof-experts gated layer and it is limited to the specific set- Sparsified Back Propagation for Accelerated Deep Learning with Reduced Overfitting Table 1. Results based on LSTM/MLP models and AdaGrad/Adam optimizers. Time means averaged time per iteration. Iter means the number of iterations to reach the optimal score on development data. The model of this iteration is then used to obtain the test score. POS-Tag (AdaGrad) Iter Backprop time (s) Dev Acc (%) Test Acc (%) LSTM (h=500) 4 17,534.4 96.89 96.93 meProp (k=5) 4 253.2 (69.2x) 97.18 (+0.29) 97.25 (+0.32) Parsing (AdaGrad) Iter Backprop time (s) Dev UAS (%) Test UAS (%) MLP (h=500) 11 8,899.7 89.07 88.92 meProp (k=20) 8 492.3 (18.1x) 89.17 (+0.10) 88.95 (+0.03) MNIST (AdaGrad) Iter Backprop time (s) Dev Acc (%) Test Acc (%) MLP (h=500) 8 171.0 98.20 97.52 meProp (k=10) 16 4.1 (41.7x) 98.20 (+0.00) 98.00 (+0.48) POS-Tag (Adam) Iter Backprop time (s) Dev Acc (%) Test Acc (%) LSTM (h=500) 2 16,167.3 97.18 97.07 meProp (k=5) 5 247.2 (65.4x) 97.14 (-0.04) 97.12 (+0.05) Parsing (Adam) Iter Backprop time (s) Dev UAS (%) Test UAS (%) MLP (h=500) 14 9,077.7 90.12 89.84 meProp (k=20) 6 488.7 (18.6x) 90.02 (-0.10) 90.01 (+0.17) MNIST (Adam) Iter Backprop time (s) Dev Acc (%) Test Acc (%) MLP (h=500) 17 169.5 98.32 97.82 meProp (k=20) 15 7.9 (21.4x) 98.22 (-0.10) 98.01 (+0.19) Table 2. Overall forward propagation time vs. overall back propagation time. Time means averaged time per iteration. FP means forward propagation. BP means back propagation. Ov. time means overall training time (FP + BP). Ov. time POS-Tag (Adam) Ov. FP time Ov. BP time LSTM (h=500) 7,334s 16,522s 23,856s meProp (k=5) 7,362s 540s (30.5x) 7,903s Ov. time Parsing (Adam) Ov. FP time Ov. BP time MLP (h=500) 3,906s 9,114s 13,020s meProp (k=20) 4,002s 513s (17.7x) 4,516s Ov. time MNIST (Adam) Ov. FP time Ov. BP time MLP (h=500) 69s 171s 240s meProp (k=20) 68s 9s (18.4x) 77s ting of mixture-of-experts, while our method does not have those limitations. There are also prior studies focusing on reducing the communication cost in distributed systems (Seide et al., 2014; Dryden et al., 2016), by quantizing each value of the gradient from 32-bit float to only 1bit. Those settings are also different from ours. 4. Experiments To demonstrate that the proposed method is generalpurpose, we perform experiments on different models (LSTM/MLP), various training methods (Adam/AdaGrad), and diverse tasks. Part-of-Speech Tagging (POS-Tag): We use the standard benchmark dataset in prior work (Collins, 2002), which is derived from the Penn Treebank corpus, and use sections 0-18 of the Wall Street Journal (WSJ) for training (38,219 examples), and sections 22-24 for testing (5,462 examples). The evaluation metric is per-word accuracy. A popular model for this task is the LSTM model (Hochreiter & Schmidhuber, 1997),1 which is used as our baseline. Transition-based Dependency Parsing (Parsing): Following prior work, we use English Penn TreeBank (PTB) (Marcus et al., 1993) for evaluation. We follow the standard split of the corpus and use sections 2-21 as the training set (39,832 sentences, 1,900,056 transition examples),2 section 22 as the development set (1,700 sentences, 80,234 transition examples) and section 23 as the final test set (2,416 sentences, 113,368 transition examples). The evaluation metric is unlabeled attachment score (UAS). We implement a parser using MLP following Chen and Manning (2014), which is used as our baseline. MNIST Image Recognition (MNIST): We use the MNIST handwritten digit dataset (LeCun et al., 1998) for evaluation. MNIST consists of 60,000 28×28 pixel training images and additional 10,000 test examples. Each image contains a single numerical digit (0-9). We select the first 5,000 images of the training images as the development set and the rest as the training set. The evaluation metric is per-image accuracy. We use the MLP model as the baseline. 4.1. Experimental Settings We set the dimension of the hidden layers to 500 for all the tasks. For POS-Tag, the input dimension is 1 (word) × 50 (dim per word) + 7 (features) × 20 (dim per feature) = 190, and the output dimension is 45. For Parsing, the input 1 In this work, we use the bi-directional LSTM (Bi-LSTM) as the implementation of LSTM. 2 A transition example consists of a parsing context and its optimal transition action. Sparsified Back Propagation for Accelerated Deep Learning with Reduced Overfitting 100 98 97.9 97.8 97.6 0 meProp MLP 20 40 60 80 Backprop Ratio (%) 100 98 98 97 96 96 Accuracy (%) Accuracy (%) Accuracy (%) 98.1 97.7 MNIST: Change h/k MNIST: Topk vs Random MNIST: Reduce Overfitting 98.2 94 92 90 Topk meProp Random meProp 88 86 0 5 10 Backprop Ratio (%) 15 95 94 93 92 91 0 meProp MLP 2 4 6 8 Backprop/Hidden Ratio (%) 10 Figure 4. Accuracy vs. meProp’s backprop ratio (left). Results of top-k meProp vs. random meProp (middle). Results of top-k meProp vs. baseline with the hidden dimension h (right). dimension is 48 (features) × 50 (dim per feature) = 2400, and the output dimension is 25. For MNIST, the input dimension is 28 (pixels per row) × 28 (pixels per column) × 1 (dim per pixel) = 784, and the output dimension is 10. As discussed in Section 2, the optimal k of top-k for the output layer could be different from the hidden layers, because their dimensions could be very different. For Parsing and MNIST, we find using the same k for the output and the hidden layers works well, and we simply do so. For another task, POS-Tag, we find the the output layer should use a different k from the hidden layers. For simplicity, we do not apply meProp to the output layer for POS-Tag, because in this task we find the computational cost of the output layer is almost negligible compared with other layers. The hyper-parameters are tuned based on the development data. For the Adam optimization method, we find the default hyper-parameters work well on development sets, which are as follows: the learning rate α = 0.001, and β1 = 0.9, β2 = 0.999, ǫ = 1 × 10−8 . For the AdaGrad learner, the learning rate is set to α = 0.01, 0.01, 0.1 for POS-Tag, Parsing, and MNIST, respectively, and ǫ = 1 × 10−6 . The experiments on CPU are conducted on a computer with the INTEL(R) Xeon(R) 3.0GHz CPU. The experiments on GPU are conducted on NVIDIA GeForce GTX 1080. 4.2. Experimental Results In this experiment, the LSTM is based on one hidden layer and the MLP is based on two hidden layers (experiments on more hidden layers will be presented later). We conduct experiments on different optimization methods, including AdaGrad and Adam. Since meProp is applied to the linear transformations (which entail the major computational cost), we report the linear transformation related backprop time as Backprop Time. It does not include nonlinear activations, which usually have only less than 2% computational cost. The total time of back propagation, in- cluding non-linear activations, is reported as Overall Backprop Time. Based on the development set and prior work, we set the mini-batch size to 1 (sentence), 10,000 (transition examples), and 10 (images) for POS-Tag, Parsing, and MNIST, respectively. Using 10,000 transition examples for Parsing follows Chen and Manning (2014). Table 1 shows the results based on different models and different optimization methods. In the table, meProp means applying meProp to the corresponding baseline model, h = 500 means that the hidden layer dimension is 500, and k = 20 means that meProp uses top-20 elements (among 500 in total) for back propagation. Note that, for fair comparisons, all experiments are first conducted on the development data and the test data is not observable. Then, the optimal number of iterations is decided based on the optimal score on development data, and the model of this iteration is used upon the test data to obtain the test scores. As we can see, applying meProp can substantially speed up the back propagation. It provides a linear reduction in the computational cost. Surprisingly, results demonstrate that we can update only 1–4% of the weights at each back propagation pass. This does not result in a larger number of training iterations. More surprisingly, the accuracy of the resulting models is actually improved rather than decreased. The main reason could be that the minimal effort update does not modify weakly relevant parameters, which makes overfitting less likely, similar to the dropout effect. Table 2 shows the overall forward propagation time, the overall back propagation time, and the training time by summing up forward and backward propagation time. As we can see, back propagation has the major computational cost in training LSTM/MLP. The results are consistent among AdaGrad and Adam. The results demonstrate that meProp is independent of specific optimization methods. For simplicity, in the following experiments the optimizer is based on Adam. Sparsified Back Propagation for Accelerated Deep Learning with Reduced Overfitting Table 3. Results based on the same k and h. POS-Tag (Adam) Iter Test Acc (%) LSTM (h=5) 7 96.40 meProp (k=5) 5 97.12 (+0.72) Parsing (Adam) Iter Test UAS (%) MLP (h=20) 18 88.37 meProp (k=20) 6 90.01 (+1.64) MNIST (Adam) Iter Test Acc (%) MLP (h=20) 15 95.77 meProp (k=20) 17 98.01 (+2.24) 4.3. Varying Backprop Ratio In Figure 4 (left), we vary the k of top-k meProp to compare the test accuracy on different ratios of meProp backprop. For example, when k=5, it means that the backprop ratio is 5/500=1%. The optimizer is Adam. As we can see, meProp achieves consistently better accuracy than the baseline. The best test accuracy of meProp, 98.15% (+0.33), is actually better than the one reported in Table 1. Table 4. Adding the dropout technique. POS-Tag (Adam) Dropout Test Acc (%) LSTM (h=500) 0.5 97.20 meProp (k=20) 0.5 97.31 (+0.11) Parsing (Adam) Dropout Test UAS (%) MLP (h=500) 0.5 91.53 meProp (k=40) 0.5 91.99 (+0.46) MNIST (Adam) Dropout Test Acc (%) MLP (h=500) 0.2 98.09 meProp (k=25) 0.2 98.32 (+0.23) Table 5. Varying the number of hidden layers on the MNIST task. The optimizer is Adam. Layers: the number of hidden layers. Layers Method Test Acc (%) MLP (h=500) 98.10 2 meProp (k=25) 98.20 (+0.10) MLP (h=500) 98.21 3 meProp (k=25) 98.37 (+0.16) MLP (h=500) 98.10 4 meProp (k=25) 98.15 (+0.05) MLP (h=500) 98.05 5 meProp (k=25) 98.21 (+0.16) 4.4. Top-k vs. Random It will be interesting to check the role of top-k elements. Figure 4 (middle) shows the results of top-k meProp vs. random meProp. The random meProp means that random elements (instead of top-k ones) are selected for back propagation. As we can see, the top-k version works better than the random version. It suggests that top-k elements contain the most important information of the gradients. 4.5. Varying Hidden Dimension We still have a question: does the top-k meProp work well simply because the original model does not require that big dimension of the hidden layers? For example, the meProp (topk=5) works simply because the LSTM works well with the hidden dimension of 5, and there is no need to use the hidden dimension of 500. To examine this, we perform experiments on using the same hidden dimension as k, and the results are shown in Table 3. As we can see, however, the results of the small hidden dimensions are much worse than those of meProp. In addition, Figure 4 (right) shows more detailed curves by varying the value of k. In the figure, different k gives different backprop ratio for meProp and different hidden dimension ratio for LSTM/MLP. As we can see, the answer to that question is negative: meProp does not rely on redundant hidden layer elements. 4.6. Adding Dropout Since we have observed that meProp can reduce overfitting of deep learning, a natural question is that if meProp is reducing the same type of overfitting risk as dropout. Thus, we use development data to find a proper value of the dropout rate on those tasks, and then further add meProp to check if further improvement is possible. Table 4 shows the results. As we can see, meProp can achieve further improvement over dropout. In particular, meProp has an improvement of 0.46 UAS on Parsing. The results suggest that the type of overfitting that meProp reduces is probably different from that of dropout. Thus, a model should be able to take advantage of both meProp and dropout to reduce overfitting. 4.7. Adding More Hidden Layers Another question is whether or not meProp relies on shallow models with only a few hidden layers. To answer this question, we also perform experiments on more hidden layers, from 2 hidden layers to 5 hidden layers. We find setting the dropout rate to 0.1 works well for most cases of different numbers of layers. For simplicity of comparison, we set the same dropout rate to 0.1 in this experiment. Table 5 shows that adding the number of hidden layers does not hurt the performance of meProp. 4.8. Speedup on GPU For implementing meProp on GPU, the simplest solution is to treat the entire mini-batch as a “big training example”, where the top-k operation is based on the averaged values of all examples in the mini-batch. In this way, the big sparse matrix of the mini-batch will have consistent sparse patterns among examples, and this consistent sparse matrix can be transformed into a small dense matrix by remov- Sparsified Back Propagation for Accelerated Deep Learning with Reduced Overfitting Table 6. Results of simple unified top-k meProp based on a whole mini-batch (i.e., unified sparse patterns). The optimizer is Adam. Mini-batch Size is 50. Layers Method Test Acc (%) MLP (h=500) 97.97 2 meProp (k=30) 98.08 (+0.11) MLP (h=500) 98.09 5 meProp (k=50) 98.36 (+0.27) Table 7. Acceleration results on the matrix multiplication synthetic data using GPU. The batch size is 1024. Method Backprop time (ms) Baseline (h=8192) 308.00 meProp (k=8) 8.37 (36.8x) meProp (k=16) 9.16 (33.6x) meProp (k=32) 11.20 (27.5x) meProp (k=64) 14.38 (21.4x) meProp (k=128) 21.28 (14.5x) meProp (k=256) 38.57 (8.0x) meProp (k=512) 69.95 (4.4x) ing the zero values. We call this implementation as simple unified top-k. This experiment is based on PyTorch. Despite its simplicity, Table 6 shows the good performance of this implementation, which is based on the mini-batch size of 50. We also find the speedup on GPU is less significant when the hidden dimension is low. The reason is that our GPU’s computational power is not fully consumed by the baseline (with small hidden layers), so that the normal back propagation is already fast enough, making it hard for meProp to achieve substantial speedup. For example, supposing a GPU can finish 1000 operations in one cycle, there could be no speed difference between a method with 100 and a method with 10 operations. Indeed, we find MLP (h=64) and MLP (h=512) have almost the same GPU speed even on forward propagation (i.e., without meProp), while theoretically there should be an 8x difference. With GPU, the forward propagation time of MLP (h=64) and MLP (h=512) is 572ms and 644ms, respectively. This provides evidence for our hypothesis that our GPU is not fully consumed with the small hidden dimensions. Thus, the speedup test on GPU is more meaningful for the heavy models, such that the baseline can at least fully consume the GPU’s computational power. To check this, we test the GPU speedup on synthetic data of matrix multiplication with a larger hidden dimension. Indeed, Table 7 shows that meProp achieves much higher speed than the traditional backprop with the large hidden dimension. Furthermore, we test the GPU speedup on MLP with the large hidden dimension (Dryden et al., 2016). Table 8 shows that meProp also has substantial GPU speedup on MNIST with the large hidden dimension. In this experiment, the speedup is based on Overall Backprop Time (see the prior definition). Those results demonstrate that meProp can achieve Table 8. Acceleration results on MNIST using GPU. Method Overall backprop time (ms) MLP (h=8192) 17,696.2 meProp (k=8) 1,501.5 (11.8x) meProp (k=16) 1,542.8 (11.5x) meProp (k=32) 1,656.9 (10.7x) meProp (k=64) 1,828.3 (9.7x) meProp (k=128) 2,200.0 (8.0x) meProp (k=256) 3,149.6 (5.6x) meProp (k=512) 4,874.1 (3.6x) good speedup on GPU when it is applied to heavy models. Finally, there are potentially other implementation choices of meProp on GPU. For example, another natural solution is to use a big sparse matrix to represent the sparsified gradient of the output of a mini-batch. Then, the sparse matrix multiplication library can be used to accelerate the computation. This could be an interesting direction of future work. 4.9. Related Systems on the Tasks The POS tagging task is a well-known benchmark task, with the accuracy reports from 97.2% to 97.4% (Toutanova et al., 2003; Sun, 2014; Shen et al., 2007; Tsuruoka et al., 2011; Collobert et al., 2011; Huang et al., 2015). Our method achieves 97.31% (Table 4). For the transition-based dependency parsing task, existing approaches typically can achieve the UAS score from 91.4 to 91.5 (Zhang & Clark, 2008; Nivre et al., 2007; Huang & Sagae, 2010). As one of the most popular transition-based parsers, MaltParser (Nivre et al., 2007) has 91.5 UAS. Chen and Manning (2014) achieves 92.0 UAS using neural networks. Our method achieves 91.99 UAS (Table 4). For MNIST, the MLP based approaches can achieve 98– 99% accuracy, often around 98.3% (LeCun et al., 1998; Simard et al., 2003; Ciresan et al., 2010). Our method achieves 98.37% (Table 5). With the help from convolutional layers and other techniques, the accuracy can be improved to over 99% (Jarrett et al., 2009; Ciresan et al., 2012). Our method can also be improved with those additional techniques, which, however, are not the focus of this paper. 5. Conclusions The back propagation in deep learning tries to modify all parameters in each stochastic update, which is inefficient and may even lead to overfitting due to unnecessary modification of many weakly relevant parameters. We propose a minimal effort back propagation method (meProp), in which we compute only a very small but critical portion of Sparsified Back Propagation for Accelerated Deep Learning with Reduced Overfitting the gradient, and modify only the corresponding small portion of the parameters in each update. This leads to very sparsified gradients to modify only highly relevant parameters for the given training sample. The proposed meProp is independent of the optimization method. Experiments show that meProp can reduce the computational cost of back propagation by one to two orders of magnitude via updating only 1–4% parameters, and yet improve the model accuracy in most cases. Acknowledgements The authors would like to thank the anonymous reviewers for insightful comments and suggestions on this paper. This work was supported in part by National Natural Science Foundation of China (No. 61673028), National High Technology Research and Development Program of China (863 Program, No. 2015AA015404), and an Okawa Research Grant (2016). References Chen, Danqi and Manning, Christopher D. A fast and accurate dependency parser using neural networks. In Proceedings of EMNLP’14, pp. 740–750, 2014. Ciresan, Dan C., Meier, Ueli, Gambardella, Luca Maria, and Schmidhuber, Jürgen. Deep, big, simple neural nets for handwritten digit recognition. Neural Computation, 22(12):3207–3220, 2010. Ciresan, Dan C., Meier, Ueli, and Schmidhuber, Jürgen. Multi-column deep neural networks for image classification. In Proceedings of CVPR’12, pp. 3642–3649, 2012. Collins, Michael. Discriminative training methods for hidden markov models: Theory and experiments with perceptron algorithms. In Proceedings of EMNLP’02, pp. 1–8, 2002. Collobert, Ronan, Weston, Jason, Bottou, Léon, Karlen, Michael, Kavukcuoglu, Koray, and Kuksa, Pavel P. Natural language processing (almost) from scratch. Journal of Machine Learning Research, 12:2493–2537, 2011. Dryden, Nikoli, Moon, Tim, Jacobs, Sam Ade, and Essen, Brian Van. Communication quantization for dataparallel training of deep neural networks. In Proceedings of the 2nd Workshop on Machine Learning in HPC Environments, pp. 1–8, 2016. Duchi, John C., Hazan, Elad, and Singer, Yoram. Adaptive subgradient methods for online learning and stochastic optimization. Journal of Machine Learning Research, 12:2121–2159, 2011. Hochreiter, Sepp and Schmidhuber, Jürgen. Long shortterm memory. Neural computation, 9(8):1735–1780, 1997. Huang, Liang and Sagae, Kenji. Dynamic programming for linear-time incremental parsing. In Proceedings of ACL’10, pp. 1077–1086, 2010. Huang, Zhiheng, Xu, Wei, and Yu, Kai. Bidirectional lstm-crf models for sequence tagging. CoRR, abs/1508.01991, 2015. Jarrett, Kevin, Kavukcuoglu, Koray, Ranzato, Marc’Aurelio, and LeCun, Yann. What is the best multi-stage architecture for object recognition? In Proceeding of ICCV’09, pp. 2146–2153, 2009. Jean, Sébastien, Cho, KyungHyun, Memisevic, Roland, and Bengio, Yoshua. On using very large target vocabulary for neural machine translation. In Proceedings of ACL/IJCNLP’15, pp. 1–10, 2015. Kingma, Diederik P. and Ba, Jimmy. Adam: A method for stochastic optimization. CoRR, abs/1412.6980, 2014. LeCun, Yann, Bottou, Léon, Bengio, Yoshua, and Haffner, Patrick. Gradient-based learning applied to document recognition. Proceedings of the IEEE, 86(11):2278– 2324, 1998. Marcus, Mitchell P, Marcinkiewicz, Mary Ann, and Santorini, Beatrice. Building a large annotated corpus of english: The penn treebank. Computational linguistics, 19(2):313–330, 1993. Nivre, Joakim, Hall, Johan, Nilsson, Jens, Chanev, Atanas, Eryigit, Gülsen, Kübler, Sandra, Marinov, Svetoslav, and Marsi, Erwin. Maltparser: A language-independent system for data-driven dependency parsing. Natural Language Engineering, 13(2):95–135, 2007. Olshausen, Bruno A and Field, David J. Natural image statistics and efficient coding. Network: Computation in Neural Systems, 7(2):333–339, 1996. Ranzato, Marc’Aurelio, Poultney, Christopher S., Chopra, Sumit, and LeCun, Yann. Efficient learning of sparse representations with an energy-based model. In NIPS’06, pp. 1137–1144, 2006. Riedmiller, Martin and Braun, Heinrich. A direct adaptive method for faster backpropagation learning: The rprop algorithm. In Proceedings of IEEE International Conference on Neural Networks 1993, pp. 586–591, 1993. Seide, Frank, Fu, Hao, Droppo, Jasha, Li, Gang, and Yu, Dong. 1-bit stochastic gradient descent and its application to data-parallel distributed training of speech dnns. Sparsified Back Propagation for Accelerated Deep Learning with Reduced Overfitting In Proceedings of INTERSPEECH’14, pp. 1058–1062, 2014. Shazeer, Noam, Mirhoseini, Azalia, Maziarz, Krzysztof, Davis, Andy, Le, Quoc V., Hinton, Geoffrey E., and Dean, Jeff. Outrageously large neural networks: The sparsely-gated mixture-of-experts layer. CoRR, abs/1701.06538, 2017. Shen, Libin, Satta, Giorgio, and Joshi, Aravind K. Guided learning for bidirectional sequence classification. In Proceedings of ACL’07, pp. 760–767, 2007. Simard, Patrice Y., Steinkraus, Dave, and Platt, John C. Best practices for convolutional neural networks applied to visual document analysis. In Proceedings of ICDR’03, pp. 958–962, 2003. Srivastava, Nitish, Hinton, Geoffrey E., Krizhevsky, Alex, Sutskever, Ilya, and Salakhutdinov, Ruslan. Dropout: a simple way to prevent neural networks from overfitting. Journal of Machine Learning Research, 15(1): 1929–1958, 2014. Sun, Xu. Structure regularization for structured prediction. In NIPS’14, pp. 2402–2410. 2014. Tollenaere, Tom. Supersab: fast adaptive back propagation with good scaling properties. Neural networks, 3 (5):561–573, 1990. Toutanova, Kristina, Klein, Dan, Manning, Christopher D., and Singer, Yoram. Feature-rich part-of-speech tagging with a cyclic dependency network. In Proceedings of HLT-NAACL’03, pp. 173–180, 2003. Tsuruoka, Yoshimasa, Miyao, Yusuke, and Kazama, Jun’ichi. Learning with lookahead: Can history-based models rival globally optimized models? In Proceedings of CoNLL’11, pp. 238–246, 2011. Zhang, Yue and Clark, Stephen. A tale of two parsers: Investigating and combining graph-based and transition-based dependency parsing. In Proceedings of EMNLP’08, pp. 562–571, 2008.
1cs.CV
The Benefits of Population Diversity in Evolutionary Algorithms: A Survey of Rigorous Runtime Analyses arXiv:1801.10087v1 [cs.NE] 30 Jan 2018 Dirk Sudholt Department of Computer Science University of Sheffield, United Kingdom January 31, 2018 Abstract Population diversity is crucial in evolutionary algorithms to enable global exploration and to avoid poor performance due to premature convergence. This book chapter reviews runtime analyses that have shown benefits of population diversity, either through explicit diversity mechanisms or through naturally emerging diversity. These works show that the benefits of diversity are manifold: diversity is important for global exploration and the ability to find several global optima. Diversity enhances crossover and enables crossover to be more effective than mutation. Diversity can be crucial in dynamic optimization, when the problem landscape changes over time. And, finally, it facilitates search for the whole Pareto front in evolutionary multiobjective optimization. The presented analyses rigorously quantify the performance of evolutionary algorithms in the light of population diversity, laying the foundation for a rigorous understanding of how search dynamics are affected by the presence or absence of population diversity and the introduction of diversity mechanisms. 1 Introduction Evolutionary algorithms (EAs) are popular general-purpose metaheuristics inspired by the natural evolution of species. By using operators like mutation, recombination, and selection, a multi-set of solutions—the population—is evolved over time. The hope is that this artificial evolution will explore vast regions of the search space and yet use the principle of “survival of the fittest” to generate good solutions for the problem at hand. Countless applications as well as theoretical results have demonstrated that these algorithms are effective on many hard optimization problems. A key distinguishing feature from other approaches such as local search or simulated annealing is the use of a population of candidate solutions. The use of a population allows evolutionary algorithms to explore different areas of the search space, facilitating global exploration. It also enables the use of recombination, where the hope is to combine good features of two solutions. A common problem in evolutionary algorithms is called premature convergence: the population collapsing to copies of the same genotype, or more generally, a set of very similar genotypes, before the search space has been explored properly. In this case there is no benefit of having a population; in the worst case, the evolutionary algorithm may behave like a local search algorithm, but with an additional overhead from maintaining many similar solutions. 1 What we want instead is a diverse population that contains dissimilar individuals to promote exploration. The benefits of diversity are manifold: global exploration: a diverse population is generally well suited for global exploration, as it can explore different regions of the search space, reducing the risk of the whole population converging to local optima of low fitness. facilitating crossover: often a diverse population is required for crossover to work effectively. Crossing over two very similar solutions will result in an offspring that is similar to both parents, and this effect can also be achieved by mutation. Many problems where crossover is essential do require a diverse population. decision making: a diverse population provides a diverse set of solutions for a decision maker to choose from. This is particularly important in multi-objective optimization as there are often trade-offs between different objectives, and the goal is to provide a varied set of solutions to a decision maker. robustness: a diverse population reduces the risk of getting stuck in a local optimum of bad quality. It is also robust with regards to uncertainty, like noisy fitness evaluations or changes to the fitness function in case the problem changes dynamically. A diverse population may be able to track moving optima efficiently, or to maintain individuals on different peaks, such that when the global optimum changes from one peak to another, it is easy to rediscover a global optimum. In the long history of evolutionary computation, many solutions have been proposed to maintain or promote diversity. This includes controlling diversity through balancing exploration and exploitation via careful parameter tuning and designing selection mechanisms carefully, to explicit diversity-preserving mechanisms that can be embedded in an evolutionary algorithm. The latter include techniques such as eliminating duplicates, subpopulations with migration as in island models, and niching techniques that try to establish niches of similar search points, and preventing niches from going extinct. Niching techniques include fitness sharing (where similar individuals are forced to “share” their fitness, i. e. their real fitness is reduced during selection), clearing (where similar individuals can be “cleared” away by setting their fitness to a minimum value), and deterministic crowding (where offspring compete directly against their parents), just to name a few. For more extensive surveys on diversity-preserving mechanisms we refer the reader to recent surveys by Shir [49], Črepinšek, Liu, and Mernik [57], and Squillero and Tonda [50]. Details for the diversity mechanisms surveyed here will be presented in the respective sections. Many of these techniques work on either the genotypic level, i. e. trying to create a diverse set of bit strings, or on a phenotypic level, trying to obtain different phenotypes, taking into consideration some form of mapping from genotypes to phenotypes. For instance, for functions of unitation (functions that depend on only on the number of 1-bits in the bit string), the genotype is a bit string, but the phenotype is given by the number of 1-bits. Diversity mechanisms can focus on genotypic diversity or phenotypic diversity. Given the plethora of mechanisms to be applied, it is often not clear what the best strategy is. Which diversity mechanisms work well for a given problem, which don’t, and, most importantly, why? In particular, the effect such mechanisms have on search dynamics and performance are often not well understood. This book chapter reviews rigorous theoretical runtime analyses of evolutionary algorithms where diversity plays a key role, in order to address these questions and to develop a better understanding of the search dynamics in the presence or absence of diversity. 2 The goal of runtime analysis is to estimate the random or expected time until an evolutionary algorithm has met a particular goal, by rigorous mathematical studies. Goals can include finding a global optimum, finding a diverse set of optima, or, specifically in the context of multi-objective optimization, finding the Pareto front of Pareto optimal solutions. The results help to get insight into the search behavior of evolutionary algorithms in the presence or absence of diversity, and how parameters and explicit diversity mechanisms affect performance. They in particular highlight which diversity mechanisms are effective for particular problems, and which are ineffective. More importantly, they explain why diversity mechanisms are effective or ineffective, and how to design the most effective evolutionary algorithms for the problems considered. The presentation of these results is intended to combine formal theorems with informal explanations in order to make it accessible to a broad audience, while maintaining mathematical rigor. Instead of presenting formal proofs, we focus on key ideas and insights that can be drawn from these analyses. The reader is referred to the original papers for rigorous proofs and further details. In many cases we only present selected results from the surveyed papers, or results that are simplified towards special cases for reasons of simplicity, and the original works contain further and/or more general results. The outline of this chapter is as follows. After some preliminaries in Section 2, we first review the use of diversity-preserving mechanisms for enhancing global exploration in mutation-based evolutionary algorithms in Section 3. Section 4 then reviews the benefits of diversity for the use of crossover in genetic algorithms. Section 5 reviews the benefits of diversity mechanisms in dynamic optimization, where only few results are available to date. Section 6 presents a recent, novel approach: using diversity metrics to design parent selection mechanisms that speed up evolutionary multiobjective optimization by picking parents that are most effective for spreading the population on the Pareto front. We finish with conclusions in Section 7. This chapter is not meant to be comprehensive; in fact, there are several further runtime analyses not surveyed in this chapter. This includes island models with crossover [43, 58], achieving diversity through heterogenous island models and how this helps for SetCover [41] or achieving diversity through a tailored population model as in the case of all-pairs shortest paths [12]. Another popular diversity mechanism is ageing: restricting the lifespan of individuals to promote diversity. There are several runtime analyses of ageing mechanisms [22, 27, 28, 45], however these are being reviewed in Zarges’ chapter [62]. This chapter focusses on single-objective optimization, though diversity is a very important topic in multi-objective optimization (see, e. g. the work by Horoba and Neumann [23]). We only present one recent study for multiobjective optimization in Section 6 and refer to Brockhoff’s survey [3] for a review of further theoretical results. 2 Preliminaries The rigorous runtime analysis of randomized search heuristics is a challenging task, as these heuristics have not been designed to support an analysis. For that reason, we mostly consider bare-bones algorithms to facilitate a theoretical analysis. Furthermore, enhancing a bare-bones evolutionary algorithm with a diversity mechanism allows us to compare different diversity mechanisms in a clear-cut way, keeping the baseline algorithm as simple as possible. The algorithms presented here do not use a specific stopping criterion, as we are interested in the random time for achieving a set goal. This time is generally referred to as run time, or running time. The most common goal is finding a global optimum, and the first hitting time of a global optimum is called optimization time. In other cases we aim to find all global optima, or the whole Pareto front in a multi-objective setting. 3 n #ones n/2 0 n n/2 Figure 1: Sketch of the function TwoMax with n = 30. Gao and Neumann [19] provided an alternative approach using rigorous runtime analysis: they considered the task of maximizing diversity amongst all search points with a given minimum quality. While being a very interesting study that has inspired subsequent runtime analyses [8], it is considered out of the scope of this survey. Unless mentioned otherwise, we assume a binary search space where n denotes the problem size, that is, the length of the bit string. We use 0n and 1n to indicate the all-zeros and the allones string, and, more generally, blocks of bits of some value. Further, |x|1 denotes the number of ones in a bit string x, and |x|0 denotes the number of zeros. In the following, we say that an event occurs with high probability if its probability is at least 1 − n−Ω(1) , and an event occurs with overwhelming probability if its probability is at least ε 1 − 2−Ω(n ) for some ε > 0. 3 How Diversity Benefits Global Exploration We first review runtime analyses where explicit diversity mechanisms were used to improve the ability of evolutionary algorithms to explore the search space, and to find global optima. The first such study was presented by Friedrich, Hebbinghaus, and Neumann [17], who compared a genotypic and a phenotypic diversity mechanism on an artificially constructed problem. Here we review results from subsequent works [6, 18, 46] in Section 3.1 that focused on the bimodal problem TwoMax instead. TwoMax has a simple structure, but it is very challenging to evolve a population that contains both optima. The diversity mechanisms considered for TwoMax include: avoiding genotype duplicates, avoiding fitness duplicates, deterministic crowding, fitness sharing (in two variants) and clearing. In Section 3.2 we review theoretical analyses for island models [35, 36]: subpopulations that communicate via migration, which can be run effectively on parallel hardware. 3.1 Diversity Mechanisms on TwoMax: A Simple Bimodal Function The function TwoMax (see Figure 1) is a function of unitation, that is, the fitness value only depends on the number of 1-bits: ) ( n n X X xi . xi , n − TwoMax(x) := max i=1 i=1 The fitness landscape consists of two hills with symmetric slopes: one for maximizing the number of ones, the other one for maximizing the number of zeros. These sets are also refereed to as branches. In [18] an additional fitness value for 1n was added to distinguish between a local optimum 0n and a unique global optimum. Here we use the original function with two global 4 optima as also used in [46] and [6], and measure the time needed in order to find both optima. The presentation of results in [18] has been adapted to reflect this change. TwoMax is an ideal benchmark function for studying diversity mechanisms as it is simply structured, hence facilitating a theoretical analysis, and it is hard for EAs to find both optima as they have the maximum possible Hamming distance. The TwoMax function does appear in well-known combinatorial optimization problems. For example, the VertexCover bipartite graph analyzed in Oliveto, He, and Yao [44] consists of two branches, one leading to a local optimum and the other to the minimum cover. Another function with a similar structure is the Mincut instance from Sudholt [54]. 3.1.1 No Diversity Mechanism In order to obtain a fair comparison of different diversity-preserving mechanisms, we keep one algorithm fixed as much as possible. The basic algorithm, the (µ+1) EA shown in Algorithm 1, has already been investigated by Witt [61]. Algorithm 1: (µ+1) EA 1 2 3 4 5 6 7 8 9 10 11 t←0 Initialize P0 with µ individuals chosen uniformly at random. while termination criterion not met do Choose x ∈ Pt uniformly at random. Create y by flipping each bit in x independently with probability 1/n. Choose z ∈ Pt with worst fitness uniformly at random. if f (y) ≥ f (z) then Pt+1 = Pt \ {z} ∪ {y} else Pt+1 = Pt t ←t+1 The (µ+1) EA uses uniform random parent selection and elitist selection for survival. As parents are chosen uniformly at random, the selection pressure is quite low. Nevertheless, the (µ+1) EA is not able to maintain individuals on both branches for a long time. We now show that if µ is not too large, the individuals on one branch typically get extinct before the top of the branch is reached. Thus, the (µ+1) EA is unlikely to find both optima and the expected time for finding both optima is very large. Theorem 1 (Adapted from Theorem 1 in [18]). The probability that the (µ+1) EA with no diversity-preserving mechanism and µ = o(n/log n) finds both optima of TwoMax in time nn−1 is o(1). The expected time for finding both optima is Ω(nn ). The proof idea is to consider the first point in time where one optimum is found. Without loss of generality, we assume that this is 0n . From there, one of two possible events may happen: another individual with genotype 0n can enter the population or the other optimum 1n can be found. The former event can occur if an individual with genotype 0n is selected as parent and no bit is flipped during mutation. The more copies of 0n optimum are contained in the population, the larger the probability of this event becomes. On the other hand, in order to create 1n , a mutation has to flip all 0-bits in the parent (and no 1-bits). If the population size is small, copies of 0n tend to take over the whole population before a mutation can create 1n . If this happens, the (µ+1) EA has to flip n bits to create 1n from 0n , which has probability n−n . Even 5 considering nn−1 generations, the probability of this enormous jump happening is still o(1), that is, converging to 0. 3.1.2 Avoiding Genotype Duplicates Algorithm 2: (µ+1) EA avoiding genotype duplicates 1 2 3 4 5 6 7 8 while termination criterion not met do Choose x ∈ Pt uniformly at random. Create y by flipping each bit in x independently with probability 1/n. Choose z ∈ Pt with worst fitness uniformly at random. if f (y) ≥ f (z) and y ∈ / Pt then Pt+1 = Pt \ {z} ∪ {y} else Pt+1 = Pt 9 t ←t+1 A simple way to enforce diversity within the population is not to allow genotype duplicates. We study a mechanism used in Storch [51], where in the “if” statement of the (µ+1) EA the condition “and y ∈ / Pt ” is added, see Algorithm 2. Note that here and in the following we only show the main loop as the initialization steps are the same for all (µ+1) EA variants. This mechanism ensures that the population always contains µ different genotypes (modulo possible duplicates occurring during initialization). However, this mechanism is not powerful enough to explore both branches of TwoMax. Theorem 2 (Adapted from Theorem 2 in [18]). The probability that the (µ+1) EA with genotype diversity and µ = o(n1/2 ) finds both optima of TwoMax in time nn−2 is at most o(1). The expected time for finding both optima is Ω(nn−1 ). The proof idea is similar to that of Theorem 2; however we cannot rely on copies of one optimum 0n taking over the population, as duplicates of 0n are prevented from entering the population. The algorithm can still generate individuals similar to 0n , for example by choosing 0n as parent and flipping a single 0-bit to 1. As mutations can flip any of n bits, the algorithm can easily create a population containing 0n and many search points with only a single 1-bit that are at least as fit as the current best search points on the other branch. If the population size is µ = o(n1/2 ), the population is likely to be taken over by such search points before the other optimum 1n is found. Note that our arguments rely on 0n being selected as parent, and there is only one individual with genotype 0n . This leads to a more restrictive condition on µ (µ = o(n1/2 )) compared to the setting of no diversity mechanism (µ = o(n/log n)). We conclude that avoiding genotype duplicates does create diversity in the population in a sense of different genotypes, but this kind of diversity is too weak for finding both optima of TwoMax as there we need to evolve individuals on both branches. 3.1.3 Fitness Diversity Avoiding genotype duplicates does not help much to optimize TwoMax as individuals from one branch are still allowed to spread on a certain fitness level and take over the population. A more restrictive mechanism is to avoid fitness duplicates, i. e., multiple individuals with the same fitness. Such a mechanism has been defined and analyzed by Friedrich, Hebbinghaus, and 6 Algorithm 3: (µ+1) EA with fitness diversity 1 2 3 4 5 6 7 8 9 10 11 while termination criterion not met do Choose x ∈ Pt uniformly at random. Create y by flipping each bit in x independently with probability 1/n. if there exists z ∈ Pt such that f (y) = f (z) then Pt+1 = Pt \ {z} ∪ {y} else Choose z ∈ Pt with worst fitness uniformly at random. if f (y) ≥ f (z) then Pt+1 = Pt \ {z} ∪ {y} else Pt+1 = Pt 12 t ←t+1 Neumann [17] for plateaus of constant fitness. In addition, this resembles the idea of fitness diversity proposed by Hutter and Legg [24]. The (µ+1) EA with fitness diversity avoids that multiple individuals with the same fitness are stored in the population. If at some time t a new individual x is created with the same fitness value as a pre-existing one y ∈ Pt then x replaces y (see Algorithm 3). The following theorem proves that if the population is not too large, then with high probability the individuals climbing one of the two branches will be extinguished before any of them reaches the top. Theorem 3 (Adapted from Theorem 3 in [18]). The probability that the (µ+1) EA with fitness diversity and µ ≤ nO(1) finds both optima1 of TwoMax in time 2cn , c > 0 being an appropriate constant, is at most o(1). The expected time for finding both optima is 2Ω(n) . The intuitive reason why this mechanism fails is that, once the population has reached one optimum, w. l. o. g. 0n , the population has a tendency to spread on the branch leading to said optimum, until the whole population is contained on said branch. During this time there may be a competition between the two branches: whenever one branch creates an offspring on the same branch, it may remove an individual of the same fitness in the opposite branch. This competition is biased towards the branch at 0n , though, as the former branch can use “downhill” mutations, that is, a mutation flipping only one of the many 0-bits, whereas the opposite branch may have to rely on much rarer “uphill” mutations, that is, flipping only one of the rare 0-bits. The proof defines a potential function that captures the progress in this competition and shows that the branch that reaches its optimum first is likely to make individuals on the other branch go extinct. 3.1.4 Deterministic Crowding The main idea behind deterministic crowding is that offspring directly compete with their parents. In genetic algorithms with crossover, pairs of parents are being formed, recombined, and mutated, and then the offspring competes with one of its parents, replacing it if it is no worse. 1 Due to the fitness diversity mechanism, and since, in contrast to [18], here we consider a TwoMax variant with two global optima, the population can never actually contain both optima. To set a meaningful target, here we also consider cases where the union of the current population and a new offspring contains both optima. 7 Algorithm 4: (µ+1) EA with deterministic crowding 1 2 3 4 5 6 7 while termination criterion not met do Choose x ∈ Pt uniformly at random. Create y by flipping each bit in x independently with probability 1/n. if f (y) ≥ f (x) then Pt+1 = Pt \ {x} ∪ {y} else Pt+1 = Pt 8 t ←t+1 We consider this mechanism in the absence of crossover, where offspring compete with their only parent. Then the population contains µ lineages that evolve independently (see Algorithm 4). For sufficiently large populations the algorithm can easily reach both global optima. Theorem 4 (Adapted from Theorem 4 in [18]). The (µ+1) EA with deterministic crowding and µ ≤ nO(1) reaches on TwoMax a population consisting of only global optima in expected time O(µn log n). In that case the population contains both global optima with probability at least 1 − 2−µ+1 . The probability of 1 − 2−µ−1 follows from the fact that all µ lineages evolve independently, and that for each, once a global optimum is found, 0n and 1n are each found with probability 1/2. So when fixing one lineage that reaches a global optimum, the probability that the other µ − 1 lineages all reach the same optimum is 2−µ+1 . The time bound is not immediate as the (µ+1) EA picks a lineage to evolve further uniformly at random, so different lineages may receive different numbers of mutation steps. However, it is not difficult to show that the mutation steps are fairly concentrated around their expectation, leading to an upper time bound of O(µn log n). 3.1.5 Fitness Sharing Fitness sharing [40] derates the real fitness of an individual x by an amount that represents the similarity of x to other individuals in the population. The similarity between x and y is measured by a so-called sharing function sh(x, y) ∈ [0, 1] where a large value corresponds to large similarities and value 0 implies no similarity. The idea is that if there are several copies of the same individual in the population, these individuals have to share their fitness. As a consequence, selection is likely to remove such clusters and to keep the individuals apart. We define the shared fitness of x in the population P and the fitness f (P ) of the population, respectively, as f (x, P ) = P f (x) y∈P sh(x, y) and f (P ) = X f (x, P ). x∈P It is common practice to use a so-called sharing distance σ such that individuals only share fitness if they have distance less than σ. Given some distance function d, a common formulation for the sharing function is sh(x, y) = max{0, 1 − (d(x, y)/σ)α } where α is a positive constant that regulates the shape of the sharing function. We use the standard setting α = 1 and, following Mahfoud [40], we set the sharing distance to σ = n/2 8 as this is the smallest value allowing discrimination between the two branches. As TwoMax is a function of unitation, we allow the distance function d to depend on the number of ones: d(x, y) := |x|1 − |y|1 . Such a strategy is known as phenotypic sharing [40]. Our precise sharing function is then ) ( |x|1 − |y|1 . sh(x, y) = max 0, 1 − 2 n There are different ways of performing selection according to the shared fitness, differing in the way the reference population P in the shared fitness f (x, P ) is chosen. In the following, we will review runtime analyses for two different variants of fitness sharing. The most common usage of fitness sharing is to consider the shared fitness according to the union of parents and offspring, see Algorithm 5. Algorithm 5: (µ+1) EA with fitness sharing 1 2 3 4 5 6 7 8 9 10 while termination criterion not met do Choose x ∈ Pt uniformly at random. Create y by flipping each bit in x independently with probability 1/n. Choose z ∈ Pt with worst fitness uniformly at random. Let Pt′ := Pt ∪ {y}. if f (y, Pt′ ) ≥ f (z, Pt′ ) then Pt+1 = Pt \ {z} ∪ {y} else Pt+1 = Pt t ←t+1 Oliveto, Sudholt, and Zarges [46] showed that a population size of µ = 2 is not sufficient to find both optima, and that the performance is even worse than for deterministic crowding with µ = 2. The following theorem states that with a probability greater than 1/2, the (2+1) EA will end up with both individuals in the same optimum, leading to an exponential running time from there. This performance is worse than for deterministic crowding, for which the probability of finding both optima is exactly 1/2 (see Theorem 4). Theorem 5 (Theorems 1 and 2 in [46]). The (2+1) EA with fitness sharing with probability 1/2+Ω(1) will reach a population with both members in the same optimum, and then the expected time for finding both optima from there is Ω(nn/2 ). However, with probability Ω(1) the algorithm will find both optima in time O(n log n). The reason for the failure probability of 1/2+Ω(1) is that the algorithm typically gets stuck on one branch if both initial search points are on the same branch (which happens with probability around 1/2) or if the search points are initialized on different branches, but one search point has a much higher fitness than the other. In that case the effect of fitness sharing is not strong enough, and the less fit individual will be replaced if the fitter one creates an offspring similar to itself. In case the population is initialized with two search points on different branches, and similar fitness, fitness sharing ensure that, with high probability, individuals on both branches survive. The reason is that, whenever one parent creates an offspring on its branch, fitness sharing derates the fitness of both parent and offspring in such a way that the less fit one will be removed and the individual on the opposite branch survives. For population sizes µ ≥ 3 fitness sharing becomes much more effective. 9 Theorem 6 (Theorem 3 in [46]). For any population size µ ≥ 3 the (µ+1) EA with fitness sharing will find both optima of TwoMax in expected time O(µn log n). The analysis reveals a very interesting behavior. In case all search points are initialized on one branch, the population starts to climb up said branch. But once a sufficiently large overall fitness value has been obtained (at the latest when two individuals have found an optimum) then these high-fitness develop a sufficient large critical mass such that the effect of fitness sharing starts becoming evident, and the population shows a very different behavior. From this point in time on, the population starts expanding towards lower fitness values and the individuals with the smallest and the largest numbers of 1-bits always survive. While the whole population may start to climb up one branch, at some point in time the individual with the lowest fitness starts to be repelled and makes its way back down, eventually reaching the other branch and climbing up to find the other optimum. We can conclude that fitness sharing works for the (µ+1) EA with population sizes µ ≥ 3, but when considering larger offspring populations2 it can have undesirable effects: if a cluster of individuals creates too many offspring, sharing decreases the shared fitness of all individuals in the cluster, and the cluster may go extinct. In a similar vein, the population can even lose all global optima. In a (2+λ) EA with λ ≥ 6, if the population contains 2 copies of the same global optimum, and then a generation creates λ − 2 clones and 2 individuals with Hamming distance 1 to the optimum, the latter two individuals will have a higher shared fitness and form the new population. The following result shows that even with a small offspring population size of λ = 2 the (µ+λ) EA can fail. Theorem 7 (Theorem 4 in [46]). With probability 1 − o(1) the (2+2) EA with fitness sharing will, at some point of time, reach a population with both members in the same optimum. The expected time for finding both optima from there is Ω(nn/2 ). In order to avoid these problems, early runtime analyses of fitness sharing [16, 18, 53] used fitness sharing in a different sense. They set up a competition between populations instead of individuals: the (µ+1) EA variant considers the union of the parent population and the offspring population, Pt′ and then selects the subset P ∗ ⊂ Pt′ of size µ that maximizes f (P ∗ ). This makes sense as the goal is to evolve a population of high population fitness. Friedrich et al. [18] showed that the (µ+1) EA with a population-level implementation of fitness sharing can efficiently find both optima on TwoMax. Theorem 8 (Adapted from Theorem 5 in [18]). The (µ+1) EA with fitness sharing and µ ≥ 2 finds both optima on TwoMax in expected time O(µn log n). The reason for this efficiency is as follows. Imagining all parents and the new offspring on a scale of the number of 1-bits, the individuals with the smallest and the largest number of ones have the largest distance to all individuals in the population. Therefore, fitness sharing makes these outer individuals very attractive in terms of shared fitness, hence these individuals are taken over to the next generation. This even holds if an outer individual has the worst fitness in the population; the best possible population that can be formed from parents and offspring will create individuals with a minimum and a maximum number of ones. Hence the minimum number of ones in the population can never increase, and the maximum number of ones can never decrease. Both quantities can be improved whenever the outer indi2 The (µ+λ) EA is a variant of the (µ+1) EA creating λ offspring in parallel and then selecting the µ best according to f (·, Pt′ ), where Pt′ is the union of all µ parents and λ offspring, breaking ties towards preferring offspring. 10 Algorithm 6: Clearing procedure input : A population P output: Fitness values after clearing f ′ for all x ∈ P . ′ 1 Let f = f . ′ 2 Sort P according to decreasing f values. 3 for i := 1 to |Pt | do 4 if f ′ (P [i]) > 0 then 5 winners ← 1. 6 for j := i + 1 to |P | do 7 if f ′ (P [j]) > 0 and d(P [i], P [j]) < σ then 8 if winners < κ then 9 winners ← winners + 1 10 else 11 f ′ (P [j]) ← 0 viduals perform a hill-climbing step towards their respective optima. Performing a hill-climbing task towards both 0n and 1n yields the expected time of O(µn log n). A drawback of this design is that tofind a population P ∗ that maximizes the population fitness, one needs to consider up to µ+λ different candidate populations of size µ. In the case µ of λ = 1 this is µ + 1 combinations, but for large µ and λ this strategy is prohibitive. 3.1.6 Clearing Clearing is a niching method that uses a similar principle compared to fitness sharing. While fitness sharing can be regarded as sharing resources evenly between similar individuals, clearing assigns these resources only to the best individual of each niche. Such an individual is referred to as a winner. All other individuals have their fitness set to 0 (or, more generally, to a value lower than the lowest fitness value in the search space). Niches are established as in fitness sharing by using a clearing radius σ that determines up to which distance individuals will be considered to belong to the same niche. Each niche supports up to κ winners, where κ is a parameter called the niche capacity. The decision which individuals are winners, and whose fitness is cleared, is made in a greedy procedure, shown in Algorithm 6. The individuals are first sorted in decreasing fitness. Then the clearing procedure processes individuals in this order. For each individual, if it has not been cleared, it is declared a winner. Then procedure iterates through all remaining individuals (i. e. those with lower or equal fitness) that haven’t been cleared yet and that are within a clearing distance of σ, adding them to its niche until κ winners have been found, and clearing all remaining such individuals. Clearing is a powerful mechanism as it allows for both exploitation and exploration: it allows winners to find fitness improvements, while at the same time enabling cleared individuals to tunnel through fitness valleys. In fact, cleared individuals are agnostic to the fitness landscape as they always have the worst possible fitness. Hence cleared individuals can explore the landscape by performing random walks. As we will show, this allows the algorithm to escape from local optima with even very large basins of attraction. The (µ+1) EA with clearing is shown in Algorithm 7. Covantes Osuna and Sudholt [6] consider the performance of the (µ+1) EA with clearing for two choices for the dissimilarity measures d. When choosing d as the Hamming distance, we refer 11 Algorithm 7: (µ+1) EA with clearing 1 2 3 4 5 6 7 8 9 10 while termination criterion not met do Choose x ∈ Pt uniformly at random. Create y by flipping each bit in x independently with probability 1/n. Compute the fitness f ′ after clearing of all individuals in Pt ∪ {y} according to the clearing procedure. Choose z ∈ Pt with worst fitness after clearing uniformly at random. if f ′ (y) ≥ f ′ (z) then Pt+1 = Pt \ {z} ∪ {y} else Pt+1 = Pt t ←t+1 to this as genotypic clearing. Choosing the phenotypic distance as the difference in the number of ones, d(x, y) := ||x|1 − |y|1 | this strategy is referred to as phenotypic clearing. With phenotypic clearing and clearing radius σ = 1, every number of ones represents their own niche. If the population size is large enough to contain all niches, the population can easily spread throughout all the niches. In the case of TwoMax, this means that both optima will have been found. In fact, this argument even extends to finding an optimum for all functions of unitation as one of the niches will contain all global optima. The expected time for the population to spread across all niches is O(µn log n), which is the same time bound as for fitness sharing and deterministic crowding. Theorem 9. Let f be a function of unitation and σ = 1, µ ≥ (n + 1) · κ. Then, the expected optimization time of the (µ+1) EA with phenotype clearing on f is O(µn log n). For genotypic clearing we have to consider larger niches, as otherwise each niche just consists of a single search point, and genotypic clearing essentially amounts to avoiding duplicates in the population (see Theorem 2). The most natural choice is σ = n/2 as for fitness sharing, as this is allows to distinguish the two branches. For this setting we have the following performance guarantee. Theorem 10. The expected time for the (µ+1) EA with genotypic or phenotypic clearing, µ ≥ κn2 /4, µ ≤ nO(1) and σ = n/2 finding both optima on TwoMax is O(µn log n). The idea behind the proof is to consider the situation after one of the optima has been reached, and once the population contains κ copies of said optimum. It is easy to show that the expected time until this happens, or both optima are being found, is bounded by O(µn log n). We then consider a potential function that describes the state of the current population: the sum of Hamming distances of all individuals to the optimum. Note that phenotypic and genotypic distances to an optimum (0n or 1n ) are the same, hence the analysis holds for both phenotypic and genotypic clearing. Imagine the situation when all individuals are close to the optimum. Then any mutation is likely to create an offspring that is further away from the optimum. Thus, mutation has a tendency to increase the potential. Selection will then remove one of the non-winner individuals uniformly at random. There is a small bias introduced by selection towards remaining close to the winner. This is down to the fact that losers in the population do not evolve in complete isolation. The population always contains κ copies of the winner that may create offspring and may prevent the population from 12 venturing far away from it. In other words, there is a constant influx of search points descending from winners. All in all, mutation and selection yield opposite biases. The bias induced by selection decreases as the fraction of winners κ/µ decreases. If the population size µ is large enough with respect to κ and n: µ ≥ κn2 /4, the potential shows a positive expected change until it reaches a value from which, by the pigeon-hole principle, we can conclude that at least one individual must have reached a distance at least n/2 from the winners. From there, a new niche is being created, and the other optimum can easily be found by hill climbing. The overall time is bounded by O(µn log n). Note that the condition µ ≥ κn2 /4 is a sufficient condition, and a quite steep requirement compared to fitness sharing, which works with constant population sizes µ. On the other hand, clearing works with genotypic distances whereas fitness sharing was only proved to work with phenotypic distances. A further advantage for clearing is that it also works on variants of TwoMax with different slopes, whereas the analysis of fitness sharing is sensitive to the absolute fitness values. 3.2 Diversity in Island Models The presentation in this subsection is partly taken from this author’s theory-flavored survey of parallel evolutionary algorithms [56]. Island models are popular ways of parallelizing evolutionary algorithms: they consist of subpopulations that may be run on different cores, and that coordinate their searches by using migration: communicating selected search points, or copies thereof, to other islands. These solutions are then considered for inclusion on the target island in a further selection process. Island models communicate along a communication topology, a directed graph that connects the islands, and migration involves sending solutions to all neighboring islands. Often periodic migration is used: migration happens every τ iterations, where τ is a parameter called the migration interval. This way, islands can communicate and compete with one another. Islands that got stuck in low-fitness regions of the search space can be taken over by individuals from more successful islands. This helps to coordinate search, focus on the most promising regions of the search space, and use the available resources effectively. They also act as an implicit diversity mechanism: between migrations, islands evolve independently, and the flow of genetic information in the whole system is slowed down, compared to having one large population. This can help to increase diversity and to prevent or at least delay premature convergence. Note that the flow of information can be tuned by tuning the migration interval τ , the migration topology, and other parameters like the number of individuals to be migrated or the policies (selection schemes) for emigration and immigration. Algorithm 8 shows a general scheme of a basic island model. Common topologies include unidirectional rings (a ring with directed edges only in one direction), bidirectional rings, torus or grid graphs, hypercubes, scale-free graphs [10], random graphs [20], and complete graphs. Figure 2 sketches some of these topologies. An important characteristic of a topology T = (V, E) is its diameter: the maximum number of edges on any shortest path between two vertices. Formally, diam(T ) = maxu,v∈V dist(u, v) where dist(u, v) is the graph distance, the number of edges on a shortest path from u to v. The diameter gives a good indication of the time needed to propagate information throughout the topology. Rings and torus graphs have large diameters, while hypercubes, complete graphs, and many scale-free graphs have small diameters. 13 Algorithm 8: Scheme of an island model with migration interval τ 1 2 3 4 5 6 (0) (0) Initialize a population made up of subpopulations or islands, P (0) = {P1 , . . . , Pm }. t ← 1. while termination criterion not met do for each island i do in parallel if t mod τ = 0 then (t) Send selected individuals from island Pi to selected neighboring islands. 7 8 9 10 (t) Receive immigrants Ii (t) from islands for which island Pi is a neighbor. (t) (t) Replace Pi by a subpopulation resulting from a selection among Pi (t) (t+1) by applying reproduction operators and selection to Pi . Produce Pi (t) and Ii . t ←t+1 Figure 2: Sketches of common topologies: a unidirectional ring, a torus, and a complete graph. Other common topologies include bidirectional rings where all edges are undirected and grid graphs where the edges wrapping around the torus are removed. 3.2.1 A Royal Road for Island Models Lässig and Sudholt [34, 35] presented a first example where communication makes the difference between exponential and polynomial running times, in a typical run. They constructed a family of problems called LOLZn,z,b,ℓ where a simple island model, all islands running (1+1) EAs, finds the optimum in polynomial time, with high probability. This holds for a proper choice of the migration interval and any migration topology that is not too sparse. Contrarily, both a single, large population as in the (µ+1) EA as well as independent islands (each running a (1+1) EA, or even when they also run (µ+1) EAa) need exponential time, with high probability. The basic idea of this construction is as follows. First imagine a bit string where the fitness describes the length of the longest prefix of bits with the same value. Generally, a prefix of i leading ones yields the same fitness as a prefix of i leading zeros, e. g., 111010 and 000110 both have fitness 3. However, the maximum possible fitness that can be attained by leading zeros is capped at some threshold value z. This means that—in the long run—gathering leading ones is better than gathering leading zeros. The former leads to an optimal value, while the latter leads to a local optimum that is hard to escape from. The effect on an EA is as follows. In the beginning the EA typically has to make a decision whether to collect leading ones (LO) or leading zeros (LZ). This not only holds for the (1+1) EA 14 but also for a (not too large) panmictic population as genetic drift will lead the whole population to either leading ones or leading zeros. After a significant prefix has been gathered, this decision gradually becomes irreversible as many bits in the prefix need to be flipped at the same time to switch from leading ones to leading zeros or vice versa. So, with probability close to 1/2 the EA will end up finding an optimum by gathering leading ones, and again with probability close to 1/2 its population gets stuck in a hard local optimum. To further increase the difficulty for EAs, this construction is repeated on several blocks of the bit string that need to be optimized one-by-one. Each block has length ℓ. Only if the right decision towards leading ones is made on the first block, the block can be filled with further leading ones. Once the first block contains only leading ones, the fitness depends on the prefix in the second block, and a further decision between leading ones and leading zeros needs to be made. Only if an EA makes all decisions correctly, it can find a global optimum. Table 1 illustrates the problem definition. x1 x2 x3 11110011 11111111 11111111 11010100 11010100 11111111 11010110 11010110 00000110 01011110 01011110 01011110 LOLZ(x1 ) = 4 LOLZ(x2 ) = 10 LOLZ(x3 ) = 19 Table 1: Examples of solutions for the function LOLZ with four blocks and z = 3, along with their fitness values. All blocks have to be optimized from left to right. The sketch shows in red all bits that are counted in the fitness evaluation. Note how in x3 in the third block only the first z = 3 zeros are counted. Further 0-bits are ignored. The only way to escape from this local optimum is to flip all z 0-bits in this block simultaneously. So, the problem requires an EA to make several decisions in succession. The number of blocks, b, is another parameter that determines how many decisions need to be made. Panmictic populations will sooner or later make a wrong decision and get stuck in some local optimum. If b is not too small, the same holds for independent runs. The results from [35] are summarized as follows; the second statement follows from the first one and the union bound. Theorem 11. Consider the (µ+1) EA with µ ≤ cn/(log n) for an arbitrary constant c > 0 on LOLZn,z,b,ℓ with z = ω(log b), bℓ ≤ n, and z < ℓ. With probability at least 1 − e−Ω(z) − 2−b the (µ+1) EA does not find a global optimum within nz/3 generations. The same holds when considering s independent subpopulations, each running a (1+1) EA or (µ+1) EA as specified above; then the probability bound becomes 1 − se−Ω(z) − s2−b . However, an island model can effectively communicate the right decisions on blocks to other islands. Islands that got stuck in a local optimum can be taken over by other islands that have made the correct decision. These dynamics make up the success of the island model as it can be shown to find global optima with high probability. A requirement is, though, that the migration interval is carefully tuned so that migration only transmits the right information. If migration happens before the symmetry between leading ones and leading zeros is broken, it might be that islands with leading zeros take over islands with leading ones. We further need the topology to be able to spread the right information quickly enough: a topology G is called well-expanding if there is a constant ε > 0 such that the following holds. For every subset V ′ ⊆ V with |V ′ | ≤ |V |ε we have |N (V ′ )| ≥ (2 + ε)|V ′ |. Lässig and Sudholt [35] give the following result. Theorem 12. Consider an island model where each island runs a (1+1) EA with migration on a well-expanding migration topology with τ = n5/3 and µ = nΘ(1) subpopulations, accepting a best search point among all immigrants and the resident individual. Let the function LOLZn,z,b,ℓ 15 be parameterized according to ℓ = 2τ /n = 2n2/3 , z = ℓ/4 = n2/3 /2, and b ≤ n1/6 /16. If the migration counter t starts at τ /2 = n5/3 /2 then with overwhelming probability the algorithm finds a global optimum within O(bℓn) = O(n2 ) generations. The analysis is quite technical, but the main ideas can be summarised as follows. All islands optimize LOLZ by fixing bits from left to right, and at approximately the same pace. The migration interval is tuned such that between two migrations all islands will be starting to optimize the same new block, excluding islands that got stuck on previous blocks. Assume for the moment that islands make decisions independently on the new block (we’ll discuss this assumption below). Then in expectation, half the islands will get stuck in local optima, reducing the number of “good” islands still on track towards finding the global optimum. Once this number has dropped below |V |ε , the properties of the topology enure that these “good” islands propagate their information to sufficiently many other islands (many of which will be stuck in local optima) to ensure that a critical mass of “good” islands always survives, until a global optimum is found eventually. An interesting finding is how islands do in fact make independent, or near-independent decisions on new blocks. After all, during migration, genetic information about all future blocks is transmitted. Hence, after migration many islands share the same genotype on all future blocks. This is a real threat as this dependence might imply that all islands make the same decision after moving on to the next block, compromising diversity. However, under the conditions for the migration interval there is a period of independent evolution following migration, before any island moves on to a new block. During this period of independence, the genotypes of future blocks are subjected to random mutations, independently for each island. After some time the distribution of bits on these future blocks will resemble a uniform distribution. This shows that independence can be gained by periods of independent evolution. One could say that the island model combines the advantages of two worlds: independent evolution and selection pressure through migration. The island model is only successful because it can use both migration and periods of independent evolution. 3.2.2 Island Models for Eulerian Cycles We also give a simple and illustrative example from combinatorial optimization to show how island models can be beneficial through providing diversity. Lässig and Sudholt [36] considered island models for the Eulerian cycle problem. Given an undirected Eulerian graph, the task is to find a Eulerian cycle, i. e., a traversal of the graph on which each edge is traversed exactly once. This problem can be solved efficiently by tailored algorithms, but it served as an excellent test bed for studying the performance of evolutionary algorithms [13, 14, 15, 42]. Instead of bit strings, the problem representation by Neumann [42] is based on permutations of the edges of the graph. Each such permutation gives rise to a walk: starting with the first edge, a walk is the longest sequence of edges such that two subsequent edges in the permutation share a common vertex. The walk encoded by the permutation ends when the next edge does not share a vertex with the current one. A walk that contains all edges represents a Eulerian cycle. The length of the walk gives the fitness of the current solution. Neumann [42] considered a simple instance that consists of two cycles of equal size, connected by one common vertex v ∗ (see Figure 3). The instance is interesting as it represents a worst case for the time until an improvement is found. This is with respect to randomized local search (RLS) working on this representation. RLS works like the (1+1) EA, but it only uses local mutations. As mutation operator it uses jumps: an edge is selected uniformly at random and then it is moved to a (different) target position chosen uniformly at random. All edges in between the two positions are shifted accordingly. 16 v∗ v∗ v∗ v∗ Figure 3: Sketch of the graph G′ . The top shows a configuration where a decision at v ∗ has to be made. The three configurations below show the possible outcomes. All these transitions happen with equal probability, but only the one on the bottom right leads to a solution where rotations are necessary. On the considered instance RLS typically starts constructing a walk within one of these cycles, either by appending edges to the end of the walk or by prepending edges to the start of the walk. When the walk extends to v ∗ for the first time, a decision needs to be made. RLS can either extend the walk to the opposite cycle, see Figure 3. In this case RLS can simply extend both ends of the walk until a Eulerian cycle is formed. The expected time until this happens is Θ(m3 ) where m denote the number of edges. But if another edge in the same cycle is added at v ∗ , the walk will evolve into one of the two cycles that make up the instance. It is not possible to add further edges to the current walk, unless the current walk starts and ends in v ∗ . However, the walk can be rotated so that the start and end vertex of the walk is moved to a neighboring vertex. Such an operation takes expected time Θ(m2 ). Note that the fitness after a rotation is the same as before. Rotations that take the start and end closer to v ∗ are as likely as rotations that move it away from v ∗ . The start and end of the walk hence performs a fair random walk and Θ(m2 ) rotations are needed on average in order to reach v ∗ . The total expected time for rotating the cycle is hence Θ(m4 ). Summarizing, if RLS makes the right decision then expected time Θ(m3 ) suffices in total. But if rotations become necessary the expected time increases to Θ(m4 ). Now consider an island model with λ islands running RLS. If islands evolve independently for at least τ ≥ m3 generations, all mentioned decisions are made independently, with high probability. The probability of making a wrong decision is 1/3, hence with λ islands the probability that all islands make the wrong decision is 3−λ , leading to the following result. Theorem 13. The island model running RLS on λ ≤ mO(1) islands, τ ≥ m3 , and an arbitrary topology optimizes G′ in expected O(m3 + 3−λ · m4 ) generations. The choice λ := log3 m yields an expectation of Θ(m3 ), and every value up to log3 m leads to a superlinear and even exponential speedup, compared to the time Θ(m4 ) for a single island running RLS. Interestingly, this good performance only holds if migration is used rarely, or if independent runs are used. If migration is used too frequently, the island model rapidly loses diversity. If T is any strongly connected topology and diam(T ) is its diameter, we have the following. 17 Theorem 14. Consider the island model with an arbitrary strongly connected topology T running RLS with jumps on each island. If τ ·diam(T )·λ = O(m2 ) then the expected number of generations on G′ is at least Ω(m4 /(log λ)). If τ · diam(T ) · λ = O(m2 ) then there is a constant probability that the island that first arrives at a decision at v ∗ propagates this solution throughout the whole island model, before any other island can make an improvement. This results in an expected running time of Ω(m4 / log(λ)). This is almost Θ(m4 ), even for very large numbers of islands. The speedup is therefore logarithmic in the number of islands at best, or even worse. This natural example shows that the choice of the migration interval can make a difference between exponential and logarithmic speedups. 4 How Diversity Benefits Crossover Now we look at examples where diversity enhances the use of crossover in evolutionary algorithms. In a population where all individuals are very similar, crossover is unlikely to be effective as it will create an offspring that is similar to both of its parents. This effect can also be achieved by mutation. Therefore, many examples where crossover is essential require some form of diversity mechanism for crossover to work effectively. In the following, we review several of these examples, from the very first constructed examples, to problems from combinatorial optimization, and even simple hill climbing problems, where crossover provides a noticeable speedup. In some cases diversity is due to explicit diversity mechanisms; in others, diversity can emerge naturally, from independent variations. Most of the algorithms discussed in this section fit into the scheme described in Algorithm 9. Unless stated otherwise, parent selection is performed uniformly at random. With a crossover probability pc , crossover is performed; this can be uniform crossover or k-point crossover. In any case, mutation is performed with a mutation rate of p, which is assumed to be the default value p = 1/n unless stated otherwise. In the replacement selection, µ individuals with the best fitness are selected for survival. In case there are ties, a specific tie-breaking rule can be used; the default is to break ties uniformly at random. 4.1 Real Royal Road Functions for Crossover Jansen and Wegener [26] were the first to provide an example function for which it could be rigorously proved that a simple genetic algorithm (GA) with crossover takes expected polynomial time, whereas all (µ+λ) evolutionary algorithms using only standard bit mutation need exponential time with overwhelming probability. Their steady-state GA with population size µ can be regarded as a special case of Algorithm 9 with λ = 1, referred to as (µ+1) GA in the following, using a tie-breaking rule that eliminates an individual with the largest number of duplicates in P ∪ P ′3 . The latter is equivalent to breaking ties towards including individuals with the fewest duplicates in P ∪ P ′ . Jansen and Wegener [26] define two classes of functions they call real royal road functions: one for one-point crossover and one for uniform crossover. We focus on the one for one-point crossover as it is conceptually simpler. Denoting by b(x) the length of the longest block consisting 3 In [26] the replacement selection stops without altering P if the fitness of the offspring is smaller than the fitness of the worst individual in P . Our algorithm is equivalent as in this case the offspring will be added and immediately removed from the population. 18 Algorithm 9: Scheme of a (µ+λ) GA with mutation rate p and crossover with crossover probability pc for maximizing f : {0, 1}n → R. 1 2 3 4 5 6 7 8 9 10 11 12 13 Initialize population P of size µ ∈ N uniformly at random. while optimum not found do Let P ′ = ∅. for i = 1, . . . , λ do Choose p ∈ [0, 1] uniformly at random. if p ≤ pc then Select two parents x1 , x2 . Let y := crossover(x1 , x2 ). else Select a parent y. Flip each bit in y independently with probability p. Add y to P ′ . Let P contain the µ best individuals from P ∪ P ′ ; break ties according to a specified tie-breaking rule. of ones only (e. g. b(100111011) = 3), the function class Rn is defined as (assuming n/3 ∈ N)  2  if x = 1n , 2n Rn (x) = n|x|1 + b(x) if |x|1 ≤ 2n/3,   0 otherwise. The function contains a strong gradient in the region of search points with at most 2n/3 ones. The function also contains a fitness valley of fitness 0 that needs to be crossed to reach the optimum 1n . Moreover, the function encourages an evolutionary algorithm to evolve search points with 2n/3 ones and a maximum block length of 2n/3. This is to allow crossover to combine two such blocks to create the optimum 1n , for instance by crossing over two parents 12n/3 0n/3 and 0n/3 12n/3 that have large blocks in different positions. We give a simplified version of their result as their work includes an additional parameter that specifies the length m of the fitness valley, which is fixed to m = n/3 here. Note that the population size µ and the crossover probability pc can be functions of the problem size n. Theorem 15 (Simplified from Theorem 3 in [26]). Let pc ≤ 1 − ε for some 0 < ε < 1, and µ ≥ 2n/3 + 1. Then the expected optimization time of the (µ+1) GA breaking ties towards including individuals with the fewest duplicates in P ∪ P ′ on Rn is O(µn3 + (µ log µ)n + µ2 /pc ). For the typical case where pc is a positive constant and µ = O(n) the bound is O(n4 ). The proof is a beautiful application of the so-called method of typical runs [59, Section 11], where a run is divided into phases that reflect the typical behavior of the algorithm. Then the expected times for completing each phase is estimated separately, using arguments most appropriately to that phase. Jansen and Wegener [26] show that in expected time O(µn) the population reaches a state where all search points have 2n/3 ones (or the optimum is found beforehand). From there, the algorithm can focus on maximizing the maximum block length b(x). In the next expected O(n2 log(n) + (µ log µ)n) generations the algorithm evolves a population where all search points x have the maximum block length b(x) = 2n/3 (or the optimum has been found). 19 Once such a population has been reached, we can rely on the diversity mechanism taking effect: since then all search points have the same fitness, selection for replacement is solely based on the number of duplicates in the population. There are only 2n/3 + 1 different genotypes with 2n/3 ones and a block length of 2n/3: 12n/3 0n/3 , 012n/3 0n/3−1 , 02 12n/3 0n/3−2 , . . . , 0n/3 12n/3 . The population size µ is large enough to be able to store all these search points. Hence, once a particular genotype is created, the population will always retain such a genotype until the optimum is found. Using appropriate 2-bit flips, it is possible to create novel genotypes. The expected time until the population contains all the above genotypes is O(µn3 ). Once the population contains the genotypes 12n/3 0n/3 and 0n/3 12n/3 , if these are selected as parents, one-point crossover can easily create 1n by choosing a cutting point in the middle third of the bit string. The expected time for this event is O(µ2 /pc ), and summing up all expected times yields the claimed bound. 4.2 Coloring Problems Fischer and Wegener [16] presented another example where a diversity mechanism enhances crossover for a combinatorial problem. They considered a simple variant of the Ising model, a well-known model of ferromagnetism that is NP-hard to solve in its general case. Here we consider an easy special case where vertices of an undirected graph can have one of two states, 0 and 1 (also referred to as “colors”), and it is beneficial to color two neighboring vertices with the same color. Then the fitness function corresponds to the number of monochromatic edges, and all colorings where all connected components have the same color are global optima. The problem is an interesting test bed for evolutionary algorithm because subgraphs of the same color can be regarded as “building blocks” of optimal solutions. The inherent symmetry in the problem implies that competing building blocks may emerge, and evolutionary algorithms can get stuck in difficult local optima, depending on the graph. For bipartite graphs, the problem is equivalent to the well-known Graph Coloring problem, or more specifically, to the 2-coloring problem where the goal is to color the graph with 2 colors such that no two adjacent vertices have the same color, and the fitness function is the number of correctly colored vertices. The reason is that there is a simple bijection between the Ising model and Graph Coloring: flipping all colors of one set of the bipartition turns all monochromatic edges into bichromatic edges, hence turning a solution for the Ising model into a Graph Coloring solution of the same fitness, and vice versa. All results derived for the Ising model variant described above also hold for the 2-coloring problem, if the underlying graph is bipartite. Fischer and Wegener [16] studied ring graphs (or cycle graphs) where the i-th vertex is neighbored to vertices i − 1 and i + 1 (identifying vertex 0 with vertex n), and observed that the fitness landscape contains lots of plateaus. A search point such as 0001111000 contains blocks of bits with the same color, e. g., a block of four 1-bits. A mutation flipping only the first or the last bit of such a block can shorten the block; a mutation flipping only the last bit before the block or the first bit following the block can enlarge it. Those mutations are fitness-neutral (i. e. do not change the fitness), unless some block disappears, which leads to an increase in fitness. The main results from [16] are as follows. Note that rings with an even number of vertices are bipartite, allowing us to add statements about 2-coloring. Theorem 16 (Adapting Theorems 4 and 5 in [16]). The expected optimization time for the (1+1) EA on the Ising model and the 2-coloring problem on rings with even n is O(n3 ). This 20 bound is asymptotically tight when starting with two blocks of length εn and (1 − ε)n, 0 < ε < 1/2 a constant. The main observation is that the length of any block follows a fair random walk (apart from boundary states), with a large self-loop probability as the probability of changing the length of the considered block is Θ(1/n). From the described setting with two blocks, it takes Θ(n2 ) of these changes for some block to disappear, which results in a global optimum. Using a simple GA with fitness sharing, however, is able to find a global optimum in expected time O(n2 ). Theorem 17. Consider a (2+2) GA as a variant of Algorithm 9 that with probability pc = 1/2 applies two-point crossover once to create two offspring and uses fitness sharing with sharing radius σ = n to select 2 search points amongst parents and offspring that maximizes the shared fitness of the population. The expected number of fitness evaluations until this GA finds an optimum for the Ising model and the 2-coloring problem on rings with even n is bounded by O(n2 ). The main observation is that fitness sharing turns plateaus into gradients as it rewards the creation of dissimilar individuals. The GA then efficiently creates two complementary individuals (e. g. through 1-bit flips), and then two-point crossover is able to invert whole blocks, provided that the cutting points are chosen between two blocks, e. g. turning 00110010 into 00001100 by replacing the bits in bold with the values from the complementary parent. A similar, but more drastic effect was also shown for coloring complete binary trees [53]. Here subtrees of the same color represent building blocks of good solutions. The problem is much harder than coloring rings as it contains difficult local optima, for example when the two subtrees of the root are colored with different colors. This author showed that all algorithms in a large class of (µ+λ) EAs, with arbitrary mutation rates, need at least expected time 2Ω(n) to find a global optimum. In contrast, the (2+2) GA with fitness sharing finds an optimum in expected polynomial time. Theorem 18. Consider the (2+2) GA with fitness sharing described in Theorem 17. The expected optimization time for the Ising model and the 2-coloring problem on a complete binary tree with n vertices is bounded by O(n3 ). The analysis shows that fitness sharing again encourages an increase in the Hamming distance between the two current search points, x and y. In the case of x and y being complementary, two-point crossover can effectively substitute subtrees to increase the fitness. The challenge lies in showing that and how complementary search points evolve. In contrast to rings, binary trees do not contain any plateaus, hence it is not always possible to increase the Hamming distance without compromising on fitness. Interestingly, a case distinction according to the function H(x, y) + f (x) + f (y) shows that if this function is small then there are accepted 1-bit flips that increase the real fitness, possibly at the expense of decreasing the Hamming distance H(x, y). But if the function is large, there are accepted 1-bit flips that increase the Hamming distance at the expense of the real fitness. There is a “gray area” in between, where more complex operations (mutation and/or crossover) are required; however, these steps have probability Ω(1/n2 ), leading to the overall time bound of O(n3 ). In this scenario, even though fitness sharing can maximize diversity at the expense of the real fitness, it turns out to be an effective strategy, as the diversity of complementary search points can be exploited efficiently by crossover. 21 4.3 Diversity and Crossover Speed Up Hill Climbing Diversity and crossover also prove useful in a very natural and well-known setting, albeit with smaller speedups compared to the examples seen so far. The simple problem OneMax is the most-studied problem in theory of randomised search heuristics. It can be regarded as a simple hill climbing task, as a mutation flipping a single 0-bit to 1 increases the fitness. It can also be seen as a problem where ones are “building blocks” of the global optimum, and the algorithm has to assemble all building blocks to find the optimum. This perspective is related to the socalled “building block hypothesis”, an attempt to explain the advantage of crossover as GAs with crossover can combine building blocks of good solutions. Yet, it has been surprisingly hard to come up with natural examples and rigorous proofs to cement or refute this hypothesis. This author [52, 55] showed that the (µ+λ) GA with the duplicate-based tie-breaking rule is twice as fast as the fastest evolutionary algorithm using only standard bit mutation (modulo small-order terms). Theorem 19 (Simplified from Theorem 1 and Theorem 4 in [52]4 ). Let n ≥ 2 and c > 0 be a constant. Every evolutionary algorithm that uses only standard bit mutation with mutation c rate p = c/n to create new solutions has expected optimization time at least ec · n ln n · (1 − o(1)) on OneMax and every other function with a unique optimum. The expected optimization time of the (µ+λ) GA breaking ties towards including individuals with the fewest duplicates in P ∪ P ′ , with 0 < pc < 1 constant, mutation probability p = c/n and ec · n ln n · (1 + o(1)). µ, λ = o((log n)/(log log n)), on OneMax is at most c·(1+c) Modulo small-order terms, this is a speedup of 1 + c, which is 2 for c = 1, reflecting the default mutation rate p = 1/n. The idea behind the proof is to make a case distinction for all possible populations, according to the current best-so-far fitness and the diversity in the population, and then to upper bound the expected time spent in all these cases. If a population contains individuals of different fitness values, the individuals of current bestso-far fitness i quickly take over the population (or an improvement of the best-so-far fitness is found). Due to our restrictions on population sizes µ, λ, the total time across all best-so-far fitness values is o(n log n). If the population consists of µ identical genotypes of fitness i, this state will be left for good if either a fitness improvement is found, or a different individual with the same fitness is created. In the latter case, the diversity mechanism in the tie-breaking rule ensures that this diversity will never get lost (unless an improvement is found). The mentioned diversity can be created by a fitness-neutral mutation that flips the same number of 0-bits to 1 as it flips 1-bits to 0. Such a multi-bit flip would be irrelevant for mutationonly evolutionary algorithms. But when crossover is used, it can exploit the diversity created this way by choosing two parents with equal fitness but different genotypes, and to create a surplus of ones on the bit positions where the two parents differ. Creating such a surplus is very likely; the probability for such an event is at least 1/4, irrespective of the Hamming distance between the two parents. The time the algorithm spends evolving a diverse population is negligible compared to the time spent in a state where all individuals are identical. The expected time is thus dominated by the time spent trying to leave states where all genotypes are identical. Compared to mutation-based evolutionary algorithms, the creation of diversity offers another route towards fitness improvements as crossover rapidly exploits this diversity, creating improvements almost instantly. 4 We remark that results in [52] hold for much larger ranges of the mutation rate p and arbitrary parent selection mechanisms that do not disadvantage individuals with higher fitness. 22 Corus and Oliveto [4] recently showed that the choice of tie-breaking rule is important to get the above-mentioned speedup: when replaced with a uniform tie-breaking rule, we still get a constant-factor speedup, but the constant is worse. Theorem 20 (Simplified from Theorem 9 in [4]). The expected optimization time of the (µ+1) GA with uniform tie-breaking, pc = 1, mutation probability p = c/n and 3 ≤ µ = o((log n)/(log log n)), ec · n ln n · (1 + o(1)). on OneMax is at most c·(1+c/3) For the standard mutation rate of 1/n, the previous speedup of 2 from Theorem 19 now becomes a factor of 4/3. This constant is best possible under mild assumptions [4, Theorem 11]. 4.4 Overcoming Fitness Valleys with Naturally Emerging Diversity and Crossover In Section 4.3 we have seen that diversity and crossover can speed up hill climbing on OneMax by a constant factor. Now we consider the task of overcoming fitness valleys in order to solve multimodal problems. We specifically focus on the problem class Jumpk , the first example function where crossover was proven to be beneficial [25]: ( k + |x|1 if |x|1 = n or |x|1 ≤ n − k, Jumpk (x) = n − |x|1 otherwise, In this problem, GAs have to overcome a fitness valley such that all local optima have n − k ones and thus Hamming distance k to the global optimum 1n . Jansen and Wegener [25] showed that, while mutation-only algorithms such as the (1+1) EA require expected time Θ(nk ), a simple (µ+1) GA with crossover only needs time O(µn2 k 3 + 4k /pc ). This time is O(4k /pc ) for large k, and hence significantly faster than mutation-only GAs. The factor 4k /pc results from the fact that, if the population contains pairs of parents that do not share a common 0-bit, then uniform crossover can set all the k + k = 2k bits where exactly one parent has a 1 to 1 in the offspring, with probability 2−2k = 4−k . Hence the expected time for a successful crossover that creates the optimum is bounded by 4k /pc . Note that such two parents have the largest possible Hamming distance 2k between local optima, hence populations typically achieve a maximum possible diversity between many pairs of parents. A drawback of their analysis is that it requires an unrealistically small crossover probability pc ≤ 1/(ckn) for a large constant c > 0. Kötzing, Sudholt, and Theile [33] later refined these results towards a crossover probability pc ≤ k/n, which is still unrealistically small. Both approaches focus on creating a maximum Hamming distance between local optima through a sequence of lucky mutations, relying on crossover to create the optimum, once sufficient diversity has been created. Their arguments break down if crossover is applied frequently. Hence, these analyses do not reflect the typical behaviour in GA populations with constant crossover probabilities pc = Θ(1) as used in practice. We review recent results from Dang et al. [7] where realistic crossover probabilities were considered, at the expense of a smaller (but still significant) speedup. Previous work [25, 33] relied on independent mutations providing diversity, and regarded crossover as potentially harmful, as the effect of crossover on diversity was not well understood. This led to a worst-case perspective on crossover: previous proofs considered mutation to build up diversity over time, like a house of cards, with the worst-case assumption that one unexpected application of crossover would destroy the build-up of diversity, collapsing the house of cards, and the build-up of diversity had to restart from scratch. This view is backed up by a negative result [33, Theorem 8], showing 23 that if using only crossover with pc = Ω(1) but no mutation following crossover, diversity reduces quickly, leading to inefficient running times for small population sizes (µ = O(log n)). In [7] a different perspective was offered, an approach loosely inspired from population genetics: the authors showed that crossover, when followed by mutation, can actually be very beneficial in creating diversity. Note that the perspective of crossover creating diversity is common in population genetics [30, 60]. A frequent assumption is that crossover mixes all alleles in a population, leading to a situation called linkage equilibrium, where the state of a population is described by the frequency of alleles [1]. The main result can be stated as follows. Theorem 21 (Theorem 6 in [7], simplified for k ≥ 3). The expected optimization time of the (µ+1) GA with pc = 1 and µ ≤ κn, for some constant κ > 0, on Jumpk , 3 ≤ k = o(n), is O(nk /µ + nk−1 log(µ)). For µ = κn, the bound simplifies to O(nk−1 log n), a speedup of order Ω(n/log n) compared to the expected time of Θ(nk ) for the (1+1) EA [25]. The analysis shows that on Jumpk diversity emerges naturally in a population: the interplay of crossover, followed by mutation, can serve as a catalyst for creating a diverse range of search points out of few different individuals. Consider the situation where all individuals in the population are local optima with n − k ones, and assume pessimistically that there is no diversity: all individuals are identical. In the following we refer to a collection of identical individuals with n − k ones as a species. Mutation is able to create a new species, for instance by flipping a single 0-bit and a 1-bit. This new species can grow in size, or become extinct over time. Crossing over two individuals from different species can easily create a surplus of ones, where the offspring has n − k + 1 ones. The following mutation now creates a local optimum if it flips a 1-bit back to 0. Note that here there are n − k + 1 ones to choose from, each leading to a different species. This means that, once mutation has created a small amount of diversity, crossover and mutation can work together in this way to create a burst of diversity that has a good chance to prevail for a long time, before the population loses all diversity, or the global optimum is found. In the proof of Theorem 21, the size of the largest species is taken as a potential function: if the size of the largest species is µ, there is no diversity, but if it is bounded away from µ, it is easy to select two parents from different species with uniform parent selection. The size of the largest species behaves like an almost fair random walk, and the population has a good chance of spending long periods of time in states where the size of the largest species is small. In these situations, when two parents from different species are selected, crossover has a chance to create a surplus of 1-bits, and then the global optimum can be found by flipping the at most k − 1 remaining 0-bits to 1. This argument also shows that speedups can be achieved from small amounts of diversity; in contrast to previous work [25, 33] it is not necessary to rely on a maximum Hamming distance between parents emerging. A further finding from [7] is that increasing the mutation rate to p = (1 + δ)/n for an arbitrarily small constant δ > 0 turns the almost fair random walk describing the size of the largest species into an unfair random walk that is biased towards increased diversity. In other words, larger mutation rates facilitate the emergence and maintenance of diversity in this setting. This leads to the following improved upper bound, which for reasonably small µ gives a speedup of order n over the expected time of the (1+1) EA. Theorem 22 (Theorem 10 in [7], simplified for k ≥ 3). The (µ+1) GA with mutation rate (1 + δ)/n, for a constant δ > 0, and population size µ ≥ ck ln(n) for a sufficiently large constant c > 0, has for 3 ≤ k = o(n) expected optimization time O(µ2 + nk−1 ) on Jumpk . 24 Mechanism None, p = 1/n None, p = (1 + δ)/n Duplicate elimination Duplicate minimization Deterministic crowding Convex hull max. Hamming distance max. Fitness sharing Island model General µ, pc O(nk /µ + nk−1 log µ) O(µ2 + nk−1 ) O(µ2 n + nk−1 ) O(µn + nk−1 ) O(µn + n log n + ne5k µk+2 ) O(µn2 log n + 4k /pc ) O(n log n + µ2 kn log(µk) + 4k /pc ) O(n log n + µ2 kn log(µk)) O(n log n + µ2 kn + µ2 4k ) Best µ, pc O(nk−1 log n) O(nk−1 ) O(nk−1 ) O(nk−1 ) O(n log n + ne5k 2k ) O(n2 log n + 4k ) O(n log n + nk log k + 4k ) O(n log n + nk log k + 4k ) O(n log n + kn + 4k ) Table 2: Overview over the main results from [8] and [7] (Theorems 21 and 22), restricted to 3 ≤ k = o(n). Most bounds come with mild restrictions on k, µ, or pc , see [8, 7] for details. The second column shows simplified bounds, assuming a choice of µ and pc that yields the best possible upper bound. 4.5 Speeding Up Fitness Valley Crossing with Explicit Diversity Mechanisms The performance of the (µ+1) GA on Jumpk can be further improved by using explicit diversity mechanisms in the tie-breaking rule of the (µ+1) GA. This was studied in Dang et al. [8], where the main results are summarized in Table 2. For comparison, the table also contains results reviewed in Section 4.4 for uniform tie-breaking, where no diversity mechanism is used. The different mechanisms (except for the island model) only appear in the tie-breaking rule; they are described as follows, along with the main ideas behind their analysis. Duplicate elimination always chooses an individual for removal that has duplicates in the population, if duplicates exist. Otherwise, it removes an individual uniformly at random. The analysis shows that after O(µ2 n) generations in expectation, there will only be (1 − Ω(1))µ duplicates in the population, and this property will be maintained forever. Then the probability of picking non-identical parents is Ω(1). Then, as argued in Section 4.4, crossover followed by mutation can find the optimum with probability Ω(nk−1 ) as crossover creates a surplus of 1-bits with probability Ω(1) and then mutation has to flip at most k − 1 bits to reach the optimum. Duplicate minimization is the familiar rule that breaks ties towards including individuals with the fewest duplicates in P ∪ P ′ . Here it is easy to show that the size of the largest species decreases to (1−Ω(1))µ in expected time O(µn). Then we apply the trail of thought from duplicate elimination. Deterministic crowding in the case of fitness ties always removes the parent, if the offspring was created by mutation only, or one of the two parents chosen uniformly at random, if the offspring was created by crossover and mutation. The analysis follows the approach from [33], relying on a sequence of events that evolves in a pair of search points that have a maximum Hamming distance of 2k. Then there is a reasonable chance that uniform crossover will create the optimum from crossing over these parents and setting all differing bits to 1. Convex hull maximization breaks ties towards maximizing the convex hull of the population, which is the set of search points that can be produced from uniform crossover of any two 25 parents. More precisely, we maximize the convex hull by maximizing the number of bit positions where the population contains both a 0 and a 1 in some individual. The analysis shows, similar to [19], that in expected time O(µn2 log n) a maximum amount of diversity is created, where all of the µk ≤ n zeros in the population occupy different bit positions. Then any two (different) parents have maximum Hamming distance 2k and the optimum can be constructed with probability pc · 4−k (as argued earlier). Hamming distance maximization breaks ties towards maximizing the total Hamming distance between all pairs of search points. Similar to convex hull maximization, we reach a population of maximal diversity in expected time O(µ2 kn log(µk)). Repeating the arguments from there yields the claimed bound. Fitness sharing with a sharing radius of δ ≥ 2k in the setting of populations with equal fitness turns out to be equivalent to maximizing the total Hamming distance between pairs of search points, hence the previous analysis carries over. Island model uses a particular topology called single-receiver model [58], where µ islands run a (1+1) EA independently, and there is a single receiver island that in every generation chooses to islands uniformly at random, copies their current search points, and performs a uniform crossover on these. The analysis shows that, when fixing any two islands, these islands will either have zeros in different positions, or they will, in expectation, reduce the number of bit positions where they have a zero in common. Once the islands have no zero in common, the receiver island has a good chance to create the optimum when crossing over individuals from these two islands. The island model with single-receiver topology was introduced in [58] where the authors relied on this diversity mechanism to prove that a constructed royal road function with a building block structure could be solved efficiently by crossover. It was also used in [43] where it was shown that crossover during migration can be effective, for constructed functions as well as for instances of the Vertex Cover problem. We refer the reader to [43, 58] and the survey [56, Section 46.5.4] for details. 5 How Diversity Benefits Dynamic Optimisation Another very important use of population diversity is to ensure good performance in dynamic optimization, where the problem can change over time. Diversity can ensure that the population is able to keep track of global optima, or to re-discover global optima in case different local optima change their fitness, and another local optimum becomes the new global optimum. The runtime analysis of dynamic evolutionary optimization is still in its very infancy, with only few results available (e. g. [9, 29, 31, 32, 38, 47, 48]). 5.1 Diversity Mechanisms for Balance Oliveto and Zarges [47] considered diversity mechanisms for the dynamic function Balance [48]. Definition 23 (Balance [48]). Let a, b ∈ {0, 1}n/2 and x = ab ∈ {0, 1}n. Then  3 n if LO(a) = n/2, else    |b| + n · LO(a) if n/16 < |b| < 7n/16, else 1 1 Balance(x) = √ 2  n · LO(a) if |a|0 > n, else    0 otherwise 26 Pn/2 Pn/2 Qi where |x|1 = i=1 xi , |x|0 = n/2 − |x|1 is a number of zeros and LO(x) := i=1 j=1 xj counts the number of leading ones. For the majority of search points, the function gives hints to maximize the number of ones in the suffix (also referred to as OneMax part), and even stronger hints to maximize the number of leading ones in the prefix (the leading ones part). All search points with a maximum of n/2 leading ones are global optima, however the function also contains two traps and a fitness valley of fitness 0 that separates the traps from the region of global optima. The upper trap contains all search points with more than 7n/16 ones, and the lower trap contains all search points with less than n/16 ones. The function is used in a dynamic framework where every τ generations, for a change frequency parameter τ , the roles of zeros and ones in the suffix is reversed, so that the fitness gradient switches between maximizing and minimizing the number of ones in the OneMax part. Unless stated otherwise, the arguments given below assume that the number of ones is maximized. Oliveto and Zarges [47] show that a (µ+1) EA with no diversity mechanism tends to fail on Balance, as the whole population is likely to run into one of the traps. Theorem 24. If τ > 20µn and µ ≤ n1/2−ε then expected time for the (µ+1) EA to optimize √ Ω( n) . If τ > 38µn3/2 and µ ≤ n1/2−ε then the (µ+1) EA requires at least Balance is at least n √ Ω( n) n steps with overwhelming probability. The intuitive reason for this poor performance is that it is easier to optimize OneMax than it is to maximize the number of leading ones, and the algorithm only needs to come moderately close to the OneMax (or ZeroMax) optimum to fall into a trap. With low frequencies of change, this is very likely to happen. The authors investigated in how far this poor performance can be mitigated by using diversitypreserving mechanisms like the ones studied for TwoMax in [18]. The main results are explained in the following. Genotype diversity, that is, preventing genotype duplicates from being accepted, is too weak to affect the main search behavior; the (µ+1) EA still tends to run into traps. Theorem 25. For the (µ+1) EA with genotype diversity (Algorithm 2), the results from Theorem 24 apply. Deterministic crowding does not help: recall that deterministic crowding is based on offspring competing against their direct parents, hence (since no crossover is used) the (µ+1) EA evolves µ independent lineages. Each lineage still has a high probability of running into a trap, hence for polynomial population sizes and low frequencies of change there is a high probability that the whole population will be led into a trap. Theorem 26. With overwhelming probability, the (µ+1) EA using deterministic crowding and µ ≤ nO(1) requires exponential time to optimize Balance if τ > 8eµn. Fitness diversity as in Algorithm 3 turns out to perform a lot better: it can find the optimum efficiently for all values of τ . This is surprising as this mechanism showed the worst performance for TwoMax [18]. √ Theorem 27. Let µ > n − 2( n − 1). Then with overwhelming probability, the (µ+1) EA with fitness diversity optimizes Balance in time O(µn3 ) for arbitrary τ ≥ 0. The proof shows that, as the population size is quite large, the (µ+1) EA is able to “fill up” both traps in a sense that the algorithm will eventually contain individuals representing all 27 fitness values inside a trap, and then no other point in the trap will be accepted. This then allows the algorithm to evolve a lineage leading to the global optimum, avoiding the trap. Finally, the authors consider a variant of the (µ+1) EA with population size µ = 2 combining fitness sharing (with α = 1 and sharing radius σ = n) and deterministic crowding: in the selection step the shared fitness of the current population is compared against the shared fitness of the population where the offspring replaces its parent, and the latter population is selected if its shared fitness is no smaller. Instead of standard bit mutation, local mutations are used that flip exactly one bit chosen uniformly at random, as done in RLS. The resulting algorithm is referred to as (2+1) RLS. The (2+1) RLS is efficient with probability close to 1/2. Theorem 28. With probability at least 1/2 − e−Ω(n) the (2+1) RLS with fitness sharing and crowding finds the optimum of Balance in time O(n2 ) for arbitrary τ ≥ 0. The analysis observes, similar to [53] reviewed earlier in Section 4.2, that the function H(x, y) + f (x) + f (y) for current search points x, y decides whether H(x, y) can be increased at the expense of fitness, or whether the fitness can increase at the expense of the Hamming distance. Bit flips in the OneMax part of Balance only change the fitness by 1. If H(x, y) + f (x) + f (y) > 2n, such bit flips are accepted if and only if they increase the Hamming distance. If H(x, y) + f (x) + f (y) < 2n, such bit flips are accepted if and only if they increase the fitness. Now, a fitness larger than 2n is easily achieved if at initialization x and y have a total of at least 2 leading ones. This happens with probability at least 1/2, and then the (2+1) RLS will always have a fitness larger than 2n. Then any bit flips in the OneMax part will only be accepted if they increase the Hamming distance H(x, y). With high probability there will be many bit positions i where xi = 1, yi = 0 and many bit positions j where xj = 0, yj = 1. These values will never change, hence the OneMax part of any search point will never meet the extreme values corresponding to a trap. The leading ones part will be optimized as it has a much larger impact on the fitness, leading to a global optimum in the claimed time. However, the algorithm can also fail badly with constant probability, getting stuck in a local optimum from which there is no escape. Theorem 29. Let τ > 12n + 1. With probability bounded below by a constant the (2+1) RLS with fitness sharing and crowding requires infinite time to optimize Balance. This statement can be shown by observing that with constant probability, the fitness will remain below 2n, hence maximizing the number of ones in the OneMax part, while one of the search points reaches the upper trap. Then the fitness will always be larger than 2n, which makes the algorithm maximize the Hamming distance and hence drives the other search point into the lower trap. Here the algorithm gets stuck as the traps cannot be left and local mutations cannot create the global optimum from a trap. An interesting conclusion when contrasting the performance of diversity mechanisms on TwoMax [18] and Balance [47] is that mechanisms that perform well on one function may not perform well on the other. Fitness diversity shows the worst performance guarantees for TwoMax, but it performs the best on Balance. Deterministic crowding performed well on TwoMax, but performs poorly on Balance. Fitness sharing performed the best on TwoMax, but is only effective on Balance with constant probability, and otherwise fails badly. 5.2 Island Models for the Maze Function Lissovoi and Witt [39] presented another example where diversity mechanisms prove useful in dynamic optimization. They showed that island models can help to optimize the dynamic function 28 Maze, introduced earlier by Kötzing and Molter [32]. The function Maze changes in phases of t0 steps. In the first phase, the function is equivalent to OneMax. In the next n phases, higher fitness values are assigned to two search points on a shortest Hamming path from 1n to 0n , in an oscillating pattern. Every two iterations out of three, 0i 1n−i receives fitness n + 2, while the previous point on the path, 0i−1 1n−i+1 , receives fitness n + 1. Every three iterations, the fitness values of these two points are reversed. In every phase the index i increases by 1. All other search points always retain their OneMax value, hence whenever an algorithm loses track of the path, it is likely to be led back into 1n . The optimum can only be reached if an algorithm tracks the moving optimum on the whole Hamming path, eventually reaching 0n after n phases. We refer to [32, 39] for formal definitions of Maze. The (1+1) EA fails badly on Maze [32] and the same holds for a (1+λ) EA with a moderate offspring population size, as shown in the following theorem. The reason is that in every phase there is a constant probability that the algorithm will maintain the previous point on the path, 0i−1 1n−i+1 , and will fall off the path once the next phase starts. Theorem 30. The (1+λ) EA with λ = O(n1−ε ), for any constant ε > 0, will with high probability lose track of the optimum of Maze, i. e., with high probability it will require an exponential number of iterations to construct the final optimum. In sharp contrast, a simple island model running λ (1+1) EAs is effective on Maze, even with a much smaller number λ of offspring created in each generation. Theorem 31. An island model with λ = c log n islands, where c is a sufficiently large constant, each island running a (1+1) EA, and migration along a complete topology occurring during the first iteration of every phase (i. e., with migration interval τ = t0 ) is able to find the optimum of the Maze with phase length t0 = kn3 log n in polynomial time with high probability. The intuitive reason is that each island on the path has a constant probability of ending the phase in 0i−1 1n−i+1 and a constant probability of ending it in 0i 1n−i . In the latter case, these islands will still be on the path once the index i increases at the start of the next phase. There is a high probability that at least one island will still be on the path, and its fitness will be no less than that of all the other islands. Hence migration will ensure that all islands that may have fallen off will be put back on to the path. Note that the choice of the migration interval aligns with the time interval t0 for dynamic changes, such that at the time of migration, the search points further up on the path have a higher fitness. If migration occurs at other points in time, island models with O(log n) islands may still fail on Maze [39, Theorem 14]. 6 Diversity-Based Parent Selection All results surveyed so far use diversity mechanisms in the environmental selection, i. e. to decide which search points are allowed to survive to the next generation. Here we present recent work by Covantes Osuna et al. [5], who suggested to use diversity mechanisms in the parent selection in the context of evolutionary multiobjective optimization. Well established multi-objective evolutionary algorithms (MOEAs) such as NSGA-II [11], SPEA2 [2], IBEA [63] have two basic principles driven by selection. First of all, the goal is to push the current population close to the “true” Pareto front. The second goal is to “spread” the population along the front such that it is well covered. The first goal is usually achieved by dominance mechanisms between the search points or indicator functions that prefer nondominated points. The second goal involves the use of diversity mechanisms. Alternatively, 29 indicators such as the hypervolume indicator play a crucial role to obtain a good spread of the different solutions of the population along the Pareto front. In the context of EMO, parent selection is usually uniform whereas offspring selection is based on dominance and the contribution of an individual to the diversity of the population. The work [5] shows that diversity mechanisms can also be highly beneficial when embedded into the parent selection mechanisms in EMO. The goal is to speed up the optimization process of an EMO algorithm by selecting individuals that have a high chance of producing beneficial offspring. The idea is to use a diversity metric, such as the hypervolume contribution or the crowding distance contribution, and to preferably select parents with a higher diversity score. The hypervolume describes the area that is dominated by points in the population; the hypervolume contribution describes the contribution a search point x makes to the hypervolume, i. e. the difference between the hypervolume of the whole population P and the population P \ {x} without x. The crowding distance is a well-known measure from NSGA-II; it is based on the distances in objective space to the search points with the closest objective values, considering each objective separately. The main assumption is that individuals with a high diversity score are located in poorly explored or a less dense areas of the search space, so the chances of creating new non-dominated individuals are better than in areas where there are several individuals. In this sense the new parent selection schemes focus on individuals where the neighbourhood is not fully covered and in consequence, force the reproduction in those areas and to the spread of the population along the search space. We consider two well-known pseudo-Boolean functions {0, 1}n → N2 with two objectives: in ! n n X X xi , xi , OneMinMax(x1 , . . . , xn ) := n − i=1 i=1 the aim is to maximize the number of zeroes and ones at the same time. For   n Y n n Y i X X (1 − xj ) , xj , LOTZ(x1 , . . . , xn ) :=  i=1 j=1 i=1 j=i the goal is to simultaneously maximize the number of leading ones and trailing zeroes. OneMinMax has the property that every single solution represents a point in the Pareto front and that no search point is strictly dominated by another one. The goal is to cover the whole Pareto front, i. e. to compute a set of individuals that contains for each i, 0 ≤ i ≤ n, an individual with exactly i ones. In the case of LOTZ, all non-Pareto optimal decision vectors only have Hamming neighbors that are better or worse, but never incomparable to it. This fact facilitates the analysis of the population-based algorithms, which certainly cannot be expected from other multi-objective optimization problems. Note that the Pareto front for LOTZ is given by the set of n + 1 search points {1i 0n−i | 0 ≤ i ≤ n}. We consider the Simple Evolutionary Multiobjective Optimizer (SEMO), shown in Algorithm 10, which is popular for theoretical analyses due to its simplicity. The work [5] also contains results for a variant GSEMO, which uses standard bit mutations instead of local mutations. For simplicity, we only present results for SEMO in this survey. The following theorem summarises results from [5, 21, 37] on the performance of SEMO. Theorem 32. The expected time for SEMO to cover the whole Pareto front on OneMinMax and LOTZ is Θ(n2 log n) and Θ(n3 ), respectively. The expected time is by a factor of Θ(n) larger than the expected time of the (1+1) EA to optimize any single objective. The reason for SEMO being slower is that, once the Pareto 30 Algorithm 10: SEMO 1 2 3 4 5 6 7 Choose an initial solution s ∈ {0, 1}n uniformly at random. Determine f (s) and initialize P := {s}. while not stopping do Choose s uniformly at random from P . Choose i ∈ {1, . . . , n} uniformly at random. Define s′ by flipping the i-th bit of s. if s′ is not dominated by any individual in P then Add s′ to P , and remove all individuals weakly dominated by s′ from P . front has been reached, only the search points with a maximum objective value, when chosen as parents, can expand the Pareto front further. All other choices of parents lead to the creation of an offspring whose objective values are already represented in the population. Once the population has grown to a linear size µ = Θ(n), the probability of selecting a parent that allows SEMO to progress is only Θ(1/n), i. e. most steps are wasted. This leads to the additional factor of order n compared to the (1+1) EA. Diversity-based parent selection using either hypervolume contribution or crowding distance contribution can improve these running times. The parent selection mechanisms considered use one of these diversity metrics to select parents according to processes that favor higher diversity: sorting the population according to ranks of the diversity metric and picking the i-th ranked individual with probability proportional to 2−i (exponential scheme) or 1/i2 (power-law scheme), or using tournament selection based on the diversity score with tournament size µ (i. e. the current size of the population). Here the tournament is picked with replacement, hence search points can be picked multiple times, or be excluded from the tournament. Theorem 33. Consider diversity-based parent selection using either hypervolume contribution or crowding distance contribution and selecting parents according to the exponential or power-law scheme, or according to a tournament with tournament size µ. Then the expected time for SEMO with diversity-based parent selection to cover the whole Pareto front on OneMinMax and LOTZ is O(n log n) and O(n2 ), respectively. The proofs show that the expected time for SEMO is bounded from above by O((n log n)/pgood ) and O(n2 /pgood ), respectively, where pgood is (a lower bound on) the probability of selecting a parent that has a Hamming neighbor whose objective vector is on the Pareto front, but not yet represented in the population. The diversity score assigns the highest values to the search points with maximum objective values. However, the extreme points 0n and 1n may themselves not be “good” search points; if the Pareto front has reached one “end” of the search space, SEMO still may need to expand in the other direction. All mentioned parent selection mechanisms have a probability of Ω(1) for selecting the individual with the highest diversity rank, but they also have a probability of Ω(1) of selecting the second-best (and third-best) individual. Hence, even if the population does contain 0n or 1n , the parent selection is still able to find a “good” parent to expand the Pareto front efficiently. Hence pgood = Ω(1) and the claimed bounds follow. 7 Conclusions Maintaining and promoting diversity in evolutionary algorithms is a very important task. Surveys on diversity mechanisms [49, 50, 57] reveal a multitude of approaches to enhance and promote diversity, yet it is often unclear which of these mechanisms perform well, and why. 31 We have surveyed rigorous runtime analyses of evolutionary algorithms with explicit diversity mechanisms, ranging from avoiding genotype or fitness duplicates, deterministic crowding, fitness sharing and clearing to island models. Other studies have shown that diversity can also emerge naturally, without any explicit mechanisms, through independent mutations, phases of independent evolution in the context of island models, or, in the case of Jumpk , through the interplay of different operators such as crossover followed by mutation and selection. We have seen that diversity can be highly beneficial for enhancing the global exploration capabilities of evolutionary algorithms. It can enable crossover to work effectively, improve performance and robustness in dynamic optimization, and it is vital for evolutionary multiobjective optimization. In many cases diversity mechanisms can be highly effective for the considered problems, speeding up the expected or typical optimization time by constant factors, polynomial factors, or even exponential factors. Comparing results for TwoMax, Jumpk , and Balance, we found that diversity mechanisms that are effective for one problem may be ineffective for other problems, and vice versa. The analyses have rigorously quantified performance to demonstrate these effects. More importantly, they have laid the foundation for a rigorous understanding of how search dynamics are affected by the presence or absence of population diversity and introduction of diversity mechanisms. Acknowledgments The author would like to thank Edgar Covantes Osuna for helpful comments. This work originated from Dagstuhl seminar 17191 “Theory of Randomized Optimization Heuristics”; the author would like to thank the organisers and participants for inspiring discussions. References [1] N. Barton and T. Paixão. Can quantitative and population genetics help us understand evolutionary computation? In Proceedings of the Genetic and Evolutionary Computation Conference (GECCO ’13), pages 1573–1580, 2013. [2] S. Bleuler, M. Brack, L. Thiele, and E. Zitzler. Multiobjective genetic programming: reducing bloat using SPEA2. In Proceedings of the 2001 Congress on Evolutionary Computation (CEC 2001), volume 1, pages 536–543, 2001. [3] D. Brockhoff. Theoretical aspects of evolutionary multiobjective optimization. In Theory of Randomized Search Heuristics–Foundations and Recent Developments. World Scientific Publishing, 2011. [4] D. Corus and P. S. Oliveto. Standard steady state genetic algorithms can hillclimb faster than mutation-only evolutionary algorithms. IEEE Transactions on Evolutionary Computation, 2017. To appear. [5] E. Covantes Osuna, W. Gao, F. Neumann, and D. Sudholt. Speeding up evolutionary multi-objective optimisation through diversity-based parent selection. In Proceedings of the Genetic and Evolutionary Computation Conference (GECCO ’17), pages 553–560. ACM, 2017. [6] E. Covantes Osuna and D. Sudholt. Analysis of the clearing diversity-preserving mechanism. In Proceedings of Foundations of Genetic Algorithms (FOGA 2017), pages 55–63. ACM Press, 2017. 32 [7] D.-C. Dang, T. Friedrich, T. Kötzing, M. S. Krejca, P. K. Lehre, P. S. Oliveto, D. Sudholt, and A. M. Sutton. Escaping local optima using crossover with emergent diversity. IEEE Transactions on Evolutionary Computation. To appear. [8] D.-C. Dang, T. Friedrich, M. S. Krejca, T. Kötzing, P. K. Lehre, P. S. Oliveto, D. Sudholt, and A. M. Sutton. Escaping Local Optima with Diversity-Mechanisms and Crossover. In Proceedings of the Genetic and Evolutionary Computation Conference (GECCO 2016), pages 645–652. ACM Press. [9] D.-C. Dang, T. Jansen, and P. K. Lehre. Populations can be essential in tracking dynamic optima. Algorithmica, 78(2):660–680, Jun 2017. [10] M. De Felice, S. Meloni, and S. Panzieri. Effect of topology on diversity of spatiallystructured evolutionary algorithms. In Proceedings of the Genetic and Evolutionary Computation Conference (GECCO ’11), pages 1579–1586. ACM, 2011. [11] K. Deb, A. Pratap, S. Agarwal, and T. Meyarivan. A fast and elitist multiobjective genetic algorithm: NSGA-II. IEEE Transactions on Evolutionary Computation, 6(2):182–197, Apr 2002. [12] B. Doerr, E. Happ, and C. Klein. Crossover can provably be useful in evolutionary computation. Theoretical Computer Science, 425(0):17–33, 2012. [13] B. Doerr, N. Hebbinghaus, and F. Neumann. Speeding up evolutionary algorithms through asymmetric mutation operators. Evolutionary Computation, 15:401–410, 2007. [14] B. Doerr and D. Johannsen. Adjacency list matchings—an ideal genotype for cycle covers. In Proceedings of the Genetic and Evolutionary Computation Conference (GECCO ’07), pages 1203–1210. ACM Press, 2007. [15] B. Doerr, C. Klein, and T. Storch. Faster evolutionary algorithms by superior graph representation. In First IEEE Symposium on Foundations of Computational Intelligence (FOCI ’07), pages 245–250. IEEE, 2007. [16] S. Fischer and I. Wegener. The one-dimensional Ising model: Mutation versus recombination. Theoretical Computer Science, 344(2–3):208–225, 2005. [17] T. Friedrich, N. Hebbinghaus, and F. Neumann. Rigorous analyses of simple diversity mechanisms. In Proceedings of the Genetic and Evolutionary Computation Conference (GECCO ’07), pages 1219–1225. ACM Press, 2007. [18] T. Friedrich, P. S. Oliveto, D. Sudholt, and C. Witt. Analysis of diversity-preserving mechanisms for global exploration. Evolutionary Computation, 17(4):455–476, 2009. [19] W. Gao and F. Neumann. Runtime analysis for maximizing population diversity in singleobjective optimization. In Proc. of GECCO ’14, pages 777–784, 2014. [20] M. Giacobini, M. Tomassini, and A. Tettamanzi. Takeover time curves in random and smallworld structured populations. In Proceedings of the Genetic and Evolutionary Computation Conference (GECCO ’05), pages 1333–1340. ACM Press, 2005. [21] O. Giel and P. K. Lehre. On the effect of populations in evolutionary multi-objective optimisation. Evolutionary Computation, 18(3):335–356, Sept. 2010. 33 [22] C. Horoba, T. Jansen, and C. Zarges. Maximal age in randomized search heuristics with aging. In Proceedings of the Genetic and Evolutionary Computation Conference (GECCO ’09), pages 803–810, 2009. [23] C. Horoba and F. Neumann. Approximating Pareto-Optimal Sets Using Diversity Strategies in Evolutionary Multi-Objective Optimization, pages 23–44. Springer Berlin Heidelberg, 2010. [24] M. Hutter and S. Legg. Fitness uniform optimization. IEEE Transactions on Evolutionary Computation, 10:568–589, 2006. [25] T. Jansen and I. Wegener. On the analysis of evolutionary algorithms—a proof that crossover really can help. Algorithmica, 34(1):47–66, 2002. [26] T. Jansen and I. Wegener. Real royal road functions—where crossover provably is essential. Discrete Applied Mathematics, 149:111–125, 2005. [27] T. Jansen and C. Zarges. Analyzing different variants of immune inspired somatic contiguous hypermutations. Theoretical Computer Science, 412(6):517–533, 2011. [28] T. Jansen and C. Zarges. On the role of age diversity for effective aging operators. Evolutionary Intelligence, 4(2):99–125, 2011. [29] T. Jansen and C. Zarges. Evolutionary algorithms and artificial immune systems on a bistable dynamic optimisation problem. In Proceedings of the 2014 Annual Conference on Genetic and Evolutionary Computation (GECCO ’14), pages 975–982. ACM, 2014. [30] N. L. Komarova, E. Urwin, and D. Wodarz. Accelerated crossing of fitness valleys through division of labor and cheating in asexual populations. Scientific Reports, 2012. [31] T. Kötzing, A. Lissovoi, and C. Witt. (1+1) EA on generalized dynamic onemax. In Proceedings of the 2015 ACM Conference on Foundations of Genetic Algorithms (FOGA ’15), pages 40–51. ACM, 2015. [32] T. Kötzing and H. Molter. ACO beats EA on a dynamic pseudo-boolean function. In Parallel Problem Solving from Nature (PPSN XII), pages 113–122. Springer Berlin Heidelberg, 2012. [33] T. Kötzing, D. Sudholt, and M. Theile. How crossover helps in pseudo-Boolean optimization. In Proceedings of the 13th Annual Genetic and Evolutionary Computation Conference (GECCO 2011), pages 989–996. ACM Press, 2011. [34] J. Lässig and D. Sudholt. The benefit of migration in parallel evolutionary algorithms. In Proceedings of the Genetic and Evolutionary Computation Conference (GECCO 2010), pages 1105–1112. ACM Press, 2010. [35] J. Lässig and D. Sudholt. Design and analysis of migration in parallel evolutionary algorithms. Soft Computing, 17(7):1121–1144, 2013. [36] J. Lässig and D. Sudholt. Analysis of speedups in parallel evolutionary algorithms and (1+λ) EAs for combinatorial optimization. Theoretical Computer Science, 551:66–83, 2014. [37] M. Laumanns, L. Thiele, and E. Zitzler. Running time analysis of multiobjective evolutionary algorithms on pseudo-boolean functions. IEEE Transactions on Evolutionary Computation, 8(2):170–182, April 2004. 34 [38] A. Lissovoi and C. Witt. On the utility of island models in dynamic optimization. In Proceedings of the 2015 Annual Conference on Genetic and Evolutionary Computation, GECCO ’15, pages 1447–1454, New York, NY, USA, 2015. ACM. [39] A. Lissovoi and C. Witt. A runtime analysis of parallel evolutionary algorithms in dynamic optimization. Algorithmica, 78(2):641–659, 2017. [40] S. W. Mahfoud. Niching methods. In T. Bäck, D. B. Fogel, and Z. Michalewicz, editors, Handbook of Evolutionary Computation, pages C6.1:1–4. Institute of Physics Publishing and Oxford University Press, Bristol, New York, 1997. [41] A. Mambrini, D. Sudholt, and X. Yao. Homogeneous and heterogeneous island models for the set cover problem. In Parallel Problem Solving from Nature (PPSN 2012), volume 7491 of LNCS, pages 11–20. Springer, 2012. [42] F. Neumann. Expected runtimes of evolutionary algorithms for the Eulerian cycle problem. Computers & Operations Research, 35(9):2750–2759, 2008. [43] F. Neumann, P. S. Oliveto, G. Rudolph, and D. Sudholt. On the effectiveness of crossover for migration in parallel evolutionary algorithms. In Proceedings of the Genetic and Evolutionary Computation Conference (GECCO 2011), pages 1587–1594. ACM Press, 2011. [44] P. S. Oliveto, J. He, and X. Yao. Population-based evolutionary algorithms for the vertex cover problem. In Proceedings of the IEEE Congress on Evolutionary Computation (CEC ’08), pages 1563–1570, 2008. [45] P. S. Oliveto and D. Sudholt. On the runtime analysis of stochastic ageing mechanisms. In Proceedings of the Genetic and Evolutionary Computation Conference (GECCO 2014), pages 113–120. ACM Press, 2014. [46] P. S. Oliveto, D. Sudholt, and C. Zarges. On the runtime analysis of fitness sharing mechanisms. In 13th International Conference on Parallel Problem Solving from Nature (PPSN 2014), volume 8672 of LNCS, pages 932–941. Springer, 2014. [47] P. S. Oliveto and C. Zarges. Analysis of diversity mechanisms for optimisation in dynamic environments with low frequencies of change. Theoretical Computer Science, 561:37–56, 2015. [48] P. Rohlfshagen, P. K. Lehre, and X. Yao. Dynamic evolutionary optimisation: an analysis of frequency and magnitude of change. In Proceedings of the 2009 Genetic and Evolutionary Computation Conference (GECCO ’09), pages 1713–1720. ACM Press, 2009. [49] O. M. Shir. Niching in evolutionary algorithms. In G. Rozenberg, T. Bäck, and J. N. Kok, editors, Handbook of Natural Computing, pages 1035–1070. Springer, 2012. [50] G. Squillero and A. Tonda. Divergence of character and premature convergence: A survey of methodologies for promoting diversity in evolutionary optimization. Information Sciences, 329:782–799, 2016. Special issue on Discovery Science. [51] T. Storch and I. Wegener. Real royal road functions for constant population size. Theoretical Computer Science, 320:123–134, 2004. [52] D. Sudholt. How crossover speeds up building-block assembly in genetic algorithms. Evolutionary Computation, 25(2):237–274. 35 [53] D. Sudholt. Crossover is provably essential for the Ising model on trees. In Proceedings of the Genetic and Evolutionary Computation Conference (GECCO ’05), pages 1161–1167. ACM Press, 2005. [54] D. Sudholt. Hybridizing evolutionary algorithms with variable-depth search to overcome local optima. Algorithmica, 59(3):343–368, 2011. [55] D. Sudholt. Crossover speeds up building-block assembly. In Proceedings of the Genetic and Evolutionary Computation Conference (GECCO 2012), pages 689–696. ACM Press, 2012. [56] D. Sudholt. Parallel evolutionary algorithms. In J. Kacprzyk and W. Pedrycz, editors, Handbook of Computational Intelligence, pages 929–959. Springer, 2015. [57] M. Črepinšek, S.-H. Liu, and M. Mernik. Exploration and exploitation in evolutionary algorithms: A survey. ACM Computing Surveys, 45(3):35:1–35:33, 2013. [58] R. A. Watson and T. Jansen. A building-block royal road where crossover is provably essential. In Proceedings of the Genetic and Evolutionary Computation Conference (GECCO ’07), pages 1452–1459. ACM, 2007. [59] I. Wegener. Methods for the analysis of evolutionary algorithms on pseudo-Boolean functions. In R. Sarker, X. Yao, and M. Mohammadian, editors, Evolutionary Optimization, pages 349–369. Kluwer, 2002. [60] D. B. Weissman, M. W. Feldman, and D. S. Fisher. The rate of fitness-valley crossing in sexual populations. Genetics, 186:1389–1410, 2010. [61] C. Witt. Runtime analysis of the (µ+1) EA on simple pseudo-Boolean functions. Evolutionary Computation, 14(1):65–86, 2006. [62] C. Zarges. Theoretical Foundations of Immune-Inspired Randomized Search Heuristics for Optimisation. [63] E. Zitzler and S. Künzli. Indicator-based selection in multiobjective search. In Proceedings of the Parallel Problem Solving from Nature - PPSN VIII, pages 832–842. Springer Berlin Heidelberg, 2004. 36
9cs.NE
arXiv:1001.2817v1 [cs.PL] 16 Jan 2010 Grammatical Aspects for Language Descriptions Andrey Breslav∗1 ITMO University1 St. Petersburg1 , Russia1 Abstract For the purposes of tool development, computer languages are usually described using context-free grammars with annotations such as semantic actions or pretty-printing instructions. These descriptions are processed by generators which automatically build software, e.g., parsers, prettyprinters and editing support. In many cases the annotations make grammars unreadable, and when generating code for several tools supporting the same language, one usually needs to duplicate the grammar in order to provide different annotations for different generators. We present an approach to describing languages which improves readability of grammars and reduces the duplication. To achieve this we use Aspect-Oriented Programming principles. This approach has been implemented in an open-source tool named Grammatic. We show how it can be used to generate pretty-printers and syntax highlighters. 1 Introduction With the growing popularity of Domain-Specific Languages, the following types of supporting tools are created more and more frequently: • Parsers and translators; • Pretty-printers; • IDE add-ons for syntax highlighting, code folding and outline views. Nowadays these types of tools are usually developed with the help of generators which accept language descriptions in the form of annotated (context-free) grammars. For example, tools such as YACC [7] and ANTLR [12] use grammars annotated with embedded semantic actions. As an illustration of this approach first 1 expr : term ((PLUS | MINUS) term)* ; term : factor ((MULT | DIV) factor)* ; factor : INT | ’(’ expr ’)’ ; Listing 1: Grammar for arithmetic expressions expr returns [int result] : t=term {result = t;} ({int sign = 1;} (PLUS | MINUS {sign = -1;}) t=term {result += sign * t;})*; Listing 2: Annotated grammar rule consider an annotation-free grammar for arithmetic expressions (Listing 1). To generate a translator, one has to annotate the grammar rules with embedded semantic actions. Listing 2 shows the rule expr from Listing 1 annotated for ANTLR v3. As can be seen, the context-free grammar rule is not easily readable in Listing 2 because of the actions’ code interfering with the grammar notation. This problem is common for annotated grammars. We will refer to it as tangled grammars. In most applications we need to create several supporting tools for the same language (see Figure 1, left side). In such a case one uses different generators to obtain different programs (e.g., Pretzel [3] to build a pretty-printer and xText [1] to create an Eclipse editor). Each generator requires its own specific set of annotations, and the developer has to write the same grammar several times with different annotations for each generator. Besides the duplication of effort, when the language evolves, this may lead to inconsistent changes in different copies of the grammar, which may cause issues which are hard to detect. We will refer to this problem as grammar duplication. This paper aims at reducing tangling and duplication in annotated grammars. A high-level view of our approach is illustrated in Figure 1 (right side): the main idea is to separate the annotations from the grammar by employing the principles similar to those behind the AspectJ language [8], this leads to a notion of a grammatical aspect. Our approach is implemented in an open-source tool named Grammatic1 . In Section 2 we briefly describe the main notions of aspect-oriented programming in AspectJ. An overview of grammatical aspects and related concepts is given in Section 3. Section 4 studies the applications of Grammatic to generating syntax highlighters and pretty-printers on the basis of a common grammar. We analyze these applications and evaluate our approach in Section 5. Related work is described in Section 6. Section 7 summarises the contribution of the ∗ This work was partly done while the author was a visiting PhD student at University of Tartu, under a scholarship from European Regional Development Funds through Archimedes Foundation. 1 The tool is available at http://grammatic.googlecode.com 2 Figure 1: Generating two supporting tools for the same language paper and introduces possible directions of the future work. 2 Background Aspect-Oriented Programming (AOP) is a body of techniques aimed at increasing modularity in general-purpose programming languages by separating crosscutting concerns. Our approach is inspired by AspectJ [8], an aspect-oriented extension of Java. AspectJ allows a developer to extract the functionality that is scattered across different classes into modules called aspects. At compilation- or run-time this functionality is weaved back into the system. The places where code can be added are called join points. Typical examples of join points are a method entry point, an assignment to a field, a method call. AspectJ uses pointcuts — special constructs that describe collections of join points to weave the same piece of code into many places. Pointcuts describe method and field signatures using patterns for names and types. For example, the following pointcut captures calls of all public get-methods in the subclasses of the class Example which return int and have no arguments: pointcut getter() : call(public int Example+.get*()) The code snippets attached to a pointcut are called advice; they are weaved into every join point that matches the pointcut. For instance, the following advice writes a log record after every join point matched by the pointcut above: after() : getter() { Log.write("A get method called"); } In this example the pointcut is designated by its name, getter, that follows the keyword after which denotes the position for the code to be weaved into. An aspect is basically a unit comprising a number of such pointcut-advice pairs. 3 Figure 2: Annotations attached to a grammar rule 3 Overview of the approach Grammatic employs the principles of AOP in order to tackle the problems of tangling and duplication in annotated grammars. We will use the grammar from Listing 1 and the annotated rule from Listing 2 to illustrate how the terms such as “pointcut” and “advice” are embodied for annotated grammars. Grammatical join points Figure 2 shows a structured representation (a syntax diagram) of the annotated rule from Listing 2. It shows the annotations attached to a symbol definition expr, three symbol references: term (two times) and MINUS, and an alternative (PLUS | MINUS) (marked “alt ” in the figure). All these are examples of grammatical join points (in Figure 2 they are marked with black circles). The full list of join point types comprises all the types of nodes of the abstract syntax trees (ASTs) of the language of grammars. To avoid confusion with ASTs of languages defined by the grammar, we will refer to AST of the grammar itself as grammar tree (GT). Grammatic uses a notation for grammars which is based on the one used by ANTLR. The only two differences are (i) in Grammatic productions are explicit and separated by “:”, and (ii) an empty string is denoted explicitly by “#empty”. Here is the list of types of GT nodes (which are also the types of the join points) with comments about the concrete syntax: • Grammar; • Definitions of terminal and nonterminal symbols (grammar rules) and references to them; • Individual productions (a rule comprises one or more productions separated by “:”); • Concatenation (sequence), Alternative (“|”), Iteration (“*”, “+”, “?”); • Empty string (“#empty”); 4 rulePattern : var? symbolPattern productionPattern* ’;’ ; var : ’$’ NAME ’=’ ; symbolPattern // any symbol : ’#’ : NAME ; productionPattern : var? ’:’ alternativePattern : ’:’ var? ’{...}’ ; alternativePattern : sequencePattern (’|’ (sequencePattern | (var? ’...’)))* ; sequencePattern : iterationPattern+ ; iterationPattern : var? atomicPattern (’*’ | ’+’ | ’?’)? ; atomicPattern : ’(’ alternativePattern ’)’ : symbolReferencePattern // empty string : ’#empty’ : ’..’ // any sequence : ’#lex’ // any lexical literal : ’$’ NAME ; // a variable Listing 3: Grammar of the pattern language • Lexical literals (quoted strings). The grammars given below may serve as example usages of this notation. Grammatical pointcuts Grammatic implements pointcuts using patterns over the grammar language. A pattern is an expression that matches a set of nodes in GT. The syntax of the pattern language is given in Listing 3. The most basic form of a pattern is a direct citation from the grammar: expr: term ((PLUS | MINUS) term)*; This pattern matches a rule of exactly the same form (rule expr from Listing 1). In addition to this capability the pattern language makes use of various types of wildcards which make patterns more abstract and thus reduce the duplication. Table 1 summarizes available wildcards and the node types they each match. Notation # #lex .. ... {...} Matches any. . . Symbol Lexical literal Sequence Nonempty set of alternatives Nonempty set of productions Table 1: Wildcards 5 Consider some examples of patterns for rules from Listing 1: • expr : {...} — a rule defining a symbol “expr”, comprising any number of any productions (in Listing 1 it matches only the rule for expr); • # : term .. — a production for any symbol, starting with a reference to a symbol named “term” (also matches only the rule for expr); • # : # (..)* — a symbol reference followed by a star iterating an arbitrary sequence (matches the rules for expr and term). The pattern language also supports variables: a part of a pattern may be associated with a name which may be used later in the same pattern, for example: # : $tr=# ((PLUS | MINUS) $tr)* Here the variable $tr is defined with the pattern # (any symbol) which means that all usages of the variable will match only occurrences of the same symbol. This pattern matches the rule for expr because the same symbol term is referenced in the positions matched by the variable $tr. Note that in general a variable is bound to a set of GT nodes: if we match the rule for expr against the pattern in the example above, the variable $tr will be bound to a set comprised by two distinct references to the symbol term. Grammatical advice Annotations attached to grammars (they are analogous to AspectJ’s advice) may have an arbitrarily complicated structure: in general, a generator may need a very rich annotation system. Grammatic provides a generic annotation language, which represents the annotations as sets of name-value pairs (see Listing 4) which we call attributes. Examples of such pairs are given in Table 2 which shows all the predefined value types. Values may also have user-defined types which can be plugged into the position marked by <additionalValueTypes> in the grammar. Example int = 10 str = ’Hello’ id = SomeName rec = {b = c; d = 5} seq = {{1, a b ’str’}} Value type Integer String Name literal Annotation Sequence of values Table 2: Predefined value types For example, the annotations in Figure 2 may be represented as values of type String (other representations are also possible). As the usage of the term “attribute” may be misleading in this context, we would like to note that the approach presented here does not directly correspond to attribute grammars [9]. In fact, grammars with annotations do not have any 6 annotation : ’{’ (attribute (’;’ attribute?)*)? ’}’ : ’.’ attribute ; namespace : NAME ’:’ ; attribute : namespace? NAME (’=’ value)? ; value : character : INT : STRING : NAME : annotation : ’{{’ (value | punctuation)* ’}}’ : <additionalValueTypes> ; punctuation : ’‘’ | ’˜’ | ’!’ | ’@’ | ’#’ | ’$’ | ’%’ | ’ˆ’ | ’&’ | ’*’ | ’(’ | ’)’ | ’-’ | ’+’ | ’=’ | ’|’ | ’\\’| ’[’ | ’]’ | ’;’ | ’:’ | ’,’ | ’.’ | ’/’ | ’?’ | ’<’ | ’>’ ; Listing 4: Grammar of the advice language particular execution semantics (each generator interprets the annotations in its own way), as opposed to attributed grammars which have a fixed execution semantics. One can describe attribute grammars using Grammatic and define corresponding semantics in a generator, but this is just an example application. Grammatical aspects Now, having described all the components, we can assemble a grammatical aspect as a set of pointcuts-advice pairs. Usage of grammatical aspects is illustrated by Figure 1 (right side). The syntax of grammatical aspects is given in Listing 5. An aspect consists of an optional grammar annotation and zero or more annotation rules. Annotation rules associate grammatical pointcuts (rule patterns) with advice (annotations). Here is an example of an annotation rule: expr : $tr=# (.. $tr)* $tr.varName = t ; // pointcut (pattern) // advice (annotation) In a simple case exemplified here, an annotation (.varName = t, the alternative syntax is {varName = t}) is attached to GT nodes to which a variable ($tr) is bound. For more complicated cases, one can define subpatterns — patterns which are matched against nodes situated under the matched one in the GT. For example, the following construct attaches an attribute named varName to each reference to the symbol term inside a rule matched by a top-level pattern: expr : .. @$tr=(term): $tr.varName = t ; // pointuct (pattern) // pointcut (subpattern) // advice (annotation) 7 aspect : grammarAnnotation? annotationRule* ; grammarAnnotation : annotation ; annotationRule : multiplicity? rulePattern subrules ; subrules : (subpattern | variableAnnotation)* ; subpattern : ’@’ multiplicity? (productionPattern | alternativePattern) ’:’ (subrules | annotation) ; variableAnnotation : ’$’ NAME annotation ; multiplicity : ’[’ intOrInfinity (’..’ intOrInfinity)? ’]’ ; intOrInfinity : INT | ’*’ ; Listing 5: Grammar of the aspect language This example illustrates the typical usage of subpatters where all annotations are associated with a variable bound to the whole pattern. As a shorthand for this situation Grammatic allows to omit the variable (it will be created implicitly). Using this shorthand we can abridge the previous example to the following: expr : .. @term: { varName = t } ; // ’{ a = b }’ is the same as ’.a = b’ Note that subpatterns may have their own subpatterns. Patterns and subpatterns may be preceded by a multiplicity directive, for example [0..1] # : $tr=# (.. $tr)* // pointcut with multiplicity // some advice Multiplicity determines a number of times the pattern is allowed to match. The default multiplicity is [1..*] which means that each pattern with no explicit multiplicity is allowed to match one or more times. When an aspect is applied to a grammar, if the actual number of matches goes beyond the range allowed by a multiplicity directive, Grammatic generates an error message. In the example above, such a message will be generated for the grammar from Listing 1 because the pattern matches two rules: expr and term, which violates the specified multiplicity [0..1]. Generation-time behaviour Grammatical aspects are applied at generation time. Before a generator starts working, in order to prepare the data for it, Grammatic performs the following steps: • parse the grammar and the aspect 8 • attach the grammar annotation to the root node of the grammar • for each annotation rule in aspect – call ApplyPattern(rule pattern, grammar) Where ApplyPattern is a recursive subroutine defined by the following pseudocode: ApplyPattern (pattern, node) is • find subnodes matching pattern among descendants of node (Variable bindings are saved in boundTo map) • if the number of subnodes violates pattern.multiplicity – Report error and stop • for each subnode in subnodes – for each subpattern in pattern.subpatterns ∗ call ApplyPattern(subpattern, subnode) – for each var in pattern.variables ∗ for each boundNode in boundTo(var) · attach var.annotation to boundNode end The innermost loop goes through the set of GT nodes to which the variable var is bound (see Section 3) and attaches the annotations associated with this variable to each of these nodes. If no error was reported, the resulting structure (GT nodes with attached annotations) is passed to the generator which processes it as a whole and needs no information about aspects. Thus, Grammatic works as a front-end for generators that use its API. To use a pre-existing tool, for example, ANTLR, with grammatical aspects, one can employ a small generator which calls Grammatic to apply aspects to grammars, and produces annotated grammars in the ANTLR format. 4 Applications In this section we show how one can make use of grammatical aspects when generating syntax highlighters and pretty-printers on the basis of the same grammar. Specifying syntax highlighters A syntax highlighter generator creates a highlighting add-on for an IDE, such as a script for vim editor or a plug-in for Eclipse. For all targets the same 9 normalClassDeclaration : ’class’ IDENTIFIER typeParameters? (’extends’ type)? (’implements’ typeList)? classBody ; classBody : ’{’ classBodyDeclaration* ’}’ ; typeParameters : ’<’ typeParameter (’,’ typeParameter)* ’>’ ; typeParameter : IDENTIFIER (’extends’ bound)? ; bound : type (’&’ type)* ; type : IDENTIFIER typeArguments? (’.’ IDENTIFIER typeArguments?)* (’[’ ’]’)* : basicType ; typeArguments : ’<’ typeArgument (’,’ typeArgument)* ’>’ ; typeArgument : type : ’?’ ((’extends’ | ’super’) type)? ; Listing 6: Class declaration syntax in Java 5 specification language is used: we annotate a grammar with highlighting groups which are assigned to occurrences of terminals. Each group may have its own color attributes when displayed. Common examples of highlighting groups are keyword, number, punctuation. In many cases syntax highlighters use only lexical analysis, but it is also possible to employ light-weight parsers [11]. In such a case grammatical information is essential for a definition of the highlighter. Below we develop an aspect for the Java grammar which defines groups for keywords and for declaring occurrences of class names and type parameters. A declaring occurrence is the first occurrence of a name in the program; all the following occurrences of that name are references. Consider the following example: class Example<A, B extends A> implements Some<? super B> This illustrates how the generated syntax highlighter should work: the declaring occurrences are underlined (occurrences of ? are always declaring) and the keywords are shown in bold. This kind of highlighting is helpful especially while developing complicated generic signatures. Listing 6 shows a fragment of the Java grammar [4] which describes class declarations and type parameters. In Listing 7 we provide a grammatical aspect which defines three highlighting groups: keyword, classDeclaration and typeParameterDeclaration, for join points inside these rules. Each annotation rule from Listing 7 contains two subpatterns. The first one is #lex: it matches every lexical literal. For example, for the first rule it matches ’class’, ’extends’ and ’implements’; the highlighting group keyword is assigned to all these literals. The second subpattern in each annotation rule is used to set a corresponding highlighting group for a declaring occurrence: for classes and type parameters 10 # : ’class’ IDENTIFIER .. @#lex: { group = keyword } ; @IDENTIFIER: { group = classDeclaration } ; typeParameter : IDENTIFIER .. @#lex: { group = keyword } ; @IDENTIFIER: { group = typeParameterDeclaration } ; typeArgument : {...} @#lex: { group = keyword } ; @’?’: { group = typeParameterDeclaration } ; Listing 7: Highlighting aspect for class declarations in Java it matches IDENTIFIER and for wildcards — the ’?’ literal. When the aspect is applied to the grammar, Grammatic attaches the group attribute to the GT nodes matched by the patterns in the aspect. The obtained annotated grammar is processed by a generator which produces code for a highlighter. Specifying pretty-printers By applying a different aspect to the same grammar (Listing 6), one can specify a pretty-printer for Java. A pretty-printer generator relies on annotations describing how tokens should be aligned by inserting whitespace between them. In Listing 8 these annotations are given in the form of attributes before and after, which specify whitespace to be inserted into corresponding positions. Values of the attributes are sequences ({{ . . . }}) of strings and name literals increaseIndent and decreaseIndent which control the current level of indentation. The most widely used values of before and after are specified in a grammar annotation by attributes defaultBefore and defaultAfter respectively, and not specified for each token individually. In Listing 8 the default formatting puts nothing before each token and a space — after each token; it applies whenever no value was set explicitly. 5 Discussion This paper aims at coping with two problems: tangled grammars and grammar duplication. When using Grammatic, a single annotated grammar is replaced by a pure context-free grammar and a set of grammatical aspects. This means that the problem of tangled grammars is successfully addressed. This also means that the grammar is written down only once even when several aspects are applied (see the previous section). But if we look at the aspects, we see that the patterns carry on some extracts from the grammar thus it is not so obvious whether our approach helps against the problem of duplication or not. Let us examine this in more details using the examples from the previous section. 11 { // Grammar annotation defaultAfter = {{ ’ ’ }}; defaultBefore = {{ ’’ }}; } classBody : ’{’ classBodyDeclaration* ’}’ @’{’: { after = {{ ’\n’ increaseIndent }} } ; @classBodyDeclaration: { after = {{ ’\n’ }} } ; @’}’: { before = {{ decreaseIndent ’\n’ }}; after = {{ ’\n’ }}; }; typeParameters : ’<’ typeParameter (’,’ typeParameter)* ’>’ @’<’: { after = {{ ’’ }} } ; @typeParameter: { after = {{ ’’ }} } ; Listing 8: Pretty-printing aspect for class declarations in Java classDeclaration : ’class’ IDENTIFIER (’extends’ type)? (’implements’ typeList)? classBody ; Listing 9: Class declaration rule in Java 1.4 From the perspective of grammar duplication, the worst case is an aspect where all the patterns are exact citations from the grammar (no wildcards are used, see Listing 8). This means that a large part of the grammar is completely duplicated by those patterns. But if we compare this with the case of conventional annotated grammars, there still is at least one advantage of using Grammatic. Consider the scenario when the grammar has to be changed. In case of conventional annotated grammars, the same changes must be performed once for each instance of the grammar and there is a risk of inconsistent changes which are not reported to the user. In Grammatic, on the other hand, a developer can control this using multiplicities: for example, check if the patterns do not match anything in the grammar and report it (since the default multiplicities require each pattern to match at least once, this will be done automatically). Thus, even in the worst case, grammatical aspects make development less error-prone. Using wildcards and subpatterns as it is done in Listing 7 (i) reduces the duplication and (ii) makes a good chance that the patterns will not need to be changed when the grammar changes. For example, consider the first annotation rule from Listing 7: this rule works properly for both Java version 1.4 and version 5 (see Listing 9 and Listing 6 respectively). The pointcut used in this rule is sustainable against renaming the symbol on the left-hand side (classDeclaration was renamed to normalClassDeclaration) and structural changes to the right-hand side (type parameters were introduced in Java 5). The only requirement is that the definition should start with the ’class’ keyword followed by the IDENTIFIER. 12 In AOP, the duplication of effort needed to modify pointcuts when the main program changes is referred to as the fragile pointcut problem [14]. Wildcards and subpatterns make pointcuts more abstract, in other words, they widen the range of join points matched by the pointcuts. From this point of view, wildcards help to abstract over the contents of the rule, and subpatterns — over the positions of particular elements within the rule. The more abstract a pointcut is, the less duplication it presents and the less fragile it is. The most abstract pointcut does not introduce any duplication and is not fragile at all. Unfortunately, it is also of no use, since it matches any possible join point. This means that eliminating the duplication completely from patterns is not technically possible. Fortunately, we do not want this: if no information about a grammar is present in an aspect, this makes it much less readable because the reader has no clue about how the annotations are connected to the grammar. Thus, there is a trade-off between the readability and duplication in grammatical aspects and a developer should keep pointcuts as abstract as it is possible without damaging readability. To summarize, our approach allows one to keep a context-free grammar completely clean by moving annotations to aspects and to avoid any unnecessary duplication by using abstract pointcuts. 6 Related work Several attribute grammar (AG) systems, namely JastAdd [5], Silver [15] and LISA [13], successfully use aspects to attach attribute evaluation productions to context-free grammar rules. AGs are a generic language for specifying computations on ASTs. They are well-suited for tasks such as specifying translators in general, which require a lot of expressive power. But the existence of more problem-oriented tools such as Pretzel [3] suggests that the generic formalism of AGs may not be the perfect tool for problems like generating pretty-printers. In fact, to specify a pretty-printer with AGs one has to produce a lot of boilerplate code for converting an AST into a string in concrete syntax. As we have shown in Section 4, Grammatic facilitates creation of such problem-oriented tools providing the syntactical means (grammatical aspects) to avoid tangled grammars and unnecessary duplication. The MPS [6] project (which lies outside the domain of textual languages since the editors in MPS work directly on ASTs) implements the approach which is very close to ours. It uses aspects attached to the concept language (which describes abstract syntax of MPS languages) to provide input data to generators. The ideas behind aspects in MPS are very close to those behind Grammatic but the implementation is very different: MPS does not use pointcuts and performs all the checking while the aspects are created. There is another approach to the problems we address: parser generators such as SableCC [2] and ANTLR [12] can work on annotation-free grammars and produce parsers that build ASTs automatically. In this way the problems induced by using annotations are avoided. The disadvantage of this approach is 13 that the ASTs must be processed manually in a general-purpose programming language, which makes the development process less formal and thus more errorprone. 7 Conclusion Annotated grammars are widely used to specify inputs for various generators which produce language support tools. In this paper we have addressed the problems of tangling and duplication in annotated grammars. Both problems affect maintainability of the grammars: tangled grammars take more effort to understand, and duplication, besides the need to make every change twice as the language evolves, may lead to inconsistent changes in different copies of the same grammar. We have introduced grammatical aspects and showed how they may be used to cope with these problems by separating context-free grammars from annotations. The primary contribution of this paper is a tool named Grammatic which implements an aspect-oriented approach to specification of annotated grammars. Grammatic provides languages for specifying grammatical pointcuts, advice and aspects. We have demonstrated how Grammatic may be used to generate a syntax highlighter and a pretty-printer by applying two different aspects to the same grammar. We have shown that the problem of tangled grammars is completely solved and all the unnecessary duplication can be eliminated. The possible negative impact of remaining duplication (necessary to keep the aspects readable) can be addressed in two ways: (i) abstract patterns reduce the amount of changes in aspects per change in the grammar, and (ii) multiplicities help to detect inconsistencies at generation time. One possible way to continue this work is to support grammar adaptation techniques [10] in Grammatic to facilitate rephrasing of syntax definitions (e.g., left factoring or encoding priorities of binary operations) to satisfy requirements of particular parsing algorithms. Another possible direction is to generalize the presented approach to support not only grammars, but also other types of declarative languages used as inputs for generators, such as UML or XSD. References [1] The Eclipse Foundation. Xtext. http://www.eclipse.org/Xtext, 2009. [2] Etienne M. Gagnon and Laurie J. Hendren. SableCC, an object-oriented compiler framework. In TOOLS ’98: Proceedings of the Technology of Object-Oriented Languages and Systems, page 140, Washington, DC, USA, 1998. IEEE Computer Society. 14 [3] Felix Gärtner. The PretzelBook. http://www.informatik.tu-darmstadt.de/BS/Gaertner/pre 1998. [4] James Gosling, Bill Joy, Guy Steele, and Gilad Bracha. The Java Language Specification, Third Edition. Addison-Wesley Longman, Amsterdam, 3 edition, June 2005. [5] Görel Hedin and Eva Magnusson. JastAdd: an aspect-oriented compiler construction system. Science of Computer Programming, 47(1):37–58, 2003. [6] JetBrains. Meta Programming http://www.jetbrains.com/mps, 2009. System (MPS). [7] Stephen C. Johnson. Yacc: Yet another compiler-compiler. Technical report, Bell Laboratories, 1979. [8] Gregor Kiczales, Erik Hilsdale, Jim Hugunin, Mik Kersten, Jeffrey Palm, and William G. Griswold. An overview of AspectJ. In ECOOP ’01: Proceedings of the 15th European Conference on Object-Oriented Programming, pages 327–353, London, UK, 2001. Springer-Verlag. [9] Donald E. Knuth. Semantics of context-free languages. Theory of Computing Systems, 2(2):127–145, June 1968. [10] Ralf Lämmel. Grammar adaptation. In José Nuno Oliveira and Pamela Zave, editors, FME, volume 2021 of Lecture Notes in Computer Science, pages 550–570. Springer, 2001. [11] Leon Moonen. Generating robust parsers using island grammars. In WCRE ’01: Proceedings of the Eighth Working Conference on Reverse Engineering (WCRE’01), page 13, Washington, DC, USA, 2001. IEEE Computer Society. [12] Terence Parr. The Definitive ANTLR Reference: Building Domain-Specific Languages. Pragmatic Programmers. Pragmatic Bookshelf, first edition, May 2007. [13] Damijan Rebernak and Marjan Mernik. A tool for compiler construction based on aspect-oriented specifications. In COMPSAC ’07: Proceedings of the 31st Annual International Computer Software and Applications Conference, pages 11–16, Washington, DC, USA, 2007. IEEE Computer Society. [14] Maximilian Störzer and Christian Koppen. PCDiff: Attacking the fragile pointcut problem. In European Interactive Workshop on Aspects in Software, Berlin, Germany, September 2004. [15] Eric Van Wyk, Derek Bodin, Jimin Gao, and Lijesh Krishnan. Silver: an extensible attribute grammar system. ENTCS, 203(2):103–116, 2008. 15
6cs.PL
THE SOFTWARE PACKAGE SpectralSequences arXiv:1610.05338v1 [math.AC] 17 Oct 2016 ADAM BOOCHER, NATHAN GRIEVE, AND ELOÍSA GRIFO Abstract. We describe the computer algebra software package SpectralSequences for the computer algebra system Macaulay2. This package implements many data types, objects and algorithms which pertain to, among other things, filtered complexes, spectral sequence pages and maps therein. We illustrate some of the syntax and capabilities of SpectralSequences by way of several examples. 1. Introduction Spectral Sequences play an important role in many areas of mathematics, including Algebraic Topology, Algebraic Geometry and Commutative Algebra. Here, we describe the software package SpectralSequences for the computer algebra system Macaulay2. This package provides tools for effective computation of the pages and differentials in spectral sequences obtained from many kinds of filtered chain complexes. We refer the reader to the package’s documentation for precise details regarding the kinds of filtered chain complexes, and the spectral sequences they determine, which we consider. Further, we mention that SpectralSequences version 1.0 is designed to run on Macaulay2 version 1.9.2 and is available at: https://github. com/Macaulay2/M2/blob/master/M2/Macaulay2/packages/SpectralSequences.m2. Spectral sequences, while often very useful, are notoriously cumbersome and difficult to compute. Indeed, as evidenced by their recursive nature, making explicit computations by hand is often impossible except when they degenerate quickly. At the same time, the mere existence of a given spectral sequence can be enough to prove many interesting and important results. Before illustrating our package, we mention that we were motivated in part by phrases in the literature, along the lines of: • “There is a spectral sequence for Koszul cohomology which abuts to zero and [provides this formula for syzygies],” [3]; • “Thus the spectral sequence degenerates . . . [and] φ is a differential from the mth page and other maps are differentials from the first page,” [1]. We also point out that, in spite of the many classes of spectral sequences which the package SpectralSequences can compute, there are still several, including some considered for instance in [3] and [1], which we would like to compute but which remain out of reach using present techniques and computational power. In writing this package, our goal was to create a solid foundation and language in Macaulay2 for working with filtered chain complexes and spectral sequences. In the class of spectral sequences we can compute, not only can we compute the modules, but we can compute all of the maps as well. We hope that this package develops further and, as it develops, more examples will be incorporated which will facilitate computations and intuition. Computation and experimentation in algebra in recent decades have led to countless conjectures, examples 1 2 BOOCHER, GRIEVE, AND GRIFO and theorems. It is our hope that this package will allow for experimentation previously not possible. As a first easy example, and also to help illustrate one aspect in developing our package, consider the simplicial complex ∆ on the vertex set {x, y, z, w}, x < y < z < w, with facet description given by ∆ := {xyz, wz}. Further, put F2 ∆ := ∆, and define simplicial subcomplexes by F1 ∆ := {xy, w} and F0 ∆ := {x, w}. By considering the reduced chain complexes of the simplicial complexes Fi ∆, over a given field k, we obtain a filtered chain complex F• C˜• : 0 = F−1 C˜• ⊆ F0 C˜• ⊆ F1 C˜• ⊆ F2 C˜• = C˜• . As it turns out, the spectral sequence E := E(F• C˜• ) determined by this filtered complex F• C˜• has the property that the map 2 2 d22,−1 : E2,−1 → E0,0 is an isomorphism of one dimensional k-vector spaces. In fact, it is not difficult to establish this fact directly by hand. On the other hand, an important first step in developing our package was for it to successfully compute the map d22,−1 as well as other similar kinds of examples. Using the package SpectralSequences, we can compute the map d22,−1 as follows: i1 : needsPackage "SpectralSequences"; A = QQ[x,y,z,w]; i3 : F2D = simplicialComplex {x*y*z, w*z}; F1D = simplicialComplex {x*y, w}; F0D = simplicialComplex {x,w}; i6 : K = filteredComplex{F2D, F1D, F0D}; E = prune spectralSequence K; i8 : E^2 .dd_{2,-1} o8 = | -1 | 1 1 o8 : Matrix QQ <--- QQ In the sections that follow, we briefly describe the structure of our package; we also illustrate it with two examples. We remark that the package documentation contains many more examples—examples which illustrate how the package can be used to compute, among other things, spectral sequences arising from filtrations of simplicial complexes, triangulations of Hopf fibrations, non-Koszul syzygies and change of rings maps. 2. The structure of the package SpectralSequences The package SpectralSequences is able, at least in principle, to compute all aspects of the spectral sequence obtained from a bounded filtered chain complex of finitely generated modules over a finite type k-algebra. The actual implementation is achieved by first defining a number of auxiliary data structures combined with constructors and other methods to work with these data types. To use the package SpectralSequences, the user must first create a filtered chain complex. Such filtered chain complexes are represented by the data type FilteredComplexes. The most basic constructor for this type has as input a collection of chain complex maps, whose images determine the given filtered chain complex. We also provide other methods for creating filtered complexes. For instance, the natural filtration induced by truncation can be inputted by the command filteredComplex. For those familiar with the filtered complexes coming from a double complex, we have implemented these in the cases of Hom(C• , C•′ ) and C• ⊗ C•′ . Finally, given such a filtered chain complex, represented as an instance of the type FilteredComplexes, THE SOFTWARE PACKAGE SpectralSequences 3 one uses a constructor associated to the type SpectralSequence to create the spectral sequence determined by the given filtered chain complex. In fact, upon initializing a new spectral sequence, using the type SpectralSequence, no calculations are actually performed by the computer. Rather, calculations are performed using a sort of “lazy evaluation”. There are a number of methods associated to the type SpectralSequence. In brief, for each of the aspects of the spectral sequence, there exists a method which takes, as input, the spectral sequence represented as an instance of the type SpectralSequence. The output of such methods are either modules, or maps between modules, depending on what is asked by the user. Finally, the package SpectralSequences contains methods which take as input a given spectral sequence represented as type SpectralSequence together with a non-negative integer and has as output the modules of the resulting spectral sequence page or the maps between such modules, depending on what is desired by the user. Such outputs are represented by respective data types SpectralSequencePage and SpectralSequencePageMap. 3. Spectral sequences and hypercohomology calculations If F is a coherent sheaf on a smooth complete toric variety X, then multigraded commutative algebra can be used to compute the cohomology groups H i (X, F ). Indeed, if B ⊆ R is the irrelevant ideal of X, then the cohomology group H i (X, F ) can be realized as the degree zero piece of the multigraded module ExtiR (B [ℓ] , F ) for sufficiently large ℓ; here B [ℓ] denotes the ℓth Frobenius power of B and F is any multigraded module whose corresponding sheaf on X is F . Given the fan of X and F , a sufficiently large power of ℓ can be determined effectively. We refer to sections 2 and 3 of [2] for more details. Here we consider the case that X = P1 × P1 and F = OC (1, 0), where C is a general divisor of type (3, 3) on X. In this setting, H 0 (C, F ) and H 1 (C, F ) are both 2-dimensional vector spaces. We can compute these cohomology groups using a spectral sequence associated to a Hom complex. We first make the multigraded coordinate ring of P1 ×P1 , the irrelevant ideal, and a sufficiently high Frobenius power of the irrelevant ideal needed for our calculations. Also the complex G below is a resolution of the irrelevant ideal. i1 : needsPackage"SpectralSequences"; i2 : R = ZZ/101[a_0..b_1, Degrees=>{2:{1,0},2:{0,1}}]; -- PP^1 x PP^1 i3 : B = intersect(ideal(a_0,a_1),ideal(b_0,b_1)); -- irrelevant ideal o3 : Ideal of R i4 : B = B_*/(x -> x^5)//ideal; -- Sufficiently high Frobenius power o4 : Ideal of R i5 : G = res image gens B; We next make the ideal, denoted by I below, of a general divisor of type (3, 3) on P1 × P1 . Also the chain complex F below is a resolution of this ideal. i6 : I = ideal random(R^1, R^{{-3,-3}}); -- ideal of C o6 : Ideal of R 4 BOOCHER, GRIEVE, AND GRIFO i7 : F = res comodule I; To use hypercohomology to compute the cohomology groups of the line bundle OC (1, 0) on C we twist the complex F above by a line of ruling and then make a filtered complex whose associated spectral sequence abuts to the desired cohomology groups. This is the complex K below. i8 : K = Hom(G , filteredComplex (F ** R^{{1,0}})); i9 : E = prune spectralSequence K; i10 : E^1 +-----------------------------------------------+---------------------------------------------+ | 1 | 1 | o10 = |R |R | | | | |{0, 0} |{1, 0} | +-----------------------------------------------+---------------------------------------------+ |cokernel {-11, 0} | a_1^5 a_0^5 0 0 | |cokernel {-8, 3} | a_1^5 a_0^5 0 0 | | | {-1, -10} | 0 0 b_1^5 b_0^5 | | {2, -7} | 0 0 b_1^5 b_0^5 | | | | | |{0, -1} |{1, -1} | +-----------------------------------------------+---------------------------------------------+ |cokernel {-11, -10} | b_1^5 b_0^5 a_1^5 a_0^5 ||cokernel {-8, -7} | b_1^5 b_0^5 a_1^5 a_0^5 || | | | |{0, -2} |{1, -2} | +-----------------------------------------------+---------------------------------------------+ o10 : SpectralSequencePage i11 : E^2; -- output is a mess The cohomology groups we want are obtained as follows. i12 : basis({0,0}, E^2_{0,0}) -- == HH^0 OO_C(1,0) o12 = {-1, 0} | a_0 a_1 | o12 : Matrix i13 : basis({0,0}, E^2_{1,-2}) -o13 = {-8, {-8, {-8, {-7, {-7, {-7, {-6, {-6, {-6, {-6, {-5, {-5, {-5, {-4, {-4, {-6, -1} -1} -1} -2} -2} -2} -3} -3} -3} -3} -4} -4} -4} -5} -5} -3} | | | | | | | | | | | | | | | | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 == HH^1 OO_C(1,0) 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 | | | | | | | | | | | | | | | | THE SOFTWARE PACKAGE SpectralSequences {-6, {-6, {-5, {-5, {-5, {-5, {-4, {-4, {-4, {-4, {-4, {-3, {-3, {-3, {-2, {-2, {-2, -3} -3} -4} -4} -4} -4} -5} -5} -5} -5} -5} -6} -6} -6} -7} -7} -7} | | | | | | | | | | | | | | | | | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 a_1^2b_0^4b_1^3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 a_1^2b_0^3b_1^4 5 | | | | | | | | | | | | | | | | | o13 : Matrix 4. Seeing cancellations in tensor product complexes We now consider an example which is similar to the ones contained in the documentation node Seeing Cancellations. Let S := k[x1 , . . . , xn ], I := hx1 , . . . , xn i2 and put R := S/I. By abuse of notation, we write xi ∈ R also for the residue class of xi ∈ S modulo I. If K• is the Koszul complex over R on the sequence (x1 , . . . , xn ) and F• is a free resolution of k over R then we can form the tensor product complex D• = F• ⊗ K• . We now describe these two filtrations and their associated spectral sequences. .. . .. . .. . .. .     .. . .. .  0 oo F0 ⊗ K4 oo F1 ⊗ K4 oo F2 ⊗ K4 oo F3 ⊗ K4 oo ··· 0 oo n k(−4)( 4 ) oo  0 oo  0 oo 0 oo 0 oo 0 oo 0 oo  F0 ⊗ K3 oo   F1 ⊗ K3 oo   F2 ⊗ K3 oo   F3 ⊗ K3 oo  F1 ⊗ K2 oo F2 ⊗ K2 oo F3 ⊗ K2 oo     F1 ⊗ K1 oo F2 ⊗ K1 oo F3 ⊗ K1 oo     F0 ⊗ K0 oo F1 ⊗ K0 oo F2 ⊗ K0 oo F3 ⊗ K0 oo     0 oo n k(−3)( 3 ) oo  0 oo ··· 0 oo k(−3)( 2 ) oo n  0 oo  F0 ⊗ K1 oo 0 oo 0 oo  F0 ⊗ K2 oo 0 oo ··· 0 oo ··· ··· 0 oo n k(−2)( 1 ) oo  0 oo (a) A double complex  0 oo  0 oo  0 oo  .. .  0 oo  0 oo  0 oo  0 oo 0 oo 0 oo     0 oo .. . k(−1)( 0 ) oo 0 oo 0 oo 0 oo     n 0 oo 0 oo 0 oo ··· ··· ··· ··· ··· 0 oo (b) ′′ E 1 has degenerated Figure 1 The filtrations ′ F• (D)• and ′′ F• (D)• : The vertical columns in Figure 1A determine a filtration, whose corresponding spectral sequence ′ E = E(′ F• (D• )) has zeroth page given by ′ 0 Ep,q = Fp ⊗ Kq and the maps ′ d0p,q : Fp ⊗ Kq → Fp ⊗ Kq−1 are induced by those of K• . Analogously, one can consider the filtration ′′ F• (D• ) determined by the horizontal maps and its spectral sequence ′′ E. 6 BOOCHER, GRIEVE, AND GRIFO E degenerates at the first page. Since F• is a resolution, the spectral sequence associated to the horizontal maps degenerates at the first page (see Figure 1b). We have ( n k(−q)( q ) if p = 0 1 ′′ ∞ ′′ E = E p,q = 0, otherwise. ′′ The second spectral sequence results in an E 1 page which will be the Koszul homology of R 1 tensored with F• . The modules are given by: ′ Ep,q = Fp ⊗HqK (R) where HqK (R) ∼ = TorSq (R, k) = L βij (R) . Since the E ∞ page consists only of k(−q)’s, eventually the qth diagonal of ′ E i j k (−j) must reduce to only terms generated in degree q. We can see this in our package SpectralSequences in any particular example. For instance, 1 if S = k[x, y] and I = (x2 , xy, y 2), then ′ Ep,q is the following complex of k-vector spaces. k ⊗ k 2 (−3) oo k 2 (−1) ⊗ k 2 (−3) oo k 4 (−2) ⊗ k 2 (−3) oo k 8 (−3) ⊗ k 2 (−3) oo ··· k ⊗ k 3 (−2) oo k 2 (−1) ⊗ k 3 (−2) oo k 4 (−2) ⊗ k 3 (−2) oo k 8 (−3) ⊗ k 3 (−2) oo ··· k ⊗ k oo k 2 (−1) ⊗ k oo k 4 (−2) ⊗ k oo k 8 (−3) ⊗ k oo ··· (a) ′ E 1 k 2 (−3) kk❱❱❱ k 3 (−2) k k 4 (−4) k 8 (−5) k 16 (−6) kk❲❲❲❲❲ jj❱❱❱❱ ❱❱❱❱ ❲❲❲❲❲ ❱❱❱❱ ❱❱❱❱ ❲❲❲❲❲ ❱❱❱❱ ❱❱❱❱ ❲❲❲❲❲ ❱❱❱❱ ❱❱❱❱ ❲❲❲❲❲ ❱❱❱❱ ❱❱❱❱ ❲❲❲❲ ❱❱❱❱ ❱ ❱ 6 12 k 24 (−5) k (−4) jj❱❱ kk❱❱❱❱ k (−3) kk❲❲❲❲❲❲ ❱ ❱ ❱❱❱❱ ❲ ❱ ❲❲❲❲❲ ❱❱❱❱ ❱❱❱❱ ❲ ❱❱❱❱ ❲❲❲❲❲ ❱❱❱❱ ❱❱❱❱ ❲❲❲❲❲ ❱❱❱❱ ❱❱❱❱ ❲❲❲❲❲ ❱ ❱❱❱ ❲ k 2 (−1) k(−2) ⊕ k 3 (−2) k 8 (−3) ··· k 2 (−3) hh❘ ··· 0 ··· k (b) ′ E 2 k 4 (−4) k 8 (−5) k 16 (−6) hh◗◗◗ ❘❘❘ ◗◗◗ ❘❘❘ ◗◗◗ ❘❘❘ ◗◗◗ ❘❘❘ ◗◗◗ ❘❘❘ ◗◗◗ ❘❘❘ ◗◗◗ ❘❘❘ 0 0 ◗◗◗ 0 ❘❘❘ ◗◗◗ ❘❘❘ ◗◗◗ ❘❘❘ ❘❘❘ ◗◗◗ ❘ ◗◗◗ k 2 (−1) k(−2) k 2 (−3) ··· . ··· ··· (c) ′ E 3 We have separated out the E ∞ terms in blue. Notice that all the remaining (black) terms must disappear at some later page. In this case, the maps from the ′ E3,0 position are both surjective, which we illustrate below: i9 : S = ZZ/101[x,y]; i10 : I = ideal(x^2,x*y,y^2); i11 : kR = coker vars R; i12 : K = (res kS)**R; R = S/I; kS = coker vars S; F = res(kR,LengthLimit=>6); i13 : E = prune spectralSequence (K ** filteredComplex F); i14 : length image ((E_2).dd_{3,0}) o14 : 6 i15 : length image (E_3).dd_{3,0} o15 : 2 THE SOFTWARE PACKAGE SpectralSequences 7 Acknowledgments Many people have worked on this package. The authors especially thank David Berlekamp, Greg Smith, and Thanh Vu for their contributions. The authors also thank Claudiu Raicu for help with his PushForward package and also Dan Grayson for answering questions. During the final portions of this work, the second author was financially supported by an AARMS postdoctoral fellowship. Finally, the first and second authors respectively thank David Eisenbud and Mike Stillman for suggesting the project to them. References [1] D. Eisenbud and F.-O. Schreyer, Betti numbers of graded modules and cohomology of vector bundles, J. Amer. Math. Soc. 22 (2009), no. 3, 859–888. [2] David Eisenbud, Mircea Mustaţǎ, and Mike Stillman, Cohomology on toric varieties and local cohomology with monomial supports, J. Symbolic Comput. 29 (2000), no. 4-5, 583–600, Symbolic computation in algebra, analysis, and geometry (Berkeley, CA, 1998). [3] M. L. Green, Koszul cohomology and the geometry of projective varieties., J. Differential Geom. 19 (1984), no. 1, 125–171. Department of Mathematics, University of Utah, Salt Lake City, UT 84112-0090, USA E-mail address: [email protected] Department of Mathematics and Statistics, University of New Brunswick, P.O. Box 4400, Fredericton, N.B., Canada, E3B 5A3 E-mail address: [email protected] Department of Mathematics, University of Virginia, Charlottesville, VA 22904-4135, USA E-mail address: [email protected]
0math.AC
REIDEMEISTER CLASSES IN LAMPLIGHTER TYPE GROUPS arXiv:1711.09371v1 [math.GR] 26 Nov 2017 EVGENIJ TROITSKY Abstract. We prove that for any automorphism φ of the restricted wreath product Z2 wrZk and Z3 wr Z2d the Reidemeister number R(φ) is infinite, i.e. these groups have the property R∞ . For Z3 wr Z2d+1 and Zp wr Zk , where p > 3 is prime, we give examples of automorphisms with finite Reidemeister numbers. So these groups do not have the property R∞ . For these groups and Zm wr Z, where m is relatively prime to 6, we prove the twisted Burnside-Frobenius theorem (TBFTf ): if R(φ) < ∞, then it is equal to the number of equivalence classes of finite-dimensional irreducible unitary representations fixed by the action [ρ] 7→ [ρ ◦ φ]. Introduction The Reidemeister number R(φ) of an automorphism φ of a (countable discrete) group G is the number of its Reidemeister or twisted conjugacy classes, i.e. the classes of the twisted conjugacy equivalence relation: g ∼ hgφ(h−1), h, g ∈ G. Denote by {g}φ the class of g. The following two interrelated problems are in the mainstream of the study of Reidemeister numbers. In [5] A.Fel’shtyn and R.Hill conjectured that R(φ) is equal to the number of fixed points b (the set of equivalence classes of of the associated homeomorphism φb of the unitary dual G irreducible unitary representations of G), if one of these numbers is finite. The action of φb on the class of a representation ρ is defined as [ρ] 7→ [ρ ◦ φ]. This conjecture is called TBFT (twisted Burnside-Frobenius theorem). This statement can be considered as a generalization to infinite groups and to the twisted case the classical Burnside-Frobenius theorem: the number of conjugacy classes of a finite group is equal to the number of equivalence classes of its irreducible representations. The TBFT conjecture (more precisely, its modification TBFTf , taking into account only finite-dimensional representations) was proved for polycyclic-byfinite groups in [9, 13]. Preliminary and related results, examples and counter-examples can be found in [5, 8, 10, 6, 26, 11, 15, 27]. Also A.Fel’shtyn and co-authors formulated the second problem (a historical overview can be found in [7]): the problem of description of the class of groups having the following R∞ property: R(φ) = ∞ for any automorphism φ : G → G. Thus, the second problem is in some sense complementary to the first one: the question about TBFT has no sense for R∞ groups (formally having a positive answer). The property R∞ was studied very intensively during the last years and was proved and disproved for many groups (see a bibliography overview in [7] and [15], and very recent papers [3, 24, 12] and the literature therein). For Jiang type spaces the property R∞ has some direct topological consequences (see e.g. 2000 Mathematics Subject Classification. 20C; 20E45; 20E22; 20E26; 20F16; 22D10. Key words and phrases. Reidemeister number, R∞ -group, twisted conjugacy class, residually finite group, restricted wreath product, lamplighter group. This work is supported by the Russian Science Foundation under grant 16-11-10018. 1 2 EVGENIJ TROITSKY [19]). Relations with group growth are discussed e.g. in [17]. Concerning applications of Reidemeister numbers in Dynamics we refer to [20, 4]. The R∞ property was studied for the lamplighter group Z2 wrZ and some its generalizations being restricted wreath products with Z in [18, 25, 24]. In particular, in [18] it was proved that most part of groups of the form Zq wr Z are not R∞ groups. More precisely, it is an R∞ group if and only if (q, 6) 6= 0. In contrast with this result, in [24] it is proved that the generalizations Γd (q) of the lamplighter group always have the R∞ property for d > 2 (for d = 2 one has Γd (q) ∼ = Zq wr Z). The groups Γd (q) admit a Cayley graph isomorphic to a Diestel-Leader graph DLd (q). The lamplighter group and its generalizations attracted a lot of attention recently, in particular due to its relations with automata groups, self-similar groups, and branch groups (see e.g. [1]). For groups under consideration in the present paper, even for k = 2, the situation is much more complicated, because Z has only one automorphism with finite Reidemeister number, namely − Id, and its square has infinite Reidemeister number, but for Z ⊕ Z we have a lot of automorphisms with finite Reidemeister numbers, and many of them have finite Reidemeister numbers for all their iterations (see, e.g. [4]). In the present paper we prove that for any automorphism φ of the restricted wreath product Z2 wr Zk (Theorem 2.3) and Z3 wr Z2d (Theorem 4.1) the Reidemeister number R(φ) is infinite, i.e. these groups have the property R∞ . For Z3 wr Z2d+1 (Theorem 4.1) and Zp wr Zk , where p > 3 is prime, (Theorem 3.5) we give examples of automorphisms with finite Reidemeister numbers. So these groups do not have the property R∞ . For these groups and Zm wr Z, where m is relatively prime to 6, we prove in Theorem 5.1 the twisted Burnside-Frobenius theorem (TBFTf ): if R(φ) < ∞, then it is equal to the number of equivalence classes of finite-dimensional irreducible unitary representations fixed by φb : ρ 7→ ρ ◦ φ. This gives (probably first) examples of finitely generated residually finite but not almost polycyclic groups (having infinitely generated subgroup, [23, p. 4]), for which the TBFT is true. Acknowledgement: The author is indebted to A. Fel’shtyn for helpful discussions in the Max-Planck Institute for Mathematics (Bonn) in February, 2017 and the MPIM for supporting this visit. The author is grateful to L. Alania, R. Jimenez Benitez, and V. Manuilov for valuable advises and suggestions. This work is supported by the Russian Science Foundation under grant 16-11-10018. 1. Preliminaries The following easy statement is well known: Proposition 1.1. Suppose, H is a φ-invariant normal subgroup of G and φ : G/H → G/H is the induced automorphism. Then φ induces an epimorphism of each Reidemeister class of φ onto some Reidemeister class of φ. In particular, one has R(φ) 6 R(φ). Denote by C(φ) the fixed point subgroup. The following much more non-trivial statement can be extracted from [16] (see also [9]): Lemma 1.2. In the above situation R(φ|H ) 6 R(φ) · |C(φ)|. REIDEMEISTER CLASSES IN LAMPLIGHTER TYPE GROUPS 3 It is well known (see [8]) the following. Lemma 1.3. For an abelian group G the Reidemeister class of the unit element is a subgroup, and the other classes are corresponding cosets. The following statement is very useful in the field. Lemma 1.4. A right shift by g ∈ G maps Reidemeister classes of φ onto Reidemeister classes of τg−1 ◦ ϕ, where τg is the inner automorphism: τg (x) = gxg −1. In particular, R(τg ◦ φ) = R(φ). Proof. Indeed, xyϕ(x−1 )g = x(yg)g −1ϕ(x−1 )g = x(yg)(τg−1 ◦ ϕ)(x−1 ).  Also we need the following statement ([14], [11, Prop. 3.4]): Lemma 1.5. Let φ : G → G be an automorphism of a finitely generated residually finite group G with R(φ) < ∞ (in particular, G can be a finitely generated abelian group). Then the subgroup of fixed elements is finite: |C(φ)| < ∞. Note, that this is not correct for infinitely generated groups, see [27]. Combining this lemma with some results of [16] one can prove: Lemma 1.6. Suppose in the situation of Lemma 1.1 that G/H is a finitely generated residually finite group. Then R(φ) < ∞ if and only if R(φ) < ∞ and R(τg φ′ ) < ∞ for any g ∈ G. 2. The case of Z2 wr Zk Let Γ := Z2 wr Zk be a restricted wreath product. In other words, α(y)(δx ) := δy+x , (Z2 )(x) ∼ Γ = ⊕x∈Zk (Z2 )(x) ⋊α Zk , = Z2 , where y ∈ Zk and δx is a unique non-trivial element of (Z2 )(x) ⊂ Γ. The direct sum supposes only finitely many non-trivial components for each element (in contrast with the direct product corresponding to the (unrestricted) wreath product). The group Γ is a finitely generated metabelian group, in particular, residually finite (see e.g. [22]). Let φ : Γ → Γ be an automorphism. We will prove that R(φ) = ∞. Denote Σ := ⊕x∈Zk (Z2 )(x) ⊂ Γ. Then Σ is a characteristic subgroup as the torsion subgroup. Denote the restriction of φ by φ′ : Σ → Σ, and the quotient automorphism by φ : Zk → Zk . If R(φ) < ∞, then R(φ) < ∞ by Proposition 1.1. Hence, by Lemma 1.5, φ has finitely many fixed elements. Thus, by Lemma 1.2, R(φ′ ) < ∞. Hence, to prove that R(φ) = ∞, it is sufficient to verify that R(φ′ ) = ∞. Since Σ is abelian, the results of e.g. [2] imply that (1) φ′ (α(g)(h)) = α(φ(g))(φ′(h)), h ∈ Σ, g ∈ Zk . Any element of Σ is a finite sum of some elements δx . Let (2) φ′ (δ0 ) = δx(1) + · · · + δx(n) . The following lemma generalizes [18, Prop. 2.1] from the case k = 1 to arbitrary k. 4 EVGENIJ TROITSKY Lemma 2.1. In (2) one has n = 1. Moreover, φ′ is a permutation of δx ’s. Proof. First of all, apply (1) to h = δ0 . We have: (3) φ′ (δg ) = φ′ (α(g)(h)) = α(φ(g))(φ′(δ0 )). Thus, for any g ∈ Zk , the element φ′ (δg ) is obtained by the appropriate shift of indexes in the right side expression in (2). Now suppose that n 6= 1, and φ′ (h) = δ0 for some h = δr(1) + · · · + δr(t) . Then t 6= 1, because the statement of the lemma for φ′ and its inverse are equivalent. Denote by T ⊂ Zk the support of φ′ (δ0 ), i.e., T = {x(1), . . . , x(n)}. Denote by T1 , . . . , Tt the supports of φ′ (δr(1) ), . . . , φ′ (δr(t) ) respectively. They are appropriate distinct shifts of T . Denote S := T1 ∪ · · · ∪ Tt (without cancellations). After cancellations in Σ (i.e. excluding of points in S covered by an even number of Tj ’s) we should obtain only one point, namely, 0. Introduce now the notion of (ε1 σ1 , ε2σ2 , . . . , εk σk )-vertex (ε1 σ1 , ε2 σ2 , . . . , εk σk )[R] ∈ R for any bounded subset R ⊂ Zk , where (σ1 , . . . , σk ) is a permutation of (1, . . . , k) and εi = ±1. We define it inductively in the following way: Rk−1 is the subset of points of R with minimal (if ε1 = −1) or maximal (if ε1 = +1) coordinate number σ1 , Rk−2 is the subset of points of Rk−1 with minimal (if ε2 = −1) or maximal (if ε2 = +1) coordinate number σ2 , and so on. Then R0 is one point. This point we define to be (ε1 σ1 , ε2 σ2 , . . . , εk σk )[R]. This point also can be considered as a lexicographic maximum of points of R for the ordering σ and the inverse direction of that coordinates, where σj = −1, i.e. a lexicographic maximum with respect to (ε1 σ1 , ε2 σ2 , . . . , εk σk ). Evidently, (ε1 σ1 , ε2 σ2 , . . . , εk σk )[Tj ] is a Zk -shift of (ε1 σ1 , ε2 σ2 , . . . , εk σk )[T ] and Tj = Ti if and only if (ε1 σ1 , ε2 σ2 , . . . , εk σk )[Tj ] = (ε1 σ1 , ε2σ2 , . . . , εk σk )[Ti ] for at least one (thus, for any) (ε1 σ1 , ε2 σ2 , . . . , εk σk ). Hence, in our situation, they are distinct. We claim that for any (ε1 σ1 , ε2 σ2 , . . . , εk σk ) the vertex (ε1 σ1 , ε2σ2 , . . . , εk σk )[S] coincides with (ε1 σ1 , ε2σ2 , . . . , εk σk )[Tj ] for one and only one j and is not covered by other points. Indeed, the uniqueness follows from the argument above. If it is covered by some point of Tj other than (ε1 σ1 , ε2 σ2 , . . . , εk σk )[Tj ], then it would be not the lexicographic maximum w.r.t. (ε1 σ1 , ε2 σ2 , . . . , εk σk ), because (ε1 σ1 , ε2 σ2 , . . . , εk σk )[Tj ] ∈ S would be greater. Thus no vertex will be canceled. Thus they all coincide with 0 and S = {0}. Hence, n = r = 1. Together with the argument at the beginning of the proof, this gives the second statement.  By this lemma, we can define x0 ∈ Zk by φ′ (δ0 ) = δx0 . Equation (3) can be written now as (4) φ′ (δy ) = δy′ , y ′ := φ(y) + x0 ∈ Zk . Lemma 2.2. If δx1 and δx2 belong to the same Reidemeister class of φ′ , then (5) t t−1 t t−1 φ (x1 ) + φ (x0 ) + · · · + φ(x0 ) + x0 = x2 or (6) φ (x2 ) + φ (x0 ) + · · · + φ(x0 ) + x0 = x1 REIDEMEISTER CLASSES IN LAMPLIGHTER TYPE GROUPS 5 for some integer t. Proof. By Lemma 1.3, the elements δx1 and δx2 belong to the same Reidemeister class of φ′ if and only if δx1 − δx2 = h − φ′ (h) for some h ∈ Σ. Representing h as h = δu(1) + · · · + δu(t) (with distinct summands) and applying (4) one has δx1 − δx2 = h − φ′ (h) = t X [δu(j) − δu(j)′ ]. j=1 This is the same in Σ as δx1 + δx2 = t X [δu(j) + δu(j)′ ]. j=1 Since all δu(j) are distinct, all δu(j)′ are distinct too, by Lemma 2.1. So the cancellation on the right can be only when δu(j) = δu(i)′ . So one of δu(j) should be equal to δx1 , one of δu(i)′ should be equal to δx2 (or vice versa), and the remaining δ’s should annihilate. Thus, after the appropriate renumbering of 1, . . . , t, we have in the first case: u(1)′ = u(2), x1 = u(1), ... u(t − 1)′ = u(t), u(t)′ = x2 , or φ(x1 ) + x0 = u(2), φ (x1 ) + φ(x0 ) + x0 = u(2)′ = u(3), 2 3 2 φ (x1 ) + φ (x0 ) + φ(x0 ) + x0 = u(3)′ = u(4), ... ... ... t t−1 φ (x1 ) + φ (x0 ) + · · · + φ(x0 ) + x0 = u(t)′ = x2 . In the second case we need to interchange x1 and x2 : t φ (x2 ) + φ t−1 (x0 ) + · · · + φ(x0 ) + x0 = x1 .  Theorem 2.3. The group Γ = Z2 wr Zk has the property R∞ . Proof. One can reduce the proof of R(φ) = ∞ to the case x0 = 0. Indeed, consider the element w := −x0 ∈ Zk ⊂ Γ and the corresponding inner automorphism τw : Γ → Γ. Then by Lemma 1.4, R(τw ◦ φ) = R(φ). On the other hand, by the definition of a semidirect product, (τw ◦ φ)′ (δ0 ) = α(w)(φ′(δ0 )) = α(−x0 )(δx0 ) = δ0 . t So, suppose x0 = 0. Then (5) and (6) take the form φ (x1 ) = x2 for some integer t. Thus, it is sufficient to prove that φ : Zk → Zk has infinitely many orbits. For this purpose denote by A ∈ GLk (Z) the matrix of φ. Let us show that each orbit intersects the first coordinate axis not more than in 2 points. Denote by (x, 0, . . . , 0) = x · e1 , n n x 6= 0, one point from the intersection, and let φ (x · e1 ) = x · φ (e1 ) = x · y · e1 be another intersection point. Since An as an element of GLk (Z) has the first column (r1 , . . . , rk ) such that gcd(r1 , . . . , rk ) = 1 (because the expansion of the determinant by the first column has the form ±1 = r1 · R1 + · · · + rk · Rk ). Thus, y = ±1 and xy = ±x.  6 EVGENIJ TROITSKY 3. The case of Zp wr Zk for p > 3 A part of argument in this section will be close to some argument of [18]. Suppose now that Γ = Zp wrZk for a general prime p. We conserve the notation Σ for the normal subgroup ⊕Zp . Now δx is a generator of a subgroup Ax isomorphic to Zp , and p · δx = 0. Suppose (7) φ′ (δ0 ) = m1 δx(1) + · · · + mn δx(n) . Then as above, (8) φ′ (δx ) = m1 δφ(x)+x(1) + · · · + mn δφ(x)+x(n) . First of all we need an analog of Lemma 2.1. In the general situation instead of the sets Tj we need (Tj , sj · m), ~ which are some shifts with multiplication of (T, m), ~ where m ~ = (m1 , . . . , mn ). Fortunately (and that is why we have restricted ourselves to the prime order case) if m ∈ Zp , m 6= 0, then it generates Zp . That is why the sum of several elements with the same Tj(1) = · · · = Tj(r) either has the same support = Tj(1) and coefficients vector (mj(1) + · · ·+ mj(r) )m, ~ or completely annihilates, when mj(1) + · · · + mj(r) = 0 mod p. So, after cancellations we may assume that all supports Tj are distinct and repeat the remaining part of the proof of Lemma 2.1 and obtain Lemma 3.1. If p is prime, one has φ′ (δ0 ) = m · δx0 for some x0 ∈ Zk and 0 6= m ∈ Zp . Let us note, that generally m 6= 1 in this situation. For example, in Z3 one can take s = m = 2 and sm = 4 = 1 mod 3. For other elements we have (9) φ′ (δx ) = mδφ(x)+x0 . To calculate R(φ′ ) we need to calculate the index of the image of (1 − φ′ )Σ in Σ. Suppose first that x0 = 0, φ′ (δx ) = mδφ(x) . Then for any x we have (1 − φ′ )-invariant subgroup (10) · · · ⊕ Aφ−1 (x) ⊕ Ax ⊕ Aφ(x) ⊕ Aφ2 (x) ⊕ · · · . In contrast with the case k = 1 considered in [18], the corresponding orbit of φ can be infinite or finite, but not necessary of length 2. Let us note that since τg φ = φ, they have the same orbit structure. Lemma 3.2. If an orbit is infinite, then the corresponding restriction of 1 − φ′ on the subgroup (10) is not an epimorphism. Proof. Indeed, under the appropriate description, 1 − φ′ : (. . . , 0, 0, a1, a2 , . . . , ar , 0, 0, . . . ) 7→ (. . . , 0, −ma1 , a1 − ma2 , a2 − ma3 , . . . , ar , 0, 0, . . . ) If a1 6= 0 and ar 6= 0, then −ma1 6= 0 and the length of non-trivial part increases. Thus, elements concentrated in one summand, e.g. δx , are not in the image.  REIDEMEISTER CLASSES IN LAMPLIGHTER TYPE GROUPS If the orbit is finite of length s, the matrix  1 0  −m 1   0 −m  (11) E −M = 0  0  .  .. 0 ··· 7 of (1 − φ′ ) has the form  ··· 0 −m 0 0    1 0 ..  ..  . −m 1 .   .. .. .. . . . 0  · · · 0 −m 1 and is an epimorphism if and only if its determinant is not zero (for prime p): (12) det(E − M) = 1 − ms 6≡ 0 mod p. Lemma 3.3. For a non-trivial orbit of φ : Zk → Zk , there exist infinitely many orbits of the same cardinality (finite or infinite). If R(φ) < ∞ there is a unique trivial orbit. Proof. Let (r1 , . . . , rk ) 6= 0 be a point of the orbit. Since φ as an element of GL(Z, k) preserves gcd(r1 , . . . , rk ), the elements (i · r1 , . . . , i · rk ), i ∈ Z, i > 2, belong to distinct orbits of the same cardinality. If there is a non-zero fixed point x∗ of φ′ , then there is an infinite series {s · x∗ }, s ∈ Z, of  fixed points. By Lemma 1.5 this contradicts to R(φ) < ∞. Lemma 3.4. If φ has an infinite orbit, R(φ′ ) = ∞ and R(φ) = ∞. If φ has only finite orbits, there are two possibilities: 1) R(φ′ ) = R(φ) = ∞. This occurs if, at least for one orbit, the corresponding restriction of 1 − φ′ is not an epimorphism. 2) R(φ′ ) = 1. This occurs if, for all orbits, the corresponding restriction of 1 − φ′ is an epimorphism. If we have one of this cases for φ′ , then the same is true for all τg ◦ φ′ . Proof. Let us note that τg = τg′ : Σ → Σ if g −1g ′ ∈ Σ, so all automorphisms τg ◦ φ′ : Σ → Σ are described by g ∈ Zk . In this case τg ◦ φ′ = α(g) ◦ φ′ and the sizes of above invariant groups are the same as for φ′ . As it was explained above all possible automorphisms φ′ corresponding to a given φ = τg ◦ φ are completely defined by m and x0 such that φ′ (δ0 ) = m · δx0 , and each pair (m, x0 ) defines some φ′ and φ. The relation τy0 ◦ φ′ (δ0 ) = α(y0 ) ◦ φ′ (δ0 ) = m · δy0 +x0 shows that all automorphisms of Σ with the same m differ from each other by an appropriate τy0 and vice versa. Hence, if φ has an infinite orbit and we take for φ, some g ∈ Zk such that τg ◦ φ′ (δ0 ) = m · δ0 , then there exists an appropriate invariant subgroup of φ′ (over this orbit) with a non-epimorphic restriction of 1 − τg ◦ φ′ (Lemma 3.2). Since we have infinitely many such orbits (Lemma 3.3) then R(φ′ ) = ∞ and R(φ) = ∞. Now we will describe the matrix form of restrictions onto invariant subgroups of an arbitrary φ′ (i.e. not necessary x0 = 0) for the case of finite orbits of φ. Suppose, s−1 φ′ (δ0 ) = mδ(x0 ), s is the length of the orbit x1 , φ(x1 ), . . . , φ (x1 ), t is the length of the 8 EVGENIJ TROITSKY orbit x0 , φ(x0 ), . . . , φ t−1 (x0 ), we have φ′ (δx1 ) = α(φ(x1 ))φ′ (δ0 ) = m · δφ(x1 )+x0 , φ′ (δφ(x1 )+x0 ) = α(φ(φ(x1 ) + x0 ))φ′ (δ0 ) = m · δφ2 (x1 )+φ(x0 )+x0 , 2 φ′ (δφ2 (x1 )+φ(x0 )+x0 ) = α(φ(φ (x1 ) + φ(x0 ) + x0 ))φ′ (δ0 ) = m · δφ3 (x1 )+φ2 (x0 )+φ(x0 )+x0 , . . . In order to estimate the length r of the underlying orbit (13) 2 3 2 x1 7→ φ(x1 ) + x0 7→ φ (x1 ) + φ(x0 ) + x0 7→ φ (x1 ) + φ (x0 ) + φ(x0 ) + x0 7→ · · · remark that (14) y := φ t−1 (x0 ) + φ t−2 (x0 ) + · · · + x0 = 0. Indeed, t φ(y) − y = φ (x0 ) − x0 = 0. Hence, if y 6= 0, we have a non-trivial fixed point for φ. This contradicts R(φ) < ∞ (as in the proof of Lemma 3.3). Equality (14) and the definition of s imply (15) r x1 = φ (x1 ) + φ r−1 (x0 ) + · · · + φ(x0 ) + x0 , where r = lcm(s, t). Suppose now that φ does not have infinite orbits. Then the length of any orbit is bounded by lcm(l1 , . . . , lk ), where li is the length of the orbit of the element ei of the standard base. More precisely, any orbit length is a divisor of lcm(l1 , . . . , lk ). In particular, for any s and t, as above, r = lcm(t, s) is a divisor of lcm(l1 , . . . , lk ). Hence, by (15) the length r ′ of (13) is some divisor of r and so of lcm(l1 , . . . , lk ). If the underlying orbit (13) does not start from the point x1 = 0, one can obtain infinitely many underlying orbits by multiplying x1 by different positive integers j = 1, 2,. More precisely, some of them can coincide, but for a sufficiently large j, the point jx1 will not be an element of the orbit (13), etc. So, there is infinitely many distinct orbits. Moreover, we can find a sufficiently large J such that for any j > J, the distances between jx1 and t−1 φ(j · x1 ) = j · φ(x1 ) are more than x0 , φ(x0 ) + x0 , . . . φ (x0 ) + · · · + φ(x0 ) + x0 . Evidently, for these orbits the length r ′ = r (not only a divisor of r). So among the orbits starting in x1 , 2x1 , . . . , we have infinitely many orbits of length r and some finite number < J of orbits of some length dividing r. Then the Reidemeister number of the restriction on the subgroup over the union of these orbits is finite if and only if 1 − mr 6≡ 0 mod p. But then for any divisor r ′ of r we have, for r ′′ := r/r ′ , ′ ′ ′ ′ 1 − mr = (1 − mr )(1 + mr + m2r + · · · + mr −1 ) 6≡ 0 ′ mod p. Hence, 1 − mr 6≡ 0 mod p. Thus, 1 − φ′ is an epimorphism over the orbits from the above finite series too. In particular, for the “initial” orbit (13). It remains to discuss the case of x1 = 0. In this case the length of the orbit is t. Considering some x1 6= 0 with the length of φ-orbit equal to some s 6= 0 we arrive as above to 1 − mr 6≡ 0 mod p, where r = lcm(s, t). Since t divides r = lcm(s, t), we obtain 1 − mt 6≡ 0 mod p similarly to the case of r ′ above. Thus 1 − φ′ is an epimorphism over this orbit too. Hence, it is an epimorphism in entire Σ. As it was explained in the beginning of the proof, to vary φ′ is the same as to consider various τg ◦ φ′ for a fixed φ′ . This completes the proof.  REIDEMEISTER CLASSES IN LAMPLIGHTER TYPE GROUPS 9 Theorem 3.5. If p > 3, we can find an authomorphism with finite Reidemeister number. Thus, Zp wr Zk does not have the property R∞ if p > 3. Proof. For p > 3 consider φ = − Id. Then R(φ) = 2k and all non-trivial orbits are of length 2. Define φ′ by x0 = 0 and some non-zero m ∈ Zp , satisfying 1 − m2 6≡ 0 mod p. Take e.g. m = 2 (cf. [18, p. 879]). Then 1 − m2 = −3 6≡ 0 mod p for any prime p > 3.  The intermediate case of p = 3 will be studied in the next section and the answer will depend on parity of k. 4. The case of Z3 wr Zk Theorem 4.1. The group Γ = Z3 wr Zk has the property R∞ for odd k and does not have the property R∞ for even k. Proof. By Lemma 3.2, R(φ) may be finite only if all orbits of φ are finite. First, note that in this case m can be equal to 1 or 2. If m = 1, then 1 − ms ≡ 0 mod 3 not depending on the length s of the corresponding orbit. Keeping in mind the argument from the previous section, in particular, Lemma 3.3, we obtain R(φ) = ∞. If m = 2, then 1 − mr ≡ 0 mod 3 for even r and 1 − ms 6≡ 0 mod 3 for odd r. Denote by M ∈ GL(k, Z) the matrix of φ. Since all orbits are finite, in particular, the orbits of the elements of the standard base, we have M r = E for some r ∈ Z, r > 1 (see the previous section for more detail). If k = 2d + 1, then det(M − λE) = 0 has at least one real solution λ0 . It must be a root of 1 of degree r. Thus, λ0 = ±1. If λ0 = 1, then det(E − M) = 0 and R(φ) = ∞. If λ0 = −1, then r is even, and φ has an orbit of even length s = 2m. Let t be the length of the φ-orbit of x0 , where φ′ (δ0 ) = δx0 . Then, as in the proof of Lemma 3.4, we can detect infinitely many orbits of length r = lcm(s, t). Since r is even, the restriction of 1 − φ′ on the subgroup, related the underlying orbit of the form (13) is not an epimorphism. Since there is infinitely many such orbits, R(φ′ ) = ∞. Then  R(φ) = ∞,  as above. 0 1 If k = 2, consider M to be the generator of a subgroup in GL(2, Z) iso−1 −1 morphic to Z3 (see, e.g. [21, p. 179]). For this M, R(φ) = det(E − M) = 3. It has only orbits of length 3 (except of the trivial one). The same is true for M · · ⊕ M} in Z2d | ⊕ ·{z d with R(φ) = 3d . Then the lengths of all underlying orbits are some powers of 3 (except maybe of the trivial one) and 1 − φ′ is an epimorphism (for φ defined by this φ, m = 2, and arbitrary x0 ). As in the previous section, this means that all τg ◦ φ′ have R(τg ◦ φ′ ) = 1 and  R(φ) = R(φ) < ∞. Remark 4.2. If k = 1, in particular, is odd, we obtain the R∞ property for Z3 wr Z. This is a particular case of [18]. 5. Twisted Burnside-Frobenius theorem Theorem 5.1. Suppose, Γ is Zm wr Z, where m is relatively prime to 6, or Zp wr Zk for a prime p > 3 and an arbitrary k, or Z3 wr Z2d . Then the twisted Burnside-Frobenius theorem is true for Γ. 10 EVGENIJ TROITSKY Proof. In all these cases for φ with R(φ) < ∞, we have R(τg ◦ φ′ ) = 1 (for prime cases this is proved in Lemma 3.4, for Zm wr Z a similar statement can be easily extracted from the proof of Theorem 2.3 in [18]). Evidently, {h}φ′ ⊂ {h}φ , h ∈ Σ. Thus, R(φ′ ) = 1 implies that only one Reidemeister class of φ is mapped onto the class {e}φ . By Lemma 1.4 R(τg ◦ φ′ ) = 1 implies the same for other classes {g}φ . Thus, π : Zp wr Zk → Zk induces a bijection of Reidemeister classes, or, speaking geometrically, the Reidemeister classes of φ are cylinders over Reidemeister classes b because the TBFT is true for an automorphism of φ. Then R = R(φ) = R(φ) = # Fix(φ), of a finitely generated Abelian group (see [4]). If ρ1 , . . . , ρR are these representations, then b ρ1 ◦π, . . . , ρR ◦π are some pairwise non-equivalent φ-fixed representations of Γ. Then R(φ) 6 b # Fix(φ). The opposite inequality is always true ([9, The proof of Theorem 5.2]). An alternative argument is to see that, since the classes are cylinders, the dimension of the space of shifts of indicator functions of Reidemeister classes of φ is the same as for φ, and in particular, is finite. Then the TBFTf follows from Lemma 3.8 of [9].  References [1] Laurent Bartholdi, Markus Neuhauser, and Wolfgang Woess. Horocyclic products of trees. J. Eur. Math. Soc. (JEMS) 10, No. 3, 771–816, 2008. [2] M. J. Curran. Automorphisms of semidirect products. Math. Proc. R. Ir. Acad. 108, No. 2, 205–210, 2008. [3] Karel Dekimpe and Daciberg Gonçalves. The R∞ property for abelian groups. Topol. Methods Nonlinear Anal. 46, No. 2, 773–784, 2015. [4] A. Fel’shtyn. Dynamical zeta functions, Nielsen theory and Reidemeister torsion. Mem. Amer. Math. Soc. 147, No. 699, xii+146, 2000. [5] A. Fel’shtyn and R. Hill. The Reidemeister zeta function with applications to Nielsen theory and a connection with Reidemeister torsion. K-Theory 8, No. 4, 367–393, 1994. [6] A. Fel’shtyn, F. Indukaev, and E. Troitsky. Twisted Burnside theorem for two-step torsion-free nilpotent groups. In C*-algebras and elliptic theory. II, Trends in Math., pages 87–101. Birkhäuser, 2008. [7] A. Fel’shtyn, Yu. Leonov, and E. Troitsky. Twisted conjugacy classes in saturated weakly branch groups. Geometriae Dedicata 134, 61–73, 2008. [8] A. Fel’shtyn and E. Troitsky. A twisted Burnside theorem for countable groups and Reidemeister numbers. In C. Consani and M. Marcolli, editors, Noncommutative Geometry and Number Theory, pages 141–154. Vieweg, Braunschweig, 2006. [9] A. Fel′ shtyn and E. Troitsky. Twisted Burnside-Frobenius theory for discrete groups. J. Reine Angew. Math. 613, 193–210, 2007. [10] A. Fel’shtyn, E. Troitsky, and A. Vershik. Twisted Burnside theorem for type II1 groups: an example. Math. Res. Lett. 13, No. 5, 719–728, 2006. [11] Alexander Fel’shtyn, Nikita Luchnikov, and Evgenij Troitsky. Twisted inner representations. Russian Journal of Mathematical Physics 22, No. 3, 301–306, 2015. [12] Alexander Fel’shtyn and Timur Nasybullov. The R∞ and S∞ properties for linear algebraic groups. J. Group Theory 19, No. 5, 901–921, 2016. [13] Alexander Fel′ shtyn and Evgenij Troitsky. Geometry of Reidemeister classes and twisted Burnside theorem. J. K-Theory 2, No. 3, 463–506, 2008. [14] Alexander Fel’shtyn and Evgenij Troitsky. Twisted conjugacy classes in residually finite groups. Arxiv e-print 1204.3175, 2012. [15] Alexander Fel’shtyn and Evgenij Troitsky. Aspects of the property R∞ . J. Group Theory 18, No. 6, 1021–1034, 2015. [16] D. Gonçalves. The coincidence Reidemeister classes on nilmanifolds and nilpotent fibrations. Topology and Its Appl. 83, 169–186, 1998. REIDEMEISTER CLASSES IN LAMPLIGHTER TYPE GROUPS 11 [17] D. Gonçalves and P. Wong. Twisted conjugacy classes in exponential growth groups. Bull. London Math. Soc. 35, No. 2, 261–268, 2003. [18] Daciberg Gonçalves and Peter Wong. Twisted conjugacy classes in wreath products. Internat. J. Algebra Comput. 16, No. 5, 875–886, 2006. [19] Daciberg Gonçalves and Peter Wong. Twisted conjugacy classes in nilpotent groups. J. Reine Angew. Math. 633, 11–27, 2009. [20] B. Jiang. Lectures on Nielsen Fixed Point Theory, volume 14 of Contemp. Math. Amer. Math. Soc., Providence, RI, 1983. [21] Morris Newman. Integral matrices. Academic Press, New York-London, 1972. Pure and Applied Mathematics, Vol. 45. [22] Derek J. S. Robinson. A course in the theory of groups, volume 80 of Graduate Texts in Mathematics. Springer-Verlag, New York, second edition, 1996. [23] Daniel Segal. Polycyclic groups. Number 82 in Cambridge Tracts in Mathematics. Cambridge University Press, Cambridge, 1983. [24] Melanie Stein, Jennifer Taback, and Peter Wong. Automorphisms of higher rank lamplighter groups. Internat. J. Algebra Comput. 25, No. 8, 1275–1299, 2015. [25] Jennifer Taback and Peter Wong. The geometry of twisted conjugacy classes in wreath products. In Geometry, rigidity, and group actions, Chicago Lectures in Math., pages 561–587. Univ. Chicago Press, Chicago, IL, 2011. (arXiv:0805.1372). [26] E. Troitsky. Noncommutative Riesz theorem and weak Burnside type theorem on twisted conjugacy. Funct. Anal. Pril. 40, No. 2, 44–54, 2006. In Russian, English translation: Funct. Anal. Appl. 40 (2006), No. 2, 117–125. [27] Evgenij Troitsky. Two examples related to the twisted Burnside-Frobenius theory for infinitely generated groups. Fundam. Appl. Math. 21, No. 5, 231–239, 2016. (in Russian, English translation in Journal of Mathematical Sciences (New York) to appear, preprint version http://www.mpim-bonn.mpg.de/preblob/5689). Dept. of Mech. and Math., Moscow State University, 119991 GSP-1 Moscow, Russia E-mail address: [email protected] URL: http://mech.math.msu.su/~troitsky
4math.GR
Point Neurons with Conductance-Based Synapses in the Neural Engineering Framework arXiv:1710.07659v1 [q-bio.NC] 20 Oct 2017 Andreas Stöckel, Aaron R. Voelker, and Chris Eliasmith Centre for Theoretical Neuroscience, University of Waterloo October 24, 2017 Abstract The mathematical model underlying the Neural Engineering Framework (NEF) expresses neuronal input as a linear combination of synaptic currents. However, in biology, synapses are not perfect current sources and are thus nonlinear. Detailed synapse models are based on channel conductances instead of currents, which require independent handling of excitatory and inhibitory synapses. This, in particular, significantly affects the influence of inhibitory signals on the neuronal dynamics. In this technical report we first summarize the relevant portions of the NEF and conductance-based synapse models. We then discuss a naïve translation between populations of LIF neurons with current- and conductance-based synapses based on an estimation of an average membrane potential. Experiments show that this simple approach works relatively well for feed-forward communication channels, yet performance degrades for NEF networks describing more complex dynamics, such as integration. 1 Introduction As a central assumption, the Neural Engineering Framework (NEF, [1]) relies on linear interaction of pre-synaptic activity in the form of synaptic currents injected into the neuron membrane. This assumption is readily fulfilled by current-based synapse models. Biological synapses however are not perfect current sources. Instead, currents injected into the cell membrane are caused by changes in receptor channel conductance directly or indirectly gated by neurotransmitters released in the pre-synapse. Consequently, current flow into the membrane is modulated both by pre-synaptic spikes, as well as—due to the nature of ion channels—the difference between the neuron membrane potential and the 1 specific ion species reversal potential. This nonlinear interdependence is modelled by conductance-based synapse models [2, 3].1 For various reasons, conductance-based synapses are a useful addition to the NEF. Foremost, when modelling functional, biologically plausible neural networks, more realistic synapse models pose additional constraints on the network design and reduce degrees of freedom. For example, conductance-based synapses strictly differentiate between excitatory and inhibitory synapses, allowing the network designer to map their parameters to those derived from neurophysiological evidence. Furthermore, some neuromorphic hardware systems (e.g. Spikey, BrainScaleS; [5, 6]) exclusively implement conductancebased synapses, which must be taken into account when assembling networks for these platforms. Finally, nonlinear synaptic interaction has been argued to be an important element of biological neural networks, and as a site for biological computation [2]. Exploiting these nonlinearities in the NEF increases the computational power per neuron. In the future, conductance-based synapses may thus be utilized to increase the efficiency of certain mathematical operations such as multiplication, requiring fewer neurons at the same precision. The remainder of this report is structured as follows: section 2 gives a short overview of the relevant equations in the NEF. Section 3 summarizes the biological background of conductance-based synapses and describes the underlying theoretical model. Section 4 elaborates on the actual integration of conductance-based synapses into the NEF and provides an equation highly similar to the original NEF formalism, yet containing additional, voltage-dependent scaling factors. Section 5 provides estimations for these factors based on the expected value for the average membrane potential. Section 7 presents two benchmark experiments, followed by concluding remarks in section 8. 2 Current sources in the Neural Engineering Framework The NEF is a systematic approach to the representation of low-dimensional vectors in populations of spiking neurons and the approximation of arbitrary functions in the connections between these populations [1]. As an example, consider two populations of n spiking neurons with all-to-all connectivity from the first (pre-synaptic) to the second (post-synaptic) population. Let ~ x (t ) be the value represented by the pre-synaptic population, and ~ y (t ) the value represented by the post-synaptic population. Given a function f , the NEF allows us to compute connection weights w i j such that the resulting activity in the post-population represents ~ y (t ) ≈ f (~ x (t )). 1 Not to be confused with conductance-based neuron models, such as the Hodgkin-Huxley model of action potential generation [4, 2]. 2 The formalism underlying the NEF assumes that each neuron j receives its input in the form of a current J (t ) injected into its (virtual) neuron membrane.2 This current is the sum of a constant bias current J bias , and a synaptic current J syn (t ). The latter is calculated from a weighted sum of filtered input spike events: spikes produced by the i th pre-synaptic neuron are modelled as a sum of Dirac pulses a i (t ), and a filter h(t 0 ) defines the shape of the post-synaptic current in response to a single input spike: J (t ) = J bias + J syn (t ) = J bias + n X i =1 w i j (a i ∗ h)(t ) . (1) Central to the NEF is the idea of factorizing the connection weight matrix W into e j , where w i j = gain factors α j , decoding vectors d~i , and unit-length encoding vectors ~ α j 〈~ e j , d~i 〉. Correspondingly, eq. (1) can be written as J (t ) = J bias + J syn (t ) = J bias + α j ~ e Tj ³X n i =1 ´ d~i (a i ∗ h)(t ) . (2) The decoders d~i linearly project the high-dimensional activity of the pre-synaptic population onto the desired low-dimensional representation ~ y (t ) = f (~ x (t )). Multiplication with unit-length encoders ~ e j corresponds to a projection of this low-dimensional representation onto the preferred direction of each post-synaptic neuron j . Correspondingly, the transformed value is again represented as a high-dimensional population coding, allowing to chain an arbitrary number of neuron populations and transformations. As a side-effect, factorization of the weight matrix W into decoders and encoders simplifies the calculation of w i j . Instead of optimizing weights w i j individually, we can randomly select bias currents J bias , gain factors α j , and encoders ~ e j , and calculate j decoders d~j from a least squares linear regression ¡ ¢−1 Y = D A ⇒ D ≈ Y A T A A T + I σ2 , (3) where the matrix D is composed of the decoding vectors, A is a matrix of neuron responses in the post-synaptic population for a set of sample points, and Y is a matrix of the desired function outputs for these points. The expression I σ2 is a regularization term which accounts for uncertainty and noise in the neuron response. Crucially, the above equations contain the implicit assumption that the input current J (t )—and in turn the effect of each individual input spike—is independent of the neuron state at time t . Furthermore, all input spikes are treated equally (except for the scaling factor w i j ), and there is no distinction between excitatory and inhibitory synapses. Having 2 Note that J (t ) (as well as other currents and conductances) should be read with a subscript j in mind – all equations, unless explicitly stated otherwise, refer to the j th neuron in the post-synaptic population. 3 gL J syn (t ) J bias Cm v(t ) EL Figure 1: Equivalent circuit diagram of a LIF neuron with current-based synapses (subthreshold behaviour; without spike generation/reset mechanism). synaptic currents which are independent of the neuron state, is commonly referred to as using “current-based synapses” [2, 7]. The subthreshold circuit diagram of a LIF neuron with current-based synapses is depicted in fig. 1. The dynamical system describing this circuit is3 Cm dv(t ) = g L (E L − v(t )) + J bias + J syn (t ) , dt (4) which has a stable attractor (the equilibrium potential E eq ) at E eq (t ) = J bias + J syn (t ) + EL . gL (5) The synaptic current J syn (t ) drives the membrane potential v(t ) towards more positive values for input spikes received at excitatory synapses (w i j > 0) and towards more negative values for spikes received at inhibitory synapses (w i j < 0). Importantly, the equilibrium potential E eq in eq. (5) can be driven to arbitrary values if the input currents J are large enough. In practice this is not an issue for positive J , as the maximum membrane potential is limited by the neuron threshold potential v th . However, such a natural limitation does not exist for negative currents, and the NEF puts no constraint on the negative current strength, for neither J bias , nor J syn . A solution to this problem is to modify the LIF model, such that the membrane potential is clamped to a minimum value4 , i.e., the reset potential v reset . Note that all experiments in this report are based on LIF neurons with such a minimum membrane potential. This problem does not occur for conductance-based synapses. Conductance-based synapses are not only biologically motivated, but eliminate the physically implausible, 3 The ratio between the membrane capacitance and the leak channel conductance is the membrane time constant τRC = C m /g L . 4 This is for example implemented in the LIF neuron model in the software neuron simulator included in Nengo, the reference software implementation of the NEF. 4 (-) v (+) v (-) + + + + - - - - + + + + + - - - - 220 mosm (a) Membrane without K+ -channel - 10 mmol K+ 100 mmol Na+ 110 mmol Cl- 10 mmol K+ 100 mmol Na+ 110 mmol Cl- + K+ Na+ ClA- + + + + - - - 100 mmol 10 mmol 10 mmol 100 mmol Osmotic/electrical forces + + + + + + - - - - 100 mmol K+ 10 mmol Na+ 10 mmol Cl100 mmol A+ (+) K+ channel (b) Added K+ -channel Figure 2: Illustration of the ion channel reversal potential caused by equalling osmotic and electric forces. Although the intra- and extracellular fluids are electrically neutral (a), an open, selectively permeable ion channel causes a change in the membrane potential (b). Illustration adapted from [8]. See [2, 9] for more details. perfect current sources altogether. Unfortunately, and what will be the focus of the remainder of this report, conductance-based synapses introduce a dependency between the neuron membrane potential v(t ), and the injected current J syn (t ). As a result, the post synaptic currents (PSCs) of pre-synaptic spikes no longer combine linearly. Consider two excitatory input spikes which do not trigger an action potential at the receiving neuron. Due to the increased membrane potential v(t ), the PSC induced by the second spike is smaller than the PSC induced by the first spike. Furthermore, conductance-based synapses require excitatory and inhibitory synapses to be handled differently. Both issues are not accounted for in the standard NEF eqs. (1) and (2). 3 Conductance-based synapses In biology, changes in the neuron membrane potential are primarily caused by variations in the permeability—or conductance—of selective ion channels embedded into the lipid bilayer cell membrane [2, 9]. As depicted in fig. 2a, ions are dissolved in different concentrations in the intra- and extracellular fluid. Ion channels provide a way for a specific ion species to follow the osmotic concentration gradient, which in turn causes a charge imbalance and an electrical force countering the osmotic force (fig. 2b). The charge imbalance itself is measurable as a change in the membrane potential v(t ). Once a certain membrane potential is reached, the osmotic and electric forces cancel and the ion flow stops. Further increase/decrease of v(t ) reverses the ion flow through a particular 5 gL g Na+ (t ) g K+ (t ) Cm EEL Na+ v(t ) E K+ Figure 3: Equivalent circuit diagram of a LIF neuron with conductance-based synapses (without spike generation/reset mechanism), see also [2]. channel, giving rise to the name reversal potential for this particular v(t ).5 The exact value of the reversal potential differs between ion channel types. For example, in mammalian + cells, the reversal potential for a sodium channel is E Na ≈ 67 mV, while for potassium the reversal potential is E K+ ≈ −83 mV. In the resting state, the membrane is slightly permeable for a mixture of ions, resulting in an equilibrium potential6 of E L ≈ −65 mV [3, 10]. An equivalent circuit diagram of a cell membrane popularized by Hodgkin and Hux- ley [4] (though in the context of action potential generation, and not synaptic input) with leak, sodium and potassium channel is shown in fig. 3. Post-synaptic currents can be modeled as a change of permeabilies in the Na+ and K+ ion channel.7 For example, excitatory input spikes could cause the sodium channels to be open for a certain period of time, driving the membrane potential towards E Na+ . Conversely, inhibitory input spikes might cause potassium channels to open, driving the membrane potential towards E K+ . In the following, we refer to E Na+ as E E (the excitatory reversal potential) and to E K+ as E I (the inhibitory reversal potential). The dynamics for conductance-based synapses in response to incoming spikes a(t ) can be described with a linear filter h(t 0 ), where the channel conductance g (t ) is g (t ) = (a ∗ h)(t ). Possible filters include simple exponential filters, the alpha function, or the difference of exponentials [7]. Of course, in biology, channel dynamics involve the release of a neurotransmitter, diffusion of the transmitter through the synaptic cleft, and a chemical cascade causing ion channels to open as soon as the transmitter reaches the post-synaptic neuron. More detailed models of these highly nonlinear processes exist [7]. Nevertheless, in the remainder of this report we 5 Since ion diffusion is a stochastic process, ions will always diffuse in and out of the cell as long as the channel is open. The above claims holds for the average ion flow only. 6 To clarify the difference between reversal and equilibrium potential: the reversal potential is the potential at which the flow of a single ion species reverses direction, the equilibrium potential is the potential at which the sum of all currents is zero. 7 In biology, a large number of channels are embedded into the neuron cell membrane. Individual ion channels are either fully open or fully closed, following a stochastic process. The conductance g (t ) can be interpreted as the probability of individual channels to be open. 6 assume the synaptic dynamics to be describable as a linear filter, and in particular focus on normalized exponential low-pass filters with time constant τsyn where h(t ) =   1 τsyn exp(−t /τsyn ) t ≥ 0 0 t <0 , and ´ n X dg (t ) 1 ³ w i j a i (t ) . =− g (t ) + dt τsyn i =1 Note that while the synaptic dynamics are linear with respect to the input, the post synaptic current is not (see section 2). The differential equation describing a LIF point neuron with conductance-based channels is Cm dv(t ) = g L · (E L − v(t )) + g E (t ) · (E E − v(t )) + g I (t ) · (E I − v(t )) . dt (6) The equilibrium potential E eq (t ) for this model is a weighted average of the individual reversal potentials E eq (t ) = g L · E L + g E (t ) · E E + g I (t ) · E I . g L + g E (t ) + g I (t ) (7) This implies that—in contrast to current-based models, which, as noted at the end of the previous section, can provide arbitrarily large input—the membrane potential can never be driven to values outside the voltage range spanned by E L , E E , and E I , or, in biological terms, the ion channel reversal potentials. 4 Conductance-based synapses in the NEF One of the initial challenges when implementing conductance-based synapses in the NEF is the different handling of excitatory and inhibitory synapses. Spikes arriving at excitatory synapses will influence the excitatory ion channel conductance, whereas spikes arriving at inhibitory synapses influence the inhibitory ion channel conductance. This issue is virtually nonexistent when adhering to Dale’s Principle [11]. Each prepopulation of neurons will either project with excitatory or inhibitory connections to the post-population, and influence one of the two channel types only. In the general case, the weight matrix W (section 2) can be split into two non-negative matrices W + and W − . The matrix W + contains positive, excitatory weights, whereas W − contains negative, inhibitory weights with all other weights set to zero: w i+j = max{0, w i j } , w i−j = max{0, −w i j } . 7 This non-negative decomposition of W unfortunately ruins the factorization into encoders and decoders employed by the NEF. For two reasons, this is not a real issue. First, decomposition happens after encoders and decoders have already been computed, maintaining the entire NEF pipeline. Second, to increase the computational efficiency during simulation, artificial decoder and encoder matrices E ± , D ± can be calculated, e.g., by performing a singular value decomposition of W + and W − : ~ ± = U [k] , E W ± = U SV , ~ ± = V [k] · S[k] . D Here, k is the number of non-zero eigenvalues or, alternatively, eigenvalues above a certain threshold, and M [k] refers to the first k columns in the matrix M . Under most circumstances, this factorization yields little to no error, since the weight matrix W is an outer product and thus of low rank. Usually, k is equal to the number of dimensions represented by the population plus one (caused by clamping the weights). As mentioned in the previous section, the channel conductance time-dynamics g E (t ) and g I (t ) can be modeled as a linear filter of the input spike trains. Essentially, we can just reuse the post-synaptic current filter h(t ) from eq. (1) and apply it to the individual channel conductances instead. Assuming (as in section 2 and without loss of generality) that all synapses have the same synaptic filter h(t ), the conductances g E (t ) and g I (t ) for the j th neuron are g E (t ) = n X i =1 w i+j · (a i ∗ h)(t ) , g I (t ) = n X i =1 w i−j · (a i ∗ h)(t ) . (8) As per eq. (6) the synaptic current J syn (t ) injected into a single neuron j with conductancebased synapses is J syn (t ) = g E (t ) · (E E − v(t )) + g I (t ) · (E I − v(t )) . (9) Combing eqs. (8) and (9) yields J syn (t ) = n ³ X i =1 ´ w i+j · (E E − v(t )) + w i−j · (E I − v(t )) · (a i ∗ h)(t ) . (10) This equation is almost equivalent to eq. (1), except for the dynamic scaling factors αE (t ) = E E (t ) − v(t ) and αI (t ) = E I − v(t ). For biologically plausible neuron parameters v(t ) ¿ E E , so one might argue that αE (t ) is almost constant. However, for E I , the difference between the reset or resting potential—if any—is just a few millivolts, causing a strong interdependence between the inhibitory current and v(t ) [7]. These potential deviations for inhibitory synapses are supported by the experiments 8 λI = 1000 s−1 λI = 600 s−1 λI = 800 s−1 λI = 400 s−1 λI = 200 s−1 a cond λI = 0 s−1 a cur 400 350 Output rate [s−1 ] 300 250 200 150 100 50 0 0 200 400 600 Excitatory rate λE [s−1 ] 800 1000 (a) Response curves λI = 1000 s−1 λI = 600 s−1 Output rate difference a cond − a cur [s−1 ] λI = 800 s−1 λI = 400 s−1 λI = 200 s−1 λI = 0 s−1 0 −20 −40 −60 −80 0 200 400 600 Excitatory rate λE [s−1 ] 800 1000 (b) Response curve difference Figure 4: Neuron response curves a cur (λE ), a cond (λE ) of a LIF neuron with current-based or conductance-based synapses under varying inhibitory bias currents J bias . The excitatory input spike train is Poisson-distributed with rate λE over 10 s. Lines represent the mean over a thousand trials, shaded areas the standard deviation. 9 λI = 1000 s−1 λI = 600 s−1 λI = 800 s−1 λI = 400 s−1 λI = 200 s−1 a cond λI = 0 s−1 a cur 400 350 Output rate [s−1 ] 300 250 200 150 100 50 0 0 200 400 600 Excitatory rate λE [s−1 ] 800 1000 (a) Response curve λI = 1000 s−1 λI = 600 s−1 Output rate difference a cond − a cur [s−1 ] λI = 800 s−1 λI = 400 s−1 λI = 200 s−1 λI = 0 s−1 0 −20 −40 −60 −80 0 200 400 600 Excitatory rate λE [s−1 ] 800 1000 (b) Response curve difference Figure 5: Neuron response curves a cur (λE ), a cond (λE ) of a LIF neuron with current-based or conductance-based synapses for an input spike train arriving at an inhibitory synapse. Both, the excitatory and the inhibitory input spike trains are Poisson-distributed with rates λE , λI over 10 s. Lines represent the mean over a thousand trials, shaded areas the standard deviation. 10 J bias = −30.0 nA J bias = −18.0 nA Average membrane current 〈J (t )〉 [nA] J bias = −24.0 nA J bias = −12.0 nA J bias = −6.0 nA J cond J cur J bias = 0.0 nA 30 20 10 0 −10 −20 −30 0 200 400 600 Excitatory rate λE [s−1 ] 800 1000 (a) Average membrane current for inhibitory J bias λI = 1000 s−1 Average membrane current 〈J (t )〉 [nA] λI = 800 s−1 λI = 600 s−1 λI = 400 s−1 λI = 200 s−1 λI = 0 s−1 J cond J cur 30 20 10 0 −10 −20 −30 0 200 400 600 Excitatory rate λE [s−1 ] 800 1000 (b) Average membrane current for inhibitory input spikes. Figure 6: Average membrane current J of a LIF neuron with conductance-based synapses for an input spike train arriving at an inhibitory synapse. Both, the excitatory and the inhibitory input spike trains are Poisson-distributed with rates λE , λI over 10 s. Lines represent the mean over a thousand trials, shaded areas the standard deviation. 11 Table 1: Neuron and synapse parameters used throughout this report unless specified otherwise. “Normalized values” refers to the scaled LIF model commonly used in neuron simulators such as Nengo. Parameters for the conductance-based synapses are scaled according to the linear transition model in section 5, eq. (11). Synaptic filters are assumed to be normalized to unit area – whenever this is not the case divide the synaptic weights by τsyn for the denormalized values. Neuron and synapse parameters Neuron parameters Parameter Value Membrane capacitance Membrane time constant Leak conductivity Resting potential Reset potential Threshold potential Refractory period CM τRC gL EL v reset v th τref 1.00 20.00 50.00 −65.00 −65.00 50.00 2.00 Normalized value nF ms nS mV mV mV ms 1.00 20.00 50.00 0.00 0.00 1.00 2.00 ms s−1 ms Current-based synapses Parameter Synaptic time constant Excitatory weight Inhibitory weight Value τsyn w+ w− 5.00 35.00 −35.00 Normalized value ms pA pA 5.00 2.33 −2.33 ms 10−9 10−9 Conductance-based synapses Parameter Synaptic time constant Excitatory reversal potential Inhibitory reversal potential Excitatory weight Inhibitory weight Value τsyn EE EI w+ w− 5.00 0.00 −80.00 0.61 1.56 Normalized value ms mV mV nS nS 5.00 4.33 −1.00 40.60 103.70 ms 10−9 10−9 presented in figs. 4 and 5. In each individual experiment, a single LIF neuron with either current or conductance-based synapses is simulated (see table 1). Parameters for the conductance-based synapses are matched to the current-based synapses with the linear transition model discussed in section 5, eq. (11), so the neuron should behave similarly in both cases. The neuron receives an excitatory input spike train with Poisson statistics and rate λE . In fig. 4 an inhibitory bias current J bias is injected into the neuron, whereas in fig. 5 the neuron receives spikes at an inhibitory synapse with rate λI . The inhibitory currents/rates were matched such that the average neuron rate surpasses zero for approximately the same excitatory input (the x-intercepts are in similar locations). Strikingly, for excitatory input only (J bias = 0, λI = 0), there are only minor deviations between the neuron response curves. For an inhibitory J bias , the neuron with conductance-based synapses has a slightly smaller output rate than the neuron with current-based synapses, 12 though this difference converges to zero for high output rates. However, if the inhibitory bias current is replaced by an inhibitory synaptic input, the deviations from the neuron with current-based synapses are much stronger: the output rate is significantly reduced in the presence of inhibitory synaptic input, especially for large input spike rates. Figure 6 shows the average current flowing into the membrane in the above experiments. For constant inhibitory bias current, the current increases almost linearly with the excitatory spike rate, whereas inhibitory spikes cause a saturation of the input current. This non-linearity is likely caused by inhibitory spikes injecting a larger negative current in the presence of excitatory input due to the increased average membrane potential. 5 Average membrane potential estimation There are at least two possible approaches regarding the integration of conductance-based synapses into the NEF. A “natural” approach would be to measure the actual neuron response curves A as required for the calculation of decoders in eq. (3). However, the neuron response is no longer defined in terms of a current J but as a two-dimensional function of g E and g I , which slightly complicates matters, and is not the focus of this report. Alternatively, we can try to transform a network of neurons with current-based synapses into networks of neurons with conductance-based synapses. Again, this assumes that the switch to conductance-based synapses does not have a strong effect on the neuronal dynamics. For this approach, we calculate weights W as if the network was still using current-based synapses, but rescale the decomposed W + , W − linearly to account for αE (t ) and αI (t ). Instead of treating these factors as functions time, we estimate expected values 〈αE (t )〉t and 〈αI (t )〉t . This can be achieved by replacing v(t ) with 〈v(t )〉t . Clearly, a “one size fits all” average membrane potential does not exist. However, in the NEF neurons are often in either a mode of (semi) regular spiking or a do not spike at all for longer periods of time. A naïve estimate for 〈v(t )〉t in the spiking mode is to assume a linear transition be- tween v reset and v th . In this case, the average membrane potential is 〈v(t )〉t = v reset + v th . 2 (Linear transition) (11) However, the membrane potential transition for a neuron is not linear. The force driving the membrane potential towards E L gets larger with higher v(t ), whereas the force driving towards E E gets smaller (for conductance-based neurons). Correspondingly, and as illustrated in fig. 7, v(t ) progresses more slowly through high voltage regimes, causing the actual 〈v(t )〉t to be larger than the prediction made by the linear model. 13 Membrane potential v(t ) [mV] Conductance based Current based Linear transition −50 −52 −54 −56 −58 −60 −62 −64 −66 0 1 2 3 4 5 6 7 8 0 Time to spike t [ms] 5 10 15 20 25 Time to spike t [ms] Figure 7: Idealized membrane potential traces. Comparison of the membrane potential transition from v reset = −65 mV to v th = −50 mV for a LIF neuron with conductance-based synapses, a LIF neuron with current-based synapses, and a simple linear model. The left and right graphs show different transition times (9 ms and 27 ms). Conductances/currents were assumed to be constant. Dotted lines show the average for each of the three models. Under the assumption of fast enough regular input spikes we can derive a better approximation for the expected value. For high input rates g E (t ) and g I (t ) are approximately constant. Specifically, for an infinite input spike train a(t ) with constant inter-spike interval ∆t and a normalized exponential low pass filter h(t 0 ) with time constant τ, it holds (see appendix A for the derivation) 〈g (t )〉t = 〈(a ∗ h)(t )〉t = 1 . ∆t For constant conductance, eq. (6) can be written as Cm dv(t ) = g L · (e L − v(t )) + g E · (e E − v(t )) + g I · (e I − v(t )) + J bias dt = −v(t ) · (g L + g E + g I ) + g L e L + g E e E + g I e I + J bias , which is brought into a fairly general form by substituting λ= gL + gE + gI , Cm µ= e L g L + e E g E + e I g I + J bias . Cm 14 The closed-form solution for an initial value of v(0) = v 0 is dv(t ) = −λv(t ) + µ , dt ³ µ ´ −λt µ v(t ) = v 0 − ·e + . λ λ If the synaptic current suffices to generate output spikes, the time-to-spike t th after which the threshold potential v th is reached is given as à µ! v th − λ 1 t th = − log µ . λ v0 − λ (12) The average membrane potential in the period between two spikes can now be calculated by setting v 0 = v reset , integrating over the above equation, and dividing by t th : 1 〈v(t )〉t = t th t th Z 0 v(t ) dt = µ v0 − λ ³ λt th ´ µ 1 − e −λtth + λ For g E → ∞ the expected value 〈v(t )〉t is 〈v(t )〉t = log ³ E E −v th E E −E L log ´ ³ · E E − E L + v th ´ . E E −v th E E −E L (Conductance-based) (13) Explicitly, these calculations do not include the refractory period τref . The LIF neuron model assumes all currents flowing into the cell membrane to be zero during the refractory state. As a consequence, conductance-based synapses do not change the behavior of the model during the refractory period, so the average membrane potential calculation should be independent of τref . To give a sense for the difference between the two estimates discussed so far: for the neuron parameters listed in table 1 the linear transition model eq. (11) estimates an average value of −57.5 mV, whereas the conductance-based transition model estimates a slightly higher value of −57.17 mV for an infinitely strong excitatory input. Figure 8 shows numerical measurements of the average membrane potential for the experimental setup presented in the previous section. For a constant bias current J bias and no inhibitory spikes, the membrane potential converges to the estimate from eq. (13) as λE increases. In the presence of inhibitory input spikes, 〈v(t )〉t is consistently larger than in the J bias experiment and reaches values clearly above the estimate. Unintuitively, and despite output-rate deviations being higher (figs. 4 and 5), the mean error between the estimated average membrane potential and the numerically measured value is consistently smaller when using inhibitory spikes instead of a bias current J bias . This is especially true for high λI in comparison to high J bias (i.e. 5.5 mV RMSE for λI = 1000 s−1 , 6.5 mV RMSE for J bias = −30 nA). Consequently, it might be worthwhile to investigate the effect of not 15 J bias = −30.0 nA J bias = −12.0 nA Numerical J bias = −18.0 nA J bias = 0.0 nA Linear estimate J bias = −6.0 nA Estimate Average membrane potential 〈v(t )〉 [mV] J bias = −24.0 nA −54 −56 −58 −60 −62 −64 0 200 400 600 Excitatory rate λE [s−1 ] 800 1000 (a) Inhibitory J bias λI = 1000 s−1 λI = 800 s−1 λI = 600 s−1 λI = 400 s−1 Numerical λI = 0 s−1 Linear estimate λI = 200 s−1 Estimate Average membrane potential 〈v(t )〉 [mV] −52 −54 −56 −58 −60 −62 −64 0 200 400 600 Excitatory rate λE [s−1 ] 800 1000 (b) Inhibitory input spikes Figure 8: Estimate and measured average membrane potentials for varying excitatory spike rates λE and either a constant bias current J bias or an inhibitory spike train with rate λI . Lines represent the mean over a thousand trials, shaded areas the standard deviation. 16 using an external current source J bias in the NEF altogether without negatively affecting the variety of tuning curves. The next section contains a simple technique achieving exactly this by decoding J bias from the pre-population. 6 Elimination of the bias current As pointed out in eq. (2), the NEF generally defines the current injected into the membrane J (t ) of a neuron j as J (t ) = J bias + J syn (t ). For a population of n neurons, this can be written in matrix notation ~ J (t ) = ~ J bias + diag(~ α) · E D · (~ a ∗ h)(t ) = ~ J bias + W · (~ a ∗ h)(t ) , where ~ α are n-dimensional vectors, E is the n × d encoding matrix (d being the J bias and ~ dimensionality of the vector represented by the population), D is d × m decoding matrix a ∗h)(t ) is the (m being the size of the pre-population), W is the n ×m weight matrix, and (~ filtered, m dimensional activity of the pre-population. We can approximate this equation as ¡ ¢ ~ J (t ) ≈ D 0 + diag(~ α) · E D · (~ a ∗ h)(t ) = W 0 · (~ a ∗ h)(t ) , where D 0 is a n ×m matrix decoding the vector ~ J bias from the pre-population. Analogously to the L 2 approximation in eq. (3), we can approximate D 0 as ¡ bias ¢ ¡ ¢−1 , Y0= ~ J , . . . ,~ J bias = D 0 A ⇒ D 0 = Y 0 A T A A T + I σ2 {z } | m times where Y 0 is the n × N dimensional target matrix (with N being the number of evaluation points), and A the n × N neuron response matrix. Using the adapted weight matrix W 0 = D 0 + W instead of J bias should not significantly alter the behaviour of the system. As discussed in section 4, we can split W 0 into excitatory weights W 0+ and inhibitory weights W 0− for use with conductance-based synapses. 7 Benchmark experiments In this section we present two benchmark networks: a feed-forward communication channel, and an integrator. The first network tests how well one can decode a function from a conductance-based synapse population with respect to pure feed-forward processing and a constant stream of input. The second network assess how well dynamical systems are realized. We then analyze a potential cause of unexpected behaviour in the recurrent 17 network by empirically measuring neuron tuning curves. Communication channel experiments The communication channel experiment consists of a chain of ` neuron ensembles with one hundred neurons each. All connections compute the identity function. The input to the system is a bandwidth limited white noise signal. As a benchmark measure, we compare the decoded output of the last ensemble in the chain to the input value. The experiment is executed for standard LIF neurons, LIF neurons with conductance-based synapses and eliminated J bias (see section 6), as well as LIF neurons with conductance-based synapses and active J bias . Results are shown in fig. 9. As is clearly visible, there is no significant difference in error for the three neuron types for short communication channels. Notably however, across all experiments, currentbased synapses are always best for inputs with low bandwidth, and using J bias in conjunction with conductance-based synapses increases the error. Apart from this, conductancebased synapses are rather competitive compared to current-based synapses, and as the bandwidth increases, the error is mostly dominated by the baseline error obtained when filtering the input signal with the synaptic filter. Interestingly, current-based synapses are only better in high bandwidth scenarios when increasing the communication channel length to eight. At least the error caused by J bias can be explained with the observations laid out in section 5. Specifically, the average membrane potential deviates from the estimated values for a large input spike rate range. Integrator experiments In the integrator experiment, a standard NEF integrator with 100 ms synaptic time constant for the recurrent connection is tested. A value x ∈ [0, 1] is fed into the integrator for one second, theoretically causing the integrator to converge to x. The simulation is continued for nine seconds and the difference between x and the actual value is recorded. Figure 10 shows the results over varying integrator neuron counts. For standard current-based synapses, the error is relatively small and converges to zero with increasing neuron count. The integrator with conductance-based synapses exhibits much larger errors. The error does not significantly decrease with increasing neuron count and is significantly higher when not eliminating J bias . When recording the integrator value trace over time, the integrator often converges to significantly larger than desired values. This is shown in fig. 10b, which depicts the average final integrator value. While the integrator with current-based synapses on average converges to the value 0.5, as expected when sampling uniformly from the interval [0, 1], the integrator with conductance-based synapses converges to significantly larger values. 18 Cur. Cond. (with J bias ) Cond. Ref. 0.4 RMSE 0.3 0.2 0.1 0.0 10 20 30 Input bandwidth [Hz] 40 50 40 50 40 50 (a) n = 2 0.4 RMSE 0.3 0.2 0.1 0.0 10 20 30 Input bandwidth [Hz] (b) n = 4 0.4 RMSE 0.3 0.2 0.1 0.0 10 20 30 Input bandwidth [Hz] (c) n = 8 Figure 9: Communication channel benchmark. A bandwidth limited white noise signal is fed into a series of neuron ensembles (where the number of ensembles n is the “communication channel length”), with a synaptic time constant of 5 ms for all connections. The graphs show the RMSE between input and output signal averaged over 16 runs. The dashed line depicts the baseline error obtained when filtering the input n times with the synaptic filter. 19 Cur. Cond. Cond. (with J bias ) 0.5 RMSE 0.4 0.3 0.2 0.1 0.0 102 103 Number of neurons (a) Integration error (b) Average integrator value Figure 10: Results for the integrator benchmark. (a) Shows the average integrator representation error over 24 runs in which the integrator is driven to values in the interval [0, 1]. Error bars correspond to the standard deviation. (b) Shows the average value that the integrator converges to over all 24 runs. The dashed line depicts the expected value of 0.5. Empirical tuning curve measurment Figure 11a shows empirically measured tuning curves for a LIF population with either current or conductance-based synapses. Tuning curves are measured by feeding a bandwidth limited (5 Hz) white noise signal x(t ) into a standard current-based LIF ensemble with 1000 neurons connected to the target population with 100 neurons. The neural activities a(x(t )) are recorded, and the inverse mapping x(a) is calculated. The measured tuning curves are similar, however, as shown in fig. 11b, they mainly differ for low output rates—the output rates of conductance-based neurons systematically are too small. When simulating dynamical systems such as an 20 Current based 400 Conductance based 350 Output rate s−1 300 250 200 150 100 50 0 −1.0 −0.5 0.0 0.5 1.0 Input value x −1.0 0.0 −0.5 0.5 1.0 Input value x (a) Tuning curves 10 1 Cond. vs. ground truth Cond. vs. cur. Cur. vs. ground truth RMSE 100 10−1 10−2 0 50 100 150 200 Output rate s 250 300 350 −1 (b) Error over output rate Figure 11: Tuning curve experiment results. (a) Empirically measured tuning curves for both current and conductance-based synapses. (b) RMSE between the tuning curves for varying output rate regimes. Ground truth refers to the non-spiking LIF firing rate model. In the “cond. vs. cur.” graph, the empirical measurements for the current-based model are used as a reference. integrator, the imbalance caused be the later spike onset (which prevents both excitation and inhibition) may be a reason for the systematic tendency to over-estimate the integral of the signal. 21 Summary In the feed-forward case, the simplistic transformation presented in section 4 allows neuron ensembles with conductance-based synapses to function as well as their current-based counterparts, given that J bias is eliminated from the neuron model (as outlined in section 6). For mostly unknown reasons, the performance of the conductancebased synapses breaks down once recurrent networks are implemented. This may be caused by delayed spike onset in the tuning curves not accounted for when computing decoders. 8 Conclusion In this report, we described both the NEF and LIF neurons with conductance-based synapses. We presented a simple transformation translating existing current-based NEF networks into their conductance-based counterparts. A sequence of benchmark experiments shows that this transformation yields relatively little error for feed-forward networks. However, when implementing dynamics such as integrators there are systematic deviations from the desired behaviour. Experiments show that the neuron tuning curves differ significantly between neurons with current-based synapses and the transformed conductance-based version. They exhibit a delayed spike onset, which is a potential explanation for the observed deviations in recurrent networks. Unfortunately, this problem can likely not be solved with a simple transformation of pre-computed weight matrices. Instead, the two-dimensional neuron response curve of a neuron with excitatory and inhibitory conductance-based synapses must be taken into account. While the neuron response curve can be described analytically for constant, noiseless input, the non-negativity of weight matrices W + and W − mandates an iterative optimization scheme. Preliminary research indicates that these methods are feasible, yet computationally more expensive than standard NEF solvers, especially because the entire weight matrix W is optimized and not the significantly smaller and reusable decoder D. References [1] Chris Eliasmith and Charles H. Anderson. Neural Engineering: Computation, Representation, and Dynamics in Neurobiological Systems. Cambridge, Massachusetts: MIT press, 2003. 380 pp. [2] Christof Koch. Biophysics of Computation: Information Processing in Single Neurons. Oxford, United Kingdom: Oxford University Press, 1999. 562 pp. [3] Wulfram Gerstner and Werner M. Kistler. Spiking Neuron Models: Single Neurons, Populations, Plasticity. LCCB: 2002067657. Cambridge University Press, 2002. 22 [4] Alan L. Hodgkin and Andrew F. Huxley. “A Quantitative Description of Membrane Current and Its Application to Conduction and Excitation in Nerve”. In: The Journal of Physiology 117.4 (1952), pp. 500–544. [5] J. Schemmel et al. “A Wafer-Scale Neuromorphic Hardware System for Large-Scale Neural Modeling”. In: Proceedings of 2010 IEEE International Symposium on Circuits and Systems. May 2010, pp. 1947–1950. [6] Thomas Pfeil et al. “Six Networks on a Universal Neuromorphic Computing Substrate”. In: Frontiers in Neuroscience 7 (2013), p. 11. [7] Arnd Roth and Mark C. W. van Rossum. “Modeling Synapses”. In: Computational Modeling Methods for Neuroscientists. Ed. by Erik De Schutter. The MIT Press, 2009, pp. 139–159. [8] Heinrich Reichert. Neurobiologie. 2., neubearb. und erw. Aufl. Stuttgart [u.a.]: Thieme, 2000. VII, 250 S. : Ill., graph. Darst. [9] E. Kandel et al. Principles of Neural Science. 5th ed. McGraw-Hill Education, 2012. [10] Wulfram Gerstner et al. Neuronal Dynamics: From Single Neurons to Networks and Models of Cognition. Cambridge University Press, 2014. [11] Christopher Parisien, Charles H. Anderson, and Chris Eliasmith. “Solving the Problem of Negative Synaptic Weights in Cortical Models”. In: Neural Computation 20 (2008), pp. 1473–1494. 23 Filtered value 12 13 10 12 8 11 6 10 4 9 2 8 0 7 0 1 2 3 4 5 4.70 4.75 4.80 4.85 4.90 4.95 5.00 Time [s] Time [s] Figure 12: Example of a low-pass filtered regular spike train. In this example, individual input spikes are ∆t = 0.1 apart. The filter time constant is τ = 0.3. The right graph is a magnification of the left one. Dotted lines correspond to ĥ and ĥ − τ−1 , the dashed line to the final average ∆t −1 = 10. A Expected value of a filtered, regularly spaced spike train Claim Given an infinite spike train with regular spacing a(t ) = 1 τ normalized exponential low-pass filter h(t ) = · e 〈h ∗ a〉 = lim Z t t →∞ 0 −t /τ it holds P∞ i =0 δ(t − ∆t · i ) and a (h ∗ a)(t 0 ) 0 1 dt = . t ∆t Proof This directly follows from linear systems theory and the unit-gain of the exponential low-pass. Alternatively, the supremum ĥ of h ∗ a can be expressed in terms of a geometric series ∆t ∞ ∆t·` 1 1 X eτ ĥ = sup(h ∗ a) = · e − τ = · ∆t . τ `=0 τ e τ −1 Correspondingly, and as illustrated in fig. 12, after a finite amount of time the filtered spike train approximately oscillates between ĥ and ĥ−τ−1 every ∆t. The function between these two points is an infinite sum of exponentials, which itself is an exponential g (t ) = a · e −bt , ! ! with g (0) = ĥ and g (∆t) = ĥ − τ−1 . Solving for a, b yields a = ĥ and b = τ−1 . The average of g (t ) over [0, ∆t) is ∆t Z ∆t t 1 eτ · ∆t · e − τ dt ∆t · τ e τ − 1 0 0 ∆t ∆t ∆t ³ ´ 1 1 eτ eτ e τ −1 1 − ∆t τ = · ∆t · 1−e = · ∆t · = .  ∆t ∆t e τ − 1 ∆t e τ − 1 ∆t eτ 〈h ∗ a〉 = 〈g (t )〉 = 1 · ∆t Z ∆t g (t ) dt = 24
2cs.AI
arXiv:1202.0923v2 [math.GR] 5 Jan 2016 Low-dimensional free and linear representations of Out(F3) Dawid Kielak1 University of Bonn [email protected] January 2, 2018 Abstract. We study homomorphisms from Out(F3 ) to Out(F5 ), and GLm (K) for m 6 6, where K is a field of characteristic other than 2 or 3. We conclude that all K-linear representations of dimension at most 6 of Out(F3 ) factor through GL3 (Z), and that all homomorphisms Out(F3 ) → Out(F5 ) have finite image. 1 Introduction This paper constitutes a part of a project of understanding homomorphisms Out(Fn ) → GLm (K) and Out(Fn ) → Out(Fm ), i.e. the K-linear representation theory and the free representation theory of Out(Fn ) respectively (see [13]). The first problem, as well as linear representations of Aut(Fn ), has been studied for example by Potapchik–Rapinchuk [15] and Grunewald–Lubotzky [9]; the latter has been addressed for example by Khramtsov [12], Bogopolski–Puga [3], Bridson–Vogtmann [5, 6], and Aramayona–Leininger–Souto [1]. The results obtained so far have a tendency of working only for large n; in particular the case of Out(F3 ) has not been studied extensively. It was known (thanks to a result of Khramtsov [12]) that there are no embeddings Out(F3 ) ֒→ Out(F4 ) It was also known that there is an embedding Out(F3 ) ֒→ Out(F55 ) (this is due to Bogopolski–Puga [3]). Our attempt to expand the understanding of free representations of Out(F3 ) follows the same general route as our proof in [13]. First we investigate the linear representation theory of Out(F3 ), and we prove 1 The author was supported by the EPSRC of the United Kingdom 1 Theorem 3.19. Let φ be a K-linear, six-dimensional representation of Out(F3 ), where K is a field of characteristic other than 2 or 3. Then φ factors as φ / GL6 (K) Out(F3 ) ❑❑❑ O ❑❑❑π ❑❑❑ ❑% GL3 (Z) where π is the natural projection Out(F3 ) → Out(H1 (F3 , Z)) ∼ = GL3 (Z). It is worth noting here that Turchin–Willwacher [16] constructed a 7-dimensional Q-linear representation of Out(F3 ) which does not factor through π. Thus our result completes the search for the smallest dimension in which such a representation occurs (at least for fields of characteristic zero). The second part of this paper deals with the action of two finite subgroups of Out(F3 ) on graphs of rank 5. This was also our strategy in [13], yet the situation here is quite different. The finite groups under consideration do not contain (comparatively) large simple groups, as is the case in the higher rank case; on the other hand, the groups are of order 48, and hence are rather tangible. Our considerations yield Theorem 4.10. Suppose φ : Out(F3 ) → Out(F5 ) is a homomorphism. Then the image of φ is finite. The general question of finding the smallest m > 3 such that there is a homomorphism Out(F3 ) → Out(Fm ) that is injective, or at least has infinite image, remains open. Acknowledgements. The author wishes to thank Martin R. Bridson for all his help. 2 Notation and preliminaries Let us first establish some conventions and definitions. Definition 2.1. We say that X is a graph if and only if it is a 1-dimensional CW complex. The closed 1-cells of X will be called edges, the 0-cells will be called vertices. The sets of vertices and edges of a graph will be denoted by V (X) and E(X) respectively. The points of intersection of an edge with the vertex set are referred to as endpoints of the edge. We will equip X with the standard path metric in which the length of each edge is 1. Given two graphs X and Y , a function f : X → Y is a morphism of graphs if and only if f is a continuous map sending V (X) to V (Y ), and sending each open edge in X either to a vertex in Y or isometrically onto an open edge in Y . Note that a morphism can invert edges. When we say that a group G acts on a graph X, we mean that it acts by graph morphisms. We say that a graph X is directed if and only if it comes equipped with a map o : E(X) → X such that o(e) is a point on the interior of e of distance 31 from one of its endpoints. We also define ι, τ : E(X) → V (X) by setting τ (e) 2 to be the endpoint of e closest to o(e), and ι(e) to be the endpoint of e farthest from o(e). Note that we allow ι(e) = τ (e). The rank of a connected graph is defined to be the size of a minimal generating set of its fundamental group (which is a free group). Let us also define two families of graphs. Definition 2.2. The graph with one vertex and n edges will be referred to as the n-rose. The graph with two vertices and n edges, such that each edge has two distinct endpoints, will be referred to as the n-cage. Notation 2.3. Let G be a group. We will adopt the following notation: • for two elements g, h ∈ G, we define g h = h−1 gh; • for two elements g, h ∈ G, we define [g, h] = ghg −1 h−1 ; We will also use Zk to denote the cyclic group of order k. Definition 2.4. Let us introduce the following notation for elements of Aut(Fn ), the automorphism group of Fn , where Fn is the free group on {a1 , . . . , an }:    ai 7→ aj , ai 7→ a−1 , i aj 7→ ai , ǫi : σij : aj 7→ aj , j 6= i  ak 7→ ak , k 6∈ {i, j}   ai 7→ ai aj , ai 7→ aj ai , ρij : λij : ak 7→ ak , k 6= i ak 7→ ak , k 6= i Let us also define ∆ = Qn i=1 ǫi σi(n+1) and  ai : aj 7→ a−1 i , 7→ aj a−1 i , j 6= i Below we give an explicit presentation of Out(Fn ), the outer automorphism group of Fn : Theorem 2.5 (Gersten’s presentation [8]). Suppose n > 3. The group Out(Fn ) is generated by {ǫ1 , ρij , λij | i, j = 1, . . . , n, i 6= j}, with relations • [ρij , ρkl ] = [λij , λkl ] = 1 for k 6∈ {i, j}, l 6= i; • [λij , ρkl ] = 1 for k 6= j, l 6= i; −1 −1 −1 −1 • [ρ−1 = [ρij , λ−1 = ρ−1 ij , ρjk ] = [ρij , λjk ] = [ρij , ρjk ] jk ] ik for k 6∈ {i, j}; −1 −1 −1 −1 • [λ−1 = [λij , ρ−1 = λ−1 ij , λjk ] = [λij , ρjk ] = [λij , λjk ] jk ] ik for k 6∈ {i, j}; −1 −1 4 • ρij ρ−1 ji λij = λij λji ρij , (ρij ρji λij ) = 1; • [ǫ1 , ρij ] = [ǫ1 , λij ] = 1 for i, j 6= 1; ǫ1 −1 • ρǫ121 = λ−1 12 , ρ21 = ρ21 ; • ǫ21 = 1; 3 • Q i6=j ρij λ−1 ij = 1 for each fixed j. Note the action of Aut(Fn ) on Fn and Out(Fn ) on the conjugacy classes of Fn is on the left. Definition 2.6. Let us define some finite subgroups of Out(Fn ): Sn Sn+1 ∼ Wn Zn2 ⋊ Sn = Z2 × Sn+1 ∼ = Gn ∼ = ∼ = h{σij | i, j = 1, . . . , n, i 6= j}i = h{σij | i, j = 1, . . . , n + 1, i 6= j}i h{ǫ1 , σij | i, j = 1 . . . , n, i 6= j}i = h{∆, σij | i, j = 1 . . . , n + 1, i 6= j}i We do not give distinctive names to the first two (symmetric) groups; instead, we will usually refer to them as respectively Sn < Wn and Sn+1 < Gn . More generally, whenever we mention Sn or Sn+1 as subgroups of Out(Fn ), we mean these two groups. In the case of Out(F3 ), define V4 and A4 to be the Klein 4-group and the alternating group of degree 4 satisfying V4 < A4 < S4 < G3 < Out(F3 ). Note that we abuse notation by also using Sn to denote the abstract symmetric group of degree n, and An < Sn to denote its maximal alternating subgroup. Note that, if i, j 6 n, we have −1 ǫi σij = λij λji ρij = ρij ρ−1 ji λij and ǫ1 σi(n+1) = Y ρji = j6=i Y λji j6=i and the subgroup Sn < Out(Fn ) defined above acts on the sets {ǫi | i = 1 . . . , n}, {ρij | i, j = 1 . . . , n, i 6= j}, and {λij | i, j = 1 . . . , n, i = 6 j} by permuting the indices in the natural way. 3 Representations of Out(F3) in dimensions five and six Before we start investigating 5- and 6-dimensional representations of Out(F3 ), let us first prove the following. Proposition 3.1. Suppose φ : Out(F3 ) → G is a group homomorphism such that its kernel contains V4 . Then φ factors as φ : Out(F3 ) → Z2 → G and the map is determined by the image of ǫ1 . 4 Proof. Since V4 lies in the kernel, we have φ(σ14 ) = φ(σ23 ). Hence ǫ1 σ14 φ(ρ21 ) = φ(ρρ2121 ρ31 ) = φ(ρ21 ) = φ(ρ21 )φ(ǫ1 )φ(σ23 ) = φ(ρ−1 31 ) and so Now φ(ǫ3 ) φ(ρ21 ) = φ(ρǫ213 ) = φ(ρ−1 = φ(λ31 ) 31 ) −1 −1 −1 −1 φ(ρ−1 31 ) = φ([ρ32 , ρ21 ]) = [φ(ρ32 ), φ(λ31 )] = 1 Thus ρ31 lies in the kernel of φ. We can however conjugate ρ31 to each ρij using S3 , and so all elements ρij lie in the kernel. The result follows. Let us recall some basic terminology of the representation theory of symmetric groups. Remark 3.2. Let Sn be a symmetric group of rank n, and let K be a field with char(K) = 0 or char(K) > n. Then there is a one-to-one correspondence between irreducible K-linear representations of Sn and partitions of n. In particular the representation corresponding to • (n) is called trivial ; • (1n ) is called determinant ; • (n − 1, 1) is called standard ; • (2, 1n−1 ) is called signed standard. Moreover, a direct sum of the standard and trivial representation is known as the permutation representation, and a direct sum of the signed standard and determinant representation is known as the signed permutation representation. Now let us turn our attention to representations of the group Wn . Definition 3.3. Let V be a representation of Wn . Let N = {1, . . . , n}. Define • for each I ⊆ N , EI = {v ∈ V | ǫi v = (−1)χI (i) v}, where χI is the characteristic function of I; L • Vi = |I|=i EI We will slightly abuse notation, and often omit parentheses and write E1 for E{1} , etc.  Lemma 3.4. Let V be a representation of Wn . Then dim Vi = ni dim EI where |I| = i. Proof. The symmetric group Sn < Wn acts on {ǫ1 , . . . , ǫn } by permuting the indices in the natural way. Hence its action on Vi will permute subspaces EI by permuting subsets of N of size i. Thus each EI , for a fixed size of I, has the same dimension. The result follows. An immediate consequence of the above is the following. 5 Lemma 3.5. Let V be a 2-dimensional K-linear representation of Out(F3 ), where char(K) 6= 2. Then the representation factors as Out(F3 ) → Z2 → GL2 (K) and is determined by the image of ǫ1 . Proof. Let φ : Out(F3 ) → GL2 (K) be the representation. Lemma 3.4 tells us that (with the notation of Definition 3.3) V = V0 ⊕ V3 . Since S4 < G3 commutes with ∆, V = V0 ⊕ V3 is a decomposition of S4 modules. Now each of these submodules has dimension at most 2. There are at most three irreducible K-linear representations of S4 of dimension at most 2: the trivial representation (corresponding to partition (4)), the determinant representation (corresponding to partition (14 )), and the one given by a partition (2, 2) (note that the latter might not be irreducible when char(K) = 3). In all three cases, the action of V4 < S4 is trivial. This implies that we have satisfied all the requirements of Proposition 3.1, and the result follows. Lemma 3.6. Let V be a K-linear representation of Out(Fn ), where K is a field of characteristic other than 2. Then, with the notation above, we have V = n M Vi i=0 and for each i 6= j, J ⊆ N r {i, j} we have ρij (EJ ⊕ EJ∪{i} ⊕ EJ∪{j} ⊕ EJ∪{i,j} ) = EJ ⊕ EJ∪{i} ⊕ EJ∪{j} ⊕ EJ∪{i,j} . An identical statement holds for λij . Proof. The first statement follows directly from the fact that we can simultaneously diagonalise commuting involutions ǫi , since we are working over a field K whose characteristic is not 2. For the second statement, let us note that [ρij , ǫk ] = 1 for each k 6∈ {i, j}. Hence for each I ⊆ N : M EJ ρij (EI ) 6 J△I⊆{i,j} where A△B denotes the symmetric difference of two sets A and B. An identical argument works for λij . To help us visualise the combinatorics of representations of Out(Fn ) we are going to use the following diagrams. Definition 3.7. Suppose V is a finite dimensional, K-linear representation of Out(Fn ) over any field K, and let x ∈ Out(Fn ). Let us use the notation of Definition 3.3. We define the minimal diagram for x over V (often abbreviated to the minimal diagram for x) to be a directed graph D with the vertex set equal to a subset S of the power set of N = {1, 2, . . . , n}, where I ∈ S if and only if EI 6= {0}, and the edge set given by the following rule: L there is a directed edge from I to J if and only if pJ x(EI ) 6= {0}, where pJ : K⊆N EK → EJ is the natural projection. We also say that a graph D′ is a diagram for x over V if and only if the minimal diagram D for x is a subgraph of D′ . 6 In practice, when realising these diagrams in terms of actual pictures, we are going to align vertices corresponding to subsets of N of the same cardinality in horizontal lines; each such line will correspond to some Vi . We are also going to represent edges as follows: if two vertices are joined by two directed edges, we are going to draw one edge without any arrowheads between them; we are not going to draw edges from a vertex to itself – instead, if a vertex does not have such a loop, then all edges emanating from it will be drawn with a tail (see example below); $ • v •h ( • z becomes • o o • / • To get a firmer grip on these diagrams, let us have a look at a number of facts one can easily deduce from (not necessarily minimal) diagrams. Example 3.8. Let Γ0 be a connected component of Γ, a diagram for x. Let L P v ∈ I∈V (Γ0 ) EI be a vector. Then v = vI where vI ∈ EI . Let J 6∈ V (Γ0 ).  Note that there are no edges L between J and V (Γ0 ), and so pJ x(vI ) = 0 for all I ∈ V (Γ0 ). Hence x(vI ) ∈ I∈V (Γ0 ) EI and therefore x( M EI ) = M EI I∈V (Γ0 ) I∈V (Γ0 ) The following illustrates the relationship between our diagrams and matrices. Example 3.9. Suppose we have a diagram for x with two vertices, I and J say, such that the union of the connected components containing these vertices does not contain any other vertex. Fix a basis for EI and EJ . The following illustrates the way the x action on EI ⊕ EJ (seen as a matrix) depends on the diagram:   ∗ 0 EI / corresponds to • EJ • , ∗ ∗   0 ∗ to • EJ , and • EI / ∗ ∗   0 ∗ o • EJ to . • EI / ∗ 0 Example 3.10. Suppose we have a diagram Γ for x such that Γ has a connected component with only two vertices, I and J say, as depicted below. EI •  EJ • Exercise 3.8 tells us that EI ⊕ EJ is x-invariant, and thus x|EI ⊕EJ is an isomorphism. Let {v1 , . . . , vk } be a basis for EI . Our diagram tells us that  pI x(vi ) = 0 for each i, and so x(vi ) ∈ EJ . Since x is an isomorphism, we immediately see that {x(v1 ), . . . , x(vk )} is a linearly independent set, and hence dim EJ > dim EI . 7   Example 3.11. Let Γ be a diagram for x. Note that pJ xǫi (v) = ±pJ x(v) whenever v ∈ EI for some I. Therefore pJ xǫi (EI ) = {0} if and only if pJ x(EI ) = {0}, and so Γ is also a diagram for xǫi . Now consider σ ∈ Sn . We have    pJ xσ (EI ) = σ −1 pσ(J) x(Eσ(I) ) and so the image of Γ under the graph morphism induced by I 7→ σ(I) is a diagram for xσ . We will use the last example very often, for example to relate diagrams for ǫ1 σ23 ρ21 with ones for ρ−1 21 = ρ21 or ρ31 = ρ21 . Lemma 3.12. Let φ : Out(F3 ) → V be a representation such that we have a diagram for ρ21 of the form V3 •❈ ❈❈ ❈❈ ❈❈ ❈ • E2 V1 • E1 • E3 where dim Ei = 1 for all i. Then ρ21 has a diagram V3 V1 •❈ ❈❈ ❈❈ ❈❈ ❈ • E3 / • E1 • E2 • ❊❊ ❊❊ ❊❊ ❊❊ or •E2 o • E1 • E3 Note that the above diagrams are not necessarily minimal; this means that the lines in the top diagram between E1 and E2 , and between V3 and E3 , may represent the real situation, or it may be possible to replace each by an edge directed from the right to the left, or one directed from the left to the right, or no edge at all. Lemma 3.12 says that the line between E2 and E1 can indeed be replaced by either one of the directed edges or no edge at all. Proof. Firstly, note that the left-hand side diagram corresponds to  p2 ρ21 (E1 ) = {0}  and the right-hand side diagram to p1 ρ21 (E2 ) = {0}. Suppose for acontradiction that we have neither of the diagrams, that is that p1 ρ21 (E2 ) 6= {0} and p2 ρ21 (E1 ) 6= {0}. We claim that then ρ21 has a diagram V3 V1 •❈ ❈❈ ❈❈ ❈❈ ❈! • E1 • E2 • E3 Once we have proven the above claim, take x ∈ E2 r {0}. Then, by the 6 0, since E2 is 1 dimensional, and so assumptions of our claim, p1 ρ21 (x) = spanned by x. Thus we have ρ21 (x) = x1 + x2 8 with x1 ∈ E1 r {0} and x2 ∈ E2 . Now    p3 ρ31 ρ21 (x) = p3 ρ31 (x1 ) + p3 ρ31 (x2 ) By the conclusion of our claim, the following is a diagram for ρ21 V3 V1 •❈ ❈❈ ❈❈ ❈❈ ❈! • E1 • E2 • E3 By Exercise 3.11 (using the action of σ23 ) the following is then a diagram for ρ31 V3 • ④④ ④ ④ ④④ }④④ • E3 • E1 V1 • E2 Therefore and so  p3 ρ31 (x2 ) = 0   p3 ρ31 ρ21 (x) = p3 ρ31 (x1 ) Note that we can apply the assumptions of our claim to ρ31 as well, using the relation ρ31 = ρ21 σ23 and Example 3.11; specifically we may assume that p3 ρ31 (E1 ) 6= {0}. Now, observing that x1 spans E1 (which is 1 dimensional), we conclude that  p3 ρ31 ρ21 (x) 6= 0 But ρ31 (x) ∈ E2 by the diagram above (recall that x ∈ E2 ), and thus ρ21 ρ31 (x) ∈ E2 ⊕ E1 , which in turn implies that  p3 ρ21 ρ31 (x) = 0 This contradicts the relation [ρ21 , ρ31 ] = 1, and our proof is complete.  Now, to prove the claim, let v1 ∈ E1 r {0}. Then v3 = σ23 p2 ρ21 (v1 ) generates E3 . Now if  p1,2,3 ρ21 (v3 ) = 0 then we have proven our claim. If not, let U = hui be a subspace of V3 of  dimension 1, where u = p1,2,3 ρ21 (v3 ) . Note that ρ21 v3 ∈ u + E3 , and so ρ−1 21 (−v3 ) = ǫ1 ρ21 ǫ1 (−v3 ) ∈ u + E3 . −1 In particular, ρ21 (−v3 ) − v3′ = u for some v3′ ∈ E3 . Now  ′ ρ21 u = ρ21 ρ−1 21 (−v3 ) − v3 ∈ E3 ⊕ U, and hence U ⊕ E3 is ρ21 -invariant. Let us rewrite ρ21 ρ31 = ρ31 ρ21 as ρ21 σ23 ρ21 σ23 = σ23 ρ21 σ23 ρ21 9 which yields [ρ21 σ23 ρ21 , σ23 ] = 1. Now E1 is σ23 -invariant and one dimensional, and so each non-zero vector in E1 is an eigenvector of σ23 with eigenvalue µ = ±1. In particular v1 lies in the µ-eigenspace of σ23 , and hence so does ρ21 σ23 ρ21 (v1 ), since σ23 and ρ21 σ23 ρ21 commute. Since V3 and V1 are σ23 -invariant (in fact S3 -invariant), we also have p1,2,3 ρ21 σ23 ρ21 (v1 ) lying in the µ-eigenspace of σ23 . Now let ρ21 (v1 ) = y1 + y2 with yi ∈ Ei . We have  p1,2,3 ρ21 σ23 ρ21 (v1 ) = = =  p1,2,3 ρ21 σ23 (y1 + y2 )  p1,2,3 ρ21 (µy1 + σ23 (y2 ))  p1,2,3 ρ21 σ23 (y2 ) since ρ21 (µy2 ) ∈ E1 ⊕ E2 by assumption of our lemma, and thus lies in the kernel of p1,2,3 . By definition we have v3 = σ23 p2 ρ21 (v1 ) = σ23 (y2 ) and so we deduce   p1,2,3 ρ21 σ23 ρ21 (v1 ) = p1,2,3 ρ21 (v3 ) = u where the last equality is the definition of u. Therefore U lies in the µ-eigenspace of σ23 . Note that the eigenspaces of ∆ are V0 ⊕ V2 and V1 ⊕ V3 , and on each ∆ acts as ±1. Hence, since V0 ⊕ V2 = {0}, we see that [φ(ρ21 ), φ(∆)] = 1. Therefore, since ρ∆ ij = λij , the elements ρij and λij act identically for each i and j. This in turn implies that [φ(ρ21 ), φ(ρ23 )] = 1 since [ρ21 , λ23 ] = 1. Rewriting the first relation as before we get [φ(ρ21 σ13 ρ21 ), φ(σ13 )] = 1. Let v2 ∈ E2 r {0}. We have ρ21 (v2 ) = z1 + z2 , with zi ∈ Ei , and with z1 6= 0. Thus z1 is a non-zero multiple of v1 , since E1 is 1 dimensional. Arguing as before we now get   hp1,2,3 ρ21 σ13 ρ21 (v2 ) i = hp1,2,3 ρ21 σ13 (z1 ) i = U The group S3 can act on V1 in two ways: via the permutation or the signed permutation representation. In each case however, if E1 is in the µ-eigenspace of σ23 , then E2 is in the µ-eigenspace of σ13 . Thus σ13 (v2 ) = µv2 and so U lies in the µ-eigenspace of σ13 , arguing as before. Therefore U also lies in the σ13 µ-eigenspace of σ12 = σ23 , and so does E3 . This shows that φ(ρ12 )|E3 ⊕U = φ(ρσ2112 )|E3 ⊕U = φ(ρ21 )|E3 ⊕U and therefore that φ(ρ21 )|E3 ⊕U = φ(λ21 )|E3 ⊕U = φ(ρ21 ρ−1 12 λ21 )|E3 ⊕U = φ(ǫ2 σ12 )|E3 ⊕U But ǫ2 σ12 (E3 ) = E3 and so ρ21 has a diagram of the form claimed. We shall now focus on five- and six-dimensional representations of Out(F3 ). 10 Lemma 3.13. Let V be a K-linear, six-dimensional representation of Out(F3 ), where char(K) 6= 2. Suppose that, with notation of Definition 3.3, dim V1 ⊕ V2 6 3. Then, if V2 = {0}, we have a (not necessarily minimal) diagram for ρ21 of the form V3 V1 •❈ ❈❈ ❈❈ ❈❈ ❈ • E2 / • E1 O V0 •❈ ❈❈ ❈❈ ❈❈ ❈ • E3 • E1 • E2 o or • E3  • • and if V1 = {0} of the form V3 V2 •O • / •E 2,3 •E1,3 V0 • or •E1,2 •E1,3 o ①① ①① ① ①① ①① •E2,3 • •E1,2 ①① ①① ① ①① ①① In both cases at lest one of V0 ⊕ V2 and V1 ⊕ V3 is Out(F3 )-invariant. Proof. Lemma 3.4 tells us that the dimensions of V1 and V2 are divisible by 3. Hence, by assumption, at least one of V1 and V2 is trivial. If both of them are trivial then Lemma 3.6 immediately tells us that the decomposition V = V0 ⊕ V3 is preserved by each ρij and λij . Thus the minimal diagram for ρ21 is a subdiagram of all the above. Suppose one of V1 , V2 is non-trivial. Without loss of generality let us assume dim V1 6= 0. Again by assumption we see that dim V1 = 3, and hence dim Ei = 1 for all i. Our strategy here is to start with the most general possible diagram for ρ21 , and then gradually add restriction until we arrive at one of the diagrams described above. Lemma 3.6 allows us to conclude that we have the following diagrams for ρ21 and ρ31 respectively: •❈ ❈❈ ❈❈ ❈❈ ❈ •E2❈ • E1 ❈❈ ❈❈ ❈❈ ❈❈ • V3 • E3 • E2 V1 V0 • ④ ④④ ④ ④④ ④④ • E1 • 11 • E3 ④ ④④ ④④ ④ ④ ④④ The element ∆ lies in the centre of G3 , and so in particular [∆, ǫ1 σ14 ] = 1. This implies that ǫ1 σ14 preserves the eigenspaces of ∆, which happen to be the direct sums of all subspaces Vi with the index i of a given parity (even for the (+1)- and odd for the (−1)-eigenspace). Hence the following is a diagram for ǫ1 σ14 : • ⑧ ❅❅❅ ⑧ ❅❅ ⑧ ❅❅ ⑧⑧ ⑧⑧ • • • • But, in Out(F3 ), we have ǫ1 σ14 = ρ31 ρ21 , and Example 3.8 tells us that   ρ31 p2 ρ21 (V0 ) 6 E2 ⊕ V3  We can therefore conclude that p2 ρ21 (V0 ) = {0}, and so that we have a diagram for ρ21 as follows: •❅ ❅❅ ❅❅ ❅❅  •❅ ❅❅ ❅❅ ❅❅ • • • Again, by Example 3.8, ρ31 |E2 ⊕V3 is an isomorphism. Hence there exists v ∈ E2 ⊕ V3 such that hρ31 (v)i = E2 . Since v ∈ E2 ⊕ V3 6 V1 ⊕ V3 , also ǫ1 σ14 (v) ∈ V1 ⊕ V3 . Now ǫ1 σ14 (v) = ρ21 ρ31 (v) and so we conclude that ρ21 has a diagram •❅ ❅❅ ❅❅ ❅❅ • • • • Note that ρ21 either has a diagram •o •❅ ❅❅ ❅❅ ❅❅ • • •  or p1 ρ21 (E2 ) = E1 , since dim E1 = 1. 12 If ρ21 (E2 ) projects surjectively onto E1 , applying ρ31 ρ21 = ǫ1 σ14 to E2 yields a diagram for ρ31 of the form • • ⑧ ⑧⑧ ⑧ ⑧ ⑧⑧ •O • • and, after conjugating by σ23 (see Example 3.11), ρ21 has a diagram •❅ ❅❅ ❅❅ ❅❅ • •O • • Requiring ρǫ211 = ρ−1 21 yields two possibilities for a diagram for ρ21 : • •❅ ❅❅ ❅❅ ❅❅ /• • O •❅ ❅❅ ❅❅ ❅❅ • • or • • • The first diagram is as required. The second diagram gives a required diagram after applying Lemma 3.12. We still have to consider the case of a diagram •❅ ❅❅ ❅❅ ❅❅ • • •o • for ρ21 . Applying ǫ1 σ14 = ρ21 ρ31 to V0 yields a diagram for ρ21 of the form • •❅ ❅❅ ❅❅ ❅❅ • • •o or •❅ ❅❅ ❅❅ ❅❅ • •  • • The second of these diagrams is as required. 13 Let us now focus on the first of the above diagrams. Note that, by Example 3.11, this is also a diagram for λ21 , and that a diagram for ρ−1 12 is as follows: •❅ ❅❅ ❅❅ ❅❅ • • •❅ ❅❅ ❅❅ ❅❅ • Let v1 be a generator of E1 . Apply ǫ2 σ12 = ρ21 ρ−1 12 λ21 to v1 and observe that ǫ2 σ12 (v1 ) = v2 , a generator of E2 . Now let x be the E1 component of λ21 (v1 ). Note that ρ−1 12 λ21 (v1 ) has a non-trivial E1 component if and only if x is not zero. But such a non-trivial component yields a non-zero component in E1 ⊕ V0 of ρ21 ρ−1 12 λ21 (v1 ). This is impossible, since ǫ2 σ12 (v1 ) = v2 has no such components. Thus x = 0, λ21 (v1 ) lies in V0 , and ρ−1 12 |U : U → E2 is an isomorphism, where U = hλ21 (v1 )i. Hence ρ12 |E2 : E2 → U is an isomorphism as well. ±1 We claim that ρ±1 ij |Ej , λij |Ej : Ej → U are all isomorphisms. We have established this for λ21 and ρ12 . Conjugating by ǫ1 and ǫ2 establishes the claim −1 −1 −1 also for ρ−1 21 , ρ21 , λ21 , ρ12 , λ12 and λ12 . Using the fact that ǫ1 σ14 = ρ31 ρ21 preserves V1 ⊕ V3 we immediately conclude that the claim also holds for ρ−1 31 , and hence in particular also for ρ13 (repeating the argument above). Now the relation ǫ3 σ34 = ρ13 ρ23 establishes the claim for ρ23 , and the claim follows. Our calculations enable us to deduce that diagrams for ρ21 and λ23 respectively are as follows • •❅ ❅❅ ❅❅ ❅❅ • •  • and • • • • • ⑧ ⑧ ⑧ ⑧⑧ ⑧⑧ But ρ21 and λ23 commute, and this together with the fact that ρ21 (E1 ) = U = −1 λ23 (E3 ) yields a diagram for ρ21 of the form • •❅ ❅❅ ❅❅ ❅❅ _ • •  • In particular Example 3.10 implies that dim V0 6= 0. Now let us define A2 = ρ21 (E3 ) 6 V3 . Note that dim A2 = 1. Since ρ21 commutes with λ23 , examining the respective diagrams yields λ23 (A2 ) = E1 . 14 Now, observing that each ǫi preserves each subspace of EI , we see that in fact for all i ±1 A2 = ρ±1 2i (Ej ) = λ2i (Ej ) where j satisfies {i, j} = {1, 3}. We can define A1 and A3 similarly. The relations [ρ21 , ρ31 ] = [ρ23 , ρ13 ] = 1, together with the structure of our diagrams, tell us that A2 ∩ (A1 + A3 ) = {0}. The relation [ρ32 , ρ12 ] = 1 informs us that A1 ∩A3 = {0} and so that dim(A1 ⊕A2 ⊕A3 ) = 3. This is a contradiction, since V0 6= {0} and so dim V3 = 2. We have thus shown that ρ21 has a diagram as claimed. Observe that, since the subgroup W3 < Out(F3 ) preserves each Vi by construction, having a diagram for ρ21 of the form described in the statement of this lemma immediately implies that at least one of V0 ⊕ V2 and V1 ⊕ V3 is preserved by Out(F3 ) = hW3 , ρ21 i. Lemma 3.14. Let V be a K-linear, six-dimensional representation of Out(F3 ), where K is a field of characteristic other than 2 or 3. Suppose that, with notation of Definition 3.3, dim V1 ⊕ V2 = 6. Then V = V1 ⊕ V2 as an Out(F3 )-module. Proof. If dim V1 = 6 or dim V2 = 6 then the result is trivial. Suppose that dim V1 = dim V2 = 3 and so V = V1 ⊕ V2 as a vector space. We know (using Maschke’s Theorem and our assumption on char(K)) that each Vi (for i = 1, 2) is either a sum of standard and trivial or a sum of signed standard and determinant representations of S3 ; we can therefore pick vectors vi ∈ Ei , wi ∈ E{1,2,3}r{i} so that each vi − vj and wi − wj is an eigenvector of an element of S3 r {1}. We have a diagram for ρ21 of the form •E1,3● •E1,2 •E2,3 ❙❙ ● ❦❦ ✇ ❙❙❙ ❙❙❙ ❦❦❦●●❦●❦✇✇✇ ❙❦ ❦❦❦ ❙❙❙✇❙✇✇❙✇●●●● ❦❦❦ ❦ ❦ ✇✇ ❙❙❙● ❦ • E3 • E1 • E2 and analogously one for ρ31 of the form •E2,3● •E1,3 •E1,2 ●● ✇ ●●● ✇ ✇ ✇ ●● ✇✇ ●● ✇✇ ✇● ✇● ✇✇ ●●● ✇✇ ●●● ✇ ✇ ● ● ✇ ✇ ✇ ✇ • E3 . • E2 • E1 Since S4 commutes with ∆, its action has to preserve the (+1)-eigenspace of ∆ (which is equal to V1 in our case) as well as the (−1)-eigenspace (which equals V2 in this case). We also have [ǫ1 , ∆] = 1, and so ǫ1 σ14 = ρ31 ρ21 preserves V2 . Hence, evaluating ρ31 ρ21 on E1,2 (an observing that dim EI 6 1 for all I) gives us either a diagram for ρ21 of the form • ❖❖❖ • ❅ ♦♦7 • ❖❖❖ ♦❅♦❅♦ ⑧⑧ ❖❖ ♦♦ ❅⑧ ♦♦♦ ❖❖⑧⑧❖⑧❖❅❖❅❅ ♦ ♦ ⑧ ❖ ♦♦ • • • 15 or a diagram for ρ31 of the form • • •❅ ❅❅ ⑧⑧ ❆❆❆ ⑥⑥ ❆ ⑥ ❅ ⑧ ⑥❆ ⑧⑧⑧❅❅ ⑥⑥ ❆❆ ⑧?⑧⑧⑧ ❅ ⑥⑥ ❆ •k • •. Suppose (for a contradiction) that we are in the latter case. Evaluating ρ21 ρ31 on E1 (and observing that the diagrams for ρ31 and ρ21 are related by conjugation by σ23 ) yields diagrams for ρ21 and ρ31 respectively of the form • ❖❖❖ / • ❅ ♦♦ • ❖❖❖ ♦❅♦❅♦ ⑧⑧ ❖ ♦ ❅⑧ ♦♦♦❖❖❖⑧⑧❖⑧❖❅❅❅ ♦ ♦ ⑧ ❖❖ 7♦♦ •o • • and +• • •❅ ❅❅ ⑧⑧ ❆❆❆ ⑥⑥~ ❆❆⑥ ❅⑧ ⑧⑧⑧❅❅❅ ⑥⑥⑥ ❆❆❆ ⑧ ⑧ ⑥ ⑧?⑧ •k • •. Now ρ21 ρ31 (E1 ) = E3 and ρ31 ρ21 (E1 ) = E2 . But ρ31 commutes with ρ21 , which yields a contradiction. We can repeat the argument after evaluating ρ31 ρ21 on E3 and conclude that we have a diagram for ρ21 of the form • PPP • ❆ ♥♥7 • PPP ❆♥❆♥♥ ⑥⑥ P♥P♥P♥ ❆⑥❆⑥ ⑥❆ ♥♥♥ ⑥P⑥⑥PPP❆P❆ ♥ ♥ ' ♥ • • •. ǫ1 Two diagram chases, starting at E3 and E1,2 , show ρ−1 21 = ρ21 requires ρ21 to have a diagram of the form • ❖❖❖ • ❅ ♦♦?7 • • ❖❖❖ • ❅ ♦♦7 • ❖❖❖ ❅♦❅♦♦ ⑦⑦ ❖❖❖ ♦❅♦ ❅❅♦⑧⑧⑧ ❖ ❖♦❖♦❖♦ ❅⑦❅⑦ ❖♦ ♦ ⑧❅ ❖ ♦ ❅ ⑦ ❖ ❖ ♦ ♦ ⑧ ♦♦ ⑧⑧❖❖❖❅❖❅ ♦♦ ⑦⑦⑦❖❖❖❅❖❅ ♦♦♦ ' ' ♦♦♦ • • • • •, • or • PPP / • ❆ ♥♥7 • PPP ❆♥❆♥♥ ⑥⑥ P ♥ ❆⑥ ♥♥P♥PP⑥P⑥P⑥❆❆❆❆ ♥ ♥ ⑥ ♥♥♥ / ⑥ PP' • •. • Suppose we are in the third case. We have diagrams for ρ21 and ρ31 respectively +• •❅ • ❖❖❖ / • ❅ ♦♦7 • • ❅❅ ⑧⑧? ❆❆❆ ⑥⑥ ❖❖❖ ♦❅♦ ♦ ⑧⑧ ❅ ❆⑥❆⑥ ❖♦ ❅⑧ ❖♦ ❅⑧ ⑧⑧❅❅❅ ⑥⑥⑥ ❆❆❆ ♦♦♦ ❖❖⑧⑧❖⑧❖❅❖❅❅ ♦ ⑧ ♦  ⑥ ⑧ ♦♦ / ⑧ ❖' 3 •. • and • • • • Evaluating ǫ1 σ14 = ρ31 ρ21 on E1 (and observing that ǫ1 σ14 (V2 ) = V2 ) yields a diagram for ρ21 of the form • ❖❖❖ / • ❅ ♦♦7 • ❖❖❖ ♦❅♦❅♦ ⑧⑧ ❖ ♦ ❅⑧ ♦♦♦❖❖❖⑧⑧❖⑧❖❅❅❅ ♦ ♦ 7♦♦ / ⑧ ❖❖' • • • / or • PPP / • ❆ • PPP ❆❆ ⑥⑥ PPP ❆⑥❆⑥ P⑥P⑥ ❆❆ ⑥⑥ PPP❆' / • •. • The first case is impossible, since we could have E1 = 1(E1 ) = ǫ1 ρ21 ǫ1 ρ21 (E1 ) 6 E2 ⊕ E1,2 . 16 After repeating the argument for E2,3 we conclude that we have diagrams for ρ21 and ρ31 respectively as follows • • /• ❅❅ ⑧ • ❅❅⑧⑧ ⑧⑧❅❅❅ ⑧ /•⑧ • +• •❆ ❆❆ ⑥⑥ ❆⑥❆⑥ ⑥⑥ ❆❆❆ ⑥ ⑥ 3 •. • • and • σ12 σ14 Suppose that σ14 preserves each Ei . Then so does σ24 = σ14 . But σ24 = σ12 , and σ12 (E1 ) = E2 . This is a contradiction. We can apply an analogous argument to the σ14 -action on the subspaces Ei,j . Now we easily deduce from ǫ1 σ14 = ρ31 ρ21 that ρ21 (E1 ) 66 E1 and ρ21 (E2,3 ) 66 E2,3 . ǫ1 We can now evaluate ǫ1 σ14 = ρ31 ρ21 and ρ−1 21 = ρ21 on E1 and E2,3 and conclude that we have a diagram for ρ21 of the form • /• • • /• • which shows that both V1 and V2 are Out(Fn )-invariant. Suppose now that we are in one of the first two cases, namely that there is a diagram for ρ21 of the form • ❖❖❖ • ❅ ♦♦7? • ❖❖❖ ♦❅♦❅♦ ⑧⑧ ❖♦ ❖♦ ❅⑧ ♦♦♦ ❖❖⑧⑧❖⑧❖❅❖❅❅ ♦ ♦ ⑧ ❖' ♦♦ • • • or • PPP • ❆ ♥♥7 • PPP ❆♥❆♥♥ ⑥⑥ PP♥♥ ❆⑥❆⑥ ♥♥♥ PP⑥⑥P⑥PP❆❆❆ ♥ ♥ ⑥ P' ♥♥ • • •. Verifying that ρ31 ρ21 keeps V1 and V2 invariant immediately tells us that in fact we have a diagram for ρ21 of the form •E2,3 ❙❙ •E1,3● •E1,2 ●●❦❦❦❦✇5 ✇; ❙❙❙❙ ❦ ● ✇ ❙❙❙❦❦❦ ●✇●✇ ❦❦ ❙❙❙❙✇❙✇ ●● ❦❦❦ ● ✇ ❦ ❦ ✇✇ ❙❙❙) ●# ❦❦ • E1 • E3 . • E2 The element ρ31 keeps E2 and E1,3 invariant, and so, observing that ǫ1 σ14 = ρ21 ρ31 preserves V1 ⊕ V3 , we actually have diagrams for ρ21 and ρ31 respectively • ❖❖❖ • 7• ❖❖❖ ♦♦♦♦♦ ❖ ♦ ❖ ♦♦❖ ♦♦♦ ❖❖❖❖❖ ♦♦♦ ' • • • and •❅ • ❅❅ ⑧⑧? ❅ ⑧ ⑧⑧❅❅ ⑧⑧ ❅ • • • •. But, in order for ρ21 ρ31 to keep V1 and V2 invariant, we need to have • • • • • • as a diagram for ρ21 . This finishes the proof. 17 Now let us investigate 5-dimensional representations of Out(F3 ) – we hope to be able to say more in this case! Proposition 3.15. Let V be a 5-dimensional, K-linear representation of Out(F3 ), where K is a field of characteristic other than 2 or 3. Suppose that, with the notation of Definition 3.3, V 6= V0 ⊕ V3 . Then V = V0 ⊕ V1 ⊕ V2 ⊕ V3 is a decomposition of Out(F3 )-modules, and, as S4 -modules, V0 is a sum of trivial, V1 of standard, V2 of signed standard, and V3 of determinant representations. Proof. Since dim V = 5, we have V1 = {0} or V2 = {0}. Let us suppose that we have the latter, the other case being entirely similar. Step 0: We first claim that V0 is a sum of trivial S4 -modules. Lemma 3.13 gives us two possibilities for a diagram for ρ21 , namely • ❊❊ ❊❊ ❊❊ ❊❊ • E2 / • E1 O • ❊❊ ❊❊ ❊❊ ❊❊ • E3 • E2 o or • E1 • E3  • • The same lemma also tells us that V /(V1 ⊕ V3 ) is a representation of Out(F3 ). Its dimension is at most 2 and therefore Lemma 3.1 tells us that it is a direct sum of two trivial representations of Out(F3 ) (since we know how ǫ1 acts), and so the same statement holds for V /(V1 ⊕ V3 ) as an S4 -module. Hence it also holds for V0 , since V0 is an S4 -module isomorphic to V /(V1 ⊕ V3 ). Note that an identical argument shows that V3 is a sum of determinant S4 -modules in the case when V1 = {0}. Step 1: We now claim that V0 ⊕ V1 is Out(F3 )-invariant. Suppose for a contradiction that it is not the case. Let U be the projection of ρ21 (E3 ) onto V3 . Note that dim U = 1 since we have assumed V0 ⊕ V1 not to be Out(F3 )-invariant. Our aim now is to show that U is Out(F3 )-invariant. If V3 is Out(F3 )-invariant, then it is an Out(F3 )-module of dimension at most two, and hence we can use Lemma 3.5 to conclude that it is in fact a sum of determinant representations. Hence, in particular, U is Out(F3 )-invariant. Now suppose that V3 is not Out(F3 )-invariant. Checking that ρ31 ρ21 (E3 ) = ρ21 ρ31 (E3 ) on both of our diagrams for ρ21 yields that ρ31 (U ) = U . Note that U is the unique non-trivial invariant subspace of V3 for both ρ21 and ρ31 , as otherwise V3 would be invariant under the action of hS3 , ρ21 i = hS3 , ρ31 i = Out(F3 ). Hence U is σ23 -invariant. But V3 is a 2-dimensional S3 -module, and if it were irreducible, then the trace of each transposition would be zero. Hence V3 is a sum of two 1-dimensional modules of S3 , and therefore S3 preserves U . From this we conclude that Out(F3 ) preserves U . 18 Lemma 3.5 informs us that U is a determinant representation of Out(F3 ). ǫ1 Since ρ−1 21 = ρ21 , we must have ∀v ∈ E3 : ρ21 (v) ∈ v + U. Using similar relations we establish that, when restricted to E3 ⊕ U , λ21 acts as ρ21 , and ρ12 acts as ρ±1 21 . Hence, taking v ∈ E3 , −1 v + (2 ∓ 1)u = ρ2∓1 21 (v) = ρ21 ρ12 λ21 (v) = ǫ1 σ12 (v) ∈ E3 where u = ρ21 (v) − v ∈ U . This shows that u = 0, and hence V0 ⊕ V1 is Out(F3 )-invariant, which is the desired contradiction. We have thus shown that there is a diagram for ρ21 of the form • E2 • ❊❊ ❊❊ ❊❊ ❊❊ " / • E1 • E3 O • E2 o or • ❊❊ ❊❊ ❊❊ ❊❊ " • E1 • E3  • • Step 2: We claim that V1 is a standard S4 -module. As an S3 -module, both V1 and V2 are sums of one standard and one either trivial or determinant representation. The branching rule tells us that therefore, as S4 -modules, each of the subspaces can be either a standard or a signed standard representation, or the one corresponding to partition (2, 2). The last case is ruled out by Lemma 3.1, since (V0 ⊕ V1 )/V0 is clearly not a sum of trivial and determinant Out(F3 )-modules. Focusing only on V1 , we have a diagram for ρ21 of the form • /• • or •o • • Note that in both cases these are the minimal diagrams for ρ21 when restricted to V1 , since otherwise σ12 could not permute E1 and E2 . Let us pick vectors vi ∈ Ei in such a way that each vi − vj is an eigenvector of σij . Let us also set v = v1 + v2 + v3 . The way in which S4 acts on V1 in our case is determined by one parameter; we can calculate it by finding µ ∈ C such that v1 + µv is an eigenvector of σ14 . The eigenvalue of this eigenvector will also determine the way in which S4 acts. Let us note that we can also find this parameter µ by computing σ14 (v2 − v1 ) = µv + v2 . In the case of the first diagram for ρ21 , we immediately see that σ14 (v2 − v1 ) = ǫ1 ρ21 ρ31 (v2 − v1 ) ∈ E1 ⊕ E2 , and hence µ = 0. Now both ρ23 and ρ31 preserve E1 , and so observing that −1 −1 ρ−1 21 = [ρ23 , ρ31 ] yields that ρ21 acts trivially on E1 . By an analogous argument so does ρ31 . Hence σ14 (v1 ) = ǫ1 (v1 ). In our case this shows that we are dealing with a standard representation; if however V1 is trivial, ǫ1 acts as plus one on the appropriate vector, and wee see that V2 is a signed standard S4 -module. In the case of the second diagram we immediately see two eigenspaces of σ14 , namely E2 and E3 . These spaces are interchanged by the action of σ23 which 19 commutes with σ14 , and hence must have the same eigenvalue. In a standard or a signed standard representation of S4 each σij has always exactly two repeated eigenvalues, and it is this eigenvalue that determines the representation. It is enough for us then to find a third eigenvector of σ14 and compute its eigenvalue. The vector must have a non-trivial E1 -component, and our diagram tells us that it is enough to check how σ14 acts on E1 . By an argument similar to the one above we show that ǫ1 σ14 (v1 ) ∈ v1 + E2 ⊕ E3 , and the claim follows. Step 3: We now claim that V3 is a sum of determinant S4 -representations. As an S3 -module, V1 ⊕ V3 is a sum of one standard, one trivial and some number of determinant representations (depending on the dimension of V3 ). We have already found one standard representation of S4 , and the branching rule tells us that there can only be determinant representations of S4 left. If at least one of them does not lie entirely in V3 , then it would appear in (V1 ⊕ V3 )/V3 by Schur’s Lemma. This is not possible, since (V1 ⊕ V3 )/V3 is a standard representation of S4 . Hence all the other irreducible S4 -modules lie within V3 . Step 4: Our last claim is that each Vi is Out(F3 )-invariant. We have already shown this for V1 ⊕ V0 . We have just shown that V3 is S4 invariant, and so, ρ21 ρ31 = ǫ1 σ14 keeping V3 invariant yields a diagram for ρ21 of the form • • E2 / • E1 O • • E3 • E2 o or • E1 • E3  • • We have already shown in step 2 that in both cases ρ21 (v) ∈ v + E2 ⊕ V0 for each v ∈ E1 . Also, (V0 ⊕ V1 )/V1 is an Out(F3 )-module of dimension at most 2, and hence is described by Lemma 3.5. In particular ρ12 (w) = w + E1 for all w ∈ V0 . Analogous statements hold for ρ31 and so observing that σ23 acts as ±1 on E1 ⊕ V0 and that ρ21 = ρσ3123 yields that ǫ1 σ12 = ρ31 ρ21 (V0 ) has a non-trivial V1 -component if and only if ρ21 (V0 ) does, and similarly that ǫ1 σ12 = ρ31 ρ21 (V1 ) has a non-trivial V0 -component if and only if ρ21 (V0 ) does. Hence we have a diagram • • E2 / • E1 • • E3 • E2 o or • • E1 • E3 • for ρ21 , which was what we claimed. Lemma 3.16. Suppose V is a K-linear representation of Out(F3 ), such that, using notation of Definition 3.3, V0 ⊕ V2 and V1 ⊕ V3 are Out(F3 )-invariant. 20 Then the representation factors through the natural projection π : Out(F3 ) → GL3 (Z). Proof. Note that φ(∆) lies in the product Z(GL(V0 ⊕ V2 )) × Z(GL(V1 ⊕ V3 )) of the centres of the general linear groups of the components V0 ⊕V2 and V1 ⊕V3 . Therefore we have φ(ρij ) = φ(ρij )φ(∆) = φ(λij ) for each i 6= j, and so φ factors as φ / GL(V ) Out(F3 ) O  Out(F3 )/hh{ρij λ−1 ij | i 6= j}ii ∼ = / GL3 (Z) This finishes the proof. Observe an immediate consequence of the above. Lemma 3.17. Suppose V is a K-linear representation of Out(F3 ) of dimension at most 5, where the characteristic of K is not 2 or 3. Then the representation factors through the natural projection π : Out(F3 ) → GL3 (Z). Proof. Using the notation of Definition 3.3, we have V = V0 ⊕ V1 ⊕ V2 ⊕ V3 as a vector space. Suppose first that V1 ⊕ V2 is trivial. Then Lemma 3.6 tells us that V = V0 ⊕ V3 as an Out(F3 )-module. Supposing that V1 ⊕V2 6= {0} allows us to use Proposition 3.15, and conclude that each Vi is Out(F3 )-invariant. We can now use Lemma 3.16 and finish the proof. Before proceeding further we need to recall a standard fact of representations theory. Proposition 3.18. Let A be the kernel of the map SL3 (Z) → SL3 (Z2 ) induced by the surjection Z → Z2 . Let V be the standard, 3-dimensional K-linear representation of GL3 (Z). Suppose further that K is a field of characteristic 0 or at least 3. Then U = Sym2 (V ∗ ), the second symmetric power of the dual module of V, is irreducible as an A-module. Proof. Let U 6 V be an irreducible A-submodule of V , and let {v1 , v2 , v3 } be the standard basis of V . Suppose v ∈ U r {0}. Then X v= µij vi ⊗ vj i6j for some collection of scalars µij . We are going to abuse notation by using the symbols ǫi and ρij to denote the images of respective elements under π : Out(F3 ) → GL3 (Z). Note that ǫi ǫj ∈ A and ρ2ij ∈ A for each appropriate i 6= j. Now ǫ1 ǫ2 (v) − v = −2 µ23 v2 ⊗ v3 − 2 µ13 v1 ⊗ v3 21 and hence  ǫ1 ǫ3 ǫ1 ǫ2 (v) − v − v = 4 µ13 v1 ⊗ v3 . Hence, if µij 6= 0 for some i 6= j, then vi ⊗ vj ∈ U . Furthermore ρ213 (v1 ⊗ v3 ) − v1 ⊗ v3 = −2 v1 ⊗ v1 and ρ223 (v1 ⊗ v3 ) − v1 ⊗ v3 = −2 v1 ⊗ v2 and therefore if µij 6= 0 for some i 6= j, then U = V . Suppose that X µii vi ⊗ vi v= i Without loss of generality let us assume that µ11 6= 0. Then  ρ221 (v) − v = −µ11 2 v1 ⊗ v2 − 4 v2 ⊗ v2 = v ′ ∈ U We can now apply our argument to v ′ and conclude that U = V . We are now ready for the main result of this section. Theorem 3.19. Suppose V is a K-linear representation of Out(F3 ) of dimension at most 6, where the characteristic of K is not 2 or 3. Then the representation factors through the natural projection π : Out(F3 ) → GL3 (Z). Proof. Let φ : Out(F3 ) → GL(V ) be our representation. Using the notation of Definition 3.3, we have V = V0 ⊕ V1 ⊕ V2 ⊕ V3 as a vector space. We need to consider a number of cases. Suppose first that V1 ⊕V2 is trivial. Then Lemma 3.6 tells us that V = V0 ⊕V3 as an Out(F3 )-module. Suppose now that V0 ⊕ V3 is trivial. Lemma 3.14 tells us that V = V1 ⊕ V2 as an Out(F3 )-module. In both situations we can apply Lemma 3.16. We are left with the most general case: suppose that dim V1 ⊕V2 = 3. We are going to assume that in fact V2 = {0}, the other case being analogous. Applying Lemma 3.13 gives us two Out(F3 )-representations r : Out(F3 ) → V /(V1 ⊕ V3 ) and s : Out(F3 ) → V /V0 , where at least one of them occurs as a submodule of V . Also, r and s factor through π by Lemma 3.16. If any of these representations has dimension 0, then we are done. In what follows we shall suppose that the dimension of both r and s is non-zero, and thus that V is reducible as an Out(F3 )-module. We can choose a basis for V so that the matrices in φ(Out(F3 )) are all in a block-upper-triangular form, with diagonal blocks corresponding to representations r and s. Let IA3 = ker π be the Torelli subgroup. Our aim is to show that IA3 lies in the kernel of φ. Elements in IA3 map to matrices with identities on the diagonal, and all non-zero entries located in the block in the top-right corner. Hence IA3 maps to an abelian group isomorphic to Km , where m ∈ {5, 8, 9} depends on the dimension of r. Note that all products ǫi ǫj lie in the kernel of r, and hence so do all elements ǫ ǫ −1 , ρ2kj = (ρkji j ρ−1 kj ) 22 where we took k 6= i. The work of Mennicke [14] now shows that in fact r factors through a finite group: when restricted to SOut(F3 ) = π −1 (SL3 (Z)), it factors through SOut(F3 ) → SL3 (Z) → SL2 (Z2 ). Let A denote the kernel of this map. Note that IA3 < A. We have shown above that r|A is trivial, and so A maps to the the identity matrix in the block corresponding to r. Note that φ(A) acts by conjugation on the abelian group of matrices with identity blocks on the diagonal, and a trivial block in the bottom-left corner. As remarked above, this group is isomorphic to Km . Each row or column (depending on which diagonal block corresponds to r) in the top-right corner corresponds to an A-submodule, and so the group Km splits as an A-module into K5 , 2.K4 , 3.K3 , 4.K2 or 5.K, depending on the dimension of r, where the multiplicative notation indicates the number of direct summands. Let T = IA3 /[IA3 , IA3 ] denote the abelianisation of the Torelli group seen as an Out(F3 )/IA3 = GL3 (Z)-module, where the action is the one induced by the conjugation action Out(F3 ) y IA3 . The structure of this module is known (see Kawazumi [10]) – it is the second symmetric power of the dual of the standard GL3 (Z)-module. After tensoring T with K, we can apply Proposition 3.18, and conclude that T ⊗Z K is an irreducible A-module of dimension 6. By Schur’s Lemma, if we have an A-equivariant quotient of T , it is either isomorphic to T or equal to {0}. Now consider the action of φ(A) on φ(IA3 ) ⊗Z K by conjugation. It is at the same time an equivariant quotient of an irreducible 6-dimensional module and a submodule of K5 , 2.K4 , 3.K3 , 4.K2 or 5.K. This implies that the image of IA3 under φ is trivial. This finishes the proof. 4 Small graphs with transitive automorphism groups In this section we will establish some lemmata concerning graphs of rank at most 5 with groups W3 and G3 acting on them. Definition 4.1 (Admissible graphs). Let X be a connected graph with no vertices of valence 2, and suppose we have a group G acting on it. We say that X is G-admissible if and only if there is no G-invariant non-trivial (i.e. with at least one edge) forest in X. We also say that X is admissible if and only if it is Aut(X)-admissible. The following theorem is due to Marc Culler [7], Dmitri Khramtsov [11] and Bruno Zimmermann [17] (each independently). Theorem 4.2 (Culler [7]; Khramtsov [11]; Zimmermann [17]). Let n > 2. Suppose G ֒→ Out(Fn ) 23 is an embedding of a finite group G. Then there exists a finite G-admissible graph X of rank n (with a fixed isomorphism π1 X ∼ = Fn ), so that the composition G → Aut(X) → Out(Fn ) is the given embedding. The reason for requiring n > 2 in the above theorem is that there are no admissible graphs of rank 1 (i.e. with the fundamental group Z). Of course any finite subgroup of Out(F1 ) ∼ = Z/2Z can be realised as an action on a graph with one vertex and one edge. Since we will be dealing with homology of finite graphs quite frequently in this section, let us observe the following. Lemma 4.3. Let X be a finite, oriented graph. Recall that Definition 2.1 gives us two maps ι, τ : E(X) → V (X). We have the following identification o n X X f (e) . f (e) = H1 (X, C) ∼ = f : E(X) → C | ∀v ∈ V (X) : ι(e)=v τ (e)=v We will often refer to each such function f as a choice of weights of edges in X. Before proceeding any further, we need to introduce a concept of collapsing maps of graphs. Definition 4.4 (Collapsing map). Let π : X → X ′ be a surjective morphism of graphs X and X ′ . We say that π is a collapsing map if and only if the preimages of points in X ′ under π are path-connected. Remark 4.5. Let us observe three facts: 1. for a given graph X, giving a subset of E(X) which will be collapsed specifies a collapsing map π; 2. any collapsing map π : X → X ′ induces a surjective map on homology by pushing forward weights of edges which it does not collapse. We will often abuse notation and refer to this induced map as π; 3. if π : X → X ′ is a G-equivariant collapsing map (where G is a group acting on X and X ′ ), then the induced map on homology is also G-equivariant. It is now time to focus on the main area of our interest here. Definition 4.6. Let G be a group acting on a graph X, and let e be an edge of X. We define Xe to be the graph obtained from X by collapsing all edges not contained in the G-orbit of e. Note that the action of G on such an Xe is edge-transitive. Lemma 4.7. Suppose X is a G-admissible graph of rank at most 5, where G is a group, and e is any edge of X. Then Xe has no vertices of valence 1 or greater than 10 and satisfies 8 > 2v2 + v3 + 2v4 + 3v5 + 4v6 + 5v7 + 6v8 + 7v9 + 8v10 where vi is the number of vertices of valence i in Xe . 24 (∗) Proof. First note that there are no vertices of valence 1 in Xe , since they could only occur if there were separating edges in X. But X is admissible, and so there are no such edges. A simple Euler characteristic count yields 2(rank(Xe ) − 1) > ∞ X (i − 2)vi i=3 and hence in particular vi = 0 for all i > 10, as Xe has rank at most 5. Since X is admissible, each vertex of Xe of valence two comes from collapsing a subgraph of X which is not a tree, hence rank(Xe ) 6 5 − v2 and the result follows. We will now consider graphs satisfying (∗) with a transitive action of W3 ∼ = G3 yielding particular representations on the C-homology of the graph. Proposition 4.8. Let X be a graph of rank 5 on which G ∈ {W3 , G3 } acts so that the representation of G on V = H1 (X, C) induced by the action decomposes as V = V0 ⊕ V1 ⊕ V2 ⊕ V3 , where • if G = W3 then the decomposition is the one described in Definition 3.3, and, as S3 -modules, V1 is a permutation, V2 signed permutation, V0 a sum of trivial and V3 a sum of determinant representations; • if G = G3 then ∆ acts as identity on V0 ⊕ V2 and as minus the identity on V1 ⊕ V3 , and as S4 -modules, V1 is a standard, V2 signed standard, V0 a sum of trivial and V3 a sum of determinant representations. Then, there is a subgraph Y 6 X isomorphic to a 3-rose, on which G acts in such a way that, as an S3 -module (where S3 < W3 ∩ G3 ), H1 (Y, C) contains the standard representation. Proof. Let v ∈ V be a vector belonging to a standard representation of S3 < G. It is represented by a choice of weights on edges of X. Let e be an edge with a non-zero weight. Then the image of v in H1 (Xe , C) is non-trivial, and hence Schur’s Lemma informs us that H1 (Xe , C) contains a standard S3 -module. Let Z = Xe . Lemma 4.7 tells us that Z satisfies (∗). Also, since G acts transitively on edges of Z, there are at most two vertex-orbits of this action, and hence in particular at most two values vi can be non-zero. Let us list all possible values of vi , noting that ivi = jvj if there are vertices of valence i and j in Z, and that vi must be even if i is odd and there are only vertices of valence i in Z. All possible cases are summarised in Figure 4.1. Now, in order to have a standard representation of S3 , we need at least 3 edges in Z, and the rank of Z has to be at least 2. We can therefore immediately rule out cases (1), (3), (5), (6) and (15). Also, since the action of G on the edges of Z is transitive, their number has to divide |G| = 48. Hence we can additionally rule out cases (8), (16) and (20). We are left with the cases listed in Figure 4.2. We will need to deal with these cases one by one: Case (2): Here we have three vertices of valence two, on which S3 has to act transitively. Each of these comes from collapsing a graph of non-zero rank 25 Case number (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) (11) (12) (13) (14) (15) (16) (17) (18) (19) (20) v2 4 3 3 2 2 1 Case number (2) (4) (7) (9) (10) (11) (12) (13) (14) (17) (18) (19) v2 3 2 v3 Figure 4.1: Case table v4 v5 v6 v7 v8 v9 v10 2 1 8 6 4 2 2 1 4 3 2 1 2 2 1 1 1 Figure 4.2: Reduced case table v3 v4 v5 v6 v7 v8 v9 v10 2 1 8 4 2 1 2 4 3 2 2 1 1 26 edges 4 6 3 4 2 1 12 9 6 6 3 8 6 4 2 5 6 3 4 5 rank 1 2 1 2 1 1 5 4 3 4 2 5 4 3 2 4 5 3 4 5 edges 6 4 12 6 6 3 8 6 4 6 3 4 rank 2 2 5 3 4 2 5 4 3 5 3 4 in X, hence the sum of homologies of these graphs contains another standard representation of S3 . This contradicts our assumptions. Case (4): Here Z is a subdivided 2-rose, so we cannot get a standard representation of S3 on the homology of this graph. Case (7): There are four graphs with an edge-transitive group action with at most 8 vertices each of valence 3, namely a 3-cage, the 1-skeleton of a tetrahedron, the complete bipartite graph K(3, 3), and the 1-skeleton of a cube. Clearly, only the last one has the required number of vertices. An S3 -action yielding a standard representation has to be the one given by fixing two vertices and permuting 3 edges incident at one of them in a natural way. This however yields two copies of the standard representation when acting on homology, which contradicts our assumptions. Case (9): In this case we are dealing with an edge-transitive G-action on 1skeleton of a tetrahedron. Such an action has to also be vertex-transitive, but S3 cannot act transitively on 4 points. Case (10): In this case Z is obtained by taking a wedge of two 3-cage graphs, C1 and C2 , say. Since the action of G is edge-transitive, for any edge e in Z we have |StabG (e)| = 8 and hence each 3-cycle acts freely. Since a 3-cycle cannot swap C1 and C2 , it must act in the natural way on edges of both. Hence there have to be two copies of the standard representation of S3 in H1 (Z, C), which is not the case. Case (11): In this case Z is a 3-cage. If G = G3 , then S4 < G3 cannot act on Z yielding the desired standard or signed standard representation. Suppose now that G = W3 . If ǫ1 preserves exactly one edge, then so do ǫ2 and ǫ3 ; these edges are distinct, as otherwise we would have some ǫi and ǫj acting in the same way where i 6= j, and so H1 (Z, C) 6 V0 ⊕ V3 , where S3 cannot have a standard representation. Since the edges are distinct, ǫ1 and ǫ2 cannot commute. This shows that each ǫi preserves all edges of Z, and hence H1 (Z, C) 6 V0 ⊕V3 , which is a contradiction. Case (12): The graph Z is a bipartite graph with 4 vertices and exactly zero or two edges connecting each pair of vertices. Hence Z admits a G-equivariant quotient map to a square (i.e. a single cycle made of 4 edges) which is a 2-to-1 map on edges. Each 3-cycle acts trivially on the square; moreover it cannot act non-trivially on the preimages of edges of the square. We conclude that each 3-cycle acts trivially, which is a contradiction. Case (13): We easily check that the graph Z consists of three vertices, each of which has exactly two edges connecting it to each of the other two. Since the 3-cycle in S3 acts non-trivially, it has to act transitively on vertices, and so either each vertex in Z comes from collapsing a subgraph which was not a tree in X, or none of them does. Neither of these two cases is possible, since the rank of X is 5. Case (14): In this case Z is a 4-cage. Each edge in Z has a corresponding edge in X, and the fact that X is G-admissible implies that these edges do not form a forest. Hence they can form either a single simple loop, a pair of simple loops, or a 4-cage in X. The first two cases are impossible, since they would yield a trivial action of the 3-cycle of S3 on Z. Hence X contains Z as a subgraph. Our assumption on the representations of G tells us that either ∆ or each transposition in S3 has to flip Z, and so X is a 4-cage with a loop of length one 27 attached to each vertex. Let a and b be two vectors in H1 (X, C), each given by putting a weight 1 on exactly one of the loops. If ∆ flips the graph, then a+b and a−b span two one-dimensional eigenspaces of ∆, one with eigenvalue +1, and one with eigenvalue −1. Hence transpositions in S3 have to map one of these vectors to itself, and the other to minus itself; this is only possible if they flip the graph, which contradicts our assumptions. A similar argument works if the transpositions in S3 flip X. Case (17): In this case Z = X is a 6-cage. As before we have |StabG (e)| = 8 for any edge e in Z. Hence each 3-cycle in S3 acts freely and so we have two copies of the standard S3 -representation, which is a contradiction. Case (18): In this case Z is a 3-rose. If Z is actually a subgraph of X, then we are done. Suppose it is not. As Z only has one vertex, there is a connected subgraph X ′ of X that we collapsed when constructing Z. Since X ′ is of rank 2, after erasing vertices of valence 2 (in X ′ ), we are left with two cases: a 2-rose or a 3-cage. Since Z is not a subgraph of X, and the preimages of edges of Z in X cannot form a forest, they either form a simple loop (of length three), or a disjoint union of three loops (each of length one). In any event, we have three vertices on which the 3-cycle in S3 acts transitively. Hence X ′ has to be a 3-cage, with the three vertices lying on the three edges of the cage. But then we get two standard representations of S3 inside the homology of X, which is a contradiction. Case (19): In this case Z is a 4-rose. The 3-cycle in S3 acts by permuting three petals, and fixing one; let us call this fixed edge f . We easily check that f is preserved setwise by S3 , and hence also by ∆, since ∆ commutes with S3 . If G = W3 then the one-dimensional subspace in H1 (Z, C) spanned by a vector corresponding to f is contained either in V0 or in V3 , and hence f has to be preserved by all elements in G. This contradicts transitivity of the action of G on Z. Suppose G = G3 . Note that there is only one way (up to isomorphism) in which S4 can act on a set of four elements transitively. Therefore, as ∆ commutes with S4 , ∆ acts as plus or minus the identity on H1 (Z, C). Now H1 (Z, C) as an S4 -representation is a sum of standard and trivial or signed standard and determinant representations. In particular, our hypothesis tells us that ∆ cannot act as either plus or minus the identity. This is a contradiction. Lemma 4.9. Suppose φ : Out(F3 ) → Out(F5 ) is a homomorphisms. Let ψ : Out(F5 ) → GL(V ) ∼ = GL5 (C) be the natural map, where V = H1 (F5 , C). Note that ψ ◦φ gives a representation of Out(F3 ) on V . If, as a Wn -module, V splits as V0 ⊕ V3 (with the notation of Definition 3.3) then the image of φ is finite. Proof. The fact that V = V0 ⊕ V3 as a Wn -module implies that ψ ◦ φ(ǫi ∆) = 1 for each i. Now a result of Baumslag–Taylor [2] tells us that the kernel of ψ is torsion-free, and so φ(ǫi ∆) = 1. But this means that we have the following 28 commutative diagram: φ / Out(F5 ) O ❥❥5 ❥ ❥ ❥ ❥❥ ❥ ❥ φ′ ❥❥ ❥ ❥ ❥ ❥  ∼ = / Out(F3 )/hh{ρij = λij : i 6= j}ii GL3 (Z) Out(F3 ) This allows us to use a result of Bridson and Farb [4], who have shown that such a φ′ necessarily has finite image. Therefore the image of φ is finite. Theorem 4.10. Suppose φ : Out(F3 ) → Out(F5 ) is a homomorphism. Then the image of φ is finite. Proof. Consider the natural map ψ : Out(F5 ) → GL5 (C) ∼ = GL(V ) as above. Again as above, the composition η = φ ◦ ψ gives us a 5-dimensional complex linear representation η : Out(F3 ) → GL5 (C). Suppose first that, with the notation of Definition 3.3, V satisfies V = V0 ⊕ V3 Then Lemma 4.9 yields the result. Now suppose that V = V0 ⊕ V1 ⊕ V2 ⊕ V3 where V1 ⊕ V2 6= {0}. We apply Proposition 3.15 to η. We will now apply Theorem 4.2 to two finite subgroups of Out(F5 ), namely φ(G3 ) and φ(W3 ), to obtain two graphs X and Y respectively, on which the groups G3 and W3 act. Note that H1 (X, C) ∼ = H1 (Y, C) ∼ = V , and the representations of G3 and W3 induced by the actions of the groups on homology of the respective graphs are isomorphic to the ones given by restricting η. Hence the conclusions of Proposition 3.15 apply to these representations, and so we can apply Proposition 4.8 to the actions G3 y X and W3 y Y . We conclude that both X and Y have a subgraph, preserved by the action of the respective group, isomorphic to a 3-rose. We also know that we can label the petals as e1 , e2 , e3 , so that S3 acts on this rose by permuting petals in the natural way, with the transpositions potentially also flipping all petals. Knowing that V1 ⊕ V2 6= {0} implies that in the W3 case, either each ǫi flips ei and leaves the other petals fixed, or each ǫi fixes ei and flips the other petals. In the G3 case, we see that there is only one way in which S4 can act on the 3-rose inducing a standard or a signed standard representation. Each σi4 has to interchange the two petals with labels different than ei and preserve the third one; additionally, it either flips ei and keeps some orientation of the other two fixed, or it flips the other two and fixes ei . These two cases depend on the action of σij for i, j 6 3. In any case, we have φ(σ14 ) = φ(σ23 ǫ2 ǫ3 ) and so σ14 ǫ1 φ(λ21 ) = φ(λ21 ) = φ(λ21 )φ(∆σ23 ) = φ(ρ31 ) Therefore −1 −1 −1 −1 1 = φ([ρ−1 23 , λ21 ]) = φ([ρ23 , ρ31 ]) = φ(ρ21 ) It follows that all Nielsen moves (which generate an index 2 subgroup of Out(F3 )) lie in the kernel od φ, and so the image of φ is of size at most 2, determined by φ(ǫ1 ). 29 References [1] J. Aramayona, C. J. Leininger, and J. Souto. Injections of mapping class groups. Geom. Topol., 13(5):2523–2541, 2009. [2] G. Baumslag and T. Taylor. The centre of groups with one defining relator. Math. Ann., 175:315–319, 1968. [3] O. Bogopol’skiı̆ and D. Puga. On embeddings of Out(Fn ), the outer automorphism group of the free group of rank n, into Out(Fm ) for m > n. Algebra and Logic, 41(2):69–73, 2002. [4] M. R. Bridson and B. Farb. A remark about actions of lattices on free groups. Topology Appl., 110(1):21–24, 2001. [5] M. R. Bridson and K. Vogtmann. Homomorphisms from automorphism groups of free groups. Bull. London Math. Soc., 35(6):785–792, 2003. [6] M. R. Bridson and K. Vogtmann. Abelian covers of graphs and maps between outer automorphism groups of free groups. Mathematische Annalen, pages 1–34, 2011. [7] M. Culler. Finite groups of outer automorphisms of a free group. In Contributions to group theory, volume 33 of Contemp. Math., pages 197–207. Amer. Math. Soc., Providence, RI, 1984. [8] S. M. Gersten. A presentation for the special automorphism group of a free group. J. Pure Appl. Algebra, 33(3):269–279, 1984. [9] F. Grunewald and A. Lubotzky. morphism group of a free group. 18(5):1564–1608, June 2006. [10] N. Kawazumi. arXiv:0505497. Cohomological Linear representations of the autoGeometric and Functional Analysis, aspects of magnus expansions. [11] D. G. Khramtsov. Finite groups of automorphisms of free groups. Mat. Zametki, 38(3):386–392, 476, 1985. [12] D. G. Khramtsov. Outer automorphisms of free groups. In Group-theoretic investigations (Russian), pages 95–127. Akad. Nauk SSSR Ural. Otdel., Sverdlovsk, 1990. [13] D. Kielak. Outer automorphism groups of free groups: linear and free representations. J. London Math. Soc., 87(3):917–942, 2013. [14] J. L. Mennicke. Finite factor groups of the unimodular group. Ann. of Math. (2), 81:31–37, 1965. [15] A. Potapchik and A. Rapinchuk. Low-dimensional linear representations of Aut Fn , n ≥ 3. Trans. Amer. Math. Soc., 352(3):1437–1451, 2000. [16] V. Turchin and T. Willwacher. Hochschild–Pirashvili homology on suspensions and representations of Out(Fn ). In preparation. [17] B. Zimmermann. Finite groups of outer automorphisms of free groups. Glasgow Math. J., 38(3):275–282, 1996. 30
4math.GR
arXiv:1710.08625v1 [math.AC] 24 Oct 2017 LOCALIZATION FUNCTORS AND COSUPPORT IN DERIVED CATEGORIES OF COMMUTATIVE NOETHERIAN RINGS TSUTOMU NAKAMURA AND YUJI YOSHINO Abstract. Let R be a commutative Noetherian ring. We introduce the notion of localization functors λW with cosupports in arbitrary subsets W of Spec R; it is a common generalization of localizations with respect to multiplicatively closed subsets and left derived functors of ideal-adic completion functors. We prove several results about the localization functors λW , including an explicit way to calculate λW by the notion of Čech complexes. As an application, we can give a simpler proof of a classical theorem by Gruson and Raynaud, which states that the projective dimension of a flat R-module is at most the Krull dimension of R. As another application, it is possible to give a functorial way to replace complexes of flat R-modules or complexes of finitely generated R-modules by complexes of pure-injective R-modules. Contents 1. Introduction 2. Localization functors 3. Auxiliary results on localization functors 4. Projective dimension of flat modules 5. Cotorsion flat modules and cosupport 6. Complexes of cotorsion flat modules and cosupport 7. Localization functors via Čech complexes 8. Čech complexes and complexes of finitely generated modules 9. Čech complexes and complexes of pure-injective modules References 1 4 6 13 14 15 17 21 23 25 1. Introduction Throughout this paper, we assume that R is a commutative Noetherian ring. We denote by D = D(Mod R) the derived category of all complexes of R-modules, by which we mean that D is the unbounded derived category. For a triangulated subcategory T of D, its left (resp. right) orthogonal subcategory is defined as ⊥ T = { X ∈ D | HomD (X, T ) = 0 } (resp. T ⊥ = { Y ∈ D | HomD (T , Y ) = 0 }). Moreover, T is called localizing (resp. colocalizing) if T is closed under arbitrary direct sums (resp. direct products). Recall that the support of a complex X ∈ D is defined as follows;  supp X = p ∈ Spec R X ⊗LR κ(p) 6= 0 , 2010 Mathematics Subject Classification. 13D09, 13D45, 55P60. Key words and phrases. colocalizing subcategory, cosupport, local homology. 1 2 T. NAKAMURA AND Y. YOSHINO where κ(p) = Rp /pRp . We write LW = { X ∈ D | supp X ⊆ W } for a subset W of Spec R. Then LW is a localizing subcategory of D. Neeman [17] proved that any localizing subcategory of D is obtained in this way. The localization theory of triangulated categories [13] yields a couple of adjoint pairs (iW , γW ) and (λW , jW ) as it is indicated in the following diagram: iW LW o (1.1) / γW D o λW L⊥ W / jW Here, iW and jW are the inclusion functors LW ֒→ D and L⊥ W ֒→ D respectively. In the precedent paper [16], the authors introduced the colocalization functor with support in W as the functor γW . If V is a specialization-closed subset of Spec R, then γV coincides with the right derived functor RΓV of the section functor ΓV with support in V ; it induces the local cohomology functors HVi (−) = H i (RΓV (−)). In loc. cit., we established some methods to compute γW for general subsets W of Spec R. Furthermore, the local duality theorem and Grothendieck type vanishing theorem of local cohomology was extended to the case of γW . On the other hand, in this paper, we introduce the notion of localizations functors with cosupports in arbitrary subsets W of Spec R. Recall that the cosupport of a complex X ∈ D is defined as follows; cosupp X = { p ∈ Spec R | RHomR (κ(p), X) 6= 0 } . We write C W = { X ∈ D | cosupp X ⊆ W } for a subset W of Spec R. Then C W is a colocalizing subcategory of D. Neeman [18] proved that any colocalizing subcategory of D is obtained in this way.1 We remark that there are equalities ⊥ W C (1.2) = LW c , C W = L⊥ Wc, where W c = Spec R\W . The second equality follows from Neeman’s theorem [17, Theorem 2.8], which states that LW c is equal to the smallest localizing subcategory of D containing the set { κ(p) | p ∈ W c }. Then it is seen that the first one holds, since ⊥ (L⊥ W c ) = LW c (cf. [13, §4.9]). Now we write λW = λW c and j W = jW c . By (1.1) and (1.2), there is a diagram of adjoint pairs: ⊥ W C = LW c o iW c γW c / D o λW j W / C W = L⊥ Wc We call λW the localization functor with cosupport in W . For a multiplicatively closed subset S of R, the localization functor λUS with cosupport in US is nothing but (−) ⊗R S −1 R, where US = { p ∈ Spec R | p ∩ S = ∅ }. Moreover, for an ideal a of R, the localization functor λV (a) with cosupport in V (a) is isomorphic to the left derived functor LΛV (a) of the a-adic completion functor ΛV (a) = lim(− ⊗R R/an ) defined on Mod R. See Section 2 for details. ←− In this paper, we establish several results about the localization functor λW with cosupport in a general subset W of Spec R. 1This result is not needed in this work. LOCALIZATION FUNCTORS AND COSUPPORT 3 Q In Section 3, we prove that λW is isomorphic to p∈W LΛV (p) (− ⊗R Rp ) if there is no inclusion relation between two distinct prime ideals in W . Furthermore, we give a method to compute λW for a general subset W . We write η W : idD → λW (= j W λW ) for the natural morphism given by the adjointness of (λW , j W ). In addition, note that when W0 ⊆ W , there is a morphism η W0 λW : λW → λW0 λW ∼ = λW0 . The following theorem is one of the main results of this paper. Theorem 1.3 (Theorem 3.15). Let W , W0 and W1 be subsets of Spec R with W = s g W0 ∪W1 . We denote by W0 (resp. W1 ) is the specialization (resp. generalization) closure of W . Suppose that one of the following conditions holds: s (1) W0 = W0 ∩ W ; g (2) W1 = W ∩ W1 . Then, for any X ∈ D, there is a triangle g f λW X −−−−→ λW1 X ⊕ λW0 X −−−−→ λW1 λW0 X −−−−→ λW X[1], where f= η W1 λW X η W0 λW X ! , g= λW1 η W0 X (−1) · η W1 λW0 X  . This theorem enables us to compute λW by using λW0 and λW1 for smaller subsets W0 and W1 . Furthermore, as long as we consider the derived category D, the theorem and Theorem 3.22 in Section 3 generalize Mayer-Vietoris triangles by Benson, Iyengar and Krause [2, Theorem 7.5]. In Section 4, as an application, we give a simpler proof of a classical theorem due to Gruson and Raynaud. The theorem states that the projective dimension of a flat R-module is at most the the Krull dimension of R. Section 5 contains some basic facts about cotorsion flat R-modules. Section 6 is devoted to study the cosupport of a complex X consisting of cotorsion flat R-modules. As a consequence, we can calculate γV c X and λV X explicitly for a specialization-closed subset V of Spec R. In Section 7, using Theorem 1.3 above, we give a new way to get λW . In fact, provided that d = dim R is finite, we are able to calculate λW by a Čech complex of functors of the following form; Y Y λ̄Wi −−−−→ λ̄Wj λ̄Wi −−−−→ · · · −−−−→ λ̄Wd · · · λ̄W0 , 0≤i≤d 0≤i<j≤d Q where Wi = {p ∈ W | dim R/p = i} and λ̄Wi = p∈Wi ΛV (p) (−⊗R Rp ) for 0 ≤ i ≤ d. This Čech complex sends a complex X of R-module to a double complex in a natural way. We shall prove that λW X is isomorphic to the total complex of the double complex if X consists of flat R-modules. Section 8 treats commutativity of λW with tensor products. Consequently, we show that λW Y can be computed by using the Čech complex above if Y is a complex of finitely generated R-modules. In Section 9, as an application, we give a functorial way to construct quasiisomorphisms from complexes of flat R-modules or complexes of finitely generated R-modules to complexes of pure-injective R-modules. 4 T. NAKAMURA AND Y. YOSHINO Acknowledgements. The first author is grateful to Srikanth Iyengar for his helpful comments and suggestions. The second author was supported by JSPS Grantin-Aid for Scientific Research 26287008. 2. Localization functors In this section, we summarize some notion and basic facts used in the later sections. We write Mod R for the category of all modules over a commutative Noetherian ring R. For an ideal a of R, ΛV (a) denotes the a-adic completion functor lim(− ⊗R ←− R/an ) defined on Mod R. Moreover, we also denote by Ma∧ the a-adic completion ΛV (a) M = lim M/an M of an R-module M . If the natural map M → Ma∧ is an ←− isomorphism, then M is called a-adically complete. In addition, when R is a local c for the m-adic completion of M . ring with maximal ideal m, we simply write M We start with the following proposition. Proposition 2.1. Let a be an ideal of R. If F is a flat R-module, then so is Fa∧ . As stated in [20, 2.4], this fact is known. For the reader’s convenience, we mention that this proposition follows from the two lemmas below. Lemma 2.2. Let a be an ideal of R and F be a flat R-module. We consider a short exact sequence of finitely generated R-modules 0 −−−−→ L −−−−→ M −−−−→ N −−−−→ 0. Then ∧ ∧ 0 −−−−→ (F ⊗R L)∧ a −−−−→ (F ⊗R M )a −−−−→ (F ⊗R N )a −−−−→ 0 is exact. Lemma 2.3. Let a and F be as above. Then we have a natural isomorphism (F ⊗R M )∧ ∼ = F ∧ ⊗R M a a for any finitely generated R-module M . Using Artin-Rees Lemma and [5, I; §2; Proposition 6], we can prove Lemma 2.2, from which we obtain Lemma 2.3. Furthermore, Lemma 2.2 and Lemma 2.3 imply that Fa∧ ⊗R (−) is an exact functor from the category of finitely generated R-modules to Mod R. Therefore Proposition 2.1 holds.  It is also possible to show that Fa∧ is flat over Ra∧ by the same argument as above. If R is a local ring with maximal ideal m, then m-adically complete flat R-modules are characterized as follows: Lemma 2.4. Let (R, m, k) be a local ring and F a flat R-module. Set B = dimk F/mF . Then there is an isomorphism M \ Fb ∼ R, = where L B B R is the direct sum of B-copies of R. LOCALIZATION FUNCTORS AND COSUPPORT 5 This lemma is proved in [19, II; Proposition 2.4.3.1]. See also [8, Lemma 6.7.4]. As in the introduction, we denote by D = D(Mod R) the derived category of all complexes of R-modules. We write complexes X cohomologically; X = (· · · → X i−1 → X i → X i+1 → · · · ). For a complex P (resp. F ) of R-modules, we say that P (resp. F ) is K-projective (resp. K-flat) if HomR (P, −) (resp. (−) ⊗R F ) preserves acyclicity of complexes, where a complex is called acyclic if all its cohomology modules are zero. Let a be an ideal of R and X ∈ D. If P is a K-projective resolution of X, then we have LΛV (a) X ∼ = ΛV (a) P . Moreover, LΛV (a) X is also isomorphic to ΛV (a) F if F is a K-flat resolution of X. In addition, it is known that the following proposition holds. Proposition 2.5. Let a be an ideal of R and X be a complex of flat R-modules. Then LΛV (a) X is isomorphic to ΛV (a) X. To prove this proposition, we remark that there is an integer n ≥ 0 such that H (LΛV (a) M ) = 0 for all i > n and all R-modules M , see [10, Theorem 1.9] or [1, p. 15]. Using this fact, we can show that ΛV (a) preserves acyclicity of complexes of flat R-modules. Then it is straightforward to see that LΛV (a) X is isomorphic to ΛV (a) X.  i Let W be any subset of Spec R. Recall that γW denotes a right adjoint to the inclusion functor iW : LW ֒→ D, and λW denotes a left adjoint to the inclusion functor j W : C W ֒→ D. Moreover, γW and λW are identified with iW γW and j W λW respectively. We write εW : γW → idD and η W : idD → λW for the natural morphisms induced by the adjointness of (iW , γW ) and (λW , j W ) respectively. Note that λW η W (resp. γW εW ) is invertible, and the equality λW η W = η W λW (resp. γW εW = εW γW ) holds, i.e., λW (resp. γW ) is a localization (resp. colocalization) functor on D. See [13] for more details. In this paper, we call λW the localization functor with cosupport in W . Under (1.2), we restate [16, Lemma 2.1] as follows. Lemma 2.6. Let W be a subset of Spec R. For any X ∈ D, there is a triangle of the following form; ε cX ηW X γW c X −−W−−→ X −−−−→ λW X −−−−→ γW c X[1]. Furthermore, if X ′ −−−−→ X −−−−→ X ′′ −−−−→ X ′ [1] is a triangle with X ∈ ⊥ C W = LW c and X ′′ ∈ C W = L⊥ W c , then there exist unique isomorphisms a : γW c X → X ′ and b : λW X → X ′′ such that the following diagram is commutative: ′ ε cX ηW X γW c X −−W−−→ X −−−−→ λW X −−−−→ γW c X[1]    a a[1]  y y yb X′ −−−−→ X −−−−→ X ′′ −−−−→ X ′ [1] 6 T. NAKAMURA AND Y. YOSHINO Remark 2.7. (i) Let X ∈ D and W be a subset of Spec R. By Lemma 2.6, X to saying that belongs to ⊥ C W = LW c if and only if λW X = 0. T T This is equivalent λ{p} X = 0 for all p ∈ W , since ⊥ C W = LW c = p∈W L{p}c = p∈W ⊥ C {p} . (ii) Let W0 ⊆ W be subsets of Spec R with W0 ⊆ W . It follows from the uniqueness of adjoint functors that λW0 λW ∼ = λW λW0 , = λW0 ∼ see also [16, Remark 3.6 (i)]. Now we give a typical example of localization functors. Let S be a multiplicatively closed subset S of R, and set US = { p ∈ Spec R | p ∩ S = ∅ }. It is known that the localization functor λUS with cosupport in US is nothing but (−)⊗R S −1 R. For the reader’s convenience, we give a proof of this fact. Let X ∈ D. It is clear that cosupp X ⊗R S −1 R ⊆ US , or equivalently, X ⊗R S −1 R ∈ C US . Moreover, embedding the natural morphism X → X ⊗R S −1 R into a triangle C −−−−→ X −−−−→ X ⊗R S −1 R −−−−→ C[1], we have C ⊗R S −1 R = 0. This yields an inclusion relation supp C ⊆ (US )c . Hence it holds that C ∈ L(US )c . Since we have shown that C ∈ L(US )c and X⊗R S −1 R ∈ C US , it follows from Lemma 2.6 that λUS X ∼ = X ⊗R S −1 R. Therefore we obtain the isomorphism ∼ (−) ⊗R S −1 R. (2.8) λUS = For p ∈ Spec R, we write U (p) = { q ∈ Spec R | q ⊆ p }. If S = R\p, then U (p) is equal to US , so that λU(p) ∼ = (−) ⊗R Rp by (2.8). We remark that λU(p) = λU(p)c is written as LZ(p) in [2], where Z(p) = U (p)c . There is another important example of localization functors. Let a be an ideal of R. It was proved by [10] and [1] that LΛV (a) : D → D is a right adjoint to RΓV (a) : D → D. In [16, Porposition 5.1], using the adjointness property of (RΓV (a) , LΛV (a) ), we proved that λV (a) = λV (a)c coincides with LΛV (a) . Hence there are isomorphisms; λV (a) ∼ = LΛV (a) . (2.9) The functor Hia (−) = H −i (LΛV (a) (−)) is called the ith local homology functor with respect to a. A subset W of Spec R is said to be specialization-closed (resp. generalizationclosed) provided that the following condition holds; if p ∈ W and q ∈ Spec R with p ⊆ q (resp. p ⊇ q), then q ∈ W . If V is a specialization-closed subset, then we have (2.10) γV ∼ = RΓV , see [14, Appendix 3.5]. 3. Auxiliary results on localization functors In this section, we give several results to compute localization functors λW with cosupports in arbitrary subsets W of Spec R. We first give the following lemma. LOCALIZATION FUNCTORS AND COSUPPORT 7 Lemma 3.1. Let V be a specialization-closed subset of Spec R. Then we have the following equalities; Vc ⊥ V . C = LV c = L⊥ V =C Proof. This follows from [16, Lemma 4.3] and (1.2).  s Let W be a subset of Spec R. We denote by W the specialization closure of W , which is the smallest specialization-closed subset of Spec R containing W . Moreover, for a subset W0 of W , we say that W0 is specialization-closed in W if V (p) ∩ W ⊆ W0 for any p ∈ W0 (cf. [16, Definition 3.10]). This is equivalent to s saying that W0 ∩ W = W0 . Corollary 3.2. Let W0 ⊆ W ⊆ Spec R be sets. Suppose that W0 is specializationclosed in W . Setting W1 = W \ W0 , we have C W1 ⊆ ⊥ C W0 . s Proof. Notice that W1 ⊆ (W0 )c . Furthermore, we have ⊥ C W0 s c s Lemma 3.1. Hence it holds that C W1 ⊆ C (W0 ) = ⊥ C W0 ⊆ ⊥ C W0 . s = C (W0 s c ) by  Remark 3.3. For an ideal a of R, λV (a) is a right adjoint to γV (a) by (2.9) and (2.10). More generally, it is known that for any specialization-closed subset V , λV : D → D is a right adjoint to γV : D → D. We now prove this fact, which will be used in the next proposition. Let X, Y ∈ D, and consider the following triangles; c γV X −−−−→ X −−−−→ λV X −−−−→ γV X[1], γV c Y −−−−→ Y −−−−→ λV Y −−−−→ γV c Y [1]. c c Since λV X ∈ C V = ⊥ C V by Lemma 3.1, applying HomD (−, λV Y ) to the first triangle, we have HomD (γV X, λV Y ) ∼ = HomD (X, λV Y ). Moreover, Lemma 3.1 ⊥ implies that γV c Y ∈ LV c = LV . Hence, applying HomD (γV X, −) to the second triangle, we have HomD (γV X, Y ) ∼ = HomD (γV X, λV Y ). Thus there is a natural ∼ isomorphism HomD (γV X, Y ) = HomD (X, λV Y ), so that (γV , λV ) is an adjoint pair. See also [16, Remark 5.2]. Proposition 3.4. Let V and U be arbitrary subsets of Spec R. Suppose that one of the following conditions holds: (1) V is specialization-closed; (2) U is generalization-closed. Then we have an isomorphism λV λU ∼ = λV ∩U . Proof. Let X ∈ D and Y ∈ C V ∩U = C V ∩ C U . Then there are natural isomorphisms HomD (λV λU X, Y ) ∼ = HomD (λU X, Y ) ∼ = HomD (X, Y ). Recall that λV ∩U is a left adjoint to the inclusion functor C V ∩U ֒→ D. Hence, by the uniqueness of adjoint functors, we only have to verify that λV λU X ∈ C V ∩U . Since λV λU X ∈ C V , it remains to show that λV λU X ∈ C U . Case (1): Let p ∈ U c . Since supp γV κ(p) ⊆ {p}, it follows from (1.2) that γV κ(p) ∈ LU c = ⊥ C U . Thus, by the adjointness of (γV , λV ), we have RHomR (κ(p), λV λU X) ∼ = RHomR (γV κ(p), λU X) = 0. This implies that cosupp λV λU X ⊆ U , i.e., λV λU X ∈ C U . 8 T. NAKAMURA AND Y. YOSHINO Case (2): Since U c is specialization-closed, the case (1) yields an isomorphism c λ λ ∼ = λU ∩V . Furthermore, setting W = (U c ∩ V ) ∪ U , we see that U c ∩ V is c specialization-closed in W , and W \(U c ∩ V ) = U . Hence we have λU (λV λU X) ∼ = c λU ∩V λU X = 0, by Corollary 3.2. It then follows from Lemma 3.1 that λV λU X ∈ ⊥ Uc C = CU .  Uc V Remark 3.5. For arbitrary subsets W0 and W1 of Spec R, Remark 2.7 (ii) and Proposition 3.4 yield the following isomorphisms; s λW0 λW1 ∼ = λW0 λW0 λW1 g λW0 λW1 ∼ = λW0 λW1 λW1 s ∼ = λW0 λW0 ∩W1 , g ∼ = λW0 ∩W1 λW1 . The next result is a corollary of (2.8), (2.9) and Proposition 3.4. Corollary 3.6. Let S be a multiplicatively closed subset of R and a be an ideal of R. We set W = V (a) ∩ US . Then we have λW ∼ = LΛV (a) (− ⊗R S −1 R). Since V (p) ∩ U (p) = {p} for p ∈ Spec R, as a special case of this corollary, we have the following result. Corollary 3.7. Let p be a prime ideal of R. Then we have λ{p} ∼ = LΛV (p) (− ⊗R Rp ). The next lemma follows from this corollary and Lemma 2.4. {p} Lemma 3.8. LetL p be a prime ideal Lof R and F be a flat R-module. Then λ F ∧ is isomorphic to ( B Rp )p , where B Rp is the direct sum of B-copies of Rp and B = dimκ(p) F ⊗R κ(p). Remark 3.9. Let W1 and W2 be subsets of Spec R. In general, λW1 λW2 need not be isomorphic to λW2 λW1 . For example, let p, q ∈ Spec R with p ( q. Then cp ⊗R κ(q) = 0 and (λ{q} R) ⊗R κ(p) = R cq ⊗R κ(p) 6= 0. Then (λ{p} R) ⊗R κ(q) = R {q} {p} {p} {q} we see from Lemma 3.8 that λ λ R = 0 and λ λ R 6= 0. Compare this remark with [2, Example 3.5]. See also [16, Remark 3.7 (ii)]. Let p be a prime ideal which is not maximal. Then λ{p} is distinct from Λp = LΛV (p) RHomR (Rp , −), which is introduced in [3]. To see this, let q be a prime cq = {q} ⊆ U (p)c . Hence R cq belongs ideal with p ( q. Then it holds that cosupp R U(p)c ⊥ U(p)c c to C . Then we have RHomR (Rp , Rq ) = 0 since Rp ∈ LU(p) = C by V (p) pc {p} c ∼ c (1.2). This implies that Λ Rq = LΛ RHomR (Rp , Rq ) = 0, while λ Rq = λ{p} λ{q} R 6= 0 by Remark 3.9. Let W be a subset of Spec R. We denote by dim W the supremum of lengths of chains of distinct prime ideals in W (cf. [16, Definition 3.6]). Theorem 3.10. Let W be a subset of Spec R. We assume that dim W = 0. Then there are isomorphisms Y Y λW ∼ λ{p} ∼ LΛV (p) (− ⊗R Rp ). = = p∈W p∈W LOCALIZATION FUNCTORS AND COSUPPORT 9 Proof. Let X ∈ D, and consider the natural morphisms η {p} X → λ{p} X for p ∈ W the product of the morphisms, and we obtain a morphism f : X → Q . Take {p} λ X. Embed f into a triangle p∈W Y f C −−−−→ X −−−−→ λ{p} X −−−−→ C[1]. Q p∈W {p} Note that p∈W λ X ∈ C . We have to prove that C ∈ ⊥ C W . For this purpose, take any prime ideal q ∈ W Q. Then {q} is specialization-closed in W , because dim W = 0. Hence we have p∈W \{q} λ{p} X ∈ C W \{q} ⊆ ⊥ C {q} , by Corollary 3.2. Q Thus an isomorphism λ{q} ( p∈W λ{p} X) ∼ = λ{q} X holds. Then it is seen from the triangle above that λ{q} C = 0 for all q ∈ Q W , so that C ∈ ⊥ C W , see Remark 2.7 W ∼ (ii). Therefore Lemma 2.6 yields λ X = p∈W λ{p} X. The second isomorphism in the theorem follows from Corollary 3.7.  W Example 3.11. Let W be a subset of Spec R such that W is an infinite set with dim W = 0. Let X {p} be a complex with cosupp X {p} = {p} for each p ∈ W . c We take p ∈ W . Since dim W = 0, it holds that X {q} ∈ C V (p) for any q ∈ c W \{p}. Furthermore, Lemma 3.1 implies that C V (p) isLequal to ⊥ C V (p) , which is c closed under arbitrary direct sums. Thus it holds that q∈W \{p} X {q} ∈ C V (p) = L ⊥ V (p) C ⊆ ⊥ C {p} . Therefore, setting Y = p∈W X {p} , we have λ{p} Y ∼ = X {p} . It then follows from Theorem 3.10 that Y Y ∼ ∼ λW Y = λ{p} Y = X {p} . p∈W p∈W Under this identification, the natural Y → λW Y coincides with the L Q morphism {p} {p} canonical morphism p∈W X → p∈W X , which is not an isomorphism. L {p} is not Remark 3.12. Let W , X {p} be as in Example 3.11. Then p∈W X L L {p} {p} W W → λ ( p∈W X ) is not in C , because the natural morphism p∈W X L {p} X properly contains W . In an isomorphism. Hence the cosupport of p∈W L {p} particular, setting X = κ(p), we have W ( cosupp p∈W κ(p). Similarly, we Q can prove that W ( supp p∈W κ(p). The first author noticed these facts through discussion with Srikanth Iyengar. It is possible to give another type of examples, by which we also see that a colocalizing subcategory of D is not necessarily closed under arbitrary direct sums. Suppose that (R, m) is a complete local ring with dim R ≥ 1. Then we have b ∈ C V (m) . However the free module L R is never m-adically complete, so R∼ R =L N L L that N R is not isomorphic to λV (m) ( N R). Hence N R is not in C V (m) . g For a subset W of Spec R, W denotes the generalization closure of W , which is the smallest generalization-closed subset of Spec R containing W . In addition, for a subset W1 ⊆ W , we say that W1 is generalization-closed in W if W ∩ U (p) ⊆ W1 g for any q ∈ W1 . This is equivalent to saying that W ∩ W1 = W1 . We extend Proposition 3.4 to the following corollary, which will be used in a main theorem of this section. Corollary 3.13. Let W0 and W1 be arbitrary subsets of Spec R. Suppose that one of the following conditions hold: (1) W0 is specialization-closed in W0 ∪ W1 ; 10 T. NAKAMURA AND Y. YOSHINO (2) W1 is generalization-closed in W0 ∪ W1 . Then we have an isomorphism λW0 λW1 ∼ = λW0 ∩W1 . Proof. Set W = W0 ∪ W1 . By the assumption, we have s g W0 ∩ W = W0 or W ∩ W1 = W1 . Therefore, it holds that s g W0 ∩ W1 = W0 ∩ W1 or W0 ∩ W1 = W0 ∩ W1 . Hence this proposition follows from Remark 3.5 and Remark 2.7 (ii).  Remark 3.14. (i) Let W0 and W be a subset of Spec R with W0 ⊆ W . Under the isomorphism λW0 λW ∼ = λW0 by Remark 2.7 (ii), there is a morphism η W0 λW : W W0 λ →λ . (ii) Let W0 and W1 be subsets of Spec R. Let X ∈ D. Since η W1 : idD → λW1 is a morphism of functors, there is a commutative diagram of the following form: η W0 X X −−−−→   W1 yη X λW1 η W0 X λW0 X   W1 W0 yη λ X λW1 X −−−−−−−→ λW1 λW0 X Now we prove the following result, which is the main theorem of this section. Theorem 3.15. Let W , W0 and W1 be subsets of Spec R with W = W0 ∪ W1 . Suppose that one of the following conditions holds: (1) W0 is specialization-closed in W ; (2) W1 is generalization-closed in W . Then, for any X ∈ D, there is a triangle of the following form; g f λW X −−−−→ λW1 X ⊕ λW0 X −−−−→ λW1 λW0 X −−−−→ λW X[1], where f and g are morphisms represented by the following matrices; ! η W1 λW X  f= , g = λW1 η W0 X (−1) · η W1 λW0 X . W0 W η λ X Proof. We embed the morphism g into a triangle g a C −−−−→ λW1 X ⊕ λW0 X −−−−→ λW1 λW0 X −−−−→ C[1]. Notice that C ∈ C W since C W0 , C W1 ⊆ C W . By Remark 3.14, it is easily seen that g · f = 0. Thus there is a morphism b : λW X → C making the following diagram commutative: λW X −−−−→ 0 −−−−→ X[1] λW X      f  a[1] (3.16) yb y y y C a g −−−−→ λW1 X ⊕ λW0 X −−−−→ λW1 λW0 X −−−−→ C[1] LOCALIZATION FUNCTORS AND COSUPPORT 11 We only have to show that b is an isomorphism. To do this, embedding the morphism b into a triangle b (3.17) Z −−−−→ λW X −−−−→ C −−−−→ Z[1], we prove that Z = 0. Since λW X, C ∈ C W , Z is belongs to C W . Hence it suffices to show that Z ∈ ⊥ C W . First, we prove that λW1 b is an isomorphism. We employ a similar argument to [2, Theorem 7.5]. Consider the following sequence g f (3.18) λW X −−−−→ λW1 X ⊕ λW0 X −−−−→ λW1 λW0 X, and apply λW1 to it. Then we obtain a sequence which can be completed to a split triangle. The triangle appears in the first row of the diagram below. Moreover, λW1 sends the second row of the diagram (3.16) to a split triangle, which appears in the second row of the the diagram below. λW1 f λW1 g 0 λW1 a λW1 g 0 λW1 X −−−−→ λW1 X ⊕ λW1 λW0 X −−−−→ λW1 λW0 X −−−−→ λW1 X[1]    W1  W1 yλ b[1] yλ b λW1 C −−−−→ λW1 X ⊕ λW1 λW0 X −−−−→ λW1 λW0 X −−−−→ λW1 C[1] Since this diagram is commutative, we conclude that λW1 b is an isomorphism. Next, we prove that λW0 b is an isomorphism. Thanks to Corollary 3.13, we are able to follow the same process as above. In fact, the corollary implies that λW0 λW1 ∼ = λW0 ∩W1 . Thus, applying λW0 to the sequence (3.18), we obtain a sequence which can be completed into the split triangle. Furthermore, λW0 sends the second row of the diagram (3.16) to a split triangle. Consequently we see that there is a morphism of triangles: λW0 f λW0 g 0 λW0 a λW0 g 0 λW0 X −−−−→ λW0 ∩W1 X ⊕ λW0 X −−−−→ λW0 ∩W1 X −−−−→ λW0 X[1]    W0  W0 yλ b[1] yλ b λW0 C −−−−→ λW0 ∩W1 X ⊕ λW0 X −−−−→ λW0 ∩W1 X −−−−→ λW0 C[1] Therefore λW0 b is an isomorphism. Since we have shown that λW0 b and λW1 b are isomorphisms, it follows from the triangle (3.17) that λW0 Z = λW1 Z = 0. Thus we have Z ∈ ⊥ C W by Remark 2.7 (i).  Remark 3.19. Let f , g and a as above. Let h : X → λW1 X ⊕λW0 X be a morphism induced by η W1 X and η W0 X. Then g · h = 0 by Remark 3.14 (ii). Hence there is a morphism b′ : X → C such that the following diagram commutative: X  ′ yb a X   yh −−−−→ g 0   y −−−−→ X[1]  ′ yb [1] C −−−−→ λW1 X ⊕ λW0 X −−−−→ λW1 λW0 X −−−−→ C[1]. We can regard any morphism b′ making this diagram commutative as the natural morphism η W X. In fact, since λW h = f , applying λW to this diagram, and setting λW b′ = b, we obtain the diagram (3.16). Note that b · η W X = b′ . Moreover, the 12 T. NAKAMURA AND Y. YOSHINO above proof implies that b : λW X → C is an isomorphism. Thus we can identify b′ with η W X under the isomorphism b. We give some examples of Theorem 3.15. Example 3.20. (1) Let x be an element of R. Recall that λV (x) ∼ = LΛV (x) by n c V (x)c (2.9). We put S = { x | n ≥ 0 }. Since V (x) = US , it holds that λ = λUS ∼ = c (−) ⊗R Rx by (2.8). Set W = Spec R, W0 = V (x) and W1 = V (x) . Then the theorem yields the following triangle ∧ ∧ R −−−−→ Rx ⊕ R(x) −−−−→ (R(x) )x −−−−→ R[1]. (2) Suppose that (R, m) be a local ring. Let p ∈ Spec R with dim R/p = 1. Setting W = V (p), W0 = V (m) and W1 = {p}, we see from the theorem and Corollary 3.7 that there is a short exact sequence cp ⊕ R b −−−−→ ([ b p −−−−→ 0. 0 −−−−→ Rp∧ −−−−→ R R) Actually, this gives a pure-injective resolution of Rp∧ , see Section 9. Moreover, if R is a 1-dimensional local domain with quotient field Q, then this short exact sequence is of the form b −−−−→ R b ⊗R Q −−−−→ 0. 0 −−−−→ R −−−−→ Q ⊕ R By similar arguments to Proposition 3.4 and Corollary 3.13, one can prove the following proposition, which is a generalized form of [16, Proposition 3.1]. Proposition 3.21. Let W0 and W1 be arbitrary subsets of Spec R. Suppose that one of the following conditions hold: (1) W0 is specialization-closed in W0 ∪ W1 ; (2) W1 is generalization-closed in W0 ∪ W1 . Then we have an isomorphism γW0 γW1 ∼ = γW0 ∩W1 . As with Theorem 3.15, it is possible to prove the following theorem, in which we implicitly use the fact that γW0 γW ∼ = γW0 if W0 ⊆ W (cf. [16, Remark 3.6]). Theorem 3.22. Let W , W0 and W1 be subsets of Spec R with W = W0 ∪ W1 . Suppose that one of the following conditions holds: (1) W0 is specialization-closed in W ; (2) W1 is generalization-closed in W . Then, for any X ∈ D, there is a triangle of the following form; f g γW1 γW0 X −−−−→ γW1 X ⊕ γW0 X −−−−→ γW X −−−−→ γW1 γW0 X[1], where f and g are the morphisms represented by the following matrices; ! (−1) · γW1 εW0 X  f= , g = εW1 γW X εW0 γW X . εW1 γW0 X LOCALIZATION FUNCTORS AND COSUPPORT 13 Remark 3.23. As long as we work on the derived category D, Theorem 3.15 and Theorem 3.22 generalize Mayer-Vietoris triangles in the sense of Benson, Iyengar and Krause [2, Theorem 7.5], in which γV and λV are written as ΓV and LV respectively for a specialization-closed subset V of Spec R. 4. Projective dimension of flat modules As an application of results in Section 3, we give a simpler proof of a classical theorem due to Gruson and Raynaud. Theorem 4.1 ([19, II; Corollary 3.2.7]). Let F be a flat R-module. Then the projective dimension of F is at most dim R. We start by showing the following lemma. Lemma 4.2. Let F be a flat R-module and p be a prime ideal of R. Suppose that X ∈ C {p} . Then there is an isomorphism Y RHomR (F, X) ∼ X, = B where B = dimκ(p) F ⊗R κ(p). Proof. Since λ{p} : D → C {p} is a left adjoint to the inclusion functor C {p} ֒→ D, we have RHomR (F, X) ∼ = RHomR (λ{p} F, X). Moreover it follows from CorolL ∼ {p} (L R), where cp ∼ lary 3.7 and Lemma 2.4 that λ{p} F ∼ = ( B Rp )∧ = F p = λ B B = dimκ(p) F ⊗R κ(p). Therefore we obtain isomorphisms RHomR (F, X) ∼ = L L Q ∼ RHomR (λ{p} ( B R), X) ∼ RHom ( R, X) X.  = = B R B Let a, b ∈ Z ∪ {±∞} with a ≤ b. We write D[a,b] for the full subcategory of D consisting of all complexes X of R-modules such that H i (X) = 0 for i ∈ / [a, b] (cf. [12, Notation 13.1.11]). For a subset W of Spec R, max W denotes the set of prime ideals p ∈ W which are maximal with respect to inclusion in W . Proposition 4.3. Let F be a flat R-module and X ∈ D[−∞,0] . Suppose that W is a subset of Spec R such that n = dim W is finite. Then we have ExtiR (F, λW X) = 0 for i > n. Proof. We use induction on n. First, we suppose that n = 0. It then holds that Q Q λW X ∼ = p∈W LΛV (p) Xp ∈ D[−∞,0] , by Theorem 3.10. Hence, = p∈W λ{p} X ∼ Q noting that RHomR (F, λW X) ∼ = p∈W RHomR (F, λ{p} X), we have ExtiR (F, λW X) = 0 for i > 0, by Lemma 4.2. Next, we suppose n > 0. Set W0 = max W and W1 = W \W0 . By Theorem 3.15, there is a triangle λW X −−−−→ λW1 X ⊕ λW0 X −−−−→ λW1 λW0 X −−−−→ λW X[1]. Note that dim W0 = 0 and dim W1 = n − 1. By the argument above, it holds that ExtiR (F, λW0 X) = 0 for i > 0. Furthermore, since X, λW0 X ∈ D[−∞,0] , we have ExtiR (F, λW1 X) = ExtiR (F, λW1 λW0 X) = 0 for i > n − 1, by the inductive hypothesis. Hence it is seen from the triangle that ExtiR (F, λW X) = 0 for i > n.  Proof of Theorem 4.1. We may assume that d = dim R is finite. Let M be any Rmodule. We only have to show that ExtiR (F, M ) = 0 for i > d. Setting W = Spec R, we have dim W = d and M ∼ = λW M . It then follows from Proposition 4.3 that i i W ∼  ExtR (F, M ) = ExtR (F, λ M ) = 0 for i > d. 14 T. NAKAMURA AND Y. YOSHINO 5. Cotorsion flat modules and cosupport In this section, we summarize some basic facts about cotorsion flat R-modules. Recall that an R-module M is called cotorsion if Ext1R (F, M ) = 0 for any flat Rmodule F . This is equivalent to saying that ExtiR (F, M ) = 0 for any flat R-module F and any i > 0. Clearly, all injective R-modules are cotorsion. A cotorsion flat R-module means an R-module which is cotorsion and flat. If F is a flat R-module and p ∈ Spec R, then Corollary 3.7 implies that λ{p} F is cp , which is a cotorsion flat R-module by Lemma 4.2 and Proposition isomorphic to F cp is isomorphic to the p-adic completion of a free Rp 2.1. Moreover, recall that F module by Lemma 3.8. We remark that arbitrary direct products of flat R-modules are flat, since R is Noetherian. Hence, if Tp is the p-adic completion of a free Rp module for each p ∈ Q Spec R, then p∈Spec R Tp is a cotorsion flat R-module. Conversely, the following fact holds. Proposition 5.1 (Enochs [6]). Let F be a cotorsion flat R-module. Then there is an isomorphism Y F ∼ Tp , = p∈Spec R where Tp is the p-adic completion of a free Rp module. Proof. See [6, Theorem] or [8, Theorem 5.3.28].  Let S be a multiplicatively closed subset of R and a be an ideal of R. For a cotorsion flat R-module F , we have RHomR (S −1 R, F ) ∼ = HomR (S −1 R, F ) and LΛV (a) F ∼ . Moreover, by Proposition 5.1, we may regard F as an R= ΛV (a) FQ module of the form p∈Spec R Tp . Then it holds that Y Y Y RHomR (S −1 R, Tp ) ∼ Tp ) ∼ (5.2) Tp . = HomR (S −1 R, = p∈Spec R p∈Spec R p∈US This fact appears implicitly in [23, §5.2]. Furthermore we have Y Y Y (5.3) Tp . LΛV (a) Tp ∼ Tp ∼ = ΛV (a) = p∈Spec R p∈Spec R p∈V (a) One can show (5.2) and (5.3) by Lemma 3.1 and (2.9). See also the recent paper [21, Lemma 2.2] of Thompson. Let F be a cotorsion flat R-module with cosupp F ⊆ W for a subset W of Spec R. Then Q it follows from Proposition 5.1 that F is isomorphic to an R-module of the form p∈W Tp . More precisely, using Lemma 2.4, (5.2) and (5.3), one can show the following corollary, which is essentially proved in [8, Lemma 8.5.25]. Corollary 5.4. Let F be a cotorsion flat R-module, and set W = cosupp F . Then we have an isomorphism Y F ∼ Tp , = p∈W L where Tp is of the form ( Bp Rp )∧ p with Bp = dimκ(p) HomR (Rp , F ) ⊗R κ(p). LOCALIZATION FUNCTORS AND COSUPPORT 15 6. Complexes of cotorsion flat modules and cosupport In this section, we study the cosupport of a complex X consisting of cotorsion flat R-modules. As a consequence, we obtain an explicit way to calculate γV c X and λV X for a specialization-closed subset V of Spec R. Notation 6.1. Let W be a subset of Spec R. Let X be a complex of cotorsion flat R-modules such that cosupp X i ⊆ W for all i ∈ Z. Under Corollary 5.4, we use a presentation of the following form; Y Y X = (· · · → Tpi → Tpi+1 → · · · ), i Q p∈W i p∈Spec R Tp is the p-adic completion of a free Rp -module. Q Q Remark 6.2. Let X = (· · · → p∈Spec R Tpi → p∈Spec R Tpi+1 → · · · ) be a complex of cotorsion flat R-modules.QLet V be Q a specialization-closed subset of Spec R. By Lemma 3.1, we have HomR ( p∈V c Tpi , p∈V Tpi+1 ) = 0 for all i ∈ Z. Therefore Q Q Y = (· · · → p∈V c Tpi → p∈V c Tpi+1 → · · · ) is a subcomplex of X, where the differentials in Y are the restrictions of ones in X. where X = and p∈W Tpi We say that a complex X of R-modules is left (resp. right) bounded if X i = 0 for i ≪ 0 (resp. i ≫ 0). When X is left and rignt bounded, X is called bounded. Proposition 6.3. Let W be a subset of Spec R and X be a complex of cotorsion flat R-modules such that cosupp X i ⊆ W for all i ∈ Z. Suppose that one of the following conditions holds; (1) (2) (3) (4) X is left bounded; W is equal to V (a) for an ideal a of R; W is generalization-closed; dim W is finite. Then it holds that cosupp X ⊆ W , i.e., X ∈ C W . To prove this proposition, we use the next elementary lemma. In the lemma, for a complex X and n ∈ Z, we define the truncations τ≤n X and τ>n X as follows (cf. [11, Chapter I, §7]): τ≤n X = (· · · → X n−1 → X n → 0 → · · · ) τ>n X = (· · · → 0 → X n+1 → X n+2 → · · · ) Lemma 6.4. Let W be a subset of Spec R. We assume that τ≤n X ∈ C W (resp. τ>n X ∈ LW ) for all n ≥ 0 (resp. n < 0). Then we have X ∈ C W (resp. X ∈ LW ). Recall that C W (resp. LW ) is closed under arbitrary direct products (resp. sums). Then one can show this lemma by using homotopy limit (resp. colimit), see [4, Remark 2.2, Remark 2.3].  Proof of Proposition 6.3. Case (1): We have τ≤n X ∈ C W for all n ≥ 0, since τ≤n X are bounded. Thus Lemma 6.4 implies that X ∈ C W . Case (2): By (2.9), Proposition 2.5 and (5.3), it holds that λV (a) X ∼ = = LΛV (a) X ∼ V (a) V (a) ∼ Λ X = X. Hence X belongs to C . Case (3): It follows from the case (1) that τ>n X ∈ C W for all n < 0. Moreover, we have C W = LW by Lemma 3.1. Thus Lemma 6.4 implies that X ∈ LW = C W . 16 T. NAKAMURA AND Y. YOSHINO Q Case (4): Under Notation 6.1, we write X i = p∈W Tpi for i ∈ Z. Set n = dim W , and use induction on n. First, suppose that n = 0. It is seen from Remark 6.2 that X is the direct product of complexes of the form Y {p} = (· · · → Tpi → Tpi+1 → · · · ) for p ∈ W . Furthermore, by the casesQ(2) and (3), we have cosupp Y {p} ⊆ V (p) ∩ U (p) = {p}. Thus it holds that X ∼ = p∈W Y {p} ∈ C W . Next, suppose 0. Set W0 = max W and W1 = W \W0 . We write Q that n > Q Y = (· · · → p∈W1 Tpi → p∈W1 Tpi+1 → · · · ), which is a subcomplex of X by Remark 6.2. Hence there is a short exact sequence of complexes; 0 −−−−→ Y −−−−→ X −−−−→ X/Y −−−−→ 0, Q Q where X/Y = (· · · → p∈W0 Tpi → p∈W0 Tpi+1 → · · · ). Note that dim W0 = 0 and dim W1 = n − 1. Then we have cosupp X/Y ⊆ W0 , by the argument above. Moreover the inductive hypothesis implies that cosupp Y ⊆ W1 . Hence it holds that cosupp X ⊆ W0 ∪ W1 = W .  Under some assumption, it is possible to extend the condition (4) in Proposition 6.3 to the case where dim W is infinite, see Remark 7.15. Corollary 6.5. Let X be a complex of cotorsion flat R-modules and W be a specialization-closed subset of Spec R. Under Notation 6.1, we write Y Y X = (· · · → Tpi → Tpi+1 → · · · ). p∈Spec R p∈Spec R Suppose that one of the conditions in Proposition 6.3 holds. Then it holds that Y Y γW c X ∼ Tpi → Tpi+1 → · · · ), =(· · · → p∈W c λW X ∼ =(· · · → Y p∈W c Tpi → p∈W Q Proof. Since Y = (· · · → p∈W c Tpi → by Remark 6.2, there is a triangle Y Tpi+1 → · · · ). p∈W Q p∈W c Tpi+1 → · · · ) is a subcomplex of X Y −−−−→ X −−−−→ X/Y −−−−→ Y [1], Q Q where X/Y = (· · · → p∈W Tpi → p∈W Tpi+1 → · · · ). By Proposition 6.3, we have c X/Y ∈ C W . Moreover, since W c is generalization-closed, it holds that Y ∈ C W = ⊥ W C by Proposition 6.3 and Lemma 3.1. Therefore we conclude that γW c X ∼ =Y and λW X ∼  = X/Y by Lemma 2.6. Let X be a complex of cotorsion flat R-modules and S be a multiplicatively closed subset of R. We assume that X is left bounded, or dim R is finite. It then follows from the corollary and (5.2) that Y Y γUS X ∼ Tpi → Tpi+1 → · · · ) ∼ = (· · · → = HomR (S −1 R, X). p∈US p∈US We now recall that γUS ∼ = RHomR (S −1 R, −), see [16, Proposition 3.1]. Hence −1 it holds that RHomR (S R, X) ∼ = HomR (S −1 R, X). This fact also follows from Lemma 9.1. LOCALIZATION FUNCTORS AND COSUPPORT 17 7. Localization functors via Čech complexes In this section, we introduce a new notion of Čech complexes to calculate λW X, where W is a general subset W of Spec R and X is a complex of flat R-modules. We first make the following notations. Notation 7.1. Let W be a subset of Spec R with dim W = 0. We define a functor λ̄W : Mod R → Mod R by Y λ̄W = ΛV (p) (− ⊗ Rp ). p∈W For a prime ideal p in W , we write η̄ {p} : idMod R → λ̄{p} = ΛV (p) (− ⊗ Rp ) for the composition of the natural morphisms idMod R → (−) ⊗ Rp and (−) ⊗ Rp → Q ΛV (p) (− ⊗ Rp ). Moreover, η̄ W : idMod R → λ̄W = p∈W λ̄{p} denotes the product of the morphisms η̄ {p} for p ∈ W . Notation 7.2. Let {Wi }0≤i≤n be a family of subsets of Spec R, and suppose that dim Wi = 0 for 0 ≤ i ≤ n. For a sequence (im , . . . i1 , i0 ) of integers with 0 ≤ i0 < i1 < · · · < im ≤ n, we write λ̄(im ,...i1 ,i0 ) = λ̄Wim · · · λ̄Wi1 λ̄Wi0 . If the sequence is empty, then we use the general convention that λ( ) = idMod R . For an integer s with 0 ≤ s ≤ m, η̄ Wis : idMod R → λ̄(is ) induces a morphism b λ̄(im ,...,is+1 ) η̄ Wis λ̄(is−1 ,...,i0 ) : λ̄(im ,...,is ,...,i0 ) −→ λ̄(im ,...,i0 ) , where we mean by ibs that is is omitted. We set Y ∂ m−1 : λ̄(im−1 ,...,i0 ) −→ 0≤i0 <···<im−1 ≤n (im ,...,ibs ,...,i0 ) to be the product of the morphisms λ̄ Y λ̄(im ,...,i0 ) 0≤i0 <···<im ≤n → λ̄(im ,...,i0 ) multiplied by (−1)s . Remark 7.3. Let W0 , W1 ⊂ Spec R be subsets such that dim W0 = dim W1 = 0. As with Remark 3.14 (ii), the following diagram is commutative: η̄ W0 idMod R −−−−→   W1 yη̄ λ̄W1 λ̄W1 η̄ W0 λ̄W0   W1 W0 yη̄ λ̄ −−−−−→ λ̄W1 λ̄W0 Definition 7.4. Let W = {Wi }0≤i≤n be a family of subsets of Spec R, and suppose that dim Wi = 0 for 0 ≤ i ≤ n. By Remark 7.3, it is possible to construct a Čech complex of functors of the following form; Y Y Y ∂0 ∂ n−1 λ̄(i0 ) −→ λ̄(i1 ,i0 ) → · · · → λ̄(in−1 ,...,i0 ) −−−→ λ̄(n,...,0) , 0≤i0 ≤n 0≤i0 <i1 ≤n 0≤i0 <···<in−1 ≤n which we denote by L and call it the Čech complex with respect to W. For an R-module M , LW M denotes the complex of R-modules obtained by W L in a natural way, where it is concentrated in degrees from 0 to d. We call LW M the Čech complex of M with respect to W. Note that there is a chain map W 18 T. NAKAMURA AND Y. YOSHINO Q ℓW M : M → LW M induced by the map M → 0≤i0 ≤n λ̄(i0 ) M in degree 0, which is the product of η̄ Wi0 M : M → λ̄(i0 ) M for 0 ≤ i0 ≤ n. More generally, we regard every term of LW as a functor C(Mod R) → C(Mod R), where C(Mod R) denotes the category of complexes of R-modules. Then LW naturally sends a complex X to a double complex, which we denote by LW X. Furthermore, we write tot LW X for the total complex of LW X. The family of chain maps ℓW X j : X j → LW X j for j ∈ Z induces a morphism X → LW X as double complexes, from which we obtain a chain map ℓW X : X → tot LW X. Remark 7.5. (i) We regard tot LW as a functor C(Mod R) → C(Mod R). Then ℓW is a morphism idC(Mod R) → tot LW of functors. Moreover, if M is an R-module, then tot LW M = LW M . (ii) Let a, b ∈ Z ∪ {±∞} with a ≤ b and X be a complex of R-modules such that X i = 0 for i ∈ / [a, b]. Then it holds that (tot LW X)i = 0 for i ∈ / [a, b + n], where n is the number given to W = {Wi }0≤i≤n . (iii) Let X be a complex of flat R-module. Then we see that tot LW X consists S of cotorsion flat R-modules with cosupports in 0≤i≤n Wi . Definition 7.6. Let W be a non-empty subset of Spec R and {Wi }0≤i≤n be a family of subsets of W . We say that {Wi }0≤i≤n is a system of slices of W if the following conditions hold: S (1) W = 0≤i≤n Wi ; (2) Wi ∩ Wj = ∅ if i 6= j; (3) dim Wi = 0 for 0 ≤ i ≤ n; S (4) Wi is specialization-closed in i≤j≤n Wj for each 0 ≤ i ≤ n. Compare this definition with the filtrations discussed in [11, Chapter IV; §3]. If dim W is finite, then there exists at least one system of slices of W . Conversely, if there is a system of slices of W , then dim W is finite. Proposition 7.7. Let W be a subset of Spec R and W = {Wi }0≤i≤n be a system of slices of W . Then, for any flat R-module F , there is an isomorphism in D; ∼ LW F. λW F = Under this isomorphism, ℓW F : F → LW F coincides with η W F : F → λW F in D. Proof. We use induction on n, which is the number given to W = {Wi }0≤i≤n . Suppose that n = 0. It then holds that LW F = λ̄W0 F = λ̄W F and ℓW F = η̄ W0 F = η̄ W F . Hence this proposition follows from Theorem S 3.10. Next, suppose that n > 0, and write U = 1≤i≤n Wi . Setting Ui−1 = Wi , we obtain a system of slices U = {Ui }0≤i≤n−1 of U . Consider the following two squares, where the first (resp. second) one is in C(Mod R) (resp. D): η̄ W0 F F −−−−→  U yℓ F LU η̄ W0 F λ̄W0 F   U W0 yℓ λ̄ F LU F −−−−−→ LU λ̄W0 F η W0 F F −−−−→   U yη F λU η W0 F λW0 F   U W0 yη λ F λU F −−−−−−→ λU λW0 F By Remark 7.5 (i) and Remark 3.14 (ii), both of them are commutative. Moreover, λU η W0 F is the unique morphism which makes the right square commutative, because λU is a left adjoint to the inclusion functor C U ֒→ D. Then, regarding the left LOCALIZATION FUNCTORS AND COSUPPORT 19 one as being in D, we see from the inductive hypothesis that the left one coincides with the right one in D. Let ḡ : LU F ⊕ λ̄W0 F → LU λ̄W0 F and h̄ : F → LU F ⊕ λ̄W0 F be chain maps represented by the following matrices; ! ℓU F  ḡ = LU η̄ W0 F (−1) · ℓU λ̄W0 X , h̄ = . η̄ W0 F Notice that the mapping cone of ḡ[−1] is nothing but LW F . Then we can obtain the following morphism of triangles, where it is regarded as being in D: (7.8) F [−1] −−−−→  W yℓ F [−1] F [−1]   yh̄[−1] −−−−→ ḡ[−1] 0   y −−−−→ F  W yℓ F LW F [−1] −−−−→ (LU F ⊕ λ̄W0 F )[−1] −−−−→ LU λ̄W0 F [−1] −−−−→ LW F Therefore, by Theorem 3.15 and Remark 3.19, there is an isomorphism λW F ∼ = LW F such that ℓW F coincides with η W F under this isomorphism.  The following corollary is one of the main results of this paper. Corollary 7.9. Let W and W = {Wi }0≤i≤n be as above. Let X be a complex of flat R-modules. Then there is an isomorphism in D; λW X ∼ = tot LW X. Under this isomorphism, ℓW X : X → tot LW X coincides with η W X : X → λW X in D. Proof. We embed ℓW X : X → tot LW X into a triangle ℓW X C −−−−→ X −−−−→ tot LW X −−−−→ C[1]. Proposition 6.3 and Remark 7.5 (iii) imply that tot LW X ∈ C W . Thus it suffices to show that λWi C = 0 for each i, by Lemma 2.6 and Remark 2.7 (i). For this purpose, we prove that λWi ℓW X is an isomorphism in D. This is equivalent to showing that λ̄Wi ℓW X is a quasi-isomorphism, since X and tot LW X consist of flat R-modules. Consider the natural morphism X → LW X as double complexes, which is induced by the chain maps ℓW X j : X j → LW X j for j ∈ Z. To prove that λ̄Wi ℓW X is a quasi-isomorphism, it is enough to show that λ̄Wi ℓW X j is a quasi-isomorphism for each j ∈ Z, see [12, Theorem 12.5.4]. Furthermore, by Proposition 7.7, each ℓW X j coincides with η W X j : X j → λW X j in D. Since Wi ⊆ W , it follows from Remark 2.7 (ii) that λWi η W X j is an isomorphism in D. This means that λ̄Wi ℓW X j is a quasi-isomorphism.  Let W be a subset of Spec R, and suppose that n = dim W is finite. Then Corollary 7.9 implies λW R ∈ D[0,n] . We give an example such that H n (λW R) 6= 0. Example 7.10. Let (R, m, k) be a local ring of dimension d ≥ 1. Then we have dim V (m)c = d − 1. By Lemma 2.6, there is a triangle c γV (m) R −−−−→ R −−−−→ λV (m) R −−−−→ γV (m) R[1]. 20 T. NAKAMURA AND Y. YOSHINO Since RΓV (m) ∼ = γV (m) by (2.10), Grothendieck’s non-vanishing theorem implies c that H d (γV (m) R) is non-zero. Then we see from the triangle that H d−1 (λV (m) R) 6= 0. We denote by D− the full subcategory of D consisting of complexes X such that H (X) = 0 for i ≫ 0. Let W be a subset of Spec R and X ∈ D− . If dim W is finite, then we have λW R ∈ D− by Corollary 7.9. However, as shown in the following example, it can happen that λW R ∈ / D− when dim W is infinite. i Example 7.11. Assume that dim R = +∞, and set W = max(Spec R). Then it holds that dim W = 0 and dim W c = +∞. Since each m ∈ W is maximal, there are isomorphisms M γW ∼ RΓV (m) . = = RΓW ∼ m∈W Thus we see from Example 7.10 that γW R ∈ / D− . Then, considering the triangle c γW R −−−−→ R −−−−→ λW R −−−−→ γW R[1], c we have λW R ∈ / D− . Let W be a subset of Spec R and X ∈ C W . Then η W X : X → λW X is an isomorphism in D. Thus Remark 7.5 (iii) and Corollary 7.9 yield the following result. Corollary 7.12. Let W be a subset of Spec R, and W = {Wi }0≤i≤n be a system of slices of W . Let X be a complex of flat R-modules with cosupp X ⊆ W . Then the chain map ℓW X : X → tot LW X is a quasi-isomorphism, where tot LW X consists of cotorsion flat R-modules with cosupports in W . Remark 7.13. If d = dim R is finite, then any complex Y is quasi-isomorphic to a K-flat complex consisting of cotorsion flat R-modules. To see this, set Wi = { p ∈ Spec R | dim R/p = i } for 0 ≤ i ≤ d. Then W = {Wi }0≤i≤d is a system of slices of Spec R. We take a K-flat resolution X of Y such that X consists of flat Rmodules. Corollary 7.12 implies that ℓW X : X → tot LW X is a quasi-isomorphism, and tot LW X consists of cotorsion flat R-modules. At the same time, the chain maps ℓW X i : X i → LW X i are quasi-isomorphisms for all i ∈ Z. Then it is not hard to see that the mapping cone of ℓW X is K-flat. Thus tot LW X is K-flat. By Proposition 6.3 and Corollary 7.12, we have the next result. Corollary 7.14. Let W be a subset of Spec R such that dim W is finite. Then a complex X ∈ D belongs to C W if and only if X is isomorphic to a complex Z of cotorsion flat R-modules such that cosupp Z i ⊆ W for all i ∈ Z. Remark 7.15. Even if dim W is infinite, it is possible to construct a similar family to systems of slices. We first put W0 = max W . Let i > 0 be an ordinal, and suppose that S subsets Wj of W are defined for all j < i. Then we put Wi = max(W \ j<i Wi ). In this way, we obtain the smallest ordinal o(W ) satisfying S the following conditions: (1) W = i<o(W ) Wi ; (2) Wi ∩ Wj = ∅ if i 6= j; (3) S dim Wi ≤ 0 for 0 ≤ i < o(W ); (4) Wi is specialization-closed in i≤j<o(W ) Wj for each 0 ≤ i < o(W ). One should remark that the ordinal o(W ) can be uncountable in general, see [9, p. 48, Theorem 9.8]. However, if R is an infinite dimensional commutative LOCALIZATION FUNCTORS AND COSUPPORT 21 Noetherian ring given by Nagata [15, Appendix A1; Example 1], then o(W ) is at most countable. Moreover, using transfinite induction, it is possible to extend the condition (4) in Proposition 6.3 and Corollary 6.5 to the case where o(W ) is countable. One can also extend Corollary 7.14 to the case where o(W ) is countable. Using Theorem 3.22 and results in [16, §3], it is possible to give a similar result to Corollary 7.9, for colocalization functors γW and complexes of injective R-modules. 8. Čech complexes and complexes of finitely generated modules Let W be a subset of Spec R and W = {Wi }0≤i≤n be a system of slices of W . In this section, we prove that λW Y is isomorphic to tot LW Y if Y is a complex of finitely generated R-modules. We denote by Dfg the full subcategory of D consisting of all complexes with − finitely generated cohomology modules, and set Dfg = D− ∩ Dfg . We first prove the following proposition. Proposition 8.1. Let W be a subset of Spec R such that dim W is finite. Let X, Y ∈ D. We suppose that one of the following conditions holds; − (1) X ∈ D− and Y ∈ Dfg ; (2) X is a bounded complex of flat R-modules and Y ∈ Dfg . Then there are natural isomorphisms (γW c X) ⊗L Y ∼ = γW c (X ⊗L Y ), (λW X) ⊗L Y ∼ = λW (X ⊗L Y ). R R R R For X ∈ D and n ∈ Z, we define the cohomological truncations σ≤n X and σ>n X as follows (cf. [11, Chapter I; §7]): σ≤n X = (· · · → X n−2 → X n−1 → Ker dnX → 0 → · · · ) σ>n X = (· · · → 0 → Im dnX → X n+1 → X n+2 → · · · ) Proof of Proposition 8.1. Apply (−) ⊗R Y to the triangle γW c X → X → λW X → γW c X[1], and we obtain the following triangle; (γW c X) ⊗LR Y −−−−→ X ⊗LR Y −−−−→ (λW X) ⊗LR Y −−−−→ (γW c X) ⊗LR Y [1]. Since supp γW c X ⊆ W c , we have supp(γW c X) ⊗LR Y ⊆ W c , that is, (γW c X) ⊗LR Y ∈ LW c . Hence it remains to show that (λW X) ⊗LR Y ∈ C W , see Lemma 2.6. Case (1): We remark that X is isomorphic to a right bounded complex of flat R-modules. Then it is seen from Corollary 7.9 that λW X is isomorphic to a right bounded complex Z such that cosupp Z i ⊆ W for all i ∈ Z. Furthermore, Y is isomorphic to a right bounded complex P of finite free R-modules. Hence it follows that X ⊗LR Y ∼ = Z ⊗R P , where the second one consists of cotorsion flat R-modules with cosupports in W . Then we have X ⊗LR Y ∼ = Z ⊗R P ∈ C W by Proposition 6.3. W Case (2): By Corollary 7.9, λ X is isomorphic to a bounded complex consisting of cotorsion flat R-modules with cosupports in W . Thus it is enough to prove that Z ⊗R Y ∈ C W for a cotorsion flat R-module Z with cosupp Z ⊆ W . We consider the triangle σ≤n Y → Y → σ>n → σ≤ nY [1] for an integer n. Applying Z ⊗R (−) to this triangle, we obtain the following one; Z ⊗R σ≤n Y −−−−→ Z ⊗R Y −−−−→ Z ⊗R σ>n Y −−−−→ Z ⊗R σ≤n Y [1]. 22 T. NAKAMURA AND Y. YOSHINO Let p ∈ W c . The case (1) implies that Z ⊗R σ≤n Y ∈ C W for any n ∈ Z, since λW Z ∼ = Z. Thus, applying RHomR (κ(p), −) to the triangle above, we have RHomR (κ(p), Z ⊗R Y ) ∼ = RHomR (κ(p), Z ⊗R σ>n Y ). Furthermore, taking a projective resolution P of κ(p), we have RHomR (κ(p), Z ⊗R σ>n Y ) ∼ = HomR (P, Z ⊗R σ>n Y ). Let j be any integer. To see that RHomR (κ(p), Z ⊗R Y ) = 0, it suffices to show that there exists an integer n such that H 0 (HomR (P [j], Z ⊗R σ>n Y )) = 0. Note that P i = 0 for i > 0. Moreover, each element of H 0 (HomR (P [j], Z ⊗R σ>n Y )) ∼ = HomD (P [j], Z ⊗R σ>n Y ) is represented by a chain map P [j] → Z ⊗R σ>n Y . Therefore it holds that H 0 (HomR (P [j], Z ⊗R σ>n Y )) = 0 if n > −j.  Remark 8.2. (i) In the proposition, we can remove the finiteness condition on dim W if W = V (a) for an ideal a. In such case, we need only use a-adic completion of free R-modules instead of cotorsion flat R-modules. (ii) If W is a generalization-closed subset of Spec R, then the isomorphisms in the proposition hold for any X, Y ∈ D because γW c is isomorphic to RΓW c . Let W be a subset of Spec R and W = {Wi }0≤i≤n be a system of slices of W . Let Y ∈ Dfg . By Proposition 8.1 and Proposition 7.7, we have (8.3) λW Y ∼ = (λW R) ⊗LR Y ∼ = (LW R) ⊗R Y. Let F be a flat R-module and M be a finitely generated R-module. Then we see from Lemma 2.3 that (λ̄Wi F ) ⊗R M ∼ = λ̄Wi (F ⊗R M ). This fact ensures that (λ̄(im ,...i1 ,i0 ) R)⊗R M ∼ = λ̄(im ,...i1 ,i0 ) M . Thus, if Y is a complex of finitely generated R-modules, then there is a natural isomorphism (8.4) (LW R) ⊗R Y ∼ = tot LW Y in C(Mod R). By (8.3) and (8.4), we have shown the following proposition. Proposition 8.5. Let W be a subset of Spec R and W = {Wi }0≤i≤n be a system of slices of W . Let Y be a complex of finitely generated R-modules. Then there is an isomorphism in D; λW Y ∼ = tot LW Y. Under this identification, ℓW Y : Y → tot LW Y coincides with η W Y : Y → λW Y in D. We see from (8.4) and the remark below that it is also possible to give a quick proof of this proposition, provided that Y is a right bounded complex of finitely generated R-modules. Remark 8.6. Let W be a subset of Spec R and W = {Wi }0≤i≤n be a system of slices of W . We denote by K(Mod R) the homotopy category of complexes of Rmodules. Note that tot LW induces a triangulated functor K(Mod R) → K(Mod R), which we also write tot LW . Then it is seen from Corollary 7.9 that λW : D → D is isomorphic to the left derived functor of tot LW : K(Mod R) → K(Mod R). LOCALIZATION FUNCTORS AND COSUPPORT 23 Let W be a subset of Spec R such that n = dim W is finite. By Corollary 8.5, if an R-module M is finitely generated, then λW M ∈ D[0,n] . On the other hand, since λV (a) ∼ = LΛV (a) for an ideal a, it can happen that H i (λW M ) 6= 0 for some i < 0 when M is not finitely generated, see [16, Example 5.4]. Remark 8.7. Let n ≥ 0 be an integer. Let ai be ideals of R and Si be multiplicatively closed subsets of R for 0 ≤ i ≤ n. In Notation 7.2 and Definition 7.4, one can replace λ̄(i) = λ̄Wi by ΛV (ai ) (− ⊗R Si−1 R), and construct a kind of Čech S complexes. For the Čech complex and λW with W = 0≤i≤n (V (ai ) ∩ USi ), it is possible to show similar results to Corollary 7.9 and Proposition 8.5, provided that one S of the following conditions holds: (1) VS(ai ) ∩ USi is specialization-closed in (ai ) ∩ USi ) for each 0 ≤ i < n; (2) i<j≤n (V (ai ) ∩ USi ) is generalizationi≤j≤n (VS closed in i≤j≤n (V (ai ) ∩ USi ) for each 0 ≤ i < n. 9. Čech complexes and complexes of pure-injective modules In this section, as an application, we give a functorial way to construct a quasiisomorphism from a complex of flat R-modules or a complex of finitely generated R-modules to a complex of pure-injective R-modules. We start with the following well-known fact. Lemma 9.1. Let X be a complex of flat R-modules and Y be a complex of cotorsion R-modules. We assume that one of the following conditions holds: (1) X is a right bounded and Y is left bounded; (2) X is bounded and dim R is finite. Then we have RHomR (X, Y ) ∼ = HomR (X, Y ). One can prove this lemma by [12, Theorem 12.5.4] and Theorem 4.1. Next, we recall the notion of pure-injective modules and resolutions. We say that a morphism f : M → N of R-modules is pure if f ⊗R L is a monomorphism in Mod R for any R-module L. Moreover an R-module P is called pure-injective if HomR (f, P ) is an epimorphism in Mod R for any pure morphism f : M → N of R-modules. Clearly, all injective R-modules are pure-injective. Furthermore, all pure-injective R-modules are cotorsion, see [8, Lemma 5.3.23]. Let M be an R-module. A complex P together with a quasi-isomorphism M → P is called a pure-injective resolution of M if P consists of pure-injective R-modules and P i = 0 for i < 0. It is known that any R-module has its minimal pure-injective resolution, which is constructed by using pure-envelopes, see [7] and [8, Example 6.6.5, Definition 8.1.4]. Moreover, if F is a flat R-module and P is a pure-injective resolution of M , then we have RHomR (F, M ) ∼ = HomR (F, P ) by Lemma 9.1. Now we observe thatL any cotorsion flat R-module is pure-injective. Consider an R-module of the form ( B Rp )∧ p with some index set B and a prime ideal p, which is a cotorsion flat R-module. Writing ER (R/p) for the injective hull of R/p, we have M M ∼ ( Rp )∧ ER (R/p)), p = HomR (ER (R/p), B B see [8, Theorem 3.4.1]. It follows from tensor-hom adjunction that HomRL (M, I) is pure-injective for any R-module M and any injective R-module I. Hence ( B Rp )∧ p 24 T. NAKAMURA AND Y. YOSHINO is pure-inejctive. Thus any cotorsion flat R-module is pure-injective, see Proposition 5.1. There is another example of pure-injective R-modules. Let M be a finitely generated R-module. Using Five Lemma, we are able to prove an isomorphism M M   HomR ER (R/p), ER (R/p) ⊗R M ∼ ER (R/p) . = HomR HomR (M, ER (R/p)), B B L L ∧ Therefore ( B Rp )∧ p ⊗R M is pure-injective; it is also isomorphic L to (∧ B Mp )p by Lemma 2.3. Moreover, Proposition 8.1 implies that cosupp( B Mp )p ⊆ {p}. By the above observation, we see that Corollary 7.12, (8.4) and Proposition 8.5 yield the following theorem, which is one of the main results of this paper. Theorem 9.2. Let W be a subset of Spec R and W = {Wi }0≤i≤d be a system of slices of W . Let Z be a complex of flat R-modules or a complex of finitely generated R-modules. We assume that cosupp Z ⊆ W . Then ℓW Z : Z → tot LW Z is a quasiisomorphism, where tot LW Z consists of pure-injective R-modules with cosupports in W . Remark 9.3. Let N be a flat or finitely generated R-module. Suppose that d = dim R is finite. Set Wi = { p ∈ Spec R | dim R/p = i } and W = {Wi }0≤i≤d . By Theorem 9.2, we obtain a pure-injective resolution ℓW N : N → LW N of N , that is, there is an exact sequence of R-modules of the following form: Y Y 0→N → λ̄(i0 ) N → λ̄(i1 ,i0 ) N → · · · → λ̄(d,...,0) N → 0 0≤i0 ≤d 0≤i0 <i1 ≤d We remark that, in C(Mod R), LW N need not be isomorphic to a minimal pureinjective resolution P of N . In fact, when N is a projective or finitely generated Q (0) d R-module, it holds that P 0 ∼ N (cf. [22, Theorem 3] and = m∈W0 N m = λ̄ Q (i0 ) W 0 [8, Remark 6.7.12]), while (L N ) = 0≤i0 ≤d λ̄ N . Furthermore, Enochs [7, Q Theorem 2.1] proved that if N is flat R-module, then P i is of the form p∈W≥i Tpi for 0 ≤ i ≤ d (cf. Notation 6.1), where W≥i = { p ∈ Spec R | dim R/p ≥ i }. On the other hand, for a flat or finitely generated R-module N , the differential maps in the pure-injective resolution LW N are concretely described. In addition, our approach based on the localization functor λW and the Čech complex LW provide a natural morphism ℓW : idC(Mod R) → tot LW which induces isomorphisms in D for all complexes of flat R-modules and complexes of finitely generated Rmodules. The reader should also compare Theorem 9.2 with [21, Proposition 4.9]. We close this paper with the following example of Theorem 9.2. Example 9.4. Let (R, m) be a 2-dimensional local domain with quotient field Q. Let W = {Wi }0≤i≤2 be as in Remark 9.3. Then LW R is a pure-injective resolution of R, and LW R is of the following form: 0→Q⊕( Y p∈W1 cp ) ⊕ R b→( R Y p∈W1 cp )(0) ⊕ (R) b (0) ⊕ R Y [ Y [ b p→( b p )(0) → 0 (R) (R) p∈W1 p∈W1 LOCALIZATION FUNCTORS AND COSUPPORT 25 References 1. L. Alonso Tarrı́o, A. Jeremı́as López and J. Lipman, Local homology and cohomology on schemes, Ann. Scient. Éc. Norm. Sup. 30 (1997), 1–39. Correction, available at https://www.math.purdue.edu/~lipman/papers/homologyfix.pdf 2. D. Benson, S. Iyengar, and H. Krause, Local cohomology and support for triangulated categories, Ann. Scient. Éc. Norm. Sup. (4) 41 (2008), 1–47. 3. D. Benson, S. Iyengar, and H. Krause, Colocalizing subcategories and cosupport, J. reine angew. Math. 673 (2012), 161–207. 4. M. Bökstedt and A. Neeman, Homotopy limits in triangulated categories, Compositio Math. 86 (1993), 209–234. 5. N. Bourbaki, Algèbre commutative, Springer-Verlag (2006). 6. E. E. Enochs, Flat covers and cotorsion flat modules, Proc. Amer. Math. Soc., 92 (1984), 179–184. 7. E. E. Enochs, Minimal pure-injective resolutions of flat modules, J. Algebra, 105 (1987), 351–364. 8. E. E. Enochs and O. M. G. Jenda. Relative Homological Algebra, De Gruyter Expositions in Mathematics, 30, Walter De Gruyter (2000). 9. R. Gordon and J. C. Robson, Krull dimension, Memoirs Amer. Math. Soc., 133 (1973). 10. J. P. C. Greenlees and J. P. May, Derived functors of I-adic completion and local homology, J. Algebra 149 (1992), 438–453. 11. R. Hartshorne, Residues and Duality: Lecture Notes of a Seminar on the Work of A. Grothendieck, Lecture Notes in Math. 20, Springer-Verlag (1966). 12. M. Kashiwara and P. Schapira, Categories and sheaves, Grundlehren der Mathematischen Wissenschaften 332, Springer-Verlag (2006). 13. H. Krause Localization theory for triangulated categories, Triangulated categories, London Math. Soc. Lecture Note Ser. 375,161–235. Cambridge Univ. Press (2010). 14. J. Lipman, Lectures on local cohomology and duality, Local cohomology and its applications, Lect. Notes Pure Appl. Math. 226 (2002), Dekker, New York, 39–89. 15. M. Nagata, Local rings, Robert E. Krieger Publishing Company, Huntington, New York (1975). 16. T. Nakamura and Y. Yoshino, A Local duality principle in derived categories of commutative Noetherian rings, to appear in J. Pure Appl. Algebra. 17. A. Neeman, The chromatic tower of D(R), Topology 31 (1992), 519–532. 18. A. Neeman, Colocalizing subcategories of D(R), J. reine angew. Math. 653 (2011), 221–243. 19. M. Raynaud and L. Gruson, Critères de platitude et de projectivité, Invent. math. 13 (1971), 1–89. 20. A.-M. Simon, Some homologival properties of complete modules, Math. Proc. Camb. Phil. Soc. 108 (1990), 231–246. 21. P. Thompson, Minimal complexes of cotorsion flat modules, arXiv:1702.02985. 22. R. B. Warfield, Jr. Purity and algebraic compactness for modules, Pacific J. of Math. 28 (1969), 699–719. 23. J. Xu, Flat Covers of Modules, Lecture Notes in Math. 1634, Springer-Verlag, Berlin Heidelberg (1996). (T. Nakamura) Graduate School of Natural Science and Technology Okayama University, Okayama, 700-8530 Japan E-mail address: [email protected] (Y. Yoshino) Graduate School of Natural Science and Technology Okayama University, Okayama, 700-8530 Japan E-mail address: [email protected]
0math.AC
Asymptotic Goodness-of-Fit Tests for Point Processes Based on Scaled Empirical K-Functions Lothar Heinrich1 arXiv:1706.01074v1 [math.ST] 4 Jun 2017 Abstract We study sequences of scaled edge-corrected empirical (generalized) K-functions (modifying Ripley’s K-function) each of them constructed from a single observation of a d-dimensional fourth-order stationary point process in a sampling window Wn which grows together with some scaling rate unboundedly as n → ∞. Under some natural assumptions it is shown that the normalized difference between scaled empirical and scaled theoretical K-function converges weakly to a mean zero Gaussian process with simple covariance function. This result suggests discrepancy measures between empirical and theoretical K-function with known limit distribution which allow to perform goodness-of-fit tests for checking a hypothesized point process based only on its intensity and (generalized) K-function. Similar test statistics are derived for testing the hypothesis that two independent point processes in Wn have the same distribution without explicit knowledge of their intensities and K-functions. Keywords fourth-order Brillinger mixing point process · generalized K-function · edgecorrected empirical K-function · scaling rate · Skorohod-space D[0, R] · functional central limit theorem · one- and two-sample tests for point processes. AMS 2010 Subject Classifications Primary: 62 G 10 · 60 G 55; Secondary: 60 F 05 · 60 F 17 1 Introduction In many fields of application statisticians are faced with irregular point patterns or point-like objects which are randomly distributed in large planar or spatial domains. Random point processes provide appropriate models to describe such phenomena. It is often assumed and in practice at least approximately justifiable that the distribution of the point pattern under consideration or at least its moment measures up to certain order are invariant under translations. In this paper all point processes and random variables are defined over a common probability space [Ω, A, P] and E , Var , Cov denote expectation, variance, covariance w.r.t. P . The aim of the paper is to establish asymptotic goodness-of-fit tests for checking point process hypotheses provided the hypothesized d-dimensional simple point process (short: PP) N = P i≥1 δXi with distribution P (short: N ∼ P ) is fourth-order stationary with known intensity (2) λ := EN ([0, 1)d ) > 0 and a known generalized K-function 0 ≤ r 7→ KB (r) := λ−1 αred (rB) , (2) where αred (·) denotes the reduced second factorial moment measure which always exists when N 1 University of Augsburg, Institute of Mathematics, Universitätsstr. 14, 86135 Augsburg, Germany; E-mail: [email protected] 1 is at least second-order (or weakly) stationary, see Daley and Vere-Jones (1988) for mathematical background of PP theory. Here, B is assumed to be an o-symmetric, convex, compact set containing the origin o ∈ Rd as inner point. Equivalently, B can be considered as closed unit ball w.r.t. a unique norm k·kB defined by kxkB := inf{r > 0 : x ∈ rB} for x ∈ Rd . In case of the Euclidean norm k·k with unit ball Be the subscript B is omitted and K(r) coincides with Ripley’s K-function as introduced in Ripley (1976) for motion-invariant PPes. Our approach is based on a single observation of N in a large sampling window Wn , where throughout this paper (Wn ) forms a convex averaging sequence (short: CAS), i.e. Wn ⊆ Wn+1 and Wn is convex, compact in Rd for all n ≥ 1 such that ̺(Wn ) := sup{r > 0 : x + r Be ⊆ Wn for some x ∈ Wn } −→ ∞. n→∞ Instead to impose one of the usual strong mixing conditions on N ∼ P we will assume that the the second, third and fourth reduced cumulant measure have bounded total variation and p that the ratio (N (Wn ) − λ |Wn |)/ |Wn | is asymptotically normally distributed (as n → ∞) with an asymptotic variance σ 2 := lim Var(N (Wn ))/|Wn | . Here and in what follows, | · | stands for n→∞ the Lebesgue measure or volume in Rd as well as for the absolute value of a real number. A frequently used unbiased (edge-corrected) estimator of λ2 KB (r) (so far for B = Be ) is the so-called Ohser-Stoyan- or Horvitz-Thompson-type estimator defined by 2 K ) (r) := (λ\ B n X6= 1W (Xi ) 1W (Xj ) 1r B (Xj − Xi ) n n , |(Wn − Xi ) ∩ (Wn − Xj )| (1) i,j≥1 see Ohser and Stoyan (1981), Stein (1993), Diggle (2003), Chiu et al. (2013), Chapt. 4.7.4, or Illian et al. (2008), Chapt. 4.3.3, for further details and modifications. On the r.h.s of (1) P the sum 6= runs over pairs of distinct indices and the indicator function 1r B (Xj − Xi ) can be replaced by 1[0,r] (kXj − Xi kB ). It is plausible that the use of several norms k · kB provide more information on the PP to be examined. In this connection B plays a similar role like structuring elements in image analysis, see Chiu et al.(2013). It should be mentioned that there exist a number of further estimators based on second-order characteristics to obtain information on stationary point patterns (orientation, isotropy etc.), see e.g. Guan et al. (2006), Guan and Sherman (2007), Illian et al. (2008), Chapt. 4.5.3. Baddeley et al. (2000) introduced an inhomogeneous K-function and its empirical counterpart for intensity-reweighted stationary PPes, see also Gaetan and Guyon (2010), Chapt. 3.5.3, Adelfio and Schoenberg (2009) and Zhao and Wang (2010) for asymptotic properties. In the most important case when N ∼ P is a stationary Poisson process the weak convergence p  2 K) (r) − λ2 |B |r d of the empirical process |Wn | (λd in the Skorohod space D[0, R], see n e Billingsley (1968), to a Gaussian process has been proved in Heinrich (1991). The corresponding functional central limit (short: CLT) for the empirical process (1) can be show in the same way, p 2 K ) (r) − λ2 |B|r d see Heinrich (2013). The known limit distribution of |Wn | max0≤r≤R (λ\ B n (in particular when λ2 is replaced by an unbiased estimator) allows to perform KolmogorovSmirnov-type as well as Cramér-von Mises-type tests to check complete spatial randomness (CSR) of a given point pattern in Wn . Multiparameter versions of this and related asymptotic tests are derived in Heinrich (2015). Note that testing for CSR of a transformed PP can provide information on the original PP, see Schoenberg (1999). There exist further (non-asymptotic) 2 tests for CSR based on Ripley’s K-function using different estimators supported by data analytic methods and simulation techniques, see e.g. Ho and Chiu (2010), Marcon et al. (2013), Wiegand et al. (2016) and further references therein. p  2 K ) (r) − λ2 K (r) can Asymptotic normality of the family of random variables |Wn | (λ\ B n B be shown due to a more general CLT proved first by Jolivet (1981), see also Karr (1987) and Kiêu and Mora (1999), if the underlying PP N ∼ P is Brillinger mixing, see Section 2. The main obstacle to construct a goodness-of-fit test as in the Poisson case is the rather complicated (k) covariance function of the Gaussian limit process depending on λ and integrals w.r.t. γred , k = 2, 3, 4 , see (7). A closed-term formula of this covariance function is given at the end of Appendix B, whereas a more explicit form of this function is known e.g. for α-determinental p 2 K ) (r) for PPes, see Heinrich (2016). An expression for the asymptotic variance of |Wn | (λ\ B n r > 0 is given in (45). To realize the announced program of testing hypotheses on the distribution of non-Poisson PPes via their generalized K-functions KB (r) we allow that the range of r grows unboundedly with a scaling rate cαn , where cn := |Wn |1/d and 0 < α < 1. More precisely, our main issue is to study the asymptotic behaviour of the sequence of the scaled (centered and normalized) empirical processes 2 K ) (cα r) − λ2 K (cα r) ∆B,n (r) := |Wn |1/2−α (λ\ B n n B n (α)  for 0 ≤ r ≤ R , 0 ≤ α < 1 (2) as n → ∞ , where R is a freely chosen positive real number. Under mild (mixing) assumptions we shall show in Section 3 that the asymptotic variance and covariance of (2) does not depend (4) (3) on γred and γred . Furthermore, (2) possesses a Gaussian limit for fixed r > 0 and in D[0, R]) for all 0 < α < 1, but only for α ≤ 1/2 this results are relevant for our tests. The latter restriction (2) is meaningful because kγred kvar < ∞ implies for α > 1/2 that sup |Wn |1/2−α λ2 KB (cαn r) − λ2 |cαn r B| = λ |Wn |1/2−α sup 0≤r≤R 0≤r≤R (2) γred (cαn r B) −→ 0 . n→∞ (3) This means that we can always take KB (r) = |r B| = |B| r d in (2) which in turn prevents to distinguish between Poisson and non-Poisson PPes if α > 1/2 . On the other hand, such a separation is possible for α ∈ (0, 1/2] , where the limit distribution of (2) depends on the intensity λ and asymptotic variance σ 2 of the PP N ∼ P . In particular for α = 1/2, under comparatively mild assumptions on N ∼ P we can show that 1 q c2 )n cn (σ λ max √ 0≤r≤ cn R 2 K ) (r) − λ2 K (r) −→ 2 Rd |B| |N (0, 1)| , (λ\ B n B d n→∞ (4) c2 )n and λ cn are defined in (12) resp. (13), N (0, τ 2 ) denotes a mean zero Gaussian random where (σ d variable with variance τ 2 and −→ indicates convergence in distribution or weak convergence. n→∞ 3 More general limit theorems are presented, proved and applied in the Sections 3 - 5 to construct the above-announced goodness-of-fit tests. This includes tests of the null hypothesis that the distributions Pa and Pb of two independent stationary PPes Na and Nb coincide based on checking the coincidence of their K-functions Ka,B and Kb,B and their intensities λa and λb . 2 Definitions and Preliminary Results P A simple point process N = i≥1 δXi on Rd is said to be kth-order stationary for some k ≥ 1 if EN k ([0, 1)d ) < ∞ and, for j = 1, ..., k , j j i=1 i=1 α(j) ( × (Aj + x)) = α(j) ( × Ai ) for all x ∈ Rd and any bounded A1 , ..., Aj ∈ B d . Here α(k) (·) denotes the k-th factorial moment measure which is defined on [Rdk , B dk ] by k α(k) ( × Ai ) = E i=1 where the sum P6= X6= i1 ,...,ik ≥1 1A1 (Xi1 ) · · · 1Ak (Xik ) , stretches over k-tuples of pairwise distinct indices. The invariance of α(k) (·) against diagonal-shifts (if k ≥ 2) allows the disintegration w.r.t. the Lebesgue measure | · | (multiplied additionally by λ) and defines the reduced k-th factorial (k) moment measure αred (·) (on [Rd(k−1) , B d(k−1) ]) satisfying Z k (k) k−1 αred ( × (Ai − x)) dx for any bounded A1 , ..., Ak ∈ B d , α(k) ( × Ai ) = λ i=1 i=1 Ak (k) where, for bounded W, A2 , ..., Ak ∈ B d with |W | > 0, the measure αred (·) can be expressed by (k) k αred ( × Ai ) = i=2 X6= 1 E 1W (Xi1 ) 1A2 (Xi2 − Xi1 ) · · · 1Ak (Xik − Xi1 ) . λ |W | i1 ,...,ik ≥1 Next we recall formal definition of k-th factorial cumulant measure γ (k) (·) which is a signed measure on [Rdk , B dk ] defined by k γ (k) ( × Ai ) = i=1 k X (−1)j−1 (j − 1)! j=1 X j Y K1 ∪···∪Kj ={1,..,k} i=1 α(#Ki ) ( × Aki ) , ki ∈Ki (5) where the inner sum is taken over all partitions of the set {1, ..., k} into j disjoint non-empty subsets K1 , ..., Kj , see Daley and Vere-Jones (1988), Heinrich (2013). A corresponding representation formula of α(k) (·) in terms of factorial cumulant measures can be derived from (5) by induction, k α(k) ( × Ai ) = i=1 k X X j Y j=1 K1 ∪···∪Kj ={1,..,k} i=1 4 γ (#Ki ) ( × Aki ) . ki ∈Ki (6) Since kth-order stationarity implies diagonal-shift invariance of the locally finite signed measures γ (j) (·) for j = 1, .., k , the above disintegration also applies for factorial cumulant measures. In this way a kth-order stationary PP is accompanied by reduced factorial cumulant measures (j) γred (·) of order j = 2, ..., k, defined by γ (j) j ( × Ai ) = λ i=1 (1) Z (j) j−1 Aj γred ( × (Ai − x))dx . (7) i=1 (1) (2) For j = 1 it makes sense to put γred (·) = αred (·) ≡ 1, whereas the signed measure γred (·) = (2) αred (·) − λ | · | ( called reduced covariance measure) reflects the dependence between two distinct (j) atoms of N and γred (·) describes mutual dependences between j distinct atoms. (k) (k) If both the positive and negative part (γred )± (·) of Jordan’s decomposition of γred (·) are finite on Rd(k−1) , then (k) (k) (k) kγred kvar := (γred )+ (Rd(k−1) ) + (γred )− (Rd(k−1) ) (k) is called the total variation of γred (·). A kth-order stationary PP N = (j) P i≥1 δXi on Rd is said to be Bk -mixing if kγred kvar < ∞ for j = 2, . . . , k. Bk -mixing for all k ≥ 2 is called Brillinger-mixing, see e.g. Jolivet (1981), Karr (1987), Heinrich (2016), Biscio and Lanvancier (2016),(2017) for numerous applications in PP statistics. It should be mentioned that Bk -mixing of N ∼ P even for all k ≥ 2 does not imply the uniqueness of the stationary distribution P , see also Baddeley and Silverman (1984) for k = 2 . Next, we state some technical results which will be needed to prove the below Theorems 1-5. Lemma 1 For any sequence rn of positive numbers satisfying rn /̺(Wn ) −→ 0 , we have n→∞ 1 sup |Wn | x∈rn B   r  n as n → ∞ . |Wn | − |Wn ∩ (Wn − x)| = O ̺(Wn ) Proof of Lemma 1 Since B = {x ∈ Rd : kxkB ≤ 1} is bounded there exist some κ > 0 (depending on B) such that B ⊆ κBe . By definition of Minkowski-subtraction ⊖, see Chiu et al., p. 6, it follows that Wn ⊖ (r κ Be ) ⊆ Wn ⊖ (rB) = \ y∈rB (Wn − y) ⊆ Wn ∩ (Wn − x) for any x ∈ rB . Applying the first inequality (50) of Lemma 5 to K = Wn we see that  |Wn ∩ (Wn − x)|  |Wn ⊖ (r κ Be )| dκr sup 1 − ≤1− ≤ |Wn | |Wn | ̺(Wn ) x∈rB for any r ∈ [0, ̺(Wn )/κ] . Setting r = rn and letting n → ∞ complete the proof of Lemma 1. ✷ The following Lemma 2 turns out crucial to prove the Theorems 1 and 2 in Section 3. 5 P Lemma 2 Let N = i≥1 δXi be a B4 -mixing PP on Rd . Further, assume that cαn /̺(Wn ) −→ 0 n→∞ for some 0 < α < 1 . Then (2)  α (cα r B) N (Wn ) − λ |Wn | 2 (α) p lim E ∆B,n (r) − 2 red n α = 0 for all r ≥ 0 . n→∞ |Wn | |Wn | (α) The next result becomes relevant in proving the tightness of the sequence (∆B,n )n . Lemma 3 Let N = P i≥1 δXi be a B4 -mixing PP on Rd . Further, let there exist a uniformly (2) bounded Lebesgue density of αred (·), i.e. there exist a constant a0 > 0 such that (2) A ∈ Bd . αred (A) ≤ a0 |A| for all bounded (8) Then, for 0 ≤ α < 1, 0 ≤ s < t ≤ R and all n ≥ n0 (R) , (α) (α) E ∆B,n (t) − ∆B,n (s) 2 ≤ a1 |(tB) \ (sB)|2 + a2 |(tB) \ (sB)| |Wn |−α + a3 |Wn |−2α , (2) (9) (4) (3) where the constants a1 , a2 , a3 depend on a0 , λ, kγred kvar , kγred kvar , kγred kvar . (4) (3) Remark 1 If, in addition to (8), the Lebesgue densities κ(3) and κ(4) of γred (·) resp. γred (·) exist such that, for all x, y ∈ Rd , (3) |κ (x, y)| ≤ a01 Z and Rd Z Rd Z Rd |κ(4) (x, y + z, z)| dz 2 dydx ≤ a02 , (10) then, for 0 ≤ α < 1, 0 ≤ s < t ≤ R and all n ≥ n0 (R) , (α) (α) E ∆B,n (t) − ∆B,n (s) 2 ≤ a1 |(tB) \ (sB)|2 + a2 |(tB) \ (sB)| |Wn |−α , (11) where the constants a0 , a1 , a2 may differ from those in (8) and (9), respectively. The proofs of Lemma 2 and Lemma 3 as well as of (11) are postponed to Section 5. Finally, we introduce an estimator of the asymptotic variance σ 2 = limn→∞ Var(N (Wn ))/|Wn | (2) = λ (1 + γred (Rd )) which generalizes a corresponding estimator for cubic windows Wn = [−n, n]d defined and studied in Heinrich (1994), Heinrich and Prokešová (2010). Let w : Rd 7→ [0, ∞) be a Borel-measurable, bounded, symmetric function with bounded  support satisfying limx→o w(x) = w(o) = 1 , e.g. w(x) = 1B (x) or w(x) = 1 − kxk 1B (x) . c2 )n := λ bn + (σ X6= i,j≥1 X − X  1Wn (Xi ) 1Wn (Xj ) j i c2 )n (bn cn )d w − (λ |(Wn − Xi ) ∩ (Wn − Xj )| bn cn Z Rd where (bn ) is a positive null sequence of bandwidths such that cn bn −→ ∞ , and n→∞ 6 w(x)dx , (12) bn := N (Wn ) λ |Wn | c2 )n := and (λ (N (Wn ) − 1) N (Wn ) . |Wn |2 c2 )n summarized in The asymptotic properties of (σ Lemma 4 Let (Wn ) be a CAS in Rd with inball radius ̺(Wn ) and N = c2 )n is asymptotically unbiased for σ 2 , i.e. PP on Rd . Then (σ P i≥1 δXi (13) be a B2 -mixing c2 )n −→ σ 2 . E(σ n→∞ c2 )n If, additionally, the PP N is B4 -mixing and cn b2n −→ 0 such that cn bn /̺(Wn ) −→ 0 , then (σ n→∞ n→∞ is mean square consistent, i.e. c2 )n − σ 2 2 −→ 0 . E (σ n→∞ Proof of Lemma 4 In view of the definitions of factorial moment and cumulant measures and their reduced versions it is easily seen after some rearrangements that c2 )n = λ + λ E(σ Z  y  bdn (2) (2) γ (dy) − w(x) dx . γ (Wn × Wn ) w bn cn red |Wn | Rd Rd Z (2) Since kγred kvar < ∞, bn −→ 0 and bn cn −→ ∞, the properties of the function w(·) imply n→∞ (2) n→∞ c2 )n −→ λ (1 + γ (Rd )). This proves the first assertion of Lemma 4. the limit E(σ red n→∞ The proof of the second assertion is somewhat more complicated because integrals w.r.t. third- and fourth-order factorial moment and cumulant measures have to be estimated. However, apart from obvious changes, this proof equals almost verbatim that of Theorem 1 in Heinrich and Prokešová (2010) (which states Lemma 4 for Wn = [−n, n]d ). Therefore we omit the details and refer the reader to Heinrich and Prokešová (2010). ✷ 3 Limit Theorems for Scaled Empirical K-Functions Theorem 1 Let N = p P bn − λ ) = |Wn | ( λ i≥1 δXi be a B4 -mixing PP on Rd satisfying  N (Wn ) − λ |Wn | d (2) p −→ N (0, σ 2 ) with σ 2 = λ 1 + γred (Rd ) . n→∞ |Wn | (14) If cαn /̺(Wn ) −→ 0 for some α ∈ (0, 1) , then n→∞ d (α) ∆B,n (r) −→ GB (r) := 2 λ |B| r d N (0, σ 2 ) for any fixed r ≥ 0 n→∞ (15) and (α) d (∆B,n (ri ))ki=1 −→ (GB (ri ))ki=1 n→∞ for any fixed k-tuple r1 , . . . , rk ≥ 0 , k ≥ 1 . 7 (16) Proof of Theorem 1 Lemma 2 and Chebyshev’s inequality imply that Xn (r) := (α) ∆B,n (r) (2) α (cα r B) N (Wn ) − λ |Wn | P p −→ 0 for all r ≥ 0 . − 2 red n α n→∞ |Wn | |Wn | (17) In other words, Xn (r) converges in probability to zero, that is, P(|Xn (r)| ≥ ε) −→ 0 for all n→∞ ε > 0 . Now, we rearrange the terms in (17) so that N (Wn ) − λ |Wn | p , |Wn | N (Wn ) − λ |Wn | (2) Yn (r) := 2 γred (cαn r B) . |Wn |α+1/2 (α) ∆B,n (r) where = Xn (r) + Yn (r) + 2 λ |r B| (18) (2) Since α > 0, it follows from kγred kvar < ∞ and (14) that Yn (r) also converges in probability to zero. Finally, condition (14) and Slutsky’s lemma, see Billingsley (1968), Chapt. 1, provide the assertion (15) of Theorem 1. To prove (16) we use the Cramér-Wold device, see Billingsley (1968), Chapt. 1, and show that, for any ξ1 , . . . , ξk ∈ R1 satisfying ξ12 + · · · + ξk2 6= 0, the linear combination k X (α) ξi ∆B,n (ri ) i=1 k X k X k N (Wn ) − λ |Wn | X p ξi Yn (ri ) + 2 λ |B| ξi Xn (ri ) + ξi rid = |Wn | i=1 i=1 i=1 P converges in distribution to the Gaussian random variable 2 λ |B| ki=1 ξi rid N (0, σ 2 ) . As before P P in the proof of (15), this follows immediately by applying (14), Xn (ri ) −→ 0 and Yn (ri ) −→ 0 n→∞ n→∞ for i = 1, . . . , k together with Slutsky’s lemma. ✷ Corollary 1 The multivariate CLT (16) and (14) give rise to define a χ2 -type test statistic (α) TB,n (r1 , . . . , rk )  (α) k  (α) 2 1 X ∆B,n (ri ) − ∆B,n (ri−1 ) 2 |Wn | b + . λ − λ := 2 2 n d λ σ σ2 rid − ri−1 i=1 For any 0 := r0 < r1 < · · · < rk < ∞ , k ≥ 1 and all α ∈ (0, 1) it holds d (α) TB,n (r1 , . . . , rk ) −→ (4 k |B|2 + 1) N (0, 1)2 , n→∞ where the limit remains the same when λ2 and σ 2 are replaced by their mean-square consistent estimators (13) and (12), respectively, provided the assumptions of Lemma 4 are satisfied. Proof of Corollary 1 Using (18) for r ∈ {r1 , . . . , rk } gives (α) (α) ∆B,n (ri ) − ∆B,n (ri−1 ) rid d − ri−1 = 2 λ |B| p  bn − λ + Xn (ri ) + Yn (ri ) − Xn (ri−1 ) − Yn (ri−1 ) |Wn | λ d rid − ri−1 for i = 1, . . . , k. By squaring the previous equality and summing up all squares we get together with (14) and Slutsky’s lemma the assertion of Corollary 1. ✷ 8 Remark 2 The CLT (14) for the number N (Wn ) can be verified for various classes of stationary PPes, see Ivanoff (1982), among them Poisson cluster processes, see Heinrich (1988), or αdeterminantal PPes, see e.g. Heinrich (2016) and references therein. Note that for any Brillingermixing PP condition (14) is satisfied, see Jolivet (1981), Heinrich and Schmidt (1985), Karr (1987) or Biscio and Lavancier (2017). (α) It is noteworthy that the squared intensity λ2 occurring in ∆B,n (r) cannot be replaced by the asymptotically unbiased estimator (13) without changing the limit as reveals Remark 3 Under the conditions of Lemma 2 we have c2 )n KB (cα r) 2 = 0 for all r ≥ 0 . 2 K ) (cα r) − (λ lim |Wn |1−2α E (λ\ B n n n (19) n→∞ The proof of (19) is based on the same arguments and techniques as used to prove Lemma 2. For the interested reader a detailed proof is given Appendix B. c2 )n is asymptotically normally distributed which On the other hand, (14) implies that (λ follows easily by applying Slutsky’s lemma: p b p   d c2 )n − λ2  = |Wn | λ bn − λ λ bn + λ − pλn |Wn | (λ −→ 2 λ N (0, σ 2 ) . n→∞ |Wn | Theorem 2 In addition to the assumptions of Theorem 1, suppose that (8) is satisfied. Then, for 1/4 < α < 1 , the weak convergence d (α) {∆B,n (r) : r ∈ [0, R]} −→ {GB (r) := 2 λ |B| r d N (0, σ 2 ) : r ∈ [0, R]} (20) n→∞ (3) holds in the Skorohod-space D[0, R] . If, in addition to (8), the Lebesgue densities of γred and (4) γred exist and satisfy (10), then the weak convergence (20) in D[0, R] holds for 0 < α < 1 . Proof of Theorem 2 The multivariate CLT (16) states that all finite-dimensional distributions of (α) (∆B,n (r))r≥0 converge to the corresponding distributions of the continuous mean zero Gaussian process (GB (r))r≥0 with covariance function EGB (s) GB (t) = 4 λ2 σ 2 |B|2 sd td . To verify the (α) (α) tightness of the sequence of random functions ∆B,n := (∆B,n (r))r∈[0,R] in the Skorohod-space D[0, R] , see Billingsley (1968), Chapt. 3, we shall show that for each ε > 0 and η > 0 there exists a δ ∈ (0, 1), such that (α) P( w(∆B,n , δ) ≥ ε ) ≤ η for all sufficiently large n , (21) where w(f, δ) := sup{|f (t) − f (s)| : |t − s| ≤ δ, 0 ≤ s, t ≤ R} denotes the modulus of continuity of a so-called càdlàg-functions f : [0, R] 7→ R1 being right-continuous on [0, R) and having limits from the left on (0, R], i.e. f ∈ D[0, R] . 2 K ) (cα r) Since rB is compact for all r ≥ 0 and s B ⊆ t B for s ≤ t, the function r 7→ (λ\ B n n is piecewise constant, non-decreasing, right-continuous on [0, R] (P-a.s.) with upward-jumps 9 (2) α α at c−α n kXi − Xj kB for i 6= j. Furthermore, λ KB (cn r) = αred (cn r B) is also non-decreasing and right-continuous (even absolutely continuous due (8)) for r ≥ 0 . Hence, by (1) we have (α) (α) ∆B,n (0) = 0 and P(∆B,n ∈ D[0, R]) = 1 for all n ≥ 1 . Since |(tB) \ (sB)| = (td − sd ) |B| ≤ d Rd−1 |B| (t − s) for 0 ≤ s ≤ t ≤ R, Lemma 3 yields (α) (α) E ∆B,n (t) − ∆B,n (s) 2 ≤ a1 (d Rd−1 |B|)2 (t − s)2 + d Rd−1 |B| a2 (t − s) a3 + . |Wn |α |Wn |2α For given ε ∈ (0, 1), for some β ∈ (0, 1) and sufficiently large n0 = n0 (ε), we choose s, t ∈ [0, R] such that ε/|Wn |2 α ≤ |t − s|1+β ≤ 1 for all n ≥ n0 . Such a choice of s, t ∈ [0, R] implies |t − s|/|Wn |α ≤ |t − s|1+β /ε and (t − s)2 ≤ |t − s|1+β /ε so that (α) (α) E ∆B,n (t) − ∆B,n (s) 2 ≤ a |t − s|1+β /ε , (22) (k) where a = a1 (d Rd−1 |B|)2 + a2 d Rd−1 + a3 depends on d, R, B, λ and kγred kvar , k = 2, 3, 4 . 2 K ) (cα r) as well as λ2 K (cα r) is non-decreasing in r ≥ 0, we find after a short Since (λ\ B n B n n calculation that, for any s ≤ t ≤ u , (α) (α) (α) (α) |∆B,n (t) − ∆B,n (s)| ≤ |∆B,n (u) − ∆B,n (s)| + |Wn |1/2−α λ2 (KB (cαn u) − KB (cαn s)) , (23) where the second term on the r.h.s. is bounded by a0 λ |Wn |1/2 |(uB) \ (sB)| due to (8). (α) (α) In the next step we determine an upper bound of sups≤t≤s+m h |∆B,n (t) − ∆B,n (s)|, where m is a positive integer and the number h is chosen such that ε/|Wn |2 α ≤ h1+β and h ≤ min{1, R} . (α) (α) We consider the random variables ζk := ∆B,n (s + k h) − ∆B,n (s + (k − 1) h) for k = 1, . . . , m (for s ≤ R and with s + k h replaced by R if it exceeds R). From (22) it follows (α) (α) P(|∆B,n (s + j h)) − ∆B,n (s + i h)| ≥ τ ) = P(|ζi+1 + · · · + ζj | ≥ τ ) ≤ 1+β a (j − i) h 2 ετ for any τ > 0 and 1 ≤ i ≤ j ≤ m , where m does not exceed ⌊R/h⌋ + 1 . Now, we are in a position to apply Theorem 12.2 in Billingsley (1968), p. 94, which admits the estimate (α) (α) P( max |∆B,n (s + k h)) − ∆B,n (s)| ≥ τ ) = P( max |ζ1 + · · · + ζk | ≥ τ ) ≤ 1≤k≤m 1≤k≤m 1+β a4 a m h , ε τ2 where a4 (occurring in Theorem 12.2) only depends on β. Using (23) for u = t + h yields (α) (α) (α) (α) |∆B,n (t) − ∆B,n (s)| ≤ |∆B,n (s + h) − ∆B,n (s)| + a5 |Wn |1/2 h with a5 = a0 λ |B| d Rd−1 , whence we conclude that 10 (α) sup s≤t≤s+m h (α) (α) (α) |∆B,n (t) − ∆B,n (s)| ≤ 3 max |∆B,n (s + k h)) − ∆B,n (s)| + a5 |Wn |1/2 h . 1≤k≤m To obtain the latter estimate we simply use the fact the sup is taken in at least one of the intervals [s + (k − 1) h, s + k h] for k = 1, . . . , m . We specify now the choice of h, m and δ ∈ (0, min{1, R}) for given (small enough) ε > 0, η > 0 as follows: Since α > 1/4 we may put β = 4 α − 1 > 0 for α < 1/2 (and β = α for α ∈ [1/2, 1)) and hence h can be chosen to fulfill the 1 2α inequality ε 1+β /|Wn | 1+β ≤ h < ε/a5 |Wn |1/2 for n ≥ n0 (ε) . This choice of h combined with the previous estimates for τ = ε gives P( (α) (α) sup s≤t≤s+m h |∆B,n (t) − ∆B,n (s)| ≥ 4 ε) ≤ P( max |ζ1 + · · · + ζk | ≥ ε) ≤ 1≤k≤m 1+β a4 a m h . ε3 Setting m = ⌊(ε3 η)1/β /h⌋ and δ = m h (such that 0 < δ ≤ (ε3 η)1/β < min{1, R}) we get that (α) (α) P( sup |∆B,n (t) − ∆B,n (s)| ≥ 4 ε) ≤ δ s≤t≤s+δ β a4 a m h ≤ a4 a δ η 3 ε for n ≥ n0 (ε) , s ∈ [0, R − δ] . Finally, applying the Corollary to Theorem 8.3 in Billingsley (1968) we obtain that for any ε, η > 0 there exists a δ = δ(ε, η) > 0 such that (α) P(w(∆B,n , δ) ≥ 12 ε) ≤ (1 + ⌊R/δ⌋) a4 a δ η ≤ a4 a (1 + R) η for all sufficiently large n , which coincides with (21) up to the factors 12 and a4 a (1 + R), respectively. Therefore, the (α) sequence (∆B,n )n≥1 is tight in D(0, R) and together with the convergence of its the finitedimensional distributions the proof of (20) for 1/4 < α < 1 is complete. The validity of (20) can be extended to 0 < α ≤ 1/4 under the additional assumption (10). To see this, let α ∈ (0, 1). For given ε ∈ (0, 1) we choose s, t ∈ [0, R] such that ε/|Wn |α ≤ |t − s|α ≤ 1 for all n ≥ n0 . In view of (11) such a choice of s, t ∈ [0, R] enables us to replace (22) by (α) (α) E ∆B,n (t) − ∆B,n (s) 2 ≤ b |t − s|1+α /ε with b = a1 (d Rd−1 |B|)2 + a2 d Rd−1 , (24) where the constants a1 , a2 are from (11). Now, the increment h can be chosen to fulfill the 1 inequality ε α /|Wn | ≤ h < ε/a5 |Wn |1/2 for n ≥ n0 (ε) . The remaining steps are the same as before with β = α. This terminates the proof of Theorem 2. ✷ Corollary 2 Let V |[0, R] 7→ [0, ∞) be non-decreasing, right-continuous function such that V (R) < ∞. Under the assumptions of Theorem 2 (additionally with (10)) we have for 1/4 < α ≤ 1/2 ( 0 < α ≤ 1/2 ) 11 Z R 0 (α) ∆B,n (r) 2 d dV (r) −→ 4 λ2 |B|2 n→∞ Z R 0 r 2d dV (r) N (0, σ 2 )2 . (25) Corollary 3 Let v be a càdlàg-function on [0, R], i.e. v ∈ D[0, R]. Under the assumptions of Theorem 2 (additionally with (10)) we have for 1/4 < α ≤ 1/2 ( 0 < α ≤ 1/2 ) sup 0≤r≤R d (α) ∆B,n (r) v(r) −→ 2 λ |B| sup |r d v(r)| | N (0, σ 2 ) | . n→∞ (26) 0≤r≤R RR The proofs of Corollary 2 and 3 rely on the fact that both functionals F1 (f ) = 0 f 2 (r) dV (r) and F2 (f ) = sup0≤r≤R |f (r) v(r)| are continuous on D[0, R] in the following sense: Let (fn ) be a sequence in D[0, R] having a continuous limit f w.r.t. to the Skorohod metric in D[0, R], see Chapt. 3 in Billingsley (1968) for a precise definition. By virtue of this definition it can be shown that Fi (fn ) −→ Fi (f ) for i = 1, 2. Since the limit process {GB (r) : r ∈ [0, R]} in Theorem 2 is n→∞ (P-a.s.) continuous, a direct application of the continuous mapping theorem, see Theorem 5.1 in Billingsley (1968), yields the limit theorems (25) and (26). ✷ Remark 4 The trivial weight functions V (r) = r in (25) and v(r) = 1 in (26) provide analogues to the classical Cramér-von Mises and Kolmogorov-Smirnov test statistic. By means of the (α) functions V and v one can place higher weights on | ∆B,n (r) | in particular for small r-values, 2d+1 for b > 0. e.g. v(r) = e−a r for a ≥ d/R or V ′ (r) = e−b r 4 Goodness-of-fit-tests for checking point process hypotheses Aim: Testing the null hypothesis H0 : P = P0 vs. H1 : P = 6 P0 by checking the goodness-of-fit of the (known) K−function K0,B (·) and intensity λ0 of N ∼ P0 . For this purpose we change the notation (2) and put α 2 K ) (cα r) − λ2 K ∆0,B,n (r) := |Wn |1/2−α (λ\ B n n 0 0,B (cn r) (α)  for 0 ≤ r ≤ R , 0 ≤ α < 1 . As consequence of (3) in order to distinguish between PPes with different KB −function, the below Theorems 3 - 5 are formulated only for 0 < α ≤ 1/2 . In the particular case α = 1/2 the normalizing sequence |Wn |1/2−α is constant equal to 1. First we establish a χ2 -type test as an immediate outcome of Corollary 1. According to this under the null hypothesis H0 and provided that N ∼ P0 satisfies the conditions of Theorem 1 and Lemma 4, the test statistic \ (α) T0,B,n (r1 , . . . , rk ) := 1 c2 )n (σ c2 )n (λ  (α) k  (α) X ∆0,B,n (ri ) − ∆0,B,n (ri−1 ) 2 d rid − ri−1 i=1 12 + bn − λ0 )2 |Wn | (λ c2 )n (σ possesses the limit distribution function Fk,B (x) := P((4 k |B|2 + 1) N (0, 1)2 ≤ x) (as n → ∞) for any 0 := r0 < r1 < · · · < rk < ∞ , k ≥ 1 and all α ∈ (0, 1/2] . Given a significance level γ > 0 \ (α) ( = probability of the type I error ), H0 is accepted (for sufficiently large n) if T0,B,n (r1 , . . . , rk ) ≤ 2 (4 k |B|2 + 1) z1−γ/2 , where zp denotes the p-quantile of the standard normal distribution Φ(x) = 2 P(N (0, 1) ≤ x). This follows from Fk,B ((4 k |B|2 +1) z1−γ/2 ) = 1−P(|N (0, 1)| > z1−γ/2 ) = 1−γ . Theorem 3 Let N0 ∼ P0 satisfy the conditions of Theorem 2 (additionally with (10)) and Lemma 4. Then, under the null hypothesis H0 , we have for 1/4 < α ≤ 1/2 ( 0 < α ≤ 1/2 ) RR 0 and 2 (α) Z R  bn − λ0 )2 d  ∆0,B,n (r) dV (r) |Wn | ( λ 2 −→ 4 |B| r 2d dV (r) + 1 N (0, 1)2 + n→∞ c2 )n (σ c2 )n c2 )n 0 (λ (σ (27) (α) p ∆0,B,n (r) v(r)  b n − λ0 | d  |Wn | | λ 0≤r≤R q q −→ 2 |B| sup |r d v(r)| + 1 | N (0, 1) | , (28) + n→∞ 0≤r≤R c2 )n c2 )n bn (σ (σ λ sup where the weight functions V and v are the same as in Corollary 2 and 3, respectively. c2 )n and (σ c2 )n Proof of Theorem 3 In view of Slutsky’s lemma it suffices to prove (27) when (λ p are replaced by λ20 and σ02 ( = asymptotic variance of N (Wn )/ |Wn | under H0 ). Using the relations (17) and (18) under H0 : N ∼ P0 we obtain after some rearrangements the following identity 1 λ20 Z R 0  2 ) − λ0 |Wn | 2  (α) bn − λ0 )2 = N (Wnp ∆0,B,n (r) dV (r) + |Wn | (λ |Wn | + Z 0 R Z 0 R  4 |r B|2 dV (r) + 1 N (Wn ) − λ0 |Wn |  Xn (r) + Yn (r)   Xn (r) + Yn (r) p dV (r) . + 4 |r B| λ0 λ0 |Wn | (29) (α) Now, we apply the tightness of the sequence {∆0,B,n (r) : r ∈ [0, R]} which implies that P P sup0≤r≤R |Xn (r)| −→ 0 and sup0≤r≤R |Yn (r)| −→ 0. Thus, the integral in (29) tends to zero in n→∞ n→∞ probability. Finally, the assumption (14) combined once more with Slutsky’s lemma shows the normal convergence 1 λ20 Z 0 R 2 (α) ∆0,B,n (r) dV (r) d bn − λ0 )2 −→ + |Wn | (λ n→∞ Z 0 R  4 |r B|2 dV (r) + 1 N (0, σ02 )2 which is equivalent to (27). The proof of the second assertion (28) relies on the same arguments as before. The relations (17) and (18) (under H0 : N ∼ P0 ) allows to derive the (ω-wise) estimate 13 sup 0≤r≤R (α) ∆0,B,n (r) v(r) + λ0 p  ) − λ0 |Wn | bn − λ0 − 2 |B| sup |r d v(r)| + 1 N (Wnp |Wn | λ |Wn | 0≤r≤R ≤ 1 λ0 sup 0≤r≤R (Xn (r) + Yn (r)) v(r) P −→ 0 . n→∞ Together with (14) and Slutsky’s lemma it follows the distributional convergence (α) sup 0≤r≤R ∆0,B,n (r) v(r) + λ0 p bn − λ0 |Wn | λ d −→ n→∞  2 |B| sup |r d v(r)| + 1 | N (0, σ02 ) | , 0≤r≤R which turns out to be equivalent to (28)). Thus, the proof of Theorem 3 is complete. ✷ A further application of the Theorem 2 consists in testing the hypothesis that two independent PPes Na ∼ Pa and Nb ∼ Pb possess the same distribution, that is, testing H0a,b : Pa = Pb vs. H1a,b : Pa 6= Pb . Note that the parameters λa , σa2 and the K-function Ka,B and their estimators are related to Pa and an observation of Na in Wn which also applies for quantities with subscript b. It should be mentioned that first attempts to tackle this two-sample test problem for stationary PPes were made in Doss (1989). Theorem 4 Let Na ∼ Pa and Nb ∼ Pb be two independent B4 -mixing PPes on Rd which can be observed in Wn and satisfy the conditions of Theorem 2 (additionally with (10)) and Lemma 4. Then, under the null hypothesis H0a,b , we have for 1/4 < α ≤ 1/2 ( 0 < α ≤ 1/2 ) |Wn |   [ 2 K ) (cα r) 2 dV (r) \ 2 K ) (cα r) − (λ ca )n − (λbb )n 2 |W | ( λ ( λ n a a n n n n b b 0 + c2 ) c2 ) (σ c2 )  c2 ) + (σ c2 ) (σ c2 ) + (λ |Wn |2 α (λ (σ a n a n a n b n b n b n RR d −→ n→∞  2 4 |B| Z R r 2d dV (r) + 1 0  (30) N (0, 1)2 . Proof of Theorem 4 In case of the PP Na ∼ Pa we use the abbreviation (α) α 2 α 2K ∆a,B,n (r) := |Wn |1/2−α (λ\ a a,B )n (cn r) − λa Ka,B (cn r)  for 0 ≤ r ≤ R p (α) and correspondingly ∆b,B,n (r) for Nb ∼ Pb . Further, define Qa,n := (Na (Wn ) − λa |Wn |)/ |Wn | and likewise Qb,n . Using the relations (17) and (18) for both PPes Na and Nb (with obvious changes of the notation) we arrive at (α) (α) ∆a,B,n (r) − ∆b,B,n (r) = Zna,b (r) + 2 |r B| ( λa Qa,n − λb Qb,n ) , (31) where Zna,b (r) := Xa,n (r) − Xb,n (r) + Ya,n (r) − Yb,n (r) . Under H0a,b (which implies λa = λb and p  ca )n − (λbb )n = Qa,n − Qb,n . After Ka,B = Kb,B ) we may use the (ω-wise) equality |Wn | (λ 14 squaring, integrating w.r.t. dV and dividing both sides of (31) by λ2a σa2 + λ2b σb2 and provided H0a,b : Pa = Pb is true, we obtain the equality (α) 2 ca )n − (λbb )n )2 Z R (∆(α) (Qa,n − Qb,n )2 |Wn | ((λ a,B,n (r) − ∆b,B,n (r)) + dV (r) = σa2 + σb2 λ2a σa2 + λ2b σb2 σa2 + σb2 0 +4 Z R 0 (Qa,n − Qb,n )2 |rB| dV (r) + σa2 + σb2 2 Z R 0  Zna,b (r) Zna,b (r) + 4 |rB| (λa Qa,n − λb Qb,n ) dV (r) , λ2a σa2 + λ2b σb2 (α) (α) [ 2 K ) (cα r) ) for \ 2 K ) (cα r) − (λ where ∆a,B,n (r) − ∆b,B,n (r) can be replaced by |Wn |1−2 α ( (λ a a n n b b n n all 0 ≤ r ≤ R . The assumptions of Theorem 2 put on both PPes Na ∼ Pa and Nb ∼ Pb and their independence imply P sup |Zna,b (r)| −→ 0 and n→∞ 0≤r≤R Qa,n − Qb,n d q −→ N (0, 1) , n→∞ σa2 + σb2 whence in summary we conclude that Z c b 2 [ 2 K ) (cα r) )2 dV (r) + |Wn | ((λa )n − (λb )n ) \ 2 K ) (cα r) − (λ ( (λ a a n n n n b b σa2 + σb2 0 Z   R d −→ 4 |B|2 r 2d dV (r) + 1 N (0, 1)2 . |Wn |1−2 α λ2a σa2 + λ2b σb2 R n→∞ 0 After replacing the unknown parameters λ2a , λ2b and σa2 , σb2 by the mean-square consistent estimators given in (13) and (12), respectively, and applying of Slutsky’s lemma, the proof of Theorem 4 is complete. ✷ Theorem 5 Let Na ∼ Pa and Nb ∼ Pb be two independent B4 -mixing PPes on Rd which can be observed in Wn and satisfy the conditions of Theorem 2 (additionally with (10)) and Lemma 4. Then, under the null hypothesis H0a,b , we have for 1/4 < α ≤ 1/2 ( 0 < α ≤ 1/2 ) p p [ 2 K ) (cα r)) v(r) \ 2 K ) (cα r) − (λ ca )n − (λbb )n ((λ |Wn | (λ n n a a n n b b 0≤r≤R q q + c2 ) c2 ) (σ c2 ) c2 ) (σ c2 ) + (σ c2 ) + (λ |Wn |α (λ (σ a n a n a n b n b n b n |Wn | sup d −→ n→∞  2 |B| sup | r d v(r) | + 1 0≤r≤R  (32) | N (0, 1) | . Proof of Theorem 5 With the notation introduced in the proof of Theorem 4 and (31) it is easily seen that 15  (α) (α) ∆a,B,n (r) − ∆b,B,n (r) v(r) λa Qa,n − λb Qb,n 0≤r≤R q − 2 |B| sup |r d v(r)| q 0≤r≤R λ2a σa2 + λ2b σb2 λ2a σa2 + λ2b σb2 q is bounded by the sequence sup Zna,b (r) v(r) / λ2a σa2 + λ2b σb2 tending to zero in probability. sup 0≤r≤R Obviously, just as in the foregoing proof, if H0a,b is true and if (14) is satisfied for both of the independent PPes Na and Nb we have p ca )n − (λbb )n |Wn | (λ λa Qa,n − λb Qb,n Qa,n − Qb,n q = q = q σa2 + σb2 λ2a σa2 + λ2b σb2 σa2 + σb2 d −→ | N (0, 1) | . n→∞ Hence, if H0a,b is true and all the assumptions of Theorem 4 are fulfilled, p |Wn | sup 0≤r≤R [ 2 K ) (cα r)) v(r) \ 2 K ) (cα r) − (λ p ((λ a a n n b b n n ca )n − (λbb )n |Wn | (λ q q + |Wn |α λ2a σa2 + λ2b σb2 σa2 + σb2 d −→ n→∞   2 |B| sup |r d v(r)| + 1 | N (0, 1) | . 0≤r≤R The arguments at the of the proof of Theorem 4 confirm the assertion stated in Theorem 5. ✷ Remark 5 The observation windows of Na and Nb need not to be the same. Theorems 4 and 5 remain valid when the independent PPes Na and Nb are given in (Wna ) and (Wnb ) (each forming a CAS) such that |Wna | = |Wnb | for sufficiently large n. Remark 6 Let there be given a significance level γ > 0 ( = probability of the type I error). Then, H0 resp. H0a,b is accepted (for large n) if the test statistic on the l.h.s. of (27) resp. (30)  2 RR (or if the test statistic on the l.h.s. of (28) resp. does not exceed 4 |B|2 0 r 2d dV + 1 z1−γ/2  d (32) does not exceed 2 |B| supr∈[0,R] |r v(r)| + 1 z1−γ/2 ), where zp is defined by Φ(zp ) = p . 5 Proofs of Lemma 2 and Lemma 3 Proof of Lemma 2 We start with the following decomposition h  i2 2 K ) (cα r) − N (W ) α(2) (cα r B) − α(2) (cα r B) N (W ) − λ |W | E |Wn | (λ\ B n n n n n red n red n = i2 h 2 (2) 2 K ) (cα r) − N (W ) α(2) (cα r B) αred (cαn r B) Var(N (Wn )) + E |Wn | (λ\ B n n n n red (2) − 2 αred (cαn r B) E h i h 2 K ) (cα r) − N (W ) α(2) (cα r B) N (Wn ) − λ |Wn | |Wn | (λ\ B n n n red n = Tn(1) (r B) + Tn(2) (r B) − Tn(3) (r B) . 16 The assertion of Lemma 2 follows from the three limits  (2) lim |Wn |−(1+2α) Tn(1) (r B) = lim |Wn |−(1+2α) Tn(2) (r B) = λ3 |r B|2 1 + γred (Rd ) n→∞ (33) n→∞ and  (2) lim |Wn |−(1+2α) Tn(3) (r B) = 2 λ3 |r B|2 1 + γred (Rd ) . (34) n→∞ Using the second-order stationarity of N = get P i≥1 δXi (2) and the definitions of γ (2) and γred we 2 Var(N (Wn )) = E N (Wn ) − λ |Wn | = λ |Wn | + γ (2) (Wn × Wn ) = λ |Wn | + λ Z Rd Z Rd 1Wn (x) 1Wn (y + (2) x)γred (dy)dx = λ |Wn | + λ Z (2) Rd |Wn ∩ (Wn − y)|γred (dy) , (2) whence in view of kγred kvar < ∞, Lemma 1 and Lebesgue’s convergence theorem it follows that (2) (2) αred (cαn r B) γred (cαn r B) = λ |r B| + −→ λ |r B| for α > 0 n→∞ |Wn |α |Wn |α and λ γ (2) (Wn × Wn ) = |Wn | |Wn | Z (2) (2) Rd (35) |Wn ∩ (Wn − y)| γred (dy) −→ λ γred (Rd ) . n→∞ The latter two relations prove the first limit of (33). \ 2 K ) (r) = λ2 K (r) = 2 K ) (cα r), i.e. E(λ Taking into account the unbiasedness of (λ\ B n B B n n (3) (2) λ αred (r B) , and EN (Wn ) = λ |Wn | we can write Tn (r B) as follows:   (2) 2 K ) (cα r) − EN 2 (W ) α(2) (cα r B) Tn(3) (r B) = 2 αred (cαn r B) |Wn | EN (Wn ) (λ\ B n n n red n   (2) 2 K ) (cα r) − λ2 |W | α(2) (cα r B) = 2 αred (cαn r B) |Wn | EN (Wn ) (λ\ B n n n red n 2 (2) − 2 αred (cαn r B) Var(N (Wn )) .  (2) Combining (35) and Var(N (Wn ))/|Wn | −→ λ 1 + γred (Rd ) reveals that (34) is equivalent to n→∞    2 K ) (cα r) − λ2 |W | α(2) (cα r B) = 2 λ2 |r B| 1 + γ (2) (Rd ) . (36) lim |Wn |−α EN (Wn ) (λ\ B n n n red red n n→∞ 2 K ) (cα r) as follows For this purpose we rewrite EN (Wn ) (λ\ B n n 17 2 K ) (cα r) = E EN (Wn ) (λ\ B n n X 1W (Xi ) 1W (Xj ) 1W (Xk ) n n n 1cαn r B (Xj − Xi ) |(W − X ) ∩ (W − Xj )| n i n i,j,k≥1 i6=j = E X6= 1W (Xi ) 1W (Xj ) 1W (Xk ) n n n 1cαn r B (Xj − Xi ) |(Wn − Xi ) ∩ (Wn − Xj )| i,j,k≥1 + E X6= 1Wn (Xi ) 1Wn (Xk ) 1cα r B (Xk − Xi ) X6= 1Wn (Xj ) 1Wn (Xk ) 1cα r B (Xk − Xj ) n n +E |(Wn − Xi ) ∩ (Wn − Xk )| |(Wn − Xk ) ∩ (Wn − Xj )| i,k≥1 = Z Z Rd j,k≥1 Z Rd + 2 Z = λ Z 1Wn (x) 1Wn (y) 1Wn (z) 1cαn r B (y − x) α(3) (d(x, y, z)) |Wn ∩ (Wn − y + x)| Rd Z Rd Rd Z Rd Rd Z + 2λ Z Rd = λ Z Z Rd Rd Z Rd 1Wn (x) 1Wn (y) 1cα r B (y − x) α(2) (d(x, y)) |Wn ∩ (Wn − y + x)| n Rd 1Wn (x) 1Wn (y + x) 1Wn (z + x) (3) 1cαn r B (y) αred (d(y, z)) dx |Wn ∩ (Wn − y)| 1Wn (x) 1Wn (y + x) (2) 1cαn r B (y) αred (dy) dx |Wn ∩ (Wn − y)| |Wn ∩ (Wn − y) ∩ (Wn − z)| 1cαn r B (y) (3) (2) αred (d(y, z)) + 2 λ αred (cαn r B) . (37) |Wn ∩ (Wn − y)| Disintegration of formula (6) for k = 3 on both sides w.r.t. the third component leads to (3) (3) (2) (2) (3) (2) (2) αred (A1 × A2 ) = γred (A1 × A2 ) + λ |A1 | γred (A2 ) + γ (2) (A1 × A2 ) + λ γred (A1 ) |A2 | + λ2 |A1 | |A2 | = γred (A1 × A2 ) + λ |A1 | γred (A2 ) + γ (2) (A1 × A2 ) + λ αred (A1 ) |A2 | (38) 2 K ) (cα r) for any bounded A1 , A2 ∈ B d . Thus, according to (38) we rewrite (37) so that EN (Wn ) (λ\ B n n takes the form λ Z 2 + λ Rd Z Z Rd R Rd Z  |Wn ∩ (Wn − y) ∩ (Wn − z)| 1cαn rB (y)  (3) (2) γred (d(y, z)) + λ γred (dz) dy + γ (2) (d(y, z)) |Wn ∩ (Wn − y)| Rd |Wn ∩ (Wn − y) ∩ (Wn − z)| 1cαn rB (y) (2) (2) αred (dy) dz + 2 λ αred (cαn r B) . |Wn ∩ (Wn − y)| Since Rd |Wn ∩ (Wn − y) ∩ (Wn − z)| dz = |Wn ∩ (Wn − y)| |Wn | multiple application of Fubini’s theorem yields the estimate 2 K ) (cα r) − λ2 |W | α(2) (cα r B) − 2 λ α(2) (cα r B) − 2 λ2 |cα r B| γ (2) (Rd ) EN (Wn ) (λ\ B n n n n red n red n red 18 ≤ (3) λ kγred kvar +λ Z Rd Z  |Wn ∩ (Wn − y) ∩ (Wn − z)|  (2) dy γred (dz) . 1− |Wn ∩ (Wn − y)| cα n rB From Lemma 1 we see that, for any y ∈ cαn r B and z ∈ Rd , 1− |Wn ∩ (Wn − y) ∩ (Wn − z)| |Wn ∩ (Wn − y)| |Wn ∩ (Wn − z)| ≤1− +1− −→ 0 , n→∞ |Wn | |Wn | |Wn | whence together with (35) and Lebesgue’s convergence theorem it follows (36) so that (34) is proved. 2 K ) (cα r) = In order to verify the second limit of (33) we use again the relations E(λ\ B n n (2) (2) α λ αred (cn r B) and EN (Wn ) = λ |Wn | which allows to write Tn (r B) in the following form: h i2 2 K ) (cα r) − N (W ) α(2) (cα r B) Tn(2) (r B) = E |Wn | (λ\ B n n n red n    2 K ) (cα r) 2 − α(2) (cα r B) 2 EN 2 (W ) − T (3) (r B) = |Wn |2 E (λ\ n B n n n red n    2 K ) (cα r) − Var N (W )) α(2) (cα r B) 2 − T (3) (r B) . = |Wn |2 Var (λ\ n B n n n red n Having in mind the just proved limit (34) and the limits Var N (Wn ))/|Wn | −→ λ 1 + n→∞  (2) γred (Rd ) and (35), we need to show that    2 K ) (cα r) = 4 λ3 |r B|2 1 + γ (2) (Rd ) . lim |Wn |1−2 α Var (λ\ B n n red n→∞ (39) 2 K ) (r) we first rewrite its second moment According to the definition of the estimator (λ\ B n as expectations of multiple sums over pairwise distinct atoms of N which can be expressed in terms of integrals w.r.t. the factorial moment measures α(k) (·) for k = 2, 3, 4 . In this way we get X 1W (Xi ) 1W (Xj ) 1W (Xk ) 1W (Xℓ ) 1r B (Xj − Xi ) 1r B (Xℓ − Xk )   n n n n 2 K ) (r) 2 = E E (λ\ B n |(Wn − Xi ) ∩ (Wn − Xj )| |(Wn − Xk ) ∩ (Wn − Xℓ )| i,j,k,ℓ≥1 i6=j,k6=ℓ = E X6= 1W (Xi ) 1W (Xj ) 1W (Xk ) 1W (Xℓ ) 1r B (Xj − Xi ) 1r B (Xℓ − Xk ) n n n n |(Wn − Xi ) ∩ (Wn − Xj )| |(Wn − Xk ) ∩ (Wn − Xℓ )| i,j,k,ℓ≥1 +4E X6= 1W (Xi ) 1W (Xj ) 1W (Xk ) 1r B (Xj − Xi ) 1r B (Xk − Xi ) n n n |(Wn − Xi ) ∩ (Wn − Xj )| |(Wn − Xi ) ∩ (Wn − Xk )| i,j,k≥1 +2E X6= 1W (Xi ) 1W (Xj ) 1r B (Xj − Xi ) n n , |(Wn − Xi ) ∩ (Wn − Xj )|2 i,j≥1   2 K ) (r) 2 = E(λ\ B n Z Wn Z Wn Z Wn Z Wn 1r B (y − x) 1r B (v − u) α(2) (d(x, y)) α(2) (d(u, v)) |Wn ∩ (Wn − y + x)| |Wn ∩ (Wn − v + u)| 19 and  Z  2 K ) (cα r) Var (λ\ = B n n Rd Rd Z Rd Z Wn Z Wn Z Wn Z Z Rd 1Wn (x)1Wn (y)1Wn (u)1Wn (v) 1cαn r B (y − x) |Wn ∩ (Wn − y + x)| |Wn ∩ (Wn − v + u)|   × 1cαn r B (v − u) α(4) (d(x, y, u, v)) − α(2) (d(x, y)) α(2) (d(u, v)) + Z 4 + Z 2 Wn Wn 1cαn r B (y − x) 1cαn r B (z − x) α(3) (d(x, y, z)) |Wn ∩ (Wn − y + x)| |Wn ∩ (Wn − z + x)| 1cαn r B (y − x) α(2) (d(x, y)) |Wn ∩ (Wn − y + x)|2 = Tn(4) (r B) + 4 Tn(5) (r B) + 2 Tn(6) (r B) . (5) (40) (6) We first treat the asymptotic behaviour of Tn (r B) and Tn (r B). After some obvious rearrangements combined with Lemma 1 and (35) we obtain (6) |Wn | Tn (r B) |Wn |2 α = λ |Wn | |Wn |2 α = λ |Wn | |Wn |2 α Z Rd Z Z Rd 1Wn (x) 1Wn (y + x) 1cαn r B (y) (2) αred (dy)dx |Wn ∩ (Wn − y)|2 (2) Rd 1cαn r B (y) αred (dy) |Wn ∩ (Wn − y)| (2) ( −→ λ αred (r B) for α = 0 ) n→∞ (2) ≤ λ sup y∈cα n rB αred (cαn r B) |Wn | −→ 0 for α > 0 . |Wn ∩ (Wn − y)| |Wn |2 α n→∞ (41) (3) Similarly, using the differential reduction formula α(3) (d(x, y, z)) = λ αred (dy − x, dz − x) dx and Lemma 1 we find that (5) |Wn | Tn (r B) |Wn |2 α = λ = Z Rd Z Rd 1cαn r B (y) 1cαn r B (z) |Wn | |Wn ∩ (Wn − y) ∩ (Wn − z)| (3) αred (d(y, z)) |Wn |2 α |Wn ∩ (Wn − y)| |Wn ∩ (Wn − z)| (3)  λ αred (cαn r B × cαn r B) 1 + θ εn (r) , 2 α |Wn | (42) where θ ∈ [−1, 1] is suitably chosen and εn (r) := sup y,z∈cα nrB |Wn | |Wn ∩ (Wn − y) ∩ (Wn − z)| − 1 −→ 0 for any fixed r > 0 , n→∞ |Wn ∩ (Wn − y)| |Wn ∩ (Wn − z)| (5) (3) which shows that |Wn | Tn (r B) −→ λ αred (r B × r B) for α = 0 . On the other hand, by (38), n→∞ (3) (2) (2) λ αred (cαn r B × cαn r B) = λ2 αred (cαn r B) |cαn r B| + λ2 γred (cαn r B) |cαn r B| Z (2) (3) α α 2 |cαn r B ∩ (cαn r B − y)| γred (dy) . + λ γred (cn r B × cn r B) + λ Rd 20 (5) |Wn |1−2 α Tn (r B) −→ λ3 |r B|2 . Hence, together with (35) it is easily seen that n→∞ To prove (39) it remains to verify the limit (4) |Wn | Tn (r B) (2) = 4 λ3 |r B|2 γred (Rd ) for α > 0 . 2 α n→∞ |Wn | lim (43) For proving this we make use of the decomposition α(4) (d(x, y, u, v)) − α(2) (d(x, y)) α(2) (d(u, v)) = γ (4) (d(x, y, u, v)) (44)   + λ dx γ (3) (d(y, u, v)) + dy γ (3) (d(x, u, v)) + du γ (3) (d(x, y, v)) + dv γ (3) (d(x, y, u)) + γ (2) (d(x, u)) γ (2) (d(y, v)) + γ (2) (d(x, v)) γ (2) (d(y, u))   + λ2 dx du γ (2) (d(y, v)) + dx dv γ (2) (d(y, u)) + dy du γ (2) (d(x, v)) + dy dv γ (2) (d(x, u)) , which is obtained by applying the formula (6) for k = 2 and k = 4 with A1 = dx, A2 = dy, A3 = du and A4 = dv . After rewriting the integrals in terms of reduced cumulant measures and (k) in view of the assumptions kγred kvar < ∞ for k = 2, 3, 4 it turns out that, for α > 0 , only the below four integrals contribute with a non-zero limit to the r.h.s. of (43): λ2 |Wn | |Wn |2α Z Rd Z Rd Z Rd Z Rd 1Wn (x)1Wn (y)1Wn (u)1Wn (v) 1cαn r B (y − x) 1cαn r B (v − u) |Wn ∩ (Wn − y + x)| |Wn ∩ (Wn − v + u)|   × γ (2) (d(y, v)) dx du + dx dv γ (2) (d(y, u)) + dy du γ (2) (d(x, v)) + dy dv γ (2) (d(x, u)) = 4 λ3 |Wn | |Wn |2α Z Rd Z Rd Z Rd Z Rd 1Wn (x + y) 1Wn (u + v + y) 1Wn (y) 1Wn (v + y) |Wn ∩ (Wn + x)| |Wn ∩ (Wn + u)| (2) × 1cαn r B (x) 1cαn r B (u) γred (dv) dx du = 4 λ3 Z Rd Z rB Z rB |Wn | |Wn ∩ (Wn − cαn x) ∩ (Wn − v) ∩ (Wn − cαn u − v)| (2) dx du γred (dv) |Wn ∩ (Wn − cαn x)| |Wn ∩ (Wn − cαn u)| (2) −→ 4 λ3 |r B|2 γred (Rd ) for α ≥ 0 , n→∞ where the latter limit is justified by Lemma 1 and and Lebesgue’s convergence theorem. Thus, (43) is proved which completes the proof of Lemma 2. ✷ For α = 0 the remaining seven integrals on the r.h.s. of (44) possesses non-zero limits in general: 21 |Wn | Z Rd Z Rd Z Rd Z 1Wn (x)1Wn (y)1Wn (u)1Wn (v) 1rB (y − x) 1rB (v − u)  (4) γ (d(x, y, u, v)) |Wn ∩ (Wn − y + x)| |Wn ∩ (Wn − v + u)| Rd  +2 λ γ (3) (d(y, u, v)) dx + 2 λ γ (3) (d(x, y, v)) du + 2 γ (2) (d(x, u)) γ (2) (d(y, v)) Z Z (3) (4) 2 1rB (v − u) γred (d(u, v)) 1rB (v − u) 1rB (y) γred (d(y, u, v)) + 2 λ |rB| −→ λ n→∞ 2d 3d R R Z (2) (2) (3) d 2 2 |(rB − u) ∩ (rB − v)| γred (du) γred (dv) . +2 λ |rB| γred (rB × R ) + 2 λ R2d All above limits obtained for α = 0 and inserted in (40) are summarized in Remark 7 For any B4 -mixing PP N = P i≥1 δXi on Rd the asymptotic variance 2 K ) (r) τB2 (r) := lim |Wn | Var (λ\ B n n→∞  exists and takes the form τB2 (r) = λ Z R3 d 3 + 2λ + (3) (4) Z 1r B (y − x) 1r B (z) γred (d(x, y, z)) + 4 λ2 |rB| γred (rB × Rd ) (2) (2) (2) |(r B − x) ∩ (r B − y)| γred (dx) γred (dy) + 4 λ3 |r B|2 γred (Rd ) R2 d (3) 4 λ αred (r B (2) × r B) + 2 λ αred (r B) . (45) Proof of Lemma 3 For notational ease we put X6= 1Wn (Xi ) 1Wn (Xj ) 1cα A (Xj − Xi ) \ (2) n (λαred )n (A) := |(Wn − Xi ) ∩ (Wn − Xj )| i,j≥1 for bounded A ∈ B d . (2) From (2) and the definition of αred (·) we get, for 0 ≤ s ≤ t, \ \ (α) (α) (2) (2) (2) ∆B,n (t) − ∆B,n (s) = |Wn |1/2−α (λ αred )n ((tB) \ (sB)) and E(λαred )n (A) = λ αred (cαn A) . Therefore, it suffices to show that  \ (2) |Wn |1−2 α Var (λαred )n (A) ≤ a1 |A|2 + a2 |A| |Wn |−α + a3 |Wn |−2 α (46) for any bounded, o-symmetric ( i.e. A = −A) A ∈ B d . For this purpose we use the decomposition (40) and replace the ball r B by a bounded A ∈ B d . Due to Lemma 1 we find some n0 (depending on sup{kxk : x ∈ A}) such that supy∈cαn A |Wn |/|Wn ∩ (Wn − y)| ≤ 2 for all n ≥ n0 . From (41) with A instead of r B together with (8) we arrive at (2) |Wn |1−2 α Tn(6) (A) ≤ 2 λ αred (cαn A) |Wn |−2 α ≤ 2 a0 λ |A| |Wn |−α 22 for n ≥ n0 . (47) In the same way we modify (42), where 1 + θ εn (r) can be replaced by 2 for n ≥ n0 (due to the argument used before), and obtain (3) |Wn |1−2 α Tn(5) (A) ≤ 2 λ αred (cαn A × cαn A) |Wn |−2 α for n ≥ n0 . Condition (8) applied to (38) leads to (3) (3) αred (A1 × A2 ) ≤ kγred kvar + 3 λ a0 |A1 | |A2 | − 2 λ2 |A1 | |A2 | , whence it follows that (3) |Wn |1−2 α Tn(5) (A) ≤ 2 λ kγred kvar |Wn |−2 α + 6 λ2 a0 |A|2 for n ≥ n0 . (48) (3) On the other hand, (38)and the first condition of (10) yield αred (A1 × A2 ) ≤ max{a01 + (5) 2 2 λ , 3 λ a0 } |A1 | |A2 | so that |Wn |1−2 α Tn (A) ≤ a1 |A|2 for n ≥ n0 for some constant a1 > 0. (4) To obtain suitable bounds of Tn (A) (defined in (40) for A = r B ) for any bounded, osymmetric set A ∈ B d we have to estimate all integrals w.r.t. the measures on the r.h.s of (44). As before we choose n0 such that |Wn | ≤ 2 inf x∈cαn A |Wn ∩ (Wn − x)| for n ≥ n0 . By the o-symmetry of A it is easily checked that Tn(4) (A)  = Z Rd Z Rd Z Rd Z Rd 1Wn (x)1Wn (y)1Wn (u)1Wn (v) 1cαn A (y − x) 1cαn A (v − u) × |Wn ∩ (Wn − y + x)| |Wn ∩ (Wn − v + u)|  γ (4) (d(x, y, u, v)) + 4 λ γ (3) (d(y, u, v))dx + 2 γ (2) (d(x, u)) γ (2) (d(y, v)) + 4 λ2 γ (2) (d(y, v))d(x, u) . (k) (k) After passing to the reduced factorial cumulant measures γred (·) and using that kγred kvar < ∞ for k = 2, 3, 4 we obtain after some straightforward, but lengthy calculations the estimate (4) |Wn | (3) (2) (4) kγred kvar kγred kvar kγred k2var Tn (A) (2) 2 2 ≤ 2 λ + 8 λ |A| + 8 λ |A| + 8 λ3 |A|2 kγred kvar (49) |Wn |2 α |Wn |2 α |Wn |α |Wn |α (2) (2) for all n ≥ n0 . Clearly, (8) implies that the reduced covariance measure γred (·) = αred (·) − λ | · | (2) admits the estimate | γred (A) | ≤ max{a0 , λ} |A| for all bounded A ∈ B d . After inserting the latter on the r.h.s. of (49) we obtain together with (47), (48) the estimate (46). Setting A = (tB) \ (sB) in (46 terminates the proof of Lemma 3. ✷ To prove (11) we use γ (4) (d(x, y, u, v)) = λ κ(4) (y − x, u − x, v − x) d(v, u, y, x) and (10) to find an appropriate bound of 23 |Wn | |Wn |2α ≤ ≤ |Wn | |Wn |2α 2 |Wn |2α Z R4 d Z R3 d Z R2 d 1Wn (x)1Wn (y)1Wn (u)1Wn (v) 1cαn A (y − x) 1cαn A (v − u) (4) γ (d(x, y, u, v)) |Wn ∩ (Wn − y + x)| |Wn ∩ (Wn − v + u)| |Wn ∩ (Wn − y) ∩ (Wn − u) ∩ (Wn − v + u)| 1cαn A (y) 1cαn A (v) |Wn ∩ (Wn − y)| |Wn ∩ (Wn − v)| 1cαn A (y) 1cαn A (v) Z × |κ(4) (y, u, v + u)| d(v, u, y) Rd |κ(4) (y, u, v + u)| du d(v, y) . An application of the Cauchy-Schwarz inequality combined with the second condition of (10) yields the following bound of the latter line: 2 |cαn A| |Wn |2α Z R2 d Z (4) Rd |κ (y, u, v + u)| du 2 1/2 √ |A| ≤ 2 a02 d(v, y) . |Wn |α (4) Together with the foregoing estimates of the other terms of Tn (A) we obtain estimate (46) without a3 |Wn |−2 α but changed constants a1 and a2 . For A = (tB) \ (sB) this coincides with the desired relation (11). ✷ 6 Appendix A In this appendix we state and prove a result from convex geometry which has relevance for the statistical analysis of spatial PPes and random closed sets observed on increasing compact convex sampling windows. Unfortunately, we could not find an appropriate reference to the below estimates (50) in the huge literature on convex geometry. Let K 6= ∅ be a convex body (compact convex set) in Rd with inball radius ̺(K) > 0. In this case the corresponding quermassintegrals Wk (K) are also positive for k = 0, 1, ..., d , where W0 (·) = | · | and d W1 (·) = Hd−1 (∂(·)) , stands for the d-dimensional volume and the (d − 1)dimensional surface content, respectively. Let denote K ⊕ (rBe ) := {x ∈ Rd : (rBe ) + x ∩ K 6= ∅} resp. K ⊖(rBe ) := {x ∈ K : (rBe )+x ⊆ K} the dilation resp. erosion of K by a closed Euclidean ball rBe with radius r ≥ 0 centered at the origin o. The following lemma gives bounds of the deviation of the volumes |K ⊕ (rBe )| and |K ⊖ (rBe )| from |K| in terms of the ratio r/̺(K) . Lemma 5 With the above notation the following two inequalities hold for 0 ≤ r ≤ ̺(K) : 0≤1− dr |K ⊖ (rBe )| ≤ |K| ̺(K) and r |K ⊕ (rBe )| (2d − 1) r ≤ −1≤ . ̺(K) |K| ̺(K) (50) Proof of Lemma 5 We start by recalling the fact that the function r 7→ |K ⊖rBe | has a continuous derivative Hd−1 (∂(K ⊖ (rBe )) for 0 ≤ r < ̺(K) , see Hadwiger (1957), p. 207. This fact and the isotony of the quermassintegral W1 (·) yield 24 0 ≤ |K| − |K ⊖ (rBe )| = Z r 0 Hd−1 (∂(K ⊖ (ρBe )))dρ ≤ r Hd−1 (∂K) for 0 ≤ r ≤ ̺(K) . (51) Since |K ⊖ (̺(K)Be )| = 0 we get immediately that |K| ≤ ̺(K) Hd−1 (∂K) . On the other hand, it was proved in Wills (1970) that d |K| ≥ ̺(K) Hd−1 (∂K) which implies the inclusion 1 Hd−1 (∂K) d ≤ ≤ . ̺(K) |K| ̺(K) (52) Combining (51) and (52) yields the first inequality of the Lemma. To verify the second assertion we make use of the famous Steiner formula, see Hadwiger (1957), which reads as follows: rH d−1 d   X d (∂K) = r d W1 (K) ≤ |K ⊕ (rBe )| − |K| = Wk (K) r k k (53) k=1 Now, we apply of the well-known inequality Wk−1 (K) Wk+1 (K) ≤ (Wk (K))2 for k = 1, . . . , d−1 , see Hadwiger (1957), p. 282, which implies together with the right-hand inequality of (52) that Wk (K) ≤ W0 (K)  W1 (K) W0 (K) k = |K|  Hd−1 (∂K) d |K| k ≤ |K| (̺(K))k for k = 1, . . . , d . Inserting this estimate on the r.h.s. of (53) we arrive at |K ⊕ (rBe )| − |K| ≤ |K|  r d −1 1+ ̺(K)  = d−1 r |K| X  r k . 1+ ̺(K) ̺(K) k=0 Since 0 ≤ r/̺(K) ≤ 1 , the latter sum is bounded by 2d − 1. This and the previous estimate combined with the lower bounds in (52) and (53) yield the second estimate of (50) which completes the proof the Lemma 5. ✷ Corollary 4 It holds that |∂K ⊕ (rBe )| ≤ (2d − 1 + d) r Hd−1 (∂K) for r ≥ 0 . Proof of Corollary 4 Combining both inequalities of Lemma 5 leads to |∂K ⊕ (rBe )| = |K ⊕ (rBe )| − |K| + |K| − |K ⊖ (rBe )| ≤ (2d − 1 + d) r |K| ̺(K) and the l.h.s. of (52) confirms the assertion of Corollary 4. ✷ References [1] Adelfio, G and Schoenberg FP (2009) Point process diagnostics based on second-order statistics and their asymptotic properties. Ann. Inst. Stat. Math. 61(4):929 - 948 [2] Baddeley A and Silverman BW (1984) A cautionary example for the use of second-order methods for analyzing point patterns. Biometrics 40(4):1089 - 1094 25 [3] Baddeley A, Møller J and Waagepetersen R (2000) Non- and semiparametric estimation of interaction in inhomogeneous point patterns. Statistica Neerlandica 54(2):329 - 350 [4] Billingsley P (1968) Convergence of Probability Measures, Wiley, New York. [5] Biscio CAN and Lavancier, F (2016) Brillinger mixing of determinantal point processes and statistical applications. Elect J Statist 10(1):582 - 607 [6] Biscio CAN and Lavancier, F (2017) Contrast estimation for parametric stationary determinantal point processes. Scand J Statist 44(1):204 - 229 [7] Chiu SN, Stoyan D, Kendall WS and Mecke J (2013) Stochastic Geometry and its Applications, 3rd edn. Wiley, Chichester. [8] Daley DJ and Vere-Jones D (1988) An Introduction to the Theory of Point Processes, Springer, New York. [9] Diggle PJ (2003) Statistical Analysis of Spatial Point Patterns, 2nd edn Arnold, London. [10] Doss H (1989) On estimating the dependence between two point processes. Ann Statist 17(2):749 - 763. [11] Gaetan C and Guyon X (2010) Spatial Statistics and Modeling, Springer, New York. [12] Guan Y and Sherman, M (2007) On least squares fitting for stationary spatial point processes. J Royal Statist Soc Ser B 69(1):31 - 49 [13] Guan Y, Sherman M and Calman JA (2006) Assessing isotropy for spatial point processes. Biometrics 62(1):119 - 129. [14] Hadwiger H (1957) Vorlesungen über Inhalt, Oberfläche und Isoperimetrie, Springer, Berlin. [15] Heinrich L and Schmidt V (1985) Normal convergence of multidimensional shot noise and rates of this convergence. Adv Appl Probab 17(4):709–730. [16] Heinrich L (1988) Asymptotic Gaussianity of some estimators for reduced factorial moment measures and product densities of stationary Poisson cluster processes. statistics 19(1):87 106. [17] Heinrich L (1991) Goodness-of-fit tests for the second moment function of a stationary multidimensional Poisson process. statistics 22(2):245 - 268. [18] Heinrich L (1994) Normal approximation for some mean-value estimates of absolutely regular tessellations. Math Methods of Statistics 3(1):1 - 24. [19] Heinrich L and Prokešová M (2010) On estimating the asymptotic variance of stationary point processes. Methodol Comput Appl Probab 12(3):451 - 471. [20] Heinrich L (2013) Asymptotic methods in statistics of random point processes. In: Stochastic Geometry, Spatial Statistics and Random Fields, ed: E Spodarev, Lecture Notes in Mathematics 2068, Springer, New York, pp. 115 - 150. 26 [21] Heinrich L (2015) Gaussian limits for empirical multiparameter K-functions of homogeneous Poisson processes and tests for complete spatial randomness. Lithuan Math J 55(1):72 - 90. [22] Heinrich L (2016) On the strong Brillinger-mixing property of α-determinantal point processes with some applications. Applications of Mathematics 61(4):443 - 461. [23] Ho LP and Chiu SN (2006) Testing the complete spatial randomness by Diggle’s test without an arbitrary upper limit. J Statist Comput and Simul 76(7):585 - 591. [24] Illian J, Penttinen A, Stoyan D and Stoyan H (2008) Statistical Analysis and Modelling Spatial Point Processes, Wiley, Chichester. [25] Ivanoff G (1985) Central limit theorem for point processes. Stoch Proc Appl 12(2):171 - 186. [26] Jolivet E (1981) Central limit theorem and convergence of empirical processes for stationary point processes. In: Point processes and Queueing Problems, eds: Bartfai P and Tomko J (Colloquia Mathematica Societatis J Bolyai 24, Keszthely, Hungary, 1978) North-Holland, Amsterdam, pp. 117 - 161. [27] Karr, AF (1987) Estimation of Palm measures of stationary point processes. Probab Th Rel Field 74(1):55 - 69. [28] Kiêu K and Mora M (1999) Estimating the reduced moments of a random measure. Adv Appl Probab 31(1):48 - 62. [29] Marcon E, Traissac S and Lang G (2013) A statistical test for Ripley’s K-function rejection of Poisson hypothesis. ISRN Ecology, Vol. 2013, Article ID 753475, 9 pages. [30] Ohser J and Stoyan D (1981) On the second-order and orientation analysis of planar stationary point processes. Biom J 23(6):523 - 533. [31] Ripley BD (1976) The second-order analysis of stationary point processes. J Appl Probab 13(2):255 - 266. [32] Schoenberg FP (1999) Transforming spatial point processes into Poisson processes. Stoch Proc Appl 81(2):155 - 164. [33] Stein M (1993) Asymptotically optimal estimation for the reduced second moment measure of point processes. Biometrika 80(2):443 - 449. [34] Wiegand T, Grabarnik P and Stoyan D (2016) Envelope tests for spatial point patterns with and without simulation. Ecosphere 7(6):641 - 656. [35] Wills, JM (1970) Zum Verhältnis Volumen zu Oberfläche bei konvexen Körpern. Arch Math 21(5):557 - 560. [36] Zhao J and Wang J (2010) Asymptotic properties of an empirical K-function for inhomogeneous spatial point processes. Statistics 44(3):261 - 267. 27 7 Appendix B In this second appendix we study the asymptotic behaviour of two further estimators of λ2 KB (r) which are slightly different from (1). We consider their scaled and as unscaled version separately. 2 K ) (r) which also turns out unbiased To start with we define a (so-called naive) estimator (λ^ B n and is easier to calculate, 1 X 1 X6= 1Wn (Xi ) (N − δXi )(r B + Xi ) = 1Wn (Xi ) 1r B (Xj − Xi ) . |Wn | |Wn | 2 K ) (r) := (λ^ B n i≥1 i,j≥1 P 2 K ) (cα r) for 0 ≤ r ≤ R and 0 ≤ α < 1 the PP N = However, in order to calculate (λ^ B n n i≥1 δXi α must be observable in the larger window Wn ⊕ (cn R B) or the original window Wn must be replaced by the eroded window Wn ⊖ (cαn R B) (which means ‘minus-sampling’). To avoid minus\ 2 K ) (r) or (λ 2 K ) (r) the estimator sampling and as an further alternative to (λ^ B n B n (λ2 KB )n (r) := 1 X6= 1Wn (Xi ) 1Wn (Xj ) 1r B (Xj − Xi ) |Wn | i,j≥1 is sometimes used although it is no longer unbiased but at least still asymptotically unbiased in the following sense: Provided that cαn /̺(Wn ) −→ 0 for some 0 ≤ α < 1 it follows by means of n→∞ Lemma 1 that, as n → ∞ , E(λ2 KB )n (cαn r) = λ Z cα n rB   cα  |Wn ∩ (Wn − x)| (2) n . αred (dx) = λ2 KB (cαn r) 1 + O |Wn | ̺(Wn ) P Lemma 1B Let N = i≥1 δXi be a B4 -mixing PP on Rd . Further, let (Wn ) be a CAS in Rd with inball radius ̺(Wn ) and 0 ≤ α < 1 . If cαn /̺(Wn ) −→ 0 , then n→∞ h ^ 2 K ) (cα r) − (λ 2 K ) (cα r) lim |Wn |1−2α E (λ\ B n n B n n n→∞ i2 = 0 and i2 h 2 K ) (cα r) = 0. lim |Wn |1−2α Var (λ2 KB )n (cαn r) − (λ^ B n n n→∞ 2 K ) (cα r) and (λ2 K ) (cα r) in terms Proof of Lemma 1B We first express the variances of (λ^ B n n B n n of factorial moment and cumulant measures of order k = 2, 3, 4 . For this we apply general  P6= P6= formula for the covariance C(g, h) := Cov i,j≥1 g(Xi , Xj ), k,ℓ≥1 h(Xk , Xℓ ) which has been proved in Heinrich (1988), p. 97. To avoid ambiguities we present this formula once more for fourth-order stationary PP’s and Borel-measurable functions g, h on Rd × Rd such that the integrals on the r.h.s. exist: 28 C(g, h) = + + Z 4d ZR ZR 3d R2d   g(x, y) h(u, v) α(4) (d(x, y, u, v)) − α(2) (d(x, y)) α(2) (d(u, v)) (54)   g(x, y) h(x, u) + h(y, u) + h(u, x) + h(u, y) α(3) (d(x, y, u))   g(x, y) h(x, y) + h(y, x) α(2) (d(x, y)) , where the signed measure α(4) − α(2) × α(2) in (54) allows the decomposition (44). We use (54) together with (44) for g(x, y) = h(x, y) = |Wn |−1 1Wn (x) 1cαn r B (y − x) and get = 1 |Wn |1+2α Z R4d   2 K ) (cα r) |Wn |1−2α Var (λ^ B n n  1Wn (x) 1Wn (u) 1cαn r B (y − x) 1cαn r B (v − u) α(4) − α(2) × α(2) (d(x, y, u, v)) Z    1Wn (x) 1 + 1Wn (u) + 1Wn (y) + 1Wn (u)1Wn (y) 1cαn rB (y − x) 1cαn rB (u − x)α(3) (d(x, y, u)) + R3d + Z R2d   (2) 1Wn (x) 1 + 1Wn (y) 1cαn rB (y − x) α (d(x, y))  λ = |Wn |2α λ + |Wn |2α ×1 cα n rB Z R3d  |Wn ∩ (Wn − u)| (4) (2) 1cαn rB (y) 1cαn rB (v − u) αred (d(y, u, v)) − αred (dy) α(2) (d(u, v)) |Wn | Z  R2d |Wn ∩ (Wn − y)| |Wn ∩ (Wn − u)| |(Wn − y) ∩ (Wn − u)| + + 1+ |Wn | |Wn | |Wn | (y) 1 cα n rB −→ (3) (u) αred (d(y, u))  2   τB (r) n→∞   4 λ3 λ + |Wn |2α Z  Rd |Wn ∩ (Wn − y)| 1+ |Wn |   (2) 1cαn rB (x) αred (dx) for α = 0 , 1+  (2) γred (Rd ) | r B |2 (55) = 4 λ2 σ 2 | r B |2 for α > 0 . Both limits in (55) follow from (38) and (44) combined with a multiple use of Lemma 1 (for α = 0 and α > 0 separately). Comparing (55) with (39) and (45) reveals that     |Wn | |Wn | 2 K ) (cα r) = lim 2 K ) (cα r) for 0 ≤ α < 1 . Var (λ^ Var (λ\ B n n B n n 2α 2α n→∞ |Wn | n→∞ |Wn | lim (56) From (54) and (44) for g(x, y) = h(x, y) = |Wn |−1 1Wn (x) 1Wn (y) 1cαn r B (y − x) we get in the 29 same way as before 1 |Wn |1+2α = + 4 Z  Z Wn4   |Wn |1−2α Var (λ2 KB )n (cαn r)  1cαn r B (y − x) 1cαn r B (v − u) α(4) − α(2) × α(2) (d(x, y, u, v)) (3) 1cαn rB (y − x) 1cαn rB (u − x) α (d(x, y, u)) + 2 Wn3 Z 4λ |Wn |2α + 2λ |Wn |2α + 1cαn rB (y − x) α (d(x, y))  |Wn ∩ (Wn − y) ∩ (Wn − u) ∩ (Wn − v)| 1cαn rB (y) 1cαn rB (v − u) |Wn | R3d (4) αred (d(y, u, v)) × (2) Wn2 λ |Wn |2α = Z Z R2d Z Rd (2) − αred (dy) α(2) (d(u, v))  |Wn ∩ (Wn − y) ∩ (Wn − u)| (3) 1cαn rB (y) 1cαn rB (u) αred (d(y, u)) |Wn |  2   τB (r) |Wn ∩ (Wn − x)| (2) 1cαn rB (x) αred (dx) −→ n→∞  |Wn |  4 λ2 σ 2 | r B |2 for α = 0 , for α > 0 . Hence,     |Wn | |Wn | 2 K ) (cα r) for 0 ≤ α < 1 . Var (λ2 KB )n (cαn r) = lim Var (λ^ B n n 2α 2α n→∞ |Wn | n→∞ |Wn | lim (57) 2 K ) (cα r) and (λ ^ 2 K ) (cα r). Next we regard the asymptotic behaviour of the covariance of (λ\ B n n B n n For doing this we use (54) with g(x, y) = 1Wn (x) 1Wn (y) 1cαn rB (y − x)|Wn ∩ (Wn − y + x)|−1 and h(u, v) = |Wn |−1 1Wn (u) 1cαn rB (v − u) which yields = + + 1 |Wn |2α 2 |Wn |2α 2 |Wn |2α Z R4d Z R3d Z R2d  ^ 2 K ) (cα r), (λ 2 K ) (cα r) |Wn |1−2α Cov (λ\ B n n B n n  1Wn (x)1Wn (y)1cαn rB (y − x) 1Wn (u)1cαn rB (v − u) α(4) − α(2) × α(2) (d(x, y, u, v)) |Wn ∩ (Wn − y + x)|  1Wn (x) 1Wn (y) 1cαn rB (y − x) 1 + 1Wn (u) 1cαn rB (u − x) α(3) (d(x, y, u)) |Wn ∩ (Wn − y + x)| 1Wn (x) 1Wn (y) 1cαn rB (y − x) (2) α (d(x, y)) |Wn ∩ (Wn − y + x)| 30 = + λ |Wn |2α ×  + 2λ |Wn |2α Z R3d |Wn ∩ (Wn − y) ∩ (Wn − u)| 1cαn rB (y) 1cαn rB (v − u) |Wn ∩ (Wn − y)|   (4) (2) αred (d(y, u, v)) − αred (dy) α(2) (d(u, v)) Z  R2d |Wn ∩ (Wn − y) ∩ (Wn − u)| 1+ |Wn ∩ (Wn − y)|   (2)  2 λ αred (cαn rB) −→ n→∞  |Wn |2α  τB2 (r)  (3) 1cαn rB (y) 1cαn rB (u) αred (d(y, u)) for α = 0 , (58) 4 λ2 σ 2 | r B |2 for α > 0 . To obtain the limit (58) we have used quite the same arguments as in the proof of (55). Once again we employ (54) with g(x, y) = |Wn |−1 1Wn (x) 1Wn (y) 1cαn rB (y − x) and h(u, v) = |Wn |−1 1Wn (u) 1cαn rB (v − u). After performing almost the same calculations as before we arrive at = + + = 1 |Wn |2α 2 |Wn |2α 2 |Wn |2α λ |Wn |2α R4d Z R3d Z R2d Z  1Wn (x)1Wn (y)1cαn rB (y − x) 1Wn (u)1cαn rB (v − u) α(4) − α(2) × α(2) (d(x, y, u, v)) |Wn |  1Wn (x) 1Wn (y) 1cαn rB (y − x) 1 + 1Wn (u) 1cαn rB (u − x) α(3) (d(x, y, u)) |Wn | 1Wn (x) 1Wn (y) 1cαn rB (y − x) (2) α (d(x, y)) |Wn | |Wn ∩ (Wn − y) ∩ (Wn − u)| 1cαn rB (y) 1cαn rB (v − u) |Wn | R3d (4) αred (d(y, u, v)) ×  + 2λ |Wn |2α + Z  2 K ) (cα r) |Wn |1−2α Cov (λ2 KB )n (cαn r), (λ^ B n n 2λ |Wn |2α Z  R2d Z cα n rB   (2) − αred (dy) α(2) (d(u, v)) |Wn ∩ (Wn − y) ∩ (Wn − u)| 1+ |Wn |  (3) 1cαn rB (y) 1cαn rB (u) αred (d(y, u))  2   τB (r) |Wn ∩ (Wn − y)| (2) α (d(x, y)) −→ n→∞  |Wn |  31 4 λ2 σ 2 | r B |2 for α = 0 , (59) for α > 0 . Since the limits (58) and (59) are identical and coincide with the asymptotic variances (45) and (56) for 0 ≤ α < 1 the first assertion of Lemma 2B is proved due to the well-known relation       ^ \ ^ 2 K ) (cα r) − (λ 2 K ) (cα r) 2 = Var (λ 2 K ) (cα r) + Var (λ 2 K ) (cα r) E (λ\ B n n B n n B n n B n n  ^ 2 K ) (cα r), (λ 2 K ) (cα r) . − 2 Cov (λ\ B n n B n n In just the same way the identity       ^ 2 K ) (cα r) 2 = Var (λ2 K ) (cα r) + Var (λ 2 K ) (cα r) Var (λ2 KB )n (cαn r) − (λ^ B n n B n n B n n  2 K ) (cα r) − 2 Cov (λ2 KB )n (cαn r), (λ^ B n n implies the second assertion of Lemma 1B which completes the proof of Lemma 1B. ✷ Lemma 2B Under the conditions of Lemma 2 we have c2 )n KB (cα r) 2 K ) (cα r) − (λ lim |Wn |1−2α E (λ\ B n n n n→∞ 2 = 0 for all r ≥ 0 . (60) 2 K ) (cα r) can be replaced by (λ ^ 2 K ) (cα r) . Furthermore, (λ\ B n n B n n c2 )n = (λ bn )2 − λ bn /|Wn | , Proof of Lemma 2B By (a + b + c)2 ≤ 3 a2 + 3 b2 + 3 c2 and (λ c2 )n KB (cα r) 2 2 K ) (cα r) − (λ |Wn |1−2α E (λ\ B n n n 2  c2 )n − λ2  KB (cα r) 2 K ) (cα r) − λ2 K (cα r) − (λ = |Wn |1−2α E (λ\ B n n B n n   2 K ) (cα r) − λ2 K (cα r) − 2 λ K (cα r) λ bn − λ = |Wn |1−2α E (λ\ B n n B n B n  2 c2 )n − λ2 − 2 λ (λ bn − λ) − KB (cαn r) (λ   2 2 K ) (cα r) − λ2 K (cα r) − 2 λ K (cα r) λ b ≤ 3 |Wn |1−2α E (λ\ − λ B n n B n B n n    2 2 bn ) 2 . (61) bn − λ + |Wn |1−2α E KB (cαn r) λ + 3 |Wn |−(1+2α) E KB (cαn r) λ   bn − λ 4 = |Wn |−3 E N (Wn ) − λ |Wn | 4 and it is easily checked that Clearly, |Wn | E λ 4 2 d4 itX | E N (Wn )−λ |Wn | = Cum4 (N (Wn ))+3 Var(N (Wn )) , where Cum4 (X) = dt 4 log Ee t=0 denotes the fourth cumulant of the random variable X. The fourth cumulant of N (Wn ) can be expressed as linear combination of the factorial cumulant measures γ (k) applied to k-fold Cartesian product Wnk and EN (Wn ). A somewhat lengthy calculation based on (5) shows that Cum4 (N (Wn )) = γ (4) (Wn × · · · × Wn ) + 6 γ (3) (Wn × Wn × Wn ) + 7 γ (2) (Wn × Wn ) + EN (Wn ) . The B4 -mixing property of the PP N = P i≥1 δXi implies immediately the estimates (3) (4) (2) | Cum4 (N (Wn )) | ≤ λ |Wn | γred ((Rd )3 ) + 6 γred ((Rd )2 ) + 7 γred (Rd ) + 1 32   (2) and Var(N (Wn )) = γ2 (Wn × Wn ) + EN (Wn ) ≤ λ |Wn | γred (Rd ) + 1 . These two estimates combined with (35) yield 1−2α |Wn | E KB (cαn and bn − λ r) λ 2 2 bn ) |Wn |−(1+2α) E KB (cαn r) λ 2  K (cα r) 2  B n bn − λ 4 = O(|Wn |−1 ) = |W | E λ n |Wn |α =  K (cα r) 2 E(N (W ))2 n B n = O(|Wn |−1 ) |Wn |α |Wn |3 as n → ∞. Lemma 2 and the latter two relations show that the r.h.s. of (61) converges to zero which terminates the proof (60). Finally, by the norm inequality in L2 it follows    1/2  1/2 c 2 K ) (cα r) − (λ 2 ) K (cα r) 2 \ 2 K ) (cα r) − (λ ^ 2 K ) (cα r) 2 E (λ^ ≤ E ( λ B n n n B n B n n B n n 1/2  c2 )n KB (cα r) 2 2 K ) (cα r) − (λ + E (λ\ . B n n n After multiplying both sides by |Wn |1/2+α the first limit of Lemma 1B and (60) complete the proof of Lemma 2B. ✷ At the end of this Appendix B we given a structural formula for the covariance function of p  2 K ) (r) − λ2 K (r) for r ≥ 0 , which can be obtained the Gaussian limit process of |Wn | (λ\ B n B simply by repeating the proof of (45) taking into account some obvious changes. P Lemma 3B For any B4 -mixing PP N = i≥1 δXi on Rd the asymptotic covariance \ 2 K ) (s), (λ 2 K ) (t) τB (s, t) := lim |Wn | Cov (λ\ B n B n n→∞  exists for any s, t ≥ 0 and takes the form Z (4) (3) 1s B (y − x) 1t B (z) γred (d(x, y, z)) + 2 λ2 |sB| γred (tB × Rd ) R3 d Z (2) (2) (3) d 3 2 |(s B − x) ∩ (t B − y)| γred (dx) γred (dy) + 2 λ |tB| γred (sB × R ) + 2 λ τB (s, t) = λ 3 + 4λ (2) |s B| |t B| γred (Rd ) + R2 d (3) 4 λ αred (s B (2) × t B) + 2 λ αred ((s ∧ t) B) . (62) R R (4) (4) We notice that R3 d 1s B (y−x) 1t B (z) γred (d(x, y, z)) = R3 d 1t B (y−x) 1s B (z) γred (d(x, y, z)) (4) for all s, t ≥ 0 due to the symmetry properties of γred (·) . In case of stationary Poisson cluster PPes and (α-)determinantal PPes the reduced cumulant (4) (3) (2) measures γred , γred , γred resp. their Lebesgue densities have a comparatively simple shape leading to more compact representations of τB (s, t), see [16], [22] or [5, 6]. In the special case of a (k) stationary Poisson PP with intensity λ > 0 (implying γred (·) ≡ 0 for k = 2, 3, 4 ) we get τB (s, t) = 2 λ2 (s ∧ t)d |B| 1 + 2 λ (s ∨ t)d |B| 33  for s, t ≥ 0 , see [17] , [20] .
10math.ST
1 Autoregressive Moving Average Graph Filtering arXiv:1602.04436v2 [cs.LG] 21 Sep 2016 Elvin Isufi∗ , Student Member, IEEE, Andreas Loukas∗ , Member, ACM, Andrea Simonetto, Member, IEEE, and Geert Leus, Fellow, IEEE Abstract—One of the cornerstones of the field of signal processing on graphs are graph filters, direct analogues of classical filters, but intended for signals defined on graphs. This work brings forth new insights on the distributed graph filtering problem. We design a family of autoregressive moving average (ARMA) recursions, which (i) are able to approximate any desired graph frequency response, and (ii) give exact solutions for specific graph signal denoising and interpolation problems. The philosophy, to design the ARMA coefficients independently from the underlying graph, renders the ARMA graph filters suitable in static and, particularly, time-varying settings. The latter occur when the graph signal and/or graph topology are changing over time. We show that in case of a time-varying graph signal our approach extends naturally to a two-dimensional filter, operating concurrently in the graph and regular time domain. We also derive the graph filter behavior, as well as sufficient conditions for filter stability when the graph and signal are time-varying. The analytical and numerical results presented in this paper illustrate that ARMA graph filters are practically appealing for static and time-varying settings, as predicted by theoretical derivations. Keywords— distributed graph filtering, signal processing on graphs, infinite impulse response graph filters, autoregressive moving average graph filters, time-varying graph signals, time-varying graphs. I. I NTRODUCTION Due to their ability to capture the complex relationships present in many high-dimensional datasets, graphs have emerged as a favorite tool for data analysis. Indeed, in recent years we have seen significant efforts to extend classical signal processing methods to the graph setting, where, instead of regular low-dimensional signals (e.g., a temporal or spatial signals), one is interested in graph signals, i.e., signals defined over the nodes of a graph [2]. The introduction of a Fourierlike transform for graph signals brought the tool to analyze these signals not only in the node domain, but also in the graph frequency domain [2]–[4]. One of the key tools of graph signal analysis are graph filters. In a direct analogy to classical filters, graph filters process a graph signal by selectively amplifying its graph Fourier coefficients. This renders them ideal for a wide range of tasks, ranging from graph signal smoothing and denoising [5], [6], classification [7]–[9] and interpolation [10], segmentation [11], wavelet construction [12], and dictionary learning [13]—among others. Distributed implementations of filters on graphs emerged as a way of increasing the scalability of computation [6], ∗ Authors contributed equally in the preparation of this manuscript. E. Isufi, A. Simonetto and G. Leus are with the faculty of Electrical Engineering, Mathematics and Computer Science, Delft University of Technology, 2826 CD Delft, The Netherlands. A. Loukas is with Department of Telecommunication Systems, TU Berlin, Germany. E-mails: {e.isufi-1, a.simonetto, g.j.t.leus}@tudelft.nl, [email protected]. This manuscript presents a generalisation of [1]. This research was supported in part by STW under the D2S2 project from the ASSYS program (project 10561). [14]–[16]. In this way, a desired graph filtering operation is performed by only local information exchange between neighbors and there is no need for a node to have access to all the data. Nevertheless, being inspired by finite impulse response (FIR) graph filters, these methods are sensitive to time variations, such as time-varying signals and/or graphs. An alternative approach, namely distributed infinite impulse response (IIR) graph filtering, was recently proposed [17], [18]. Compared to FIR graph filters, IIR filters allow for the computation of a larger family of responses, and give exact rather than approximate solutions to specific denoising [5] and interpolation [10] problems. Yet the issue of time variations has so far been unresolved. In a different context, we introduced IIR filter design (in fact, prior to [18]) using an autoregressive process called the potential kernel [11], [19]. These graph filters were shown to facilitate information processing tasks in sensor networks, such as smoothing and event region detection, but, due to their ad-hoc design, they only accomplished a limited subset of filtering objectives. In this paper, we build upon our prior work to develop more general autoregressive moving average (ARMA) graph filters of any order, using parallel or periodic concatenations of the potential kernel. The design philosophy of these graph filters allows for the approximation of any desired graph frequency response without knowing the structure of the underlying graph. In this way, we design the filter coefficients independently of the particular graph. This allows the ARMA filters to be universally applicable for any graph structure, and in particular when the graph varies over time, or when the graph structure is unknown to the designer. Though ARMA graph filters belong to the class of IIR graph filters, they have a distinct design philosophy which bestows them the ability to filter graph signals not only in the graph frequency domain, but also in the regular temporal frequency domain (in case the graph signal is time-varying). Specifically, our design extends naturally to time-varying signals leading to two-dimensional ARMA filters: a filter in the graph domain as well as a filter in the time domain. Our contributions are twofold: (i) Distributed graph filters (Sections III and IV). We propose two types of autoregressive moving average (ARMA) recursions, namely the parallel and periodic implementation, which attain a rational graph frequency response. Both methods are implemented distributedly, attain fast convergence, and have message and memory requirements that are linear in the number of graph edges and the approximation order. Using a variant of Shanks’ method, we are able to design graph filters that approximate any desired graph frequency response. In addition, we give exact closed-form solutions for tasks such as 2 Tikhonov and Wiener-based graph signal denoising and graph signal interpolation under smoothness assumptions. (ii) Time-varying graphs and signals (Section V). We begin by providing a complete temporal characterization of ARMA graph filters w.r.t. time-varying graph signals. Our results show that the proposed recursions naturally extend to twodimensional filters operating simultaneously in the graphfrequency domain and in the time-frequency domain. We also discuss the ARMA recursion behavior when both the graph topology and graph signal are time-varying. Specifically, we provide sufficient conditions for filter stability, and show that a decomposition basis exists (uniquely determined by the sequence of graph realizations), over which the filters achieve the same frequency response as in the static case. Our results are validated by simulations in Section VI, and conclusions are drawn in Section VII. Notation and terminology. We indicate a scalar valued variable by normal letters (i.e., a or A); a bold lowercase letter a will indicate a vector variable and a bold upper case letter A a matrix variable. With ai and Aij we will indicate the eneries of a and A, respectively. For clarity, if needed we will refer to these entries also as [a]i and [A]i,j and to the i-th column of A as [A]i . We indicate by |a| the absolute value of a and by kak and kAk the 2-norm and the spectral norm of the vector a and matrix A, respectively. To characterize convergence, we adopt the term linear convergence, which asserts that a recursion converges to its stationary value exponentially with time (i.e., linearly in a logarithmic scale) [20]. II. P RELIMINARIES Consider an undirected graph G = (V, E) of N nodes and M edges, where V indicates the set of nodes and E the set of edges. Let x be the graph signal defined on the graph nodes, whose i-th component xi ∈ R represents the value of the signal at the i-th node, denoted as ui ∈ V . Graph Fourier transform (GFT). The GFT transforms a graph signal x into the graph frequency domain x̂ by projecting it into the basis spanned by the eigenvectors of the graph Laplacian L, typically defined as the discrete Laplacian Ld or the normalized Laplacian Ln . Since the Laplacian matrix of an undirected graph is symmetric, its eigenvectors {φn }N n=1 form an orthonormal basis, and the forward and inverse GFTs of x and x̂ are x̂ = ΦT x and x = Φx̂, respectively, where the n-th column of Φ is indicated as φn .The corresponding eigenvalues are denoted as {λn }N n=1 and will indicate the graph frequencies. For an extensive review of the properties of the GFT, we refer to [2], [3]. To avoid any restrictions on the generality of our approach, in the following, we present our results for a general representation matrix L. We only require that L is symmetric and local: for all i 6= j, Lij = 0 whenever ui and uj are not neighbors and Lij = Lji otherwise. We derive our results for a class of graphs with general Laplacian matrices in some restricted set L. We assume that for every L ∈ L the minimum eigenvalue is bounded below by λmin and the maximum eigenvalue is bounded above by λmax . Hence, all considered graphs have a bounded spectral norm, i.e., kLk ≤ % = max{|λmax |, |λmin |}. For instance, when L = Ld , we can take λmin = 0 and λmax = l, with l related to the maximum degree of any of the graphs. When L = Ln , we can consider λmin = 0 and λmax = 2. Graph filters. A graph filter H is an operator that acts upon a graph signal x by amplifying or attenuating its graph Fourier coefficients as N X Hx = H(λn ) hx, φn iφn , (1) n=1 where h·i denotes the usual inner product. Let λmin and λmax be the minimum and maximum eigenvalues of L over all possible graphs. The graph frequency response H : [λmin , λmax ] → R controls how much H amplifies the signal component of each graph frequency H(λn ) = hHx, φn i/hx, φn i. (2) We are interested in how we can filter a signal with a graph filter H having a user-provided frequency response H ∗ (λ). Note that this prescribed H ∗ (λ) is a continuous function in the graph frequency λ and describes the desired response for any graph. This approach brings benefits in those cases when the underlying graph structure is not known to the designer, or in cases the graph changes in time. The corresponding filter coefficients are thus independent of the graph and universally applicable. Using universal filters, we can design a single set of coefficients that instantiate the same graph frequency response H ∗ (λ) over different bases. To illustrate the universality property, consider the application of a universal graph filter to two different graphs G1 and G2 of N1 and N2 N2 1 nodes with graph frequency sets {λ1,n }N n=1 {λ2,n }n=1 , and N1 N2 eigenvectors {φ1,n }n=1 , {φ1,n }n=1 . The filter will attain the same response H ∗ (λ) over both graphs, but, in each case, supported over a different set of graph frequencies: For G1 , filterPN1 ing results in n=1 H ∗ (λ1,n ) hx, φ1,n iφ1,n , whereas for G2 PN2 the filtering operator will be n=1 H ∗ (λ2,n ) hx, φ2,n iφ2,n . Thus, the universality lies in the correctness to implement H ∗ (λ) on all graphs, which renders it applicable for timevarying graph topologies. Distributed implementation. It is well known that we can approximate a universal graph filter H in a distributed way using a K-th order polynomial of L, for instance using Chebychev polynomials [6]. Define FIRK as the K-th order approximation given by K X H = h0 I + hk Lk , (3) k=1 where the coefficients hi can be both found by Chebyshev polynomial fitting [6] or in a least-squares sense, after a (fine) gridding of the frequency range, by minimizing Z X K hk λk − H ∗ (λ)|2 dλ. (4) | λ k=0 Observe that, in contrast to traditional graph filters, the order of the considered universal graph filters is not necessarily limited to N . By increasing K, we can approximate any filter with square integrable frequency response arbitrarily 3 well. On the other hand, a larger FIR order implies a longer convergence time in a distributed setting, since each node requires information from all its K-hop neighbors to attain the desired filter response. To perform the filter distributedly in the network G, we assume that each node ui ∈ V is imbued with memory, computation, and communication capabilities and is in charge of calculating the local filter output [Hx]i . To do so, the node has to its disposal direct access to xi , as well as indirect access to the memory of its neighbors. For simplicity of presentation, we pose an additional restriction to the computation model: we will assume that nodes operate in synchronous rounds, each one consisting of a message exchange phase and a local computation phase. In other words, in each round ui may compute any (polynomial-time computable) function which has as input, variables from its local memory as well as those from the memory of its neighbors in G. Since the algorithms examined in this paper are, in effect, dynamical systems, in the following we will adopt the term iteration as being synonymous to rounds. Furthermore, we assume that each iteration lasts exactly one time instant. In this context, the convergence time of an algorithm is measured in terms of the number of iterations the network needs to perform until the output closely reaches the steady-state, i.e., the asymptotic output of the dynamical system. The computation of FIRK is easily performed distributedly. Since LK x = L LK−1 x , each node ui can compute the K-th term from the values of the (K − 1)-th term in its neighborhood, in an iterative manner. The algorithm performing the FIRK graph filter terminates after K iterations, and if a more efficient recursive implementation is used [6], in total, each node ui exchanges K deg ui values with its neighbors, meaning that, overall, the network exchanges N K deg ui variables, amounting to a communication cost of O(M K). Further, since for this computation each node keeps track of the values of its neighbors at every iteration, the network has a memory complexity of O(M ). However, FIRK filters exhibit poor performance when the graph signal or/and graph topology are time-varying, since the intermediate steps of the recursion cannot be computed exactly. This is for two reasons: i) First, the distributed averaging is paused after K iterations, and thus the filter output is not a steady state of the iteration yt = Lyt−1 , which for t = K gives yK = LK x as above. Accumulated errors in the computation alter the trajectory of the dynamical system, rendering intermediate states and the filter output erroneous. ii) Second, the input signal is only considered during the first iteration. To track a time-varying signal x1 , x2 , . . . , xt , a new FIR filter should be started at each time step t having xt as input, significantly increasing the computation, message and memory complexities. To overcome these issues and provide a more solid foundation for graph signal processing, we study ARMA graph filters. III. ARMA G RAPH F ILTERS This section contains our main algorithmic contributions. First, Sections III-A and III-B present distributed algorithms for implementing filters with a complex rational graph frequency response PK k pn (λ) k=0 bk λ = , (5) H(λ) = PK pd (λ) 1 + k=1 ak λk where pn (λ) and pd (λ) are the complex numerator and denominator polynomials of order K. Note that this structure resembles the frequency response of temporal ARMA filters [21], in which case λ = ejω , with ω being the temporal frequency. Though both polynomials are presented here to be of the same order, this is not a limitation: different orders for pn (λ) and pd (λ) are achieved trivially by setting specific constants ak or bk to zero. A. ARMA1 graph filters Before describing the full fledged ARMAK filters, it helps first to consider a 1-st order graph filter. Besides being simpler in its construction, an ARMA1 lends itself as the basic building block for creating filters with a rational frequency response of any order (cf. Section III-B). We obtain ARMA1 filters as an extension of the potential kernel [19]. Consider the following 1-st order recursion yt+1 = ψLyt + ϕx (6a) zt+1 = yt+1 + cx, (6b) for arbitrary y0 and where the coefficients ψ, ϕ and c are complex numbers (to be specified later on). For this recursion, we can prove our first result. Theorem 1. The frequency response of the ARMA1 is r , subject to |p| > % H(λ) = c + λ−p (7) with residue r and pole p given by r = −ϕ/ψ and p = 1/ψ, respectively, and with % being the spectral radius bound of L. Recursion (6) converges to it linearly, irrespective of the initial condition y0 and graph Laplacian L. Proof. We can write the recursion (6a) at time t in the expanded form as t−1 X t yt = (ψL) y0 + ϕ (ψL)τ x. (8) τ =0 When |ψ%| < 1 and as t → ∞ this recursion approaches the steady state ∞ X −1 y = lim yt = ϕ (ψL)τ x = ϕ (I − ψL) x, (9) t→∞ τ =0 irrespective of y0 . Based on Sylvester’s matrix theorem, the matrix I − ψL has the same eigenvectors as L and its eigenvalues are equal to 1 − ψλn . It is also well known that invertible matrices have the same eigenvectors as their inverse and eigenvalues that are the inverse of the eigenvalues of their inverse. Thus,  N  X ϕ c+ x̂n φn , (10) z = lim zt = y + cx = t→∞ 1 − ψλn n=1 4 and the desired frequency response (7) follows by simple algebra. We arrive at (10) by considering a specific realization of L, thus the set of eigenvalues λn ∈ [λmin , λmax ] is discrete. However, the same result is achieved for every other graph realization matrix L with a potentially different set of eigenvalues, still in [λmin , λmax ]. Thus, we can write (7) for all λ ∈ [λmin , λmax ]. The stability constraint in (7) can be also understood from a dynamical system perspective. Comparing recursion (6) to a discrete-time state-space equation, it becomes apparent that, when the condition |ψ%| < 1 holds, recursion (6) achieves frequency response (7). It is useful to observe that, since |p| > %, an increment of the stability region can be attained, if we work with a shifted version of the Laplacian L and thereby decrease the spectral radius bound %. For instance, the following shifted Laplacians can be considered: L = Ld −l/2I with λmin = −l/2 and λmax = l/2 or L = Ln − I with λmin = −1 and λmax = 1. Due to its benefits, we will use the shifted versions of the Laplacians in the filter design phase and numerical results.1 Recursion (6) leads to a simple distributed implementation of a graph filter with 1-st order rational frequency response: at each iteration t, each node ui updates its value yt,i based on its local signal xi and a weighted combination of the values yt−1,j of its neighbors uj . Since each node must exchange its value with each of its neighbors, the message/memory complexity at each iteration is of order O (M ), which leads to an efficient implementation. Remark 1. Note that there is an equivalence between the ARMA1 filter and FIR filters in approximating rational frequency responses. Indeed, the result obtained in (9) from the ARMA in t → ∞ can also be achieved with an FIR filter of order K = ∞. Further, from (8) we can see that in finite time, i.e., t = T and y0 = 0 the ARMA1 output is equivalent to an FIRT −1 filter with coefficients [ϕ, ϕψ, . . . , ϕψ T −1 ]. This suggests that: (i) the same output of an FIR filter can be obtained form (6) and (ii) the ARMA1 graph filter can be used to design the FIR coefficients to approximate frequency responses of the form (7). As we will see later on, due to their implementation form (6), the ARMA filters are more robust than FIRs in a time-varying scenario (timevarying graph and/or time-varying graph signal). B. ARMAK graph filters Next, we use ARMA1 as a building block to derive distributed graph filters with a more complex frequency response. We present two constructions: The first uses a parallel bank of K ARMA1 filters, attaining linear convergence with a communication and memory cost per iteration of O(KM ). The second uses periodic coefficients in order to reduce the communication costs to O(M ), while preserving the linear convergence as the parallel ARMAK filters. Parallel ARMAK filters. A larger variety of filter responses can be obtained by adding the outputs of a parallel ARMA1 1 Note that from Sylvester’s matrix theorem, the shifted version of the Laplacians share the same eigenvectors as the original ones. filter bank. Let’s denote with superscript (k) the terms that correspond to the k-th ARMA1 filter for k = 1, 2, . . . , K. With this notation in place, the output zt of the ARMAK filter at time instant t is (k) (k) yt+1 = ψ (k) Lyt zt+1 = K X (11a) + ϕ(k) x (k) (11b) yt+1 + cx, k=1 (k) where y0 is arbitrary. Theorem 2. The frequency response of a parallel ARMAK is H (λ) = c + K X k=1 rk λ − pk subject to |pk | > %, (12) with the residues rk = −ϕ(k) /ψ (k) and poles pk = 1/ψ (k) , and % the spectral radius of L. Recursion (11) converges to (k) it linearly, irrespective of the initial conditions y0 and graph Laplacian L. Proof. Follows straightforwardly from Theorem 1. The frequency response of a parallel ARMAK is therefore a rational function with numerator and denominator polynomials of order K (presented here in a partial fraction form). In addition, since we are simply running K ARMA1 filters in parallel, the communication and memory complexities are K times that of the ARMA1 graph filter. Note also that the same considerations of Remark 1 can be extended to the parallel ARMAK filter. Periodic ARMAK filters. We can decrease the memory requirements of the parallel implementation by letting the filter coefficients periodically vary in time. Our periodic filters take the following form yt+1 = (θt I + ψt L)yt + ϕt x (13a) zt+1 = yt+1 + cx, (13b) where y0 is the arbitrary, the output zt+1 is valid every K iterations, and coefficients θt , ψt , ϕt are periodic with period K: θt = θt−iK , ψt = ψt−iK , ϕt = ϕt−iK , with i an integer in [0, t/K]. Theorem 3. The frequency response of a periodic ARMAK filter is ! K−1 K−1 P Q (θτ + ψτ λ) ϕk H(λ) = c + k=0 τ =k+1 1− K−1 Q , (14) (θk + ψk λ) k=0 subject to the stability constraint K−1 Y (θk + ψk %) < 1 (15) k=0 with % being the spectral radius bound of L. Recursion (13) converges to it linearly, irrespective of the initial condition y0 and graph Laplacian L. (The proof is deferred to the appendix.) IV. ARMA F ILTER D ESIGN In this section we focus on selecting the coefficients of our filters. We begin by showing how to approximate any given frequency response with an ARMA filter, using a variant of Shanks’ method [22]. This approach gives us stable filters, ensuring the same selectivity as the universal FIR graph filters. Section IV-B then provides explicit (and exact) filter constructions for two graph signal processing problems which were up-to-now only approximated: Tiknohov and Wienerbased signal denoising and interpolation under smoothness assumptions [6], [23] and [10]. A. The Filter Design Problem Given a graph frequency response H ∗ : [λmin , λmax ] → R and filter order K, our objective is to find the complex polynomials pn (λ) and pd (λ) of order K that minimize Z λ 2 pn (λ) − H ∗(λ) dλ = pd (λ) K P Z λ bk λ k=0 K P k 2 − H ∗(λ) dλ ak λk 1+ k=1 (16) while ensuring that the chosen coefficients result in a stable system (see constraints in Theorems 2 and 3). From pn (λ)/pd (λ) one computes the filter coefficients (ψ (k) , ϕ(k) , c or θt , ψt , c) by algebraic manipulation. Remark 2. Even if we constrain ourselves to pass-band filters and we consider only the set of L for which % = 1, it is impossible to design our coefficients based on classical design methods developed for IIR filters (e.g., Butterworth, Chebyshev). The same issue is present also using a rational fitting approach, e.g., Padé and Prony’s method. This is due to the fact that, now, the filters are rational in the variable λ and the K = 20 1 K=5 0.5 ARMA FIR K = 10 0 0 0.2 0.4 0.6 λ 0.8 1 K = 20 freq. response By some algebraic manipulation, we can see that the frequency response of periodic ARMAK filters is also a rational function of order K. We can also observe that the stability criterion of parallel ARMAK is more involved than that of the parallel implementation. As now we are dealing with K ARMA1 graph filters interleaved in time, to guarantee their joint stability one does not necessarily have to examine them independently (requiring for instance that, for each k, |θk + ψk %| < 1). Instead, it is sufficient that the product QK−1 k=0 (θk + ψk %) is smaller than one. To illustrate this, notice that if θk = 0, the periodic ARMAK can be stable even if some of the ARMA1 graph filters it is composed of are unstable. When computing a periodic ARMAK distributedly, in each iteration each node ui stores and exchanges deg(ui ) values with its neighbors, yielding a memory complexity of O(M ), rather than the O(KM ) of the parallel one (after each iteration, the values are overwritten). On the other hand, since the output of the periodic ARMAK is only valid after K iterations, the communication complexity is again O(KM ). The low memory requirements of the periodic ARMAK render it suitable for resource constrained devices. freq. response 5 1 K = 10 K=5 0.5 0 0 0.2 0.4 0.6 λ 0.8 1 Fig. 1. The frequency response of ARMAK filters designed by Shanks’ method and the FIR responses of corresponding order. Here, H ∗ (λ) is a step function (top) and a window function (bottom). notion of frequency does not stem from jω nor from ejω . This differentiates the problem from the design of continuous and discrete time filters. Further, the stability constraint of ARMAK is different from classical filter design, where the poles of the transfer function must lie within (not outside) the unit circle. To illustrate this remark, consider the Butterworth-like −1 graph frequency response h(λ) = 1 + (λ/λc )K , where λc is the desired cut-off frequency. For K = 2, one finds that it has two complex conjugate poles at ±λc . Thus, the behavior of these filters depends on the cut-off frequency and stability is not always guaranteed. For this particular case, and for a parallel implementation, whenever λc > % the filters are not stable. Design method. Similar to Shanks’ method, we approximate the filter coefficients as follows: Denominator. Determine ak for k = 1, . . . , K by finding a PK̂ K̂ > K order polynomial approximation Ĥ(λ) = k=0 gk λk of H ∗ (λ) using polynomial regression, and solving the coefficient-wise system of equations pd (λ)Ĥ(λ) = pn (λ). Numerator. Determine bk for k = 1, R. . . , K by solving the least-squares problem of minimizing λ |pn (λ)/pd (λ) − H ∗ (λ)|2 dµ, w.r.t. pn (λ). Once the numerator (bk ) and denominator (ak ) coefficients of the target rational response are found: (i) Parallel design. Perform the partial fraction expansion to find the residuals (rk ) and poles (pk ). Then, the filter coefficients ψ (k) and ϕ(k) can be found by exploiting their relation with rk and pk in Theorem 2. (ii) Periodic design. Identify ψk by computing QK−1 the roots of the (source) denominator polynomial 1− k=0 (θk + ψk λ) in (14) P and equating them to the roots of the (target) denominator K 1 + k=1 ak λk . It is suggested to set θ1 = 0 and θk = 1 for k > 0, which has the effect of putting the two polynomials in similar form. Once coefficients ψk (and θk ) have been set, we obtain ϕk by equating the numerator target and source polynomials. The method is also suitable for numerator and denominator 6 signals that are not smooth. In (17), admitted choices of L are limited to the discrete Laplacian Ld or the normalized Laplacian Ln (without shifting). The positive regularization weight w allows us to trade-off between the two terms of the objective function. Being a convex problem, the global minimum x̃ is found by setting the gradient to zero, resulting in 0 ||zt − x|| / ||x|| 10 −5 10 K=1, w=0.5 K=1, w=1 K=1, w=2 K=2, w=0.5 K=2, w=1 K=2, w=2 −10 10 −15 10 0 1 10 10 2 t 10 Fig. 2. Convergence of a denoising parallel ARMAK filter for K = 1, 2 and w = 0.5, 1, 2. The filtering error is kzt − x̃k/kx̃k, where for each parameter pair (K, w), x̃ is the solution of the denoising problem, and zt is the filter output after t rounds. The residual error is a consequence of the computer’s bounded numerical precision. polynomials of different orders. We advocate however the use of equal orders, because it yields the highest approximation accuracy for a given communication/memory complexity. The most crucial step is the approximation of the denominator coefficients. By fitting pd (λ) to ĝ(λ) instead of g(λ), we are able to compute coefficients ak independently of bk . Increasing K̂  K often leads to a (slight) increase in accuracy, but at the price of slower convergence and higher sensitivity to numerical errors (such as those caused by packet loss). Especially for sharp functions, such as the ones shown in Fig. 1, a high order polynomial approximation results in very large coefficients, which affect the numerically stability of the filters and push the poles closer to the unit circle. For this reason, in the remainder of this paper we set K̂ = K + 1. Though the proposed design method does not come with theoretical stability guarantees, it has been found to consistently produce stable filters2 . Fig. 1 illustrates in solid lines the frequency responses of three ARMAK filters (K = 5, 10, 20), designed to approximate a step function (top) and a window function (bottom). For reproducibility, Table I, which is featured in the Appendix, summarizes the filter coefficients of the parallel implementation for different K. B. Exact and Universal Graph Filter Constructions We proceed to present exact (and in certain cases explicit) graph filter constructions for particular graph signal denoising and interpolation problems. In contrast to previous work, the proposed filters are universal, that is they are designed without knowledge of the graph structure. Indeed, the filter coefficients are found independently from the eigenvalues of the graph Laplacian. This makes the ARMA filters suitable for any graph, and ideal for cases when the graph structure is unknown or when the O(N 3 ) complexity of the eigenvalue decomposition becomes prohibitive. x̃ = I + wLK −1 t= N X 1 ht, φn iφn . 1 + wλK n n=1 (18) It follows that (18) can be approximated with an ARMAK with frequency response 1 1 = QK (19) 1 + wλK (λ − pk ) k=1 √ with pk = −eγk / K w and γk = (2k + 1)π/K. From the stability condition of the parallel ARMAK , we have stable filters as long as that |pk |√> %, which for the particular expression of pk becomes K w% < 1. The solution of (18) can also computed by an ARMAK implemented on the shifted Laplacians, with a notable improvement on the stability of the filters. For L = Ld − l/2I we can reformulate (19) as H(λ) = 1 1 (20) = QK l K 1 + w(λ + 2 ) k=1 (λ − pk ) √ where now pk = −l/2 + eγk / K w for γk = (2k + 1)π/K. Again, from the stability of ARMAK |pk | > %, or equivalently |pk |2 > %2 , we now obtain stable filters as long as  2 l cos(γk ) sin2 (γk ) √ − + K (21) + √ 2 > %2 , K 2 w w H(λ) = or equivalently  2  √ √ 2 l 2 K w − l cos(γk ) K w + 1 > 0, −% 4 (22) are satisfied. For the shifted normalized Laplacian, % = 1 and l = 2, the stability condition simplifies to √ 2cos(γk ) K w < 1, (23) (17) which is always met for the standard choices of K = 1 (quadratic regularization) and K = 2 (total variation)3 . For these values of K, and for different values of the regularized weight w, we show in Fig. 2 the normalized error between the output of the ARMAK recursion and the solution of the optimization problem (17), as a function of time. For both (19) and (20), the denominator coefficients ψ (k) of the corresponding parallel ARMAK filter can be found as ψ (k) = 1/pk . Meanwhile, the numerator coefficients ϕ(k) are found in two steps: (i) express (19), (20) in the partial form as in (12) to find the residuals rk and (ii) take ϕ(k) = −rk ψ (k) . where the first term asks for a denoised signal that is close to t, and the second uses the quadratic form of LK to penalize Wiener-based denoising. When the statistical properties of the graph signal and noise are available, it is common to opt 2 This has been observed while working with shifted Laplacians, and especially with the shifted normalized Laplacian L = Ln − I. 3 Even though w is a free parameter, for K = 1, 2 the value cos(γ ) in (23) k will be either 0 or -1, due to the expression of γk . Tikhonov-based denoising. Given a noisy signal t = x + n, where x is the true signal and n is noise, the objective is to recover x [2], [6], [23]. When x is smooth w.r.t. the graph, denoising can be formulated as the regularized problem 2 x̃ = argminkx − tk2 + w x> LK x, x∈CN 7 for a Wiener filter, i.e., the linear filter that minimizes the mean-squared error (MSE) i h 2 (24) H̃ = argmin E kHt − xk2 and x̃ = H̃t, Similar to (17), this optimization problem is convex and its global minimum is found as −1 x̃ = S + wLK t. (29) where as before t = x + n is the graph signal which has been corrupted with additive noise. It is well known that, when x and n are zero-mean with covariance Σx and Σn , respectively, the solution of (24) is Most commonly, K = 1, and x̃ can be re-written as H∈RN ×N x̃ = Σx (Σx + Σn )−1 t. (25) given that matrix Σx + Σn is non-singular. The above linear system can be solved by a graph filter when matrices Σx and Σn share the eigenvectors of the Laplacian matrix L. Denote by σx (λn ) = φ> n Σx φn the eigenvalue of matrix the Σx which corresponds to the n-th eigenvector of L, and correspondingly σn (λn ) = φ> n Σn φn . We then have that x̃ = N X σx (λn ) ht, φn iφn . σ (λ ) + σn (λn ) n=1 x n (26) It follows that, when σx (λ) and σn (λ) are rational functions (of λ) of order K, the Wiener filter corresponds to an ARMAK graph filter. Notice that the corresponding filters are still universal, as the ARMAK coefficients depend on the rational functions σx (λ) and σn (λ), but not on the specific eigenvalues of the graph Laplacian. In a different context, similar results have been also observed in semi-supervised learning [24]. Let us illustrate the above with an example. Suppose that x is normally distributed with covariance equal to the pseudoinverse of the Laplacian L† . This is a popular and well understood model for smooth signals on graphs with strong connections to Gaussian Markov random fields [25]. In addition, let the noise be white with variance w. Substituting this into (26), we find x̃ = N X 1 ht, φn iφn , 1 + wλn n=1 (27) which is identical to the Tikhonov-based denoising for K = 1 and corresponds to an ARMA1 with ϕ = 2/(2 + wl) and ψ = −2w/(2 + wl), which as previously shown has always stable implementation. Note that even though the stability is ensured for the considered case, it does not necessarily hold for every covariance matrix. Indeed, the stability of the filter must be examined in a problem-specific manner. Graph signal interpolation. Suppose that only r out of the N values of a signal x are known, and let t be the N × 1 vector which contains the known values and zeros otherwise. Under the assumption of x being smooth w.r.t. L = Ld or L = Ln , we can estimate the unknowns by the regularized problem 2 x̃ = argminkS (x − t)k2 + w x> LK x, (28) x∈RN where S is the diagonal matrix with Sii = 1 if xi is known and Sii = 0 otherwise. Such formulations have been used widely, both in the context of graph signal processing [10], [26] and earlier by the semi-supervised learning community [9], [27]. N −1 X x̃ = I − L̂ t=  n=1 1 1 + λ̂n ht, φ̂n iφ̂n . (30) which is an ARMA1 filter designed for the Laplacian matrix L̂ = S − I + wL with (λ̂n , φ̂n ) the n-th eigenpair of L̂. For larger values of K, the interpolation cannot be computed distributedly using ARMA filters. That is because the corresponding basis matrix L̂ = S + wLK cannot be appropriately factorized into a series of local matrices. V. T IME -VARIATIONS At this point we have characterized the filtering and convergence properties of ARMA graph filters for static inputs. But do these properties hold when the graph and signal are a function of time? In the following, we characterize ARMA graph filters with respect to time-variations in the graph signal (cf. Section V-A), as well as in the graph topology (cf. Section V-B). A. Joint Graph and Temporal Filters To understand the impact of graph signal dynamics we broaden the analysis to a two-dimensional domain: the first dimension, as before, captures the graph (based on the graph Fourier transform), whereas the second dimension captures time (based on the Z-transform [21]). This technique allows us to provide a complete characterization of the ARMA filter subject to time-variations. First, we show that the ARMA filter output remains close to the correct time-varying solution (under sufficient conditions on the input), which implies that our algorithms exhibit a certain robustness to dynamics. Further, we realize that ARMA graph filters operate along both the graph and temporal dimensions. We find that a graph naturally dampens temporal frequencies in a manner that depends on its spectrum. Exploiting this finding, we extend the ARMA designs presented in Section III so as to also allow a measure of control over the temporal frequency response of the filters. As previously, we start our exposition with the ARMA1 recursion (6), but now the input graph signal xt is time dependent (thus, indexed with the subscript t) yt+1 = ψLyt + ϕxt (31a) zt+1 = yt+1 + cxt . (31b) The dimension of the above recursion can be reduced by restricting the input graph signal to lie in the subspace of an eigenvector φ with associated eigenvalue µ, i.e., xt = xt φ, where now xt is a scalar and similarly, we take y0 = y0 φ.4 By orthogonality of the basis, the filter only alters the magnitude 4 This is a standard way to derive the frequency response of the system. 8 (32a) zt+1 = yt+1 + cxt , (32b) where xt , yt , zt ∈ R are simply the magnitudes of the vectors xt , yt , zt ∈ Cn lying in the eigenspace of φ, and we can write yt = yt φ and zt = zt φ. Taking the Z-transform on both sides, we obtain the joint graph and temporal frequency transfer function H(z, λ) = ϕz −1 + cz −1 . 1 − ψλz −1 (33) It can be shown that the temporal-impulse response for each graph frequency λ is  ht+1 (λ) = ϕ(ψλ)t + cδ[t] φ, (34) with δ[t] the impulse function. From (34) we deduce that the region of convergence (ROC) of the filter is {|z| > |ψλ|, for all λ} and that the filter is causal. The joint transfer function characterizes completely the behavior of ARMA1 graph filters for an arbitrary yet timeinvariant graph: when z → 1, we return to the constant x result and stability condition of Theorem 1, while for all other z we obtain the standard frequency response as well as the graph frequency one. As one can see, recursion (31) is an ARMA1 filter in the graph domain as well as in the time domain. Observe also that the poles of H(z, λ) obey the fixed relationship z = λψ. This yields an interesting insight: the temporal frequency response of the filter differs along each graph frequency λ, meaning that temporal dynamics affecting signals lying in low graph frequency eigenspaces are dampened to a smaller extent. As Theorems 4 and 5 below show, the results are readily generalized to higher order filters. Theorem 4. The joint graph and temporal frequency transfer function of a parallel ARMAK is H(z, λ) = K X ϕ(k) z −1 + cz −1 , (k) λz −1 1 − ψ k=1 (35) subject to the stability conditions of Theorem 2. Theorem 5. The joint graph and temporal frequency transfer function of a periodic ARMAK is ! K−1 K−1 P Q θτ + ψτ λ ϕk z k−K H(z, λ) = k=0 τ =k+1 1− K−1 Q  θτ + ψτ λ z −K + cz −1 , (36) τ =0 subject to the stability conditions of Theorem 3. (The proofs are deferred to the appendix.) As in the first order case, Theorems 4 and 5 describe completely the behavior of the parallel and periodic implementations. We can see that both filters are ARMAK filters in the graph and temporal domain. In particular, the parallel and 10 1 10 1 10 0 10 0 10 |H(f,λ)| yt+1 = ψλyt + ϕxt |H(f,λ)| xt relative to the eigenvector φ and not the direction of xt . Therefore, (31) is equivalent to -1 10 -1 10 -2 1 10 -2 1 3/4 3/4 1/2 1/2 1/4 f 0 0 0.5 1 λ 1.5 1/4 2 f 0 0.5 0 1 1.5 2 λ Fig. 3. The joint graph and temporal frequency response of a parallel and a periodic graph filter, both designed to approximate an ideal low pass (step) response with cut-off frequency λc = 0.5 and K = 3 w.r.t. the normalized graph Laplacian. The temporal frequencies f are normalized (×π rad/sample). periodic filters have up to K distinct poles abiding respectively to v uK−1 uY K (k) θ + ψ λ. (37) z = ψ λ and z = t τ τ τ =0 To provide further insight, Fig. 3 plots the joint graph and temporal frequency response of a parallel and a periodic graph filter of third order, both designed (only in the graph domain) to approximate an ideal low pass response with cutoff frequency λc = 0.5. In the figure, the horizontal axis measures the graph frequency with smaller λ corresponding to lower variation terms. The temporal axis on the other hand measures the normalized temporal frequency f such that, for f = 0, one obtains the standard graph frequency response. We make two observations: First, both graph filters ensure almost the same frequency response as for the static case (f = 0) for low temporal variations f ≤ 1/8. This suggests that these filters are more appropriate for slow temporal variations. Whereas for graph signals lying in eigenspaces with λ close to λ = 1 all temporal frequencies are damped. This is a phenomenon that transcends the filter implementation (parallel or periodic) and the particular filter coefficients. It is attributed to the shifting of the Laplacian in the design phase and to the multiplicative relation of the response poles. Second, the parallel concatenation of ARMA1 filters results in a more stable implementation that is more fit to tolerate temporal dynamics than the periodic implementation. As shown in Figure 3, for λ = 0 and λ = 2, temporal fluctuations with frequencies exceeding 1/8 cause the periodic filter output to blow up by an order of magnitude, effectively rendering the periodic implementation unusable. The poor stability of the periodic implementation is also seen from (36), where the θτ terms tend to push the poles closer to the unit circle, and it is the price to pay for its small memory requirements. Due to its superior stability properties and convenient form (less coefficients and simpler design), we suggest the parallel implementation for dealing with time-varying graph signals. B. Time-Varying Graphs and Signals Time variations on the graph topology bring new challenges to the graph filtering problem. First, they render approaches 9 that rely on knowledge of the graph spectrum ineffective. Approaches which ensure stability by designing the poles to lie outside the set of the Laplacian eigenvalues of a given graph, may lead to unstable filters in a different graph where some eigenvalues may over-shoot one of the poles. Due to their different design philosophy, the presented ARMA graph filters handle naturally the aforementioned issues. We can, for instance, think that the different graph realizations among time enjoy an upper bound on their maximum eigenvalue λmax . In case this is not possible, or difficult to determine, we can always work with the normalized Laplacian and thus take λmax = 2. In this way, by designing the filter coefficients in order to ensure stability w.r.t. λmax , we automatically impose stability for all different graph realizations. Furthermore, by designing once the filter coefficients for a continuous range of frequencies, the ARMA recursions also preserve the desired frequency response for different graph realizations. The second major challenge is characterizing the graph filter behavior. Time-varying affine systems are notoriously difficult to analyze when they possess no special structure [28]. To this end, we devise a new methodology for time-varying graph filter analysis. We show that a decomposition basis always exists, over which ARMA1 graph filters (and as a consequence parallel ARMAK filters) have the same frequency response as in the static case. Furthermore, this decomposition basis depends only on the sequence of graph realizations. In case of a time-varying graph topology, yet with a fixed number of nodes N , as well as a time-varying graph signal, the ARMA1 recursion (6) can be written as yt+1 = ψLt yt + ϕxt (38a) zt+1 = yt+1 + cxt , (38b) where the time-varying graph is shown by indexing Lt with the subscript t. Expanding the recursion we find that, for any sequence of graph realizations {G0 , G1 , . . . , Gt } with corresponding Laplacians {L0 , L1 , . . . , Lt }, the output signal is given by t+1 zt+1 = ψ ΦL (t, 0)y0 +ϕ t X τ =0 work the graph was considered time-invariant). Similar to [29], we will construct Gtv by replicating each node ui ∈ V once for each timestep t. Denote the t-th replication of the i-th node as ut,i . For each t and i, Gtv will then contain directed edges between ut−1,j and ut,i with uj being a neighbor of ui in Gt−1 . Therefore, in contrast to previous work, here the edges between nodes ui and uj are a function of time. By its construction, Gtv captures not only the topology of the different graphs, but also the temporal relation between them: since the exchange of information between two neighbors incurs a delay of one unit of time, at each timestep t, a node has access to the values of its neighbors at t − 1. To proceed, define P to be the (t + 1) × (t + 1) cyclic shift matrix with ones below the diagonal and construct Ltv as the N (t + 1) × N (t + 1) permuted block-diagonal matrix Ltv = blkdiag[L0 , L1 , . . . , Lt ](P ⊗ I), For consistency with the established theory on GFT, when t = 0 and the graph is time-invariant, we define P = 1. Let eτ be the (t + 1)-dimensional canonical unit vector with (eτ )i = 1 if i = τ and (eτ )i = 0, otherwise. Defining s = > > > [x> 0 , x1 , . . . , xt ] as the vector of dimension N (t+1) which encompasses all input graph signals, we can then write τ ΦL (t, t − τ + 1)xt−τ = (e> t+1 ⊗ I) Ltv s. ϕ t X ψ τ ΦL (t, t − τ + 1)xt−τ = ϕ(e> t+1 ⊗ I) τ =0 t X (ψLtv )τ s τ =0 = ϕ(e> t+1 ⊗ I) ψ ΦL (t, t − τ + 1)xt−τ +cxt, where ΦL (t, t0 ) = Lt Lt−1 . . . Lt0 for t ≥ t0 , and ΦL (t, t0 ) = I otherwise. Since the output zt depends on the entire sequence of graph realizations, the spectrum of any individual Laplacian is insufficient to derive the graph frequency of the filter. To extend the spectral analysis to the time-varying setting, we define a joint Laplacian matrix Ltv that encompasses all the individual shifted graph Laplacians. The intuition behind our approach is to think of a time-varying graph as one large graph Gtv that contains all nodes of the graphs G0 , G1 , . . . , Gt , as well as directional edges connecting the nodes at different timesteps. We then interpret the spectrum of the associated Laplacian matrix Ltv as the basis for our time-varying graph Fourier transform. This idea is a generalization of the joint graph construction [29], used to define a Fourier transform for graph signals which change with time (though in the previous (41) In those cases when the non-symmetric matrix Ltv enjoys an eigendecomposition, we have Ltv = U ΛU −1 with (λk , [U ]k ) the k-th eigenpair. Specifically, λk is the k-th diagonal element of Λ and [U ]k is the k-th column of U . The total number of eigenpairs of Ltv is K = N × (t + 1). To ease the notation, −1 we will denote as [U ]−1 . k the respective k-th column of U Substituting (41) into the second term of (39) and rearranging the sums, we get τ (39) (40) K t X X (ψλk )τ hs, [U ]−1 k i[U ]k τ =0 k=1 = (e> t+1 ⊗ I) K X k=1 ϕ 1 − (ψλk )t+1 hs, [U ]−1 k i[U ]k . 1 − ψλk (42) Similarly, ψ t+1 ΦL (t, 0)y0 = (e> t+1 ⊗ I) (ψLtv ) = (e> t+1 ⊗ I) K X t+1 (et+1 ⊗ y0 ) (ψλk )t+1 het+1 ⊗ y0 , [U ]−1 k i[U ]k (43) k=1 as well as c xt = (e> t+1 ⊗ I) K X c hs, [U ]−1 k i[U ]k . (44) k=1 Without loss of generality, when t is sufficiently large we can ignore terms of the form (ψλk )t+1 as long as |ψλk | < 1, which also indicates that the impact of the filter initialization y0 on the filter output vanishes with time. This condition is met when kψLtv k < 1, which as a direct consequence of 10 Gershgorin’s circle theorem, this stability condition is met if, for every τ , the sum of the elements of each row of Lτ , in absolute value, is smaller than |1/ψ| (which also implies that the eigenvalues of Lτ are bounded by |1/ψ|). For the (shifted) normalized Laplacian this means that |ψ| < 2 (|ψ| < 1), matching exactly the stability conditions of the static case. Under this sufficient condition, the filter output approaches zt+1 ≈ (e> t+1 ⊗ I) K  X k=1  ϕ + c hs, [U ]−1 k i[U ]k . 1 − ψλk (45) Notice that the ARMA1 retains the same graph frequency response as in the time-invariant case (7), now expressed in the basis of Ltv . It is not difficult to show that the ARMA1 graph filter converges asymptotically. Let us denote the distance between the filter output at two different time instants t1 > t2 as t1 ,t2 kzt1 − zt2 k . = xmax (46) where xmax = maxt=1,...,t1 kxt k constitutes an upper bound on the energy of the input. We can now claim Theorem 6. Given the ARMA1 recursion (39) and given that the graph Laplacians are uniformly bounded for every t kLt k ≤ %, the distance t1 ,t2 between the filter output at time instants t1 and t2 is upper-bounded as |ψ%|t1 + |ψ%|t2 |ψ%|t2 − |ψ%|t1 + |ϕ| xmax 1 − |ψ%| kxt1 −1 − xt2 −1 k + |c| . xmax t1 ,t2 ≤ ky0 k (47) (The proof is deferred to the appendix.) For simplicity, set c = 0 and consider t1 big enough such that the term |ψ%|t1 ≈ 0. Then, directly from (47) we can find the value of t2 such that the error between the two is smaller than a desired positive constant ε, i.e., t2 ≥ log (α/ε) ⇒ t1 ,t2 ≤ ε, (48) with α = ky0 k/xmax + |ϕ|/(1 − |ψ%|). The results of Theorem 6 can be extended to the general ARMAK graph filter. For the parallel implementation, we can proceed in the same way as for the ARMA1 by considering that the output signal is the sum of K ARMA1 graph filters. Meanwhile, for the periodic implementation we can see that its form (53), after one cyclic period, is analogous to (38). The main result of Theorem 6 stands in the fact that the ARMA output will not diverge as long as the graph Laplacians of each realization Gt has uniformly bounded spectral norm and from (48) the distance decreases exponentially. Further, for t big enough and if Ltv enjoys an eigendecompositon the result in (45) gives us insights where the ARMA output converges. Numerical results suggest that the obtained output is generally close to the designed frequency response of the ARMA filter. VI. N UMERICAL R ESULTS To illustrate our results we simulate two different casestudies: one with a fixed graph and a time-varying graph signal, and one where both the graph and graph signal are time-varying. In the latter case, the ARMA performance is also compared to the state-of-the-art FIR filters designed in a universal manner [6]. With the first case-study, we aim to show how the proposed filters operate on graph signals that have spectral content in both graph and temporal frequency domains. Meanwhile, with the second the goal is to illustrate the ARMA performance when the underlying graph topology is not static anymore, but varies with time. For all our simulations, the ARMA filters, if not differently mentioned, (k) are initialized to zero (i.e., y0 = 0 and y0 = 0 for all k) and the filter design is performed in a universal setting. A. Variations on the Graph Signal In this subsection, we present simulation results for timevarying signals. We consider a 0.5-bandlimited graph signal ut oscillating with a fixed temporal frequency π/10, meaning that  πt/10 e if λn < 0.5 (49) hut , φn i = 0 otherwise, where λn is the n-th eigenvalue of the normalized graph Laplacian and t it the time index. The signal is then corrupted with a second interfering signal vt , oscillating with a temporal frequency 9π/10 with graph spectrum defined in the following in two different ways.. In addition, the signal at each node is corrupted with i.i.d. Gaussian noise nt , with zero mean and variance σ 2 = 0.1. We then attempt to recover ut by filtering it with a parallel ARMA5 graph filter, effectively canceling the interference vt and attenuating the out of band noise. The ARMA filter is designed only in the graph frequency domain based on the GFT of ut , i.e., to approximate an ideal low-pass filter in the graph domain with cut-off frequency λc = 0.5. Regarding the temporal part, we exploit the property of the filter to preserve the same graph frequency response as the static case for low temporal oscillations, while attenuating the contribution of high temporal frequencies. Our simulations were conducted using a random geometric graph G composed of 100 nodes placed randomly in a square area, with any two nodes being connected if they are closer than 15% of the maximum distance in the area, with an average degree of 11.8. Depending on whether the interference is correlated with the signal or not, we distinguish between two scenarios: i) Correlated signal interference. In this scenario, the interference is self-induced, meaning that at a given instant t, vt and ut share the same graph spectrum, but oscillating at a higher temporal frequency (due for instance to electronics problems). To provide intuition, in Fig. 4.a, we show the graph spectral content of u0 and u0 + v0 + n0 . We can see that once corrupted by noise and interference, the graph signal presents significant spectral content across the graph spectrum, thus loosing its bandlimited nature. Meanwhile, Fig. 4.b depicts the real part of the graph spectral content of the filter output Normalized temporal spectral content (dB) 11 3 Without noise Overall signal Graph spectral content 2 0 Input Signal Output Signal -10 -20 1 -30 0 -40 -1 0 0.2 0.4 0.6 0.8 λ 1 1.2 1.4 1.6 -50 1.5 -60 Output signal 0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2 ω/π 1 0.5 Fig. 5. Average time spectral content over all nodes of the input and output signal. The values are normalized with respect to the maximum. 0 -0.5 0.2 0.4 0.6 0.8 λ 1 1.2 1.4 1.6 Fig. 4. Graph spectral content of the input signal as well as of the overall signal affected by interference and noise a) (top), and of the filter output signal b) (bottom). The output signal graph spectrum is shown for t = 100. 10 0 et 0 10 total interf -1 10 after 100 iterations (i.e., well after the initial state is forgotten). Even though the figure cannot capture the effect of dynamics (as it solely focuses on t = 100), it does show that all frequencies above λc = 0.5 have been attenuated and the interference contribution in the band is reduced. To illustrate the filtering of the temporal frequencies of the signal, in Fig. 5 we show the average spectrum over all nodes of the input and output signal. To increase visibility, the values in the figure are normalized with respect to the maximum. We can see that, the content relative to the interfering frequency 9π/10 of the output signal is attenuated around 13 dB with respect to the main temporal frequency content of π/10. ii) Uncorrelated signal interference. Let us now consider a more involved scenario, in which the interfering graph signal satisfies hvt , φn i = e9πt/10 e−λn , (total) = kẑt − ût k . kût k (51) (total) Achieving a small error et is a very challenging problem since an algorithm has to simultaneously overcome the addition of noise and the interference, while at the same time operating in a time-varying setting (see Fig. 6). ii) The second error focuses on interference and compares zt to the output zt∗ of the same ARMA5 operating on ut +nt (but not ut +vt +nt ) (interf) et = kẑt − ẑt∗ k , kẑt∗ k 10 2 t Fig. 6. Error of the ARMA recursion when the time-vaying input signal is affected by uncorrelated interference. recursion we can manage multiple signals on a graph by simply making them orthogonal in the temporal frequency domain. By a specific design of the filter coefficients, one can distributively operate on the graph signal of interest and ignore the others. Such a result cannot be achieved with FIR filters for two reasons: (i) they suffer from handling time-varying input signals, and (ii) the FIR filters do not operate on the temporal frequency content of the graph signals, thus such a distinction between overlapping signals is difficult to achieve. The above results illustrate the conclusions of Section V, and also quantify how much we can attenuate the signal at a specific graph/temporal frequency. (50) i.e., it is a signal having a heat kernel-like graph spectrum oscillating in time with a pulsation ω = 9π/10. We will examine two types of errors: i) The first compares for each time t the ARMA5 output GFT ẑt to that of the signal of interest et 1 (52) where ẑt∗ is the GFT of zt∗ . We can see from Fig. 6 that after a few iterations this error becomes relatively small, which means that the output spectrum of the ARMA recursion when the signal is affected by interference is similar to when the interference-less signal is used. This gives a first insight, that using the ARMA B. Variations on the Graph Topology We examine the influence of graph variations for two filtering objectives. The first, which corresponds to denoising, can be computed exactly using ARMA. In the second objective, the graph filter is designed to approximate an ideal low-pass graph filter, i.e., a filter that eliminates all graph frequency components higher than some specific λc . In addition, we employ two different types of graph dynamics: random edge failures, where the edges of a graph disappear at each iteration with a fixed probability, as well as the standard model of random waypoint mobility [30]. The above setup allows us to test and compare universal ARMA and FIR graph filters (designed using the least-squares method) over a range of scenarios, each having different characteristics. Exact design (denoising). We simulate the denoising problem (as defined by (17), with w = 0.5 and K = 1) over the same graph topology of Section VI-A, where the probability that an edge goes down at each time instant is p = 0.05. The input signal x = u + n is given by a linear combination of a smooth signal u and noise n. To ensure that the graph signal is smooth, we set its spectrum, w.r.t. the initial graph, as hu, φn i = e−5λn . The noise n on the other hand is i.i.d. Gaussian distributed with zero mean and unit variance. 12 -1 10 -2 kzt − ũk/kũk 10 -3 0 10 10 1 10 2 response error ARMA 10 2 ARMA 4 ARMA 6 FIR 2 FIR 4 FIR 6 10 1 10 0 t 10 0 ARMA1 FIR1 FIR5 FIR25 10 -5 10 -10 10 -15 0 0.5 10 0 10 1 10 2 t Fig. 7. Normalized error related to the solution of the denoising problem in a distributed way with graph filters. Results relative to random time-varying graph (top) and static graph (bottom). We compare the results of ARMA1 with different FIR graph filters. The FIRK output at time t is calculated as P yt = K k=0 hk ΦL (t, t − k + 1)x and is not arrested after K time instants. To compare the results, we calculate the normalized error between the graph filter output and the analytical solution of the optimization problem (17) solved w.r.t. the initial graph. In Fig. 7, we plot the normalized error of solving the denoising problem via distributed graph filtering. We consider an ARMA1 graph filter (designed according to Section IV-B with y0 = x) and we compare its performance with FIR graph filters of different orders. As expected, we can see that in the static case the ARMA graph after K iterations has the same performance as the FIRK filter and thwy both match the solution of the optimization problem. On the other hand, in the random time-varying graph the ARMA filter outperforms all the FIRs. This is mainly due to its implementation strategy, which allows the ARMAs to handle the graph variations better. Also note that the result obtained from the ARMA1 in the time-varying scenario quantifies the theoretical derivations in (45) and Theorem 6. Indeed, we can see that the obtained output is close (up to an order 10−3 ) to the desired frequency response and the convergence is linear. We can see that, for both the random time-varying and static graph the ARMA graph filter gives a lower error with respect to the solution of the optimization problem. As we have seen before, for static graphs the ARMA filter matches correctly the analytical solution. Meanwhile, when the graph is generated randomly it approximates quite well the latter. On the other hand, the performance of the FIR filters is limited by the fact that they only approximate the solution of the optimization problem. Notice that the FIR output is given after K time instants and then the filter is reset, hence the spikes in the figure. Approximate design (ideal low pass). We use graph filters of increasing orders, specifically K = 2, 4 and 6, to universally approximate a low-pass graph filter with frequency response g ∗ (λ) = 1 if λ < 0.5, and zero otherwise. We consider a graph with 100 nodes living in a square of 1000 × 1000 meters, with a communication range of 180 meters. We simulated node mobility according to the random waypoint model [30] with a constant speed selected in [0, 3] m/s. response error ARMA 1 1.5 speed (m/s) 2 ARMA 4 ARMA 6 2 FIR 2 2.5 FIR 4 3 FIR 6 10 1 10 0 0 0.5 1 1.5 speed (m/s) 2 2.5 3 Fig. 8. The effects of the variations only on the graph topology (top) and on both graph and graph signal (bottom). The response error is calculated as kg(λ) − g ∗ (λ)k/kg ∗ (λ)k. Each error bar shows the standard deviation of the approximation error over 20 runs. A small horizontal offset is included to improve visibility. We start with a scenario where only the graph topology changes in time whereas the graph signal remains invariant. Then, we simulate a more general case, where both the graph topology and the graph signal are time-varying. For both scenarios, we perform 20 distinct runs, each lasting 10 minutes and consisting of 600 iterations (one iteration per second). We then compare the response error kg − g ∗ k/kg ∗ k of the ARMA filters with that of the analogous FIR filters while accounting for the initialization phase (we ignore the first 100 iterations). More specifically, at each time instant, we compute g(λn ) = ŷn /x̂n , where the points x̂n ≈ 0 are not considered. Then, it is compared with the desired frequency response at the particular graph frequency λn , i.e., g ∗ (λn ). The statistical significance of our results stems not only by the 20 distinct repetitions, but also by the large number of graph topologies experienced in each run. Time-varying graph, constant graph signal. For this scenario, x is a random vector with entries selected uniformly distributed in [0, 1]. In Fig. 8 (top) we show the response error for increasingly higher node speeds. As expected, the error increases with speed. Nevertheless, the ARMA filters show a better performance in comparison to their analogous FIR filters. This indicates that the proposed approach handles better time-vaying settings than the FIR filters. Further, we can see that higher order ARMA filters approximate better the desired frequency response (smaller error) when the graph is static. On the other hand, when mobility is present, higher order ARMA recursions lead to a rough approximation due to their slower convergence and the fact that the poles go closer to the unit circle (larger coefficients). Time-varying graph and graph signal. To conclude, we 13 simulate the more general case where both the graph structure and the graph signal change in time. Simulating a target tracking scenario, we let the signal at each node take a value of zero, unless a node was within 100 meters from a target point, residing at the middle of the 1000 × 1000 meter simulation area, in which case the node’s value was set to one. In Fig. 8 (bottom) we show the response error as a function of the node’s speed. It is not surprising that letting the graph signal change over time makes the graph filtering problem harder and the corresponding errors of all graph filters larger. As expected, the error increases with speed. Nevertheless, the ARMA filters show a better performance in comparison to their analogous FIR filters for all cases other than when K = 2 and speed is zero (the latter is an artifact of the Shank’s method). VII. C ONCLUSIONS In this work, we presented the ARMA recursion as way of implementing IIR graph filters in a distributed way. We showed two different options to approximate any desired graph frequency response with an ARMA filter of order K, namely the parallel and periodic implementations. Experiments show that, our Shanks-based design method produces stable filter, which can approximate arbitrary well any desired graph frequency response. Furthermore, they attain linear convergence. The proposed ARMA graph filters were shown to provide solutions for two important graph filtering tasks: (i) Tikhonov and Wiener graph denoising and (ii) graph signal interpolation under smoothness assumptions. Characterized by a rational frequency response, ARMA graph filters can track time-varying input signals. In this case, we showed that our filters naturally extend to a 2-dimensional frequency space simultaneously operating in the graph- and time-frequency domain. In this way, we can distributedly filter a signal jointly in both domains, instead of operating on each of them separately, which leads to higher costs. Though we did not provide solutions for the joint design problem, we illustrated that, due to a connection between the poles in the graph domain and those in the Z-domain, graph filters which are designed only w.r.t. the graph frequency domain, are characterized by a specific temporal behavior. Further, we characterized the ARMA recursion when also the graph structure varies in time and proved that the linear convergence can be guaranteed also in this setting. Our future research will be based on finding analytical stable design methods for both 1 and 2-dimensional ARMA recursions. Furthermore, we are also interested to extend the proposed 2-dimensional graph filter to a separable case in order to obtain a disjoint filter design in each domain. A PPENDIX Table I For completeness and reproducibility, we include in Table I the filter coefficients of a parallel ARMAK filter approximating the step function with cut-off λc = 0.5 (i.e., filter response equal to 1 for λ < λc and zero otherwise) for K = 3, 5, 7. Higher order filters are omitted due to space considerations. Proof of Theorem 3 Define matrices Γt = θt I + ψt L and ΦΓ (t, t0 ) = Γt Γt−1 · · · Γt0 if t ≥ t0 , whereas ΦΓ (t, t0 ) = I otherwise. The output at the end of each period can be re-written as a time-invariant system ,B z K−1 X ,A y(i+1)K }| { z = ΦΓ (K − 1, 0) yiK + }| { ΦΓ (K − 1, k + 1)ϕk x k=0 (53a) (53b) z(i+1)K = y(i+1)K + cx. Both A and B have the same eigenvectors φn as L. Notice that (53) resembles (6) and we can proceed in an identical manner. As such, when the maximum eigenvalue of A is bounded by |λmax (A)| < 1, the steady state of (53b) is  N  X λn (B) z = (I − A)−1 Bx + cx = x̂n φn . c+ 1 − λn (A) n=1 (54) To derive the exact response, we exploit the backward product in the definition of ΦΓ (t1 , t2 ) and we obtain t2 Y λn (ΦΓ (t1 , t2 )) = λn (Γt ) = τ =t1 t2 Y (θτ + ψτ λn ) , (55) τ =t1 which, by the definition of A and B, yields the desired frequency response. The linear convergence rate and stability condition follow from the linear convergence of (53b) to y with rate |λmax (A)|. Proof of Theorem 4 is The recursion of a parallel ARMAK with time-varying input (k) (k) yt+1 = ψ (k) Lyt zt+1 = K X + ϕ(k) xt (∀k) (k) yt+1 + cxt , (56a) (56b) k=1 (k) where yt is the state of the kth ARMA1 , whereas xt and zt are the input and output graph signals, respectively. Using the Kronecker product the above takes the more compact form yt+1 = (Ψ ⊗ L) yt + ϕ ⊗ xt (57a) zt+1 = (1 ⊗ IN )yt+1 + c xt , (57b)  (1)> (2)>  (K)> > with yt = yt , yt , · · · , yt the N K × 1 stacked (1) (2) state vector, Ψ = diag(ψ , ψ , · · · , ψ (K) ) a diagonal K × K coefficient matrix, ϕ = (ϕ(1) , ϕ(2) , · · · , ϕ(K) )> a K × 1 coefficient vector, and 1 the K × 1 one-vector. We therefore have t X t τ yt+1 = (Ψ ⊗ L) y0 + (Ψ ⊗ L) (ϕ ⊗ xt−τ ) T τ =0 t X  = Ψ t ⊗ Lt y0 + (Ψ τ ϕ) ⊗ (Lτ xt−τ ) . τ =0 Notice that, when the stability condition ψ (k) L < 1 is met, limt→∞ k(Ψ t ⊗ Lt ) y0 k = 0. Hence, for sufficiently large t, the ARMAk output is 14 TABLE I R ESIDUES rk AND POLES pk OF PARALLEL ARMAK FILTER , FOR K = 3, 5 AND 7. r0 , p0 order K=3 K=5 K=7 10.954 + 0i, -6.666 + 0i -7.025 + 0i, -3.674 + 0i -46.398 + 0i, –3.842 + 0i lim zt+1 = lim t→∞ r1 , p1 t→∞ = lim t→∞ = lim t→∞ t X r2 , p2 1.275 + 1.005i, 0.202 + 1.398i -1.884 - 1.298i, -0.420 + 1.269i -20.207 - 8.343i, 0.102 + 1.427i 1.275 - 1.005i, 0.202 - 1.398i -1.884 + 1.298i, -0.420 - 1.269i -20.207 + 8.343i, 0.102 + 1.427i  1T Ψ τ ϕ ⊗ (Lτ xt−τ ) + c xt τ =0 t X K X  τ ϕ(k) ψ (k) L xt−τ + c xt , τ =0 k=1 where we have used the Kronecker product property (A ⊗ B)(C ⊗ D) = (AC) ⊗ (BD) and expressed the Kronecker product as the sum of K terms. The transfer matrix H(z) is obtained by taking the Z-transform in both sides and rearranging the terms H(z) = z −1 K X ϕ k=1 (k) ∞  X ψ (k) τ L z −τ + cz −1 . τ =0 Finally, applying the GFT and using the properties of geometric series we obtain the joint transfer function in closed-form expression H(z, µ) = z −1 K X k=1 = K X ϕ(k) ∞  X ψ (k) λ τ z −τ + cz −1 τ =0 (k) −1 ϕ z + cz −1 (k) λz −1 1 − ψ k=1 r5 , p 5 r6 , p6 - - - - - - 1.433 + 1.568i, 0.703 + 1.129i -5.205 - 4.946i, -0.785 + 1.128i 3.124 - 10.622i, 0.902 + 1.011i 3.124 + 10.622i, 0.902 - 1.011i and ziK = ziK φ). For compactness we introduce QK−1 the shorthand notation λk = θk + λψk and L = τ =0 λτ . We then have ! iK−1 X iK−1 Y yiK = λτ ϕk xk , k=0 τ =k+1 which, after taking the Z-transform, becomes ! iK−1 X iK−1 Y Y (z) = λτ ϕk z k−iK X(z) k=0 = i−1 X τ =k+1 i−j−1 (j−i)K L z j=0 K−1 X iK−1 Y k=0 τ =k+1 ! λτ ! ϕk z k . The last step exploited the periodicity of coefficients in order to group the common terms of periods j = 1, . . . , i − 1. In the limit, the first term approaches i−j i−1 i−1  X X L 1 Li−j−1 z (j−i)K = lim L−1 lim = K K i→∞ i→∞ z z −L j=0 j=0 Putting everything together, we find that the joint transfer function of the filter is  PK−1 QK−1 λ ϕk z k τ k=0 τ =k+1 Z(z) H(z, µ) = = + cz −1 X(z) zK − L and, after normalization, the claim (36) follows. and our claim follows. Proof of Theorem 6 Proof of Theorem 5 Recall for comodity Γt = θt I + ψt L and ΦΓ (t, t0 ) = Γt Γt−1 · · · Γt0 if t ≥ t0 , whereas ΦΓ (t, t0 ) = I otherwise. Then, expanding recursion (13) for a time-varying input signal, we find that at the end of the i-th period, the filter output is ziK = yiK + cxiK−1 , where yi+1K = ΦΓ (iK − 1, 0)y0 + r4 , p 4 1.433 - 1.568i, 0.703 + 1.129i -5.205 + 4.946i, -0.785 + 1.128i (1T ⊗ IN ) (Ψ τ ϕ) ⊗ (Lτ xt−τ ) + c xt τ =0 t X r3 , p3 iK−1 X We start the proof by substituting the expression (39) for t1 and t2 into the numerator of (46). Then, we can write kzt1 +1 − zt2 +1 k = kψ t1 +1 ΦL (t1 , 0)y0 − ψ t2 +1 ΦL (t2 , 0)y0 +ϕ −ϕ ΦΓ (iK − 1, k + 1)ϕk xk . τ =0 t2 X ψ τ ΦL (t1 , t1 − τ + 1)xt1 −τ + cxt1 ψ τ ΦL (t2 , t2 − τ + 1)xt2 −τ − cxt2 k. (58) τ =0 k=0 For sufficiently large i and assuming that the stability condition of Theorem 3 holds, the first term approaches the zero vector and can be ignored without any loss of generality. We proceed by restricting the input graph signal to xiK = xiK φ, where λ, φ is an eigenpair of L (similarly yiK = yiK φ t1 X Rearranging the terms, we have kzt1 +1 − zt2 +1 k = kψ t1 +1 ΦL (t1 , 0)y0 − ψ t2 +1 ΦL (t2 , 0)y0 +ϕ t1 X τ =t2 +1 ψ τ ΦL (t1 , t1 − τ + 1)xt1 −τ + c(xt1 − xt2 )k 15 By using the Cauchy-Schwarz property, the triangle inequality of the spectral norm, and a uniform bound % on the eigenvalues of matrices Mt , the above expression simplifies   t +1 t +1 kzt1 +1 − zt2 +1 k ≤ |ψ%| 1 + |ψ%| 2 ky0 k + |ϕ| t1 X τ |ψ%| kxt1 −τ k + |c|kxt1 − xt2 k. (59) τ =t2 +1 Leveraging the fact that |ψ%| < 1, as well as that kxt k ≤ xmax for every t, we can express the sum in a closed form ! t1 t +1 t +1 X |ψ%| 2 − |ψ%| 1 τ |ψ%| kxt1 −τ k ≤ xmax . (60) 1 − |ψ%| τ =t +1 2 We obtain the desired bound on t1 ,t2 by dividing the above expressions with xmax and adjusting the indices. R EFERENCES [1] A. Loukas, A. Simonetto, and G. Leus, “Distributed Autoregressive Moving Average Graph Filters,” Signal Processing Letters, vol. 22, no. 11, pp. 1931–1935, 2015. [2] D. I. Shuman, S. K. Narang, P. Frossard, A. Ortega, and P. Vandergheynst, “The Emerging Field of Signal Processing on Graphs: Extending High-Dimensional Data Analysis to Networks and Other Irregular Domains,” IEEE Signal Processing Magazine, vol. 30, no. 3, pp. 83–98, 2013. [3] A. Sandryhaila and J. M. Moura, “Discrete Signal Processing on Graphs,” IEEE Transactions on Signal Processing, vol. 61, no. 7, pp. 1644–1656, 2013. [4] M. G. Rabbat and V. Gripon, “Towards a Spectral Characterization of Signal Supported on Small-World Networks,” in Proceedings of the 2014 IEEE International Conference on Acoustic, Speech and Signal Processing (ICASSP), Firenze, Italy, May 2014, pp. 4826 – 4830. [5] F. Zhang and E. R. Hancock, “Graph Spectral Image Smoothing Using the Heat Kernel,” Pattern Recognition, vol. 41, no. 11, pp. 3328–3342, 2008. [6] D. I. Shuman, P. Vandergheynst, and P. Frossard, “Chebyshev Polynomial Approximation for Distributed Signal Processing,” in IEEE International Conference on Distributed Computing in Sensor Systems and Workshops (DCOSS), 2011, pp. 1–8. [7] A. J. Smola and R. Kondor, “Kernels and regularization on graphs,” in Learning theory and kernel machines. Springer, 2003, pp. 144–158. [8] X. Zhu, Z. Ghahramani, and J. Lafferty, “Semi-supervised learning using gaussian fields and harmonic functions,” in Proceedings of the 20th International Conference on Machine Learning (ICML-2003) Volume 2, vol. 2. AIAA Press, 2003, pp. 912–919. [9] M. Belkin and P. Niyogi, “Semi-supervised learning on riemannian manifolds,” Machine learning, vol. 56, no. 1-3, pp. 209–239, 2004. [10] S. K. Narang, A. Gadde, and A. Ortega, “Signal processing techniques for interpolation in graph structured data,” in Acoustics, Speech and Signal Processing (ICASSP), 2013 IEEE International Conference on. IEEE, 2013, pp. 5445–5449. [11] A. Loukas, M. A. Zúñiga, I. Protonotarios, and J. Gao, “How to Identify Global Trends from Local Decisions? Event Region Detection on Mobile Networks,” in International Conference on Computer Communications (INFOCOM), 2014. [12] D. K. Hammond, P. Vandergheynst, and R. Gribonval, “Wavelets on graphs via spectral graph theory,” Applied and Computational Harmonic Analysis, vol. 30, no. 2, pp. 129–150, 2011. [13] X. Dong, D. Thanou, P. Frossard, and P. Vandergheynst, “Learning graphs from signal observations under smoothness prior,” arXiv preprint arXiv:1406.7842, 2014. [14] A. Sandryhaila, S. Kar, and J. M. Moura, “Finite-Time Distributed Consensus Through Graph Filters,” in IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), 2014, pp. 1080– 1084. [15] S. Safavi and U. A. Khan, “Revisiting Finite-Time Distributed Algorithms via Successive Nulling of Eigenvalues,” IEEE Signal Processing Letters, vol. 22, no. 1, pp. 54–57, 2015. [16] S. Segarra, A. G. Marques, and A. Ribeiro, “Distributed implementation of linear network operators using graph filters,” in 53rd Allerton Conf. on Commun. Control and Computing, Sept. 2015. [17] A. Loukas, M. Woehrle, M. Cattani, M. A. Zúñiga, and J. Gao, “Graph scale-space theory for distributed peak and pit identification,” in ACM/IEEE International Conference on Information Processing in Sensor Networks (IPSN), 2015. [18] X. Shi, H. Feng, M. Zhai, T. Yang, and B. Hu, “Infinite Impulse Response Graph Filters in Wireless Sensor Networks,” IEEE Signal Processing Letters, Jan 2015. [19] A. Loukas, M. A. Zúñiga, M. Woehrle, M. Cattani, and K. Langendoen, “Think Globally, Act Locally: On the Reshaping of Information Landscapes,” in ACM/IEEE International Conference on Information Processing in Sensor Networks (IPSN), 2013. [20] S. Boyd and L. Vandenberghe, Convex Optimization. Cambridge University Press, sec. 9.3, pp. 466-475, 2004. [21] M. H. Hayes, Statistical digital signal processing and modeling. John Wiley & Sons, 2009. [22] J. L. Shanks, “Recursion filters for digital processing,” Geophysics, vol. 32, no. 1, pp. 33–51, 1967. [23] S. Chen, A. Sandryhaila, J. M. Moura, and J. Kovacevic, “Signal Denoising on Graphs via Graph Filtering,” in IEEE Global Conference on Signal and Information Processing (GlobalSIP), Atlanta, GA, USA, December 2014, pp. 872–876. [24] B. Girault, P. Goncalves, E. Fleury, and A. S. Mor, “Semi-supervised learning for graph to signal mapping: a graph signal wiener filter interpretation,” in Acoustics, Speech and Signal Processing (ICASSP), 2014 IEEE International Conference on. IEEE, 2014, pp. 1115–1119. [25] C. Zhang, D. Florencio, and P. Chou, “Graph signal processing - a probabilistic framework,” Tech. Rep. MSR-TR-2015-31, April 2015. [Online]. Available: http://research.microsoft.com/apps/pubs/ default.aspx?id=243326 [26] Y. Mao, G. Cheung, and Y. Ji, “Image interpolation for dibr viewsynthesis using graph fourier transform,” in 3DTV-Conference: The True Vision-Capture, Transmission and Display of 3D Video, ser. 3DTV-CON. IEEE, 2014, pp. 1–4. [27] T. Zhang, A. Popescul, and B. Dom, “Linear prediction models with graph regularization for web-page categorization,” in Proceedings of the 12th ACM SIGKDD international conference on Knowledge discovery and data mining. ACM, 2006, pp. 821–826. [28] B. Touri, “Product of Random Stochastic Matrices and Distributed Averaging,” Ph.D. dissertation, University of Illinois at Urbana Champaign, 2011. [29] A. Loukas and D. Foucard, “Frequency analysis of temporal graph signals,” CoRR, vol. abs/1602.04434, 2016. [Online]. Available: http://arxiv.org/abs/1602.04434 [30] N. Aschenbruck, R. Ernst, E. Gerhards-Padilla, and M. Schwamborn, “Bonnmotion: A mobility scenario generation and analysis tool,” in International ICST Conference on Simulation Tools and Techniques, ser. SIMUTools. ICST, 2010. Elvin Isufi was born in Albania in 1989. He received his Master of Science degree (cum laude) in Electronic and Telecommunication Engineering from University of Perugia, Italy, in 2014. From November 2013 to August 2014 he was a visiting member at Circuits and Systems group, Delft University of Technology, where he worked on his master thesis. Since November 2014 he is pursuing the Ph. D. degree on signal processing on graphs at Delft University of Technology. His research interests include signal processing on graphs, network coding and underwater communications. Andreas Loukas is a research scientist jointly hosted by the LTS2 and LTS4 signal processing labs of the École polytechnique fédérale de Lausanne. His research interest lie in the intersection of data analysis, graph theory, and signal processing. Andreas holds a doctorate in Computer Science from Delft University of Technology, where he focused on distributed algorithms for information processing, and a Diploma in Computer Science from the University of Patras. 16 Andrea Simonetto received the Ph.D. degree in systems and control from Delft University of Technology, Delft, The Netherlands, in 2012. He is currently a Post-Doctoral Researcher with the ICTEAM institute, at Université catholique de Louvain, Belgium. He was a Post-Doctoral Researcher with the Electrical Engineering Department, at Delft University of Technology. His current research interests include distributed estimation, control, and optimization. Geert Leus received the MSc and PhD degree in applied sciences from the Katholieke Universiteit Leuven, Belgium, in June 1996 and May 2000, respectively. Currently, Geert Leus is an “Antoni van Leeuwenhoek” Full Professor at the Faculty of Electrical Engineering, Mathematics and Computer Science of the Delft University of Technology, The Netherlands. His research interests are in the area of signal processing for communications. Geert Leus received a 2002 IEEE Signal Processing Society Young Author Best Paper Award and a 2005 IEEE Signal Processing Society Best Paper Award. He is a Fellow of the IEEE and a Fellow of EURASIP. Geert Leus was the Chair of the IEEE Signal Processing for Communications and Networking Technical Committee, and an Associate Editor for the IEEE Transactions on Signal Processing, the IEEE Transactions on Wireless Communications, the IEEE Signal Processing Letters, and the EURASIP Journal on Advances in Signal Processing. Currently, he is a Member-at-Large to the Board of Governors of the IEEE Signal Processing Society and a member of the IEEE Sensor Array and Multichannel Technical Committee. He finally serves as the Editor in Chief of the EURASIP Journal on Advances in Signal Processing.
3cs.SY
Generalized linear statistics for near epoch dependent processes with application to EGARCH-processes arXiv:1705.04545v1 [math.ST] 12 May 2017 Svenja Fischer ∗ The class of Generalized L-statistics (GL-statistics) unifies a broad class of different estimators, for example scale estimators based on multivariate kernels. GL-statistics are functionals of U -quantiles and therefore the dimension of the kernel of the U -quantiles determines the kernel dimension of the estimator. Up to now only few results for multivariate kernels are known. Additionally, most theory was established under independence or for short range dependent processes. In this paper we establish a central limit theorem for GL-statistics of functionals of short range dependent data, in perticular near epoch dependent sequences on absolutely regular processes, and arbitrary dimension of the underlying kernel. This limit theorem is based on the theory of U -statistics and U -processes, for which we show a central limit theorem as well as an invariance principle. The usage of near epoch dependent processes admits us to consider functionals of short range dependent processes and therefore models like the EGARCH-model. We also develop a consistent estimator of the asymptotic variance of GL-statistics. KEYWORDS: GL-statistics; U -statistics; near epoch dependent. 1. Introduction and Examples The class of Generalized linear statistics (GL-statistics) is known to unify some of the most common classes of statistics, such as U -statistics and L-statistics. They are defined as functionals of U -quantiles and the theory of U -statistics and U -processes proves itself to be a key tool in handling the asymptotic of GL-statistics. Serfling (1984) already showed the asymptotic normality by an approximation via U -statistics. This result was developed under the assumption of independence of the underlying random variables. For short range dependence Fischer et al. (2015) showed the validity of the asymptotic ∗ Institute of Hydrology, [email protected] Ruhr-Universität 1 Bochum, D-44801 Bochum, Germany, normality. They used the concept of strong mixing, the weakest form of mixing. Nevertheless, this form of short range dependence does not contain several common used models. For example, GARCH-models or dynamical systems are excluded. These are models which are functionals of short range dependent data. We therefore want to consider the concept of near epoch dependent data on mixing processes in this paper, which includes such models. First we want to state some general assumptions. Let X1 , . . . , Xn be a sequence of random variables with distribution function F . As mentioned above these random variables shall not be independent but functionals of mixing sequences. A detailed definition is given later on. Moreover, let Fn be the empirical distribution function of X1 , . . . , Xn given by n 1X Fn (x) = 1[Xi ≤x] , − ∞ < x < ∞, n i=1 and let h(x1 , . . . , xm ) be a kernel (a measurable and symmetric function) with given dimension m ≥ 2. The related empirical distribution function Hn of h (Xi1 , . . . , Xim ) is given by Hn (x) = 1 X m n  1≤i1 <...<im ≤n 1[h(Xi ,...,Xi )≤x] , − ∞ < x < ∞. m 1 HF is defined as the distribution function of the kernel h with HF (y) = PF (h(Y1 , . . . , Ym ) ≤ y) for independent copies Y1 , . . . , Ym of X1 and 0 < hF < ∞ the related density. We define hF ;Xi2 ,...,Xik as the density of h(Yi1 , Xi2 , . . . , Xik , Yik+1 , . . . , Yim ) for 2 ≤ k ≤ m and i1 < i2 < . . . < im . The object of interest in our work are GL-statistics. A Generalized L-statistic with kernel h is defined as Z 1 T (Hn ) = Hn−1 (t)J(t)dt 0  X Z  = n(m) i=1 + d X ai Hn−1 (pi ) i=1 i n(m) (i−1) n(m)  J(t)dt Hn−1  i n(m)  + d X ai Hn−1 (pi ). i=1 The GL-statistic T (Hn ) estimates T (HF ). For further information on GL-statistics we refer to Serfling (1984) or Fischer et al. (2015). In the following we present some common estimators that can be written as GL-statistic. Besides the examples given in Fischer et al. (2015) (generalized Hodges-Lehmann estimator, α-trimmed mean and Generalized Median estimator) or Serfling (1984) there are 2 some other estimators used for the estimation of the variance that can be expressed by a GL-statistic. Example 1.1. A robust estimator for the variance is Gini’s Mean Difference. In contrast to the mean deviation this estimator is not only robust but also almost as efficient as the classical estimator for variance, the standard deviation (Gerstenberger and Vogel (2015)). It is given by Gn = n X 1 |Xi − Xj | n(n − 1) i,j=1 and can be written as a GL-statistic by choosing the kernel h(xi , xj ) = |xi − xj | (the kernel dimension is then of course m = 2) and a constant continuous function J(t) = 1. The discrete part of the GL-statistic vanishes by choosing d = 0. When considering the version of Gini’s Mean Difference using order statistics, that is n Gn = X 2 (2i − n − 1)X(i:n) n(n − 1) i=1 with X(i:n) being the ith order statistic of the sample X1 , . . . , Xn , the kernel is chosen as 2n 4n t − n−1 . identity and J(t) = n−1 The following two examples of scale estimators can be found in Rousseeuw and Croux (1992) and can all be expressed as a GL-statistic. Example 1.2. An estimator for the scale which is robust with a breakdown point of 50% is given by Q = medi<j<k {min(|Xi − Xj |, |Xi − Xk |, |Xj − Xk |)}. It can be expressed as a GL-statistic by choosing the three-dimensional kernel h(x1 , x2 , x3 ) = min(|x1 − x2 |, |x1 − x3 |, |x2 − x3 |) and the parameters J = 0, d = 1, a1 = 1 and p1 = 1/2. To generalise this estimator to subsamples of order greater than three and other quantiles the formula Qαn = {min(|Xil − Xik |, 1 ≤ l < k ≤ m), 1 ≤ i1 < . . . < im ≤ n}([α( n )]) , m  n can be used, where ([α m ]) denotes the empirical α-quantile (α ∈ (0, 1)). Then we can choose for arbitrary size m of the subsample h(x1 , . . . , xm ) = min(|xj − xi |, 1 ≤ i < j ≤ [α( n )] m) with J, d and a1 as before but p1 = nm . (m) Example 1.3. Another location-free scale estimator is given by Cnα = cα |X(i+[αn]+1) − X(i) |([n/2]−[αn]) , 3 α ∈ (0, 0.5), which takes the [n/2] − [αn] order statistic of the difference of the first and last order statistic of all (sorted) subsamples of length [αn] + 2. The constant cα makes the estimator Fisher-consistent under normality. By the choice of a kernel h of dimension m = [αn] + 2 with h(x1 , . . . , xm ) = max(x1 , . . . , xm ) − min(x1 , . . . , xm ) and J = 0, d = 1, a1 = cα and p1 = n1 the representation by a GL-statistic can be obtained. (m) A well-known special case of this estimator is the Least Median of Squares LM Sn = 0.7413 min |X(i+[n/2]) − X(i) |, i with [αn] = [n/2] − 1 and cα = 1 2Φ−1 (0.75) = 0.7413. We want to emphasize that both estimators of Rousseeuw and Croux (1992) (Qαn and Cnα ) use multivariate kernels, that are kernels with dimension greater than 2. In these cases results for bivariate U -statistics would not be sufficient. Let us now state the assumptions to consider functionals of short range dependent data. We want to consider absolutely regular random variables as underlying process. Absolutely regular (or β-mixing) is a stronger assumption than strong mixing since for the strong mixing coefficients α it is α(l) ≤ 21 β(l) so that every absolutely regular process is likewise strong mixing. For more details see Bradley (2007). Definition 1.1. Let A, B ⊂ F be two σ-fields on the probability space (Ω, F, P). The absolute regularity coefficient of A and B is given by β(A, B) = E sup |P(A|B) − P(A)| . A∈A If (Xn )n∈N is a stationary process, then the absolute regularity coefficients of (Xn )n∈N are given by ∞ ) − P(A) . β(l) = sup E sup P(A|Fn+l n∈N A∈F1n (Xn )n∈N is called absolutely regular, if β(l) → 0 as l → ∞. To consider not only short range dependent data but also functionals of these we use the concept of near epoch dependence. There exist different versions of near epoch dependence, for example Lp - and P-near epoch dependence. Both concepts are applied widely when considering functionals of data, see for example Borovkova et al. (2001), Dehling et al. (2015) or Vogel and Wendler (2015). Often also the analogous definition of 1-approximating functionals is used. Here, we want to use the concept of L1 -near epoch dependence. Definition 1.2. Let ((Xn , Zn ))n∈Z be a stationary process. (Xn )n∈N is called L1 near epoch dependent (NED) on the process (Zn )n∈Z with approximation constants (al )l∈N , if   l E X1 − E X1 |G−l ≤ al , l = 0, 1, 2, . . . , l is the σ-field generated by Z , . . . , Z . where lim al = 0 and G−l −l l l→∞ 4 In the proofs we will see later on that this definition of near epoch dependence also implies P-near epoch dependence under certain conditions. With these assumptions we are now able to state a Central Limit Theorem for multivariate U -statistics as well as an Invariance Principle for U -processes in Section 2. These are the key tools for proving the asymptotic normality and the consistency of the long-run variance estimator for GL-statistics (Section 3), where the proofs are given in Section 4. Finally, we show that EGARCH-processes are near epoch dependent, which is used in a short simulation study on asymptotic normality. 2. U -statistics and U -processes The theory of U -statistics plays the most important role in proving our main theorem, the asymptotic normality of GL-statistics. U -statistics are used as an approximation of the error term T (Hn ) − T (HF ) and therefore the results of this section are needed for the main proof later on. A U -statistic with kernel h(x1 , . . . , xm ) is given by Un = 1 X n m h(Xi1 , . . . , Xim ).  1≤i1 <...<im ≤n For most of the results in this section we need a regularity condition for the kernel h. It is very similar to the Lipschitz-continuity and was developed by Denker and Keller (1986). The same variation condition is also used in Fischer et al. (2015). Definition 2.1. A kernel h satisfies the variation condition, if there exists a constant L and an 0 > 0, such that for all  ∈ (0, 0 ) ! E sup 0 )k≤ k(x1 ,...,xm )−(X10 ,...,Xm 0 h(x1 , . . . , xm ) − h(X10 , . . . , Xm ) ≤ L, where Xi0 are independent with the same distribution as Xi and k·k is the Euklidean norm. A kernel h satisfies the extended variation condition, if there additionally exists a constant L0 and a δ0 > 0, such that for all δ ∈ (0, δ0 ) and all 2 ≤ k ≤ m ! E sup |xi1 −Yi1 |≤δ h(xi1 , Xi2 , . . . , Xik , Yik+1 , . . . , Yim ) − h(Yi1 , Xi2 , . . . , Xik , Yik+1 , . . . , Yim ) ≤ L0 δ for independent copies (Yn )n∈N of (Xn )n∈N and all i1 < i2 < . . . < im . If the kernel has dimension one, we note that it satisfies the extended variation condition, if it satisfies the variation condition. Remark 2.1. A Lipschitz-continuous kernel satisfies the variation condition. 5 We also need a second variation condition which demands regularity in the L2 -space. Definition 2.2. A kernel h satisfies the L2 -variation condition, if there exists a constant L and an 0 > 0, such that for all  ∈ (0, 0 ) !2 E sup 0 )k≤ k(x1 ,...,xm )−(X10 ,...,Xm h(x1 , . . . , xm ) − 0 h(X10 , . . . , Xm ) ≤ L, where Xi0 are independent with the same distribution as Xi and k·k is the Euklidean norm. Remark 2.2. A bounded kernel which fulfils the variation condition also satisfies the L2 -variation condition due to the inequality (a − b)2 ≤ |a − b| · (|a| + |b|). A common technique when developing asymptotic results for U -statistics has benn developed by Hoeffding (1948) and makes a separate consideration of the single terms possible. Definition 2.3. (Hoeffding-Decomposition) Let Un be a U -statistic with kernel h = h(x1 , . . . , xm ). Then we can write Un as Un = θ + m   X m 1  n Sjn , j j j=1 where θ = E(h(Y1 , . . . , Ym )) h̃j (x1 , . . . , xj ) = E(h(x1 , . . . , xj , Yj+1 , . . . , Ym )) − θ X Sjn = gj (Xi1 , . . . , Xij ) 1≤i1 <...<ij ≤n g1 (x1 ) = h̃1 (x1 ) g2 (x1 , x2 ) = h̃2 (x1 , x2 ) − g1 (x1 ) − g1 (x2 ) g3 (x1 , x2 , x3 ) = h̃3 (x1 , x2 , x3 ) − 3 X X g1 (xi ) − i=1 g2 (xi , xj ) 1≤i<j≤3 ... gm (x1 , . . . , xm ) = h̃m (x1 , . . . , xm ) − m X i=1 − ··· − X g1 (xi ) − X g2 (xi1 , xi2 ) 1≤i1 <i2 ≤m gm−1 (xi1 , . . . , xim−1 ). 1≤i1 <...<im−1 ≤m for independent copies Y1 , . . . , Ym of X1 . 6 Pn We call m i=1 g1 (Xi ) the linear part, the remaining parts are called degenerated. n Fischer et al. (2015) already have shown that if the kernel h satisfies the (extended) variation condition then also the Hoeffding kernels g1 , . . . , gm do. The following theorem on the asymptotic normality of U -statistics for NED random variables is well-known for bivariate kernels (Wendler (2011a)), but our theorem admits arbitrary dimension m. Under independence one can find a central limit theorem for U -statistics for example in Serfling (1980), whereas Wendler (2011a) and Fischer et al. (2015) show the same result for strong mixing random variables. Theorem 2.1. Let h : Rm → R be a bounded kernel satisfying the extended variation condition. Moreover, let (Xn )n∈N be L1 NED with approximation constants (al )l∈N on an absolutely regular process (Zn )n∈Z with mixing coefficients (β(l)) l∈N . Assume that there exists a   −δ −δ−2 δ > 1, such that β(l) = O l and al = O l . Then we have √ D n(Un − θ) −→ N (0, m2 σ 2 ) P with σ 2 = Var(g1 (X1 )) + 2 ∞ j=1 Cov(g1 (X1 ), g1 (X1+j )). If σ = 0, then the statement is meant as convergence to 0. In general, if the distribution of the (Xn )n∈N is not specified, the long run variance σ 2 in Theorem 2.1 is unknown. Therefore, for applications an estimator of σ 2 is needed. For bivariate U -statistics or U -processes Dehling et al. (2015) and Vogel and Wendler (2015) give consistent estimators by using an empirical version of the first Hoeffding kernel and a weight function. The multivariate extension to this estimator is n−1 X 2 σ̂ =  κ r=−(n−1) |r| bn  ρ̂(r), where κ is the weight function and bn the bandwidth. n−r ρ̂(r) = 1X ĝ1 (Xi )ĝ1 (Xi+r ) n i=1 is the empirical covariance for lag r, using the empirical version of the first Hoeffding kernel X X 1 1 ĝ1 (x) = m−1 h(x, Xi1 , . . . , Xim−1 ) − m h(Xi1 , . . . , Xim ). n n 1≤i1 <...<im−1 ≤n 1≤i1 <...<im <n As Dehling et al. (2015) have already shown we need some regularity conditions for κ and bn to achieve consistency of the estimator. These are similar to the assumption made in de Jong and Davidson (2000) and are fulfilled, for example, by the Bartlett kernel κ(t) = (1 − |t|)1[|t|≤1] . 7 Assumption 2.1. The function κ : [0, ∞) → [0, 1) is continuous at 0 and all but a finite number of points. Moreover, |κ| is dominated by a non-increasing, integrable function and Z ∞ Z ∞ κ(t) cos(xt)dt dx < ∞. 0 0 √ The bandwith bn satisfies bn → ∞ as n → ∞ and bn / n → 0. With this considerations we are able to show that σ̂ 2 is a consistent estimator for the long-run variance. Theorem 2.2. Let h : Rm → R be a bounded kernel satisfying the extended variation condition and the L2 -variation condition. Moreover, let (Xn )n∈N be NED with approximation constants (al )l∈N on an absolutely regular (Zn )n∈Z with mixing coefficients  (β(l))l∈N and let a δ > 11 exist, such P∞process 2/(2+δ)(l) −δ−3 < ∞ and al = O l . The weight function κ and the bandwidth that l=1 lβ bn should fulfil Assumption 2.1. Then σ̂ 2 → σ 2 for n → ∞, where σ 2 = Var(g1 (X1 )) + 2 P∞ j=1 Cov(g1 (X1 ), g1 (X1+j )). In the following we no longer want to consider U -statistics but U -processes. That is we have a process (Un (t))t∈R , where t is the process parameter occurring in h. An example is given by the empirical kernel distribution (Hn (t))t∈R . Definition 2.4. Let h : Rm+1 → R be a measurable and bounded function, symmetric in the first m arguments and non-decreasing in the last. Suppose that for all x, y ∈ R we have lim h(x, y, t) = 1 and lim h(x, y, t) = 0. We call the process (Un (t))t∈R empirical U - t→∞ t→−∞ distribution function. As U -distribution function we define U (t) := E (h(Y1 , . . . , Ym , t)) for independent copies Y1 , . . . , Ym of X1 . Then the empirical process is defined as √ ( n(Un (t) − U (t)))t∈R . Again, we use the Hoeffding decomposition in our proofs. For fixed t we have Un (t) = 1 n m X h(Xi1 , . . . , Xim , t)  1≤i1 <...<im ≤n and therefore we can decompose Un (t) analogously to Definition 2.3. Additionally, the extended variation has to be transformed. Fischer et al. (2015) have used the extended uniform variation condition, which has the same properties as the extended variation condition. Now we want to establish an invariance principle for the U -process. For near epoch dependent sequences on absolutely regular processes it has already been shown by Dehling 8 and Philipp (2002) and a result for strong mixing can be found in Wendler (2011a). Nevertheless, these results only consider the case of a bivariate kernel and therefore exclude such examples as given in Section 1. From now on we limit the considered U -process to Hn , that is Un (t) has the kernel g(x1 , . . . , xm , t) = 1[h(x1 ,...,xm )≤t] . Therefore, U (t) = E 1[h(Y1 ,...,Ym )≤t] = P(h(Y1 , . . . , Ym ) ≤ t) = HF (t) and since HF has density hF < ∞, HF is Lipschitz-continuous. Theorem 2.3. Let h be a kernel with distribution function HF and related density hF < ∞. Moreover let g1 be the first term of the Hoeffding decomposition of Hn . Let (Xn )n∈N be NED with approximation constants (al )l∈N on an absolutely regular process (Zn )n∈Z with mixing δ P 2 2+δ (l) < ∞ for a 0 < δ < 1. Moreover, let hold that coefficients (β(l))l∈N with ∞ l=1 l β δ P∞ 2 2+2δ < ∞ . Then l=1 l al ! n m X D √ g1 (Xi , t) −→ (W (t))t∈R , n i=1 t∈R where W is a Gaussian process having continuous path with probability 1.  δ √ P 2 1+δ Remark 2.3. Note that the condition ∞ < ∞ of Dehling and Philipp l=1 l L 2Al (2002), where L is the variation constant of the kernel g(x1 , . . . , xm ) = 1[h(x1 ,...,xm )≤t] and δ p P P∞ 2 2+2δ l a a , follows directly from the condition Al = 2 ∞ < ∞ and is therefore i l=1 i=l l omitted here. This Theorem can be proven in the same way as Theorem 4.8 of Dehling and Philipp (2002) by choosing gt (x) = g1 (x, t) and G(t) = HF (t) (preserving the properties of the single functions) and is therefore omitted. 3. Main theorem Now we will state the main theorem of our paper, the asymptotic normality of GLstatistics of L1 -near epoch dependent processes on absolutely regular random variables. Under independence this result has been proven by Serfling (1984), some of the lemmata can also be found in Choudhury and Serfling (1988). Under strong mixing an analogous result can be found in Fischer et al. (2015). Theorem 3.1. Let h(x1 , . . . , xm ) be a Lipschitz-continuous kernel with distribution function HF and related density 0 < hF < ∞ and for all 2 ≤ k ≤ m and all i1 < i2 < . . . < im let hF ;Xi2 ,...,Xik be bounded. Moreover, let J be a function with J(t) = 0 for t ∈ / [α, β] , 0 < α < β < 1, and in [α, β] let J be bounded and a.e. continuous concerning the Lebesgue-measure and a.e. continuous concerning HF−1 . Additionally, let X1 , . . . , Xn be NED with approximation constants (al )l∈N on an absolutely regular process (Zn )n∈Z with 9 γ P l2 β 2+γ (l) < ∞ for a 0 < γ < 1. Moreover, let be mixing coefficients (β(l))l∈N with ∞ l=1 γ P∞ 2 2+2γ l a < ∞ for a δ > 8. Then for the GL-statistics T (Hn ) it holds that l=1 l √ D 2 n (T (Hn ) − T (HF )) −→ N (0, σGL ), where 2 σGL =m2 Var (E (A(Y1 , . . . , Ym )|Y1 = X1 )) ∞ X  +2 Cov (E (A(Y1 , . . . , Ym )|Y1 = X1 ) , E (A(Y1 , . . . , Ym )|Y1 = Xj+1 )) j=1 with independent copies Y1 , . . . , Ym of X1 and Z ∞  1[h(x1 ,...,xm )≤y] − HF (y) J(HF (y))dy A(x1 , . . . , xm ) = − −∞ + d X ai pi − 1[h(x1 ,...,xm )≤H −1 (pi )] F hF (HF−1 (pi )) i=1 . Analogous to the case of U -statistics, to use this theorem for example for confidence 2 . intervals in applications the problem arises how to handle the asymptotic variance σGL Normally, this is unknown due to the unknown conditional expected values and the 2 . The unknown distribution. Therefore, it is necessary to find an estimator for σGL following corollary closes this gap. It is stated for L1 -NED but it is also possible to show an analogous result under strong mixing such that it is applicable for the theorem of Fischer et al. (2015). Corollary 3.1. Let h : Rm → R be a Lipschitz-continuous kernel. Moreover, let (Xn )n∈N be NED with approximation constants (al )l∈N on an absolutely regular (Zn )n∈Z with mixing coefficients  (β(l))l∈N and let a δ > 11 exist, such P∞process 2/(2+δ)(l) −δ−3 < ∞ and al = O l . The weight function κ and the bandwidth that l=1 lβ P 2 2 bn should fulfil Assumption 2.1. Then it holds that σ̂GL −→ σGL for n → ∞ for the long-run variance estimator   n−r n−1 X |r| 1 X 2 σ̂GL = κ Â1 (Xi )Â1 (Xi+r ), bn n i=1 r=−(n−1) with Â1 (x) = 1 nm−1 X A(x, Xi1 , . . . , Xim−1 ) 1≤i1 <...<im−1 ≤n − 1 nm X A(Xi1 , . . . , Xim ) 1≤i1 <...<im ≤n being the estimator for the first term of the Hoeffding-decomposition of A. The proofs of Theorem 3.1 and Corollary 3.1 can be found in Section 5. 10 4. Main proof In this section we will prove the missing results to finally assemble them to the main proof. Preliminary results needed in the single proofs can be found in the appendix. Proof of Theorem 2.1. The proof makes use of the Hoeffding decomposition m   √ √ X m 1  n(Un − θ) = n n Sjn . j j j=1 Pn We show that the linear part √mn i=1 g1 (Xi ) is asymptotically normal and that the remaining terms converge to 0 in probability. We know that g1 is bounded because h is bounded. Using Lemma 2.1.7 of Wendler 1 (2011a) we also know, that g1 is NED with approximation constants a0l = Cal2 . Together with the above assumptions it is ∞ X β(l) < ∞ and l=1 ∞ X a0l < ∞. l=1 We have made this considerations to finally apply Theorem 2.3 of Ibragimov (1962) getting n m X D √ g1 (X1 ) −→ N (0, m2 σ 2 ) n i=1 P∞ with σ 2 = Var(g1 (X1 )) + 2 j=1 Cov(g1 (X1 ), g1 (X1+j )) < ∞. For want to use Lemma A.2 with constants ci1 ,ik+1 = 1, needing Pn the remaining terms we γ ) for a γ ≥ 0. l (β(l) + A ) = O(n l l=0 Using !1 !1 ∞ ∞ 2 2  δ+1  X X ai Al = 2 ≤ 2C i−δ−2 = O n− 2 i=l i=l we get n X l (β(l) + Al ) ≤ C l=0 n n n   X X δ+1 X δ+1 l l−δ + n− 2 ≤ C l−δ+1 + n− 2 l l=1 l=1 γ  = O(n ) + O n 2− δ+1 2  l=1 γ = O(n ) and so Lemma A.2 is applicable and the convergence of the remaining terms is analogous to the strong mixing case in Fischer et al. (2015) and therefore omitted. 11 Proof of Theorem 2.2. By decomposing the estimator into two parts we can apply the results of de Jong and Davidson (2000): n−1 X 2 σ̂ =  κ r=−(n−1) |r| bn  n−|r| 1 X ĝ1 (Xi )ĝ1 (Xi+|r| ) n j=1 − g1 (Xi )g1 (Xi+|r| ) + h1 (Xi )h1 (Xi+|r| ) n−1 X =  κ r=−(n−1) n−1 X + |r| bn  κ r=−(n−1)   n−|r| 1 X g1 (Xi )g1 (Xi+|r| ) n j=1 |r| bn  n−|r|  1 X ĝ1 (Xi )ĝ1 (Xi+|r| ) − g1 (Xi )g1 (Xi+|r| ) n j=1 For the first term de Jong and Davidson (2000) showed that it converges to σ 2 in probability. Therefore, it remains to show n−1 X E  κ r=−(n−1) |r| bn  n−|r|  1 X ĝ1 (Xi )ĝ1 (Xi+|r| ) − g1 (Xi )g1 (Xi+|r| ) −→ 0. n j=1 Let us first expand g1 (x) − ĝ1 (x) into single terms. g1 (x) − ĝ1 (x) 1 =g1 (x) − m−1 n 1 + m n =g1 (x) − X h(x, Xi1 , . . . , Xm−1 ) 1≤i1 <...<im−1 ≤n X h(Xi1 , . . . , Xim ) 1≤i1 <...<im ≤n 1 nm−1  X gm (x, Xi1 , . . . , Xim−1 ) + g1 (x) + 1≤i1 <...<im−1 ≤n m−1 X g1 (Xij ) j=1 X + ... + gm−1 (x, Xij1 , . . . , Xijm−2 ) 1≤j1 <...<jm−2 ≤m−1  gm−1 (Xij1 , . . . , Xijm−1 ) X + 1 nm  X 1≤j1 <...<jm−1 ≤m−1 m X g(Xi1 , . . . , Xim ) + 1≤i1 <...<im ≤n g(Xij ) j=1 X gm−1 (Xij1 , . . . , Xijm−1 ) 1≤j1 <...<jm−1 ≤m 12  =− n 1 X nm−1 1≤i1 <...<im−1 ≤n − ... − 2 − gm (x, Xi1 , . . . , Xim−1 ) − (m − 1) 1 1 gm−1 (x, Xi1 , . . . , Xim−2 ) 1≤i1 <...<im−2 ≤n X nm−1 i=1 X nm−2 1X g1 (Xi ) n gm−1 (Xi1 , . . . , Xim−1 ) 1≤i1 <...<im ≤n n 1 + m n 1X gm (Xi1 , . . . , Xim ) + m g1 (Xi ) n i=1 1≤i1 <...<im ≤n X 1 + . . . + 2 m−1 gm−1 (Xi1 , . . . , Xim−1 ) n X 1≤i1 <...<im−1 ≤n n n 1X 1X 1 X = g2 (Xi , Xj ) g1 (Xi ) − (m − 2) g2 (x, Xi ) + (m − 2) 2 n n n i=1 i=1 1≤i<j≤n X 1 − . . . − 2 m−2 gm−1 (x, Xi1 , . . . , Xim−2 ) n 1≤i1 <...<im−2 ≤n +2 − 1 X nm−1 gm−1 (Xi1 , . . . , Xim−1 ) 1≤i1 <...<im−1 ≤n 1 X nm−1 gm (x, Xi1 , . . . , Xim−1 ) + 1≤i1 <...<im−1 ≤n 1 nm X gm−1 (Xi1 , . . . , Xim ) 1≤i1 <...<im ≤n n = 1X g1 (Xi ) n i=1 − m X   (m − k) 1  nk−1 X gk (x, Xi1 , . . . , Xik−1 ) + 1≤i1 <...<ik−1 ≤n k=2 1 n X gk (Xi1 , . . . , Xik ) 1≤i1 <...<ik ≤n Using this representation we can split the expected value and handle the single terms separately. n−1 X E  κ r=−(n−1) ≤E n−1 X |r| bn n−1 X r=−(n−1)  κ n−|r|  1 X g1 (Xj )g1 (Xj+|r| ) − ĝ1 (Xj )ĝ1 (Xj+|r| ) n j=1  κ r=−(n−1) +E  |r| bn |r| bn   n−|r|  1 X (g1 (Xj ) − ĝ1 (Xj ))g1 (Xj+|r| ) n j=1 n−|r|  1 X (g1 (Xj+|r| ) − ĝ1 (Xj+|r| ))ĝ1 (Xj ) n j=1 13 ≤E n−1 X  κ r=−(n−1) +E n−1 X  κ r=−(n−1) +E n−1 X  κ r=−(n−1) |r| bn  |r| bn  |r| bn  |r| bn  |r| bn  |r| bn  |r| bn  n−|r| n 1 X 1X g1 (Xi )g1 (Xj+|r| ) n n j=1 i=1 n−|r| n 1 X 1X (m − 2) g2 (Xi , Xj )g1 (Xj+|r| ) n n j=1 i=1 n−|r| 1 X 1 (m − 2) 2 n n j=1 X g2 (Xi1 , Xi2 )g1 (Xj+|r| ) 1≤i1 <i2 ≤n + ... +E n−1 X  κ r=−(n−1) +E n−1 X  κ r=−(n−1) +E n−1 X  κ r=−(n−1) n−|r| 1 X 1 n nm−1 j=1 X gm (Xj , Xi1 , . . . , Xim−1 )g1 (Xj+|r| ) 1≤i1 <...<im−1 ≤n n−|r| 1 X 1 n nm j=1 X gm (Xi1 , . . . , Xim )g1 (Xj+|r| ) 1≤i1 <...<im ≤n n−|r| n 1 X 1X g1 (Xi )ĝ1 (Xj ) n n j=1 i=1 + ... +E n−1 X r=−(n−1)  κ n−|r| 1 X 1 n nm j=1 X gm (Xi1 , . . . , Xim )ĝ1 (Xj ) 1≤i1 <...<im ≤n We denote the 4(m − 1) + 2 terms with Ii , i = 1, . . . , 4(m − 1) + 1. The first term I1 containing the first term of the Hoeffding decomposition can be handled analogously to Dehling et al. (2015), using the Lemma C.1 of them. The conditions of the Lemma are fulfilled, since the boundedness of the kernel h replaces the Assumption 2.3. It remains to show, that our definition of NED implies the required assumptions on the PNED process. Therefore, we want to use Lemma A.1 of Dehling et al. (2015) saying that an L1 -near epoch dependent process on (Zn )n∈Z with approximating constants (al )l∈N is 2+δ P-NED on the same process (Zn )n∈Z . If we then choose sk = Ck −6(1+ δ ) and Φ(x) = x−1 we gain Φ()sk = −1 Ck −6(1+ 2+δ ) δ ≥ k −(δ+3) −1 = ak −1 and hence we know that (Xn )n∈N is P-NED with approximating constants (sk )k∈N and function Φ on an absolutely regular process (Zn )n∈Z with mixing coefficients (β(l))l∈N . P δ/(2+δ) For these coefficients holds sk Φ(k −6 ) = O(k −6(2+δ)/δ ) and ∞ < ∞ and so k=1 kβk all assumptions needed for Lemma C.1 are fulfilled. Let us now consider all the terms, which contain g1 and gk (Xj , . . .), k = 1, m. These are the terms I2k , k = 1, . . . , m − 1. 14 n−1 X I2k = E  κ r=−(n−1) n X 1 =E n j1 =1 |r| bn  n−|r| 1 X 1 (m − (k + 1)) k n n j=1 m − (k + 1) nk X gk+1 (Xj , Xi1 , . . . , Xik )h1 (Xj+|r| ) 1≤i1 <...<ik ≤n  X gk+1 (Xi1 , . . . , Xik+1 )g1 (Xj1 )κ 1≤i1 <...<ik+1 ≤n |i1 − j1 | bn  1 2 n X 1 2 g1 (Xj1 )  ≤E  n  j1 =1   n X 1  m − (k + 1) n nk j1 =1  X gk+1 (Xi1 , . . . , Xik+1 )κ 1≤i1 <...<ik+1 ≤n  1  2 2! |i1 − j1 |   bn  1 2 n X 1 2    ≤ E g1 (Xj1 ) n   j1 =1    n X E  1  m − (k + 1) n nk j1 =1  X gk+1 (Xi1 , . . . , Xik+1 )κ 1≤i1 <...<ik+1 ≤n  2  12 |i1 − j1 |   , bn where we used the Hölder-inequality in the last step. Now we can use the boundedness of h1 (since h is bounded) and get    1 2 n X 1 2    I2k ≤ E g1 (Xj1 ) n j1 =1   E  (m − (k + n2k+1 1))2  X gk+1 (Xi1 , . . . , Xik+1 )  1≤i1 <...<ik+1 ≤n n X X m − (k + 1)   E gk+1 (Xi1 , . . . , Xik+1 ) κ 1 nk+ 2 j1 =1 1≤i1 <...<ik+1 ≤n ≤ C0 1 1 nk+ 2 E n X  κ j1 =1   ≤C n X    12  2 |i1 − j1 |   bn  2  12 |i1 − j1 |   bn gk+1 (Xi1 , . . . , Xik+1 )gk+1 (Xik+2 , . . . , Xi2(k+1) ) (1) i1 ,...,i2(k+1) =1 n X j1 =1  κ |i1 − j1 | bn    !! 21 |ik+2 − j1 | κ . bn To show the convergence of I2k to zero we finally want to apply Lemma A.2. For this we 15 have to show that n X l(β(l) + Al ) = O(nγ ) l=0 p P∞ P∞ δ/(2+δ) (l) < ∞, which implies 2 i=l ai . From the assumption with Al = l=1 lβ δ/(2+δ) lβ (l) → 0 for l → ∞, and the fact that the mixing coefficients (β(l))l∈N are nonnegative and monotone decreasing (therefore β δ/(2+δ) (l) is also monotone decreasing) we know, that lβ δ/(2+δ) (l) is monotone decreasing and positive. Hence   1 δ/(2+δ)(l) lβ =O l and so β(l) =O (l−η ) for a η > 2. Analogously to the proof of Theorem 2.1, but now for al = O l−δ−3 , we then can show n X l(β(l) + Al ) ≤ C l=0 n X l−η+1 + O(n2− δ+2 2 ), l=1 1 where 2 − δ+2 > 11. Let us now have a closer look at the first term. We 2 < 2 since Pn δ −η+1 = O(nγ ) for a 0 < γ < 1/2. It is want to show that C l=1 l Pn −η+1 l=1 l nγ −γ ≤ inf t 1≤t≤n n X l 1−η ≤ n X l=1 l −1−η −γ l l=1 = n  −1+η+γ X 1 l=1 l . This is the Dirichlet P series and it converges for −1 + η + γ > 1. Since η > 2 and 0 < γ < 1/2 we have nl=1 l−η+1 = O(nγ ) and therefore n X l(β(l) + Al ) = O(nγ ) l=0 for a 0 < γ < 1/2. Now we can apply Lemma A.2 to (1), where ci1 ,ik+2 = n X  κ j1 =1 |i1 − j1 | bn    |ik+2 − j1 | κ = O(bn ) bn and obtain I2k ≤ C 1  1 nk+ 2 n  12 n2k+γ bn ≤C bn n2k+1   1  b  12 γ− 12 2 √n =C n −→ 0, n 2(k+1)−2+γ 16 1 2  because of Assumption 2.1 and 0 < γ < 1/2. Therefore, I2k converges to zero for all k = 1, . . . , m − 1. It remains to show the convergence of the remaining terms. The terms containing g1 (·) and gk (Xi1 , . . . , Xik ), k = 2, . . . , m are denoted with I2k+1 , k = 1, . . . , m − 1. n−1 X I2k+1 = E  κ r=−(n−1) m − (k + 1) ≤k nk+1 |r| bn  n−|r| 1 X m − (k + 1) n nk+1 j=1 X X gk+1 (Xi1 , . . . , Xik+1 )g1 (Xj+|r| ) 1≤i1 <...<ik+1 ≤n gk+1 (Xi1 , . . . , Xik+1 )k2 1≤i1 <...<ik+1 ≤n n−|r|   n X 1 X |j − j1 | k k2 g1 (Xj+|r| ) κ n bn j=1 ≤C =C 1 nk+1  j1 =1 1 b 2 √n n2(k+1)−γ n nk+γ/2 o(1) −→ 0, nk+1 where we used the Hölder inequality, the boundedness of hk+1 , Lemma A.2 and Assumption 2.1 as before. The convergence of the remaining terms I2m , I2k and I2k+1 for k = m + 1, . . . , 2(m − 1) can be shown analogously and is therefore omitted. Proof of Theorem 3.1. Analogously to the three conditions of Serfling (1984), which were also used in Fischer et al. (2015), we want to show  R H (y)  R H (y) n J(t)dt− 0 F J(t)dt 0 (i) For WHn ,HF (y) = − J(HF (y)) holds Hn (y)−HF (y) 1 kWHn ,HF kL1 = op (1) and it is kHn − HF k∞ = Op (n− 2 ). p −H (ξ ) (ii) For the remainder term Rpi ,n = ξˆpi ,n −ξpi + i hf (ξnp )pi of the Bahadur representation i of an empirical quantile holds 1 Rpi ,n = op (n− 2 ). (iii) For a U -statistic with kernel Z ∞ A(x1 , . . . , xm ) = − + −∞ d X ai  1[h(x1 ,...,xm )≤y] − HF (y) J(HF (y))dy pi − 1[h(x1 ,...,xm )≤H −1 (pi )] F hF (HF−1 (pi )) i=1 17 we have √ D n(Un (A) − θ) −→ N (0, σ 2 ). As in the case of strong mixing condition (i) is fulfilled using Lemma 8.2.4.A of Serfling (1980) and Corollary A.1. Condition (ii) can be proven by Lemma A.5. It remains to show that condition (iii) is satisfied. Therefore we apply Theorem 2.1. Fischer et al. (2015) already showed that the kernel A satisfies the assumptions in the theorem. Proof of Corollary 3.1. As we have mentioned before, the error term T (Hn ) − T (HF ) can be approximated by 2 , being similar to a U -statistic with kernel A. This leads to the special structure of σGL that of a long-run variance of U -statistics. Therefore, we want to apply Theorem 2.2 to prove this Corollary. It only remains to show the assumptions on the kernel A. As we have said above and was proved in Fischer et al. (2015) the kernel A is bounded and satisfies the extended variation condition. We therefore only have to show that A also satisfies the L2 -variation condition. It is v !2 u u tE 0 )| sup |A(x1 , . . . , xm ) − A(X10 , . . . , Xm 0 )k≤ k(x1 ,...,xm )−(X10 ,...,Xm  E = 0 )|≤ k(x1 ,...,xm )−(X10 ,...,Xm Z ∞ −∞ + d X −∞ (1[h(x1 ,...,xm )≤y] − HF (y))J(HF (y))dy (1[h(X10 ,...,Xm 0 )≤y] − HF (y))J(HF (y))dy ai i=1 v u u + tE − sup + v u u ≤ tE ∞ Z pi − 1[h(x1 ,...,xm )≤H −1 (pi )] F hF (HF−1 (pi )) Z −∞ d X sup 0 )k≤ k(x1 ,...,xm )−(X10 ,...,Xm ai i=1 pi − 1[h(X 0 ,...,X 0 −1 m )≤HF (pi )] 1 2 !1 2 hF (HF−1 (pi )) !2 ∞ sup 0 )k≤ k(x1 ,...,xm )−(X10 ,...,Xm − d X (1[h(x1 ,...,xm )≤y] − 1[h(X10 ,...,Xm 0 )≤y] )J(HF (y))dy ai 1[h(x1 ,...,xm )≤H −1 (pi )] − 1[h(X 0 ,...,X 0 F 1 −1 m )≤HF (pi )] !2 hF (HF−1 (pi )) i=1 These term can now be treated separately and analogous to the proof of the extended variation condition in Fischer et al. (2015). For the first term we gain Z E sup 0 )k≤ k(x1 ,...,xm )−(X10 ,...,Xm !2 ∞ −∞ (1[h(x1 ,...,xm )≤y] − 1[h(X10 ,...,Xm 0 )≤y] )J(HF (y))dy 18 Z ≤E sup 0 )k≤ k(x1 ,...,xm )−(X10 ,...,Xm |1[h(X 0 ,...,X 0 m )∈(t−L̃,t+L̃)] 1 ≤ C sup |E(1[h(X 0 ,...,X 0 t∈R 1 | J(HF (y))dy −∞ 2  ≤ E sup |1[h(X 0 ,...,X 0 t∈R m )∈(t−L̃,t+L̃)] 1 !2 ∞ |C m )∈(t−L̃,t+L̃)] )2 | 0 ≤ C sup |P(h(X10 , . . . , Xm ) ∈ (t − L̃, t + L̃))| t∈R ≤ C(sup hF (x))2L̃ ≤ L x∈R using the boundedness of | Therefore, v u u tE sup R∞ −∞ J(HF (y))dy| 0 )k≤ k(x1 ,...,xm )−(X10 ,...,Xm and hF . !2 |A(x1 , . . . , xm ) − 0 )| A(X10 , . . . , Xm √ ≤ 2 L and !2 E sup 0 )k≤ k(x1 ,...,xm )−(X10 ,...,Xm 0 |A(x1 , . . . , xm ) − A(X10 , . . . , Xm )| ≤ L0  This makes Theorem 2.2 applicable and the proof is completed. 5. Application: Scale estimators under EGARCH-processes When developing theory for near epoch dependent data one of the widely used examples is the GARCH(p,q)-process (Generalized Autoregressive Conditional Heteroscedasticity) (Bollerslev (1986)), a generalisation of ARCH-processes. A process (Xt )t∈Z is called GARCH(p,q)-process, if Xt = σt Zt , with positive σ 2 given by 2 2 2 2 σt2 = α0 + α1 Xt−1 + . . . + αp Xt−p + β1 σt−1 + . . . + βq σt−q , where α0 , . . . , αp , β1 , . . . , βq ∈ R are non-negative with αp 6= 0 and βq 6= 0 and (Zt )t∈Z is an i.i.d. sequence with mean zero and variance equal to one. Hansen (1991) relax the assumptions on (Zt )t∈Z , such that (Zt )t∈Z can be assumed to be  1/5 t 2 r α-mixing. They showed then that if E[(β1 + α1 ( X ≤ c < 1 a.s. for all t, ) ) |F ] t−1 σt a GARCH(1,1)-process Xt is Lr -NED on the α-mixing process Zt σt with approximation constants al = cl 2α0 c/(1 − c). 19 A generalisation which is widely used in financial applications and also in hydrology is the Exponential GARCH (EGARCH) model proposed by Nelson (1991). One of the advantages of EGARCH-processes is that they do not have the non-negativity restriction of the GARCH-processes. The process (Xt )t∈Z is called EGARCH(p,q)-process on the sequence (Zt )t∈Z , if Xt = σt Zt where σt2 is the positive conditional variance given by 2 2 log(σt2 ) = α0 + α1 f (Zt−1 ) + . . . + αp f (Zt−p ) + β1 log(σt−1 ) + . . . + βq log(σt−q ), where α0 , . . . , αp , β1 , . . . , βq ∈ R with αp 6= 0 and βq 6= 0 and f is a measurable function which is linear in Z with coefficients θ and λ given by f (Zt ) = θZt + λ(|Zt | − E|Zt |). In this section we want to show for some scale estimators proposed in Section 1 their asymptotic normality if we consider an underlying EGARCH(1,1)-process. Therefore, we first have to show under which conditions EGARCH(p,q)-processes are NED. P Theorem 5.1. Let σ1 be bounded and | qi=1 βi | < 1. Moreover, assume that sup |Zt | < ∞. (2) t∈Z Then the EGARCH(p,q)-process on the sequence (Zt )t∈Z given by Xt = σt Zt is near epoch dependent. Remark 5.1. 1. The assumption (2) in Theorem 5.1 is an analogue to the condition of Hansen (1991) for GARCH-processes to the EGARCH-case with arbitrary values p and q. Whether this condition is fulfilled depends on the existing moments of Zi . For example, if (Zt )t∈Z is a White Noise process with variance σ (that is E|Zt | ≤ σ = 1), the condition is fulfilled. 2. The boundedness of the conditional variance σ1 is a common assumption for GARCHprocesses (see Hansen (1991), Lee and Hansen (1994)). It results from the moment condition on σ, E|σ1 |1+δ < ∞, which is needed in the following proof and the Lipschitz-condition. Proof. (Theorem 5.1) Using an iterative expression of the term log(σt2 ) we obtain log(σt2 ) = n X j=1 X k1 ,...,kq ∈N0 , k1 +...+kq =j−1   j−1 k β1k1 · . . . · βq q k1 , . . . , kq 20 α0 + p X  αk f Zt−k−(Pq i=1 k=1  iki ) ! +  X    n kq k1 2 P β · . . . · βq log σt−( q ik ) . i i=1 k1 , . . . , kq 1 k1 ,...,kq ∈N0 , k1 +...+kq =n Now, considering the limit for n → ∞, it is log(σt2 ) = lim n X n→∞ j=1 + lim n→∞  X k1 ,...,kq ∈N0 , k1 +...+kq =j−1 X  j−1 k β k1 · . . . · βq q k1 , . . . , k q 1 α0 + p X  αk f Zt−k−(Pq i=1  ! iki ) k=1     n k 2 P β1k1 · . . . · βq q log σt− q ( i=1 iki ) k1 , ..., kq k1 ,...,kq ∈N0 , k1 +...+kq =n We want to show that the first term of the sum converges a.s. This is gained by the assumptions P sup E|Zt | < ∞ and qi=1 βi | < 1 and the linearity of the function f . With the Multinot mial Theorem and the convergence of the geometric series we can apply the monotone convergence theorem to obtain the convergence of the series (see for example Proposition 3.1.1 of Brockwell and Davis (2006)). For the second term we show that it converges to zero a.s., that is     X n k 2 P lim β1k1 · . . . · βq q log σt− q ( i=1 iki ) = 0 for all t ∈ Z a.s. n→∞ k1 , . . . , kq k1 ,...,kq ∈N0 , k1 +...+kq =n By using the Multinomial Theorem we have     X n k 2 P lim β1k1 · . . . · βq q log σt− ( qi=1 iki ) n→∞ k1 , . . . , kq k1 ,...,kq ∈N0 , k1 +...+kq =n ≤ sup log k1 ,...,kq  2 P σt− ( qi=1 iki )  X lim n→∞ k1 ,...,kq ∈N0 , k1 +...+kq =n   n k β1k1 · . . . · βq q k1 , . . . , kq   2 P = sup log σt− lim (β + ... + βq )n q iki ) n→∞ 1 ( i=1 k1 ,...,kq and therefore the term converges a.s. to zero if q X βi < 1. i=1 21 Hence, we can write log(σt2 ) = ∞ X j=1 X k1 ,...,kq ∈N0 , k1 +...+kq =j−1   j−1 k β k1 · ... · βq q k1 , ..., kq 1 α0 + p X  αk f Zt−k−(Pq i=1  iki ) ! . k=1 This is a linear solution and for this reason the process (log(σt2 ))t is near epoch dependent. Moreover, q σt = exp(log(σt2 )) = g(log(σt2 )) p with g(x) = exp(x). This function g fulfils the Lipschitz-condition for all x ∈ (−∞, a], a ∈ R. We can now apply Proposition 2.11 of Borovkova et al. (2001), where we need that σ1 is bounded. Therefore, the process σt and hence Xt = σt Zt is near epoch dependent on the process (Zt )t∈Z . For the following simulations we consider an EGARCH(1,1)-process with parameters α = 0.2 and β = 0.05. The coefficients of the function f are chosen as θ = 0.9 and λ = 0.1. These are common choices when simulating from an EGARCH-process. What is special and corresponds to the case of a NED-process on an underlying absolutely regular process is the choice of Zt as AR(1)-process with correlation coefficient ρ = 0.8. Notice that the assumptions of Theorem 2 are therefore fulfilled. We compare the three estimators of Section 1 with different sample length concerning their asymptotic normality using QQPlots. For the estimators in Example 1.2 and 1.3 we use the special cases Q and LM Sn of the estimators. The asymptotic normality of these estimators is therefore confirmed, although a sample length of about n = 1000 is needed. The Gini’s mean difference estimator proves to need the largest sample of the three estimators to be approximated well by a normal distribution. It a second scenario we want to increase the dependence in the EGARCH process such that the AR(1) process as well as the EGARCH-process show very strong dependence. For this we choose α = 0.8 and β = 0.1. The results can be found in Fig. 4-6. Because of the increased dependency within the EGARCH-process a larger sample size is needed to obtain a good approximation by the normal distribution. Similar to the first scenario, Gini’s mean difference needs many data for a good approximation, whereas the Q-estimator does not need many more data in the presence of strong dependence. As expected the number of needed data in the sample to obtain a good approximation by the normal distribution increases with the dependence. Again, Gini’s mean difference needs the largest sample (n = 5000) for a good approximation. 6. Acknowledgements The financial support of the Deutsche Forschungsgemeinschaft (SFB 823, ”Statistical modelling of non-linear dynamic processes”) is gratefully acknowledged. The author 22 Figure 1: Gini’s Mean difference for n = 100 (left) and n = 1000 (right) Figure 2: LM Sn -estimator for n = 100 (left) and n = 1000 (right) 23 Figure 3: Q-estimator for n = 100 (left) and n = 1000 (right) Figure 4: Normal QQ-Plot for Gini’s Mean difference for n = 2000 (left) and n = 5000 (right) for strong dependence in the AR(1) process as well as in the EGARCH process. 24 Figure 5: Normal QQ-Plot for the LM Sn -estimator for n = 1000 (bottom left) and n = 2000 (bottom right) for strong dependence in the AR(1) process as well as in the EGARCH process. Figure 6: Normal QQ-Plot for the Q-estimator for n = 1000 (left) and n = 2000 (right) for strong dependence in the AR(1) process as well as in the EGARCH process. 25 also would like to thank Marie Düker for her helpful suggestions concerning EGARCHprocesses and Martin Wendler for many helpful discussions on this topic. 26 References T. Bollerslev. Generalized autoregressive conditional heteroskedasticity. Journal of econometrics, 31(3):307–327, 1986. S. Borovkova, R. Burton, and H. Dehling. Limit Theorems for Functionals of Mixing Processes with Applications to U -Statistics and Dimension Estimation. Transactions of the American Mathematical Society, 353:4261–4318, 2001. R.C. Bradley. Introduction to Strong Mixing Conditions. Kendrick Press 1st edition, 2007. P. J. Brockwell and R. A. Davis. Time Series: Theory and Methods. Springer, New Delhi, 2006. J. Choudhury and R. J. Serfling. Generalized Order Statistics, Bahadur Representations, and Sequential Nonparametric Fixes-Width Confidence Intervals. Journal of Statistical Planning and Inference, 19:269–282, 1988. R. M. de Jong and J. Davidson. Consistency of Kernel Estimators of Heteroscedastic and Autocorralted Covariance Matrices. Econometrica, 68(2):407–424, 2000. H. Dehling and W. Philipp. Empirical Process Techniques for Dependent Data. In Empirical Process Techniques for Dependent Data, pages 3–115, 2002. H. Dehling, M. Denker, and W. Philipp. The almost Sure Invariance Principle for the Empirical Process of U -Statistics structure. Annales de l’Institut Henri Pointcare (B): Probability and Statistics, 23:349–382, 1987. H. Dehling, D. Vogel, M. Wendler, and D. Wied. Testing for Changes in the Rank Correlation of Time Series. ArXiv, 28:307–317, 2015. M. Denker and G. Keller. Rigorous Statistical Procedures for Data from Dynamical Systems. Journal of Statistical Physics, 44:67–93, 1986. S. Fischer, R. Fried, and M. Wendler. Multivariate Generalized Linear-Statistics of Sort Range Dependent Data. Electronic Journal of Statistics, 10(1):646–682, 2015. C. Gerstenberger and D. Vogel. On the efficiency of Gini’s mean difference. Statistical Methods and Applications, pages 1–28, 2015. J. K. Ghosh. A new Proof of the Bahadur Representation of Quantiles and an Application. Annals of Mathematical Statistics, 42:1957–1961, 1971. B. E. Hansen. GARCH(1, 1) processes are near epoch dependent. Economics Letters, 36 (2):181 – 186, 1991. W. Hoeffding. A Class of Statistics with Asymptotically Normal Distribution. Annals of Mathematical Statistics, 19:293–325, 1948. 27 I. A. Ibragimov. Some limit theorems for stationary processes. Theory of Probabability & Its Applications, 7:349–382, 1962. S. W. Lee and B. E. Hansen. Asymptotic Theory for the GARCH(1,1) Quasi-Maximum Likelihood Estimator. Econometric Theory, 10:29–52, 1994. D. B. Nelson. Conditional heteroskedasticity in asset returns: A new approach. Econometrica: Journal of the Econometric Society, 59:347–370, 1991. P. J. Rousseeuw and C. Croux. Explicit scale Estimators with high Breakdown Point. L1 Statistical Analysis and Related Methods, pages 77–92, 1992. R. Serfling. Approximation Theorems of Mathematical Statistics. John Wiley and Sons, 1980. R. Serfling. Generalized L-, M -, and R-Statistics. The Annals of Statistics, 12.1:76–86, 1984. D. Vogel and M. Wendler. Studentied Sequential U-quantiles under Dependence with Applications to Change-point Analysis. ArXiv, 28:307–317, 2015. M. Wendler. Empirical U -Quantiles of Dependent Data. PhD thesis, Ruhr-Universität Bochum, 2011a. M. Wendler. Bahadur Representation for U -Quantiles of Dependent Data. Journal of Multivariate Analysis, 102:1064–1079, 2011b. A. Preliminary results For the proofs of the main theorems some lemmata are needed. The following results are similar to the case of strong mixing (Fischer et al. (2015)) but since the proofs need different arguments in some cases we state the proofs due to completeness. The first lemma is analogous to Lemma 4.2 in Fischer et al. (2015) and an extension of Lemma 3.2.4 in Wendler (2011a). Lemma A.1. Let (Xn )n∈N be NED with approximation constants (al )l∈N on an absolutely regular prop P cess (Zn )n∈Z with mixing coefficients (β(l))n∈N . Moreover, let be AL = 2 ∞ i=L ai and let h be bounded and satisfy the extendend variation condition. Then there exists for all 2≤k≤m  a constant C, such that for r = max i(2) − i(1) , i(2k) − i(2k−1) with i(1) ≤ . . . ≤ i(2k) follows  h r i   E gk (Xi1 , . . . , Xik )gk (Xik+1 , . . . , Xi2k ) ≤ C β + A[ r ] . 3 3 28 Lemma A.2. Let the kernel h be bounded and satisfy the extended variation condition. Moreover, let (Xn )n∈N be NED with approximation constants P (al )l∈N on an absolutely regular process n γ (Z ) with mixing coefficients (β(l)) and n∈Z l∈N l=0 l (β(l) + Al ) = O (n ) with Al = pn P 2 ∞ i=l ai for a γ > 0. Then for all 2 ≤ k ≤ m and any constants (ci,j )i,j∈N n X E(gk (Xi1 , . . . , Xik )gk (Xik+1 , . . . , Xi2k ))ci1 ,ik+1 = i1 ,...,i2k =1 max i1 ,ik+1 ∈{1,...,n} |ci1 ,ik+1 |O(n2k−2+γ ). This lemma is analogous to Lemma 4.3 in Fischer et al. (2015) and can be proved similar. Proof. Again set {i1 , . . . , i2k } = {i(1) , . . . , i(2k) } with i(1) ≤ . . . ≤ i(2k) . We can rewrite the above sum as n X E(gk (Xi1 , . . . , Xik )gk (Xik+1 , . . . , Xi2k ))ci1 ,ik+1 i1 ,...,i2k =1 ≤ = max i1 ,ik+1 ∈{1,...,n} max i1 ,ik+1 ∈{1,...,n} n X |ci1 ,ik+1 | |ci1 ,ik+1 | E(gk (Xi1 , . . . , Xik )gk (Xik+1 , . . . , Xi2k )) i1 ,...,i2k =1 n X l=0 n X E(gk (Xi1 , . . . , Xik )gk (Xik+1 , . . . , Xi2k )) i1 ,...,i2k =1 max{i(2) −i(1) ,i(2k) −i(2k−1) }=l ≤ max i1 ,ik+1 ∈{1,...,n} |ci1 ,ik+1 |C n X X l=0 i1 ,...,i2k ,     l + A[ l ] , β 3 3 max{i(2) −i(1) ,i(2k) −i(2k−1) }=l by application of Lemma A.1. Now we want to simplify the expression by using a calculation of the quantity of (i1 , . . . , i2k ) where max{i(2) −i(1) , i(2k) −i(2k−1) } = l. Using combinatorical arguments we can see that there exist (2k)! possibilities to gain the same sequence i(1) , . . . , i(2k) . We now fix i(1) and i(2k) , having n2 possibilities for this. Having in mind that max{i(2) −i(1) , i(2k) −i(2k−1) } = l and suppose i(2) − i(1) = max{i(2) − i(1) , i(2k) − i(2k−1) } = l then i(2) is automatically determined by the choice of i(1) . Then, i(2k−1) can only take l distinct values. Supposing i(2k) − i(2k−1) = max{i(2) − i(1) , i(2k) − i(2k−1) } = l the same is valid. All remaining values of the k-tuple are arbitrary. Therefore, the quantity of the summands equals (2k)! · n2 ln2k−4 = l · (2k)! · n2k−2 and n X E(gk (Xi1 , . . . , Xik )gk (Xik+1 , . . . , Xi2k ))ci1 ,ik+1 i1 ,...,i2k =1 ≤ max i1 ,ik+1 ∈{1,...,n} 0 2k−2 |ci1 ,ik+1 |C n     n X l l β + A[ l ] = max |ci1 ,ik+1 |O(n2k−2+γ ). 3 3 i1 ,ik+1 ∈{1,...,n} l=0 29 Lemma A.3. Let h be a kernel satisfying the extended uniform variation condition, such that the U distribution function U is Lipschitz continuous. Moreover let (Xn )n∈N be NED with approximation constants al = O (l−a ), where a = max {η + 3, 12}, on an absolutely regular process (Zn )n∈Z with mixing coefficients β(l) = O (l−η ) for a η ≥ 8 Then for all 2 ≤ k ≤ m and γ = η−3 η+1 we have 1 sup X t∈R 1≤i1 ,...,ik ≤n γ gk (Xi1 , . . . , Xik , t) = o(nk− 2 − 8 ) a.s.. Corollary A.1. Let (Xn )n∈N be NED with approximation constants (al )l∈N on an absolutely regular proγ P l2 β 2+γ (l) < ∞, 0 < γ < 1. cess (Zn )n∈Z with mixing coefficients (β(l))l∈N with ∞ l=1 γ  δ P P∞ 2 √ 2 a 2+2γ < ∞ as well as 1+δ Additionally, let be ∞ l < ∞ for a δ > 8, l=1 l=1 l L 2Al l where L is the variation constant of the kernel g(x1 , . . . , xm ) = 1[h(x1 ,...,xm )≤t] and AL = p P∞ 2 i=l ai . Moreover let h be a Lipschitz-continuous kernel with distribution function HF and related density hF < ∞ and for all 2 ≤ k ≤ m let hF ;X2 ,...,Xk be bounded. Then √ sup n (Hn (t) − HF (t)) = Op (1). t∈R This corollary is a straightforward result from Theorem 2.3 using Lemma A.2. The assumptions on the coefficients al and βl of Lemma A.2 are automatically fulfilled by the assumptions of Theorem 2.3. Proof. We again use the Hoeffding decomposition having √ sup n (Hn (t) − HF (t)) t∈R   m   X √ m 1   = sup n HF (t) + n Sjn,t − HF (t) j t∈R j j=1  n m X √ 2 m X = sup √ g2 (Xi , Xj , t) g1 (Xi , t) + n n n t∈R 2 1≤i<j≤n i=1 X √ 1 + . . . + n n gm (Xi1 , . . . , Xim , t) m 1≤i1 <...<im ≤n n √ m X √ ≤ sup g1 (Xi , t) + sup n n t∈R t∈R i=1 + . . . + sup t∈R √ n 1 X n m m X 2 g2 (Xi , Xj , t) n 2 1≤i<j≤n  gm (Xi1 , . . . , Xim , t) .  1≤i1 <...<im ≤n 30 For the first term of the sum, using Theorem 2.3 and the continuous mapping theorem, we get n m X sup √ g1 (Xi , t) → kW k∞ . n t∈R i=1 Since W is a continuous Gaussian process we have kW k∞ = Op (1). For the remaining results we want to apply Lemma A.3. Therefore the kernel of the U -process g(x1 , . . . , xm , t) = 1[h(x1 ,...,xm )≤t] has to satisfy the extended uniform variation condition. We use the Lipschitz continuity of h for this. sup k(x1 ,...,xm )−(X 0 1 ,...,X 0 m )k≤ 1[h(X 0 1 ,...,X 0 m )≤t] − 1[h(x1 ,...,xm )≤t] ( 1 , if h(X 0 1 , . . . , X 0 m ) ∈ (t − L, t + L) = 0 , else and so ! sup E k(x1 ,...,xm )−(X 0 1 ,...,X 0 m )k≤ 1[h(X 0 1 ,...,X 0 m )≤t] − 1[h(x1 ,...,xm )≤t] ≤ sup E 1[h(X 0 1 ,...,X 0 m )∈(t−L,t+L)]  t∈R Z t+L ≤ sup t∈R hF (x)dx ≤ 2L(sup hF (x)) ≤ L0 , x∈R t−L since hF is bounded. Using the arguments we can also show that g satisfies the extended uniform variation condition. For arbitrary 2 ≤ k ≤ m and i1 < i2 < . . . < im ! sup E |x1 −Yi1 |≤ Z k ,Yik+1 ,...,Yim )≤t] − 1[h(x1 ,Xi2 ,...,Xi k ,Yik+1 ,...,Yim )≤t] t+L ≤ sup t∈R 1[h(Yi1 ,Xi2 ,...,Xi t−L hF ;Xi1 ,...,Xik (x)dx ≤ L. Applying Lemma A.3 we get for 2 ≤ k ≤ n sup t∈R √ m X k gk (Xi1 , . . . , Xik , t) n k 1≤i1 ,...,ik ≤n  n ≤ √ 1 nn−k op (nk− 2 − δ−2 8δ ) = op (n− δ−2 8δ ). With Slutsky’s Theorem the proof is then completed. We will now prove the convergence of the remaining term of the Bahadur representation (which was shown by Ghosh (1971) under independence), where we need the following lemma. 31 Lemma A.4. Let (Xn )n∈N be NED with approximation constants (al )l∈N on an absolutely regular proPn cess (Z ) with mixing coefficients (β(l)) . Moreover, let be a n n∈Z l∈N l=1 l < ∞ and Pn β(l) < ∞. If X is bounded and EX = 0, then for a constant C 1 i l=1 !2 n X E ≤ C · n. Xi i=1 Proof. Because of the stationarity of the Xi we can write !2 n X X E ≤ E |(Xi Xi+k )| Xi i=1 1≤i,k≤n i+k≤n   n X n−i  X k 2 ≤ 4 kX1 k∞ a[ k ] + 2 kX1 k∞ β 3 3 i=1 k=i+1    n X k n 4 kX1 k∞ a[ k ] + 2 kX1 k2∞ β 3 3 (3) ≤ C · n, k=1 where we used Lemma 2.18 of Borovkova et al. (2001) in line 3. Lemma A.5. Let (Xn )n∈N be NED with approximation constants (al )l∈N on an absolutely regular  −δ and process (Zn )n∈Z with mixing coefficients (β(l)) for which holds β(l) = O l l∈N  al = O l−δ−2 for a δ > 1. Moreover let h(x1 , . . . , xm ) be a Lipschitz-continuous kernel with distribution function HF and related density 0 < hF < ∞ and for all 2 ≤ k ≤ m let hF ;X2 ,...,Xk be bounded. Then we have for the Bahadur representation with ξˆp = Hn−1 (p) HF (ξp ) − Hn (ξp ) 1 ξˆp = ξp + + op ( √ ). hF (ξp ) n Proof. √ 1 )−Hn (ξnt ) and Vn (t) = Let us first define t ∈ R, ξnt = ξp + tn− 2 , Zn (t) = n HF (ξnt hF (ξp ) √ HF (ξnt )−Hn (ξ̂p ) n . hF (ξp ) We want to use that |p − Hn (ξˆp )| ≤ 1 to obtain n Vn (t) = √ HF (ξnt ) − p + p − Hn (ξˆnt ) n hF (ξp ) =O(n−1 ) z }| { 1 √ HF (ξp + tn− 2 ) − p √ p − Hn (ξˆp ) + n = n −→ t. hF (ξp ) hF (ξp ) {z } | {z } | =:Vn0 (t) 1 =O(n− 2 ) 32 P The next step is to show that Zn (t) − Zn (0) −→ 0. It is Var(Zn (t) − Zn (0))  X 1 n Var  n  = 2 hF (ξp ) m 1≤i <...<i 1  1h m ≤n 1i h(Xi1 ,...,Xim )≤ξp +tn− 2 − 1[h(Xi 1 ,...,Xim )≤ξp ] To find bounds for the right hand side, we define Un and Un0 by Un = 1 X m =θ+ 1≤i1 <...<im ≤n m   X j=1 Un0 = 1 m j j X = θ0 + X 1[h(Xi m j 1  n j =0 gk0 (Xi1 , . . . , Xik ).  X 1h 1≤i1 <...<im ≤n 1i ξp <h(Xi1 ,...,Xim )≤ξp +tn− 2 i=1   v  u u 1 u + . . . + tVar  n  m v  u u u + tVar   m X 2 g20 (Xi , Xj ) n 2 1≤i<j≤n   X gm (Xi1 , . . . , Xim ) 1≤i1 <...<im ≤n  X  ! n mX (g1 (Xi ) − g10 (Xi )) n m X 2 g2 (Xi , Xj ) n 2 1≤i<j≤n m ,...,Xim )≤ξp ] 1≤i1 <...<ij ≤n =0 v  u u 1 u +tVar  n  1 X v u s s u 0 ≤ Var(θ) + Var(θ ) + tVar | {z } | {z } v  u u u +tVar  gk (Xi1 , . . . , Xik ) 1≤i1 <...<ij ≤n 1≤i1 <...<im ≤n m   X j=1 Therefore, v  u u 1 u tVar  n  1i h(Xi1 ,...,Xim )≤ξp +tn− 2 1  n  n m m 1h  n 0 (X , . . . , X ). gm i1 im 1≤i1 <...<im ≤n 33 . We have already shown in Theorem 2.1, for all 2 ≤ k ≤ m, that    m X gk (Xi1 , . . . , Xik ) = O(n−2+γ ) Var  nk  k 1≤i1 <...<ik ≤n holds for a γ < 1, if the kernel is bounded and satisfies the extended variation condition. Analogous to the proof of Corollary A.1 we can use that g(x1 , . . . , xm ) = 0 1h 1 i and g (x1 , . . . , xm ) = 1 −2 [h(Xi ,...,Xi )≤ξp ] satisfy the extended varih(Xi1 ,...,Xim )≤ξp +tn 1 m ation condition. Applying Lemma A.4 on g1 (Xi ) − g10 (Xi ) we have n X E| (g1 (Xi ) − g10 (Xi ))|2 ≤ Cn. i=1 This is possible since g1 , g10 and f (x, y) = x − y fulfil the variation condition are P∞ P∞ and 0 bounded (f when using bounded arguments). Also l=1 β(l) < ∞ and l=1 al < ∞ because of the assumptions of Lemma A.5. This helps us to gain v   u u X 1 u i tVar  n  1h −1 2 m r ≤ 1≤i1 <...<im ≤n ξp <h(Xi1 ,...,Xim )≤ξp +tn p m2 Cm2 Cn + 2(m − 1) O(n−2+γ ) ≤ √ + 2(m − 1)O(n−1+γ/2 ), 2 n n where the constant C only depends on kg1 (Xi ) − g10 (Xi )k∞ . Then 2 Cm2 −1+γ/2 √ + 2(m − 1)O(n ) n 4m2 (m − 1) √ m2 ≤ 2 C2 + C nO(n−1+γ/2 ) + 4(m − 1)2 O(n−2+γ ) hF (ξp ) h2F (ξp ) n Var(Zn (t) − Zn (0)) ≤ 2 hF (ξp ) ≤  1 m2 4m2 (m − 1) 2 C + CO(n− 2 +γ/2 ) + 4(m − 1)2 O(n−2+γ ). 2 2 hF (ξp ) hF (ξp ) Since |g1 (Xi ) − g10 (Xi )| ≤ 1 for all Xi and P |g1 (Xi ) − g10 (Xi )| −→ 0 the constant C converges to zero in probability and therefore 34 P Var(Zn (t) − Zn (0)) −→ 0. P Applying the Chebychev inequality we then have Zn (t) − Zn (0) −→ 0 . Altogether we have for t ∈ R and every  > 0 √ P( n(ξˆp − ξp ) ≤ t, Zn (0) ≥ t + ) = P(Zn (t) ≤ Vn (t), Zn (0) ≥ t + )   ≤ P(|Zn (t) − Zn (0)| ≥ ) + P(|Vn (t) − t| ≥ ) −→ 0 2 2 and analogously √ P( n(ξˆp − ξp ) ≥ t, Zn (0) ≤ t) −→ 0. Using Lemma 1 of Ghosh (1971) the proof is completed. 35
10math.ST
A NOTE ON THE SUBADDITIVITY OF SYZYGIES arXiv:1602.02116v3 [math.AC] 13 Sep 2016 SABINE EL KHOURY AND HEMA SRINIVASAN Abstract. Let R = S/I be a graded algebra with ti and Ti being the minimal and maximal shifts in the minimal graded free resolution of R at degree i. We prove that tn ≤ t1 + Tn−1 for all n. As a consequence, we show that for Gorenstein algebras of codimension h, the subadditivity of maximal shifts Tn in the minimal graded free resolution holds for n ≥ h − 1, i.e we show that Tn ≤ Ta + Tn−a for n ≥ h − 1. 1. Introduction Let R = S/I be a standard graded algebra, with S a polynomial ring over a field k. Denote by (F, ∂) a minimal graded free resolution of R over S with Fa = ⊕j S(−j)βaj . For each a, denote by Ta (F) and ta (F) the maximal and minimal shifts in the resolution F. In other words, ta (F) = min {j : βaj 6= 0} Ta (F) = max {j : βaj 6= 0} . F is said to satisfy the subadditivity condition for maximal shifts if Ta+b (F) ≤ Ta (F) + Tb (F), for all a and b. If F is the minimal graded free resolution of R over S, then we write ta and Ta for ta (F) and Ta (F). General bounds for Tn in terms of T1 were established for all n, by Bayer-Mumford and Cavigliam−2 Sbarra in [BM] and [CaS]. They prove that Tn ≤ (2T1 )2 − 1 + n where m =rankk S1 . Subadditivity for maximal shifts in minimal graded free resolutions has been studied by many authors [ACI2], [EHU], [HS], [Mc]. Subadditivity for maximal shifts has been established for the highest non vanishing Tor, T orp (R, k). It was shown that Tp ≤ T1 + Tp−1 for all graded algebras where p =projdimR [HS, Corollary 3], and that Tp ≤ Ta + Tp−a when R is of depth zero and of dimension ≤ 1 [EHU, Corollary 4.1]. In [ACI2], Avramov, Conca and Iyengar consider the situation when R = S/I is Koszul and show that Ta+1 (I) ≤ Ta +T1 = Ta +2 for a ≤ height (I). Further, they prove R (k) = 0 and a+b is invertible in k, then T that if S is Cohen-Macaulay, regh+1 a+b ≤ Ta + Tb + 1. a For monomial ideals, Herzog and Srinivasan show that Ta+1 ≤ Ta + T1 , for all a [HS, Corollary 4]. It is known that the minimal graded free resolution of graded algebras may not satisfy the subadditivity for maximal shifts as shown by the counter example in [ACI2]. However, no counter examples are known for monomial ideals. In fact, it can be easily seen that the subadditivity for maximal shifts does hold for algebras generated by stable monomial or square free strongly stable monomial ideals. In this paper, we consider the minimal and maximal degrees of the syzygies and show that for any n we have tn ≤ t1 + Tn−1 . As a consequence, we prove for Gorenstein algebras S/I that Ta+b ≤ Ta + Tb for a + b ≥ s − 1 where s = height I = projdim R. The question remains if the subadditivity for maximal shifts holds for all Gorenstein algebras. It is particularly interesting since the simplest counter example to whether the subadditivity holds, is a codimension four almost complete intersection linked to a codimension four Gorenstein algebra. 1 2 S. EL KHOURY AND H. SRINIVASAN 2. Syzygies of Gorenstein Algebras Let S = k[x1 , . . . , xd ] and I a homogeneous ideal in S. Let F be the minimal graded free resolution of R = S/I ∂ ∂ 2 1 F : 0 → Fs → . . . → F2 −→ F1 −→ S where Fa = ⊕j S(−j)βaj , ta = min {j : βaj 6= 0} and Ta = max {j : βaj 6= 0}. We prove a general result for the syzygies of homogeneous algebras. Theorem 2.1. R = S/I be a graded algebras with ti and Ti being the minimal and maximal shifts in the minimal graded free S-resolution of R at degree i, then tn ≤ t1 + Tn−1 , for all n. Proof. We show the theorem by induction on n, where n is the nth step of the resolution. For n = 1, T0 = 0 and hence t1 = t1 . We need to prove the theorem for 1 < n ≤ s, where ∂ ∂ 2 1 F : 0 → Fs → . . . → F2 −→ F1 −→ S is the graded resolution of R. Let I = (g1 , . . . , gβ1 ) where {g1 , . . . , gβ1 } is a set of minimal generators L i Sfij with t1 =degf11 ≤degf12 ≤ · · · ≤degf1β1 = T1 . Suppose ∂1 (f1j ) = gj and of I and Fi = βj=1 Pβn−1 ∂n (fnt ) = i=1 rti f(n−1)i for all n. We see that Z(f11 , f1β1 ) = g1 f1β1 − gβ1 f11 is a non zero second syzygy. Hence, there exists an element f11 ∗ f1β1 ∈ F2 of degree t1 + T1 . This implies that t2 ≤ T1 + t1 , and the theorem is true for n = 2. Assume we have constructed by induction an element f11 ∗ fn−2i ∈ Fn−1 for all 1 ≤ i ≤ βn−2 such that ∂n−1 (f11 ∗ f(n−2)i ) = ∂1 (f11 )f(n−2)i − f11 ∗ ∂n−2 (f(n−2)i ), and tn−1 ≤ t1 + Tn−2 for 4 ≤ n ≤ s. Let βn−1 f11 ∗ f(n−2)i = X sij f(n−1)j . j=1 We also have ∂n−1 (f(n−1)t ) = Pβn−2 i=1 rti f(n−2)i for all 1 ≤ t ≤ βn−1 . Consider βn−2 βn−1 Z(f11 , fn−1t ) = ∂1 (f11 )fn−1t − X X i=1 j=1 rti sij f(n−1)j . A NOTE ON THE SUBADDITIVITY OF SYZYGIES 3 Z(f11 , fn−1t ) is a cycle in Fn−1 , since βn−2 ∂n−1 (Z(f11 , f(n−1)t )) =∂1 (f11 )∂n−1 (f(n−1)t ) − X βn−1 rti ∂n−1 ( i=1 βn−2 =∂1 (f11 ) X X sij f(n−1)j ) j=1 βn−2 rti f(n−2)i − X rti ∂n−1 (f11 ∗ f(n−2)i ) i=1 i=1 βn−2 = X  ∂1 (f11 )rti f(n−2)i − ∂1 (f11 )rti f(n−2)i + rti f11 ∗ ∂n−2 (f(n−2)i ) i=1 βn−2 = X rti f11 ∗ ∂n−2 (f(n−2)i ) i=1 βn−2 =f11 ∗ ∂n−2 ( X rti f(n−2)i ) i=1  =f11 ∗ ∂n−2 ◦ ∂n−1 (f(n−1)t ) =f11 ∗ 0 =0. Thus, for every t, 1 ≤ t ≤ βn−1 , there exists an element f11 ∗ f(n−1)t ∈ Fn of the same degree as degZ(f11 , f(n−1)t ) that is mapped by ∂n onto Z(f11 , f(n−1)t ). This means there is an element f11 ∗ f(n−1)t ∈ Fn of degree t1 + degf(n−1)t ≤ t1 + Tn−1 such that ∂n (f11 ∗ f(n−1)t ) = Z(f11 , f(n−1)t ). However, the cycles Z(f11 , fn−1t ) can be zero for all t! For that, we show that there is at least one t such that one of the cycles Z(f11 , fn−1t ) is not identically zero. Pβn−2 Pβn−1 Suppose that Z(f11 , fn−1t ) = 0 for all t, then ∂1 (f11 )fn−1t = i=1 j=1 rti sij fn−1j . So for all t, we have ( βn−2 βn−1 X X 0 j 6= t rti sij = ∂1 (f11 ) j = t. i=1 j=1 By setting r̄ = r̄n−1 = (rti )βn−1 ×βn−2 and s̄ = (sij )βn−2 ×βn−1 , we get r̄s̄ = ∂1 (f11 )I and hence the rank r̄n−1 s̄ = βn−1 . By the exactness of the resolution, we have rank r̄n + rank r̄n−1 = βn−1 where r̄n is the matrix representing ∂n . Since ∂n 6= 0, this implies that rank r̄n−1 < βn−1 which is a contradiction. Hence, there exists a non zero cycle in Fn−1 , and we get tn ≤ t1 + Tn−1 .  The following remark is an easy consequence of the duality of the minimal graded free resolution for Gorenstein algebras. Remark 2.2. If R = S/I is a Gorenstein algebra, with height I = h, then Th ≤ T a + Th−a . Since c = Th = th , then by the duality of the minimal graded free resolution F we get c − th−a = Ta for all a = 1, · · · h − 1. This implies that c = Ta + th−a ≤ Ta + Th−a . Theorem 2.3. For any graded Gorenstein algebra S/I of codimension h, we have Th−1 ≤ Ta + Th−1−a . Thus, Tn ≤ Ta + Tn−a for n ≥ h − 1. 4 S. EL KHOURY AND H. SRINIVASAN Proof. Since S/I is Gorenstein, then Th−1 = Th − t1 and Th−1−a = Th − ta+1 . So, Th−a−1 = Th − ta+1 ≥ Th − (t1 + Ta ) by theorem 2.1. So, Th−a−1 ≥ Th − t1 − Ta = Th−1 − Ta and hence Th−1 ≤ Ta + Th−a−1 as desired.  Definition 2.4. A minimal graded free resolution is said to be pure if, for all a, Fa is generated in one degree. Hence the minimal graded free resolution is pure if it has the following shape ∂ ∂ 2 1 F : 0 → S(−js )βs → . . . → S(−j2 )β2 −→ S(−j1 )β1 −→ S Corollary 2.5. For any graded algebra S/I with a pure resolution, we get Tn ≤ T1 + Tn−1 . Proof. When the resolution is pure we have ta = Ta for all a, and hence by theorem 2.1 we get the result.  Remark 2.6. As a consequence, if S/I is a Gorenstein pure algebra of codimension 4 or 5, then its minimal graded free resolution satisfies the subadditivity condition. Remark 2.7. As the following three examples show, the inequality can be tight even for codimension four Gorenstein algebras with pure resolutions. Example 2.8. Let S = k[x, y, z, w] and I = (w2 , z 2 , y 2 − wz, wx2 , x2 z, x2 y + wyz, x3 + wxz + wyz) a height four Gorenstein ideal. We have T4 = 8, T3 = 6 T2 = 4 and T1 = 3. We get T4 = 2T2 ≤ T3 + T1 and T3 ≤ T2 + T1 .  Example 2.9. Let S = k[x, y, z, w] and I = (w3 , w2 z, w2 y, wz 2 , wyz −w2 x, wy 2 , z 3 +wxy, yz 2 , xz 2 , y 2 z, xyz − wx2 , x2 z, y 3 − 2wxz, xy 2 , x2 y + w2 x, x3 + wxz − w2 x) a height four Gorenstein ideal generated in degree three and having a pure resolution. Then the minimal graded free resolution of S/I satisfies the subadditivity condition. We have T4 = 8, T3 = 5, T2 = 4 and T1 = 3. Then we get T4 = 2T2 = T3 + T1 , T3 ≤ T2 + T1 and T2 ≤ 2T1 .  Example 2.10. Let S = k[x, y, z, w, r, s, t] and I = (rt, tz, ty − st, tx, sw − s2 , sz, sy, sx, rw − st − t2 , rz, yr + tw, rx − s2 , w2 + st, wz, wy − s2 , wx, yz − z 2 + r2 + rs + tw − st − t2 , xz − rs − tw + st + t2 , y 2 , xy − z 2 − r2 + rs + tw − st − t2 , x2 + rs + tw − st − t2 ) a height seven Gorenstein ideal with T7 = 10, T6 = 8, T5 = 7, T4 = 6, T3 = 5, T2 = 3 and T1 = 2. Then we get T7 = T6 + T1 = T5 + T2 ≤ T4 + T3 and T6 ≤ T5 + T1 = T4 + T2 ≤ 2T3 .  References [ACI1] [ACI2] [BM] [EHU] [FG] [CaS] [HS] [Mc] L.L. Avramov, A. Conca, and S. B. Iyengar, Free resolutions over commutative Koszul algebras, Math. Res. Lett. 17 (2010), no. 2, 197–210. L.L. Avramov, A. Conca, and S. B. Iyengar, Subadditivity of Syzygies of Koszul algebras, Math. Ann. 361 (2015), no. 1-2, 511–534. 1 D. Bayer, D. Mumford, What can be computed in algebraic geometry?, in Computational Algebraic Geometry and Commutative Algebra (Cortona, 1991), Sympos. Math., vol. XXXIV (Cambridge University Press, Cambridge, 1993), pp. 1–48 1 D. Eisenbud, C. Huneke and B. Ulrich, The regularity of Tor and graded Betti numbers, Amer. J. Math. 128 (2006), no. 3, 573–605. 1 O. Fernändez-Ramos, P. Gimenez, Regularity 3 in edge ideals associated to bipartite graphs, J. Algebraic Combin. 39 (2014), no. 4, 919–937. G. Caviglia, E. Sbarra, Characteristic-free bounds for the Castelnuovo-Mumford regularity, Compos. Math. 141(6) (2005), 1365–1373 . 1 J. Herzog, H. Srinivasan, A note on the subadditivity problem for maximal shifts in free resolutions, Preprint 2013, arXiv:1303.6214. 1 J. McCullough, A polynomial bound on the regularity of an ideal in terms of half the syzygies, Math. Res. Lett. 19 (2012), no. 3, 555–565 1 A NOTE ON THE SUBADDITIVITY OF SYZYGIES Department of Mathematics, American University of Beirut, Beirut, Lebanon. E-mail address: [email protected] Department of Mathematics, University of Missouri, Columbia, Missouri-65211, USA. E-mail address: [email protected] 5
0math.AC
UNSUPERVISED DOMAIN ADAPTATION WITH COPULA MODELS Cuong D. Tran1, Ognjen (Oggi) Rudovic2 , Vladimir Pavlovic1 arXiv:1710.00018v1 [cs.LG] 29 Sep 2017 1 Department of Computer Science, Rutgers University, Piscataway, NJ, USA 2 MIT Media Lab, Cambridge, MA, USA {cuong.tran,vladimir}@cs.rutgers.edu, [email protected] ABSTRACT We study the task of unsupervised domain adaptation, where no labeled data from the target domain is provided during training time. To deal with the potential discrepancy between the source and target distributions, both in features and labels, we exploit a copula-based regression framework. The benefits of this approach are two-fold: (a) it allows us to model a broader range of conditional predictive densities beyond the common exponential family; (b) we show how to leverage Sklar’s theorem, the essence of the copula formulation relating the joint density to the copula dependency functions, to find effective feature mappings that mitigate the domain mismatch. By transforming the data to a copula domain, we show on a number of benchmark datasets (including human emotion estimation), and using different regression models for prediction, that we can achieve a more robust and accurate estimation of target labels, compared to recently proposed feature transformation (adaptation) methods. Index Terms— Domain adaptation, copula, emotion estimation, valence, arousal. 1. INTRODUCTION Domain adaptation is a key task in machine learning, in which one tries to learn a predictive model for a target domain by exploiting labeled data from different but related domains (often called the source domains). This approach is of critical importance when the number of labeled data in the target domain is limited and the process of labeling, necessary to create target-specific models, is expensive and slow. A simple solution of training a target model using only the source domains (e.g., applying the source model on the target) is, however, bound not to perform well due to the differences in the data distributions between the two domains (e.g., two subjects in emotion modeling tasks). Thus, by jointly learning from the scarce target and abundant source data, we can design an adaptation scheme from the source to target data, resulting in target-specific predictive models. These are expected to perform better when applied to the task-specific target domains, compared to generic (not adapted) models. Existing domain adaptation works focus on two main strategies: an instance-based approach or a feature-based strategy. Instance-based strategies leverage a common assumption of covariate shift, i.e., that the underlying conditional density of outputs given covariates remains the same between two domains. Based on that assumption, to correct the bias of the training source samples one re-weights each instance by a ratio of the target input density over the source input density [1, 2, 3]. On the other hand, featurebased domain adaptation methods, c.f., [4], aim to construct domain-specific mappings (features) of the inputs across the domains that are most relevant for prediction in the target domain, implicitly assigning different contribution to samples from the two domains. While these approaches have proven to be effective, they require that samples in both source and the target domain be labeled. To avoid the requirement for labeled target data, unsupervised domain adaptation with feature-transformation is employed. The premise of the approaches in this context is that to reduce the dis-similarity between the domains one must learn the transformed input features invariant across domains, making the samples from different domains similar (i.e., aligned) to each other in density but still allowing the transformed samples to accurately predict labels on the labeled source domain [5, 6]. A simple measure of dis-similarity between the input samples from different domains uses the squared loss between covariance matrices from two domains, as in the CORAL [7] approach. Surprisingly, this simple method outperformed many prior competitive approaches on challenging object recognition tasks. However, for the adaptation, CORAL considers only second-order statistics, which could be difficult to estimate reliably from high-dimensional input data - which we address using the copula functions. A common challenge faced by domain adaptation approaches is how to efficiently represent, and then align, the multivariate distributions across different domains. This task depends on the joint density of the inputs x1 , . . . , xD and output y, p(x1 , . . . , xD , y), which simultaneously and indistinguishably encode the multivariate dependency among factors and the priors/marginals in each factor, p(xi ), i = 1, . . . , D and p(y). Instead of considering this typical joint represen- tation, it may be more beneficial to consider a representation of joint dependencies that separates the notion of dependency among variables from their marginal distributions, which may differ across domains. The notion of Copula functions [8] is a powerful statistical tool that allows us to decompose such distributions into a product of marginal distribution for each dimension and a copula function, p(x1 , . . . , xd , y) = Q p(y) D i=1 pi (xi )c(F1 (x1 ), . . . , FD (xD ), Fy (y)), where Fi (·) denote the marginal cumulative distribution functions (CDFs). The copula function c(·, . . . , ·) encodes the essential, marginalfree, dependence among variables. For instance, using this idea, [9] proposed to augment the target model by exploiting the similarity between each component of target and source domain, including the marginals and the copula. However, this approach still requires some labeled target data during the training process. In case when no labeled target data are given, an alternative approach is to align the copula densities [10], thus, entirely discarding the source labels. However, that feature transformation is bound to perform inadequately on many practical problems, as will be demonstrated here, because it fails to make use of the valuable source data labels. We propose a novel domain adaptation framework using the copula representation that can alleviate the aforementioned issues. In particular, our proposed domain adaptation approach, based on copulas for the regression task, has the following benefits: • The copula-based regression can represent more complicated conditional density relationships than a simple multivariate Gaussian, often assumed by existing approaches. • The copula-based feature transformation can match input data from two domains more closely than the frequently used affine transformation on raw input features, without the need for labeled target data. We show that this proposed approach outperforms other unsupervised domain adaptation techniques on several benchmark datasets. We do so on a challenging task of predicting emotional responses of different subjects as a prototypical domain adaptation paradigm. The domains in that context represent different subjects and the task is to adapt the models trained on a subset of subjects, whose emotional responses have been labeled by expert annotators, to other subjects where no labeled data is available. The subject specificity of emotional responses is the key challenge, which we address using the proposed unsupervised domain adaptation approach. The paper is organized as follows. In Sec. 2, we first provide a brief introduction to copulas and a regression model based on copulas. Then, we introduce our domain adaptation model in Sec. 3. Experimental results that demonstrate the utility of the proposed approach on real datasets are reported in Sec. 4. 2. PROBLEM FORMULATION The setting of unsupervised domain adaptation consists of data from two related but not identical domains: the source and target domain. We are interested in learning a regression model that can predict well on the target domain. During training, we are given a set of nS labeled source samples {XS , yS } ∼ pS (x, y) and a set of nT unlabeled target data XT ∼ pT (x). The goal here is to use all labeled source and unlabeled target samples to build an adapted model MS→T that predicts the true outcome yT∗ on some target input data XT∗ . In most cases, the dataset shift pT (x, y) 6= pS (x, y) leads to the model trained on only the source data to underperform on the target domain. One of the main reasons for this is the gap between the input distributions pT (x) 6= pS (x), i.e., the covariate shift. Thus, to obtain an accurate adapted model MS→T , one needs first to reduce that gap, while making sure that this does not affect adversely the model’s predictive performance. In what follows, we briefly introduce the notion of copula functions and then demonstrate how the aforementioned task can be accomplished using this approach. 2.1. Copulas Given a set of D input variables {xi }D i=1 and an output variable y with associated CDF: F1 , . . . , FD , Fy , Sklar’s theorem [8] states that: ∃ C : [0, 1]D+1 → [0, 1] s.t : F (x1 , . . . , xD , y) = C(F1 (x1 ), . . . , FD (xD ), Fy (y)) (1) where F (x1 , . . . , xD , y) is the joint CDF and the function C is called a copula. Then, C is unique iff xi , i = 1, 2, . . . , D and y are continuous random variables [11]. Under this assumption, one can relate the joint density probability function (PDF) of y and xi with the copula density c as follows: p(x1 , . . . , xD , y) = c(F1 (x1 ), . . . , FD (xD ), Fy (y)) · p(y) D Y pi (xi ) (2) i=1 = c(u1 , . . . , uD , v) · p(Fy−1 (v)) D Y pi (Fi−1 (ui )), (3) i=1 where ui = Fi (xi ); zi = Φ−1 (ui ); ∀i and v = Fy (y); w = Φ−1 (v). Eq. 2 suggests that the joint PDF can be decomposed using two sets of factors: independent marginals pi (xi ), p(y) and a copula density function c(u1 , . . . , uD , v) = ∂ D+1 C(u1 ,...,uD ,v) that models the essential dependency ∂u1 ···∂uD ∂v among variables, regardless of their marginal densities. Different forms of C determine different copula models. Typically, C are parameterized using a small set of parameters, forming the family of Archimedean copulas, c.f., [11]. 3.2. The distance function D Another possibility is to assume that 1 1 c(u1 , . . . , uD , v|R) = |R|− 2 e− 2 τ T (R−1 −I)τ , (4) which defines the family of Gaussian copulas. Here R is the correlation matrix capturing the dependency among target variables, I is the unit matrix, and τ = [z1 , . . . , zD , w]T . R can easily be estimated from data samples using maximum likelihood estimation [12]. 3. DOMAIN ADAPTATION WITH GAUSSIAN COPULA MODELS Our goal is to learn the target and source feature mappings, φT (x)andφS (x), respectively, that satisfy two conditions: (1) they should minimize dissimilarity between the two domains, (2) the transformed (common) features φS (x) should retain the most discriminative information regarding y. Formally, this can be written as the following optimization problem: minφT (.),φS (.) D(φT (XT ); φS (XS )) + λ · g(yS ; φS (XS )), (5) where D is a distance function that measures the difference between probability measures how well the transformed input data explains the outputs. Since we do not have access to any labeled target data, we use yS ; φS (XS ) to measure the correlation between output and input, where λ > 0 is a regularization parameter. Details of mapping functions φT (.), φS (.), distribution distance function D and function g are given in what follows. 3.1. Mapping functions Let us consider the following domain specific mapping functions: target (ZT = Φ−1 (FT (XT ))), and source (ZS = Φ−1 (FS (XS ))). If we assume that XT and XS follow a Gaussian copula density, then transformed features ZT , ZS are multivariate Gaussians. Remember also that when the copulas of x are Gaussian, the joint distribution over input p(x) might not be Gaussian. Therefore, assuming a Gaussian copulas is not restricted to the input distributions. At this point, one might be interested in mapping two Gaussians by learning a common subspace so that the Gaussian samples can easily be matched (see Sec. 3.2). To this end, we define the following feature mapping: φT (x) = W T Φ−1 (FT (x)) φS (x) = W T Φ−1 (FS (x)) D×p Where W ∈ R (D ≥ p) is an orthogonal matrix, i.e W T W = I that defines the common subspace between ZT and ZS . Under Gaussian copula assumption on both domains, ZT , ZS are multivariate Gaussian with the same zero mean. Let their correlation matrices be RT , RS , respectively. As a result, W T ZT and W T ZS are Gaussians with the same zero mean, and correlation matrices: W T RT W and W T RS W , respectively. The problem turns out to be the second order matching between the two multivariate Gaussians that have the same mean. One possible solution for Gaussian alignment is based on the KL divergence, as proposed in [10]. Yet, the KL divergence is asymmetric, and it is also sensitive to outliers because it involves the ratio of two densities, [13]. To avoid these issues, we use the Stein divergence [14], DS , between the covariance matrices, W T ZT and W T ZS , which is given by:   T T T T DS NT (W z|0; W RT W ), NS (W z|0; W RS W ) = log det − W T RT W + W T RS W  2 1 log det(W T RT W )(W T RS W ). (6) 2 Because we apply the Gaussian copula transformation to the input features, the second order statistics become the only necessary stats, and then we only need to consider some distance between Gaussian densities. 3.3. The alignment function g To make sure that, under the Copula transformation, the input features still can explain well the output, we require the mutual information (MI) between the output and transformed inputs to be maximized. The MI is used as a measure of dependency between random variables, and maximizing the MI between input and output variables is equivalent to minimizing the Bayes error [15]. The MI between the output y and input features x is defined as M I(x, y) = Z Z p(x, y) log p(x; y) dxdy p(x)p(y) (7) However, MI can be sensitive to outliers [16]. Furthermore, since it involves the density ratio, it can go to infinity when either p(x) or p(y) is close to zero. Therefore, instead of maximizing the MI, we can maximize its lower bound, called the quadratic mutual information (QMI) [16]: Z Z 2 p(x, y) − p(x)p(y) dxdy. (8) QM I(x, y) = The empirical estimation of QM I(x, y) [17] using a set of drawn samples {xi , yi }ni=1 is given by: QM I(x, y) ≈ 1 trace(Kx LKy L), n2 (9) where Kx is the kernel matrix between input features, Ky is the kernel matrix between outputs, and L = I − n1 eeT is a constant centering matrix. Note that since in our model no labeled target data is given during feature learning we can only maximize the QMI between transformed source input features and source outputs. [7] and the Copula-based Transformation (CT) [10]. We evaluate these adaptation approaches by applying the abovementioned regression models to the features adapted using the introduced transformations (CORAL, CT and the proposed copula-based DA). We also compare the performance of the NPRV model under the unsupervised domain adaptation setting (UNPRV) [9]. 3.4. Overall optimization problem Using the mapping function (Sec.3.1), the Stein distance (Sec.3.2), and the QMI between yS and W T ZS (Sec.3.3), we obtain the following objective:   T W RT W + W T RS W − min F (W ) = log det W 2  1 log det W T RT W W T RS W −λ·trace(Ky LK W T z L) 2 s.t W T W = I (10) The orthogonal constraint over W ensures that the projected data from two domains lie on a common subspace defined by W . We employ the ManOpt toolbox [18] for the optimization problem above. After we obtain W ∗ , we can train various regression models on the transformed features {W∗T ZS , yS }. Then, the learned models will be used to predict the label of unseen transformed target samples, i.e {W∗T ZT∗ }. The proposed domain adaptation framework is summarized in Alg.1. Algorithm 1 Unsupervised domain adaptation with Copula Input: XS , yS , XT and testing point XT∗ Output: Prediction yT∗ of XT∗ Step1: Compute ZT = Φ−1 (FT (XT )); ZS = Φ−1 (FS (XS )) and RT = cov(ZT ); RS = cov(ZS ). Step 2: Solve the optimization problem in Eq. 10 to obtain W∗ . Step 3: Compute the transformed features W∗T ZS and W∗T ZT∗ . Step 4: Learn a regression model using {W∗T ZS , yS } and apply the models to predict yT∗ of W∗T ZT∗ . 4.1. UCI datasets We consider here the wine quality, the airfoil self-noise and the Parkinsons telemonitoring dataset [19]. We partitioned each dataset into source/target domain as follows: • Wine quality: The source domain consists of only red wines, while the target domains of only white wines. • Airfoil noise: We picked the second feature and computed its median over the whole dataset. The data points that have their second feature value smaller than that median will belong to the source and the rest belongs to the target domain. • Parkinson telemonitoring: The source domain consists of male patients only, while the target domain contains female patients only. The task here is to predict the total UPDRS scores for female records. To optimize the hyper-parameters p, λ, we randomly selected 20% of the training source samples and used them as the validation set. We chose the optimal p∗ , λ∗ that minimize the normalized mean squared error (NMSE) over the validation set. We then evaluated the learned models over the target testing data. Tab. 1 shows the average NMSE over 10 trials of all models. The last row of Tab. 1 indicates the average rank of each model over three datasets. Here the best model has the rank of 1, the second best the rank of 2 and so on. We report the average rank over the 2 datasets. Based on the ranks obtained, it is clear that the proposed (adapted) models - DA-GPR and DA-CR - can significantly improve the base regressors GPR and GCR, respectively, while outperforming the related feature adaptation approaches.2 4. EXPERIMENTS In this section, we first study the behavior of our proposed domain adaptation methods over several publicly available UCI datasets [19]. Subsequently, we highlight the benefits of the proposed method on the continuous emotion estimation tasks. For comparisons, we consider three baseline regression methods trained using only the source data: Gaussian Process Regression (GPR)[20], Gaussian Copula Regression (GCR) [21], and Non-parametric Regular Vines (NPRV) [9]1 . To compare the adaptation performance, we use two recently proposed feature transformation techniques: CORAL 1 In all kernel-based methods, we employ the radial basis function kernel. 4.2. Human emotion estimation In the next experiment, we evaluate the proposed methods on the more challenging real-world data for the task of human emotion estimation (continuous valence and arousal dimensions) from the audio-visual recordings. Specifically, we employ the 2016 AVEC RECOLA database (db) [22]. This db consists of 27 people performing different collaboration tasks in a video conference. The videos are annotated by 6 annotators in terms of valence and arousal levels (continuous 2 We do not report the CORAL-GP as it was consistently outperformed by CORAL-GCR on all tasks. Table 1. Comparison among models over the UCI datasets. Red indicates the best result, followed by the second best in blue. All models were evaluated based on NMSE values, the lower is the better. Wine Airfoil Noise Parkinsons Av.Rank GPR GCR CT-GPR CT-GCR NPRV UNPRV CORAL-GCR DA-GPR DA-GCR 1.49 (0.58) 1.25(0.10) 1.59 (0.02) 1.81(0.27) 0.70(0.02) 1.41 (0.05) 0.93(0.03) 0.70(0.08) 1.44(0.04) 0.90(0.04) 0.65(0.04) 1.18(0.04) 0.84(0.07) 1.12(0.03) 1.46(0.11 ) 0.85(0.07) 1.12(0.03) 1.21(0.03) 1.04(0.04) 0.96(0.09) 3.52(0.29) 0.88(0.05) 0.52 (0.08) 1.47 (0.09) 0.87(0.05) 0.56 (0.03) 1.13 (0.07) 8.3 5.8 5.2 3.3 4.8 4.2 7.3 4.0 2.0 over time), used to obtain the gold standard, and which we consider as output in our model. We employ the audio and video features provided by the db creators, as these features have been shown to be the good predictors of target outputs [22]. As this data is part of the challenge, no ground-truth labels for the test partition are given. Thus, in our experiments, we use the data of 18 subjects from the training and development partitions as follows. We perform 3-fold personindependent cross-validation (6 train, 6 validation and 6 test subjects). As the evaluation measure, we use the concordance correlation coefficient (CCC) between the predicted output ŷ and the ground-truth y, which is given by [22]: CCC(ŷ; y) = 2cov(ŷ; y) (11) var(ŷ) + var(y)) + (E(ŷ) − E(y))2 Because we use non-parametric regression models, to speed up the computations, we randomly subsample 2000 training data from the source. We used these training data to learn the optimal feature transformations in the proposed DA, as well as CORAL and CT approaches. For our approach, we also used 2000 data from the validation set to optimize the model hyper-parameters, i.e p and λ while learning the feature transformation. The optimal hyper-parameters are then employed to evaluate, e.g., DA-GCR, over randomly selected 2000 testing points (again to avoid computational complexity of the models). However, to avoid the bias in the data used for evaluation, this procedure was repeated 10 times and the average CCC values with their standard deviation are reported. We report the performance of all models based on their predictive abilities for arousal/valence in Tab.2-3. The last row of each table is the average rank of each model. Based on those rankings, our proposed models DA-GCR and DA-GPR outperformed their counterparts and the compared feature adaptation schemes. This evidences that our novel feature mapping not only helps to reduce the dissimilarity between two domains but also retains the most discriminative information for the regression task. The compared domain adaptation models, CORAL and CT, in most cases did not improve GCR and GPR, but even downgraded them. We attribute this to the fact that CORAL considers only the second-order matching of distributions but assuming that the input features have Gaussian distribution, which is violated in most real-world datasets. By contrast, the proposed DA based on copulas makes this assumption only in the copula subspace (and not in the input space), where the input features are transformed so as to have Gaussian distribution. Therefore, minimizing the distribution mismatch using the second order moments via Stein distance is sufficient, resulting in more robust feature subspace for the regression task. On the other hand, in contrast to our copula-based DA approach, the standard copula transformation (CT) does not exploit the source labels during the feature learning, thus, failing to learn discriminative features. As evidenced by our results, this turns out to be of significant importance for the performance by the target regression models. Likewise, the UNPRV also fails to leverage the labels from the source domain during the feature adaptation, resulting in suboptimal features for the regression models. Finally, by comparing the performance obtained by DA-GP and DA-GCR, we note that the latter performs better in most cases. This is in part due to the fact that the copula-based regression models not only the relationships between the input features and the output, but also accounts for feature dependencies via the copula functions - resulting, in these adaptation tasks, in more robust regression model than GPs. 5. CONCLUSIONS We proposed a novel domain adaptation framework based on copula functions. Compared to existing feature transformation methods for domain adaptation, the two main advantages of our approach are that it does not assume Gaussian distribution in the input features, and that it exploits the source labels during the adaptation of the source to target features. As we showed in experiments on several benchmark datasets for domain adaptation and a real-world dataset for human emotion estimation, our adaptation approach can lead to significant performance improvements over existing methods. 6. ACKNOWLEDGMENTS The work of O. Rudovic is funded by the European Union H2020, Marie Curie Action - Individual Fellowship no. 701236 (EngageMe). The work of V. Pavlovic is funded by the National Science Foundation under Grant no. IIS1555408. Table 2. Comparison among models for prediction of arousal using different modality features: audio (Audio), video appearance (V-A), and video geometry (V-G). Red indicates the best result, followed by the second best in blue based on CCC. Arousal Audio V-A V-G Av.Rank GPR GCR CT-GPR CT-GCR NPRV UNPRV CORAL-GCR DA-GPR DA-GCR 0.496(0.01) 0.388(0.01) 0.322(0.01) 0.644(0.01) 0.306(0.02) 0.227(0.02) 0.573(0.02) 0.336(0.02) 0.241(0.02) 0.545(0.02) 0.301(0.02) 0.175(0.02) 0.595 (0.01) 0.135(0.01) 0.131(0.02) 0.595(0.01) 0.135(0.01) 0.020(0.002) 0.532(0.02) 0.316(0.02) 0.231(0.02) 0.625(0.02) 0.387(0.01) 0.287(0.03) 0.670(0.01) 0.368(0.03) 0.239(0.02) 3.7 4.7 4.3 7.0 7.0 7.3 6.0 2.3 2.7 Table 3. Comparison among models for prediction of valence using different modality features: audio (Audio), video appearance (V-A), and video geometry (V-G). Red indicates the best result, followed by the second best in blue based on CCC. Valence Audio V-A V-G Av.Rank GPR GCR CT-GPR CT-GCR NPRV UNPRV CORAL-GCR DA-GPR DA-GCR 0.315 (0.02) 0.412 (0.01) 0.337 (0.01) 0.366(0.02) 0.353(0.02) 0.465(0.02) 0.262(0.02) 0.437(0.01) 0.173 (0.01) 0.302(0.03) 0.356( 0.02) 0.348(0.02) 0.25(0.01 ) 0.120 (0.02) 0.083(0.01) 0.25(0.01) 0.124(0.02) 0.009 (0.01) 0.365(0.03) 0.378(0.02) 0.326 (0.1) 0.206 (0.02) 0.478(0.02) 0.600 (0.01) 0.373 (0.03) 0.421 (0.02) 0.566 (0.01) 4.3 4.0 5.0 5.0 8.5 7.8 4.7 3.7 2.0 7. REFERENCES [1] S. Hido T. Kanamori and M. Sugiyama, “Efficient direct density ratio estimation for non-stationarity adaptation and outlier detection,” in NIPS, 2008, pp. 809–816. [2] H. Shimodaira, “Improving predictive inference under covariate shift by weighting the log-likelihood function,” Journal of Statistical Planning and Inference, vol. 90, no. 2, pp. 227 – 244, 2000. [3] M. Sugiyama M. Yamada and T.Matsui, “Covariate shift adaptation for semi-supervised speaker identification,” in ICASSP, 2009, pp. 1661–1664. [4] H. Daumé, III, Abhishek K., and A. Saha, “Frustratingly easy semi-supervised domain adaptation,” in DANLP, 2010, pp. 53– 59. [5] M. Baktashmotlagh, M. T. Harandi, B. C. Lovell, and M.u Salzmann, “Unsupervised domain adaptation by domain invariant projection,” in ICCV, 2013, pp. 769–776. [6] S. J. Pan, I. W. Tsang, J. T. Kwok, and Q. Yang, “Domain adaptation via transfer component analysis,” IEEE Trans. Neural Networks, vol. 22, no. 2, pp. 199–210, 2011. [7] B. Sun, J. Feng, and K. Saenko, “Return of frustratingly easy domain adaptation,” CoRR, vol. abs/1511.05547, 2015. [8] A. Sklar, “Random variables, joint distribution functions, and copulas,” Kybernetika, vol. 9, no. 6, pp. 449–460, 1973. [9] D. Lopez-Paz, J. M. Hernández- Lobato, and B. Schölkopf, “Semi-supervised domain adaptation with non-parametric copulas,” CoRR, vol. abs/1301.0142, 2013. [10] A. Bayestehtashk, I.Shafran, and A. Babaeian, “Robust speech recognition using multivariate copula models.,” in ICASSP, 2016, pp. 5890–5894. [11] Roger B. Nelsen, An Introduction to Copulas (Springer Series in Statistics), Springer-Verlag New York, Inc., Secaucus, NJ, USA, 2006. [12] B. Choroś, R. Ibragimov, and E. Permiakova, “Copula estimation,” in Copula theory and its applications, pp. 77–91. Springer, 2010. [13] K. T. Moustafa and F. P. Ferrie, “A note on metric properties for some divergence measures: The gaussian case,” in ACML, 2012, pp. 1–15. [14] S. Herath, M. T. Harandi, and F. Porikli, “Learning an invariant hilbert space for domain adaptation,” CoRR, vol. abs/1611.08350, 2016. [15] R. Fano and D. Hawkins, “Transmission of information: A statistical theory of communications,” American Journal of Physics, vol. 29, no. 11, pp. 793–794, 1961. [16] K. Torkkola, “Feature extraction by non parametric mutual information maximization,” JMLR, vol. 3, pp. 1415–1438, Mar. 2003. [17] A. Gretton, K. Fukumizu, CH. Teo, L. Song, B. Schölkopf, and A. J. Smola, “A kernel statistical test of independence,” in NIPS, pp. 585–592, Sept. 2008. [18] N. Boumal, B. Mishra, P.-A. Absil, and R. Sepulchre, “Manopt, a Matlab toolbox for optimization on manifolds,” JMLR, vol. 15, pp. 1455–1459, 2014. [19] M. Lichman, “UCI machine learning repository,” 2013. [20] C. E. Rasmussen and C. K. I. William, Gaussian Processes for Machine Learning, The MIT Press, 2005. [21] W. Y. Wang and Z. Hua, “A semiparametric gaussian copula regression model for predicting financial risks from earnings calls,” in ACL, 2014, pp. 1155–1165. [22] M. F. Valstar, J. Gratch, B. W. Schuller, F. Ringeval, ..., and M. Pantic, “AVEC 2016: Depression, mood, and emotion recognition workshop and challenge,” in AVEC@MM 2016, 2016, pp. 3–10.
1cs.CV
Localization in internets of mobile agents: A linear approach Sam Safavi, Student Member, IEEE, Usman A. Khan, Senior Member, IEEE, arXiv:1802.04345v1 [cs.SY] 12 Feb 2018 Soummya Kar, Member, IEEE, and José M. F. Moura, Fellow, IEEE Abstract Fifth generation (5G) networks providing much higher bandwidth and faster data rates will allow connecting vast number of static and mobile devices, sensors, agents, users, machines, and vehicles, supporting Internet-of-Things (IoT), real-time dynamic networks of mobile things. Positioning and location awareness will become increasingly important, enabling deployment of new services and contributing to significantly improving the overall performance of the 5G system. Many of the currently talked about solutions to positioning in 5G are centralized, mostly requiring direct line-of-sight (LoS) to deployed access nodes or anchors at the same time, which in turn requires high-density deployments of anchors. But these LoS and centralized positioning solutions may become unwieldy as the number of users and devices continues to grow without limit in sight. As an alternative to the centralized solutions, this paper discusses distributed localization in a 5G enabled IoT environment where many low power devices, users, or agents are to locate themselves without global or LoS access to anchors. Even though positioning is essentially a non-linear problem (solving circle equations by trilateration or triangulation), we discuss a cooperative linear distributed iterative solution with only local measurements, communication and computation needed at each agent. Linearity is obtained by reparametrization of the agent location through barycentric coordinate representations based on local neighborhood geometry that may be computed in terms of certain Cayley-Menger determinants involving relative local inter-agent distance measurements. After a brief introduction to the localization problem, and other available distributed solutions primarily based on directly addressing the non-linear formulation, we present the distributed linear solution for static agent networks and study its convergence, its robustness to noise, and extensions to mobile scenarios, in which agents, users, and (possibly) anchors are dynamic. Sam Safavi and Usman A. Khan are with the Department of Electrical and Computer Engineering, Tufts University, 161 College Ave, Medford, MA 02155, USA, {sam.safavi@,khan@ece.}tufts.edu. Soummya Kar and José M. F. Moura are with the Department of Electrical and Computer Engineering, Carnegie Mellon University, Pittsburgh, PA 15213, USA, {soummyak,moura}@andrew.cmu.edu. This work was supported in part by a National Science Foundation (NSF) CAREER award CCF-1350264 and in part by NSF under grants CCF-1513936 and ECCS-1408222. 2 I. I NTRODUCTION With fifth generation (5G) technologies looming in the horizon, there is a potential for networking vast numbers of heterogeneous devices, the Internet-of-Things (IoT), not only of static devices, but also of moving objects, users, or vehicles [1]–[7]. Location-awareness, providing the physical location of every static or moving object or agent, will enhance the ability to deploy new services and better management of the overall 5G system. Beyond these, location-aware technologies can also enable a variety of other applications from precision agriculture [8], to intruder detection [9], health care [10], asset tracking, ocean data acquisition [11], or emergency services [12]. For example, location information is essential in providing an effective response in disasters such as fire rescue situations. Other relevant applications include military sensing [13], physical security, industrial and manufacturing automation, and robotics [14]. In addition, localization is essential in randomly deployed networks, where manual positioning of objects is not practical, and the location of network nodes may change during run-time. In many scenarios, instrumenting devices with GPS adds to cost and power requirements, reducing the service life of battery-driven devices. Further, GPS receivers are inaccessible in indoor applications, are not effective in harsh environments, and are not sufficiently robust to jamming in military applications [15]. We consider here efficient and low-cost localization algorithms that do not require GPS nor direct access to base station. The solutions to localization, in general, consist of two phases: acquiring measurements and transforming them into coordinate information [16]. In the first phase, nodes1 collect measurements and exchange information with other network entities, including neighboring agents, anchors, or a combination of these. As we discuss in Section III, the most common measurement techniques include Received Signal Strength (RSS), Time of Arrival (ToA), Time Difference of Arrival (TDoA), and Direction of Arrival (DoA). In the second phase, the information and measurements acquired are aggregated and used as inputs to a localization algorithm [12]. The nature of the localization solution, i.e., whether centralized or distributed, depends on what types of measurements (such as estimates of relative distance between neighboring nodes or distance to possibly distant anchors) are acquired and how the measurements and exchanged information are processed, for instance, whether by a central entity or in a distributed fashion using local computing at the nodes. 1 The terminology node is being used in a generic sense here to denote network entities such as users, agents, anchors. The precise meaning and context will be clear from the mathematical formulations in the following. 3 Several localization techniques have been proposed in the literature including successive refinements [17], [18], maximum likelihood estimation [19]–[21], multi-dimensional scaling [22], optimization-based techniques [23]–[25], probabilistic approaches [26], [27], multilateration [28], [29], graph theoretical methods [30], [31], and ultra-wideband localization [32]–[38]. Other relevant works on the design of localization algorithms include [39]–[51]. In general, the goal is to localize a network of nodes with unknown locations, in the presence of a number of anchors2 . Most of these algorithms consider localization in static networks. However, due to the rapid advances in mobile computing and wireless technologies, mobility is becoming an important area of research in 5G IoT. Agents can be mobile or mounted on moving entities such as vehicles, robots, or humans. Mobility of nodes increases the capabilities of the network and creates the opportunity to improve their localization. It has been shown that the integration of mobile entities improves coverage, connectivity, and utility of the network deployment, and provides more data since more measurements can be taken while the agents move [52], [53]. In fact, mobility plays a key role in the execution of certain applications such as target tracking [54], traffic surveillance [55], and environment monitoring [56]. For example, in a mobile wireless sensor network monitoring wildfires, mobile sensors can track the fire as it spreads, while staying out of its way [57]. Mobility also enables nodes to target and track moving objects, e.g., animal tracking for biological research or locating equipment in a warehouse. With advances in wearable technologies, there is a growing interest in localizing IoT objects particularly indoors where GPStype locationing systems are not available [58]–[60], which requires the development of selflocalization algorithms that enable each object in the IoT to find its own location by implementing simple object-to-object communication over, e.g., 5G [5]–[7]. The mobility of these emergent mobile IoT devices makes the localization problem even more challenging as their locations and available neighborhoods (nearby nodes to implement peer-to-peer communication) keep changing. Therefore, it is important to design fast and accurate localization schemes for mobile networks without compromising the quality of embedded applications that require real-time location information. As we will discuss in Section IV, many localization algorithms for mobile networks use sequential Bayesian estimation or sequential Monte Carlo methods. In particular, the Bayesian 2 Anchors are also referred to as reference nodes, seeds, landmarks, or beacons. In the remaining of this paper, we call the nodes with known locations, anchors, and refer to all other nodes with unknown locations as agents. 4 methods use the recursive Bayes’ rule to estimate the likelihood of an agent’s location. Due to the non-linear nature of the involved conditional probabilities, the Bayesian solutions are generally intractable and cannot be determined analytically. Solutions involving extended Kalman filters [61]–[70], particle filters [71], and sequential Monte Carlo methods [72]–[82] have been proposed to address the associated non-linearities and the intractable computation of the probability distributions. However, these approaches end up being sub-optimal and highly susceptible to the agents’ initial guesses of their locations. Despite their implementation simplicity, Monte Carlo or particle filter methods are time-consuming as they need to continue sampling and filtering until enough samples are obtained to represent accurately the posterior distribution of an agent’s position [83], while requiring a high density of anchors to achieve accurate location estimates. As an alternative to the traditional non-linear approaches, in this paper we describe a more recent localization framework [84]–[88], that, after a suitable reparametrization, reduces to a linear-convex set of iterations implemented in a fully distributed fashion and, under broad conditions, is guaranteed to converge to the true agent locations regardless of their initial conditions. The linearity in this setup is a consequence of a reparameterization of the nodes’ coordinates obtained by exploiting a certain convexity intrinsic to the sensor/agent deployment. In particular, an agent does not update its location as a function of arbitrary neighbors but as a function of a subset of neighbors such that it physically lies inside the convex hull of these neighbors; we call such a set of neighbors, a triangulation set of the agent in question3 . Each agent (in the quest of finding its location) updates its location estimate as a function of the location estimates of its neighbors weighted by barycentric coordinates (the reparameterization). The conditions under which the triangulation sets exist, how to find available triangulation sets, and compute the barycentric coordinates have been studied in detail in related work [84]–[88], and will be subject of Section V in the following. What is of particular relevance here is that when the set of agents lie inside a triangle (or a square) in R2 with 3 (or 4) anchors at its corners, the aforementioned iterations converge 3 An avid reader may note that the convex hull associated with this triangulation set constitutes an m-simplex in Rm , that is a triangle in a plane or a tetrahedron in R3 . 5 exponentially fast to the exact location of each agent regardless of the number of agents4 . The resulting framework becomes extremely practical and highly relevant to the IoT settings described earlier as the GPS and line-of-sight to the GPS requirements are replaced with a simple infrastructure requirement of placing, e.g., eight anchors at the eight corners of a big warehouse, office, or a building (effectively a cuboid in R3 ). In other words, the global line-of-sight (each agent communicating to the anchor) is substituted with a local line-of-sight where each agent has a communication path that leads to the anchors via neighboring agents. The technical advantages of this framework are also significant as it allows us to treat noise on distance measurements and communication under the purview of stochastic approximation leading to mathematically precise (almost sure) convergence arguments. We will discuss the applicability to imprecise distance measurements and communication in Section VI. The next significant advantage of this linear framework is its simplicity in adapting to mobile agents. Traditionally, extending distributed solutions to mobile agents presents many challenges: (i) agents may move in and out of the convex hull formed by the anchors; (ii) an agent may not be able to find a triangulation set at all times; (iii) the neighborhood at each agent keeps changing as they move. One can imagine an extension of the above linear iterations to this scenario with mobile agents. Here, each agent only updates when its (and other nodes’) motion places it inside the convex hull of some other nodes. Location updates thus become opportunistic (time-varying and non-deterministic) as they depend on the availability of nearby agents, which, in turn, is controlled by (possibly) arbitrary and uncoordinated motion models at the agents [89]– [92]. Although this extension is simple to conceive, finding the conditions under which these iterations converge and the associated rates of convergence are quite non-trivial. We describe the relevant details of this approach in Section VII. Another distinguishing feature of this linear framework is that it can be implemented in a completely distributed fashion, i.e., unlike centralized schemes, it does not require any central coordinator to collect and/or process the data. This is because computing barycentric coordinates and the relevant inclusion tests require only local distance information. Distributed algorithms are preferred in 5G, IoT, and other applications where there is no powerful computational center 4 Technically, the agents need to occupy the space inside the convex hull formed by the anchors in Rm . The smallest non- trivial convex hull in R2 is a triangle formed by three anchors but lying inside a square or a pentagon with four or five anchors, respectively, is a valid configuration in R2 . 6 to handle the necessary calculations, or when the large size of the network may lead to a communication bottleneck near the central processor, [15]. The rest of this paper is organized as follows. In Section II, we provide a detailed taxonomy of the existing localization approaches in the literature, and in particular discuss the emergence of mobility and the role it plays in networked localization. In Section III, we formulate the localization problem in mobile networks. We briefly discuss Bayesian-based approaches for localization in mobile networks in Section IV. We then review our linear framework for localization, called DILOC, in static networks in Section V, and study the extension of DILOC under environmental imperfections in Section VI. In Section VII, we show how DILOC extends to mobile networks along with its convergence and noise analysis. We present simulation results in Section VIII and finally, Section IX concludes the paper. II. TAXONOMY OF L OCALIZATION A PPROACHES In general, localization problem can be grouped into two main categories: position tracking and global localization. Position tracking, also known as local localization, requires the knowledge of agents’ starting locations, whereas global localization refers to the process of determining agents’ positions without any prior estimate of their initial locations. The global localization problem is more difficult, since the error in the agent’s estimate cannot be assumed to be small, [41]. In the remaining of the paper, we only consider the global localization problem. We now present a comprehensive taxonomy of the existing localization algorithms. Absolute vs. Relative: Absolute localization refers to the process of finding agent locations in a predetermined coordinate system, whereas relative localization refers to such process in a local environment, in which the nodes share a consistent coordinate system. In order to determine the absolute positions, it is necessary to use a small number of anchors that have been deployed into the environment at known locations. These reference nodes define the coordinate system and contribute to the improvement of the estimated locations of the other agents in the network. The location estimates may be relative to a set of anchors at known locations in a local coordinate system, or absolute coordinates may be obtained if the positions of the anchors are known with respect to some global coordinate system, either via GPS or from a system administrator during startup, [57]. In relative localization, no such reference nodes exist and an arbitrary coordinate system can be chosen. Although increasing the number of anchors in general may lead to more accurate location estimates or may increase the speed of the localization process, the main issue 7 with adding more anchors is that they make the process more expensive, and often become useless after all the agents in the network have been localized. Centralized vs. Distributed: In centralized localization, the locations of all agents are determined by a central coordinator, also referred to as sink node. This node first collects measurements (and possibly anchor locations), and then uses a localization algorithm to determine the locations of all agents in the network and sends the estimated locations back to the corresponding agents. In contrast, such central coordinator does not exist in distributed localization, where each agent infers its location based on locally collected information. Despite higher accuracy in small-sized networks, centralized localization schemes suffer from scalability issues, and are not feasible in large-scale networks. In addition, comparing to the distributed algorithms, the centralized schemes are less reliable and require higher computational complexity due to, e.g., the accumulated inaccuracies caused by multi-hop communications over a wireless network. Distributed algorithms are preferred in applications where there is no powerful computational center to handle the necessary calculations, or when the large size of the network may lead to a communication bottleneck near the central processor, [15]. Therefore, there has been a growing effort in recent years to develop distributed algorithms with higher accuracies. Conventional vs. Cooperative: In conventional approach, there is no agent-to-agent communication, and therefore agents do not play any role in the localization of other agents in the network. For instance, when an agent obtains distance estimates with respect to three anchors in R2 , it can infer its own location through trilateration, provided the agent knows the locations of the anchor, see Section V for more details. On the other hand, in cooperative approach agents take part in the localization process in a collaborative manner, and are able to exchange information with their neighboring nodes, which may include other agents with unknown locations as well as the anchors. Since anchors are the only reliable source of location information, the former method, also known as non-cooperative approach either requires the agents to lie within the communication radius of multiple anchors, which in turn requires a relatively large number of anchors, or to have long-range transmission capabilities in order to make measurements to the anchors. The latter approach removes such restrictions by allowing the inter-agent communications, which in turn increases the accuracy, robustness and the overall performance of the localization process. The reader is referred to Ref. [12] for a detailed discussion on the emerge of cooperative localization algorithms. 8 Range-free vs. Range-based: Localization work can also be divided into range-free and rangebased methods, based on the measurements used for estimating agent locations. As we discuss in Section IV, a large number of existing algorithms use distance and/or angle measurements to localize a network of agents, and are therefore referred to as range-based algorithms. Ref. [93] provides an overview of the measurement techniques in agent network localization. Depending on the available hardware, the most common measurement techniques that are used in localization algorithms include Received Signal Strength (RSS), Time of Arrival (ToA), Time Difference of Arrival (TDoA), and Direction of Arrival (DoA), [94]. In particular, the distance estimates can be obtained from RSS, ToA, or TDoA measurements; RSS-based localization exploits the relation between power loss and the distance between sender and receiver, and does not require any specialized hardware. However, due to nonuniform signal propagation environments, RSS techniques suffer from low accuracy. More reliable distance measurements can be obtained by estimating the propagation time of the wireless signals, which forms the basis of ToA and TDoA measurements. These methods provide high estimation accuracy compared to RSS, but require additional hardware at the agent nodes for a more complex process of timing and synchronization. On the other hand, relative orientations can be determined using AoA measurements, which requires a node to be equipped with directional or multiple antennas. In addition, in order to measure the traveled distance, acceleration, and orientation, an agent may be equipped with an odometer or pedometer, an accelerometer, and an Inertial Measurement Unit (IMU), respectively, [12]. On the other hand, range-free algorithms, also known as proximity-based algorithms, use connectivity (topology) information to estimate the locations of the agents. The range-free localization schemes eliminate the need of specialized hardware on each agent, and are therefore less expensive. However, they suffer from lower accuracy compared to the range-based algorithms. Typical range-free localization algorithms include Centroid [95], Amorphous [28], DV-hop [96], SeRLoc [97] and APIT [98]. Sequential vs. Concurrent: Localization algorithms can also be classified into concurrent methods and sequential methods. In concurrent methods, each agent is initially assigned with an estimate of its location coordinates. It then iteratively updates its location estimate using the measurements and the estimates it acquires from the neighboring nodes. The update process continues until the estimates converge to the true coordinates of the agents, [99]. On the other hand, sequential methods begin with a set of anchors, and compute the locations of the agents in a 9 network, one by one, and in a predetermined sequence. As we explain in Section IV, Trilateration is a common sequential approach, in which each agent computes its location using its distance measurements to m + 1 anchors in an m-dimensional Euclidean space. Static vs. Mobile: Localization literature has mainly focused on static networks where the nodes do not move. This is particularly the case for WSNs, where the problem of locating mobile agents has not been sufficiently addressed. However, due to the rapid advances in mobile computing and wireless communication technologies in recent years, mobility is becoming an important area of research in WSNs. In a particular class of WSNs, namely Mobile Wireless Sensor Networks (MWSNs), agents can be mobile or mounted on moving entities such as vehicles, robots, humans, etc. In MWSNs, mobility of agent nodes increases the capabilities of the network, and creates the opportunity to improve agent localization. It has been shown, [53], that the integration of mobile entities into WSNs improves coverage, connectivity, and utility of the agent network deployment, and provides more data since more measurements can be taken while the agents are moving. In addition, mobility plays a key role in the execution of an application. For example, in a MWSN that monitors wildfires, the mobile agents can track the fire as it spreads, and stay out of its way, [57]. Mobility also enables agent nodes to target and track the moving objects. The agent tracking problem is an important aspect of many applications, including the animal tracking, for the purposes of biological research, and logistics, e.g., to report the location of equipments in a warehouse when they are lost and need to be found, [15]. Another potential application of localization in mobile networks is the Internet of Things (IoT), which can be thought of as a massive network of objects such as agents, robots, humans and electronic devices that are connected together and are able to collect and exchange data. With the advancements in wearable technologies, there is a growing interest in localizing IoT objects, [59], [60], which requires the development of self-localization algorithms that enable each object in the IoT to find its own location by implementing simple object-to-object communications. Despite all the aforementioned advantages, mobility can make the localization process more challenging; In statically deployed networks, the location of each agent needs to be determined once during initialization, whereas in mobile networks the agents must continuously obtain their locations as they move inside the region of interest. Moreover, mobile nodes require additional power for mobility, and are often equipped with a much larger energy reserve, or have selfcharging capability that enables them to plug into the power grid to recharge their batteries, [57]. 10 It is therefore crucial to design fast and accurate localization schemes for mobile networks without compromising the quality of applications that require wireless communications. III. P RELIMINARIES AND P ROBLEM F ORMULATION We now formulate the general localization problem in mobile networks. We assume that the agents in the network live in an arbitrary m-dimensional, m ≥ 1, Euclidean space Rm , although, for illustration and better visualization of the technical concepts in the conventional 2D or 3D setting, the reader may consider m = 2 (the plane) or m = 3. The formalism and results provided below hold for arbitrary m ≥ 1 though. In Rm , m ≥ 1, consider a network of N mobile agents collected in a set Ω and M anchors in a set κ. The N agents in Ω have unknown locations, while the M anchors in κ have known locations. Let Θ = Ω ∪ κ be the set of all nodes, agents and anchors, in the network, and Ni (k) ⊆ Θ be the set of neighbors5 of agent i ∈ Ω at time k. m Let xi∗ k ∈ R be a row vector that denotes the true location of a (possibly mobile) node i ∈ Θ at time k, where k ≥ 0 is the discrete-time index. We describe the evolution of the agent locations as follows: x∗k+1 = f (x∗k , vk ), (1) in which x∗k ∈ RN ×m is the concatenated state of all agents in the network at time k, the function, f , possibly non-linear, captures the temporal evolution of the locations, and vk represents the uncertainty in the location evolution at time k. Similarly, assume zik to denote the local measurement at agent i and time k. Let zk be the collection of all measurements at time k leading to the following global measurement model: zk = g(x∗k , nk ), (2) in which nk captures the measurement noise. The function, g, denotes the measurement technology further explained below. We denote the set of all measurements acquired at time steps, 1, . . . , k, by the set Zk = {z1 , z2 , . . . , zk }. (3) The localization problem is to estimate the true locations, xi∗ k , of the mobile agents in the set Ω given the measurements in the set Z. Since we are seeking distributed solutions, it should also 5 Note that a neighbor is defined as any node in the set Θ that lies within the communication radius, r, of an agent. Detailed discussion on the notion of neighborhood, quantification of the communication radii, density and distribution of deployment, and related implications can be found in [84]. 11 be emphasized that no agent has knowledge of the entire Zk at any give time; only a subset of Zk is available at each agent, at time k. Motion model: Regardless of the function f in Eq. (1), the motion model can be interpreted as the deviation from the current to the next locations, i.e., i∗ ei∗ xi∗ k , k = xk−1 + x i ∈ Ψ, (4) ei∗ in which x k is the true motion vector at time k. We note here that the agents are assumed to ei∗ move in a bounded region in Rm and hence x k cannot take values that drive an agent outside this region. IV. L OCALIZATION IN M OBILE N ETWORKS : BAYESIAN A PPROACHES As we discussed earlier, accurate, distributed localization algorithms are needed for a variety of 5G IoT and other network applications. In this section, we briefly discuss the basic principles and characteristics of Bayesian methods for solving network localization problems. Baysian Estimation: In general, Bayesian filtering refers to the process of using Bayes’ rule to estimate the parameters of a time-varying system, which is indirectly observed through some noisy measurements. In the context of localization, given the history of the measurements up to time k, Zk as defined in Eq. (3), Bayesian filtering aims to compute the posterior density, p(xk | Zk ), of the agents’ locations, xk , i.e., the agent’s belief about their location at time k. The goal of localization is to make the belief for each agent as close as possible to the actual distribution of the agent’s location, which has a single peak at the true location and is zero elsewhere. Before we explain the Baysian estimation process, let us define the following terms: The dynamic model, p(xk | xk−1 ), captures the dynamics of the system, and corresponds to the motion model in the context of localization; it describes the agents’ locations at time k, given that they were previously located at xk−1 . The measurement model, p(zk | xk ), represents the distribution of the measurements given the agents’ locations at time k. The measurement model captures the error characteristics of the sensors, and describes the likelihood of taking measurement, zk , given that the agents are located at xk . The Baysian estimation process can then be summarized in the following steps: 1) Initialization: Before the agents start acting (moving) in the environment, they may have initial beliefs about where they are. The process then starts with a prior distribution of agent 12 locations, p(x0 ), which represents the information available on the initial locations of the agents before taking any measurements. For example, in robotic networks such information may be available by providing the robots with the map of the environment. When prior information on agent locations is not available, the prior distribution can be assumed to be uniform. 2) Prediction: Suppose the motion model and the belief at time k − 1, p(xk−1 | Zk−1 ), are available. Then the predictive distribution of the agents’ locations at time k can be computed as follows: Z p(xk | Zk−1 ) = p(xk | xk−1 )p(xk−1 | Zk−1 )dxk−1 . (5) 3) Update: Whenever new measurements, zk , is available, the agents incorporate the measurements into their beliefs to form new beliefs about their locations, i.e., the predicted estimate gets updated as follows: p(xk | Zk ) = p(zk | xk )p(xk | Zk−1 ) , p(zk | Zk−1 ) (6) p(zk | xk )p(xk | Zk−1 )dxk , (7) in which the normalization constant, Z p(zk | Zk−1 ) = depends on the measurement model and guarantees that the posterior over the entire state space sums up to one. In this process, it is standard to assume that the current locations of the mobile agents, xk , follow the Markov assumption, which states that the agent locations at time k depends only on the previous location, xk−1 , i.e., p(xk | x0:k−1 , Zk−1 ) = p(xk | xk−1 ). (8) In other words, according to the Markovian dynamic model, the current locations contain all relevant information from the past. Otherwise, as the process continues and the number of sensor measurements increases, the complexity of computing the posterior distributions grows exponentially over time. Under the Markov assumption, the computation cost and memory demand decrease and the posterior distributions can be efficiently computed without losing any information, making the localization process usable in real-time scenarios. Bayes filters provide a probabilistic framework for recursive estimation of the agents’ locations. However, their implementation requires specifying the measurement model, the dynamic model, 13 and the the posterior distributions. The properties of the different implementations of Bayes filters strongly differ in how they represent probability densities over the state, xk , [100]. The reader is referred to [100] for a complete survey of the Bayesian filtering techniques. In what follows, we briefly review Kalman filters and particle filters that are the most commonly used variants of Bayesian methods. Kalman Filtering: When both the dynamic model and the measurement model can be described using Gaussian density functions, and the initial distribution of the agent locations is also Gaussian, it is possible to use Kalman filters, to derive an exact analytical expression to compute the posterior distribution of the agent locations. Mathematically, Kalman filters can be used if the dynamic and measurement models can be expressed as follows: xk+1 = Fk xk + vk , zk = Hk xk + nk , (9) in which the process noise, vk ∼ N (0, Qk ), and the measurement noise, nk ∼ N (0, Rk ), are Gaussian with zero mean and covariance matrices of Qk and Rk , respectively, and prior distribution is also Gaussian: x0 ∼ N (µ0 , Σ0 ). In Eq. (9), the matrix Fk is the transition matrix and Hk is the measurement matrix. Due to linear Gaussian model assumptions in Eq. (9), the posterior distribution of agent locations is also Gaussian, and can be exactly computed by implementing the prediction, Eq. (5), and update, Eq. (6), steps using efficient matrix operations and without any numerical approximations. The Kalman filter algorithm can be represented with the following recursive algorithm, [101]: p(xk−1 | Zk−1 ) = N (mk−1|k−1 , Pk−1|k−1 ), p(xk | Zk−1 ) = N (mk|k−1 , Pk|k−1 ), p(xk | Zk ) = N (mk|k , Pk|k ), 14 such that mk|k−1 = Fk mk−1|k−1 , Pk|k−1 = Qk−1 + Fk Pk−1|k−1 FTk , mk|k = mk|k−1 + Kk (zk − Hk mk|k−1 ), Pk|k = Pk|k−1 − Kk Hk Pk|k−1 , where Sk = Hk Pk|k−1 HTk + Rk , Kk = Pk|k−1 HTk S−1 k , are the covariance of zk − Hk mk|k−1 , and the Kalman gain, respectively. Kalman filters are optimal estimators when the model is linear and Gaussian. They provide efficient, accurate results if the uncertainty in the location estimates is not too high, i.e., when accurate sensors with high update rates are used, [100]. However, in many situations such assumptions do not hold, and no analytical solution can be provided. In such scenarios, the extended Kalman filter can be used that approximates the non-linear and non-Gaussian dynamic and measurement models by linearizing the system using first-order Taylor series expansions. Particle Filters: As discussed earlier, extended Kalman filter results in a Gaussian approximation to the posterior distribution of the agent locations, and generates large errors if the true distribution of the belief is not Gaussian. In such cases, the Particle filters that generalize the traditional Kalman filtering methods to non-linear, non-Gaussian systems can provide more accurate results. Particle filters, also known as sequential Monte Carlo methods, provide an effective framework to track a variable of interest as it evolves over time, when the underlying system is non-Gaussian, non-linear, or multidimensional. Unlike other Bayesian filters, sequential Monte Carlo method is very flexible, easy to implement and suitable for parallel processing, [102]. Since the dynamic and measurement models are often non-linear and non-Gaussian, sequential Monte Carlo methods are in particular widely employed to solve the localization problem in mobile networks. The particle filter implementation for the localization problem in mobile wireless sensor networks is a recursive Bayesian filter that constructs a sample-based representation of the entire probability density function, and estimates the posterior distribution of agents’ locations conditioned on their observations. The key idea is to represent the required posterior probability 15 density function by a set of random samples or particles, i.e., candidate representations of agents’ coordinates, weighted according to their likelihood and to compute estimates based on these samples and weights. At time k, the location estimate of the i-th mobile agent, is represented as a set of Ns samples (particles) , i.e., Ski = {xjk , wkj }, j = 1, . . . , Ns , (10) in which j indicates the particle index, and the weight, wkj , also referred to as importance factor, defines the contribution of the j-th particle to the overall estimate of agent i’s location. These samples form a discrete representation of the probability density function of the i-th moving agent, and the importance factor is determined by the likelihood of a sample given agent i-th latest observation. The sequential Monte Carlo localization process for each agent can then be summarized in the following steps: 1) Initialization: At this stage, Ns samples are randomly selected from the prior distribution of agent locations, p(x0 ). 2) Prediction: In this step, the effect of the action, from time k − 1 to k, e.g., the movement of the agent according to the dynamic model, is taken into account, and Ns new samples are generated to represent the current location estimate. At this point, a random noise is also added to the particles in order to simulate the effect of noise on location estimates. 3) Update: At this stage, sensor measurements are introduced to correct the outcome of the prediction step; each particle’s weight is re-evaluated based on the latest sensory information available, in order to accurately describe the moving agents’ probability density functions. 4) Resampling: At this step the particles with very small weights are eliminated, and get replaced with new randomly generated particles so that the number of particles remain constant. By iteratively applying the above steps, the particle population eventually converges to the true distribution. Sequential Monte Carlo methods have several key advantages compared with the previous approaches: (i) due to their simplicity, they are is easy to implement; (ii) they are able to represent noise and multi-modal distributions; and (iii) since the posterior distribution can be recursively computed, it is not required to keep track of the complete history of the estimates, which in turn reduces the amount of memory required, and can integrate observations with higher frequency. However, in general sequential Monte Carl methods are very time-consuming because they need to keep sampling and filtering until enough samples are obtained for representing the 16 posterior distribution of a moving node’s position, [83]. Moreover, they often require a high density of anchors to achieve accurate location estimates. In order to avoid the complexity of the above approaches and the susceptibility of their solutions to the initial conditions and the number of available anchors, in the remaining of this paper, we develop a distributed, linear framework that exploits convexity to provide a solution to the localization problem both in static and mobile networks. We emphasize that this framework is based on linear iterations that are readily implemented via local measurements and processing at the agents, making it further computationally-efficient compared to the aforementioned centralized and non-linear schemes. Moreover, the proposed solution is distributed, hence reduces the communication and storage overhead associated with, e.g., Bayesian-based solutions. V. L OCALIZATION : A L INEAR F RAMEWORK Traditionally, localization has been treated as a non-linear problem that requires either: (i) solving circle equations when the agent-to-anchor distances are given; or, (ii) using law of sines to find the agent-to-anchor distances (and then solving circle equations) when the agentto-anchor angles are given, [85]. The former approach is called trilateration, whereas the latter method is referred to as triangulation. The literature on localization is largely based on traditional trilateration and triangulation principles, or, in some cases, a combination of both, see [85] for a historic account; some examples include [84], [103]–[107]. In trilateration, the main idea is to first estimate the distances6 between an agent with unknown location and three anchors (in R2 ) and then to find the location of the agent by solving three (non-linear) circle equations. As shown in Fig. 1, if the agent with unknown location can measure its distances, r1 , r2 , and r3 , to the three nodes with known locations, it can then find its location, (x, y) ∈ R2 , by solving the following nonlinear circle equations: (x − x1 )2 + (y − y1 )2 = r12 , (x − x2 )2 + (y − y2 )2 = r22 , (11) (x − x3 )2 + (y − y3 )2 = r32 , where (x1 , y1 ), (x2 , y2 ), (x3 , y3 ) represent the coordinates of the three anchors. The placement of the anchors is arbitrary. 6 As discussed in Section III, the distances and/or angles of an agent to its nearby nodes can be measured by using RSSI, ToA, TDoA, DoA, or camera-based techniques, [108], [109]. 17 In a large network, like envisioned with IoT, trilateration would need each agent to find its distance to each of three anchors (in two dimensional space) and then solve the nonlinear equations (11). Clearly, for large number of agents, this will unduly tax the system resources and be infeasible as it will require either placing a large number of anchors so that each agent finds at least three of them or long-distance communication and distance/angle estimates from the agents to a small number of possibly far-away anchors. To avoid these difficulties, we discuss a distributed solution to localize a large number of agents in a network. This localization framework can be thought of as a linear iterative solution to the nonlinear problem posed in terms of the circle equations in (11). We call it a framework as many extensions, including, e.g., mobility in the agents and noise on related measurements and communication, rest on this simple framework. 3 𝑟3 𝑟1 𝑟2 1 2 Fig. 1. Traditional trilateration in R2 ; the unknown location is at the intersection of three circles. Each circle is centered around an anchor, indicated by a red triangle. The radius of each circle is the distance between the agent, represented by a solid circle, and the corresponding anchor. A. Localization in Static Networks: DILOC As an alternative to the traditional non-linear approaches, we now present a more recent localization framework, called DILOC, [84]–[88], that is based on a reparameterization of the nodes’ coordinates by exploiting a certain convexity intrinsic to the agent deployment. Before i∗ we proceed, we explicitly denote the true location of the anchors at time k with xi∗ k ≡ uk ∈ Rm , k ∈ κ, which are known7 . As briefly mentioned before, in this framework, an agent does not update its location as a function of an arbitrary set of neighbors but as a function of a 7 Anchors are denoted by red triangles in all of the subsequent figures. 18 carefully selected subset of neighbors such that it physically lies inside the convex hull of these neighbors, i.e., a triangulation set of the agent in question. This triangulation set is essentially an m-simplex in Rm that is a triangle in a plane or a tetrahedron in R3 . See Fig. 2 (Left) where an agent lies inside the convex hull of three anchors and Fig. 2 (Right) where an agent lies inside the convex hull of three neighboring agents that are not necessarily anchors. In order to describe DILOC, we first assume that all of the nodes are static, i.e., at a any given time, k, i∗ xi∗ k ≡ x , ∀i ∈ Θ, i∗ ui∗ k ≡ u , ∀i ∈ κ, where xi∗ ’s are unknown and ui∗ ’s are known. Each agent, i ∈ Ω, with unknown location in Rm needs to find a triangulation set, denoted as Θi , of m + 1 neighbors (nodes within the communication radius of agent i) such that AC(Θi ) > 0 and i ∈ C(Θi ), (12) where C(Θi ) denotes the convex hull of the nodes in Θi and AC(Θi ) denotes the hypervolume of the convex set C(Θi ) in Rm . In (12), the first equation states that the nodes in Θi do not lie on a low-dimensional hyper plane in Rm , while the second states that agent i lies strictly inside the convex hull formed by the elements of Θi . In simpler terms, e.g., in R2 , C(Θi ) is a triangle formed by three nodes and AC(Θi ) is its area; additionally, for a set to be a valid triangulation set in R2 , the nodes in the set may not lie on a line in R2 . Each node performs the following test to find a triangulation set. Convex-hull inclusion test: In any arbitrary dimension m ≥ 1, at agent i, the following tests determine whether an arbitrary set, Θi , of m + 1 neighbors is a triangulation set or not: X i ∈ C(Θi ), if AC(Θi ∪{i}\j) = AC(Θi ) , (13) j∈Θi i∈ / C(Θi ), if X AC(Θi ∪{i}\j) > AC(Θi ) . (14) j∈Θi Equation (13) states that, when node i lies inside the convex hull C(Θi ), the sum of the areas of the component triangles, Ai12 + Ai23 + Ai13 , see the left of Fig. 2, equals the area A123 of the triangle formed by the elements of Θi . On the other hand, (14) states that, when node i lies outside the convex hull C(Θi ), the sum of the areas of the component triangles is larger than the 19 area of the triangle defined by the elements of Θi . Any subset of exactly m + 1 neighbors that passes the above test becomes a triangulation set, Θi , for agent i. The question is now how to compute the areas of these convex hulls and can these areas be computed by the measurement technologies available at the agents. A neat solution that only requires inter-node distances is provided by the Cayley-Menger determinants, [84], [110]; inter-node distances can be measured (estimated) using the measurement technologies described earlier. 1 1 𝐴𝑖12 2 5 𝑖 𝐴𝑖13 𝑖 3 𝐴𝑖23 6 4 3 2 Fig. 2. R2 : (Left) Convex-hull inclusion test; (Right) agents, 4, 5, and 6, form a triangulation set for agent i; all agents are inside the convex hull of the anchors. Cayley-Menger determinants: For any set Θi of m + 1 nodes, in Rm , the Cayley-Menger 1 determinant is the determinant of an (m + 2) × (m + 2) symmetric matrix that uses the pairwise distances of the nodes in Θi to compute (a function of) the hypervolume, AΘi , of their convex hull, C(Θi ). The Cayley-Menger determinant is given by the following equation: A2Θi = 1 0 sm+1 1m+1 1Tm+1 , (15) D in which 1m+1 denotes an m + 1-dimensional column vector of 1’s, D = {dlj 2 }, l, j ∈ Θi , is the (m + 1) × (m + 1) Euclidean matrix of squared distances, dlj , within the set, Θi , and 2m (m!)2 sm = , m ∈ {0, 1, 2, . . .}. (−1)m+1 (16) Although the sequence sm grows rapidly with m, we are usually locating nodes in R2 or in R3 , for which the second and third coefficients in the above sequence are −16 and 288, respectively. Simply put, given any set of three nodes in R2 , Eq. (15) computes the (square of the) area of the triangle (in fact, it is equivalent to Heron’s formula on a plane [111]) formed by these three nodes. Hence, a convex hull inclusion test can be formulated using these determinants by computing the area of the four underlying triangles. Once a triangulation set Θi is identified at 20 each agent, (see Remarks in this section for further discussion on the existence and success of finding these sets), we proceed with the reparameterization using the barycentric coordinates as follows: Barycentric coordinates: For each agent i ∈ Ω, we now associate a weight, i.e., its barycentric coordinate to every neighbor j ∈ Θi in its triangulation set, as follows: AC(Θi ∪{i}\j) , j ∈ Θi ∩ Ω, AC(Θi ) AC(Θi ∪{i}\j) , j ∈ Θi ∩ κ. = AC(Θi ) pij = (17) bij (18) We note that the barycentric coordinate associated to a non-anchor neighbor in the triangulation set is denoted by a lowercase p, while the one associated to an anchor neighbor is denoted by a lowercase b. A triangulation set may not contain any anchor in which case all of these weights are designated with lowercase p. The reason for splitting the barycentric coordinates into nonanchors and anchors will become apparent later. We note here that the barycentric coordinates8 are positive (ratio of hypervolumes) and they sum up to one by (13): X X X (pij + bij ) = pij + bij = 1. j∈Θi ∩Ω j∈Θi (19) j∈Θi ∩κ With all the ingredients in place, i.e., the convex hull test, triangulation sets, and the barycentric coordinates, we now present the linear algorithm that exploits all of this convex geometry and the associated coordinate reparameterization. Algorithm: Before we proceed, recall that the agents are static with true locations, xi∗ , and their location estimate at time k is denoted by xik . We would like to have an algorithm that converges to (or learns) the true locations, i.e., xik → xi∗ . To this aim, each agent i ∈ Ω with a triangulation set Θi updates its location estimate as follows: X X ∗ pij xjk + bij uj , xik+1 = j∈Θi ∩Ω i ∈ Ω. (20) j∈Θi ∩κ Clearly, when a triangulation set does not contain any anchor (Θi ∩ κ = ∅), the second part of the above iteration is empty and the entire update is in terms of the neighboring non-anchor agents (in Ω) that also do not know their locations. Since there are N agents in the set Ω, there are a total of N vector equations (20) that we refer to as barycentric system of equations. 8 As a side note, these coordinates are attributed to the work by Möbius [112], while a simpler version of the Cayley-Menger determinant is associated to Lagrange, see [85] for a historical account. 21 To get some insight into (20) consider one agent and two anchors on a line, with true positions c∗ , a∗ , b∗ , respectively, such that a∗ < c∗ < b∗ . One can verify that c∗ ∈ (a∗ , b∗ ) and (20) reduces to ck+1 = b ∗ − c ∗ ∗ c ∗ − a∗ ∗ a + ∗ b = c∗ . b ∗ − a∗ b − a∗ The barycentric coordinates are a function of the length of the line segments (hyper-volume of a m = 1-simplex) that are computed with the distance estimates. Since, in this simple example, the agent expresses its location in terms of the two anchors, DILOC provides the correct location in one-step. When the neighbors are non-anchors, a∗ and b∗ are also unknown and are (naturally) replaced by their estimates, i.e., ak and bk , and we study how this linear, time-invariant, system of equations evolve over time, and where does it converge (if it does). The analysis for arbitrary Rm is considered next. Analysis: We now write the barycentric system of equations (20) in compact matrix-vector notation by defining  xk+1 x1k+1   =  ···  xN k+1   1   u    u =  ···    uM   ,  ∗ P = {pij } ∈ [0, 1)N ×N , B = {bij } ∈ [0, 1)N ×M , where [0, 1)N ×M denotes an N × M matrix with elements in the interval [0, 1). Then, in vector format, (20) becomes DILOC: xk+1 = Pxk + Bu∗ . (21) The reason for splitting the barycentric coordinates is now apparent. In (21), the matrices, P and B, collect the barycentric coordinates and the vectors, xk and u∗ , the agent and anchor coordinates, respectively. DILOC’s convergence is summarized in the following theorem. Theorem 1. In Rm , assume that the agents lie inside the convex hull of a non-coplanar set of anchors, i.e., C(Ω) ∈ C(κ) with AC(κ) > 0. If each agent successfully finds a triangulation set, then DILOC in (21) converges to the true agent locations. 22 The detailed proof is beyond the scope of this paper and can be found in [84]. Here we provide a brief overview. First note that Eq. (21) can be further rewritten as      u∗ I 0 u∗  =  . xk+1 B P xk | {z } (22) ,Υ Intuitively, the system matrix Υ of the above LTI system can be interpreted as a transition probability matrix of a Markov chain because it is non-negative and its rows sum to 1; recall that the barycentric coordinates are positive and sum to 1, see (19). This Markov chain has exactly m + 1 absorbing states, because of the identity m × m block in the upper left corner, while the rest of the states are transient. Under the purview of the convexity condition that all agents lie inside the convex hull of the anchors in Theorem (1) and that each agent successfully triangulates (the latter is in fact a consequence of the former), one can show that this is an absorbing Markov chain, i.e., all transient states have a path to the absorbing states, resulting into ρ(P) < 1, where ρ denotes the spectral radius of a matrix. Successive iterations thus result into:  Υk+1 =  Pk IM `=0 0 ` PB P k+1  , and in the limit  lim Υk+1 =  k→∞ IM 0 −1 (IN − P) B 0  , from which it follows that lim xk = (IM − P)−1 Bu∗ , k→∞ (23) which in fact constitutes the true coordinates of the agents expressed in terms of the barycentric coordinates with respect to the anchors [84]. Note that the limit in (23) to the true agent locations results regardless of the initial conditions. DILOC Remarks: It is imperative to discuss the intuition behind some of the arguments made while presenting DILOC and its advantages over traditional setups. (i) We first discuss the assumption that all agents strictly lie inside the convex hull of the anchors, i.e., C(Ω) ∈ C(κ). With the help of this assumption, one can show that each agent will successfully find a triangulation set, not necessarily composed by anchors. The exact 23 probability of successfully finding a triangulation set in a small radius around an agent depends on the density of the agents and the probability distribution of the deployment. Details of these arguments can be found in [84]. (ii) Next, for a non-coplanar set of anchors in Rm , one must have at least m + 1 anchors providing a lower bound on the number of anchors. Since we assumed that C(Ω) ∈ C(κ), all the agents must either lie inside the triangle formed by three anchors in R2 or inside the tetrahedron formed by four anchors in R3 . We emphasize that this deployment condition to localize an arbitrary number of static agents in Rm is exactly the same as localizing one static agent in Rm . In this sense, DILOC provides a scale-free solution. (iii) The resulting framework becomes extremely practical and highly relevant to the IoT settings described earlier as the GPS and line-of-sight to the GPS requirements are replaced with a simple infrastructure requirement of placing, e.g., eight anchors at the eight corners of a big warehouse, office, or a building (effectively a cuboid in R3 ). In other words, the global line-of-sight (each agent communicating to the anchor) is substituted with a local line-of-sight where each agent has a communication path that leads to the anchors via neighboring agents. (iv) The iterative linear convex DILOC in (20) or (21) contrasts with traditional trilateration. Trilateration requires each agent to solve the nonlinear problem given in (11) and leads to major drain on the agents’ and/or anchors’ resources while creating a major communication bottleneck, as the anchors must continuously broadcast their message to all the agents, no matter how far they are. In 5G environments, trilateration will require line-of-sight from every agent or user or device to anchors. In comparison, DILOC provides a linear (iterative) solution and only requires local communication, no LoS to anchors but only to neighboring nodes. The power needed by agents to communicate locally to their neighbors in their triangulation set is steerable, in the following sense. At the set-up phase, when agents look to determine who are other nodes in their triangulation set, they can start transmitting with a minimum power level. If at that level, they find m + 1 other nodes they can transmit at this power level. If they cannot find m + 1 such nodes, they increase the power level to reach further away nodes. Once they reach m + 1 nodes there is no need to increase further the transmitting power. (v) There are several issues that have been addressed in the literature. For example, incorporating all available agents in the DILOC update instead of only m + 1, incorporating 24 all available anchors instead of the minimum m + 1, developing randomized strategies to improve on the worst-case convergence rates, extending the setup to include agents that do not reside inside the anchor convex-hulls, extending to continuous-time algorithms to tackle on frequency-dependent noise, incorporating environmental imperfections, and extending to mobile agents which move arbitrarily in a bounded region. We refer the interested readers to the following relevant body of literature on this topic: [86]–[88], [99], [113]–[117]. In the next sections, we consider two of the most significant extensions that are built on this framework, i.e., addressing communication noise and imperfect distance measurements in Section VI and incorporating agent mobility and non-deterministic motion in Section VII. VI. DILOC IN R ANDOM E NVIRONMENTS We now consider DILOC under environmental imperfections that are relevant to IoT settings. We make the following assumptions on the types of noises and disturbances. Assumption R0: Data packet drops: Peer-to-peer communication on ad hoc wireless networks is marred with data packet drops. In order to address such packet drops or communication link failures, we assume that the communication link (i ← j) is active with a non-zero probability, qij ∈ (0, 1], at each iteration. At time k, we model this link by a binary random variable, eij (k), such that   1, w.p. q , ij eij (k) =  0, w.p. 1 − qij , (24) where eij (k) = 1 shows perfect communication at time k. Assumption R1: Communication noise: In order to address communication noise over peer-topeer wireless networks, we model the data exchange to be imperfect and corrupted with additive noise. In particular, agent i receives only a corrupt version, yij (k), of node j’s state, xj (k), given by yij (k) = xj (k) + vij (k). (25) The components of the noise vector, vij (k), are independent and zero-mean with finite second moments. Assumption R2a: Noisy distance measurements: The DILOC setup of Section V assumes perfect knowledge of inter-node distances to compute the barycentric coordinates. However, these distances may not be known perfectly in reality. We now assume that the agents only 25 know distance estimates, dbij (k), computed from noisy distance measurements at time k, e.g., Received-Signal-Strength, RSS, or Time-of-Arrival, TOA, see [84]–[86], [118] for further details on this setup. Due to imperfect distances, the system matrices, P and B from (21), become a b k ) and B b k ), where we b k (d b k (d function of both time, k, and distance estimates, denoted by P ignore the parentheses in the sequel to simplify notation. Assuming the distance measurements to be statistically independent over time, we split the system matrices as bk = P e P (k) , {b P + SP + S pij (k)}, (26) bk = B e B (k) , {bbij (k)}, B + SB + S (27) e P (k)}k≥0 and {S e B (k)}k≥0 are indepenwhere SP and SB are measurement error biases, and {S dent random matrices with zero-mean and finite second moments. Note that since Assumption R2a only uses current distance estimates, the resulting matrices of barycentric coordinates have constant error biases, i.e., SP 6= 0 and SB 6= 0. This is because the relationship of converting distance measurements to barycentric coordinates is non-linear. Clearly, a more accurate scheme, described next, is to utilize the information from past distance measurements, so that one computes the system matrices as a function of the entire past. Assumption R2b: Consistency in distance estimates: Let {Z(k)}k≥0 be any sequence of inter-node distance measurements collected over time. We assume that there exists a sequence of estimates {dk }k≥0 such that, for all k, dk can be computed efficiently from {Z(s)}s≤k and we have h P lim dk = d ∗ k→∞ i = 1. (28) In other words, by a statistically-efficient process (e.g., optimal filtering) based on past distance information, we can estimate the required inter-agent distances to arbitrary precision as k → ∞. We now present two variations of DILOC,(21), namely, Distributed Localization in Random Environments (DLRE, [84]) and Distributed Localization Algorithm with Noisy Distances (DILAND, [86]) that improve DILOC under the imperfect scenarios described by Assumptions R0-R2. In particular, DLRE is based on Assumptions R0-R2a and uses only the current distance measurements, while DILAND is based on Assumptions R0, R1, R2b, and utilizes the entire history of distance measurements. A. DLRE The DLRE algorithm is described in the following theorem. 26 Theorem 2 (Theorem 3, [84]). Under the noise model R0-R2a, the DLRE algorithm given by xi (k + 1) = (1 − α (k)) xi (k) + α(k) " X eij (k)b pij (k) (xj (k) + vij (k)) qij j∈Ω∩Θi # X eij (k)bbij (k)  + u∗j + vij (k) , qik j∈κ∩Θ (29) i for i ∈ Ω, with α(k) ≥ 0 satisfying the persistence conditions: X X α(k) ≥ 0, α(k) = ∞, α2 (k) < ∞, k (30) k converges almost surely to lim X(k + 1) = (I − P − SP )−1 (B + SB )U(0). k→∞ (31) The detailed proof of DLRE can be found in [84]. Here, we briefly describe the intuition behind the algorithm and its proof. The DLRE update, at time k +1, is essentially a (time-varying) linear combination of an agent i’s state, xi (k), and the information that comes from its neighbors, at time k. Self-information from the past is weighted by 1 − α(k) and since α(k) → 0, necessary for (30) to hold, self-information gets weighted more and more over time and the contribution from neighbors goes to zero. In fact, because of this dynamic weighting, the iterate xi (k) must converge as the information from neighbors (that further includes a new noise sample at each iteration) is weighted out over time. However, the rate at which the neighboring contribution is weighted out is carefully selected by the conditions in (30). Loosely speaking, the weighting with α(k) goes to zero (square summable) but not too fast (infinite sum) allowing the just right amount of information mixing before the neighboring contribution is rejected. The justification behind these arguments come from the stochastic approximation literature, see [119] for details. Next, much the same way as in DILOC, DLRE expresses agent i’s location estimate as a function of its non-anchor and anchor neighbors in the triangulation set, i.e., Ω ∩ Θi and κ ∩ Θi , respectively. The communication from these neighboring nodes has the additive noise component, from Assumption R1. Second, the barycentric coordinate that was pij in DILOC is replaced by a barycentric estimate, pbij (k), that is time-varying and is distorted by a bias and zeromean error, see Assumption R2a. Finally, random link failures are taken care of by the binary random variable, eij (k), in front of the barycentric estimate; this term is further divided by the probability, qij , of this link being active. Intuitively, division by qij ensures that, if a link is 27 active 10% of the time, the contribution of the corresponding barycentric coordinate is magnified appropriately to counter for the instances the link is dormant. Clearly, DLRE converges to the exact agent locations for unbiased random system matrices, i.e., SP = SB = 0, as established in Theorem 2. As pointed out earlier, even if the distance estimates are unbiased, the system matrices computed from them may be biased. In such a situation, the DLRE leads to a nonzero steady state error (bias) that is precisely quantified in (31). B. DILAND For the sake of clarity in the following presentation, we analyze DILAND only in the context of noisy distance measurements and assume perfect communication without any link failures and communication noise. The appropriate modifiers in the case of link failures and communication noise are exactly the same as DLRE and hence we ignore them in the following. In order to describe DILAND, we let P(dk ) , {pij (k)} and B(dk ) , {bij (k)} be the matrices of barycentric coordinates computed at time k from the distance estimate dk , where we will drop the argument in P and B as before. Recall from Assumption R2b that the distance estimate dk is a function of the entire of history of distance measurements up to time k. The DILAND algorithm is described in the following theorem. Theorem 3 (Theorem 3, [86]). Under the noise model R2b, the DILAND algorithm given by xi (k + 1) = (1 − α(k))xi (k) + α(k) " # X X pij (k)xj (k) + bij (k)u∗j , j∈Ω∩Θi (32) j∈κ∩Θi ∀i ∈ Ω, with α(k) ≥ 0 satisfying the persistence conditions: X α(k) ≥ 0, α(k) = ∞, (33) k converges a.s. to the exact agent locations t → ∞. The detailed proof of DILAND can be found in [86]. We note that DILAND relies on a key assumption that the distance estimates are a function of all past distance measurements. Due to this, the system matrices P, B, at any time k, are a function of past distance measurements, unlike DLRE, where they are assumed to be independent over time. DLRE thus is analyzed in the standard stochastic approximation framework with independent perturbations (see, for 28 example, [119]), while the analysis of DILAND is based on stochastic iterations with nonMarkovian perturbations. As we mentioned before, DILAND can be extended to cover data packet drops and communication noise but the analysis requires the additional finite summability condition on the weight sequences, α(k). Finally, we note that an alternative to DILAND can be to estimate inter-node distances by initially collecting and averaging a large number of measurements and then run DLRE. Whether to implement a real-time algorithm that only uses current distance measurements or the entire history, or to run a batch algorithm where distances are estimated a priori, akin to a “training phase,” are clear trade-offs and depend on implementation requirements. DILOC and its extensions to account for environmental imperfections perform localization in static networks. The implementation of DILOC does not immediately carry over to mobile networks, because in mobile networks: (i) agents may move in and out of the convex hull formed by the anchors; (ii) an agent may not be able to find a triangulation set at all times; (iii) the neighborhood at each time step changes as agents move. In order to deal with these issues, in the next section, we develop an extension to DILOC that is opportunistic, i.e., the agents update their location estimate when they are successful in finding a valid triangulation set and do not update otherwise. The resulting algorithm is non-deterministic due to arbitrary motion models at the agents and requires a fresh look at the convergence of linear, time-varying systems when their constituent system matrices can take random values. VII. L OCALIZATION IN M OBILE N ETWORKS : E XTENDING T RILATERATION VIA C ONVEX H ULLS In this section, we explore the idea of how to extend DILOC to tackle the localization problem in networks of moving objects. Before we proceed with the algorithm, let us explain why the traditional trilateration approach cannot be applied directly for localization of moving objects. Consider a network of N = 5 agents, with unknown locations, and M = 3 anchors, all moving in a bounded region according to an arbitrary motion model, as shown in Fig. 3 (Left). As explained in Section V, whenever an agent finds 3 anchors in its vicinity, it can localize itself by first measuring its distances to the anchors and then finding the intersection of three circles centered at each anchor location. The problem with this approach is twofold: (i) since each agent has to find at least three neighboring anchors in order to find its location, a relatively large number of anchors has to be deployed in the region of interest; (ii) due to non-linearity of the 29 circle equations, it can not be directly extended to iteratively solve the localization problem. A time-varying extension of DILOC is immediately not applicable as an agent may not find three neighbors at all time. Fig. 3. (Left) Trajectories of the agents according to an arbitrary motion model; (Right) Convex-based triangulation; The dashed circle represents the communication range of an agent. In order to deal with these issues, we provide an opportunistic convexity-based linear algorithm, where an agent updates its location estimate as a convex combination of the states of the neighbors, agents and/or anchors, only if it happens to move inside their convex hull, see Fig. 3 (Right). We first consider noiseless scenarios and provide the conditions under which the proposed algorithm converges to the agents’ true locations without the presence of any central or local coordinator. We then study the effects of noise on the motion and distance measurements and provide modifications to the original algorithm to counter the undesirable effects of noise. Although our approach is applicable to arbitrary dimensions, we use R2 in the remainder of the paper for simplicity and ease of illustration. A. Distributed Localization Algorithm We now describe the localization algorithm in R2 while the extension to R3 follows similar arguments. At the beginning (time k = 0), each agent is assigned with a random estimate of its initial location. This estimate does not necessarily has to be the coordinates of a point inside the region of motion and is completely random. We then consider two update scenarios for agent i (in Ω) at any given time k > 0: Case (i): If agent i does not find at least 3 neighbors at time k, i.e., 0 ≤ |Ni (k)| < 3, it does not perform any update except adding the motion vector to its past location estimate: ei∗ xik+1 = xik + x k+1 . (34) 30 Case (ii): If agent i finds at least 3 neighbors at time k, i.e., |Ni (k)| ≥ 3, it performs the inclusion test, as explained in Section V, on the possible subsets of 3 neighbors to determine if it lies inside a convex hull. If there is no subset for which the test is passed, agent i uses the update in Eq. (34). If the test is passed and there exists Θi (k) ⊆ Ni (k), then it applies the following update: xik+1 = αk xik + (1 − αk ) X ei∗ akij xjk + x k+1 , (35) j∈Θi (k) in which αk is a design parameter such that   1, ∀k | Θi (k) = ∅, αk =  ∈ [β, 1) , ∀k | Θi (k) 6= ∅, β > 0. (36) Note that according to (36), when the agent cannot find a triangulation set, αk = 1, the second term in (35) is zero and the agent’s location estimate does not change from time k to k+1 (except for incorporating the motion). On the other hand, if the agent finds a triangulation set among its neighbors at time k, the weight it assigns to its previous location estimate is lower-bounded by β. Therefore, (36) guarantees that the agents do not completely forget the valuable location information they have acquired in the past. An agent forgets past information, e.g., by updating with respect to a triangulation set that contains three other agents whose estimates have not been improved from the initial guess; an αk of at least β > 0 ensures that this does not happen. By separating the weights assigned to the agents and anchor(s), we can express the above algorithm in matrix form as ek+1 , xk+1 = Pk xk + Bk uk + x k > 0, (37) where xk is the vector of agent coordinates at time k, uk is the vector of anchor coordinates at e∗k+1 is the change in the location of agents at the beginning of the k-th iteration time k, and x according to the motion model. Also Pk , {(Pk )i,j } and Bk , {(Bk )i,j }, the system and input matrices of the above linear time-varying system, contain the weighted barycentric coordinates with respect to the agents with unknown locations, and anchors, respectively. It can be inferred from (36) that the self-weight at each agent is always lower bounded, i.e., 0 < β ≤ (Pk )i,i ≤ 1, ∀k, i ∈ Ω. (38) Since anchors play the role of the input in the above linear time-varying system and inject true information into the network, we must also set a lower bound on the weights assigned to 31 the anchor states. To this aim, we assume that, if an anchor is involved in an update, i.e., for any (Bk )i,m 6= 0, we have 0 < α ≤ (Bk )i,m , ∀k, i ∈ Ω, m ∈ Θi (k) ∩ κ. (39) The above assumption implies that, if there is an anchor in the triangulation set it always contributes a certain amount of information. Since the weights are barycentric coordinates and directly tied to the agent’s location inside the convex hull, having a minimum weight on an anchor implies that an update occurs only if an agent lies in an appropriate location inside the convex hull of 3 nodes (in R2 ) in the triangulation set (one of which is an anchor). According to (39), the weight assigned to the anchor should be at least α. Note that, with the lower bounds on the self-weights and the weights assigned to the anchors according to (38) and (39), and assuming, without loss of generality, that at most one update occurs at time k, say at agent i, the system matrix, Pk , is either (i) the identity, when there is no update with the neighbors; or, (ii) the identity except a stochastic i-th row, when no anchor is involved in the update at agent i; or, (iii) the identity except a sub-stochastic i-th row, when there is at least one anchor in the triangulation set of agent i. We have studied the asymptotic behavior of linear time-varying systems with sub-stochastic system matrices and its applications in [120]–[123]. In what follows, we use the results on the convergence of an infinite product of (sub-) stochastic matrices, to provide a sufficient condition for the iterative localization algorithm to converge to the true locations of mobile agents. B. Distributed localization: Analysis We now provide our main result in the following theorem: Theorem 4. Consider a network of N mobile agents moving in a bounded region of interest in the presence of at least one anchor. Assume (38) and (39) to hold. Then, (37) asymptotically converges to the true agent locations if each agent establishes a communication path to an anchor, possibly via intermediate agents and over multiple time-steps, in a bounded time, infinitely often. 32 Here we provide an intuitive explanation of this theorem. The agent’s true locations evolve according to the following updates: e∗k+1 . x∗k+1 = Pk x∗k + Bk uk + x (40) By subtracting (37) from (40), we can find the following error dynamics, ek+1 , x∗k+1 − xk+1 = Pk (x∗k − xk ) = Pk ek , = k Y Pl e0 , l=0 which converges to zero regardless of the initial error, e0 , if lim k→∞ k Y Pl = 0N ×N . (41) l=0 We have studied the asymptotic behavior of linear time-varying systems with sub-stochastic system matrices in [120]. In particular, we show that, by assuming (38) and (39) the infinite product of system matrices, Pk ’s, converges to zero if the agents are connected to an anchor in a bounded time, infinitely often. By connected, we mean that information from an anchor travels to each agent, possible over several intermediate agents and over multiple time-steps. All that is needed is that this information is received by each agent in a bounded time and hence, each agent receives this information infinitely often over an infinite number of iterations. As a result, (41) holds and the asymptotic convergence of (37) to the true agent locations follows. The reader can refer to [124] for a detailed proof of the above theorem. In fact, we have proved a much weaker convergence condition than provided in Theorem 4, i.e., the information from an anchor does not necessarily has to reach all agents in a bounded time. In particular, under the assumptions in (38) and (39), the infinite product of sub-stochastic system matrices converges to zero as long as the number of iterations, in which the anchor information propagates through the network, grows slower that a certain exponential rate. In other words, the information still propagates in a finite time but the lengths of these information-propagation time-intervals do not need to have a uniform bound. We refer to this criteria as unbounded connectivity. C. How many anchors are required? As we discussed in Section IV, one of the issues with Bayesian approaches for localization is that they require a high density of anchors to achieve accurate results, which in turn adds to the cost of the localization process. Therefore, it is meaningful to investigate the minimal 33 number of anchors that is required for localizing an arbitrary number of moving agents using the localization algorithm proposed in Section VII-A. Before providing the main result9 , let us denote the motion at agent, i ∈ Ω, and anchor, j ∈ κ, by Mi and Uj , respectively. Suppose agent 1 is moving along a vertical line; this line forms M1 and dim M1 = 1. Note that Mi (or Uj ) includes all possible locations that the i-th agent (or the j-th anchor) occupies throughout the localization process. Now consider another agent, say agent 2, which is moving along a vertical line parallel to M1 ; in this case we will have dim ∪i=1,2 Mi = dim M2 = 1. However, if the two lines are linearly independent, they span R2 , and we will have dim ∪i=1,2 Mi = 2. Note that in the above cases if the agent moves in opposite directions along the line of motion, the dimension of the motion subspace still remains one. Assuming Rm , in [124] we show that the motion of the agents and anchors in l ≤ m dimensions allows us to reduce the number of anchors from m + 1 by l. The following theorem, provides necessary conditions for the proposed algorithm to track the true location of mobile agents. Theorem 5. For the linear time-varying dynamics in (37) to converge to the true locations of the agents, the following conditions must be satisfied: |κ| ≥ 1, (42) |κ| + |Ω| ≥ m + 2, (43) |κ| + dim ∪ Mi + dim ∪ Uj ≥ m + 1. (44) i∈Ω j∈κ The proof of the this theorem is beyond the scope of this paper and is treated in [124]. Since we can provide mobile agents with up to m degrees of freedom in their motion in Rm , according to Theorem 5, an arbitrary number of mobile agents, |Ω| ≥ m + 1, can be localized in the presence of only one, (m + 1) − m, anchor. This is in stark contrast with most Bayesianbased localization algorithms that require a relatively large number of anchors. Also note that the traditional trilateration scheme with static agents requires at least 3 anchors in R2 . Therefore, assuming m+1 anchors in Rm has been standard in all trilateration-based localization algorithms in the literature, see e.g., [105], [125]. 9 See [124] for technically rigorous statements and a comprehensive discussion. 34 D. Effects of noise So far we assumed that the distance measurements that are used in (15) to compute the CayleyMenger determinants and motion vector in (35) are noiseless. In order to take measurement noise and inaccuracy in the motion model into account, we denote the true distance between any two nodes, i and j, measured at the time of communication, k, by deij , and assume that agent i can k only measure a noisy version of this distance: ij eij∗ dbij k = dk + rk , i ∈ Ω, (45) k where rij is the noise on the distance measurement at time k. We assume that agent i can obtain a noisy version of its motion: k ei∗ bik = x x k + ni , i ∈ Ω, (46) in which nki denotes the measurement noise at time k. The noise on the motion and distance measurements degrades the performance of the algorithm and in certain cases the location error is larger than the region of motion. We now provide the following modifications, M1-M3, to the proposed algorithm to counter the undesirable effects of noise. M1: If an agent is located close to the boundary of a convex hull, the noise on the distance measurements may affect the inclusion test results. According to (16), in order to get meaningful values for the areas and volumes in R2 and R3 , the corresponding Cayley-Menger determinants computed with perfect distance measurements must be negative and positive, respectively. Thus, an agent does not perform an inclusion test if the corresponding Cayley-Menger determinant is positive in R2 , or negative in R3 . M2: Even in the case of perfect distance measurements, the inclusion test results may not be accurate due to the noise on the motion, which in turn corresponds to imperfect location updates at each and every iteration. To address this issue, even if the inclusion test is passed at time k by a triangulation set, Θi (k), agent i performs an update only if P j∈Θi (k) AΘi (k)∪{i}\j − AΘi (k) ik = < , AΘi (k) (47) where ik is the relative inclusion test error at time k for agent i, and  is a design parameter. M3: After computing the weights using the noisy distance measurements, the updating agent normalizes the weights assigned to each neighbor in order to preserve convexity. 35 A detailed analysis addressing noise is beyond the scope of this paper and is discussed in more detail in [124]. We show the effectiveness of the above modifications via simulation in the next section. VIII. S IMULATIONS In this section, we provide simulation results to illustrate the effectiveness of the proposed mobile localization algorithm, (35), in the presence of one anchor in R2 . Let the true location of i∗ i∗ the i-th node, i ∈ Θ, be decomposed as xi∗ k = [xk yk ]. We consider Random Waypoint motion model, [90], which can be expressed for node i as follows: i∗ i i xi∗ k+1 = xk + dk+1 cos(θk+1 ), i∗ i yk+1 = yki∗ + dik+1 sin(θk+1 ), i denote the distance and angle traveled by node i, between time k and k +1, where dik+1 and θk+1 and are random. We choose, dik and θki , to have uniform distribution over the intervals [0 dmax = 5m] and [0 2π], respectively, such that the agents remain inside the region of interest. We assume that the noise on the distance and angle that agent i travels at time k are Gaussian with zero mean and the following variances, σdi 2 = Kd 2 Dki , σθi 2 = Kθ 2 Dki , where Dki represents the total distance that agent i has traveled up to time k. We also assume that the noise on the distance measurement at time k is normal with zero mean and the 2 variance of σri = Kr 2 k. Thus, the variances of the odometry measurements are proportional to the total distance an agent has traveled, and the variance on the distance measurements (to the neighboring agents) increases with time. Such assumptions are standard, e.g., in the robotics literature [63], [126]. In the beginning, all nodes are randomly deployed within a region, which is a 20 m × 20 m square. We set the communication radius to r = 2 m. All agents are initially assigned with random location estimates. We set αk = β = 0.01 to ensure that the agents do not completely forget the past information and α = 0.01 to guarantee a minimum contribution from the anchor when it is involved in an update. To characterize the convergence, we choose the second norm of the error vector, ek . It can be seen in Fig. 4 (Left) that the error in the localization algorithm 36 12 8000 5 agents 10 agents 20 agents 100 agents 6000 Iterations 8 6 1 n 5 agents 10 agents 20 agents 7000 4 Pn j=1 meani2+ (keik k2 ) 10 5000 4000 3000 2000 2 1000 0 0 1000 2000 0 3000 0 0.1 0.2 0.3 k! 0.4 0.5 ,k Fig. 4. (Left) Convergence; (Right) Effect of self-weights. converges to zero in the absence of noise for networks with one mobile anchor and 5, 10, 20, and 100 mobile agents. Fig. 4 (Right) shows the effect of increasing the self-weight on the rate of convergence for networks with 5, 10, 20 mobile agents. In Fig. 5 (Left), we show the 0.15 0.4 5 agents 10 agents 20 agents %Updates %Iterations 0.3 0.2 0.1 0.05 0.1 0 0 0 1 2 3 4 5 6 7 8 9 5 Number of neighbors 10 15 20 N Fig. 5. (Left) Number of neighbors; (Right) Number of updates/iterations. percentage of the iterations that an agent finds a different number of neighbors in those networks. For example, in a network of 5 agents and one anchor, an agent finds no neighbors during 40% of the iterations and finds only one neighbor in 38% of the iterations. Fig. 5 (Right) shows the ratio of the total number of updates to the number of iterations. In our simulations, we fix the number of iterations to 3000, and take the average over n = 20 Monte Carlo simulations. On average, an agent in networks with one anchor and 5, 10, and 20 agents, performs 31, 171, and 422 updates, respectively. Finally, Fig. 6 shows that with Kd = Kθ = Kr = 5 ∗ 10−3 , by modifying the algorithm according to Section VII-D (with  = 20%), the localization error is bounded by the communication radius. 37 Fig. 6. Modified algorithm with noise. IX. C ONCLUSIONS Motivated by the key role that location-awareness is expected to play in Fifth generation (5G) networks, as well as the rapidly growing interest on Internet-of-Things (IoT) and the significance of location information on a variety of IoT applications such as healthcare and surveillance, this paper considers localization in dynamic networks of mobile objects. We review Bayesianbased solutions as currently the most commonly used approaches to localization, especially in mobile networks; these solutions are non-linear, mainly centralized, and require a high density of anchors, nodes with known locations, in order to achieve accurate results. In order to avoid high computation costs and communication overhead associated with Bayesian-based solutions, we describe DILOC, an alternative linear framework for localization in static networks, which only requires local measurements, local communication, and low-order computation at each agent. Linearity is obtained by reparametrization of the agents’ location through barycentric coordinates. These are based on local neighborhood geometry and may be computed by CayleyMenger determinants. The Cayley-Menger determinants involve only local inter-agent distances. After studying the convergence of DILOC and its robustness to noise, we extend it to mobile scenarios, suitable for 5G enabled IoT environments, in which agents, users, and (possibly) anchors are dynamic. We show that the algorithm in Section VII can localize an arbitrary number 38 of mobile agents in the presence of at least one anchor. Section VII also considers the effects of noise on the localization algorithm for mobile agents. R EFERENCES [1] Mike Koivisto, Aki Hakkarainen, Mário Costa, Kari Leppänen, and Mikko Valkama, “Continuous device positioning and synchronization in 5G dense networks with skewed clocks,” in IEEE International Workshop on Signal Processing Advances in Wireless Communications (SPAWC), July 2017. [2] Klaus Witrisal, Paul Meissner, Erik Leitinger, Yuan Shen, Carl Gustafson, Fredrik Tufvesson, Katsuyuki Haneda, Davide Dardari, Andreas F. Molisch, Andrea Conti, and Moe Z. Win, “High-Accuracy Localization for Assisted Living: 5G systems will turn multipath channels from foe to friend,” IEEE Signal Processing Magazine, vol. 33, no. 2, pp. 59–70, 2016. [3] Leonardo Militano, Giuseppe Araniti, Massimo Condoluci, Ivan Farris, and Antonio Iera, “Device-to-device communications for 5G internet of things,” EAI Endorsed Transactions on Internet of Things, vol. 15, no. 1, pp. 1–15, 2015. [4] Mohsen Nadertehrani, Murat Uysal, and Halim Yanikomeroglu, “Device-to-device communication in 5G cellular networks: challenges, solutions, and future directions,” IEEE Communications Magazine, vol. 52, no. 5, pp. 86–92, May 2014. [5] Ping Zhang, Jian Lu, Yan Wang, and Qiao Wang, “Cooperative localization in 5G networks: A survey,” ICT Express, vol. 3, no. 1, pp. 27–32, 2017. [6] Aki Hakkarainen, Janis Werner, Mario Costa, Kari Leppanen, and Mikko Valkama, “High-efficiency device localization in 5G ultra-dense networks: Prospects and enabling technologies,” in Vehicular Technology Conference (VTC Fall). IEEE, 2015, pp. 1–5. [7] Rocco Di Taranto, Srikar Muppirisetty, Ronald Raulefs, Dirk Slock, Tommy Svensson, and Henk Wymeersch, “Locationaware communications for 5G networks: How location information can improve scalability, latency, and robustness of 5G,” IEEE Signal Processing Magazine, vol. 31, no. 6, pp. 102–112, 2014. [8] Tamoghna Ojha, Sudip Misra, and Narendra Singh Raghuwanshi, “Wireless sensor networks for agriculture: The stateof-the-art in practice and future challenges,” Computers and Electronics in Agriculture, vol. 118, pp. 66–84, 2015. [9] Nabil Ali Alrajeh, Shafiullah Khan, and Bilal Shams, “Intrusion detection systems in wireless sensor networks: a review,” International Journal of Distributed Sensor Networks, vol. 9, no. 5, pp. 1–7, 2013. [10] Chris R. Baker, Kenneth Armijo, Simon Belka, Merwan Benhabib, Vikas Bhargava, Nathan Burkhart, Artin Der Minassians, Gunes Dervisoglu, Lilia Gutnik, M Brent Haick, et al., “Wireless sensor networks for home health care,” in 21st International Conference on Advanced Information Networking and Applications Workshops, May 2007, vol. 2, pp. 832–837. [11] Behzad Bayat, Naveena Crasta, Alessandro Crespi, António M Pascoal, and Auke Ijspeert, “Environmental monitoring using autonomous vehicles: a survey of recent searching techniques,” Current Opinion in Biotechnology, vol. 45, pp. 76–84, 2017. [12] Henk Wymeersch, Jaime Lien, and Moe Z. Win, “Cooperative localization in wireless networks,” Proceedings of the IEEE, vol. 97, no. 2, pp. 427–450, 2009. [13] Priyanka Rawat, Kamal Deep Singh, Hakima Chaouchi, and Jean Marie Bonnin, “Wireless sensor networks: A survey on recent developments and potential synergies,” The Journal of Supercomputing, vol. 68, no. 1, pp. 1–48, 2014. [14] Th. D. Arampatzis, John Lygeros, and Stamatis Manesis, “A survey of applications of wireless sensors and wireless sensor networks,” in Proceedings of the 2005 IEEE International Symposium on Mediterrean Conference on Control and Automation Intelligent Control, June 2005, pp. 719–724. 39 [15] Neal Patwari, Joshua N. Ash, Spyros Kyperountas, Alfred O. Hero, Randolph L. Moses, and Neiyer S. Correal, “Locating the nodes: cooperative localization in wireless sensor networks,” IEEE Signal Processing Magazine, vol. 22, no. 4, pp. 54–69, 2005. [16] Fredrik Gustafsson and Fredrik Gunnarsson, “Mobile positioning using wireless networks: possibilities and fundamental limitations based on available wireless network measurements,” IEEE Signal Processing Magazine, vol. 22, no. 4, pp. 41–53, 2005. [17] Joe Albowicz, Alvin Chen, and Lixia Zhang, “Recursive position estimation in sensor networks,” in Ninth International Conference on Network Protocols. IEEE, 2001, pp. 35–41. [18] Chris Savarese, Jan M. Rabaey, and Jan Beutel, “Location in distributed ad-hoc wireless sensor networks,” in International Conference on Acoustics, Speech, and Signal Processing (ICASSP’01). IEEE, 2001, vol. 4, pp. 2037–2040. [19] Randolph L. Moses, Dushyanth Krishnamurthy, and Robert M. Patterson, “A self-localization method for wireless sensor networks,” EURASIP Journal on Advances in Signal Processing, vol. 2003, no. 4, pp. 839–843, 2003. [20] Giuseppe Destino and Giuseppe Abreu, “On the maximum likelihood approach for source and network localization,” IEEE Transactions on Signal Processing, vol. 59, no. 10, pp. 4954–4970, 2011. [21] Nikolas Kantas, Sumeetpal S. Singh, and Arnaud Doucet, “Distributed maximum likelihood for simultaneous selflocalization and tracking in sensor networks,” IEEE Transactions on Signal Processing, vol. 60, no. 10, pp. 5038–5047, 2012. [22] Yi Shang and Wheeler Ruml, “Improved MDS-based localization,” in Twenty-third Annual Joint Conference of the IEEE Computer and Communications Societies. IEEE, 2004, vol. 4, pp. 2640–2651. [23] Pratik Biswas, Tzu-Chen Lian, Ta-Chung Wang, and Yinyu Ye, “Semidefinite programming based algorithms for sensor network localization,” ACM Transactions on Sensor Networks (TOSN), vol. 2, no. 2, pp. 188–220, 2006. [24] Yichuan Ding, Nathan Krislock, Jiawei Qian, and Henry Wolkowicz, “Sensor network localization, Euclidean distance matrix completions, and graph realization,” in Proceedings of the First ACM International Workshop on Mobile Entity Localization and Tracking in GPS-less Environments. ACM, 2008, pp. 129–134. [25] Ming Cao, Brian D. O. Anderson, and A. Stephen Morse, “Localization with imprecise distance information in sensor networks,” in Proceedings of the 44th IEEE Conference on Decision and Control. IEEE, 2005, pp. 2829–2834. [26] Vaidyanathan Ramadurai and Mihail L. Sichitiu, “Localization in wireless sensor networks: A probabilistic approach,” in International Conference on Wireless Networks, 2003, pp. 275–281. [27] Rong Peng and Mihail L. Sichitiu, “Probabilistic localization for outdoor wireless sensor networks,” ACM SIGMOBILE Mobile Computing and Communications Review, vol. 11, no. 1, pp. 53–64, 2007. [28] Radhika Nagpal, Howard Shrobe, and Jonathan Bachrach, “Organizing a global coordinate system from local information on an ad hoc sensor network,” in Information Processing in Sensor Networks. Springer, 2003, pp. 333–348. [29] Yifeng Zhou, Jun Li, and Louise Lamont, “Multilateration localization in the presence of anchor location uncertainties,” in Global Communications Conference (GLOBECOM). IEEE, 2012, pp. 309–314. [30] Sol Lederer, Yue Wang, and Jie Gao, “Connectivity-based localization of large-scale sensor networks with complex shape,” ACM Transactions on Sensor Networks (TOSN), vol. 5, no. 4, pp. 31, 2009. [31] Angel Stanoev, Sonja Filiposka, Visarath In, and Ljupco Kocarev, “Cooperative method for wireless sensor network localization,” Ad Hoc Networks, vol. 40, pp. 61–72, 2016. [32] Yuan Shen and Moe Z. Win, “Fundamental limits of wideband localization-Part I: A general framework,” IEEE Transactions on Information Theory, vol. 56, no. 10, pp. 4956–4980, 2010. [33] Davide Dardari, Andrea Conti, Ulric Ferner, Andrea Giorgetti, and Moe Z. Win, “Ranging with ultrawide bandwidth signals in multipath environments,” Proceedings of the IEEE, vol. 97, no. 2, pp. 404–426, 2009. 40 [34] José M. F. Moura and Maria João D. Rendas, “Cramér-Rao bounds for location of unknown multiple sources in a multipath environment,” in Fifth ASSP Workshop on Spectrum Estimation and Modeling, Oct 1990, pp. 89–93. [35] José M. F. Moura and Arthur B. Baggeroer, “Passive systems theory with narrow-band and linear constraints: Part I-Spatial diversity,” IEEE Journal of Oceanic Engineering, vol. 3, no. 1, pp. 5–13, 1978. [36] Yuan Zhou, Choi Look Law, Yong Liang Guan, and Francois Chin, “Indoor elliptical localization based on asynchronous UWB range measurement,” IEEE Transactions on Instrumentation and Measurement, vol. 60, no. 1, pp. 248–257, 2011. [37] Stefania Bartoletti and Andrea Conti, “Passive network localization via UWB wireless sensor radars: The impact of TOA estimation,” in International Conference on Ultra-Wideband (ICUWB). IEEE, 2011, pp. 258–262. [38] Thomas Gigl, Gerard J. M. Janssen, Vedran Dizdarevic, Klaus Witrisal, and Zoubir Irahhauten, “Analysis of a UWB indoor positioning system based on received signal strength,” in 4th Workshop on Positioning, Navigation and Communication. IEEE, 2007, pp. 97–101. [39] Sam Safavi and Usman A. Khan, “Localization in mobile networks via virtual convex hulls,” IEEE Transactions on Signal and Information Processing over Networks, 2017. [40] Ali H. Sayed, Alireza Tarighat, and Nima Khajehnouri, “Network-based wireless location: challenges faced in developing techniques for accurate wireless location information,” IEEE Signal Processing Magazine, vol. 22, no. 4, pp. 24–40, 2005. [41] Sebastian Thrun, Dieter Fox, Wolfram Burgard, and Frank Dellaert, “Robust Monte Carlo localization for mobile robots,” Artificial Intelligence, vol. 128, no. 1, pp. 99–141, 2001. [42] Koen Langendoen and Niels Reijers, “Distributed localization in wireless sensor networks: a quantitative comparison,” Computer Networks, vol. 43, no. 4, pp. 499–518, 2003. [43] Sinan Gezici, Zhi Tian, Georgios B. Giannakis, Hisashi Kobayashi, Andreas F. Molisch, H. Vincent Poor, and Zafer Sahinoglu, “Localization via ultra-wideband radios: a look at positioning aspects for future sensor networks,” IEEE Signal Processing Magazine, vol. 22, no. 4, pp. 70–84, 2005. [44] Andrea Conti, Matteo Guerra, Davide Dardari, Nicolo Decarli, and Moe Z. Win, “Network experimentation for cooperative localization,” IEEE Journal on Selected Areas in Communications, vol. 30, no. 2, pp. 467–475, 2012. [45] Doron Blatt and Alfred O. Hero, “Energy-based sensor network source localization via projection onto convex sets,” IEEE Transactions on Signal Processing, vol. 54, no. 9, pp. 3614–3619, 2006. [46] Yuan Shen, Santiago Mazuelas, and Moe Z. Win, “Network navigation: Theory and interpretation,” IEEE Journal on Selected Areas in Communications, vol. 30, no. 9, pp. 1823–1834, 2012. [47] Joydeep Biswas, Brian Coltin, and Manuela Veloso, “Corrective gradient refinement for mobile robot localization,” in International Conference on Intelligent Robots and Systems (IROS), 2011, pp. 73–78. [48] Joydeep Biswas and Manuela M. Veloso, “Localization and navigation of the cobots over long-term deployments,” The International Journal of Robotics Research, vol. 32, no. 14, pp. 1679–1694, 2013. [49] Joydeep Biswas and Manuela Veloso, “WiFi localization and navigation for autonomous indoor mobile robots,” in International Conference on Robotics and Automation (ICRA). IEEE, 2010, pp. 4379–4384. [50] José M. N. Leitão and José M. F. Moura, “Acquisition in phase demodulation: application to ranging in radar/sonar systems,” IEEE Transactions on Aerospace and Electronic Systems, vol. 31, no. 2, pp. 581–599, April 1995. [51] Sam Safavi and Usman A. Khan, “A distributed range-based algorithm for localization in mobile networks,” in 50th Asilomar Conference on Signals, Systems and Computers, Nov 2016, pp. 1380–1384. [52] Guiling Wang, Guohong Cao, Tom La Porta, and Wensheng Zhang, “Sensor relocation in mobile sensor networks,” in 24th Annual Joint Conference of the IEEE Computer and Communications Societies. IEEE, 2005, vol. 4, pp. 2302–2312. [53] Benyuan Liu, Peter Brass, Olivier Dousse, Philippe Nain, and Don Towsley, “Mobility improves coverage of sensor 41 networks,” in Proceedings of the 6th ACM International Symposium on Mobile Ad Hoc Networking and Computing. ACM, 2005, pp. 300–308. [54] Alma Oracevic and Suat Ozdemir, “A survey of secure target tracking algorithms for wireless sensor networks,” in 2014 World Congress on Computer Applications and Information Systems (WCCAIS). IEEE, 2014, pp. 1–6. [55] Deborah Estrin, Ramesh Govindan, John Heidemann, and Satish Kumar, “Next century challenges: Scalable coordination in sensor networks,” in Proceedings of the 5th Annual ACM/IEEE International Conference on Mobile Computing and Networking. ACM, 1999, pp. 263–270. [56] David C. Steere, Antonio Baptista, Dylan McNamee, Calton Pu, and Jonathan Walpole, “Research challenges in environmental observation and forecasting systems,” in Proceedings of the 6th Annual International Conference on Mobile Computing and Networking. ACM, 2000, pp. 292–299. [57] Isaac Amundson and Xenofon D. Koutsoukos, “A survey on localization for mobile wireless sensor networks,” in Mobile Entity Localization and Tracking in GPS-less Environnments, pp. 235–254. Springer, 2009. [58] Eleonora Borgia, “The Internet of Things vision: Key features, applications and open issues,” Computer Communications, vol. 54, pp. 1–31, 2014. [59] Luigi Atzori, Antonio Iera, and Giacomo Morabito, “The Internet of Things: A survey,” Computer networks, vol. 54, no. 15, pp. 2787–2805, 2010. [60] Hemant Ghayvat, Subhas Mukhopadhyay, Xiang Gui, and Nagender Suryadevara, “WSN-and IOT-based smart homes and their extension to smart buildings,” Sensors, vol. 15, no. 5, pp. 10350–10379, 2015. [61] Stergios I. Roumeliotis and George A. Bekey, “Collective localization: A distributed Kalman filter approach to localization of groups of mobile robots,” in International Conference on Robotics and Automation. IEEE, 2000, vol. 3, pp. 2958–2965. [62] Stergios I. Roumeliotis and George A. Bekey, “Distributed multirobot localization,” IEEE Transactions on Robotics and Automation, vol. 18, no. 5, pp. 781–795, 2002. [63] Agostino Martinelli and Roland Siegwart, “Observability analysis for mobile robot localization,” in International Conference on Intelligent Robots and Systems. IEEE, 2005, pp. 1471–1476. [64] Agostino Martinelli, Frederic Pont, and Roland Siegwart, “Multi-robot localization using relative observations,” in Proceedings of the 2005 IEEE International Conference on Robotics and Automation. IEEE, 2005, pp. 2797–2802. [65] Fantian Kong, Youping Chen, Jingming Xie, Gang Zhang, and Zude Zhou, “Mobile robot localization based on extended Kalman filter,” in The Sixth World Congress on Intelligent Control and Automation. IEEE, 2006, vol. 2, pp. 9242–9246. [66] Nikolas Trawny, Stergios I. Roumeliotis, and Georgios B. Giannakis, “Cooperative multi-robot localization under communication constraints,” in IEEE International Conference on Robotics and Automation, May 2009, pp. 4394–4400. [67] Bong Su Cho, Woo Sung Moon, Woo Jin Seo, and Kwang Ryul Baek, “A dead reckoning localization system for mobile robots using inertial sensors and wheel revolution encoding,” Journal of Mechanical Science and Technology, vol. 25, no. 11, pp. 2907–2917, 2011. [68] Hamzah Ahmad and Toru Namerikawa, “Extended Kalman filter-based mobile robot localization with intermittent measurements,” Systems Science & Control Engineering: An Open Access Journal, vol. 1, no. 1, pp. 113–126, 2013. [69] Luis C. Carrillo-Arce, Esha D. Nerurkar, José L. Gordillo, and Stergios I. Roumeliotis, “Decentralized multi-robot cooperative localization using covariance intersection,” in International Conference on Intelligent Robots and Systems. IEEE, 2013, pp. 1412–1417. [70] Hao Li and Fawzi Nashashibi, “Cooperative multi-vehicle localization using split covariance intersection filter,” IEEE Intelligent Transportation Systems Magazine, vol. 5, no. 2, pp. 33–44, 2013. [71] Dieter Fox, Sebastian Thrun, Wolfram Burgard, and Frank Dellaert, “Particle filters for mobile robot localization,” Sequential Monte Carlo Methods in Practice, vol. 499, pp. 516, 2001. 42 [72] Masoomeh Rudafshani and Suprakash Datta, “Localization in wireless sensor networks,” in 6th International Symposium on Information Processing in Sensor Networks. IEEE, 2007, pp. 51–60. [73] Lingxuan Hu and David Evans, “Localization for mobile sensor networks,” in Proceedings of the 10th Annual International Conference on Mobile Computing and Networking. ACM, 2004, pp. 45–57. [74] Bram Dil, Stefan Dulman, and Paul Havinga, “Range-based localization in mobile sensor networks,” in Wireless Sensor Networks, pp. 164–179. Springer, 2006. [75] Jiyoung Yi, Sungwon Yang, and Hojung Cha, “Multi-hop-based Monte Carlo localization for mobile sensor networks,” in 4th Annual IEEE Communications Society Conference on Sensor, Mesh and Ad Hoc Communications and Networks. IEEE, 2007, pp. 162–171. [76] Aline Baggio and Koen Langendoen, “Monte Carlo localization for mobile wireless sensor networks,” Ad Hoc Networks, vol. 6, no. 5, pp. 718–733, 2008. [77] Enrique Stevens-Navarro, Vijayanth Vivekanandan, and Vincent W. S. Wong, “Dual and mixture Monte Carlo localization algorithms for mobile wireless sensor networks,” in Wireless Communications and Networking Conference. IEEE, 2007, pp. 4024–4028. [78] Jang-Ping Sheu, Wei-Kai Hu, and Jen-Chiao Lin, “Distributed localization scheme for mobile sensor networks,” IEEE Transactions on Mobile Computing, vol. 9, no. 4, pp. 516–526, 2010. [79] Dieter Fox, Wolfram Burgard, Hannes Kruppa, and Sebastian Thrun, “A probabilistic approach to collaborative multi-robot localization,” Autonomous Robots, vol. 8, no. 3, pp. 325–344, 2000. [80] Sebastian Thrun, Wolfram Burgard, and Dieter Fox, Probabilistic Robotics, MIT press, 2005. [81] Shigeng Zhang, Jiannong Cao, Chen Li-Jun, and Daoxu Chen, “Accurate and energy-efficient range-free localization for mobile sensor networks,” IEEE Transactions on Mobile Computing, vol. 9, no. 6, pp. 897–910, June 2010. [82] Scott Lenser and Manuela Veloso, “Sensor resetting localization for poorly modelled mobile robots,” in International Conference on Robotics and Automation, 2000, vol. 2, pp. 1225–1232. [83] Shigeng Zhang, Jiannong Cao, Lijun Chen, and Daoxu Chen, “Locating nodes in mobile sensor networks more accurately and faster,” in 5th Annual IEEE Communications Society Conference on Sensor, Mesh and Ad Hoc Communications and Networks. IEEE, 2008, pp. 37–45. [84] Usman A. Khan, Soummya Kar, and José M. F. Moura, “Distributed sensor localization in random environments using minimal number of anchor nodes,” IEEE Transactions on Signal Processing, vol. 57, no. 5, pp. 2000–2016, May 2009. [85] Usman A. Khan, Soummya Kar, and José M. F. Moura, “Linear theory for self-localization: Convexity, barycentric coordinates, and Cayley–Menger determinants,” IEEE Access, vol. 3, pp. 1326–1339, 2015. [86] Usman A. Khan, Soummya Kar, and José M. F. Moura, “DILAND: An algorithm for distributed sensor localization with noisy distance measurements,” IEEE Transactions on Signal Processing, vol. 58, no. 3, pp. 1940–1947, Mar. 2010. [87] Usman A. Khan, Soummya Kar, Bruno Sinopoli, and José M. F. Moura, “Distributed sensor localization in Euclidean spaces: Dynamic environments,” in 46th Annual Allerton Conference on Communication, Control, and Computing. IEEE, 2008, pp. 361–366. [88] Usman A. Khan, Soummya Kar, and José M. F. Moura, “Distributed localization and tracking with coordinated and uncoordinated motion models,” in 47th Annual Allerton Conference on Communication, Control, and Computing. IEEE, 2009, pp. 202–208. [89] Tracy Camp, Jeff Boleng, and Vanessa Davies, “A survey of mobility models for ad hoc network research,” Wireless Communications and Mobile Computing, vol. 2, no. 5, pp. 483–502, 2002. [90] Charles Perkins, Elizabeth Belding-Royer, and Samir Das, “Ad-hoc on-demand distance vector (AODV) routing,” in Second IEEE Workshop on Mobile Computing Systems and Applications, Feb 1999, pp. 90–100. 43 [91] Christian Schindelhauer, “Mobility in wireless networks,” in International Conference on Current Trends in Theory and Practice of Computer Science. Springer, 2006, pp. 100–116. [92] Xiaoyan Hong, Mario Gerla, Guangyu Pei, and Ching-Chuan Chiang, “A group mobility model for ad hoc wireless networks,” in Proceedings of the 2nd ACM International Workshop on Modeling, Analysis and Simulation of Wireless and Mobile Systems. ACM, 1999, pp. 53–60. [93] Guoqiang Mao, Barış Fidan, and Brian Anderson, “Wireless sensor network localization techniques,” Computer networks, vol. 51, no. 10, pp. 2529–2553, 2007. [94] S. Hamzehei and M. F. Duarte, “Compressive direction-of-arrival estimation off the grid,” in 2016 50th Asilomar Conference on Signals, Systems and Computers, Nov 2016, pp. 1081–1085. [95] Ian F Akyildiz, Weilian Su, Yogesh Sankarasubramaniam, and Erdal Cayirci, “Wireless sensor networks: a survey,” Computer networks, vol. 38, no. 4, pp. 393–422, 2002. [96] Dragoş Niculescu and Badri Nath, “DV based positioning in ad hoc networks,” Telecommunication Systems, vol. 22, no. 1-4, pp. 267–280, 2003. [97] Loukas Lazos and Radha Poovendran, “Serloc: Secure range-independent localization for wireless sensor networks,” in Proceedings of the 3rd ACM workshop on Wireless security. ACM, 2004, pp. 21–30. [98] Tian He, Chengdu Huang, Brian M Blum, John A Stankovic, and Tarek Abdelzaher, “Range-free localization schemes for large scale sensor networks,” in Proceedings of the 9th annual international conference on Mobile computing and networking. ACM, 2003, pp. 81–95. [99] Yingfei Diao, Zhiyun Lin, and Minyue Fu, “A barycentric coordinate based distributed localization algorithm for sensor networks,” IEEE Transactions on Signal Processing, vol. 62, no. 18, pp. 4760–4771, Sept 2014. [100] Dieter Fox, Jeffrey Hightower, Lin Liao, Dirk Schulz, and Gaetano Borriello, “Bayesian filtering for location estimation,” IEEE Pervasive Computing, vol. 2, no. 3, pp. 24–33, July 2003. [101] M Sanjeev Arulampalam, Simon Maskell, Neil Gordon, and Tim Clapp, “A tutorial on particle filters for online nonlinear/non-gaussian bayesian tracking,” IEEE Transactions on signal processing, vol. 50, no. 2, pp. 174–188, 2002. [102] Weidong Wang and Qingxin Zhu, “Sequential Monte Carlo localization in mobile sensor networks,” Wireless Networks, vol. 15, no. 4, pp. 481–495, 2009. [103] Dragos Niculescu and Badri Nath, “Ad hoc positioning system (APS) using AOA,” in Twenty-Second Annual Joint Conference of the IEEE Computer and Communications. IEEE, 2003, vol. 3, pp. 1734–1743. [104] Juan Liu, Ying Zhang, and Feng Zhao, “Robust distributed node localization with error management,” in Proceedings of the 7th ACM International Symposium on Mobile ad hoc Networking and Computing. ACM, 2006, pp. 250–261. [105] Federico Thomas and Lluı́s Ros, “Revisiting trilateration for robot localization,” IEEE Transactions on Robotics, vol. 21, no. 1, pp. 93–101, 2005. [106] Paul M. Maxim, Suranga Hettiarachchi, William M. Spears, Diana F. Spears, Jerry C. Hamann, Thomas Kunkel, and Caleb Speiser, “Trilateration localization for multi-robot teams,” in ICINCO-RA (2), 2008, pp. 301–307. [107] Yu Zhou, “An efficient least-squares trilateration algorithm for mobile robot localization,” in IEEE International Conference on Intelligent Robots and Systems, 2009, pp. 3474–3479. [108] Neal Patwari, Location Estimation in Sensor Networks, Ph.D. thesis, University of Michigan–Ann Arbor, 2005. [109] Yoon Gu Kim, Jinung An, and Ki Dong Lee, “Localization of mobile robot based on fusion of artificial landmark and RF TDOA distance under indoor sensor network,” International Journal of Advanced Robotic Systems, vol. 8, no. 4, pp. 203–211, September 2011. [110] Manfred J. Sippl and Harold A. Scheraga, “Cayley-Menger coordinates,” Proceedings of the National Academy of Sciences, vol. 83, no. 8, pp. 2283–2287, 1986. 44 [111] Claude H. Raifaizen, “A simpler proof of Heron’s formula,” Mathematics Magazine, vol. 44, no. 1, pp. 27–28, 1971. [112] August Ferdinand Möbius, Der barycentrische Calcul: ein neues Hlfsmittel zur analytischen Behandlung der Geometrie, Verlag, 1827. [113] Soummya Kar and José M. F. Moura, “Distributed consensus algorithms in sensor networks with imperfect communication: Link failures and channel noise,” IEEE Transactions on Signal Processing, vol. 57, no. 1, pp. 355–369, Jan 2009. [114] Soummya Kar and José M. F. Moura, “Distributed consensus algorithms in sensor networks: Quantized data and random link failures,” IEEE Transactions on Signal Processing, vol. 58, no. 3, pp. 1383–1400, 2010. [115] Cuiqin Hou, Yibin Hou, and Zhangqin Huang, “A framework based on barycentric coordinates for localization in wireless sensor networks,” Computer Networks, vol. 57, no. 17, pp. 3701–3712, 2013. [116] Mohammad Deghat, Iman Shames, Brian D. O. Anderson, and José M. F. Moura, “Distributed localization via barycentric coordinates: Finite-time convergence,” in 18th World Congress of the International Federation of Automatic Control, Milan, Italy. 2011, vol. 44, pp. 7824–7829, Elsevier. [117] GuoDong Kang, Tanguy Pérennou, and Michel Diaz, opportunistic wireless networks,” “Barycentric location estimation for indoors localization in in Second International Conference on Future Generation Communication and Networking. IEEE, 2008, vol. 1, pp. 220–225. [118] Usman A. Khan, Soummya Kar, and José M. F. Moura, “Higher dimensional consensus: Learning in large-scale networks,” IEEE Transactions on Signal Processing, vol. 58, no. 5, pp. 2836–2849, May 2010. [119] Mikhail B. Nevel’son and Rafail Z. Has’minskii, Stochastic Approximation and Recursive Estimation, American Mathematical Society, Providence, Rhode Island, 1973. [120] Sam Safavi and Usman A. Khan, “Asymptotic stability of LTV systems with applications to distributed dynamic fusion,” IEEE Transactions on Automatic Control, vol. 62, no. 11, pp. 5888–5893, Nov 2017. [121] Sam Safavi and Usman A. Khan, “On the convergence of time-varying fusion algorithms: Application to localization in dynamic networks,” in 55th Conference on Decision and Control (CDC), Dec 2016, pp. 4907–4912. [122] Sam Safavi and Usman A. Khan, “Unbounded connectivity: Asymptotic stability criteria for stochastic LTV systems,” in 2016 American Control Conference (ACC), July 2016, pp. 7019–7024. [123] Sam Safavi and Usman A. Khan, “Leader-follower consensus in mobile sensor networks,” IEEE Signal Processing Letters, vol. 22, no. 12, pp. 2249–2253, 2015. [124] S. Safavi and U. A. Khan, “An opportunistic linear-convex algorithm for localization in mobile robot networks,” IEEE Transactions on Robotics, vol. 33, no. 4, pp. 875–888, Aug 2017. [125] Luis E Navarro-Serment, Christiaan J. J. Paredis, and Pradeep K Khosla, “A beacon system for the localization of distributed robotic teams,” in Proceedings of the International Conference on Field and Service Robotics., 1999, vol. 6. [126] Kok Seng Chong and Lindsay Kleeman, “Accurate odometry and error modelling for a mobile robot,” in International Conference on Robotics and Automation. IEEE, 1997, vol. 4, pp. 2783–2788.
3cs.SY
Type-Based Analysis for Session Inference (Extended Abstract)⋆ arXiv:1510.03929v4 [cs.PL] 13 Apr 2016 Carlo Spaccasassi and Vasileios Koutavas Trinity College Dublin Abstract. We propose a type-based analysis to infer the session protocols of channels in an ML-like concurrent functional language. Combining and extending well-known techniques, we develop a type-checking system that separates the underlying ML type system from the typing of sessions. Without using linearity, our system guarantees communication safety and partial lock freedom. It also supports provably complete session inference for finite sessions with no programmer annotations. We exhibit the usefulness of our system with interesting examples, including one which is not typable in substructural type systems. 1 Introduction Concurrent programming often requires processes to communicate according to intricate protocols. In mainstream programming languages these protocols are encoded implicitly in the program’s control flow, and no support is available for verifying their correctness. Honda [6] first suggested the use of binary session types to explicitly describe and check protocols over communication channels with two endpoints. Fundamentally, session type systems guarantee that a program respects the order of communication events (session fidelity) and message types (communication safety) described in a channel’s session type. A number of session type systems (e.g., [2, 3, 16]) also ensure that processes fully execute the protocols of their open endpoints, as long as they do not diverge or block on opening new sessions (partial lock freedom). To date, binary session type disciplines have been developed for various process calculi and high-level programming languages (see [8] for an overview) by following one of two main programming language design approaches: using a single substructural type system for both session and traditional typing [5, 7, 18, 19], or using monads to separate the two [13, 16]. In this paper we propose a third design approach which uses effects. Similar to previous work, our approach enables the embedding of session types in programming languages with sophisticated type systems. Here we develop a high-level language where intricate protocols of communication can be programmed and checked statically (Sect. 2). Contrary to both monads and substructural type ⋆ This research was supported, in part, by Science Foundation Ireland grant 13/RC/2094. The first author was supported by MSR (MRL 2011-039). systems, our approach allows pure code to call library code with communication effects, without having to refactor the pure code (e.g., to embed it in a monad or pass continuation channels through it—see Ex. 2.3). We apply our approach to MLS , a core of ML with session communication (Sect. 3). Our approach separates traditional typing from session typing in a two-level system, which follows the principles of typed based analysis [12]. The first level employs a type-and-effect system, which adapts and extends the one of Amtoft, Nielson and Nielson [1] to session communication (Sect. 4). At this level the program is typed against an ML type and a behaviour which abstractly describes program structure and communication. Session protocols are not considered here—they are entirely checked at the second level. Thus, each endpoint is given type Sesρ , where ρ statically approximates its source. The benefit of extending [1] is that we obtain a complete behaviour inference algorithm, which extracts a behaviour for every program respecting ML types. At the second level, our system checks that a behaviour, given an operational semantics, complies with the session types of channels and endpoints (Sect. 5). The session discipline realised here is inspired by the work of Castagna et al. [3]. This discipline guarantees that programs comply with session fidelity and communication safety, but also, due to stacked interleaving of sessions, partial lock freedom. However, one of the main appeals of our session typing discipline is that it enables a provably complete session types inference from behaviours which, with behaviour inference, gives us a complete method for session inference from MLS , without programmer annotations (Sect. 6). The two levels of our system only interact through behaviours, which we envisage will allow us to develop front-ends for different languages and back-ends for different session disciplines. To simplify the technical development we consider only sessions of finite interactions. However, we allow recursion in the source language, as long as it is confined : recursive code may only open new sessions and completely consume them (see Sect. 2). In Sect. 7 we discuss an extension to recursive types. Related work and conclusions can be found in Sect. 8. Details missing from this extended abstract can be found in the appendix for the benefit of the reviewers. 2 Motivating Examples Example 2.1 (A Swap Service). A coordinator process uses the primitive acc-swp to accept two connections on a channel swp (we assume functions acc-c and req-c for every channel c), opening two concurrent sessions with processes that want to exchange values. It then coordinates the exchange and recurs. let fun coord( ) = let val p1 = acc-swp () val x1 = recv p1 val p2 = acc-swp () val x2 = recv p2 in send p2 x1; send p1 x2; coord () in spawn coord; let fun swap(x) = let val p = req-swp () in send p x; recv p in spawn (fn => swap 1); spawn (fn => swap 2); Each endpoint the coordinator receives from calling acc-swp are used according to the session type ?T.!T.end. This says that, on each endpoint, the coordinator will first read a value type T (?T ), then output a value of the same type (!T ) and close the endpoint (end). The interleaving of sends and receives on the two endpoints achieves the desired swap effect. Function swap : Int→T ′ calls req-swp and receives and endpoint which is used according to the session type !Int.?T ′ .end. By comparing the two session types above we can see that the coordinator and the swap service can communicate without type errors, and indeed are typable, when T = Int = T ′ . Our type inference algorithm automatically deduces the two session types from this code. Because swp is a global channel, ill-behaved client code can connect to it too: let val p1 = req-swp () in send p1 1; let val p2 = req-swp () in send p2 2; let val (x1, x2) = (recv p1, recv p2) in ecl This client causes a deadlock, because the coordinator first sends on p2 and then on p1, but this code orders the corresponding receives in reverse. The interleaving of sessions in this client is rejected by our type system because it is not well-stacked : recv p1 is performed before the most recent endpoint (p2) is closed. The interleaving in the coordinator, on the other hand, is well-stacked. Example 2.2 (Delegation for Efficiency). In the previous example the coordinator is a bottleneck when exchanged values are large. A more efficient implementation delegates exchange to the clients: let fun coord( ) = let val p1 = acc-swp () in sel-SWAP p1; let val p2 = acc-swp in sel-LEAD p2; deleg p2 p1; coord() let fun swap(x) = let val p = req-swp () in case p { SWAP: send p x; recv p LEAD: let val q = resume p val y = recv q in send q x; y } Function swap again connects to the coordinator over channel swp, but now offers two choices with the labels SWAP and LEAD. If the coordinator selects the former, the swap method proceeds as before; if it selects the latter, swap resumes (i.e., inputs) another endpoint, binds it to q, and performs a rcv and then a send on q. The new coordinator accepts two sessions on swp, receiving two endpoints: p1 and p2. It selects SWAP on p1, LEAD on p2, sends p1 over p2 and recurs. When our system analyses the coordinator in isolation, it infers the protocol ηcoord = (!SWAP.η ′ ⊕ !LEAD.!η ′ .end) for both endpoints p1 and p2. When it analyses swap : T1 → T2 , it infers ηp = Σ{?SWAP.!T1 .?T2 .end, ?LEAD.?ηq .end} and ηq = ?T2 .!T1 .end as the protocols of p and q, respectively. The former selects either options SWAP or LEAD and the latter offers both options. If the coordinator is type-checked in isolation, then typing succeeds with any η ′ : the coordinator can delegate any session. However, because of duality, the typing of req-swp in the swap function implies that η ′ = ηq and T1 = T2 . Our inference algorithm can type this program and derive the above session types. Example 2.3 (A Database Library). In this example we consider the implementation of a library which allows clients to connect to a database. let fun coord( ) = let val p = acc-db () fun loop( ) = case p { QRY: let val sql = recv p val res = process sql in send p res; loop () END: () } in spawn coord; loop () in spawn coord; let fun clientinit ( ) = let val con = req-db () fun query( sql ) = sel-QRY con; send con sql; recv con fun close ( ) = sel-END con in (query, close) in eclient The coordinator accepts connections from clients on channel db. If a connection is established, after spawning a copy of the coordinator to serve other clients, the coordinator enters a loop that serves the connected client. In this loop it offers the client two options: QRY and END. If the client selects QRY, the coordinator receives an SQL query, processes it (calling process : sql → dbresult, with these types are defined in the library), sends back the result, and loops. If the client selects END the connection with the coordinator closes and the current coordinator process terminates. Function clientinit is exposed to the client, which can use it to request a connection with the database coordinator. When called, it establishes a connection con and returns two functions to the client: query and close. Then, the client code eclient can apply the query function to an sql object and receive a dbresult as many times as necessary, and then invoke close to close the connection. Using our two-level inference system with recursion Sect. 7, we can infer the session type of the coordinator’s endpoint p: µX.Σ{?QRY.?sql.!dbresult.X, ?END.end}, and check whether the client code eclient respects it. This example is not typable with a substructural type system because query and close share the same (linear) endpoint con. Moreover, in a monadic system eclient will need to be converted to monadic form. 3 Syntax and Operational Semantics of MLS Fig. 1 shows the syntax and operational semantics of MLS , a core of ML with session communication. An expression can be one of the usual lambda expressions or spawn e which evaluates e to a function and asynchronously applies it to the unit value; it can also be case e {Li : ei }i∈I which, as we will see, implements finite external choice. We use standard syntactic sugar for writing programs. A system S is a parallel composition of closed expressions (processes). The operational semantics of MLS are standard; here we only discuss sessionrelated rules. Following the tradition of binary session types [7], communication between processes happens over dynamically generated entities called sessions which have exactly two endpoints. Thus, MLS values contain a countably infinite set of endpoints, ranged over by p. We assume a total involution (·) over this set, with the property p 6= p, which identifies dual endpoints. e ::= v (e, e) e e let x = e in e if e then e else e spawn e case e {Li : ei }i∈I S ::= e S k S v ::= x k ∈ Const (v, v) fn x ⇒ e fun f (x) = e p req-c acc-c send recv sel-L deleg resume ECxt: E ::= [·] (E, e) (v, E) E e v E let x = E in e if E then e else e spawn E case E {Li : ei }i∈I Exp: Sys: Val: RIft if tt then e1 else e2 ֒→ e1 RIff if ff then e1 else e2 ֒→ e2 RLet let x = v in e ֒→ e[v/x] RFix (fun f (x) = e) v ֒→ e[fun f (x) = e/f ][v/x] RBeta E[e] k S RSpn E[spawn v] k S RInit E1 [req-c ()] k E2 [acc-c ()] k S RCom E1 [send (p, v)] k E2 [recv p] k S RDel E1 [deleg (p, p′ )] k E2 [resume p] k S RSel E1 [sel-Lj p] k E2 [case p {Li : ei }i∈I ] k S −→ E[e′ ] k S if e ֒→ e′ −→ E[()] k v () k S −→ E1 [p] k E2 [p] k S if p, p fresh −→ E1 [()] k E2 [v] k S −→ E1 [()] k E2 [p′ ] k S −→ E1 [()] k E2 [ej ] k S if j ∈ I Fig. 1. MLS syntax and operational semantics. A process can request (or accept) a new session by calling req-c (resp., acc-c) with the unit value, which returns the endpoint (resp., dual endpoint) of a new session. Here c ranges over an infinite set of global initialisation channels. To simplify presentation, the language contains req-c and acc-c for each channel c. Once two processes synchronise on a global channel and each receives a fresh, dual endpoint (RInit reduction), they can exchange messages (RCom), delegate endpoints (RDel) and offer a number of choices Li∈I , from which the partner can select one (RSel). Here L ranges over a countably infinite set of choice labels, and I is a finite set of natural numbers; Li denotes a unique label for each natural number i and we assume sel-Li for each Li . The next two sections present the two-level type system of MLS . 4 First Level Typing: ML Typing and Behaviours Here we adapt and extend the type-and-effect system of Amtoft, Nielson and Nielson [1] to session communication in MLS . A judgement C; Γ ⊢ e : T ⊲ b states that e has type T and behaviour b, under type environment Γ and constraint environment C. The constraint environment relates type-level variables to terms and enables type inference. These components are defined in Fig. 2. An MLS expression can have a standard type or an endpoint type Sesρ . Function types are annotated with a behaviour variable β. Type variables α are used for ML polymorphism. As in [1], Hindley-Milner polymorphism is extended with type schemas TS of the form ∀(~γ :C0 ). T , where γ ranges over variables α, β, ρ, ψ, and C0 imposes constraints on the quantified variables with fv(C0 ) ⊆ {~γ }. Type environments Γ bind program variables to type schemas; we let ∀(∅).T = T . The rules of our type-and-effect system are shown in Fig. 3 which, as in [1, Sec. 2.8], is a conservative extension of ML. This system performs both ML Variables: α(Type) β(Behaviour) ~ ρψ ~ : C). T T. Schemas: TS ::= ∀(~ αβ~ Types: Constraints: Behaviours: ψ(Session) ρ(Region) Regions: r ::= l ρ β T ::= Unit Bool Int T × T T → T Sesρ α C ::= T ⊆ T cfd (T ) b ⊆ β ρ ∼ r c ∼ η c ∼ η η ⊲⊳ η C, C ǫ b ::= β τ b ; b b ⊕ b recβ b spawn b push(l : η) ρ!T ρ?T ρ!ρ ρ?l ρ!Li & {ρ?Li ; bi } i∈I Type Envs: Γ ::= x : TS Γ, Γ ǫ Fig. 2. Syntax of types, behaviours, constraints, and session types. type checking (including type-schema inference), and behaviour checking (which enables behaviour inference). Rules TLet, TVar, TIf, TConst, TApp, TFun, TSpawn and the omitted rule for pairs perform standard type checking and straightforward sequential (b1 ; b2 ) and non-deterministic (b1 ⊕ b2 ) behaviour composition; τ is the behaviour with no effect. Just as a type constraint T ⊆ α associates type T with type variable α, a behaviour constraint b ⊆ β associated behaviour b to behaviour variable β. Intuitively, β is the non-deterministic composition of all its associated behaviours. Rule TSub allows the replacement of behaviour b with variable β; such replacement in type annotations yields a subtyping relation (C ⊢ T <: T ′ ). Rules TIns and TGen are taken from [1] and extend ML’s type schema instantiation and generalisation rules, respectively. Because we extend Hindley-Milner’s let polymorphism, generalisation (TGen) is only applied to the right-hand side expression of the let construct. The following definition allows the instantiation of a type schema under a global constraint environment C. We write C ⊢ C ′ when C ′ is included in the reflexive, transitive, compatible closure of C. Definition 4.1 (Solvability). ∀(~γ : C0 ). T is solvable by C and substitution σ when dom(σ) ⊆ {~γ } and C ⊢ C0 σ. In TRec, the communication effect of the body of a recursive function should be confined, which means it may only use endpoints it opens internally. For this reason, the function does not input nor return open endpoints or other non-confined functions (C ⊢ confd (T, T ′ )). Although typed under Γ which may contain endpoints and non-confined functions, the effect of the function body is recorded in its behaviour. The second level of our system checks that if the function is called, no endpoints from its environment are affected. It also checks that the function fully consumes internal endpoints before it returns or recurs. A type T is confined when it does not contain any occurrences of the endpoint type Sesρ for any ρ, and when any b in T is confined. A behaviour b is confined when all of its possible behaviours are either τ or recursive. To understand rule TEndp, we have to explain region variables (ρ), which are related to region constants through C. Region constants are simple program annotations l (produced during pre-processing) which uniquely identify the textual TLet C; Γ ⊢ e1 : TS ⊲ b1 C; Γ, x : TS ⊢ e2 : T ⊲ b2 C; Γ ⊢ let x = e1 in e2 : T ⊲ b1 ; b2 TIf C; Γ ⊢ e1 : Bool ⊲ b1 C; Γ ⊢ ei : T ⊲ bi (i∈{1,2}) C; Γ ⊢ if e1 then e2 else e3 : T ⊲ b1 ; (b2 ⊕ b3 ) TApp β C; Γ ⊢ e1 : T ′ → T ⊲ b1 C; Γ ⊢ e2 : T ′ ⊲ b2 C; Γ ⊢ e1 e2 : T ⊲ b1 ; b2 ; β TMatch C; Γ ⊢ e : Sesρ ⊲ b C; Γ ⊢ ei : T ⊲ bi TVar C; Γ ⊢ x : Γ (x) ⊲ τ TConst C; Γ ⊢ k : typeof (k) ⊲ τ TFun C; Γ, x : T ⊢ e : T ′ ⊲ β β C; Γ ⊢ fn x ⇒ e : T → T ′ ⊲ τ (i∈I) C; Γ ⊢ case e {Li : ei }i∈I : T ⊲ b ; & {ρ?Li ; bi } TEndp C; Γ ⊢ pl : Sesρ ⊲ τ C ⊢ ρ ∼ l i∈I β TSpawn C; Γ ⊢ e : Unit → Unit ⊲ b C; Γ ⊢ spawn e : Unit ⊲ b ; spawn β TSub C; Γ ⊢ e : T ⊲ b C ⊢ T <: T ′ C; Γ ⊢ e : T ⊲ β C ⊢ b ⊆ β ′ β TRec TIns C; Γ, f : T → T ′ , x : T ⊢ e : T ′ ⊲ b C ⊢ confd (T, T ′ ) β C; Γ ⊢ fun f (x) = e : T → T ′ ⊲ τ C ⊢ recβ b ⊆ β C; Γ ⊢ e : ∀(~γ : C0 ).T ⊲ b dom(σ) ⊆ {~γ } ∀(~γ : C0 ). T is solvable by C and σ C; Γ ⊢ e : T σ ⊲ b TGen C ∪ C0 ; Γ ⊢ e : T ⊲ b {~γ } ∩ fv(Γ, C, b) = ∅ C; Γ ⊢ e : ∀(~γ : C0 ).T ⊲ b ∀(~γ : C0 ).T is solvable by C and some σ Fig. 3. Type-and-Effect System for MLS Expressions (omitting rule for pairs). sources of endpoints. We thus type an extended MLS syntax Values: v ::= . . . pl req-cl acc-cl resumel If a sub-expression has type Sesρ and it evaluates to a value pl , then it must be that C ⊢ ρ ∼ l, denoting that p was generated from the code location identified by l. This location will contain one of req-cl , acc-cl , or resumel . These primitive functions (typed by TConst) are given the following type schemas. β req-cl : ∀(βρψ : push(l : ψ) ⊆ β, ρ ∼ l, c ∼ ψ). Unit → Sesρ β : ∀(βρψ : push(l : ψ) ⊆ β, ρ ∼ l, c ∼ ψ). Unit → Sesρ acc-cl β resume : ∀(βρρ′ : ρ?l ⊆ β, ρ′ ∼ l). Sesρ → Sesρ l ′ An application of req-cl starts a new session on the static endpoint l. To type it, C must contain its effect push(l : ψ) ⊆ β, where ψ is a session variable, representing the session type of l. At this level session types are ignored (hence the use of a simple ψ); they become important in the second level of our typing system. Moreover, C must record that session variable ρ is related to l (ρ ∼ l) and that the “request” endpoint of channel c has session type ψ (c ∼ ψ). The only difference in the type schema of acc-cl is that the “accept” endpoint of c is related to ψ (c ∼ ψ). Resume receives an endpoint (ρ′ ) over another one (ρ), recorded in its type schema (ρ?ρ′ ⊆ β); ρ is an existing endpoint but ρ′ is treated as an endpoint generated by resumel , hence the constraint ρ′ ∼ l. The following are the type schemas of the rest of the constant functions. β recv : ∀(αβρ : ρ?α ⊆ β, cfd(α)). Sesρ → α β send : ∀(αβρ : ρ!α ⊆ β, cfd(α)). Sesρ × α → Unit ′ β deleg : ∀(βρρ′ : ρ!ρ′ ⊆ β). Sesρ × Sesρ → Unit β sel-L : ∀(βρ : ρ?L ⊆ β). Sesρ → Unit These record input (ρ?α), output (ρ!α), delegation (ρ!ρ′ ), or selection (ρ!Li ) behaviour. For input and output the constraint cfd (α) must be in C, recording that the α can be instantiated only with confined types. 5 Second Level Typing: Session Types Session types describe the communication protocols of endpoints; their syntax is: η ::= end !T.η ?T.η !η.η ?η.η ⊕{Li : ηi } &{Li : ηi } ψ i∈I i∈(I1 ,I2 ) A session type is finished (end) or it can describe further interactions: the input (?T.η) or output (!T.η) of a confined value T , or the delegation (!η ′ .η) or resumption (?η ′ .η) of an endpoint of session type η ′ , or the offering of non-deterministic selection (⊕{Li : ηi }i∈I ) of a label Li , signifying that session type ηi is to be followed next. Moreover, a session type can offer an external choice &{Li : ηi }i∈(I1 ,I2 ) to its communication partner. Here I1 contains the labels that the process must be able to accept and I2 the labels that it may accept. We require that I1 and I2 are disjoint and I1 is not empty. Although a single set would suffice, the two sets make type inference deterministic and independent of source code order. We express our session typing discipline as an abstract interpretation semantics for behaviours shown in Fig. 4. It describes transitions of the form ∆b− →C ∆′  b′ , where b, b′ are behaviours. The ∆ and ∆′ are stacks on which static endpoint labels together with their corresponding session types (l : η) can be pushed and popped. Inspired by Castagna et al. [3], in the transition ∆b− →C ∆′  b′ , behaviour b can only use the top label in the stack to communicate, push another label on the stack, or pop the top label provided its session type is end. This stack principle gives us a partial lock freedom property (Cor. A.1). Rule End from Fig. 4 simply removes a finished stack frame, and rule Beta looks up behaviour variables in C; Plus chooses one of the branches of nondeterministic behaviour. The Push rule extends the stack by adding one more frame to it, as long as the label has not been added before on the stack (see Ex. 5.2). Rules Out and In reduce the top-level session type of the stack by an output and input, respectively. The requirement here is that the labels in the (l : end) · ∆  b − →C ∆  b End : Beta : ∆β− →C ∆  b if C ⊢ b ⊆ β Plus : ∆  b1 ⊕ b2 − → C ∆  bi if i ∈ {1, 2} ∆  push(l : η) − →C (l : η) · ∆  τ Push : Out : In : if l 6∈ ∆.labels (l : !T.η) · ∆  ρ!T ′ − →C (l : η) · ∆  τ if C ⊢ ρ ∼ l, T ′ <: T (l : ?T.η) · ∆  ρ?T ′ − →C (l : η) · ∆  τ if C ⊢ ρ ∼ l, T <: T ′ Del : (l : !ηd .η) · (ld : ηd′ ) · ∆  ρ!ρd →C (l : η) · ∆  τ − if C ⊢ ρ ∼ l, ρd ∼ ld , ηd′ <: ηd (l : ?ηr .η)  ρ?lr − →C (l : η) · (lr : ηr )  τ if (l 6= lr ), C ⊢ ρ ∼ l Res : ICh : (l : ⊕{Li : ηi }) · ∆  ρ!Lj − →C (l : ηj ) · ∆  τ i∈I if (j ∈ I), C ⊢ ρ ∼ l ECh : (l : &{Li : ηi }) · ∆  & {ρ?Lj ; bj } i∈(I1 ,I2 ) j∈J →C (l : ηk ) · ∆  bk − Rec : ∆  recβ b − →C ∆  τ Spn : ∆  spawn b − →C ∆  τ Seq : Tau : ∆  b1 ; b2 − →C ∆′  b′1 ; b2 if k ∈ J, C ⊢ ρ ∼ l, I1 ⊆ J ⊆ I1 ∪ I2 if ǫ  b ⇓C ′ , C ′ = (C\(recβ b ⊆ β))∪(τ ⊆ β) if ǫ  b ⇓C if ∆  b1 − →C ∆′  b′1 ∆  τ ;b − →C ∆  b Fig. 4. Abstract Interpretation Semantics. stack and the behaviour match, the usual subtyping [4] holds for the communicated types, and that the communicated types are confined. Note that sending confined (recursive) functions does not require delegation of endpoints. Transfer of endpoints is done by delegate and resume (rules Del and Res). Delegate sends the second endpoint in the stack over the first; resume mimics this by adding a new endpoint label in the second position in the stack. Resume requires a one-frame stack to guarantee that the two endpoints of the same session do not end up in the same stack, thus avoiding deadlock [3]. If we abandon the partial lock freedom property guaranteed by our type system, then the conditions in Res can be relaxed and allow more than one frame. A behaviour reduces an internal choice session type by selecting one of its labels (ICh). A behaviour offering an external choice is reduced non-deterministically to any of its branches (ECh). The behaviour must offer all active choices (I1 ⊆ J) and all behaviour branches must be typable by the session type (J ⊆ I1 ∪ I2 ). As we previously explained, recursive functions in MLS must be confined. This means that the communication effect of the function body is only on endpoints that the function opens internally, and the session type of these endpoints is followed to completion (or delegated) before the function returns or recurs. This is enforced in Rule Rec, where recβ b must have no net effect on the stack, guaranteed by ǫ  b ⇓C ′ . Here C ′ = (C\(recβ b ⊆ β))∪(τ ⊆ β) is the original C with constraint (recβ b ⊆ β) replaced by (τ ⊆ β) (cf., Def. 5.1). This update (a) let val (p1, p2) = (req-cl1 , req-dl2 ) val p3 = if e then p1 else p2 in send p3 tt (b) let fun f val p1 in send p1 let val = req-cl = f () 1; p2 = f () in send p1 2; Fig. 5. Examples of aliasing of C prevents the infinite unfolding of recb β. Spawned processes must also be confined (Spn). We work with well-formed constraints: Definition 5.1 (Well-Formed Constraints). C is well-formed if: 1. Type-Consistent: for all type constructors tc1 , tc2 , if (tc1 (~t1 ) ⊆ tc2 (~t2 )) ∈ C, then tc1 = tc2 , and for all t1i ∈ ~t1 and t2i ∈ ~t2 , (t1i ⊆ t2i ) ∈ C. 2. Region-Consistent: if C ⊢ l ∼ l′ then l = l′ . 3. Behaviour-Compact: behaviour constraints cycles contain a (recβ b ⊆ β) ∈ C; also if (recβ b ⊆ β ′ ) ∈ C then β = β ′ and ∀(b′ ⊆ β) ∈ C, b′ = recβ b. 4. Well-Confined: if C ⊢ confd (T ) then T 6= Sesρ ; also if C ⊢ confd (b) then b 6∈ {ρ!T, ρ?T, ρ!ρ, ρ?l, ρ!Li , & {ρ?Li ; bi }}. i∈I The first and fourth conditions are straightforward. The third condition disallows recursive behaviours through the environment without the use of a recβ b effect. All well-typed MLS programs contain only such recursive behaviours because recursion is only possible through the use of a recursive function. The second part of the condition requires that there is at most one recursive constraint in the environment using variable β. This is necessary for type preservation and decidability of session typing. The second condition of Def. 5.1 requires that only endpoints from a single source can flow in each ρ, preventing aliasing of endpoints generated at different source locations. Example 5.1 (Aliasing of Different Sources). Consider the program in Fig. 5 (a). Which endpoint flows to p3 cannot be statically determined and therefore the program cannot yield a consistent session type for channels c and d. The program will be rejected in our framework because p3 has type Sesρ and from the constrain environment C ⊢ ρ ∼ l1 , ρ ∼ l2 , which fails Def. 5.1. Because endpoints generated from the same source code location are identified in our system, stacks are treated linearly: an endpoint label l may only once be pushed onto a stack. Every stack ∆ contains an implicit set of the labels ∆.labels to record previously pushed labels. Example 5.2 (Aliasing From Same Source). Consider the program in Fig. 5 (b) where endpoint p1 has type Sesρ , with C ⊢ ρ ∼ l. The program has behaviour push(l : η); ρ!Int; push(l : η); ρ!Int; τ . Label l is pushed on the stack twice and the behaviour complies with the session type η = !Int.end. However the program does not respect this session type because it sends two integers on p1 and none on p2. Our system rejects this program due to the violation of stack linearity. Our system also rejects the correct version of the program in Fig. 5 (b), where the last send is replaced by send p2 2. This is because the label l associated with the variable ρ of a type Sesρ is control flow insensitive. Existing techniques can make labels control flow sensitive (e.g., [14, 15]). Using the semantics of Fig. 4 we define the following predicate which requires behaviours to follow to completion or delegate all (l : η) frames in a stack. ~ ′ when for all b′ , ∆′ Definition 5.2 (Strong normalization). ∆  b ⇓C ∆ ∗ ′ ′ ′ ~ ′ }. We write such that ∆  b − →C ∆  b 6→C we have b = τ and ∆′ ∈ {∆ ∆  b ⇓C when ∆  b ⇓C ǫ, where ǫ is the empty stack. Lastly, session types on dual session endpoints (c ∼ η, c ∼ η ′ ) must be dual (C ⊢ η ⊲⊳ η ′ ) The definition of duality is standard, with the exception that internal choice is dual to external choice only if the labels in the former are included in the active labels in the latter. Definition 5.3 (Valid Constraint Environment). C is valid if there exists a substitution σ of variables ψ with closed session types, such that Cσ is wellformed and for all (c ∼ η), (c ∼ η ′ ) ∈ Cσ we have C ⊢ η ⊲⊳ η ′ . Combining the Two Levels The key property here is well-stackedness, the fact that in a running system where each process has a corresponding stack of endpoints, there is a way to repeatedly remove pairs of endpoints with dual session types from the top of two stacks, until all stacks are empty. Definition 5.4 (Well-stackedness). C ws S is the least relation satisfying:   C ⊢ η ⊲⊳ η ′ p, p ♯ ∆, ∆′ , S C ws S, ∆  b, e , ∆′  b′ , e′   ′ C ws ǫ C ws S, (pl : η) · ∆  b, e , (pl : η ′ ) · ∆′  b′ , e′ Note that this does not mean that programs are deterministic. Multiple pairs of endpoints may be at the top of a set of stacks. Duality of endpoints guarantees that communications are safe; the ordering of endpoints in removable pairs implies the absence of deadlocks.  We let P , Q range over tuples of the form ∆  b, e and S over sequences of such tuples. In this section stack frames (pl : η) store both endpoints and their −−−−−−−→ −−−−−→ ∆  b, e if C is well-formed and valid, (C; ∅ ⊢ e : T ⊲ b), labels. We write C −−−→ → − → − and (∆  b ⇓C ), for some T . We write C ws S if ∆ is well-stacked. Well-typed systems enjoy session fidelity and preserve typing and well-stackedness. −−−−−→ → → Theorem 5.1. Let S = ∆  b, e and C S and C ws S and − e −→ − e ′ ; then − − − − − − − − →  →′ →′ − − there exist ∆ , b such that S ′ = ∆′  b′ , e′ and: 1. C S ′ (Type Preservation) −−−→ ∗ −−′−−→′ 2. ∆  b →C ∆  b (Session Fidelity) 3. C ws S ′ (Well-Stackedness Preservation) Session fidelity and well-stackedness preservation imply communication safety, since the former guarantees that processes are faithful to session types in the stacks, while the latter that session types are dual for each pair of open endpoints p and p̄. Moreover, well-stackedness implies deadlock freedom. P depends on Q if the endpoint at the top of P ’s stack has dual endpoint in Q. Lemma 5.1 (Deadlock Freedom). C ws S; dependencies in S are acyclic. Type soundness is more technical. We divide system transitions to communication transitions between processes (−→c ) and internal transitions (−→i ). Let S −→c S ′ (S −→i S ′ ) when S −→ S ′ , derived by Rule RInit, RCom, RDel or RSel of Fig. 1 (resp., any other rule); S =⇒c S ′ when S −→∗i −→c −→∗i S ′ . Theorem 5.2 (Type Soundness). Let C S and C ws S. Then 1. S =⇒c S ′ , or 2. S −→∗i (F , D, W, B) such that:  Finished processes, F : ∀P ∈ F . P = ǫ  τ, v , for some v; Diverging processes, D: ∀P ∈ D. P −→∞ i ;  l l Waiting proc., W: ∀P ∈ W. P = ∆  b, E[e] and  e ∈ {req-c , acc-c }; Blocked processes, B: ∀P ∈ B. P = ∆  b, E[e] and e ∈ {send v, recv v, deleg v, resume v, sel-L v, case v {Li ⇒ ei }i∈I } and P transitively depends on a process in D ∪ W. A well-typed and well-stacked MLS system will either be able to perform a communication, or, after finite internal steps, it will reach a state where some processes are values (F ), some internally diverge (D), some are waiting for a partner process to open a session (W), and some are blocked on a session communication (B). Crucially, in states where communication is not possible, B transitively depends on D ∪ W. Thus, in the absence of divergence and in the presence of enough processes to start new sessions, no processes can be blocked; the system will either perform a communication or it will terminate (partial lock freedom). Corollary 5.1 (Partial Lock Freedom). If C S −→∗i (F , ∅, ∅, B) then B = ∅. 6 S, C ws S, and S 6=⇒c and Inference Algorithm We use three inference algorithms, W, SI and D. The first infers functional types and communication effects and corresponds to the first level of our type system. The other two infer session types from the abstract interpretation rules of Fig. 4 (SI) and the duality requirement of Def. 5.3 (D), corresponding to the second level of the type system. Algorithm W is a straightforward adaptation of the homonymous algorithm from [1]: given an expression e, W calculates its type t, behaviour b and constraints set C; no session information is calculated. W generates pairs of fresh constraints c ∼ ψ and c ∼ ψ ′ for each global channel c in the source program; ψ and ψ ′ are unique. Results of W’s soundness and completeness follow from [1]. For all constraints (c ∼ ψ) ∈ C, Algorithm SI infers a substitution σ and a refined set C ′ such that ǫ  bσ ⇓C ′ ǫ. The substitution only maps ψ variables to session types. The final C ′ is derived from C by applying σ and possibly adding more type constraints of the form (T ⊆ T ′ ). The core of this algorithm is the abstract interpreter MC, which explores all possible transitions from ǫ  b. Algorithm MC is designed in a continuation-passing style, using a continuation stack K ::= ǫ b · K. As transition paths are explored, previously discovered branches of internal and external choices in session types may need to be expanded. For example, if Algorithm MC encounters a configuration (l : ⊕{Li : ηi }i∈I )  l!Lj where j 6∈ I, the inference algorithm needs to add the newly discovered label Lj to the internal choice on the stack. To do this, internal and external choices are removed from the syntax of sessions, and replaced with special variables ψin and ψex . These variables are bound by unique choice constraints, extending the syntax of constraints (Fig. 2): C ::= . . . ⊕{Li : ηi }i∈I ∼ ψin &{Li : ηi }i∈(I1 ,I2 ) ∼ ψex MC updates ψin and ψex constraints in C with newly discovered branches. For example it may add new labels to an internal choice, or move active labels to inactive in an external choice. We now give more detail for some inference steps of Algorithm MC. The full algorithm can be found in an online technical report1 . Algorithm MC terminates successfully when all sessions on the stack have terminated, the input behaviour is τ and the continuation stack is empty:  MC ∆  τ, C, ǫ = (σ, Cσ) if σ = finalize ∆ When this clause succeeds, ∆ may be empty or it may contain frames of the form (l : ψ) or (l : end). The helper function finalise ∆ returns a substitution σ that maps all such ψ’s to end. If this is not possible (i.e., a session on ∆ is not finished) finalise raises an error. New frames are pushed on the stack when the behaviour is push(l : η):  MC ∆  push(l : η), C, K = (σ2 σ1 , C2 ) if (σ1 , ∆1 ) = checkFresh(l, ∆)  and (σ2 , C2 ) = MC (l : ησ1 ) · ∆1  τ, Cσ1 , Kσ1 where checkFresh checks that l has never been in ∆. When the behaviour is an operation that pops a session from the stack, such as a send (l!T ), MC looks up the top frame on the stack, according to the stack principle. There are two cases to consider: either the top frame contains a fresh variable ψ, or some type has been already inferred. The algorithm here is: 1 Spaccasassi, C., Koutavas, V.: Type-Based Analysis for Session Inference. ArXiv e-prints (Oct 2015), http://arxiv.org/abs/1510.03929v3.  MC (l : ψ) · ∆  ρ!T, C, K = (σ2 σ1 , C2 ) if C ⊢ l ∼ ρ and σ1 = [ψ 7→ !α.ψ ′ ] where α, ψ ′ fresh  and (σ2 , C2 ) = MC (l : ψ ′ ) · ∆σ1  τ, Cσ1 ∪ {T ⊆ α}, Kσ1   MC (l : !α.η) · ∆  ρ!T, C, K = MC (l : η) · ∆  τ, C ∪ {T ⊆ α}, K if C ⊢ l ∼ ρ In the first case, MC checks that ρ in the behaviour corresponds to l at the top of the stack. It then produces the substitution [ψ 7→ !α.ψ ′ ], where α and ψ ′ are fresh, and adds (T ⊆ α) to C. The second case produces no substitution. The clauses for delegation are similar:  MC (l : ψ) · (ld : ηd ) · ∆  ρ!ρd , C, K = (σ2 σ1 , C2 ) if C ⊢ l ∼ ρ and C ⊢ ld ∼ ρd and σ1 = [ψ 7→ !ηd .ψ ′ ] where ψ ′ fresh  and (σ2 , C2 ) = MC (l : ψ ′ ) · ∆σ  τ, Cσ1 , Kσ1  MC (l : !ηd .η) · (ld : ηd′ ) · ∆  ρ!ρd , C, K = (σ2 σ1 , C2 ) if C ⊢ l ∼ ρ and C ⊢ ld ∼ ρd and (σ1 , C1 ) = sub(ηd′ , ηd , C)  and (σ2 , C2 ) = MC (l : η) · ∆σ  τ, C1 , Kσ1 The main difference here is that, in the second clause, the sub function checks that C ⊢ ηd′ <: ηd and performs relevant inference. Moreover, the input ∆ must contain at least two frames (the frame below the top one is delegated). The cases for receive, label selection and offer, and resume are similar (see online report). In the cases for label selection and offering, the algorithm updates the ψin and ψex variables, as discussed above. In the case of resume, the algorithm checks that the stack contains one frame. In behaviour sequencing and branching, substitutions are applied eagerly and composed iteratively, and new constraints are accumulated in C:   MC ∆  b1 ; b2 , C, K = MC ∆  b1 , C, b2 · K  MC ∆  b1 ⊕ b2 , C, K = (σ2 σ1 , C2 ) if (σ1 , C1 ) = MC ∆  b1 , C, K  and (σ2 , C2 ) = MC ∆σ1  b2 σ1 , C1 , Kσ1 When a recursive behaviour recb β is encountered, Algorithm MC needs to properly setup the input constraints C according to Rule Rec of Fig. 4: MC(∆  recβ b, C) = (σ2 σ1 , C2 ) if C = C ′ ⊎ {b′ ⊆ β}  and (σ1 , C1 ) = MC ǫ  b, C ′ ∪ {τ ⊆ β}, ǫ  and (σ2 , C2 ) = MC ∆σ1  τ, (C1 \{τ ⊆ β}) ∪ ({b′ ⊆ β})σ1 , Kσ1 Here the algorithm first calls MC on ǫ  b, checking that the recursion body b is self-contained under C ′ , in which the recursion variable β is bound to τ . This update of C prevents the infinite unfolding of recb β. It then restores back the constraint on β, applies the substitution σ1 , and continues inference. The clause for spawn b is similar, except that C is unchanged. Variables β are treated as the internal choice of all behaviours bi bound to β in C:   MC ∆  β, C, L K = MC ∆  b, C, K where b = {bi | ∃i. (bi ⊆ β) ∈ C} Inference fails when MC reaches a stuck configuration ∆  b other than ǫ  τ , corresponding to an error in the session type discipline. To prove termination of SI, we first defineLthe translation JbKgC , that replaces β variables in b with the internal choice { bi | ({bi ⊆ β}) ∈ C }. Due to behaviour-compactness (Def. 5.1), JbKgC is a finite ground term, i.e. a finite term without β variables. Except for Rule Beta, transitions in Fig. 4 never expand b; they either consume ∆ or b. Since JbKgC is finite when C is well-formed, ǫ  JbKgC generates a finite state space and Algorithm MC always terminates. Similar to ML type inference, the worst-case complexity of MC is exponential to program size: MC runs in time linear to the size of JbKgC , which in the worst case is exponentially larger than b, which is linear to program size. The worst case appears in pathological programs where, e.g., each function calls all previously defined functions. We intend to explore whether this is an issue in practice, especially with an optimised dynamic programming implementation of MC. Soundness and completeness of SI follow from the these properties of MC. Lemma 6.1 (Soundness of MC). Let C be well-formed and MC(∆  b, C) = (σ1 , C1 ); then ∆σ1 = ∆′ and ∆′  bσ1 ⇓C1 . Lemma 6.2 (Completeness of MC). Let C be well-formed and (∆  b)σ ⇓C ; then MC(∆  b, C0 ) = (σ1 , C1 ) and ∃σ ′ such that C ⊢ C1 σ ′ and ∀ψ ∈ dom(σ), C ⊢ σ(ψ) <: σ ′ (σ1 (ψ)). Completeness states that MC computes the most general constraints C1 and substitution σ1 , because, for any C and σ such that (∆  b)σ type checks, C specialises C1 and σ is an instance of σ1 , after some extra substitution σ ′ of variables (immaterial for type checking). Algorithm D collects all c ∼ η1 and c̄ ∼ η2 constraints in C ′ , generates duality constraints η1 ⊲⊳ η2 and iteratively checks them, possibly substituting ψ variables. It ultimately returns a C ′′ which is a valid type solution according to Def. 5.3. Soundness and completeness of Algorithm D is straightforward. We now show how SI infers the correct session types for Ex. 2.1 from Sect. 2. We assume that Algorithm W has already produced a behaviour b and constraints C for this example. For clarity, we simplify b and C: we remove spurious τ s from behaviour sequences, replace region variables ρ with labels (only one label flows to each ρ), and perform simple substitutions of β variables. Example 6.1 (A Swap Service). There are three textual sources of endpoints in this example: the two occurrences of acc-swp in coord, and req-swp in swap. A pre-processing step automatically annotates them with three unique labels l1 , l2 and l3 . Algorithm W infers b and C for Ex. 2.1; the behaviour b (simplified) is: spawn (βcoord ); spawn (βswap ); spawn (βswap ) In this behaviour three processes are spawned: one with a βcoord behaviour, and two with a βswap behaviour. The behaviour associated to each of these variables is described in C, along with other constraints: 1. 2. 3. 4. recβcoord (push(l1 : ψ1 ); l1 ?α1 ; push(l2 : ψ1 ); l2 ?α2 ; l2 !α1 ; l1 !α2 ); βcoord ⊆ βcoord push(l3 : ψ2 ); l3 !Int; l3 ?α3 ⊆ βswap swap ∼ ψ1 swap ∼ ψ2 The above behaviour and environment are the inputs to Algorithm SI, implementing session type inference according to the second level of our frame work. The invocation SI(b, C) calls MC ǫ  b, C, ǫ , where the first ǫ is the empty endpoint stack ∆ and the second ǫ is the empty continuation stack. Behaviour b is decomposed as b = K[b′ ], where b′ = spawn (βcoord ) and K is the continuation [ ]; spawn (β  swap ); spawn (βswap ). The algorithm thus calls MC ǫ  spawn (βcoord), C, K , which, after replacing βcoord and unfolding its inner recursive behaviour becomes:  MC ǫ  push(l1 : ψ1 ); l1 ?α1 ; push(l2 : ψ1 ); l2 ?α2 ; l2 !α1 ; l1 !α2 ; βcoord , C1 , ǫ Here C1 is equal to C above, with the exception of replacing Constraint 1 with the constraint (τ ⊆ βcoord). Inference is now straightforward: the frame (l1 : ψ1 ) is first pushed on the endpoint stack. From behaviour l1 ?α1 the algorithm applies substitution [ψ1 7→?α4 .ψ4 ], where ψ4 and α4 are fresh, and generates constraint (α4 ⊆ α1 ) obtaining C2 . We thus get:  MC (l1 : ψ4 )  push(l2 :?α4 .ψ4 ); l2 ?α2 ; l2 !α1 ; l1 !α2 ; βcoord, C2 , ǫ After the next push, the endpoint stack becomes (l2 :?α4 .ψ4 ) · (l1 : ψ4 ). The next behaviour l2 ?α2 causes MC to create constraint (α4 ⊆ α2 ) obtaining C3 , and to consume session ?α4 from the top frame of the endpoint stack.  MC (l2 : ψ4 ) · (l1 : ψ4 )  l2 !α1 ; l1 !α2 ; βcoord, C3 , ǫ Because of l2 !α1 , MC generates [ψ3 7→ !α5 .ψ5 ] and (α1 ⊆ α5 ) obtaining C4 .  MC (l2 : ψ5 ) · (l1 :!α5 .ψ5 )  l1 !α2 ; βcoord , C4 , ǫ Since l1 in the behaviour and l2 at the top of the endpoint stack do not match, MC infers that ψ5 must be the terminated session end. Therefore it substitutes [ψ5 7→ end] obtaining C5 . Because of the substitutions, C5 contains swap ∼ ?α4 .!α5 .end. After analysing βswap , MC produces C6 where swap ∼ !Int.!α6 .end. During the above execution MC verifies that the stack principle is respected and no endpoint label is pushed on the stack twice. Finally the algorithm calls D(C6 ) which performs a duality check between the constraints of swap and swap, inferring substitution [α4 7→ Int, α6 7→ α5 ]. The accumulated constraints on type variables α give the resulting session types of the swap channel endpoints: (swap ∼?Int.!Int.end) and (swap ∼!Int.?Int.end). 7 A Proposal for Recursive Session Types The system we have presented does not include recursive session types. Here we propose an extension to the type system with recursive types. The inference algorithm for this extension is non-trivial and we leave it to future work. In this extension, a recursive behaviour may partially use a recursive session type and rely on the continuation behaviour to fully consume it. First we add guarded recursive session types: η ::= . . . µX.η X. The first level of our type system remains unchanged, as it is parametric to session types, and already contains recursive functions and behaviours. A recursive behaviour recβ b operating on an endpoint l with session type µX.η may: (a) run in an infinite loop, always unfolding the session type; (b) terminate leaving l at type end; (c) terminate leaving l at type µX.η. Behaviour b may have multiple execution paths, some terminating, ending at τ , and some recursive, ending at a recursive call β. They all need to leave l at the same type, either end or µX.η; the terminating paths of b determine which of the two session types l will have after recβ b. If b contains no terminating paths then we assume that l is fully consumed by recβ b and type the continuation with l at end. To achieve this, we add a stack environment D in the rules of Fig. 4, which maps labels l to stacks ∆. If ∆1 = (l : µX.η), we call an l-path from ∆1  b1 any finite sequence of transitions such that ∆1  b1 →C,D . . . →C,D ∆n  bn 6→C,D . A l-path is called l-finitary if there is no bi = τ l for any configuration i in the series; otherwise we say that the path is l-recursive. We write (l : µX.η)  ′ b ⇓fin C,D ∆ when the last configuration of all l-finitary paths from (l : µX.η)  b ′ ′ is ∆  τ . Similarly, we write (l : µX.η)  b ⇓rec C,D ∆ when the last configuration of all l-recursive paths from (l : µX.η)  b is ∆′  τ l . When no l− paths from (l : µX.η)  b is l-finitary, we stipulate (l : µX.η)  b ⇓fin C,D (l : end) holds. We add the following rules to those of Fig. 4. Rec2 ′ (l : µX.η)  b ⇓fin C ′ ,D′ ∆ rec ′ (l : µX.η)  b ⇓C ′ ,D′ ∆ (l : µX.η) · ∆  recβ b →C,D ∆′ · ∆  b′ RCall (l : µX.η)  τ l →C,D D(l)  τ ∆′ ∈ {(l : end), (l : µX.η)} C ′ = (C\(recβ b ⊆ β))∪(τ l ⊆ β) D′ = D[l 7→ ∆′ ] Unf (l : η[X 7→ µX.η]) · ∆  b →C,D ∆′  b′ (l : µX.η) · ∆  b →C,D ∆′  b′ Rule Rec2 requires that both l-finitary and l-recursive paths converge to the same stack ∆′ , either (l : end) or (l : µX.η). In this rule, similarly to rule Rec in Fig. 4, we replace the recursive constraint (recβ b ⊆ β) with (τ l ⊆ β), representing a trivial recursive call of β. This guarantees that all l-paths have a finite number of states. The D environment is extended with l 7→ ∆′ , used in Rule RCall to obtain the session type of l after a recursive call. Rule Unf simply unfolds a recursive session type. 8 Related Work and Conclusions We presented a new approach for adding binary session types to high-level programming languages, and applied it to a core of ML with session communication. In the extended language our system checks the session protocols of interesting programs, including one where pure code calls library code with communication effects, without having to refactor the pure code (Ex. 2.3). Type soundness guarantees partial lock freedom, session fidelity and communication safety. Our approach is modular, organised in two levels, the first focusing on the type system of the source language and second on typing sessions; the two levels communicate through effects. In the fist level we adapted and extended the work of Amtoft, Nielson and Nielson [1] to session communication, and used it to extract the communication effect of programs. In the second level we developed a session typing discipline inspired by Castagna et al. [3]. This modular approach achieves a provably complete session inference for finite sessions without programmer annotations. Another approach to checking session types in high-level languages is to use substructural type systems. For example, Vasconcelos et al. [18] develop such a system for a functional language with threads, and Wadler [19] presents a linear functional language with effects. Type soundness in the former guarantees session fidelity and communication safety, and in the latter also lock freedom and strong normalisation. Our system is in between these two extremes: lock freedom is guaranteed only when processes do not diverge and their requests for new sessions are met. Other systems give similar guarantees (e.g., [3, 16]). Toninho et al. [16] add session-typed communication to a functional language using a monad. Monads, similar to effects, cleanly separate session communication from the rest of the language features which, unlike effects, require parts of the program to be written in a monadic style. Pucella and Tov [13] use an indexed monad to embed session types in Haskell, however with limited endpoint delegation: delegation relies on moving capabilities, which cannot escape their static scope. Our Ex. 2.2 is not typable in that system because of this. In [13] session types are inferred by Haskell’s type inference. However, the programmer must guide inference with expressions solely used to manipulate type structures. Tov [17] has shown that session types can be encoded in a language with a general-purpose substructural type system. Type inference alleviates the need for typing annotations in the examples considered. Completeness of session inference relies on completeness of inference in the general language, which is not clear. Igarashi et al. [9] propose a reconstruction algorithm for finite types in the linear π calculus. Inference is complete and requires no annotations. Padovani [11] extends this work to pairs, disjoint sums and regular recursive types. Mezzina [10] gives an inference algorithm for session types in a calculus of services. The type system does not support recursive session types and endpoint delegation. It does allow, however to type replicated processes that only use finite session types, similar to our approach. Bibliography [1] Amtoft, T., Nielson, H.R., Nielson, F.: Type and effect systems - behaviours for concurrency. Imperial College Press (1999) [2] Caires, L., Pfenning, F.: Session types as intuitionistic linear propositions. In: Gastin, P., Laroussinie, F. (eds.) CONCUR, LNCS, vol. 6269, pp. 222– 236. Springer (2010) [3] Castagna, G., Dezani-Ciancaglini, M., Giachino, E., Padovani, L.: Foundations of session types. In: PPDP. pp. 219–230. ACM (2009) [4] Gay, S., Hole, M.: Subtyping for session types in the pi calculus. Acta Informatica 42(2-3), 191–225 (2005) [5] Gay, S., Vasconcelos, V.: Linear type theory for asynchronous session types. Journal of Functional Programming 20(01), 19–50 (Jan 2010) [6] Honda, K.: Types for dyadic interaction. In: Best, E. (ed.) CONCUR, LNCS, vol. 715, pp. 509–523. Springer (1993) [7] Honda, K., Vasconcelos, V.T., Kubo, M.: Language primitives and type discipline for structured communication-based programming. In: Hankin, C. (ed.) PLS (ESOP), LNCS, vol. 1381, pp. 122–138. Springer (1998) [8] Hüttel, H., Lanese, I., Vasconcelos, V., Caires, L., Carbone, M., Deniélou, P., Padovani, L., Ravara, A., Tuosto, E., Vieira, H., Zavattaro, G.: Foundations of session types and behavioural contracts. ACM Comp. Surv. To appear [9] Igarashi, A., Kobayashi, N.: Type reconstruction for linear π-calculus with I/O subtyping. Inf. Comput. 161(1), 1–44 (2000) [10] Mezzina, L.G.: How to infer finite session types in a calculus of services and sessions. In: Lea, D., Zavattaro, G. (eds.) Coordination Models and Languages, LNCS, vol. 5052, pp. 216–231. Springer (2008) [11] Padovani, L.: Type reconstruction for the linear π-calculus with composite regular types. Logical Methods in Computer Science 11(4) (2015) [12] Palsberg, J.: Type-based analysis and applications. In: PASTE. pp. 20–27. ACM (2001) [13] Pucella, R., Tov, J.A.: Haskell session types with (almost) no class. In: Haskell Symposium. pp. 25–36. ACM (2008) [14] Shivers, O.: Control-flow analysis of higher-order languages. Ph.D. thesis, CMU (1991) [15] Tofte, M., Talpin, J.: Implementation of the typed call-by-value lambdacalculus using a stack of regions. In: POPL. pp. 188–201. ACM (1994) [16] Toninho, B., Caires, L., Pfenning, F.: Higher-order processes, functions, and sessions: A monadic integration. In: Felleisen, M., Gardner, P. (eds.) PLS (ESOP), LNCS, vol. 7792, pp. 350–369. Springer (2013) [17] Tov, J.: Practical Programming with Substructural Types. Ph.D. thesis, Northeastern University (2012) [18] Vasconcelos, V., Gay, S., Ravara, A.: Type checking a multithreaded functional language with session types. Th. Computer Sc. 368(1-2), 64–87 (2006) [19] Wadler, P.: Propositions as sessions. In: ICFP. pp. 273–286. ACM (2012) Appendix A Omitted definitions and examples The following section presents the complete definitions of concepts and examples that could not be spelled out in full details because of space constraints. A.1 Full type system and definitions for the first level TPair TVar C; Γ ⊢ e1 : T1 ⊲ b1 C; Γ ⊢ e2 : T2 ⊲ b2 C; Γ ⊢ (e1 , e2 ) : T1 × T2 ⊲ b1 ; b2 C; Γ ⊢ x : Γ (x) ⊲ τ TIf C; Γ ⊢ e1 : Bool ⊲ b1 C; Γ ⊢ ei : T ⊲ bi (i∈{1,2}) C; Γ ⊢ if e1 then e2 else e3 : T ⊲ b1 ; (b2 ⊕ b3 ) TConst TApp TFun β C; Γ ⊢ e1 : T ′ → T ⊲ b1 C; Γ ⊢ e2 : T ′ ⊲ b2 C; Γ ⊢ e1 e2 : T ⊲ b1 ; b2 ; β C; Γ ⊢ k : typeof (k) ⊲ τ C; Γ, x : T ⊢ e : T ′ ⊲ β β C; Γ ⊢ fn x ⇒ e : T → T ′ ⊲ τ TMatch C; Γ ⊢ e : Sesρ ⊲ b C; Γ ⊢ ei : T ⊲ bi (i∈I) C; Γ ⊢ case e {Li : ei }i∈I : T ⊲ b ; & {ρ?Li ; bi } TEndp TLet TSub C; Γ ⊢ e1 : TS ⊲ b1 C; Γ, x : TS ⊢ e2 : T ⊲ b2 C; Γ ⊢ let x = e1 in e2 : T ⊲ b1 ; b2 C; Γ ⊢ e : T ⊲ b C ⊢ T <: T ′ C; Γ ⊢ e : T ′ ⊲ β C ⊢ b ⊆ β i∈I C; Γ ⊢ pl : Sesρ ⊲ τ C ⊢ρ∼l β TSpawn C; confd C (Γ ) ⊢ e : Unit → Unit ⊲ b C; Γ ⊢ spawn e : Unit ⊲ b ; spawn β β TRec TIns C; confd C (Γ ), f : T → T ′ , x : T ⊢ e : T ′ ⊲ b C ⊢ confd (T, T ′ ) β C ⊢ recβ b ⊆ β C; Γ ⊢ fun f (x) = e : T → T ′ ⊲ τ C; Γ ⊢ e : ∀(~γ : C0 ).T ⊲ b dom(σ) ⊆ {~γ } ∀(~γ : C0 ). T is solvable from C by σ C; Γ ⊢ e : T σ ⊲ b TGen C ∪ C0 ; Γ ⊢ e : T ⊲ b {~γ } ∩ fv(Γ, C, b) = ∅ C; Γ ⊢ e : ∀(~γ : C0 ).T ⊲ b ∀(~γ : C0 ).T is WF, solvable from C Definition A.1 (Functional Subtyping). C ⊢ T <: T ′ is the least reflexive, transitive, compatible relation on types with the axioms: (T1 ⊆ T2 ) ∈ C C ⊢ T1 <: T2 C ⊢ ρ ∼ ρ′ C ⊢ T1′ <: T1 ′ C ⊢ Sesρ <: Sesρ C ⊢ β ⊆ β′ β C ⊢ T2 <: T2′ β′ C ⊢ T1 → T2 <: T1′ → T2′ A.2 Confined types and behaviours Definition A.2 (Confined Behaviors). C ⊢ confd (b) is the least compatible relation on behaviours that admits the following axioms: CTau CAx-b b ∈ {τ, recβ b′ } C ⊢ confd (b) cfd (b) ∈ C C ⊢ confd (b) CICh CICh-Bw C ⊢ confd (b1 ) C ⊢ confd (b2 ) C ⊢ confd (b1 ⊕ b2 ) C ⊢ confd (b1 ⊕ b2 ) C ⊢ confd (bi ) CSeq CSeq-Bw C ⊢ confd (b1 ) C ⊢ confd (b2 ) C ⊢ confd (b1 ; b2 ) C ⊢ confd (b1 ; b2 ) C ⊢ confd (bi ) CSpw CSpw-Bw C ⊢ confd (b) C ⊢ confd (spawn b) C ⊢ confd (spawn b) C ⊢ confd (b) i ∈ {1, 2} i ∈ {1, 2} CSub-b C ⊢ b1 ⊆ b2 C ⊢ confd (b2 ) C ⊢ confd (b1 ) Definition A.3 (Confined Types). C ⊢ confd (o) is the least compatible relation on type schemas and types that admits the following axioms. CCons CAx-T T ∈ {Int, Bool, Unit} C ⊢ confd (T ) cfd (T ) ∈ C C ⊢ confd (T ) CSub-T CSub-T-Bw C ⊢ T1 ⊆ T2 C ⊢ confd (T2 ) C ⊢ confd (T1 ) ∀T1 .(C ⊢ T1 ⊆ T2 ) =⇒ C ⊢ confd (T1 ) C ⊢ confd (T2 ) CFun CFun-Bw C ⊢ confd (T, T ′ ) C ⊢ confd (β) β C ⊢ confd (T → T ′ ) CTup C ⊢ confd (T, T ′ ) C ⊢ confd (T × T ′ ) β C ⊢ confd (T → T ′ ) o ∈ {T, T ′, β} C ⊢ confd (o) CTup-Bw C ⊢ confd (T × T ′ ) o ∈ {T, T ′} C ⊢ confd (o) CTS C, C0 ⊢ confd (T ) C ⊢ confd (∀(~γ : C0 ).T ) We define confd C (Γ ) as the largest subset of Γ such that for all bindings (x : TS ) ∈ confd C (Γ ) we have C ⊢ confd (TS ). The above definitions admit behaviours constructed by τ and recursive behaviours (CTau), and types that are constructed by such behaviours and the base types Int, Bool, Unit (CCons). The definitions allow for type and behaviour variables (α, β) as long as they are only related to confined types in C (CAx-b, CAx-T). Sub-behaviours of confined behaviours and sub-types of confined types are confined too (CSub-b, CSub-T). Type schemas are confined if all their instantiations in C are confined (CTS). The definitions contain composition rules for composite behaviours and types (CICh, CSeq, CSpw, CFun, CTup); they also contain decomposition (or “backward ”) rules for the same composite constructs (CICh-Bw, CSeq-Bw, CSpw-Bw, CFun-Bw, CTup-Bw). The backward rules ensure that all the sub-components of a confined behaviour or type in C are also confined. A.3 Active and inactive labels Consider a program P [e1 ][e2 ] containing the expressions: def e1 = let x = acc-cl1 () in case x {L1 ⇒ e, L2 ⇒ e⋆ } def e2 = let x = req-cl2 () in sel-L2 x Suppose e⋆ contains a type error, possibly because of a mismatch in session types with another part of P . If a type inference algorithm run on P [e1 ][e2 ] first examines e1 , it will explore both branches of the choice, tentatively constructing the session type Σ{L1 .η1 , L2 .η2 }, finding the error in e⋆ . One strategy might then be to backtrack from typing e⋆ (and discard any information learned in the L2 branch of this and possibly other choices in the code) and continue with the session type Σ{L1 .η1 }. However, once e2 is encountered, the previous error in e⋆ should be reported. A programmer, after successfully type checking P [e1 ][()], will be surprised to discover a type error in e1 after adding in e2 . The type-and-effect system here avoids such situations by typing all choice branches, even if they are inactive, at the expense of rejecting some—rather contrived—programs. A similar approach is followed in the type-and-effect system of the previous section by requiring all branches to have the same type (Rule TMatch in Fig. 3). A.4 Duality The program: spawn (fn ⇒ let x = req-c () in send x tt); let x = acc-c () in recv x + 1 should not be typable because its processes use dual endpoints at incompatible session types. Therefore session types on dual session endpoints (c ∼ η, c ∼ η ′ ) must be dual, where duality is defined as follows: Definition A.4 (Duality). C ⊢ η ⊲⊳ η ′ if the following rules and their symmetric ones are satisfied. C ⊢ end ⊲⊳ end C ⊢ T <: T ′ C ⊢ η ⊲⊳ η ′ C ⊢ !T .η ⊲⊳ ?T ′ .η ′ C ⊢ η0 <: η0′ C ⊢ η ⊲⊳ η ′ C ⊢ !η0 .η ⊲⊳ ?η0′ .η ′ ∀i ∈ I0 . C ⊢ ηi ⊲⊳ ηi′ C ⊢ ⊕{Li : ηi } ⊲⊳ &{Li : ηi′ }) i∈I0 i∈(I0 I1 ,I2 ) where C ⊢ η <: η ′ is Gay&Hole [4] subtyping, with C needed for inner uses of C ⊢ T <: T ′ , extended to our form of external choice, where C ⊢ &{Li : ηi′ }i∈(I1 ,I2 ) <: &{Li : ηi′ }i∈(J1 ,J2 ) when I1 ⊆ J1 and J1 ∪ J2 ⊆ I1 ∪ I2 and ∀(i ∈ J1 ∪ J2 ). C ⊢ ηi <: ηi′ . A.5 Dependencies Thanks to the definition of well-stackedness, we can give a more precise account of type soundness. We can define dependencies between processes of a running system according to the following definition.   Definition A.5 (Dependencies). Let P = ∆  b, e and Q = ∆′  b′ , e′ be processes in S. ′ P and Q are ready (P ⇌ Q): if ∆ = (pl : η) · ∆0 and ∆′ = (pl : η ′ ) · ∆′0 ; ′ P is waiting on Q (P 7→ Q): if ∆ = (pl : η) · ∆0 and ∆′ = ∆′1 · (pl : η ′ ) · ∆′0 and ∆′1 6= ǫ; P depends on Q, R (P Z⇒ (Q, R)): if P = Q ⇌ R, or P 7→+ Q ⇌ R. The type soundness theorem (Cor. A.1) can be reformulated to show that blocked processes depend on a process that is either waiting, diverging or blocked: Corollary A.1 (Type Soundness with dependencies). Let C C ws S. Then S and 1. S =⇒c S ′ , or 2. S −→∗i (F , D, W, B) such that:  Processes in F are finished: ∀ ∆  b, e ∈ F . ∆ =ǫ, b = τ and e = v. Processes in D diverge: ∀ ∆  b, e ∈ D. ∆  b, e −→∞ i . Processes in W wait on channels: ∀ ∆  b, e ∈ W. e = E[req-cl ] or e = E[acc-cl ].  Processes in B block on sessions: ∀P = ∆  b, e ∈ B. e = E[e0 ] and e0 is send v, recv v, deleg v, resume v, sel-L v, or case v {Li ⇒ ei }i∈I and ∃Q ∈ (D, W). ∃R ∈ (D, W, B). S ⊢ P Z⇒ (Q, R). A.6 Subtyping in recursive session types We add a brief discussion about subtyping for the recursive session types in Sect. 7. We only consider recursive session types that are guarded, and therefore contractive; thus the subtyping relation for the extended session types only needs to perform a standard unfolding of recursive types [4]. Note that the definition of functional subtyping (Def. A.1) is unaffected because it involves behaviours but not session types. Subtyping is used in the definition of duality (Def. A.4), which remains unaffected. Our inference algorithm relies on a decision procedure for duality (D) which now needs to use a decision procedure for subtyping of equi-recursive types, such as the algorithm of Kozen, Parsberg and Schwartzbach2. This is the main modification of our inference algorithm when adding recursive session types. 2 Kozen, D., Palsberg, J., Schwartzbach, M.I.: Efficient recursive subtyping. Mathematical Structures in Computer Science 5(1), 113–125 (1995) B Type Soundness To prove type soundness (progress and preservation) we first define the typed reductions of S configurations shown in Fig. 6. Recall that we let S range over −−−−−−−→ −−−−−−−→ → ∆  b, e , write S for − e when S = ∆  b, e , and identify S and S up to reordering. Here we write ~b for an arbitrary sequential composition of behaviours, which may be empty (ǫ). We also superscripts in sequences of terms to identify them (e.g., ~τ 1 may be different than ~τ 2 ), and we identify sequential compositions up to associativity and the axiom ǫ ; b = b ; ǫ = b. In Sect. 4 we assumed that programs are annotated by unique region labels in a pre-processing step. This is necessary to achieve the maximum accuracy of our system (and reject fewer programs). Because beta reductions can duplicate annotations here we drop the well-annotated property. Type soundness for general annotated programs implies type soundness for uniquely annotated programs. Lemma B.1 (Weakening). Suppose C; Γ ⊢ e : TS ⊲ b. Then C; Γ ⊎ Γ ′ ⊢ e : TS ⊲ b. Proof. By induction on C; Γ ⊢ e : TS ⊲ b. Lemma B.2 (Type Decomposition). Suppose C; Γ ⊢ E[e] : TS ⊲ b. Then there exist TS ′ , b′ , ~bnxt and fresh x such that b = ~τ ; b′ ; ~bnxt and C; Γ ⊢ e : TS ′ ⊲ b′ and C; Γ, x:TS ′ ⊢ E[x] : TS ⊲ ~τ ; τ ; bnxt . Proof. By structural induction on E. Lemma B.3 (Type Composition). Suppose C; Γ, x:TS ′ ⊢ E[x] : TS ⊲ b and C; Γ ⊢ e : TS ′ ⊲ b′ . Then there exists ~bnxt such that b = ~τ ; τ ; ~bnxt and C; Γ ⊢ E[e] : TS ⊲ ~τ ; b′ ; ~bnxt . Proof. By structural induction on E using Lem. B.1.  Lemma B.4. Suppose C ws S, ∆ · (pl : η) · ∆′  b, e and C ⊢ η <: η ′ . Then C ws S, ∆ · (pl : η ′ ) · ∆′  b, e . B.1 Preservation Preservation relies on two lemmas, the first is that typed reductions of Fig. 6 preserve well-typedness, well-stackedness and well-annotatedness; the other is that untyped reductions can be simulated by the typed reductions. Lemma B.5. Suppose C C ws S ′ . S and C ws S and S →C S ′ . Then C S ′ and Proof. By induction on S →C S ′ using the type composition and decomposition (Lem.(s) B.3 and B.2). The most interesting case is that of delegation (TRDel). In this case we have ′ l′  S = (pl1 : !ηd .η1 ) · (p′l1 : ηd′ ) · ∆1  ~τ 1 ; τ ; τ ; τ ; ρ1 !ρd ; ~bnxt1 , E1 [deleg (pl1 , p′ 1 )] ,  (pl2 : ?ηr .η2 )  ~τ 2 ; τ ; τ ; ρ2 ?ρr ; ~bnxt2 , E2 [resumelr pl2 ] , S0  l  →C (pl1 : η1 ) · ∆1  ~τ 1 ; τ ; ~bnxt1 , E1 [()] , (pl2 : η2 ) · (p′lr : ηr )  ~τ 2 ; τ ; ~bnxt2 , E2 [p′ r ] , S0 = S ′ S: and by C l′ C; ∅ ⊢ E1 [deleg (pl1 , p′ 1 )] : T1 ⊲ ~τ 1 ; τ ; τ ; τ ; ρ1 !ρd ; ~bnxt1 C; ∅ ⊢ E2 [resumelr pl2 ] : T2 ⊲ ~τ 2 ; τ ; τ ; ρ2 ?ρr ; ~bnxt2 ′ (pl1 : !ηd .η1 ) · (p′l1 : ηd′ ) · ∆1  ~τ 1 ; τ ; τ ; τ ; ρ1 !ρd ; ~bnxt1 ⇓C (pl2 : ?ηr .η2 )  ~τ 2 ; τ ; τ ; ρ2 ?ρr ; ~bnxt2 ⇓C By type decomposition Lem. B.2 and inversion on the rules of Fig(s). 3 and 4: l′ C; ∅ ⊢ deleg (pl1 , p′ 1 ) : Unit ⊲ τ ; τ ; τ ; ρ1 !ρd C; x:Unit ⊢ E1 [x] : T1 ⊲ ~τ 1 ; τ ; ~bnxt1 C; x:Sesρr ⊢ E2 [x] : T2 ⊲ ~τ 2 ; τ ; ~bnxt2 C; ∅ ⊢ resume pl2 : Sesρr ⊲ τ ; τ ; ρ2 ?ρr (pl1 : η1 ) · ∆1  τ ; ~bnxt1 ⇓C C ⊢ ρ1 ∼ l1 , ρd ∼ l1′ , ηd′ <: ηd (pl2 : η2 ) · (p′lr : ηr )  τ ; ~bnxt2 ⇓C C ⊢ ρ2 ∼ l 2 , ρr ∼ l r Note that the transition rules considered in ⇓C do not take into account the concrete endpoints p, p′ and p—they are existentially quantified in these rules. By Lem. B.3 and the rules of Fig. 4: C; ∅ ⊢ E1 [()] : T1 ⊲ ~τ 1 ; τ ; ~bnxt1 C; ∅ ⊢ E2 [p′lr ] : T2 ⊲ ~τ 2 ; τ ; ~bnxt2 Therefore C From C (pl1 : η1 ) · ∆1  ~τ 1 ; τ ; ~bnxt1 ⇓C (pl2 : η2 ) · (p′lr : ηr )  ~τ 2 ; τ ; ~bnxt2 ⇓C S′. ws S we deduce:   ′ S0 , (pl1 : !ηd .η1 ) · (p′l1 : ηd′ ) · ∆1  b1 , e1 , (pl2 : ?ηr .η2 )  b2 , e2   ′ C ws S0 , (p′l1 : ηd′ ) · ∆1  b1 , e1 , ǫ  b2 , e2 C ⊢ !ηd .η1 ⊲⊳ ?ηr .η2 , η1 ⊲⊳ η2 p, p ♯ p′ , ∆1 , S0 p′ ♯ ∆1 , S0 C ws where b1 , e1 , b2 and e2 are the appropriate behaviours and expressions shown above. Therefore, C ⊢ ηd′ <: ηr and from Lem. B.4 we deduce   ′ C ws S0 , ∆1  b1 , e1 , (p′l1 : ηd′ ) · ǫ  b2 , e2   and C ws S0 , (pl1 : η1 ) · ∆1  b1 , e1 , (pl2 : η2 ) · (p′lr : ηr )  b2 , e2 which completes the proof for this case. The rest of the cases are similarly proven. → − Lemma B.6. Suppose C S and S −→ e′ . There exists S ′ such that S →C S ′ → and S ′ = − e. Proof. By the definitions of the reduction relations (→C ) and (−→) in Fig(s). 1 and 6. In this proof the structure of behaviours needed for establishing the (→C ) reductions are deduced using Lem. B.2 and inversion on the typing rules; the necessary structure of the stacks is deduced by inversion on the rules of the ⇓C relation (Fig. 4). The proof of preservation (Thm. 5.1) is a direct consequence of the preceding two lemmas. B.2 Type Soundness We first extend the notion of internal and communication steps to the reductions of Fig. 6. Lemma B.7. Let S →C S ′ . ′ – S →C c S if the transition is derived with use of the rules TRInit, TRCom, TRDel, TRSel; ′ – S →C i S otherwise. A diverging process is one that has an infinite sequence of internal transitions (−→i ). C C Definition B.1 (Divergence). A process P diverges if P →C i S1 →i S2 →i C S3 →i . . .. A system S diverges if for any P ∈ S, P diverges. These transitions may spawn new processes, and divergence can be the result of an infinite spawn chain.  def def Example B.1. Let P = ǫ  b, (fun f (x) = spawn f ) () where b = τ ; τ ; recβ (τ ; spawn β); P is a diverging process. To prove progress we first divide a system into its diverging and non-diverging parts. The non-diverging part of the system can only take a finite number of internal transitions. Lemma B.8. Let C S and C ws S. Then S = D, N D and D diverges and ∗ for some N D ′ , N D →C N D ′ 6→C i i . Proof. By definition of diverging system (and its negation). The non-diverging part of the system that cannot take any more internal steps consists of processes that are values, or stuck on global channels or session primitives. Lemma B.9. Let C and: N D and C ws N D and N D 6→C i . Then N D = F , W, B  Processes in F are finished: ∀ ∆  b, e ∈ F . ∆ = ǫ, b= τ, e = v. Processes in W wait on global channels: ∀ ∆  b, e ∈ W. e = E[req-cl ] or e = E[acc-cl ].  Processes in B block on a session primitive: ∀P = ∆  b, e ∈ B. e = E[e0 ] and e0 ∈ {send v, recv v, deleg v, resume v, sel-L v, case v {Li ⇒ ei }i∈I }. Proof. If a process in N D is not in one of the three categories then it would be able to take an internal step. Moreover, the structure of the stack ∆ and behaviour b of finished processes follows from C N D and C ws N D. From the preceding two lemmas we can easily derive the most part of progress. S. Then S −→∗i (F , D, W, B) such that:  Processes in F are finished: ∀ ∆  b, e ∈ F . ∆ =ǫ, b = τ, e = v. ∞ Processes in D diverge: ∀ ∆  b, e ∈ D. ∆  b, e −→  i . Processes in W wait on global channels: ∀ ∆  b, e ∈ W. e = E[req-cl ] or e = E[acc-cl ].  Processes in B block on a session primitive: ∀P = ∆  b, e ∈ B. e = E[e0 ] and e0 ∈ {send v, recv v, deleg v, resume v, sel-L v, case v {Li ⇒ ei }i∈I }. Corollary B.1. Let C S and C ws What is missing is that when S cannot take any more communication steps (⇒c ) then all processes in B depend on processes in D and W. This follows by well-stackedness of (well-typed) systems. We write (F , D, W, B) for a system whose finished processes are in F , diverging processes are in D, waiting processes are in W and blocked processes are in B. Lemma B.10. Let C Then S and C ws S and S = (F , D, W, B) and W, B 6−→i . 1. If P, Q ∈ W and P ⇌ Q then P, Q −→c S ′ , for some S ′ . 2. The (7→) dependencies in S create a directed acyclic graph. 3. If P ∈ B then there exist Q, R ∈ D, W, B such that P Z⇒ (Q, R). Proof. The first property follows from C S and C ws S. Property 2 is proven by induction on C ws S. Property 3: Because P ∈ B and P is well-typed, the stack of P is nonempty. Thus, by Property 1, there exists Q ∈ S such that P 7→+ Q is the longest sequence of dependencies without repetitions (this is possible because of Property 2). We examine two cases: – P 7→∗ P ′ 7→ Q and the top-level frame in the stack of P ′ has an endpoint p and p appears in the top frame of Q; then P ⇌ Q; therefore P Z⇒ (P ′ , Q). – P = P1 7→ . . . 7→ Pn 7→ Q and the top-level frame in the stack of P ′ has an endpoint p and p appears in a frame other than the top one in Q; then there exists R such that Q 7→ R (by C ws S); R cannot be one of the processes P1 , . . . , Pn because of Property 2. Moreover R cannot be a process in F (because processes in F have empty stacks due to typing), and R cannot be any other processes in D, W, B because the sequence of dependencies is the longest. Thus this case is not possible. ⊓ ⊔ Type Soundness is a direct consequence of Cor. B.1 and Lem. B.10. TRBeta C ⊢ b′ ⊆ β TREnd  ∆  b, e , S →C S ′  (l : end) · ∆  b, e , S →C S ′  ∆  b[b′ /β], e , S →C S ′  ∆  b, e , S →C S ′ TRIft   ∆  ~τ ; τ ; (b1 ⊕ b2 ) ; ~bnxt , E[if tt then e1 else e2 ] →C ∆  ~τ ; b1 ; ~bnxt , E[e1 ] TRIff   ∆  ~τ ; τ ; (b1 ⊕ b2 ) ; ~bnxt , E[if ff then e1 else e2 ] →C ∆  ~τ ; b2 ; ~bnxt , E[e2 ] TRLet   ∆  ~τ ; τ ; ~bnxt , E[let x = v in e] →C ∆  ~τ ; ~bnxt , E[e[v/x]] TRApp   ∆  ~τ ; τ ; τ ; ~bnxt , E[(fn x ⇒ e) v] →C ∆  ~τ ; ~bnxt , E[e[v/x]] TRRec  ∆  ~τ ; τ ; τ ; recβ b ; ~bnxt , E[(fun f (x) = e) v]  →C ∆  ~τ ; b[recβ b/β] ; ~bnxt , E[e[fun f (x) = e/f ][v/x]] TRSpn    ∆  ~τ ; τ ; (spawn b) ; ~bnxt , E[spawn v] , S →C ∆  ~τ ; τ ; ~bnxt , E[()] , ǫ  τ ; τ ; b, v () , S TRInit p, p ♯ E1 , E2 , S, ∆1 , ∆2  ∆1  ~τ 1 ; τ ; τ ; push(l1 : η1 ) ; ~bnxt1 , E1 [req-cl1 ()] ,  ∆2  ~τ 2 ; τ ; τ ; push(l2 : η2 ) ; ~bnxt2 , E2 [acc-cl2 ()] , S   →C (pl1 : η1 ) · ∆1  ~τ 1 ; τ ; ~bnxt1 , E1 [pl1 ] , (pl2 : η2 ) · ∆2  ~τ 2 ; τ ; ~bnxt2 , E2 [pl2 ] , S TRCom  (pl1 : !T1 .η1 ) · ∆1  ~τ 1 ; τ ; τ ; τ ; ρ1 !T1′ ; ~bnxt1 , E1 [(send (pl1 , v))] ,  (pl2 : ?T2 .η2 ) · ∆2  ~τ 2 ; τ ; τ ; ρ2 ?T2′ ; ~bnxt2 , E2 [recv pl2 ] , S   →C (pl1 : η1 ) · ∆1  ~τ 1 ; τ ; ~bnxt1 , E1 [()] , (pl2 : η2 ) · ∆2  ~τ 2 ; τ ; ~bnxt2 , E2 [v] , S TRDel ′ l′  (pl1 : !ηd .η1 ) · (p′l1 : ηd′ ) · ∆1  ~τ 1 ; τ ; τ ; τ ; ρ1 !ρd ; ~bnxt1 , E1 [deleg (pl1 , p′ 1 )] ,  (pl2 : ?ηr .η2 )  ~τ 2 ; τ ; τ ; ρ2 ?ρr ; ~bnxt2 , E2 [resumelr pl2 ] , S  l  →C (pl1 : η1 ) · ∆1  ~τ 1 ; τ ; ~bnxt1 , E1 [()] , (pl2 : η2 ) · (p′lr : ηr )  ~τ 2 ; τ ; ~bnxt2 , E2 [p′ r ] , S TRSel k∈I    : ⊕{Li : ηi }i∈I · ∆1  ~τ ; τ ; τ ; ρ1 !Lk ; ~bnxt1 , E1 [sel-Lk pl1 ] ,   pl2 : &{Li : ηi′ }i∈(I1 ,I2 ) · ∆2  ~τ 2 ; τ ; (&j∈J ρ2 ?Lj ; bj ) ; ~bnxt2 , E2 [case pl2 {Lj ⇒ ej }j∈J ] , S   →C (pl1 : ηk ) · ∆1  ~τ 1 ; τ ; ~bnxt1 , E1 [()] , (pl2 : ηk′ ) · ∆2  ~τ 2 ; bk ; ~bnxt2 , E2 [ek ] , S p l1 1  Fig. 6. Typed Reductions. C Inference algorithms The algorithm to infer session types at second level of our type system is called Algorithm SI, and it operates on a syntactical sub-language of session types called session structures, which is defined as follows: η ::=ψ end !T.η ?T.η !η.η ?η.η ψin ψex Internal and external choices are removed from the syntax of sessions. In their place, we have two special variables ψin and ψex . These variables are bound by special choice constraints, which extend the syntax of Constraints in Fig. 2 as follows: C ::= . . . ⊕{Li : ηi } ∼ ψin &{Li : ηi } ∼ ψex i∈I i∈(I1 ,I2 ) During session inference, the constraint set C might be refined to a new set C ′ , containing more precise session types for ψin and ψex (for example by adding new labels to an internal choice, or by moving an active label to inactive in an external choice), or new constraints on types (because of a ρ!Int behaviour for example). Choice constraints in C are ordered according to subtyping: C ⊢ ψin ∼ η C ⊢ η <: η ′ C ⊢ ψin ∼ η ′ C ⊢ ψex ∼ η C ⊢ η <: η ′ Inf-EChoice C ⊢ ψex ∼ η ′ Inf-IChoice Abstract interpretation transitions can be naturally extended to the sub-language just presented, except for the two cases when b pops a label Lk , and the top of the stack contains either ψin or ψex . In these two cases, if C ⊢ ψex ∼ η or C ⊢ ψex ∼ η, η substitutes ψex or ψin on the stack. Section C.1 presents the main inference algorithm for Stage 2, whose main core is Algorithm MC in Section C.2. Sections C.3 and C.4 contains the auxiliary functions for session sub-type inference. Section C.5 shows the inference algorithm for Stage 3. As stated in Sec. 6, the definition of Algorithm W can be adapted straightforwardly from [1], and therefore its definition is not included. The soundness of Algorithm W can be stated as follows: Theorem C.1 (Soundness of Algorithm W). If W([], e) = (σ, t, b, C) then C; [] ⊢n e : t ⊲ b. Regarding completeness, let jdg ⋆ be any valid typing judgement for an expression e. Completeness first show that Algorithm W always calculates a judgment jdg for e. Moreover it also shows that jdg ⋆ is a lazy instance of jdg: in the sense that there exists a substitution σ ′ such that jdg ⋆ can always be derived by further instantiating jdg with σ ′ and by subtyping. This second property points to the fact that W calculates principal types for e (see [1], Sec. 1.5.1, p.30). Completeness is stated as follows: ⋆ ⋆ Theorem C.2 (Completeness of Algorithm W). If C ⋆ ; [] ⊢at n e : t ⊲ b ⋆ ⋆ with C atomic (i.e. all type constraints in C have the form α1 ⊆ α2 ), then W([], e) = (σ, b, t, C) and there exists a substitution σ ⋆ such that: – C ⋆ ⊢ Cσ ⋆ – C ⋆ ⊢ bσ ⋆ ⊆ b⋆ – C ⋆ ⊢ tσ ⋆ <: t⋆ C.1 Algorithm SI Let K be the behavior stack, defined by the following grammar: K ::= ǫ b · K Let also the application of K to b, or K[b], be defined inductively as follows: ǫ[b] =b ′ (b · K)[b] =K[b; b′ ] Since we only work with finite behaviors b, there is always a finite decomposition b = K[b′ ] such that b′ is not the sequential composition of two sub-behaviors; the decomposition is also unique. The session inference algorithm SI is defined as follows: 1 2 3 SI(b, C) = (σ2 σ1 , C2 )  if (σ1 , C1 ) = MC ǫ  b, C, ǫ and (σ2 , C2 ) = choiceVarSubst C1 4 5 6 7 −−−−−−−→ −−−−−−−−→ choiceVarSubst (C ⊎ {ηi ⊆ ψin i } ⊎ {ηj ⊆ ψex j }) = (σ, Cσ) −−−−−−−→−−−−−−−→ if σ = [ψin i 7→ ηi ][ψex j 7→ ηj ] and ψin , ψex ♯ RHS(C) for any ψin , ψex C.2 1 2 3 4 5 6 Algorithm MC −− remove terminated frames   MC (l : end) · ∆  b, C, K = MC ∆  b, C, K −− MC terminates  with behavior τ MC ∆  τ, C, ǫ = (σ, Cσ) if σ = finalize ∆ 7 8 9 10 11 12 13 −− pop a sub−behavior  from the continuation  stack MC ∆  τ, C, b · K = MC ∆  b, C, K −− push a new frame on the  stack MC ∆  push(l : η), C, K = (σ2 σ1 , C2 ) if (σ1 , ∆1 ) = checkFresh(l, ∆) 14 and (σ2 , C2 ) = MC (l : ησ1 ) · ∆1  τ, Cσ1 , Kσ1 15 16 17 18 19 20 21 22 23  −− send  MC (l : ψ) · ∆  ρ!T, C, K = (σ2 σ1 , C2 ) if C ⊢ l ∼ ρ and σ1 = [ψ 7→ !α.ψ ′ ] where α, ψ ′ fresh  and (σ2 , C2 ) = MC (l : ψ ′ ) · ∆σ1  τ, Cσ1 ∪ {T ⊆ α}, Kσ1   MC (l : !α.η) · ∆  ρ!T, C, K = MC (l : η) · ∆  τ, C ∪ {T ⊆ α}, K if C ⊢ l ∼ ρ 24 25 26 27 28 29 30 31 32 −− recv  MC (l : ψ) · ∆  ρ?T, C, K = (σ2 σ1 , C2 ) if C ⊢ l ∼ ρ and σ1 = [ψ 7→ ?α.ψ ′ ] where α, ψ ′ fresh  and (σ2 , C2 ) = MC (l : ψ ′ ) · ∆σ1  τ, Cσ1 ∪ {α ⊆ T }, Kσ1   MC (l : ?α.η) · ∆  ρ?T, C, K = MC (l : η) · ∆  τ, C ∪ {α ⊆ T }, K if C ⊢ l ∼ ρ 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 −− delegation  MC (l : ψ) · (ld : ηd ) · ∆  ρ!ρd , C, K = (σ2 σ1 , C2 ) if C ⊢ l ∼ ρ and C ⊢ ld ∼ ρd and σ1 = [ψ 7→ !ηd .ψ ′ ] where ψ ′ fresh  and (σ2 , C2 ) = MC (l : ψ ′ ) · ∆σ  τ, Cσ1 , Kσ1  MC (l : !ηd .η) · (ld : ηd′ ) · ∆  ρ!ρd , C, K = (σ2 σ1 , C2 ) if C ⊢ l ∼ ρ and C ⊢ ld ∼ ρd and (σ1 , C1 ) = sub(ηd′ , ηd , C)  and (σ2 , C2 ) = MC (l : η) · ∆σ  τ, C1 , Kσ1  MC (l : η) · (ld : ηd′ ) · ∆  ρ!ρd , C, K = (σ2 σ1 , C2 ) if C ⊢ ld 6∼ ρd and (σ1 , ∆1 ) = checkFresh(ld , (l : η) · (ld : ηd′) · ∆) and (σ2 , C2 ) = MC ∆1  ρ!ρd , Cσ1 , Kσ1 −− resume  MC (l : ψ) · ǫ  ρ?lr , C, K = (σ2 σ1 , C2 ) if C ⊢ l ∼ ρ and l 6= lr and σ1 = [ψ 7→ ?ψr′ .ψ ′ ] where ψ ′ , ψr′ fresh  and (σ2 , C2 ) = MC (l : ψ ′ ) · (lr : ψr′ ) · ǫ  τ, Cσ1 , Kσ1   MC (l : ?ηr .η) · ǫ  ρ?lr , C, K = MC (l : η) · (lr : ηr ) · ǫ  τ, C, K if C ⊢ l ∼ ρ and l 6= lr 58 59 60 61 62 63  MC (l : ?η) · (ld : ηd ) · ∆  ρ?lr , C, K = (σ2 σ1 , C2 ) if (σ1 , ∆1 ) = checkFresh(ld , (l : ?η) · (ld : ηd ) · ∆) and (σ2 , C2 ) = MC ∆1  ρ?lr , Cσ1 , Kσ1 −− in. choice 64 65 66 67  MC (l : ψ) · ∆  ρ!Lk , C, K = (σ2 σ1 , C2 ) if C ⊢ l ∼ ρ and σ1 = [ψ 7→ ψin ] where ψk , ψin fresh  and (σ2 , C2 ) = MC (l : ψk ) · ∆σ  τ, Cσ1 ∪ {ψin ∼ ⊕{Lj : ψj }}, Kσ1 j∈{k} 68 69 70 71   MC (l : ψin ) · ∆  ρ!Li , C, K = MC (l : ηi ) · ∆  τ, C, K if C ⊢ l ∼ ρ and i ∈ J and (ψin ∼ ⊕{Lj : ηj }) ∈ C j∈J 72 73   MC (l : ψin ) · ∆  ρ!Li , C, K = MC (l : ψi ) · ∆  τ, C ′ ⊎ {ψin ∼ ⊕{Lj : ηj }}, K j∈J,i 74 75 if C ⊢ l ∼ ρ and i 6∈ J and C = C ′ ⊎ {ψin ∼ ⊕{Lj : ηj }} and ηi = ψi fresh j∈J 76 77 78 −− ex. choice  MC (l : ψ) · ∆  & {ρ?Li ; bi }, C, K = (σ2 σ1 , C2 ) i∈I 79 80 81 82 if C ⊢ l ∼ ρ and σ1 = [ψ 7→ ψex ] where ψex fresh → − and C1 = {ψex ∼ &{Li : ψi }} where ψi fresh i∈(I,∅)   and (σ2 , C2 ) = MC (l : ψex ) · ∆σ1  & {ρ?Li ; bi } σ1 , Cσ1 ∪ C1 , Kσ1 i∈I 83 84   MC (l : ψex ) · ∆  & ρ?Lj ; bj , C, K = MC (l : ψex ) · ∆  & ρ?Lj ; bj , C1 , K j∈I1 ⊎I2 ⊎I3 j∈I1 ⊎I2 ⊎I3 86 if C ⊢ l ∼ ρ and C = C ′ ⊎ {ψex ∼ &{Lj : ηj }} and I3 ♯ J1 ⊎ J2 and I3 , J1 6= ∅ 87 and C1 = C ′ ∪ {ψex ∼ &{Li : ηi }} 85 j∈(I1 J1 ,I2 J2 ) i∈(I1 ,I2 I3 J1 J2 ) 88 89  MC (l : ψex ) · ∆  & ρ?Li ; bi , C, K = (σn . . . σ0 , Cn ) i∈I 90 91 if C ⊢ l ∼ ρ and J1 ⊆ I and I ⊆ J1 ⊎ J2 and C = C ′ ⊎ {ψex ∼ &{Lj : ηj }} j∈(J1 ,J2 ) 92 93 94 and for each k ∈ [1 . . . n] where I = {Lj1 , . . . , Ljn } and n ≥ 0  (σk , Ck ) = MC ((l : ηjk ) · ∆  bjk )σk−1 . . . σ0 , Ck−1 , Kσk−1 . . . σ0 where σ0 = σid and C0 = C 95 96 97 98 99 100 101 102 103 104 105 −− sequencing   MC ∆  b1 ; b2 , C, K = MC ∆  b1 , C, b2 · K −− internal choice in the  behavior MC ∆  b1 ⊕ b2 , C, K = (σ2 σ1 , C2 ) if (σ1 , C1 ) = MC ∆  b1 , C, K  and (σ2 , C2 ) = MC ∆σ1  b2 σ1 , C1 , Kσ1 −− spawn  MC ∆  spawn b, C, K = (σ2 σ1 , C2 ) 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122  if (σ1 , C1 ) = MC ǫ  b, C, ǫ  and (σ2 , C2 ) = MC ∆σ1  τ, C1 , Kσ1 −− rec MC(∆  recβ b, C) = (σ2 σ1 , C2 ) if C = C ′ ⊎ {b′ ⊆ β}  and (σ1 , C1 ) = MC ǫ  b, C ′ ∪ {τ ⊆ β}, ǫ  and (σ2 , C2 ) = MC ∆σ1  τ, (C1 \{τ ⊆ β}) ∪ ({b′ ⊆ β})σ1 , Kσ1 −− behavior variable   MC ∆  β, C, L K = MC ∆  b, C, K where b = {bi | ∃i. (bi ⊆ β) ∈ C} −− try to close the  top session if all previous clauses fail MC ∆  b, C, K = (σ2 σ1 , C2 ) if (σ1 , ∆1 ) = closeTop(∆)  and (σ2 , C2 ) = MC ∆1  bσ1 , Cσ1 , Kσ1 C.3 1 2 3 4 5 6 Helper functions −− checkFresh forces frame l in the input stack to be the closed session checkFresh(l, ǫ) = (σid , ǫ) checkFresh(l, (l′ : end) · ∆) = (σid , ∆) checkFresh(l, (l : ψ) · ∆) = ([ψ 7→ end], ∆[ψ 7→ end]) checkFresh(l, (l′ : η) · ∆) = (σ, (l′ : ησ) · ∆′ ) if l′ 6= l and (σ, ∆′ ) = checkFresh(l, ∆) 7 8 9 −− closeTop forces the top of the stack to be end closeTop((l : η) · ∆) = checkFresh(l, (l : η) · ∆) 10 11 12 13 14 15 16 −− finalize matches the input stack with the empty stack finalize ǫ = σid finalize (l : end) · ∆ = finalize ∆ finalize (l : ψ) · ∆ = σ2 σ1 if σ1 = [ψ 7→ end] and σ2 = finalize(∆) C.4 1 2 Subtype checking −− end sub(end, end, C) = (σid , C) 3 4 5 6 −− send/recv sub(!T1 .η1 , !T2 .η2 , C) = (σ1 , C1 ∪ {T2 ⊆ T1 }) if (σ1 , C1 ) = sub(η1 , η2 , C) 7 8 9 sub(?T1 .η1 , ?T2 .η2 , C) = (σ1 , C1 ∪ {T1 ⊆ T2 }) if (σ1 , C1 ) = sub(η1 , η2 , C) 10 11 −− deleg/resume 12 13 sub(!ηd1 .η1 , !ηd2 .η2 , C) = (σ2 σ1 , C2 ) if (σ1 , C1 ) = sub(ηd2 , ηd1 , C) and (σ2 , C2 ) = sub(η1 σ1 , η2 σ1 , C1 ) 14 15 16 sub(?ηr1 .η1 , ?ηr2 .η2 , C) = (σ2 σ1 , C2 ) if (σ1 , C1 ) = sub(ηr1 , ηr2 , C) and (σ2 , C2 ) = sub(η1 σ1 , η2 σ1 , C1 ) 17 18 19 20 −− in. choice sub(ψin 1 , ψin 2 , C) = f (I2 , C) if (ψin 2 ∼ ⊕{Li : η2i }) ∈ C i∈I2 21 22 23 and f (∅, C) = (σid , C) and f (I ⊎ {k}, C) = f (I ⊎ {k}, C1 ) if C = C ′ ⊎ (ψin 1 ∼ ⊕{Li : η1i }) ⊎ (ψin 2 ∼ ⊕{Li : η2i }) i∈I2 i∈I1 24 25 and k 6∈ I1 and k ∈ I2 and C1 = C ′ ⊎ (ψin 1 ∼ ⊕{Li : η1i } ⊕ η2k ) ⊎ (ψin 2 ∼ ⊕{Li : η2i }) i∈I2 i∈I1 ∪{k} 26 27 28 and f (I ⊎ {k}, C) = (σ2 σ1 , C2 ) if (σ1 , C1 ) = f (I, C) and (ψin 1 ∼ ⊕{Li : η1i }), (ψin 2 ∼ ⊕{Li : η2i }) ∈ C1 i∈I2 i∈I1 29 30 and k ∈ I1 and k ∈ I2 and (σ2 , C2 ) = sub (η1k σ1 , η2k σ1 , C1 ) 31 32 33 34 −− ex. choice sub(ψex 1 , ψex 2 , C) = f (J1 ∪ J2 , C) if (ψex 1 ∼ &{Li : η1i }), (ψex 2 ∼ &{Li : η2i }) ∈ C i∈(J1 ,J2 ) i∈(I1 ,I2 ) 35 36 37 38 and I1 ⊆ J1 and f (∅, C) = (σid , C) and f (I ∪ {k}, C) = (σ2 σ1 , C2 ) if (ψex 1 ∼ &{Li : η1i }), (ψex 2 ∼ &{Li : η2i }) ∈ C i∈(J1 ,J2 ) i∈(I1 ,I2 ) 39 40 41 42 43 and (k ∈ I2 or (k ∈ I1 and k ∈ J1 ) and (σ1 , C1 ) = f (I, C) and (σ2 , C2 ) = sub (η1k σ1 , η2k σ1 , C1 ) and f (I ∪ {k}, C) = f (I ∪ {k}, C1 ) if C = C ′ ⊎ (ψex 1 ∼ &{Li : η1i }) ⊎ (ψex 2 ∼ &{Li : η2i }) i∈(I1 ,I2 ) 44 45 i∈(I1 \{k},I2 ∪{k}) 46 47 49 i∈(I1 ,I2 ∪{k}) 52 53 i∈(J1 ,J2 ) and k 6∈ I1 and k 6∈ I2 and C1 = C ′ ⊎ (ψex 1 ∼ &{Li : η1i }+?Lk .η2k ) ⊎ (ψex 2 ∼ &{Li : η2i }) 50 51 i∈(J1 ,J2 ) and f (I ∪ {k}, C) = f (I ∪ {k}, C1 ) if C = C ′ ⊎ (ψex 1 ∼ &{Li : η1i }) ⊎ (ψex 2 ∼ &{Li : η2i }) i∈(I1 ,I2 ) 48 i∈(J1 ,J2 ) and k ∈ I1 and k ∈ J2 and C1 = C ′ ⊎ (ψex 1 ∼ &{Li : η1i }) ⊎ (ψex 2 ∼ &{Li : η2i }) −− session inference sub(ψ, η, C) = (σ, Cσ) if σ = [ψ → 7 η] sub(η, ψ, C) = (σ, Cσ) if σ = [ψ → 7 η] i∈(J1 ,J2 ) C.5 Algorithm D The duality check algorithm, which we call Algorithm D, takes the constraints set C calculated by the second stage, and returns a larger constraints set C ′ . As in Nielson& Nielson, the algorithm simply halts when a duality check fails, rather than throwing an exception. Algorithm D manipulates a new kind of constraints, called duality constraints. A duality constraint has the form (η1 ⊲⊳ η2 ), where η1 and η2 are inference session types. At the beginning, Algorithm DC creates a duality constraint η1 ⊲⊳ η2 for each channel c and c̄ such that session types η1 and η2 have been derived, i.e. such that {η1 ⊆ c, η2 ⊆ c̄} ∈ C. For any other channel c such that {η1 ⊆ c} is in C, but no constraint {η2 ⊆ c̄} is in C, Algorithm DC introduces a constraint η1 ⊲⊳ ψ2 , where ψ2 is a fresh variable. After this initial setup, Algorithm DC non-deterministically applies one of the following rules to the configuration (σid , C), until no more rules can be applied: (σ, C ⊎ {end ⊲⊳ end}) ֒→ (σ, C) (σ, C ⊎ {!T1 .η1 ⊲⊳ ?T2 .η2 }) ֒→ (σ, C ∪ {T1 ⊆ T2 , η1 ⊲⊳ η2 }) ′ ′ ′ ′ (σ, C ⊎ {!η1′ .η1 ⊲⊳ ?η2′ .η2 }) ֒→ (σ ′ σ, C ′ ∪ S{η1 σ ⊲⊳ η2 σ }) if (σ , C ) = sub(C, η1 , η2 ) {η1i ⊲⊳ η2i }) if I0 ⊆ I1 (σ, C ⊎ {⊕{Li : η1i } ⊲⊳ &{Li : η2i }}) ֒→ (σ, C ∪ i∈I0 i∈I0 i∈(I1 ,I2 ) (σ, C ∪ {ψ1 ⊲⊳ η2 }) (σ, C ∪ {ψin ⊲⊳ η2 }) (σ, C ∪ {ψex ⊲⊳ η2 }) ֒→ (σ ′ σ, C ′ ) ֒→ (σ ′ σ, C ′ ) ֒→ (σ ′ σ, C ′ ) if (σ ′ , C ′ ) = expand(C, ψ1 ⊲⊳ η2 ) if (σ ′ , C ′ ) = expand(C, ψin ⊲⊳ η2 ) if (σ ′ , C ′ ) = expand(C, ψex ⊲⊳ η2 ) where the helper function sub is the same function from Algorithm SI (which returns a substitution and a set of constraints such that the two input sessions are in the subtyping relation). The helper function expand is defined as follows: expand(C, ψ1 expand(C, ψ1 expand(C, ψ1 expand(C, ψ1 expand(C, ψ1 expand(C, ψ1 ⊲⊳ end) ⊲⊳ ?T.η2 ) ⊲⊳ !T.η2 ) ⊲⊳ !η2′ .η2 ) ⊲⊳ ?η2′ .η2 ) ⊲⊳ ⊕{Li : η2i }) i∈I = (σ, Cσ) if = (σ, Cσ) if = (σ, Cσ) if = (σ, Cσ) if = (σ, Cσ) if = (σ, Cσ ∪ C ′ ) if σ = [ψ1 7→ end] σ = [ψ1 7→ !α.η2 ] σ = [ψ1 7→ ?α.η2 ] σ = [ψ1 7→ !ψ1′ .ψ1′′ ] σ = [ψ1 7→ ?ψ1′ .ψ1′′ ] σ = [ψ1 7→ ψex ] and C ′ = {ψex ∼ &{Li : ψ2i }} i∈(I,∅) expand(C, ψ1 ⊲⊳ &{Li : η2i }) = (σ, Cσ ∪ C ′ ) if σ = [ψ1 7→ ψin ] and C ′ = {ψin ∼ ⊕{Li : ψ2i }} i∈I1 i∈(I1 ,I2 ) ′ expand(C, ψex ⊲⊳ ⊕{Li : η2i }) = (σid , C ) i∈I0 if ′′ C = C ∪ {ψex ∼ &{Li : η1i }} i∈(I1 ,I2 ) and C ′ = C ′′ ∪ {ψex ∼ &{Li : η1i }} ∪ i∈(I1 ∪I0 ,I2 \I0 ) expand(C, ψin ⊲⊳ &{Li : η2i }) = (σid , C ′ ) if i∈I0 and C ′ = C ′′ ∪ {ψex ∼ ⊕{Li : η1i }} ∪ i∈(I0 \I2 )∩I1 = (σid , C ′ ) if {η1i ⊲⊳ η2i } i∈I0 C = C ′′ ∪ {ψin ∼ ⊕{Li : η1i }} i∈(I1 ,I2 ) expand(C, ψin ⊲⊳ ψex ) S S {η1i ⊲⊳ η2i } i∈I0 ∩I1 C = C ′′ ∪ {⊕{Li : η1i } ⊆ ψin } ∪ {&{Li : η1i } ⊆ ψex } i∈I0 i∈(I1 ,I2 ) and C ′ = C ′′ ∪ {ψin ∼ ⊕{Li : η1i }} ∪ {ψex ∼ &{Li : η1i }} i∈(I0 \I2 )∪I1 i∈(I1 ∩(I0 \I2 ),I2 ∪(I0 \I1 ) ∪ S {η1i ⊲⊳ η2i } i∈(I0 \I2 )∩I1 where all α, ψ, ψin , ψex variables on the right-hand side are fresh, and where fresh variables ψ1i and ψ2i are generated, in case index i is not defined in the starting internal or external choice. Symmetric rules are omitted. The duality constraints are increasingly simplified, until no more simplifications are possible. After Algorithm DC is finished, the input set C fails the duality check when there exists a duality constraint Cη1 ⊲⊳ η2 such that neither η1 or η2 are fresh session type variables ψ, i.e. η1 6= ψ1 and η2 6= ψ2 . D D.1 Finiteness of Abstract Interpretation Introduction This section proves that the abstract interpretation of a configuration ∆  b in a well-formed environment C always generates a finite state-space. We first formalize the notion of behaviour compact from Definition 5.1. Then we define a translation from behaviours with β variables to ground behaviours, i.e. behaviours without βs. We show that this translation is fully abstract with reference to the abstract interpretation semantics. Finally, we show that a configuration ∆  b and constraints C generate a finite state-space when b is ground and C is wellformed. D.2 Finite ground behaviors In order to show termination of MC, we show that β variables can always be represented by an equivalent finite behaviour when C is well-formed. Consider the following ordering: Definition D.1 (Behaviour ordering). For any constraints set C and behaviour b, the behaviour ordering (C, b) ≻ (C ′ , b′ ) is defined by the following equations: (C, b1 ; b2 ) ≻ (C, bi ) (C, b1 ⊕ b2 ) ≻ (C, bi ) for i ∈ {1, 2} for i ∈ {1, 2} (C, spawn b) ≻ (C, b) (C, & {ρ?Li ; bi }) ≻ (C, bi ) for i ∈ I i∈I (C, β) ≻ (C, b) if {b ⊆ β} ∈ C (C ⊎ {b′ ⊆ β}, recβ b) ≻ (C ∪ {τ ⊆ β}, b) Notice that a behaviour b structurally decreases on the right-hand side of ≻, except when b is a behaviour variable β. When C is not well-formed, a behaviour variable might occur infinitely often in a chain of ≻ relations. Such is the case when b = β and C = {β ⊆ β}, since the pair (C, β) gives rise to the infinite chain: (C, β) ≻ (C, β) ≻ (C, β) ≻ . . . However, it can be shown that there is no infinite chain when C is wellformed. The reason for this is that in a well-formed C, any cycle on behaviour constraints must include a recursive constraint of the form (recβ b ⊆ β ′ ). The definition of ≻ replaces such constraints with the dummy constraint (τ ⊆ β), effectively breaking the constraint cycle. Since a well-formed C is a finite set, eventually there are no more cycles in C. This property is crucial to demonstrate that behaviours have a finite representation in a well-formed C, and it can be proved as follows: Lemma D.1 (Well-foundedness of ≻). If C is well-defined, then ≻ is wellfounded. Proof. We need to show that there are no infinite descending chains in ≻, i.e. for any pair (C, b) there are no infinite sequences of the following kind: (C, b) ≻ (C1 , b1 ) ≻ (C2 , b2 ) ≻ . . . ≻ (Ci , bi ) ≻ . . . We prove the lemma by contradiction. Suppose that there is indeed such an infinite descending chain in ≻. Let I = { i | ∃β.bi = β } There are two cases to consider: either I is finite, i.e. β variables occur a finite number of times in the infinite chain, or I is infinite, i.e. β variables occur infinitely often. If I is finite, let k be the least element in I. By definition, bk is the last behaviour in the infinite chain such that bk = βk for some βk . By well-formedness of C, C contains the constraint (bk+1 ⊆ βk ) and bk+1 is a finite, well-defined term. Since bk+1 is finite and bj is not a variable for j > k, then the chain must be finite, because ≻ structurally decreases b at every step. This contradicts the assumption that there is an infinite chain in ≻, and the lemma is proved. If I is infinite, then the set B = { bi | ∃β.bi = β } (the set of all behaviour variables occurring in the chain) must be finite, because there are only a finite number of constraints (b ⊆ β) in a well-formed C. Because this set is finite, by the pigeonhole principle there exist bi and bj in the infinite chain such that bi = bj = β for some β. This can be illustrated as follows: (C, b) ≻ . . . ≻ (Ci , β) ≻ . . . ≻ (Ck , bk ) ≻ (Ck+1 , bk+1 ) ≻ . . . ≻ (Cj , β) ≻ . . . This sequence contains a cycle over β: (Ci , β) ≻ . . . ≻ (Ck , bk ) ≻ (Ck+1 , bk+1 ) ≻ . . . ≻ (Cj , β) By the Behaviour-Compact property of well-formedness (Def. 5.1.3), one of the behaviours in the cycle must be recursive, i.e. it must have the form recβ ′ b′ for some b′ and β ′ . Let bk = recβ ′ b′ ; by definition of ≻ bk+1 = b′ . Moreover, Ck must contain the constraint (recβ ′ b′ ⊆ β ′ ), whereas Ck+1 contains the dummy constraint τ ⊆ β ′ in its place. Because of this, the number of recursive constraints recβ b ⊆ β decrease by one element in Ck+1 . Since C is a finite set, the infinite chain in ≻ must contain a constraints set C ′ such that C ′ contains no recursive constraints anymore. Since all cycles in behaviours constraints must contain at least a recursive behaviour, and since C ′ contains no such constraints, then there can be no infinite chain after C ′ . This contradicts the hypothesis that there is an infinite chain from (C, b), and the lemma is proved. D.3 Behaviour variables elimination The occurrence of a variable β in a behaviour b creates an indirect link between b and the constraints C where β is defined. This hidden connections introduces cumbersome technical complications when proving properties of the abstract interpretation semantics. On the contrary, ground behaviours, i.e. behaviours that do not contain β variables, are easier to reason about. This section introduces a translation from any behaviour b to the ground behaviour JbKgC , and shows that it is fully abstract w.r.t the abstract operational semantics (provided that C is well-defined). The abstract interpretation semantics treats β variables as place-holders: Rule ICh replaces a β with any behaviour b to which β is bound in C; Rule Rec effectively replaces each β variables inside recursive behaviours recβ b with τ . These observations suggest that a β variable can be substituted either with the internal choice of all the behaviour it binds in C, or with a τ inside recursive behaviours. Such a translation is defined as follows: Definition D.2 (Ground translation). Let C be a well-formed constraint set. The ground translation J−KgC :: B → B is the total function defined by the following equations: JbKgC Jb1 ; b2 KgC Jb1 ⊕ b2 KgC Jspawn bKgC J&i∈I ρ?Li ; bi KgC JβKgC Jrecβ bKgC⊎{b′ ⊆β} = = = = = = = b if β ♯ b for any β Jb1 KgC ; Jb2 KgC Jb1 KgC ⊕ Jb2 KgC spawn JbKgC &i∈I ρ?Li ; Jbi KgC L { Jbi KgC | bi ⊆ β ∈ C } recβ JbKgC∪{τ ⊆β} We now show that, when a constraint set C is well-formed, the ground translation of a behaviour b in C does not expand β variables infinitely, but it constructs a finite ground behaviour, i.e. a behaviour with a finite syntax tree: Lemma D.2. Let C be well-formed and b be a finite behaviour. For any behaviour b, JbKgC is a finite ground term. Proof. By well-founded induction on ≻. The base case is when b is a ground term in {τ, push(l : η), ρ!L . . .}. These are all ground terms in G, and for these terms the translation JbKgC = b, which is finite and ground by hypothesis. If b ∈ {b1 ; b2 , b1 ⊕ b2 , spawn b1 , J&i∈I ρ?Li ; bi KgC }, then the lemma is proved by the inductive hypothesis, since for example if b = b1 ; b2 , then Jb1 KgC and Jb2 KgC are finite ground terms, and therefore Jb1 KgC ; Jb2 KgC is finite and ground too. Because of well-formedness, there are two cases to consider when b = β: either β is bound to a unique constraint b 6= recβ b′ in C, or it is bound to multiple bi which are not recursive behaviours. In the case that b ⊆ β is the only constraint on β in C, and we can write C ad C ′ ⊎ {b ⊆ β}. By definition of translation we have JβKgC = Jrecβ b′ KgC ′ ⊎{b⊆β} = recβ Jb′ KgC ′ ⊎{b⊆τ } . Since (C ⊎ {recβ b′ ⊆ β}, recβ b′ ) ≻ (C ∪ {τ ⊆ β}, b′ ) holds by definition of ≻, the lemma is proved by inductive hypothesis. In the latter case, when β is bound to multiple nonrecursive behaviours bi , the set of all such bi is finite by well-formedness, and the lemma is proved by the inductive hypothesis as in the case b1 ; b2 . Having proved that the ground translation of a behaviour b always exists for well-formed constraints C, we show some property of the translation w.r.t. the abstract semantics: Lemma D.3. Let C be well-formed. 1. if ∆  b − →C ∆  b′ , then ∆  JbKgC − →C ∆′  Jb′ KgC g 2. If ∆  JbKC − →C ∆′  b′′ , then there exists a b′ such that b′′ = Jb′ KgC . Proof. By rule induction. The termination of Algorithm MC hinges on the finiteness of its input behaviour. Even though the algorithm expands the input constraints set C with additional type and session constraints, the size of a ground term remains constant: Lemma D.4 (Constraint expansion). For any well-formed C, if C ′ does not contain behavior constraints, then JbKgC = JbKgC∪C ′ for any b. Proof. By structural induction on b. D.4 Finite state-space We conclude this section by showing that, given a well-formed C, all configurations ∆  b always generate a finite state-space, i.e. the set of reachable states from ∆  b is finite. We prove this result by designing a function that assigns an integer, or size, to any configuration ∆  b, and then show that the size of a configuration always decreases after taking a step in the abstract interpretation semantics. Since configurations of size 0 cannot take steps, and since the size decreases after taking a step in the semantics, the number of states that a finite configuration ∆  b can reach is finite. We first introduce the size function on behaviours: Definition D.3 (Behaviour size). For any behaviour b, the behaviour size size(−) :: B → N is the total function defined by the following equations: size(τ ) size(push(l : η)) size(ρ!T ) size(ρ!ρ′ ) size( & {ρ?Li ; bi }) =0 =2 =1 =1 P = 1 + i∈I size(bi ) size(β) size(ρ?ρ′ ) size(ρ?T ) size(ρ!Li ) size(recβ b) size(b1 ; b2 ) size(b1 ⊕ b2 ) = 1 + size(b1 ) + size(b2) = 1 + size(b1 ) + size(b2) size(spawn b) = 2 + size(b) i∈I =0 =2 =1 =1 = 1 + size(b) According to the definition, τ is the behaviour with the smallest size, zero. Most operations have size 1, except for the resume operation ρ?ρ′ , which has size 2. Notice that push has size 2 as well. The reason for this difference is that these operations introduce new frames on the stack in the abstract interpretation semantics, and therefore have to be counted twice in order for the abstract interpretation semantics to be always decreasing in size. The size of the other behaviours is defined inductively. We now introduce the size of a stack: Definition D.4 (Stack size). The size of a stack ∆, or size(∆), is defined by the following equations: size(ǫ) = 0 size((l : η) · ∆) = 1 + size(∆) In short, the size of a stack is its length, or total number of frames. We finally specify the size of configurations: Definition D.5 (Configuration size). The size of a configuration ∆  b, or size(∆  b), is the sum size(∆  b) = 1 + size(∆) + size(b). An important property of size(−) is that it is invariant to session types: Lemma D.5 (Session substitution distributivity). For any session substitution σ, size(∆  b) = size(∆σ  bσ). Proof. By structural induction on ∆  b. The size of a configuration decreases strictly after each step in the abstract interpretation semantics. This result provides a useful induction principle to reason about Algorithm MC, which will be used to prove a completeness result for MC. The following lemma expresses this result: Lemma D.6. Let C be well-formed, and let b be a ground finite behaviour. If ∆b− →C ∆′  b′ , then size(∆  b) > size(∆′  b′ ). Proof. By rule induction. If Rule End is applied, then (l : end) · ∆  b − →C ∆  b. By definition of size, size((l : end) · ∆  b) = size((l : end) · ∆) + size(b) = 1 + size(∆) + size(b) = 1 + size(∆  b), which proves the lemma. By hypothesis b is a ground term, therefore Rule Beta cannot be applied. If Rule Push is applied, then ∆  push(l : η) − →C (l : η) · ∆  τ holds. By definition, size(∆  push(l : η)) = 2 + size(∆) = 1 + size((l : η) · ∆) = 1 + size((l : η) · ∆  τ ), which proves the lemma. The case for Rule Res is proved similarly. If Rule Out is applied, then (l : !T.η) · ∆  ρ!T ′ − →C (l : η) · ∆  τ holds. By definition, size((l : !T.η) · ∆  ρ!T ′ ) = size((l : !T.η) · ∆) + 1 = 1 + size(∆) + 1 = size((l : η) · ∆) + 1 = size((l : η) · ∆  τ ), which proves the lemma. The cases for Rule In and Del are proved similarly. If Rule ICh is applied, then ∆  b1 ⊕ b2 − →C ∆  bi holds for i ∈ {1, 2}. By definition of size, then size(∆  b1 ⊕ b2 ) = size(∆) + 1 + size(b1 ) + size(b2 ) = 1 + size(∆  bi ) + size(bj ) for {i, j} = {1, 2}. The lemma is proved by 1 + size(∆  bi ) + size(bj ) > size(∆  bi ) for i ∈ {1, 2}. The cases for Rule ECh, Rec, Spn and Tau are proved similarly. If Rule Seq is applied, then ∆  b1 ; b2 − →C ∆′  b′1 ; b2 only if ∆  b1 − →C ∆′  ′ ′ holds. By rule induction size(∆  b1 ) > size(∆  b1 ). By definition of size, size(∆  b1 ; b2 ) = 1+size(∆)+size(b1)+size(b2); by the previous inequality we have that 1 + size(∆) + size(b1) + size(b2) > 1 + size(∆′) + size(b′1 ) + size(b2) = size(∆′  b′1 ; b2 ), which proves the lemma. b′1 D.5 Termination of MC In order to prove termination, some well-formedness properties of algorithm MC need to be proved first. In particular, we want to show that MC returns wellformed outputs, given some well-formed arguments as input. A configuration ∆  b is well-formed in configuration C when any free variable occurring in ∆  b is bound by some constraint in C: Definition D.6 (Variable well-formedness). A variable γ is well-formed in a constraints set C when, if γ ∈ {β, ρ, ψ, ψin , ψex }, then there exists a constraint (g ⊆ γ) ∈ C such that all the free variables in g are well-formed in C. Definition D.7 (Configuration well-formedness). A configuration ∆  b is well-formed in a constraint set C when all the free variables in ∆  b are well-formed in C. Given a well-formed constraints set C and a well-formed configuration ∆  K[b] in C, Algorithm MC returns a session inference substitution σ and a refined constraints set C ′ . Following the approach of [1, Sec. 2.2.5, p.51], session inference substitution (or simply session substitution) is a total function from session variables to session types, defined as follows: Definition D.8 (Session inference substitution). An inference substitution σ is a total function from session variables ψ to sessions η. The domain of an inference substitution σ is dom(σ) = { ψ | σ(ψ) 6= ψ } and its range is rg(σ) = S { F V (σ(ψ)) | ψ ∈ dom(σ) }. It is easy to verify that Algorithm MC only returns session substitutions:  Lemma D.7. If ∆  K[b] is well-formed in C and MC ∆  b, k, C = (σ, C ′ ), then σ is a session inference substitution. Proof. By induction on size(∆  K[b]). During session type inference, Algorithm MC might need to subsume some type T inside an inferred session type to a more general type T ′ . For example, suppose that MC has inferred session type η =!T.end (for some T ) and a set C for an endpoint l. If the same endpoint is used in the behaviour b = l!T ′ , b respects session type η only if C ⊢ T ′ <: T holds, according to the abstract interpretation semantics of Fig. 4. Algorithm MC deals with type subsumption by adding new type constraints in the input set C in the constraints set C ′ ; for example, it would add the constraint (T ′ ⊆ T ) in the previous example. We say that C ′ is a refinement of C, in the sense C ′ is a superset of C that further specifies types and session types. Constraints refinement is defined as follows: Definition D.9 (Constraints refinement). A constraint set C is a refinement of constraint set C ′ , or C ⊢ C ′ , when: – for all constraints (ψin ∼ η ′ ) in C ′ , there exists a session η such that C ⊢ η <: η ′ and C ⊢ ψin ∼ η hold. – for all constraints (ψex ∼ η ′ ) in C ′ , there exists session η such that C ⊢ η <: η ′ and C ⊢ ψex ∼ η hold. – if C ′ ⊢ push(l : η ′ ) ⊆ β, then C ⊢ push(l : η) ⊆ β and C ⊢ η <: η ′ – for all other constraints (g ⊆ g ′ ) in C ′ , C ⊢ g ⊆ g ′ holds Constraint refinements are unaffected by session substitutions: Lemma D.8 (Substitution invariance). Let C and C ′ be well-formed, and σ a session inference substitution. If C ⊢ C ′ , then Cσ ⊢ C ′ σ. Proof. By induction on the size of C. Algorithm MC progressively refines the input constraints set C by refining session variables ψ, assigning a lower session type to external and internal choices bound to variables ψex and ψin , and by adding type constraints T ⊆ T ′ . When the algorithm terminates, the resulting set C ′ is a refinement of C, after applying the inferred substitution σ to it. Lemma D.9 (Constraint refinement on sub-types). If sub(η1 , η2 , C) = (σ1 , C1 ), then C1 ⊢ Cσ1 . Proof. By structural induction on η1 . Function sub terminates when either η2 has the same shape as η1 (i.e. if η1 =!T1 .η1′ then η2 =!T2 .η2′ ), or η2 is a variable ψ2 . In the latter case (η1 , ψ2 , C) = (σ, Cσ) with σ = [ψ2 7→ η1 ], and the lemma is trivially proved by Cσ ⊢ Cσ. Consider the former case, when η1 and η2 have the same shape. When η1 = end the lemma holds trivially. If η1 is !T1 .η1′ , then η2 =!T2 .η2′ ; by induction we have C1 ⊢ Cσ1 ∪ {T2 σ1 ⊆ T1 σ1 }, which implies C1 ⊢ Cσ1 by definition of constraint refinement. The case for η1 =?T1 .η1′ is proved similarly. The cases for delegate and resume hold directly by inductive hypothesis. When η1 is an internal choice, we need to show that f (I2 , C) = (σ1 , C1 ) implies C1 ⊢ Cσ1 . This can be easily proved by induction of the size of I2 . The base case (line 21) is trivial. In the inductive case, if a label k from I2 is missing in I1 (lines 22-25), then ⊕{Li : η1i }i∈I1 ∪{k} ⊕ η2k is a subtype of ⊕{Li : η1i }i∈I1 by definition (because I1 ∪{k} ⊂ I1 ) and the lemma follows by inductive hypothesis. If k is in I1 , then the lemma follows directly by inductive hypothesis. When η1 is an external choice, we need to show that f (J1 ∪ J2 , C) = (σ1 , C1 ) implies C1 ⊢ Cσ1 . We prove this by induction on the size of J1 ∪ J2 . Let η1 = &{Li : η1i }i∈(I1 ,I2 ) and η2 = &{Li : η2i }i∈(J1 ,J2 ) be such that I1 ⊆ J1 . The base case (line 36) is trivial. In the inductive case, suppose that a label k is either in the inactive labels J2 , or it is in both the active labels I1 and J1 . Then it is sufficient to show that η1k is a subtype of η2k , which holds by inductive hypothesis on sub. If k is in the active labels I1 but it is in the inactive labels J2 , then removing k from I1 and adding it to the inactive labels I2 makes I1 \{k} be a subset of J1 ; under this condition the subsequent call f(I ∪ {k}, C1 ) is proved as in the previous case. If k is neither in I1 nor I2 , then k is added to the inactive labels I2 and the lemma is proved as in the previous case too. Lemma D.10 (Constraint refinement). If MC(∆  b, C, K) = (σ1 , C1 ), then C1 ⊢ Cσ1 . Proof. By induction on size(∆σ  J(K[b])σKgC1 ). Most cases follow directly from the inductive hypothesis, such as the case for push: 11 12 13 14 −− push a new frame on the  stack MC ∆  push(l : η), C, K = (σ2 σ1 , C2 ) if (σ1 , ∆1 ) = checkFresh(l, ∆)  and (σ2 , C2 ) = MC (l : ησ1 ) · ∆1  τ, Cσ1 , Kσ1  At line 14 we have that MC (l : ησ1 ) · ∆1  τ, Cσ1 , Kσ1 = (σ2 , C2 ). By inductive hypothesis, we obtain directly C2 ⊢ Cσ2 σ1 . The lemma is also trivial when b is an operation that sends a type T : 16 17 18 19 20 −− send  MC (l : ψ) · ∆  ρ!T, C, K = (σ2 σ1 , C2 ) if C ⊢ l ∼ ρ and σ1 = [ψ 7→ !α.ψ ′ ] where α, ψ ′ fresh  and (σ2 , C2 ) = MC (l : ψ ′ ) · ∆σ1  τ, Cσ1 ∪ {T ⊆ α}, Kσ1  At line 20 we have MC (l : ψ ′ ) · ∆σ1  τ, Cσ1 ∪ {T ⊆ α}, Kσ1 = (σ2 , C2 ). By inductive hypothesis we obtain directly that C2 ⊢ Cσ2 σ1 ∪ {T σ2 ⊆ ασ2 }, which in turn implies C2 ⊢ Cσ2 σ1 by definition of constraints refinement; this proves the lemma. The lemma is proved similarly when a type T is received (lines 2532), and when a session is resumed (lines 50-61). When the behaviour delegates a session (lines 34-48), the lemma is proved by Lem. D.9. The case is more interesting when the behaviour b extends an inferred internal choice with a new label: 73   MC (l : ψin ) · ∆  ρ!Li , C, K = MC (l : ψi ) · ∆  τ, C ′ ⊎ {ψin ∼ ⊕{Lj : ηj }}, K j∈J,i 74 75 if C ⊢ l ∼ ρ and i 6∈ J and C = C ′ ⊎ {ψin ∼ ⊕{Lj : ηj }} and ηi = ψi fresh j∈J By definition of MC at lines 73 and 75, we have: C = C ′ ⊎ {ψin ∼ η1 } ′ C1 = C ⊎ {ψin ∼ η1′ } η1 = ⊕{Lj : ηj } j∈J η1′ = ⊕{Lj : ηj } j∈J,i where i 6∈ J. Notice that η1′ <: η1 holds by definition of subtyping, since J ⊆ J ∪ {i}. By Def. D.9 of constraint refinement, C1 ⊢ C holds too, because C ′ is contained in C verbatim, and we have just proved that η1′ <: η1 . By the inductive hypothesis, if MC terminates with (σ2 , C2 ), then C2 ⊢ C1 σ2 holds. By Lem. D.8, the previous result C1 ⊢ C implies C1 σ2 ⊢ Cσ2 . By transitivity of constraint refinement, we have C2 ⊢ Cσ2 and the lemma is proved. Let now b be an external choice, with b = &i∈I ρ?Li ; bi . For ease of exposition, let us first consider the case where the MC clause at line 89 applies: 89  MC (l : ψex ) · ∆  & ρ?Li ; bi , C, K = (σn . . . σ0 , Cn ) i∈I 90 91 if C ⊢ l ∼ ρ and J1 ⊆ I and I ⊆ J1 ⊎ J2 and C = C ′ ⊎ {ψex ∼ &{Lj : ηj }} j∈(J1 ,J2 ) 92 93 94 and for each k ∈ [1 . . . n] where I = {Lj1 , . . . , Ljn } and n ≥ 0  (σk , Ck ) = MC ((l : ηjk ) · ∆  bjk )σk−1 . . . σ0 , Ck−1 , Kσk−1 . . . σ0 where σ0 = σid and C0 = C In this case, the final constraints set Cn is obtained by recursively refining the input C through invocations to MC at line 93. By inductive hypothesis, we have that each set C1 , C2 , . . . Cn is a successive refinement of C, i.e. Cn ⊢ Cn−1 σn , . . . , C1 ⊢ C0 σ0 hold. Since C0 = C, the last refinement can be written as C1 ⊢ Cσ0 . By Lem. D.8 this implies C1 σ1 ⊢ Cσ1 σ0 . Since C2 ⊢ C1 σ1 holds by inductive hypothesis, it also follows that C2 ⊢ Cσ1 σ0 by transitivity of constraint refinement. By repeating this reasoning, we can conclude by transitivity of constraint refinement that Ck ⊢ Cσk . . . σ0 for any k ≤ |I|. Since a well-formed behaviour is finite and b is well-formed by assumption, the external choice in b has a finite set of labels Li for i ∈ I. Therefore I is a finite set, and we can conclude that Cn ⊢ Cσn . . . σ0 for n = |I|, which proves the lemma. Suppose that either the clause at line 78 or line 84 applies. Notice that in these two cases we cannot apply the inductive hypothesis directly, since MC is passed the entire behaviour b as input. However, the only clause of MC that applies is the third clause at line 89. In the first case (line 78) the algorithm creates a new external choice constraint in C, by associating the session &{Li : ψi }i∈(I,∅) to a fresh session variable ψex . The first MC clause cannot be called again, because the stack contains ψex in place of ψ (line 82). Notice that the set of inactive labels is the empty set, therefore the second MC clause does not apply, since I = I1 in this case and therefore I3 = ∅. Therefore the only MC clause that applies is the the third one, and the lemma is proved as in the first case. By a similar reasoning, the only clause that applies to the sub-call to MC in the first clause (line 87) is the third clause, and the lemma is proved similarly. Before proving termination of MC, we prove some further properties of the auxiliary functions from Sec. C.3, which MC uses. Lemma D.11 (finalize). For any well-formed stack ∆, finalize ∆ terminates. Proof. By structural induction on ∆. If ∆ = ǫ, then finalize ǫ terminates with the empty substitution (line 12). If ∆ = (l : η) · ∆′ , then the lemma follows by inductive hypothesis when η = end or η = ψ (lines 13 and 14), or it terminates with an error otherwise, since no other finalize clause applies. Lemma D.12 (checkFresh). For any well-formed stack ∆ and label l, the function call checkFresh(l, ∆) terminates. Moreover, if l occurs in ∆ and the function call checkFresh(l, ∆) = (σ, ∆′ ), then size(∆′ ) < size(∆); otherwise size(∆′ ) ≤ size(∆). Proof. By structural induction on ∆. The base case is ∆ = ǫ, whereby checkFresh terminates with (σid , ǫ) (line 2), and the second part of the lemma is vacuously true, since l cannot occur in the empty stack ǫ. In the inductive case when ∆ = (l′ : η) · ∆′ , checkFresh terminates immediately with a smaller stack if l = l′ and either η = end (line 3) or η = ψ (line 4). If l 6= l′ , then checkFresh terminates with a smaller stack by inductive hypothesis. Otherwise it terminates with an error (because no other clauses apply) and the second condition of the lemma is vacuously true. Corollary D.1 (closeTop). For any well-formed stack ∆, closeTop ∆ terminates. Moreover, if closeTop ∆ = (σ, ∆′ ), then size(∆′ ) < size(∆). Proof. By Lem. D.12. Lemma D.13 (sub). For any session η1 , η2 and well-formed C, sub(η1 , η2 , C) terminates. Proof. By structural induction on η1 and η2 . We can now prove termination of MC: Proposition D.1 (Termination of MC). For any well-formed C and ∆   K[b], MC ∆  b, K, C terminates. Proof. By lexicographic induction on size(∆  JK[b]KgC ) and size(JbKgC ). We proceed by case analysis on the MC clauses in Sec. C.2. – Ended session: 1 2 −− remove terminated frames   MC (l : end) · ∆  b, C, K = MC ∆  b, C, K This case follows by inductive hypothesis, since size(∆) < size((l : end) · ∆) by Def. D.4. – Tau: 4 5 6 −− MC terminates  with behavior τ MC ∆  τ, C, ǫ = (σ, Cσ) if σ = finalize ∆ By Lem. D.11, finalize terminates for any ∆, therefore algorithm MC always terminates and the proposition is proved. – Tau sequence: 8 9 −− pop a sub−behavior  from the continuation  stack MC ∆  τ, C, b · K = MC ∆  b, C, K By definition of continuation stack, b · K[τ ] = K[τ ; b]. By Definition D.3 of behaviour size, size(K[τ ; b]) = 1 + size(K[b]). Therefore the configuration ∆  (b · K)[τ ] has greater size than configuration ∆  K[b], and the proposition follows by inductive hypothesis. – New session push: 11 12 13 14 −− push a new frame on the  stack MC ∆  push(l : η), C, K = (σ2 σ1 , C2 ) if (σ1 , ∆1 ) = checkFresh(l, ∆)  and (σ2 , C2 ) = MC (l : ησ1 ) · ∆1  τ, Cσ1 , Kσ1 By Lem. D.12, checkFresh(l, ∆) always terminates, and if it terminates successfully then ∆1 has smaller or equal size to ∆. By Definition D.5 of configuration size and by Lem. D.5: size(∆  K[push(l : η)]) = 1 + 2 + size(∆) + size(K[τ ]) ≥ 1 + 2 + size(∆1 ) + size(Kσ1 [τ ]) = 1 + 1 + size((l : ησ1 ) · ∆1 ) + size(Kσ1 [τ ]) > 1 + size((l : ησ1 ) · ∆1 ) + size(Kσ1 [τ ]) = size((l : ησ1 ) · ∆1  Kσ1 [τ ]) and the proposition is proved by the inductive hypothesis. Recall that, by definition of size, 1 + size(∆) = size((l : η) · ∆) for any η and l, since size(−) is invariant to session types. – Value send: 16 17 18 19 20 21 22 23 −− send  MC (l : ψ) · ∆  ρ!T, C, K = (σ2 σ1 , C2 ) if C ⊢ l ∼ ρ and σ1 = [ψ 7→ !α.ψ ′ ] where α, ψ ′ fresh  and (σ2 , C2 ) = MC (l : ψ ′ ) · ∆σ1  τ, Cσ1 ∪ {T ⊆ α}, Kσ1   MC (l : !α.η) · ∆  ρ!T, C, K = MC (l : η) · ∆  τ, C ∪ {T ⊆ α}, K if C ⊢ l ∼ ρ By the inductive hypothesis in both cases. The other cases when b is ρ!T , ρ?T , ρ!Lk , ρ?Lk , ρ!ρd and ρ?ld are all proved similarly. – Session delegation: 37 38 39  MC (l : !ηd .η) · (ld : ηd′ ) · ∆  ρ!ρd , C, K = (σ2 σ1 , C2 ) if C ⊢ l ∼ ρ and C ⊢ ld ∼ ρd and (σ1 , C1 ) = sub(ηd′ , ηd , C) 40 and (σ2 , C2 ) = MC (l : η) · ∆σ  τ, C1 , Kσ1 41 42 43 44 45   MC (l : η) · (ld : ηd′ ) · ∆  ρ!ρd , C, K = (σ2 σ1 , C2 ) if C ⊢ ld 6∼ ρd and (σ1 , ∆1 ) = checkFresh(ld , (l : η) · (ld : ηd′) · ∆) and (σ2 , C2 ) = MC ∆1  ρ!ρd , Cσ1 , Kσ1 By Lem. D.13 and inductive hypothesis in the first clause, and by D.12 and inductive hypothesis in the second clause. – External choice: 77 78 −− ex. choice  MC (l : ψ) · ∆  & {ρ?Li ; bi }, C, K = (σ2 σ1 , C2 ) i∈I 79 80 81 82 if C ⊢ l ∼ ρ and σ1 = [ψ 7→ ψex ] where ψex fresh → − and C1 = {ψex ∼ &{Li : ψi }} where ψi fresh i∈(I,∅)   and (σ2 , C2 ) = MC (l : ψex ) · ∆σ1  & {ρ?Li ; bi } σ1 , Cσ1 ∪ C1 , Kσ1 i∈I 83 84  MC (l : ψex ) · ∆  & ρ?Lj ; bj , C, K = MC (l : ψex ) · ∆  & ρ?Lj ; bj , C1 , K j∈I1 ⊎I2 ⊎I3 j∈I1 ⊎I2 ⊎I3 86 if C ⊢ l ∼ ρ and C = C ′ ⊎ {ψex ∼ &{Lj : ηj }} and I3 ♯ J1 ⊎ J2 and I3 , J1 6= ∅ 87 and C1 = C ′ ∪ {ψex ∼ &{Li : ηi }} 85  j∈(I1 J1 ,I2 J2 ) i∈(I1 ,I2 I3 J1 J2 ) 88 89  MC (l : ψex ) · ∆  & ρ?Li ; bi , C, K = (σn . . . σ0 , Cn ) i∈I 90 91 if C ⊢ l ∼ ρ and J1 ⊆ I and I ⊆ J1 ⊎ J2 and C = C ′ ⊎ {ψex ∼ &{Lj : ηj }} j∈(J1 ,J2 ) 92 93 94 and for each k ∈ [1 . . . n] where I = {Lj1 , . . . , Ljn } and n ≥ 0  (σk , Ck ) = MC ((l : ηjk ) · ∆  bjk )σk−1 . . . σ0 , Ck−1 , Kσk−1 . . . σ0 where σ0 = σid and C0 = C As shown in the proof of Lem. D.10, the first two clauses recursively call MC with the same input, except for an expanded ψ and C1 in the first case (line 78), and a modified ψex in the second case (line 84). Let us therefore analyse the third clause first. Let b = &i∈I ρ?Li ; bi . If the third clause is applied (line 89), the proposition is a straightforward consequence of the inductive hypothesis and Lem. D.5, since each recursive invocation of MC has as input bjk , which is a subbehaviour of the input behaviour b. If the first clause is invoked (line 78), by Lem. D.10 and Lem. D.4 we have size(J∆  bKgC ) = size(J∆σ1  bσ1 KgCσ1 ∪C1 ). Since the size of the behaviour is the same and the only applicable MC clause is the third one, the proposition is proved as before. If the second clause is invoked (line 84), the proof proceeds as in the previous case, except for the fact that the constraint set C is refined instead of expanded. – Behavior sequence: 96 97 −− sequencing   MC ∆  b1 ; b2 , C, K = MC ∆  b1 , C, b2 · K By definition of stack continuation, K[b1 ; b2 ] = b2 · K[b1 ], and therefore size(∆  K[b1 ; b2 ]) = size(∆  b2 · K[b1 ]). Because of this, and since size(b1) < size(b1 ; b2 ) for any b2 , the proposition is proved by the second ordering in the lexicographic order of the inductive hypothesis. – Behavior choice: 99 100 101 102 −− internal choice in the  behavior MC ∆  b1 ⊕ b2 , C, K = (σ2 σ1 , C2 ) if (σ1 , C1 ) = MC ∆  b1 , C, K  and (σ2 , C2 ) = MC ∆σ1  b2 σ1 , C1 , Kσ1 By inductive hypothesis. – Recursive behavior: 109 110 111 112 113 −− rec MC(∆  recβ b, C) = (σ2 σ1 , C2 ) if C = C ′ ⊎ {b′ ⊆ β}  and (σ1 , C1 ) = MC ǫ  b, C ′ ∪ {τ ⊆ β}, ǫ  and (σ2 , C2 ) = MC ∆σ1  τ, (C1 \{τ ⊆ β}) ∪ ({b′ ⊆ β})σ1 , Kσ1 By inductive hypothesis. By definition of ground term, Jrecβ bKgC⊎{b′ ⊆β} = recβ JbKgC∪{τ ⊆β} holds, and therefore the inductive hypothesis can be applied on the first inner call to MC at line 112. The second call to MC terminates by the inductive hypothesis as well, since the size of τ is strictly less than the size of a recursive term recβ b. – Behavior variables: 115 116 117 −− behavior variable   MC ∆  β, C, L K = MC ∆  b, C, K where b = {bi | ∃i. (bi ⊆ β) ∈ C} This case is proved as for the case of behavior choice, after unrolling the definition of MC. – Forced session termination: 119 120 121 122 −− try to close the  top session if all previous clauses fail MC ∆  b, C, K = (σ2 σ1 , C2 ) if (σ1 , ∆1 ) = closeTop(∆)  and (σ2 , C2 ) = MC ∆1  bσ1 , Cσ1 , Kσ1 By Cor. D.1 and inductive hypothesis. Termination of SI follows directly from this result: Theorem D.1 (Termination of SI). For any well-formed C and b, SI(b, C) terminates. Proof. By Prop. D.1. E Soundness of Algorithm SI This section shows a soundness result for Algorithm SI. Namely we show that, given a well-formed b and C, if SI terminates with a solution (σ1 , C1 ), then the configuration ǫ  bσ1 is strongly normalizing under C1 . The core of the proof revolves around proving that MC is sound. However some extra technical machinery is required before proceeding with the proof, because of two issues: the lazy detection of terminated sessions and constraint refinement. The first issue is that Algorithm MC detects the termination of sessions lazily. During inference, open session variables ψ in the stack are assigned the session end only when no other MC clause is applicable (line 120), or at the very end of session inference at line 5, when the stack is empty and the behaviour is τ. Because of this laziness, the proof of soundness of MC requires some flexibility to deal with terminated sessions. We therefore introduce the following equivalence relation on stacks with terminated sessions: Definition E.1 (Terminated session equivalence). ∆ ≡ ∆′ ǫ ≡ ǫ (l : end) · ∆ ≡ ∆′ ∆ ≡ ∆′ (l : η) · ∆ ≡ (l : η) · ∆′ η 6= end The second issue is that constraints in C may be refined from time to time in Algorithm MC, and we need to show that strong normalization is preserved under constraint refinement. For example, let the stack contain a variable ψin , and let C contain the constraint {ψin ⊆ ⊕{Li : ηi }i∈I }. During session inference the internal choice ⊕{Li : ηi }i∈I might be expanded, for example by adding a new label Lk . In such a case the constraint {ψin ⊆ ⊕{Li : ηi }i∈I } is refined to {ψin ⊆ ⊕{Li : ηi }i∈I,k }, and C is updated to some C ′ accordingly. If a behaviour b is strongly normalizing under C, it is now unclear if b is also strongly normalizing in C ′ . To address this issue, we introduce the following form of stack sub-typing: Definition E.2 (Stack sub-typing). Let C be well-formed. A stack ∆1 is a subtype of stack ∆2 , or C ⊢ ∆1 <: ∆2 , when the following relations are satisfied: C ⊢ ǫ <: ǫ C ⊢ (l : η1 ) · ∆1 <: (l : η2 ) · ∆2 if C ⊢ η1 <: η2 and C ⊢ ∆1 <: ∆2 The following theorem is crucial in proving that that strong normalization is preserved under constraint refinement: Theorem E.1 (Liskov’s substitution principle). Let C2 ⊢ C1 σ, C2 ⊢ ∆2 <: ∆1 σ. If ∆1  b →C1 ∆′1  b′ , then ∆2  bσ →C2 ∆′2  b′ σ1 and C2 ⊢ ∆′2 <: ∆′1 σ. Proof. By rule induction. The proof of 3 is a trivial consequence of the hypothesis C2 ⊢ pure(∆2 ), since the continuation of a pure session is itself pure. We only prove 1 and 2: Case End: Suppose that (l : end) · ∆1  b →C1 ∆1  b. By definition of substitution ((l : end) · ∆1 )σ = (l : end) · ∆1 σ; by definition of stack sub-typing the hypothesis C2 ⊢ ∆2 <: ((l : end) · ∆1 )σ implies that ∆2 = (l : end) · ∆′2 for some ∆′2 such that C2 ⊢ ∆′2 <: ∆1 σ. Rule End yields ∆2  bσ →C2 ∆′2  bσ, which proves the proposition together with C2 ⊢ ∆′2 <: ∆1 σ Case Beta: Let ∆1  β →C1 ∆1  b, assuming that b ⊢ β ⊆ C1 . By definition of refinement, C2 ⊢ C1 σ implies that C2 ⊢ bσ ⊆ βσ. Since βσ = β by definition of inference substitution, C2 ⊢ bσ ⊆ β holds, and therefore the proposition is proved by applying Rule Beta on ∆2  β. Case Plus: Let ∆1  b1 ⊕ b2 →C1 ∆1  bi with i ∈ {1, 2}. By definition of substitution (b1 ⊕b2 )σ = b1 σ ⊕b2 σ. The proposition is proved by straightforward application of Rule Plus, which yields ∆2  b1 σ ⊕ b2 σ →C2 ∆2  bi σ. Case Push: Let ∆1  push(l:η) →C1 (l : η) · ∆1  τ with l ♯ ∆. By application of Rule Push, ∆2  push(l : η)σ →C2 (l : ησ) · ∆2  τ holds because push(l : η)σ = push(l : ησ). By definition of subtyping C2 ⊢ ησ <: ησ holds by reflexivity, and therefore C2 ⊢ (l : ησ) · ∆2 <: (l : ησ) · ∆1 σ holds, because C2 ⊢ ∆2 <: ∆1 σ holds by hypothesis; therefore the proposition is proved. Case Out: Let (l : !T.η) · ∆1  l!T0 →C1 (l : η) · ∆1  τ , with C1 ⊢ pure(T0 ) and C1 ⊢ T0 <: T . By definition of substitution ((l : !T.η) · ∆1 )σ = (l : !T σ.ησ) · ∆1 σ holds. By definition of stack sub-typing, C2 ⊢ ∆2 <: (l : !T σ.ησ) · ∆1 σ implies that ∆2 = (l : !T ′ .η ′ ) · ∆′2 such that C2 ⊢ T σ <: T ′ and C2 ⊢ ∆′2 <: ∆1 σ. Since C2 ⊢ C1 σ holds by hypothesis, then C1 ⊢ T0 <: T implies C2 ⊢ T0 σ <: T σ. By transitivity C2 ⊢ T0 σ <: T σ and C2 ⊢ T σ <: T ′ imply C2 ⊢ T0 <: T ′ . Since l!T0 σ = l!(T0 σ), an application Rule Out yields (l : !T ′ .η ′ ) · ∆′2  l!T0 σ →C2 (l : η ′ ) · ∆′2  τ , which proves 1. By definition of session sub-typing, the hypothesis C2 ⊢ (l : !T ′ .η ′ ) · ∆′2 <: (l : !T σ.ησ) · ∆1 σ implies η ′ ⊢ ησ <: C2 . We have already proved that C2 ⊢ ∆′2 <: ∆1 σ holds, therefore we can infer C2 ⊢ (l : η ′ ) · ∆′2 <: (l : ησ) · ∆1 σ, which proves 2. Cases In, Del, Res: proved as in case Out, using the fact that sub-typing is covariant for In, Res, and it is contravariant for Del. Case ICh: Let (l : ⊕{Li : ηi }i∈I ) · ∆1  l!Lk →C1 (l : ηk ) · ∆1  τ with k ∈ I. By definition of internal choice variables, configuration (l : ⊕{Li : ηi }i∈I ) · ∆1  ρ!Lk is equivalent to (l : ψin ) · ∆1  ρ!Lk with C1 ⊢ ψin ∼ ⊕{Li : ηi }i∈I for some ψin . Since C2 ⊢ C1 σ holds by hypothesis, by definition of constraint refinement there exists a session η ′ = ⊕{Lj : ηj′ }j∈J such that C2 ⊢ ψin ∼ η ′ and C2 ⊢ ⊕{Lj : ηj′ }j∈J <: ⊕{Li : ησi }i∈I hold, with J ⊆ I. Since J ⊆ I, k ∈ I implies k ∈ J; and since (ρ!Lk )σ = ρ!Lk , an application of Rule ICh yields (l : ⊕{Lj : ηj′ }j∈J ) · ∆′2  (ρ!Lk )σ →C2 (l : ηk′ ) · ∆′2  τ , which proves 1. By definition of session sub-typing C2 ⊢ ⊕{Lj : ηj′ }j∈J <: ⊕{Li : ηi }i∈I implies C2 ⊢ ηk′ <: ηk ; since C2 ⊢ ∆′2 <: ∆1 σ holds by hypothesis, then C2 ⊢ (l : ηk′ ) · ∆′2 <: ∆1 σ holds too, which proves 2. Case ECh: similar to the case for ICh. Before proving soundness, we also need a lemma about the session sub-type inference. The sub function infers whether a session η1 is a sub-type of session η2 : Lemma E.1 (Soundness of sub). If sub(η1 , η2 , C) = (σ1 , C1 ), then C1 ⊢ η1 σ1 <: η2 σ1 . Proof. By structural induction on η1 . The structure of the proof is similar to the structure of the proof for Lem. D.9. The lemma is trivial when η1 = η2 = end. When η1 =!T1 .η1′ and η2 =!T2 .η2′ , C is expanded with the constraint {T2 ⊆ T1 }. By structural induction η1′ is a subtype of η2′ ; since C1 contains the constraint {T2 ⊆ T1 }, η1 is a subtype of η2 by definition of subtyping. The case for receive is similar; the cases for delegation and resume follow straightforwardly by structural induction. When η1 is an internal choice variable ψin , function sub calls an internal function f which inspects each label Li in η2 , and either expands η1 if η1 does not contain Li , or it just recursively invokes sub on each common branch of the internal choices of η1 and η2 . The lemma is proved straightforwardly by the definition of session sub-typing in the former case, and by the inductive hypothesis in the latter case. The proof is similar when η1 is an external choice variable ψex . When η1 is a session variable ψ, sub produces the substitution substitutes [ψ 7→ η2 ], and the lemma is proved straightforwardly by reflexivity. Similarly when η2 = ψ holds. Soundness of session inference depends on the following central result: Proposition E.1 (Soundness of Algorithm MC). Let C be well-formed in ∆  b. If MC(∆  b, C, K) = (σ1 , C1 ), then there exists ∆′ such that ∆σ1 ≡ ∆′ and ∆′  K[b]σ1 ⇓C1 . Proof. As in the proof of Prop. D.1, the proposition is proved by lexicographic induction on size(∆  JK[b]KgC ) and size(JbKgC ). Let us proceed by case analysis on MC(∆  b, C). – 1 −− remove terminated frames  2 MC (l : end) · ∆  b, C, K = MC ∆  b, C, K   Suppose that MC (l : end) · ∆  b, C, K = (σ1 , C1 ). By the inductive hypothesis on the clause MC ∆  b, C, K , there exists ∆′ such that ∆σ1 ≡ ∆′ and ∆′  K[b]σ1 ⇓C1 . By Def. E.1 of stack equivalence, we have (l : η) · ∆σ1 ≡ ∆σ1 . Since ∆σ1 ≡ ∆′ holds by inductive hypothesis, it follows that ((l : η) · ∆)σ1 ≡ ∆′ . Therefore the proposition is proved by ∆′ . – 4 −− MC terminates  with behavior τ 5 6 MC ∆  τ, C, ǫ = (σ, Cσ) if σ = finalize ∆ By definition of finalize, a ∆σ is equivalent to the empty stack ǫ, since finalize succeeds only if it replaces all variables ψ in ∆ with end, and only end sessions are left in it. The lemma is therefore proved by taking ∆′ = ǫ, because ǫ  τ σ ⇓C holds trivially for any σ and C. – 8 −− pop a sub−behavior  from the continuation  stack 9 MC ∆  τ, C, b · K = MC ∆  b, C, K By inductive hypothesis. –11 −− push a new frame on the  stack 12 13 14 MC ∆  push(l : η), C, K = (σ2 σ1 , C2 ) if (σ1 , ∆1 ) = checkFresh(l, ∆)  and (σ2 , C2 ) = MC (l : ησ1 ) · ∆1  τ, Cσ1 , Kσ1 If this clause succeeds, then also the inner calls to checkFresh does, which implies ∆σ1 ≡ ∆1 . Notice that ∆1 contain no frame of the form (l : η) for any η, i.e. l ♯ ∆1 . Because of this and by taking ∆′ = ∆1 , the abstract interpretation semantics allows the following transition: ∆′  K[push(l : η)] − →C2 (l : η) · ∆′  K[τ ]  Since the inner call MC (l : ησ1 ) · ∆1  τ, Cσ1 , Kσ1 succeeds too, the lemma follows by inductive hypothesis. –16 −− send 17 18 19 20  MC (l : ψ) · ∆  ρ!T, C, K = (σ2 σ1 , C2 ) if C ⊢ l ∼ ρ and σ1 = [ψ 7→ !α.ψ ′ ] where α, ψ ′ fresh  and (σ2 , C2 ) = MC (l : ψ ′ ) · ∆σ1  τ, Cσ1 ∪ {T ⊆ α}, Kσ1 Let us assume that the above clause has been used. Because the domain of inference substitutions is session variables ψ, in this case we have:  (l : ψ) · ∆ σ2 σ1  K[ρ!T ]σ2 σ1 = (l : !α.(ψ ′ σ2 )) · ∆σ2 σ1  (Kσ2 σ1 )[ρ!T ] From the algorithm we have that C ⊢ l ∼ ρ holds. The inner call to MC has C1 = Cσ1 ∪ {T ⊆ α} as input constraints set. By Lem. D.10, C2 ⊢ C1 σ2 , and therefore C2 ⊢ l ∼ ρ and C2 ⊢ (T ⊆ α)σ2 hold. The latter implies C2 ⊢ T ⊆ α because σ2 is an inference substitution (and therefore any type variable α′ in T is fresh from the domain of σ2 ). Since C2 ⊢ l ∼ ρ and C2 ⊢ T ⊆ α both hold, the abstract interpretation semantics allows the following transition: (l : !α.(ψ ′ σ2 )) · ∆σ2 σ1  (Kσ2 σ1 )ρ!T →C2 (l : ψ ′ σ2 ) · ∆σ2 σ1  (Kσ2 σ1 )[τ ] By inductive hypothesis, (l : ψ ′ σ2 ) · ∆σ2 σ1  (Kσ2 σ1 )[τ ] ⇓C2 holds. Because of this, and since (l : !α.(ψ ′ σ2 )) · ∆σ2 σ1  (Kσ2 σ1 )ρ!Tc →C2 (l : ψ ′ σ2 ) · ∆σ2 σ1  (Kσ2 σ1 )[τ ] is the only transition allowed by the abstract interpretation se mantics, it follows that (l : ψ) · ∆ σ2 σ1  K[ρ!T ]σ2 σ1 ⇓C2 holds, which proves the lemma. – The other cases for ρ!T , ρ?T , ρ!Lk , ρ?Lk , ρ!ρd and ρ?ld are all proved similarly, except for this case: 37 38 39 40  MC (l : !ηd .η) · (ld : ηd′ ) · ∆  ρ!ρd , C, K = (σ2 σ1 , C2 ) if C ⊢ l ∼ ρ and C ⊢ ld ∼ ρd and (σ1 , C1 ) = sub(ηd′ , ηd , C)  and (σ2 , C2 ) = MC (l : η) · ∆σ  τ, C1 , Kσ1 The only difference with the previous case is that we have to prove that C ′ ⊢ ηd′ σ <: ηd σ, which follows by Lem. E.1. – Suppose that the following MC clause has been applied: 96 97 −− sequencing   MC ∆  b1 ; b2 , C, K = MC ∆  b1 , C, b2 · K The lemma is proved directly by inductive hypothesis. – Suppose that the following MC clause has been used: 99 100 101 102 −− internal choice in the  behavior MC ∆  b1 ⊕ b2 , C, K = (σ2 σ1 , C2 ) if (σ1 , C1 ) = MC ∆  b1 , C, K  and (σ2 , C2 ) = MC ∆σ1  b2 σ1 , C1 , Kσ1 This case is proved by Lem. D.10, inductive hypothesis and Prop. E.1. Soundness of Algorithm SI can be stated as follows: Theorem E.2 (Soundness of Algorithm SI). Let C be a well-formed constraints set. If SI(b, C) = (σ1 , C1 ), then ǫ  bσ1 ⇓C1 . Proof. The definition of Algorithm SI is: 1 2 3 SI(b, C) = (σ2 σ1 , C2 )  if (σ1 , C1 ) = MC ǫ  b, C, ǫ and (σ2 , C2 ) = choiceVarSubst C1 By definition of choiceVarSubst, C2 = C1 σ2 , which implies C2 ⊢ C1 σ2 . The theorem follows directly by soundness of MC, i.e. Prop. E.1, and by Lem. D.10, since ǫ ≡ ǫ holds. F Completeness of Algorithm SI Lemma F.1. If C ⊢ C ′ σ and ∀ψ.C ⊢ σ(ψ) <: σ ′ (ψ), then C ⊢ C ′ σ ′ . Proof. By structural induction on constraints over β, c, ψin and ψex . Lemma F.2 (Completeness of sub). Let η and η ′ be well-formed in C and C0 σ. If C ⊢ η1 σ <: η2 σ and C ⊢ C0 σ, then sub(η1 , η2 , C0 ) = (σ1 , C1 ) terminates, and there exists a substitution σ ′ such that ∀ψ ∈ dom(σ).C ⊢ σ(ψ) <: σ ′ (σ1 (ψ)) and C ⊢ C1 σ ′ . Proof. By structural induction on η1 . Let η1′ = η1 σ and η2′ = η2 σ be such that C ⊢ η1′ <: η2′ . If η1 is a variable ψ1 , then sub terminates at line 52 with σ1 = [ψ1 7→ η2 ] and C1 = C0 σ1 , regardless of the shape of η2 . Moreover σ can be decomposed into σ = [ψ1 7→ η1′ ] · σ ′′ for some σ ′′ . The lemma is proved by taking σ ′ = σ ′′ , because C ⊢ σ(ψ) <: σ ′ (σ1 (ψ)) holds for all ψ ∈ dom(σ): for ψ = ψ1 we have σ(ψ1 ) = η1′ , which is a subtype of σ ′ (σ1 (ψ)) = σ ′ (η2 ) = η2′ by hypothesis; for any other ψ, σ(ψ) and σ ′ (ψ) are equal by definition. Moreover C ⊢ C1 σ ′ follows by Lem. F.1. If η1 is a session of the form !T1 .η1′′ , then either η2 = ψ2 , or η2 =!T2 .η2′′ with C ⊢ T2 <: T1 holding by definition of subtyping. The first case is proved similarly to the case for η1 = ψ1 , but using the clause at line 53. The second case is proved by inductive hypothesis, since sub in this case only adds a new constraint {T2 ⊆ T1 } to C0 in the clause at line 5. The proof for the case η1 =?T1 .η ′′ is proved similarly at line 8, considering that session sub-typing is covariant instead of contravariant. When η1 =!η1d .η1′′ and η2 6= ψ2 , the inner clauses at line 13 terminates by inductive hypothesis, and the lemma is proved similarly by transitivity of the session subtyping relation and of constraint refinement. Similarly, when η1 =?η1r .η1′′ and η2 6= ψ2 , the clauses at line 16 terminate by inductive hypothesis and the proof is by inductive hypothesis and transitivity too. When η1 = ψin 1 and η2 6= ψ2 , the lemma is proved by a induction on the size of the internal choice indexes I2 , where η2 = ψin 2 and ψin 2 ∼ ⊕{Li : ηi }i∈I2 holds. Similarly, when η1 = ψex 1 and η2 6= ψ2 , then η2 = ψex 2 and ψex 2 ∼ &{Lj : ηj }j∈(J1 ,J2 ) hold, and the proof follows by induction on the size of J1 ∪ J2 over the inner call to function f. The completeness of Algorithm SI relies on the completeness of Algorithm MC, stated as follows: Theorem F.1 (Completeness of Algorithm MC). Let ∆  K[b] be wellformed in C and in C0 σ. If (∆  K[b])σ ⇓C and C ⊢ C0 σ, then there exists σ ′ such that MC(∆  b, C0 ) = (σ1 , C1 ) terminates, ∀ψ ∈ dom(σ).C ⊢ σ(ψ) <: σ ′ (σ1 (ψ)) and C ⊢ C1 σ ′ Proof. The lemma is proved by induction of the lexicographic order between the execution size |∆σ1  K[b]σ1 |C1 and length of a behavior b (i.e. structural induction). Base case. The base case is when the execution size is equal to 1, that is, when J∆  K[b]σKC = {∆  K[b]σ}, and ∆  K[b]σ 6→C . Since ∆  K[b]σ is strongly normalizing by hypothesis, then ∆ = ǫ and K[b] = τ , which implies that K = ǫ and b = τ . In such a case, the clause MC(ǫ  τ, C0 , ǫ) = (σid , C0 ) at line 5 terminates trivially. The lemma is proved by taking σ ′ = σ, because σ ′ (σid (ψ)) = σ ′ (ψ) = σ(ψ) for any ψ and therefore C ⊢ σ(ψ) <: σ ′ (σ1 (ψ)) holds by reflexivity, and because C ⊢ C0 σid = C0 holds by hypothesis. Inductive case. In the inductive case, the execution size |∆σ  K[b]σ|C is greater than 1, and therefore there exists a configuration ∆′  b′ such that ∆σ  K[b]σ − →C ∆′  b′ holds. It is easy to show that ∆σ  K[b]σ − →C ∆′  b′ holds if and only if b is a , push We proceed by rule induction: End: Suppose that Rule End has been used: (l : end) · ∆σ  K[b]σ − →C ∆σ  K[b]σ There are two cases to consider: either ∆ = (l : end) · ∆′ , or ∆ = (l : ψ) · ∆′ and ψσ = end. In the  first case, the clause MC (l : end) · ∆  b, C0 , K = MC ∆  b, C0 , K and the lemma is proved by the inductive hypothesis. In  the second case, we need to show that MC (l : ψ) · ∆  b, C0 , K terminates; this can be proved by structural induction on K[b]. If b = τ and K = ǫ, then MC terminates by applying finalize on ∆, and the proposition is proved as in the base case. If b = τ and K 6= ǫ, then the proposition is proved by inductive hypothesis on the clause at line 9. If b = push(l : η ′ ), then checkFresh closes ψ in the clause at line 12, because a well-formed stack cannot push the same label l twice. In all other cases either the proposition follows by induction, or K[b] must have the form of a operation. In the latter case, l cannot be contained in region ρ of the operation by well-formedness of the stack, and therefore the only applicable clause in the last one at line 120, that calls closeTop. Push: Suppose that the following transition is taken: ∆σ  (K[push(l : η)])σ − →C (l : ησ) · ∆σ  K[τ ] if l ♯ ∆  We first need to show that MC ∆  push(l :η), C0 , K terminates. Suppose that the frames with closed sessions end are removed from the top of the stack, as inthe case for End. The first clause that matches MC ∆  push(l : η), C0 , K is the one at line 12. By hypothesis l ♯ ∆ holds, therefore the inner call to checkFresh can only return the identity substitution. Therefore σ1 = σid and ∆1 = ∆ hold, and there exists a substitution σ ′′ such that the starting substitution σ can be split in the composition of σ1 and σ ′′ , i.e. σ = σ ′′ σ1 = σ ′′ . The lemma is then proved by inductive hypothesis on the inner call to MC with the smaller configuration (l : (ησ1 )σ ′′ ) · (∆1 σ1 )σ ′′  τ = (l : ησ) · ∆σ  τ . Out: Let (∆  K[b])σ = (l : !T.ησ) · ∆′ σ  ρ!T ′ , and suppose that the following transition is taken: (l : !T.ησ) · ∆′ σ  K[ρ!T ′] − →C (l : ησ) · ∆′ σ  K[τ ] if C ⊢ ρ ∼ l, pure(T ′ ), T ′ <: T We must consider two cases: ∆ = (l : ψ) · ∆′ and σ(ψ) =!T.η,or (l : !T.η) · ∆′ . In the first case the call to MC (l : ψ) · ∆′  ρ!T ′ , C0 , K is matched by the clause at line 17, and it produces the substitution σ1 = [ψ 7→ !α.ψ ′ ] and a new constraint T ′ ⊆ α by definition, where ψ ′ and α′ are fresh variables. By hypothesis σ has the form [ψ 7→ !T.η ′ ], and it can be decomposed into σ ′′ = [ψ 7→ !T.ψ ′ ] and σ ′′′ = [ψ ′ 7→ η ′ ]. The lemma is proved by applying the inductive hypothesis on the inner call to MC and by taking σ ′ = σ ′′′ [α 7→ T ], In: Del: Res: ICh: since σ ′′ can be further decomposed into σ1 and [α 7→ T ] and therefore the substitution [α 7→ T ] guarantees that σ ′ σ1 = σ; therefore ∀ψ ∈ dom(σ).C ⊢ σ(ψ) <: σ ′ (σ1 (ψ)) follows by reflexivity. Notice that C ⊢ C1 σ ′ holds too by definition of constraints refinement, because the new constraint T ′ ⊆ ασ becomes T ′ ⊆ T when σ ′ = σ ′′′ [α 7→ T ] is applied to it, and because C ⊢ T ′ <: T holds by hypothesis from the side-conditions onRule Out. If ∆ = (l : !T.η) · ∆′ , then the call MC ∆  ρ!T ′ , C0 , K is matched by the clause at line 22. The lemma is proved straightforwardly by taking σ ′ = σ, since Algorithm MC returns the identity substitution in this case. This case is proved similarly to [Out], using the clauses at lines 26 and 31, recalling that session sub-typing is covariant instead of contravariant for inputs. This case is proved similarly to [Out], using the clauses at lines 35 and 37, together with Lem. F.2 in the latter case. Notice that ld ∼ ρd holds by hypothesis, and therefore the clause at line 42 is not applicable. This case is proved similarly to [Out], using the clauses at lines 51 and 56. Notice that the clause at line 59 cannot be called, because the labels in the behavior b = ρ?lr match the label in the stack ∆ by hypothesis. Let (∆  K[b])σ = (l : ψin ) · ∆′ σ  Kσ[ρ!Lj ], and suppose that the following transition is taken: (l : ⊕{Li : ηi }) · ∆′  Kσ[ρ!Lk ] − →C (l : ηk ) · ∆′  Kσ[τ ] i∈I if (j ∈ I), C ⊢ ρ ∼ l There are two cases to consider: either ∆ = (l : ψ) · ∆′ , or ∆ = (l : ψin ) · ∆′ . If ∆ = (l : ψ) · ∆′ , then the only clause that matches the call to MC ∆  b, K, C0 is the one at line 64. Since ψσ = ψin , substitution σ can be decomposed as σ = σ ′ [ψ 7→ ψin ]. Moreover C ⊢ ψin ∼ ⊕{Li : ηi }i∈J and k ∈ J hold by the side conditions of Rule ICh. Algorithm MC first produces the substitution σ1 = [ψ 7→ ψin ], and introduces a new constraint ψin ∼ ⊕{Li : ψi }i∈{k} in C0 , where ψk is a fresh variable. Let σ ′′ = σ ′ [ψk 7→ ηk ]σ1 . Since (l : ψ) · ∆′  Kσ ′′ [ρLk ] ⇓C holds by hypothesis, and since ((l : ψk ) · ∆′  K[τ ]) = (l : ηk ) · ∆′ σ ′ σ1  Kσ ′ σ1 [τ ] holds because ψk is a fresh variable, then (l : ηk ) · ∆′ σ ′ σ1  Kσ ′ σ1 [τ ] ⇓C holds too. Moreover, since C ⊢ C0 σ holds by hypothesis and C ⊢ ψin ∼ ⊕{Li : ηi }i∈J where J contains k both hold by the side condition of Rule ICh, then C ⊢ C0 σ ′′ ∪ {ψin ⊆ ψk σ ′′ } holds too, because by definition of constraint refinement and of session sub-typing C ⊢ ⊕{Lj : ηj }j∈J <: ⊕{Li : ηi }i∈{k} . Therefore the inductive hypothesis  applies to the inner call of MC (l : ψk ) · ∆′  τ, K, C0 ∪ {ψin ⊆ ψk } , and which also proves the theorem, since ψk is not in the domain of σ. In the case that ∆ = (l : ψin ) · ∆′ , then C0 must contain a constraint ψin ∼ ⊕{Li : ηi }i∈I by definition of constraint well-formedness. There are two subcases to consider: either k is in I, or it is not. In the former case the theorem is proved straightforwardly by inductive hypothesis on the inner clause at line 69. If k is not in I, then the only applicable clause of Algorithm MC is the one at line 73, which adds k to ψin , and the theorem follows by inductive hypothesis on the inner call to MC with the extended internal choice. ECh: Suppose that the following transition is taken: (l : &{Li : ηi }) · ∆  & {ρ?Lj ; bj } − →C (l : ηk ) · ∆  bk i∈(I1 ,I2 ) j∈J if k ∈ J, C ⊢ ρ ∼ l, I1 ⊆ J ⊆ I1 ∪ I2 The proof of this case is similar to the proof for Rule ICh: if ∆ = (l : ψ) · ∆′ , then Algorithm MC terminates by applying the clause at line 78, which first creates a new constraint on ψex , and then recursively calls the clause at line 89, which is proved by inductive hypothesis and transitivity of session subtyping. If ∆ = (l : &{Li : ηi }) · ∆′ , then either the clause at line 84 is called, i∈(I1 ,I2 ) in case either some labels in J from the behavior are missing from I1 or I2 , or in case the active labels in I1 are more than the labels in J; or the clause at line 89 is called, in case the session type designated by ψex contains all the labels Jin the behavior, and the active labels I1 are included in J. In the former case the constraint in the session type are adjusted appropriately and the theorem is proved as in the first case, because the clause at line 89 is the only clause that matches the adjusted session type. In the latter case the proof is by inductive hypothesis and transitivity as in the first case. 84 89 Spn: Suppose that the following transition is taken: ∆  K[spawn b] − →C ∆  K[τ ] if ǫ  b ⇓C Assume that the frames with closed sessions end are removed from the top ′ of the stack, as in the case  for End, resulting in a stack ∆ . The clause ′ MC ∆  spawn b, K, C0 is matched at line 105. Since ǫ  b and ∆′  K[τ ] are smaller configurations than ∆′  spawn b, the theorem follows by inductive hypothesis and transitivity of session sub-typing. Rec: This case is proved similarly to the case for Rule Spn, with the exception that the clause at line 110 is called, and that the environment C0 is properly manipulated to swap the recursive constraint recb β ⊆ β with τ ⊆ β. Plus: Suppose that the following transition is taken: ∆  K[b1 ⊕ b2 ] − →C ∆  K[bi ] if i ∈ {1, 2} Assume that the frames with closed sessions end are removed from the top of the stack, as in the case for End. The only applicable clause in this case is the one at line 100. The inductive hypothesis can be applied directly on the first inner call to MC, which implies that σ can be refined into σ ′ σ1 . By inductive hypothesis, C ⊢ σ(ψ) <: σ ′ (σ1 (ψ)) holds for all ψ in the domain of σ. Notice that, by construction of algorithms sub and MC, σ ′ σ1 produces super types only in the case of delegation, therefore it is easy to show that (∆  K[b1 ⊕ b2 )σ ′ σ1 ⇓C holds as well. Therefore (∆  K[b2 )σ ′ σ1 ⇓C holds too, and the theorem is proved by the inductive hypothesis. Beta: Suppose that the following transition is taken: ∆σ  βσ − →C ∆σ  b if C ⊢ b ⊆ β Since ∆  βσ is well-formed in both C and C0 σ, variable β is constrained not only in C (by assumption C ⊢ b ⊆ β holds), but it is also constrained to some b′ in C0 σ, i.e. C0 σ ⊢ b′ ⊆ βσ. By definition of constraint refinement, C ⊢ C0 σ implies that b′ = bσ, because there is no sub-typing relation defined for behaviors, therefore bσ and b′ must be equal. The lemma is then proved directly by inductive hypothesis. Assume that the frames with closed sessions end are removed from the top of the stack, as in the case for End. If the top of the stack in ∆ is not end, the only applicable clause is the one at line 116, whereby MC ∆  β, C0 , K = L MC ∆  b0 , C0 , K with b0 = {bi | ∃i. (bi ⊆ β) ∈ C}. By definition of  MC, the only clause that matches the inner call MC ∆  b0 , C0 , K is the clause for internal choice at line 100. Since the execution size of ∆σ  βσ is greater than the execution size of each ∆σ  bi σ component, the proof follows by inductive hypothesis, in the same way as for Rule Plus. Seq: Suppose that the following transition is taken: ∆  K[b1 ; b2 ] − →C ∆′  K[b′1 ; b2 ] if ∆  b1 − →C ∆′  b′1 ′ Assume that all closed end sessions are removed from ∆,  resulting in ∆ ,′ as ′ for the case End  . The clause MC ∆  b1 ; b2 , K, C0 becomes MC ∆  b1 , b2 · K, C0 at line 97, and the lemma is proved by inductive hypothesis, because the execution size of ∆′  K[b1 ; b2 ] is equal to the execution size of ∆′  b2 · K[b1 ], but the size of b1 is smaller than the size of b1 ; b2 . Tau: Suppose that the following transition is taken: ∆  K[τ ; b] − →C ∆  K[b] Assuming that all closed session are removed from ∆ as in the case for End and that a stack ∆′ is returned, the clause at line 97 is called first, whereby b2 is pushed on the stack K. Then the clause at line 9 is called recursively, whereby the τ behavior is discarded and b2 is popped back from the stack. The lemma follows by inductive hypothesis on the smaller configuration ∆′  K[b2 ]. Completeness for session type inference can be stated as follows: Theorem F.2 (Session type inference completeness). Let ǫ  bσ ⋆ and C ⋆ be well-formed. If ǫ  bσ ⋆ ⇓C ⋆ and C ⋆ ⊢ C, then SI(b, C) = (σ1 , C1 ) and there exists σ such that C ⋆ ⊢ C1 σ and ∀ψ ∈ dom(σ ⋆ ).C ⊢ σ ⋆ (ψ) ⊆ σσ1 (ψ). Proof. The proof follows by applying Proposition F.1 on the configuration ǫ  b under C first. Algorithm MC returns σ1 and C1 such that there exists a σ ′ such that C ⊢ σ ⋆ (ψ) ⊆ σ ′ σ1 (ψ) for any ψ in the domain of σ ⋆ , and C ⊢ C1 σ ′ . Since the call to choiceSubst simply substitutes ψin and ψex variables with their (unique) relative internal and external choices in C1 , the new substitution σ2 and C2 that this function returns does not change the typing of sessions, and therefore ∀ψ ∈ dom(σ).C ⊢ σ(ψ) <: σ ′ (σ2 (σ1 (ψ))) holds, and C ⊢ C2 σ ′ follows by C ⊢ C1 σ ′ , which proves the lemma.
6cs.PL
Reconstruction Error Bounds for Compressed Sensing under Poisson Noise using the Square Root of the Jensen-Shannon Divergence Sukanya Patila , Karthik S. Gurumoorthyb , Ajit Rajwadec,∗ a Department of Electrical Engineering, IIT Bombay Center for Theoretical Sciences, TIFR Bangalore c Department of Computer Science and Engineering, IIT Bombay b International arXiv:1606.08557v4 [cs.IT] 25 Sep 2017 Abstract Reconstruction error bounds in compressed sensing under Gaussian or uniform bounded noise do not translate easily to the case of Poisson noise. Reasons for this include the signal dependent nature of Poisson noise, and also the fact that the negative log likelihood in case of a Poisson distribution (which is directly related to the generalized Kullback-Leibler divergence) is not a metric and does not obey the triangle inequality. There exist prior theoretical results in the form of provable error bounds for computationally tractable estimators for compressed sensing problems under Poisson noise. However, these results do not apply to realistic compressive systems, which must obey some crucial constraints such as non-negativity and flux preservation. On the other hand, there exist provable error bounds for such realistic systems in the published literature, but they are for estimators that are computationally intractable. In this paper, we develop error bounds for a computationally tractable estimator which also applies to realistic compressive systems obeying the required constraints. The focus of our technique is on the replacement of the generalized Kullback-Leibler divergence, with an information theoretic metric - namely the square root of the Jensen-Shannon divergence, which is related to an approximate, symmetrized version of the Poisson log likelihood function. We show that this replacement allows for very simple proofs of the error bounds, as it proposes and proves several interesting statistical properties of the square root of Jensen-Shannon divergence, and exploits other known ones. Numerical experiments are performed showing the practical use of the technique in signal and image reconstruction from compressed measurements under Poisson noise. Our technique is applicable to signals that are sparse or compressible in any orthonormal basis, works with high probability for any randomly generated sensing matrix that obeys the non-negativity and flux preservation constraints, and is based on an estimator whose parameters are purely statistically motivated. ∗ Corresponding author Email addresses: [email protected] (Sukanya Patil), [email protected] (Karthik S. Gurumoorthy), [email protected] (Ajit Rajwade) 1 Karthik S. Gurumoorthy thanks the AIRBUS Group Corporate Foundation Chair in Mathematics of Complex Systems established in ICTS-TIFR. 2 Ajit Rajwade gratefully acknowledges support from IIT Bombay Seed Grant number 14IRCCSG012. Preprint submitted to Submitted to Journal September 26, 2017 Keywords: Compressed sensing, Poisson noise, reconstruction error bounds, information theoretic metric, Jensen-Shannon divergence, triangle inequality 1. Introduction Compressed sensing is today a very mature field of research in signal processing, with several advances on the theoretical, algorithmic as well as application fronts. The theory essentially considers measurements of the form y = Φx = ΦΨθ = Aθ where y ∈ RN is a measurement vector, A ∈ RN ×m is the product of a sensing matrix Φ (with much fewer rows than columns, i.e., N  m), Ψ ∈ Rm×m is a signal representation orthonormal basis, and θ ∈ Rm is a vector that is sparse or compressible such that x = Ψθ. Under suitable conditions on the sensing matrix such as the restricted isometry property (RIP) and sparsity-dependent lower bounds on N , it is proved that x can be recovered near-accurately given y and Φ, even if the measurement y is corrupted by signal-independent, additive noise η of the form y = Φx + η where η ∼ N (0, σ 2 ) or kηk2 ≤  (bounded noise). The specific error bound [1] on θ in the case of kηk2 ≤  is given as: C2 kθ − θ ? k2 ≤ C1  + √ kθ − θs k1 s (1) where θs is a vector created by setting all entries of θ to 0 except for those containing the s largest absolute values, θ ? is the minimum of the following optimization problem denoted as (P1), (P1): minimizekzk1 such that ky − Azk2 ≤ , (2) and C1 and C2 are constants independent of m or N but dependent only on δ2s , the so-called restricted isometry constant (RIC) of A. These bounds implicity require that N ∼ Ω(s log m). The noise affecting several different types of imaging systems is, however, known to follow the Poisson distribution. Examples include photon-limited imaging systems deployed in night-time photography [2], astronomy [3], low-dosage CT or X-ray imaging [4] or fluorescence microscopy [5, 6]. The Poisson noise model is given as follows: y ∼ Poisson(Φx) (3) where x ∈ Rm ≥0 is the non-negative signal or image of interest. The likelihood of observing a given measurement vector y is given as p(y|Φx) = n Y [(Φx)i ]yi e−(Φx)i yi ! i=1 (4) where yi and (Φx)i are the ith component of the vectors y and Φx respectively. Unfortunately, the mathematical guarantees for compressive reconstruction from bounded or Gaussian noise [7, 1, 8] are no longer directly applicable to the case where the measurement noise follows a Poisson distribution, which is the case considered in this paper. One important reason for this is a feature of the 2 Poisson distribution - that the mean and the variance are equal to the underlying intensity, thus deviating from the signal independent or bounded nature of other noise models. Furthermore, the aforementioned practical imaging systems essentially act as photon-counting systems. Not only does this require non-negative signals of interest, but it also imposes crucial constraints on the nature of the sensing matrix Φ: 1. Non-negativity: ∀i, ∀j, Φij ≥ 0 2. Flux-preservation: The total photon-count of the observed signal Φx can never exceed the photon PN Pm count of the original signal x, i.e., i=1 (Φx)i ≤ i=1 xi . This in turn imposes the constraint that PN every column of Φ must sum up to a value no more than 1, i.e. ∀j, i=1 Φij ≤ 1. A randomly generated non-negative and flux-preserving Φ matrix does not (in general) obey the RIP. This situation is in contrast to randomly generated Gaussian or Bernoulli (±1) random matrices which obey the RIP with high probability [9], and poses several challenges. However following prior work [10], we construct a related matrix Φ̃ from Φ which obeys the RIP. 1.1. Main Contributions The derivation of the theoretical performance bounds in Eqn. 1 based on the optimization problem in Eqn. 2 cannot be used in the Poisson noise model case, as it is well known that the use of the `2 norm between y and Φx leads to oversmoothing in the lower intensity regions and undersmoothing in the higher intensity regions. To estimate an unknown parameter set x given a set of Poisson-corrupted measurements y, one proceeds by the maximum likelihood method. Dropping terms involving only y, this reduces to maximization PN Pn Pn yi of the quantity i=1 yi log − i=1 yi + i=1 (Φx)i which is called the generalized Kullback-Leibler (Φx)i divergence [11] between y and Φx - denoted as G(y, Φx). This divergence measure, however, does not obey the triangle inequality, quite unlike the `2 norm term in Eqn. 2 which is a metric. This ‘metric-ness’ of the `2 norm constraint is an important requirement for the error bounds in Eqn. 1 proved in [1]. For instance, the triangle inequality of the `2 norm is used to prove that kA(θ − θ ? )k2 ≤ 2 where θ ? is the minimizer of Problem (P1) in Eqn. 2. This is done in the following manner: kA(θ − θ ? )k2 ≤ ky − Aθk2 + ky − Aθ ? k2 ≤ 2. (5) This upper bound on kA(θ − θ ? )k2 is a crucial step in [1], for deriving the error bounds of the form in Eqn. 1. The `2 norm is however not appropriate for the Poisson noise model for the aforementioned reasons. The first major contribution of this paper is to replace the `2 norm error term by a term which is more appropriate for the Poisson noise model and which, at the same time, is a metric. The specific error term that we choose here is the square root of the Jensen-Shannon divergence, which is a well-known information theoretic metric 3 [12]. Hereafter we abbreviate the Jensen-Shannon divergence as JSD, its square-root as SQJSD, and denote √ them as J and J respectively within equations. Let θ ? be the minimizer of the following optimization problem which we denote as (P2): (P2): minimizekzk1 such that p J(y, Az) ≤ , z  0, (6) kΨzk1 = I, p Pm where I , i=1 xi is the total intensity of the signal of interest and  is an upper bound on J(y, Az) that √ √ we set to N ( 12 + 811 ) (for reasons that will be clear in Section 2 and 7). We then prove that with high probability   kθ − θ ? k2 N C2 ≤ C1 O √ + √ kθ − θs k1 I I s I (7) where C1 and C2 are constants that depend only on the RIC of the sensing matrix Φ̃ derived from Φ. This result is proved in Section 2, followed by an extensive discussion. In particular, we explain the reason behind the apparently counter-intuitive first term which is increasing in N : namely, that a Poisson imaging system distributes the total incident photon flux across the N measurements, reducing the SNR per measurement and hence affecting the performance. This phenomenon has been earlier observed in [10]. Our performance bounds derived independently and via a completely different method confirm the same phenomenon. While there exists a body of earlier work on reconstruction error bounds for Poisson corrupted compressive measurements [10, 13, 14, 15, 16, 17], the approach taken in this paper is different, and has the following features: 1. Existing techniques such as [10, 13] work with intractable estimators for Poisson compressed sensing although they are designed to deal with physically realizable compressive systems. On the other hand, there are several techniques such as [14, 15, 16, 17] which are applicable to computationally efficient estimators (convex programs) and produce provable guarantees, but they do not impose important constraints required for physical implementability. Our approach, however, works with a computationally tractable estimator involving regularization with the `1 norm of the sparse coefficients representing the signal, while at the same time being applicable to physically realizable compressive systems. See Section 4 for a detailed comparison. 2. Our technique demonstrates successfully (for the first time, to the best of our knowledge) the use of the JSD and the SQJSD for Poisson compressed sensing problems, at a theoretical as well as experimental level. Our work exploits several interesting properties of the JSD, some of which we derive in this paper. Our suggested numerical procedure does not require tweaking of a regularization parameter, but uses a constrained optimization procedure with a parameter dictated by the statistical properties of the SQJSD as shown in Section 2.2. 3. Our technique affords (arguably) much simpler proofs than existing methods. 4 1.2. Organization of the Paper The main theoretical result is derived in detail in Section 2, especially Section 2.2. Numerical simulations are presented in Section 3. Relation to prior work on Poisson compressed sensing is examined in detail in Section 4, followed by a discussion in Section 6. The proofs of some key theorems are presented in Section 7. The relation between the JSD and a symmetrized version of the Poisson likelihood is examined in Section 5. 2. Main Result 2.1. Construction of Sensing Matrices We construct a sensing matrix Φ ensuring that it corresponds to the forward model of a real optical system, based on the approach in [10]. Therefore it has to satisfy certain properties imposed by constraints of a physically realizable optical system - namely non-negativity and flux preservation. One major difference between Poisson compressed sensing and conventional compressed sensing emerges from the fact that conventional randomly generated sensing matrices which obey RIP do not follow the aforementioned physical constraints (although sensing matrices can be designed to obey the RIP, non-negativity and flux preservation simultaneously as in [18], and we comment upon this aspect in the remarks following the proof of our key theorem, later on in this section). In the following, we construct a sensing matrix Φ which has only zero or (scaled) ones as entries. Let us define p to be the probability that a matrix entry is 0, then 1 − p is the probability that the matrix entry is a scaled 1. Let Z be a N × m matrix whose entries Zi,j are i.i.d random variables defined as follows, Zi,j  r 1−p   − p = r  p   1−p with probability p, (8a) with probability 1 − p. (8b) Z Let us define Φ̃ , √ . For p = 1/2, the matrix Φ̃ now follows RIP of order 2s with a very high probability N h2 h3 −N c(1+δ2s ) given by 1 − 2e where δ2s is its RIC of order 2s and function c(h) , − [9]. In other words, 4 6 for any 2s-sparse signal ρ, the following holds with high probability (1 − δ2s )kρk22 ≤ kΦ̃ρk22 ≤ (1 + δ2s )kρk22 . Given any orthonormal matrix Ψ, arguments in [9] show that Φ̃Ψ also obeys the RIP of the same order as Φ̃. However Φ̃ will clearly contain negative entries with very high probability, which violates the constraints of a physically realizable system. To deal with this, we construct the flux-preserving and positivity preserving sensing matrix Φ from Φ̃ as follows: r Φ, p(1 − p) (1 − p) Φ̃ + 1N ×m , N N 5 (9) 1 . In addition, one can easily check that Φ satisfies both N the non-negativity as well as flux-preservation properties. which ensures that each entry of Φ is either 0 or 2.2. The Jensen-Shannon Divergence and its Square Root The well-known Kullback-Leibler Divergence between vectors p ∈ R≥0 n×1 and q ∈ R≥0 n×1 denoted by D(p, q) is defined as3 D(p, q) , n X pi log i=1 pi . qi (10) The Jensen-Shannon Divergence between p and q denoted by J(p, q) is defined as J(p, q) , D(p, m) + D(q, m) 2 (11) 1 (p + q). 2 The performance bounds derived in this paper for reconstruction from Poisson-corrupted measurements where m , deal with the estimate obtained by solving the constrained optimization problem (P2) in Eqn. 6, where we consider an upper bound of  on the SQJSD. The motivation for this formulation will be evident from the following properties of the JSD considered in this section: (1) the metric nature of (including the triangle P inequality observed by) its square-root, (2) its relation with the total variation distance V (p, q) , i |pi −qi |, p and (3) interesting statistical properties of J(y, Φx). These properties, the last of which are proved in this paper, are very useful in deriving the performance bounds in the following sub-section. Lemma 1: The square root of the Jensen-Shannon Divergence is a metric [12]. Lemma 2: Let us define V (p, q) , n X |pi − qi | i=1 ∆(p, q) , n 2 X |pi − qi | i=1 pi + qi . If p, q  0 and kpk1 ≤ 1, kqk1 ≤ 1 then as per [12], 1 V (p, q)2 ≤ ∆(p, q) ≤ 4J(p, q). 2 (12) Additionally, we have experimentally observed some interesting properties of the distribution of the SQJSD values, across different Poisson realizations of compressive measurements of a signal x, acquired with a fixed and realistic sensing matrix Φ as described in Section 2.1. In other words, if y ∼ Poisson(Φx), then we p consider the distribution of J(y, Φx) across different realizations of y. Our observations, shown in Figure 1 are as follows: 3 Note that the Kullback-Leibler and other divergences are usually defined for probability mass functions, but they have also been used in the context of general non-negative vectors in the same manner as we do in this paper. 6 1. Beyond a threshold τ on the intensity I, the expected value of p J(y, Φx) is nearly constant (say some p κ), and independent of I, given a fixed number of measurements N . For I ≤ τ , we have J(y, Φx) ≤ κ. p 2. The variance σ 2 of J(y, Φx) is small, irrespective of the value of I and N . p 3. For any I, the mean (and any chosen percentile, such as the 99 percentile) of J(y, Φx) scales as O(N 0.5 ) w.r.t. N with a constant factor very close to 1. p 4. Irrespective of I, N or m, the distribution of J(y, Φx) is Gaussian with mean and standard deviation p equal to the empirical mean and empirical standard deviation of the values of J(y, Φx). This is confirmed by a Kolmogorov-Smirnov (KS) test even at 1% significance (see [19]). We emphasize that as per our extensive simulations, these properties are independent of specific realizations of Φ, x or the dimensionality or sparsity of x. Our scripts to reproduce these results are included at [19]. Our attempt to formalize these observations lead to the following theorem which we prove in Section 7. Theorem 1: Let y ∈ ZN + be a vector of compressive measurements such that yi ∼ Poisson[(Φx)i ] where Φ ∈ RN ×m is a non-negative flux-preserving matrix and x ∈ Rm is a non-negative signal. Define si , N × (Φx)i . Then we have: p p 1. E[ J(y, Φx)] ≤ N/4 PN p 11 + 5 i=1 1/si 2. v , Var[ J(y, Φx)] ≤ PN max(0, 4(2 − i=1 1/si ))  p √ √ J(y, Φx) ≤ N ( 12 + 811 ) ≥ 1 − 2e−N/2 for some constant d. 3. P We make a few comments below: p 1. E[ J(y, Φx)] does not increase with I. This property is not shared by the negative log-likelihood of the Poisson distribution. This forms one major reason for using SQJSD as opposed to the latter, for deriving the bounds in this paper. 2. If each si is sufficiently large in value (i.e.  0.5), this yields Var[ p J(y, Φx)] / 11 8 which is indepen- dent of N as well as the measurement or signal values. See also the simulation in Figure 1. 3. The assumption that si  0.5 is not restrictive in most signal or image processing applications, except those that work with extremely low intensity levels. In the latter case, our variance bound is less useful. But in such cases the performance of Poisson compressed sensing is itself very poor due to the very low SNR [13]. 4. The last statement of this theorem is based on the central limit theorem, and hence for a finite value of N , it is an approximation. However, the approximation is empirically observed to be tight even for small N ∼ 10 as confirmed by a Kolmogorov-Smirnov test (see [19]). 2.3. Theorem on Reconstruction Error Bounds Theorem 2: Consider a non-negative signal of interest x = Ψθ for orthonormal basis Ψ with sparse vector θ. Define A , ΦΨ for sensing matrix Φ defined in Eqn. 9. Suppose y ∼ Poisson(ΦΨθ), i.e. 7 Figure 1: First row: Box plot and plot of variance of the values of p J(y, Φx) versus I for a fixed N = 500 for a signal of p dimension m = 1000. Second row: Box plot and plot of the variance of the values of J(y, Φx) versus N for a fixed I = 106 for a signal of dimension m = 1000. The line above the box-plots in the top figure represents the curve for N 0.43 . Third row: p Empirical CDF of J(y, Φx) for N = 100, I = 104 , m = 500 compared to a Gaussian CDF with mean and variance equal to p that of the values of J(y, Φx). Scripts for reproducing all results at [19]. y ∼ Poisson(Aθ), represents a vector of N  m independent Poisson-corrupted compressive measurements of x, i.e., ∀i, 1 ≤ i ≤ N, yi ∼ Poisson((Aθ)i ). Let θ ? be the solution to the problem (P2) defined earlier, √  √  with the upper bound  in (P2) set to N 12 + 811 . If Φ̃ constructed from Φ obeys the RIP of order 2s √ with RIC δ2s < 2 − 1, then we have  kθ − θ ? k N C 00 s−1/2 kθ − θ s k1  2 Pr ≤ C̃ √ + ≥ 1 − 2e−N/2 , I I I 8 (13) p √ 4 8(1 + δ2s ) 2 − 2δ2s + 2 2δ2s √ √ , C 00 , ( ), θ s is a vector 1 − (1 + 2)δ2s p(1 − p)(1 − (1 + 2)δ2s ) p containing the s largest absolute value elements from θ, and σ is the standard deviation of J(yi , (Φx)i ), where C̃ , C 0 (1/2 + σ), C 0 , p √ which is upper bounded by (approximately) 11 8 . Theorem 2 is proved in Section 7. We make several comments on these bounds below. 1. Practical implementation of the estimator P2 would require supplying a value for , which is the upper p p bound on J(y, Ax). This can be provided based on the theoretical analysis of J(y, Ax) from q  √  Theorem 1, which motivates the choice  = N 21 + 11 64 . In our experiments, we provided a 99 √ percentile value (see Section 3) which also turns out to be O( N ) and is independent of x. kθ − θ ? k2 2. We have derived upper bounds on the relative reconstruction error, i.e. on and not on I kθ − θ ? k2 . This is because as the mean of the Poisson distribution increases, so does its variance, which would cause an increase in the root mean squared error. But this error would be small in comparison to the average signal intensity. Hence the relative reconstruction error is the correct kθ − θ ? k2 metric to choose in this context. Indeed, is upper bounded by two terms, both inversely I proportional to I, reflecting the common knowledge that recontruction under Poisson noise is more challenging if the original signal intensity is lower. 3. The usage of SQJSD, plays a critical role in this proof. First, the term J is related to the Poisson √ likelihood as will be discussed in Section 5. Second, J is a metric and hence obeys the triangle inequality. Furthermore, J also upper-bounds the total variation norm, as shown in Lemma 2. Both these properties are essential for the derivation of the critical Step 1 - see Section 7. 4. It may seem counter-intuitive that the first error term increases with N . However if the original signal intensity remains fixed at I, an increase in N simply distributes the photon flux across multiple measurements thereby decreasing the SNR at each measurement and degrading the performance. Similar arguments have been made previously in [10]. This behaviour is a feature of Poisson imaging systems, and is quite different from the Gaussian noise scenario [20] where the error decreases with increase in N owing to no flux-preservation constraints. 5. The above bound holds for a signal sparse/compressible in some orthonormal basis Ψ. However, for reconstruction bounds for a non-negative signal sparse/compressible in the canonical basis, i.e. Ψ = I and hence x = θ, one can solve the following optimization problem which penalizes the `q (0 < q < 1) norm instead of the `1 norm: p minθ kθkq subject to J (y, Aθ) ≤ , kθk1 = I, θ  0 Performance guarantees for this case can be developed along the lines of the work in [21]. Other sparsity-promoting terms such as those based on a logarithmic penalty function (which approximates the original `0 norm penalty more closely than the `1 norm) may also be employed [22, 23]. 9 6. While imposition of the constraint that kzk1 = I with I being known may appear as a strong assumption, it must be noted that in some compressive camera architectures, it is easy to obtain an estimate of I during acquisition. One example is the Rice Single Pixel Camera [24], where I can be obtained by turning on all the micro-mirrors, thereby allowing the photo-diode to measure the sum total of all values in the signal. The imposition of this constraint has been considered in earlier works on Poisson compressed sensing such as [10] and [13]. Furthermore, we note that in our experiments in Section 3, we have obtained excellent reconstructions even without the imposition of this constraint. 7. Measurement matrices in compressed sensing can be specifically designed to have very low coherence, as opposed to the choice of random matrices. Such approaches have been proposed in for a Poisson setting in [18]. Since the coherence value can be used to put an upper bound on the RIC, one can conclude that such matrices will obey RIP even while obeying non-negativity and flux preservation. In case of such matrices which already obey the RIP, the upper bound on the reconstruction error would √ potentially tighten by a factor of at least N . However, such matrices are obtained as the output of non-convex optimization problems, and there is no guarantee on how low their coherence, and hence √ their RIC, will be. Indeed, they may not respect the sufficient condition in our proof that δ2s < 2 − 1. 3. Numerical Experiments We show results on numerical experiments for problem (P2) without the explicit constraint that kΨθk1 = I, as we obtained excellent results even without it. Besides this, we also show results on the following problem: (P4): minλkθk1 + J(y, ΦΨθ) w.r.t. θ, (14) where λ is a regularization parameter. Before describing our actual experimental results, we state a lemma that solving (P4) is equivalent to solving (P2) for some pair of (λ, ) values, but again without the constraint kΨθk1 = I. The proof of this lemma follows [25] and can be found in the supplemental material in Section 8. Lemma 4: Given θ which is the minimizer of problem (P4) for some λ > 0, there exists some value of  = θ for which θ is the minimizer of problem (P2), but without the constraint kΨθk1 = I. p As JSD is a convex function and J(y, Φx) ≤  implies J(y, Φx) ≤ 2 , we solved both (P2) and (P4) using the well-known CVX package [26] with the SCS solver for native implementation of logarithmic functions4 . √ The value of  was chosen to be the 99 percentile of the SQJSD values which are O( N ) and independent of x as noted in Section 2.2. Experiments were run on Poisson-corrupted compressed measurements obtained from a 1D signal with 100 elements and different levels of sparsity in the canonical (i.e., identity) basis 4 http://web.cvxr.com/cvx/beta/doc/solver.html 10 as well as different values of I. The sensing matrix followed the architecture discussed in Section 2. We kx − x? k2 plotted a graph of the relative reconstruction error given as RRM SE(x, x? ) , versus I for a kxk2 fixed number of measurements N = 50 in Figure 2. This graph clearly reveals lower and lower reconstruction errors with an increase in I which agrees with the worst case error bounds we have derived in this paper. Note that the graph shows box-plots for reconstruction errors for a population of 10 different measurements of a sparse signal using different Φ matrices. Figure 3 shows a graph with box-plots for RRM SE(x, x? ) versus N for a fixed I = 108 . Here we observe that the relative error does not decrease significantly with increase in N because of poorer signal to noise ratio with an increase of N and keeping I constant. Lastly, in Figure 4, we also plotted a graph of average RRM SE(x, x? ) against signals of different sparsity levels for a fixed I and a fixed N . We show comparisons alongside results for problem (P4). While the results of (P4) may appear slightly superior to those of (P2), we emphasize that the parameter λ for (P4) was picked omnisciently, i.e., assuming the true signal was known and choosing the value of λ that gave the least MSE. In practice, this parameter would need to be picked by cross-validation or be a user-choice, whereas there is no such requirement for (P2) since  is independent of I as shown in Section 2.2. We also compared our results with the outputs of the following optimization problems: (P5): minλkθk1 + SN LL(y, ΦΨθ) w.r.t. θ (15) (P6): minλkθk1 + G(y, ΦΨθ) w.r.t. θ since they, especially G, can be considered ‘natural competitors’. Problems (P5) and (P6) were implemented in CVX under the same setting as described for (P4) since SN LL and G are convex functions. In addition, we also compared these results to those of the well-known Poisson compressed sensing solver known as SPIRAL-TAP from [27] which essentially solves (P6) but follows a different optimization method. For (P4), (P5), (P6) and SPIRAL-TAP the regularization parameter λ was picked omnisciently (as the results of all these problems were significantly affected by the choice of λ). We obtained nearly identical results for (P4), (P5), (P6) and SPIRAL-TAP under all settings. Our supplemental material at https://www.cse.iitb.ac. in/~ajitvr/SQJSD/ contains scripts for execution of these results in CVX. We tested the performance of (P4) on an image reconstruction task from compressed measurements under Poisson noise. Each patch of size 7 × 7 from a gray-scale image was vectorized and 25 Poisson-corrupted measurements were generated using the sensing matrix discussed in Section 2. This model is reminiscent of the architecture of the compressive camera designed in [28] except that we considered overlapping patches here. Each patch was reconstructed from its compressed measurements independently by solving (P4) with sparsity in a 2D-DCT basis. The final image was reconstructed by averaging the reconstructions of overlapping patches. This experiment was repeated for different I values by suitably rescaling the intensities of the original image. In Figure 5, we show reconstruction results with (P4) under different values of I. There is 11 Figure 2: Box plots of relative reconstruction error (RRMSE) of problems P2 (top) and P4 (bottom) for a 1D signal of 100 elements sparse in the canonical basis. RRMSE versus I for a fixed N = 50 and fixed sparsity = 5. The λ parameter for P4 was picked omnisciently (see text for more details). a sharp decrease in relative reconstruction error with increase in I. Note that in our experiments, we have not made use of the hard constraint kx? k1 = I in problem (P2). In practice, we however observed that the estimated kx? k1 was close to the true I, especially for higher values of I ≥ 106 , and moreover even imposition of the constraint did not significantly alter the results as can be seen in Figure 6 for a 100-dimensional signal with 50 measurements and sparsity 5. Strictly speaking, the function J(y, Ax) is not Hölder continuous due to the presence of entropy-like terms y log y that are undefined for y = 0, which affects the theoretical convergence guarantees for convex optimization. This issue can be alleviated by replacing J(y, Ax) with J(y + β, Ax + β) for some β ≈ 0, β > 0, similar to [27] for the Poisson log-likelihood. In practice however, we set β = 0 and ignored all zero-valued measurements. This weeding out had to be performed very rarely 12 Figure 3: Box plots of relative reconstruction error (RRMSE) of problems P2 (top) and P4 (bottom) for a 1D signal of 100 elements sparse in the canonical basis. RRMSE versus N for a fixed I = 108 and fixed sparsity = 5. The λ parameter for P4 was picked omnisciently (see text for more details). for moderate or high I. Also, to get an idea of the computational complexity of the method, we plot a graph (Figure 6) of the reconstruction time (till convergence) for signals of fixed sparsity 10 and dimensions m ranging from 100 to 4000, with N = m/2 measurements in each case. Summarily, these numerical experiments confirm the efficacy of using the JSD/SQJSD in Poisson compressed sensing problems. In particular, the statistical properties of the SQJSD allow for compressive reconstruction with statistically motivated parameter selection, unlike methods based on the Poisson negative log-likelihood which require tweaking of the regularization/signal sparsity parameter. 13 Figure 4: Box plots of relative reconstruction error (RRMSE) of problems P2 (top) and P4 (bottom) for a 1D signal of 100 elements sparse in the canonical basis. RRMSE versus sparsity for a fixed I = 108 and a fixed N = 50. The λ parameter for P4 was picked omnisciently (see text for more details). 4. Relation to Prior Work There excellent algorithms for Poisson reconstruction such as [23, 3, 29, 30], but these methods do not provide performance bounds. In this section, we put our work in the context of existing work on Poisson compressed sensing with theoretical performance bounds. These techniques are based on one of the following categories: (a) optimizing either the Poisson negative log-likelihood (NLL) along with a regularization term, or (b) the LASSO, or (c) using the variance stabilization transform (VST). 14 Figure 5: Sample reconstruction results for Poisson-corrupted compressed measurements of an image using penalized JSD and a 2D-DCT basis. Left to right, top to bottom: original image, reconstructions for I = 104 , I = 105 , I = 106 , I = 107 , I = 108 , I = 109 , I = 1010 . The respective relative reconstruction errors (RRMSE) are 0.7, 0.1, 0.0622, 0.03, 0.015, 0.012 and 0.011. Refer to Section 3 for more details. Figure 6: Left: Time taken for the CVX solver on problem (P2) versus signal dimension m, Right: RMSE comparison for problem (P2) with and without imposition of the kx? k1 = I constraint. 15 4.1. Comparison with Poisson NLL based methods These methods include [10, 13, 31, 32, 17, 33, 34]. One primary advantage of the SQJSD-based approach over the Poisson NLL is that the former (unlike the latter) is a metric, and can be bounded by values independent of I as demonstrated in Section 2.2. In principle, this allows for an estimator that in practice does not require tweaking a regularization or signal sparsity parameter, and instead requires a statistically motivated bound  to be specified, which is more intuitive. Moreover, the methods in [10, 13] (and their extensions to the matrix completion problem in [35, 36, 37]) employ `0 -regularizers for the signal, due to which the derived bounds are applicable only to computationally intractable estimators. The results in both papers have been presented using estimators with `1 regularizers with the regularization parameters (as in [10]) or signal sparisty parameter (as in [13]) chosen omnisciently, but the derived bounds are not applicable for the implemented estimator. In contrast, our approach proves error bounds with the `1 sparsity regularizer for which efficient and tractable algorithms exist. Moreover, the analysis in [13] is applicable to exactly sparse signals, whereas our work is applicable to signals that are sparse or compressible in any orthonormal basis. However the work in [13] does perform a lower bounds analysis, which we have not presented here. Recently, NLL-based tractable minimax estimators have been presented in [32, 17], but in both cases, knowledge of an upper bound on the signal sparsity parameter (`q norm of the signal, 0 < q ≤ 1) is required for the analysis, even if the sensing matrix were to obey the RIP. A technique for deriving a regularization parameter to ensure statistical consistency of the `1 -penalized NLL estimator has been proposed in [33], but that again requires knowledge of the signal sparsity parameter. In our work, the constraint kxk1 = I was required only due to the specific structure of the sensing matrix, and even there, it was not found to be necessary in practical implementation. For clarity the specific objective functions used in these techniques is summarized in Table 4.1. The work in [31] deals with a specific type of sensing matrices called the expander-based matrices, unlike the work in this paper which deals with any randomly generated matrices of the form Eqn. 9, and the bounds derived in [31] are only for signals that are sparse in the canonical basis. In [34], performance bounds are derived in situ with system calibration error estimates for multiple measurements, which is essentially a different computational problem, which again requires knowledge of regularization parameters. 4.2. Comparison with LASSO-based methods These methods include [15, 16, 39, 40, 41, 14]. The performance of the LASSO (designed initially for homoscedastic noise) under heterscedasticity associated with the Poisson noise model is examined in [40] and necessary and sufficient conditions are derived for the sign consistency of the LASSO. Weighted/adaptive LASSO and group LASSO schemes with provable guarantees based on Poisson concentration inequalities have been proposed in [15, 16]. Group LASSO based bounds have also been derived in [39] and applied to Poisson regression. Bounds on recovery error using an `1 penalty are derived in [14] and [41] based on the RIP and 16 Method This paper Objective Function Problem (P2) from Section 1.1, with  chosen using properties of the SQJSD [10] NLL(y, Φx) + λpen(D T x) such that x  0, kxk1 = I where pen(D T x) = kD T xk0 [13] NLL(y, Φx) such that x  0, kxk1 = I, kD T xk0 ≤ s for sparsity basis D [17] NLL(y, Φx) such that x  0, kD T xk1 ≤ s for sparsity basis D [32] [38] NLL(y, Φx) such that x  0, kxk1 = I, kD T xkqq ≤ s for sparsity basis D √ √ kD T xk1 such that k y − Φxk2 ≤ , x  0, kxk1 = I for sparsity basis D with  [16] picked based on chi-square tail bounds P ky − Φxk2 + λ k dk (D T x)k for sparsity basis D, with weights dk picked statistically [14] kD T xk1 such that NLL(y, Φx) ≤  where no criterion to choose  is analyzed Table 1: Objective functions optimized by various Poisson compressed sensing methods maximum eigenvalue condition respectively. These techniques do not provide bounds for realistic physical constraints in the form of flux-preserving sensing matrices. The quantity  is not analyzed theoretically in [14] unlike in our method - see Table 4.1. Moreover the LASSO is not a probabilistically motivated (i.e. penalized likelihood based) estimator for the case of Poisson noise. Even considering an approximation of Pn (yi −[Ax]i )2 + log[Ax]i Poisson(λ) by N (λ, λ), the approximated likelihood function would be K , i=1 [Ax]i Pn (which is non-convex in x) and not i=1 (yi − [Ax]i )2 as considered in the LASSO. However J(y, Ax) is a convex function, which is a lower bound on K if [Ax]i ≥ 1 as shown in Eqn. 26 while proving Theorem 1. Therefore our SQJSD method provides a tractable way to implement such a non-convex variant of the LASSO under some mild restrictions on the measurements. 4.3. Comparison with VST-based methods VST-based methods, especially those based on variants of the square-root transformations, have been used extensively in denoising [42] and deblurring [43] but without performance bounds. In the context of Poisson CS, the VST converts a linear problem into a non-linear one. However, our group has recently shown the advantages of the VST for Poisson CS reconstructions in [44, 38] with similar statistically motivated parameter selection. However in this paper, we present the result that the SQJSD also possesses such variance stabilizing properties for the Poisson distribution. 5. Relation between the JSD and a Symmetrized Poisson Negative Log Likelihood In this section, we demonstrate the relationship between the JSD and an approximate symmetrized version of the Poisson negative log likelihood function. Consider an underlying noise-free signal x ∈ R+ m×1 . 17 Consider that a compressive sensing device acquires N  m measurements of the original signal x to produce a measurement vector y ∈ Z+ N ×1 . Assuming independent Poisson noise in each entry of y, we have ∀i, 1 ≤ i ≤ N, yi ∼ Poisson(Φx)i , where as considered before, Φ is a non-negative flux-preserving sensing matrix. The main task is to estimate the original signal x from y. A common method is to maximize the following likelihood in order to infer x: L(y|Φx) = N Y p(yi |(Φx)i ) i=1 = N y Y (Φx)i i yi ! i=1 (16) e−(Φx)i . The negative log-likelihood N LL can be approximated as: N LL(y, Φx) ≈ N X yi log i=1 yi log yi log 2π − yi + (Φx)i + + . (Φx)i 2 2 (17) This expression stems from the Stirling’s approximation [45] for log yi ! given by log yi ! ≈ yi log yi − yi + log yi log 2π + . 2 2 (18) This is derived from Stirling’s series given below as follows for some integer n ≥ 1: n! ≈ √ 2πn n n n n 1 1  √ 1+ + ≈ 2πn . 2 e 12n 288n e (19) Consider the generalized Kullback-Leibler divergence between y and Φx, denoted as G(y, Φx) and defined as G(y, Φx) , N X i=1 yi log yi − yi + (Φx)i . (Φx)i (20) The generalized Kullback-Leibler divergence turns out to be the Bregman divergence for the Poisson noise model [46] and is used in maximum likelihood fitting and non-negative matrix factorization under the Poisson noise model [11]. The negative log-likelihood can be expressed in terms of the generalized Kullback-Leibler divergence in the following manner: N LL(y, Φx) ≈ G(y, Φx) + N  X log yi i=1 2 + log 2π  . 2 (21) Let us consider the following symmetrized version of the N LL: SN LL(y, Φx) = N LL(y, Φx) + N LL(Φx, y) ≈ G(y, Φx) + G(Φx, y) + N  X log yi i=1 2 +  log(Φx)i + log 2π (22) 2 ≥ G(y, Φx) + G(Φx, y) = D(y, Φx) + D(Φx, y), where D is the Kullback-Leibler divergence from Eqn. 10. The inequality above is true when the term 1 in parantheses is non-negative, which is true when either (1) for each i, we must have yi ≥ , or 4π 2 (Φx)i 18 (2) the minimum value for yi ≥ d , 1 4π 2 QN i=1 (Φx)i (1/N ) . We collectively denote these conditions as ‘Condition 1’ henceforth. Note that, given the manner in which Φ is constructed, we have the guarantee xmin that (Φx)i ≥ with a probability of 1 − N pm where xmin is the minimum value in x. The quantity on N the right hand side of the last equality above follows from Eqns. 10 and 20, and yields a symmetrized form of the Kullback-Leibler divergence Ds (y, Φx) , D(y, Φx) + D(Φx, y). Now, we have the following useful lemma giving an inequality relationship between Ds and J, the proof of which follows [47] and can be found in the supplemental material in Section 8. 1 Ds (u, v) ≥ J(u, v). 4 Combining Eqns. 23 and Lemma 3, we arrive at the following conclusion if ‘Condition 1’ holds true: Lemma 3: Given non-negative vectors u and v, we have SN LL(y, Φx) ≤  =⇒ J(y, Φx) ≤ /4 =⇒ p J(y, Φx) ≤ 0 , √ /2. (23) Let us consider the following optimization problem: (P3): minimizekzk1 such that SN LL(y, Az) ≤ , z  0, kΨzk1 = I. (24) Following Eqn. 23, we observe that a solution to (P3) is also a solution to (P2) with slight abuse of notation (i.e., the  in (P2) should actually be 0 defined in Eqn. 23). Note that Condition 1 can fail with higher probability if (Φx)i is small, due to which the J ≤ SN LL bound may no longer hold. However, this does not affect the validity of Theorem 1.3 or the properties of the estimator proposed in this paper. Note that we choose to solve (P2) instead of (P3) in this paper, as the SQJSD and not SN LL is a metric, which makes it easier to establish theoretical bounds using SQJSD. 6. Conclusion In this paper, we have presented new upper bounds on the reconstruction error from compressed measurements under Poisson noise in a realistic imaging system obeying the non-negativity and flux-preservation constraints, for a computationally tractable estimator using the `1 norm sparsity regularizer. Our bounds are easy to derive and follow the skeleton of the technique laid out in [1]. The bounds are based interesting properties of the SQJSD from Section 2.2, some of which are derived in this paper, and are applicable to sparse as well as compressible signals in any chosen orthonormal basis. We have presented numerical simulations with parameters chosen based on noise statistics (unlike the choice of regularization or signal sparsity parameters in other techniques), showing the efficacy of the method in reconstruction from compressed measurements under Poisson noise. We observe that the derived upper bounds decrease with an increase in the original signal flux, i.e. I. However the bounds do not decrease with an increase in the number of measurements N , unlike conventional compressed sensing. This observation, though derived independently and using different 19 techniques, agrees with existing literature on Poisson compressed sensing or matrix completion [10, 36, 35]. The reason for this strange observation is the division of the signal flux across the N measurements, thereby leading to poorer signal to noise ratio per measurement. There exist several avenues for future work, as follows. A major issue is to explore theoretical error bounds in the absence of the knowledge of I, which is an open problem in flux-preserving systems to the best of our knowledge (even though we have excellent numerical results without knowing I). Furthermore, it will be useful to derive lower-bounds on the reconstruction error and extend our theory to the problem of matrix completion under Poisson noise. 7. Appendix 7.1. Proof of Theorem 1 To prove this theorem, we first begin by considering y ∼ Poisson(γ) where γ ∈ R and derive bounds for the mean and variance of J(y, γ). Thereafter, we generalize to the case with multiple measurements. Let f (y) , J(y, γ). Hence we have γ + y 1 γ+y (γ log γ + y log y) − log . 2 2 2   1 γ+y ∴ f (1) (y) = [log y − log ]. 2 Z2 f (y) = y f (1) (t)dt as f (γ) = 0. ∴ f (y) = x where f (k) (y) stands for the k th derivative of f (y). As f (1) (y) is a non-decreasing function (since f (2) (y) is non-negative for all y), we have f (y) ≤ (y − γ)f (1) (y). Likewise, noting that f (1) (γ) = 0 we get f (1) (y) = Ry γ f (2) (t)dt. We know that f (2) (y) = (25) 1 2 h 1 y − 1 y+γ i is a decreasing function as f (3) (y) is negative for all y. If y ≥ γ then f (2) (y) ≤ f (2) (γ). Therefore, f (1) (y) ≤ (y − γ)f (2) (γ). If y ≤ γ then f (2) (y) ≥ f (2) (γ). Therefore, −f (1) (y) ≥ (γ − y)f (2) (γ). Combining Eqn. 25 with the above inequality, we get f (y) ≤ (y − γ)2 f (2) (γ) = 1 (y − γ)2 . 4γ (26) Therefore, using E[(y − γ)2 ] = γ for a Poisson random variable, we have E[f (y)] ≤ 1 1 E[(y − γ)2 ] = . 4γ 4 (27) Thus, we have found an upper bound on E[f (y)] which is independent of γ. We will now derive a lower bound on E[f (y)], as it will be useful in deriving an upper bound for Var(f (y)). 20 We can expand f (y) using a second order Taylor series about γ along with a (third order) Lagrange remainder term as follows: f (2) (γ) f (2) (z(y)) (y − γ)2 + (y − γ)3 2! 3! i h 1 1 1 1 = (y − γ)2 − (y − γ)3 2 − 8γ 12 z (y) (γ + z(y))2 f (y) = f (γ) + f (1) (γ)(y − γ) + for some z(y) that lies in the interval (y, γ) or (γ, y). Therefore, ∞ E[f (y)] = h 1 ii 1 1 h X e−γ γ y 1 E[(y − γ)2 ] − (y − γ)3 2 − 8γ 12 y=0 y! z (y) (γ + z(y))2 ∞ = i  1 1 1 h X e−γ γ y 1 . − (y − γ)3 2 − 2 8 12 y=0 y! z (y) (γ + z(y)) Let α be the largest integer less than or equal to γ. We can split the second term in the RHS of the above expression into the sum of two terms I1 and −I2 , depending upon whether y is greater than α or not. I1 and I2 are defined as follows: α I1 =  1 i 1 h X e−γ γ y 1 (γ − y)3 2 − 2 12 y=0 y! z (y) (γ + z(y)) I2 = ∞  1 i 1 1 h X e−γ γ y (y − γ)3 2 − . 12 y=α+1 y! z (y) (γ + z(y))2 In order to lower bound E[f (y)], we want to minimize I1 and maximize I2 w.r.t. z(y). Since 1 (γ+z(y))2 1 z 2 (y) − is a decreasing function of z(y), it can be proved that I1 is minimized when z(y) = γ and that I2 attains a maximum when z(y) = γ. Therefore, we obtain E[f (y)] ≥ 1 1 1 1 − E[(y − γ)3 ] = − . 8 16γ 2 8 16γ (28) This lower bound is loose if γ < 0.5 since we know that E[f (y)] must clearly be non-negative. Hence it is more apt to express the lower bound as follows: E[f (y)] ≥ max(0, 1 1 − ). 8 16γ (29) In summary, we have max(0, 1 1 1 − ) ≤ E[f (y)] ≤ . 8 16γ 4 We now proceed to derive an upper bound on the variance of f (y). Using Eqn. 26 we get, E[(f (y))2 ] ≤ 1 γ(1 + 3γ) 3 1 + . E[(y − γ)4 ] = ≤ 16γ 2 16γ 2 16 16γ 21 (30) Recall that Var[f (y)] = E[(f (y))2 ] − (E[f (y)])2 . Using Eqn. 28 and 7.1, we get Var(f (y)) ≤ 3 16 + 1 16γ  h − max(0, 18 − 11 + ≤ max(0, 64 ≤ 11 64 + 5 64γ − 1 16γ i 2 ) (31) 1 256γ 2 ) (32) 5 64γ . (33) Now consider that y is a vector of N measurements such that ∀i ∈ {1, 2, ..., N }, yi ∼ Poisson(γi ) and all measurements are independent. We will later replace γi by (Φx)i where Φ is a non-negative flux-preserving matrix and x is the unknown signal to be estimated. Let us define some terminology as follows: N fi (yi ) , γ + y  X p (γi log γi + yi log yi ) γi + yi i i , f (y) , − log fi (yi ), g(y) , f (y). 2 2 2 i=1 Jensen’s inequality gives the following upper bound on the expected value of g(y): v r uN uX p N t E[fi (yi )] ≤ . E[g(y)] = E[ f (y)] ≤ 4 i=1 (34) In order to lower bound E[g(y)] we use the following inequality for the non-negative variable f : p f − 1 (f − 1)2 − . f ≥1+ 2 2 √ This inequality follows since it is equivalent to 3f − f 2 ≤ 2 f which implies 3b − b3 ≤ 2 which is true for f any b ≥ 0. Define f˜ , such that E[f˜] = 1. Therefore, we have the following inequalities: E[f ] q f˜ − 1 (f˜ − 1)2 − f˜ ≥ 1 + 2 2 q ˜) Var( f ∴ E[ f˜] ≥ 1 − 2  p p Var(f )  ∴ E[ f ] ≥ E[f ] 1 − 2E[f ]2  p Var(f )  ∴ E[g] ≥ E[f ] 1 − . 2E[f ]2 Now, we can find an upper bound on Var[g(y)] Var(g) = E[g 2 ] − E[g]2  Var(f ) 2 ≤ E[f ] − E[f ] 1 − 2E[f ]2 Var(f ) 1 Var(f )2 ≤ − . E[f ] 4 E[f ]3 As for different i, the variables fi (yi ) are independent of each other, we get Var(f ) = 22 PN i=1 Var(fi ), due to which we have: PN PN 1 ( i=1 Var(fi ))2 Var(g) ≤ − P 2 4 ( N i=1 E(fi )) PN 11N + 5 i=1 1/γi ≤ . PN max(0, 4(2N − i=1 1/γi )) i=1 Var(fi ) PN i=1 E(fi ) The last step follows from Eqn. 33 and 29. Now we consider replacing γi by (Φx)i . Since Φ contains the values 0 or 1 N, we see that si = N × (Φx)i is the summation of a subset of the elements in the vector x. This gives us the final upper bound p Var[ J(y, Φx)] ≤ 11 + 5 max(0, 4(2 PN i=1 1/si . PN − i=1 1/si )) (35) p p In order to obtain a tail bound on J(y, Φx), we can use Chebyshev’s inequality to prove that P ( J(y, Φx) ≤ p √ N/4+σ N ) ≥ 1− N1 , where σ 2 is the variance of fi and is upper bounded by (approximately) 11 64 . However, p we show here that J(y, Φx) is approximately Gaussian distributed which leads to an even higher probabilµ √ ity. By the central limit theorem, we know that P ( f (y)−N ≤ α) → Φg (α) as N → ∞, where Φg is the CDF σ N for N (0, 1), and µ is the expected value of fi . All the fi values will have near-identical variances (≤ 11/64 from Eqn. 33) if the intensity of the measurements is sufficiently high. Due to the continuity of Φg , we have √ µ α2 √ σ2 √ √ )2 ) → Φg (α) as P ( f (y)−N ≤ α + 4µσ ) → Φg (α) as N → ∞. Hence we have P (f (y) ≤ ( N µ + 2ασ µ σ N N p √ ασ N → ∞, and taking square roots we get P ( f (y) ≤ ( N µ+ 2√µ )) → Φg (α) as N → ∞. By rearrangement, √ √ f (y)− N µ we obtain P ( σ/(2√µ) ≤ α) → Φg (α) as N → ∞. With this development and since µ ≤ 1/4 from Eqn. p p √ 27, we can now invoke a Gaussian tail bound to establish that P ( J(y, Φx) ≤ N/4+σ N ) ≥ 1−2e−N/2 . p Note that the Gaussian nature of J(y, Φx) emerges from the central limit theorem and is only an asymptotic result. However we consistently observe it to be true even for small values of N ∼ 10 as confirmed by a Kolmogorov-Smirnov test (see [19]).  7.2. Proof of Theorem 2 Our proof follows the approach for the proof of the key results in [1, 8] for the case of bounded, signalindependent noise, but meticulously adapted here for the case of Poisson noise. p p J(y, Φx), i.e., J(y, Φx) ≤ . We will later set  using tail bounds p on the distribution of the random variable J(y, Φx). For now, we prove the following result: 1. Consider an upper bound  on √ kΦΨ(θ − θ ? )k2 ≤ 2 8I. 23 (36) We have θ θ? kΦΨθ − ΦΨθ ? k2 ≤ kΦΨ(θ − θ ? )k1 = IkΦΨ( − )k1 I I r ΦΨθ ΦΨθ ? ≤ I 8J( , ) by Lemma 2 I I r r ΦΨθ y ΦΨθ ? y , ) + I 8J( , ) by Lemma 1 = I 8J( I I I I √ I p I p =√ 8J(ΦΨθ, y) + √ 8J(ΦΨθ ? , y) ≤ 2 8I. I I Note that Lemma 2 can be used in the third step above because we have imposed the constraint that kΨθ ? k1 = kΨθk1 = I and because by the flux-preserving property of Φ, we have kΦΨθk1 ≤ I and kΦΨθ ? k1 ≤ I. 2. Let us define vector h , θ ? − θ which is the difference between the estimated and true coefficient vectors. Let us denote vector hT as the vector equal to h only on an index set T and zero at all other indices. Let T c denote the complement of the index set T . Let T0 be the set of indices containing the s largest entries of h (in terms of absolute value), T1 be the set of indices of the next s largest entries of hT0c , and so on. We will now decompose h as the sum of hT0 , hT1 , hT2 , .... Our aim is to prove a logical and intuitive bound for both khT0 ∪T1 k2 and kh(T0 ∪T1 )c k2 . 3. We will first prove the bound on kh(T0 ∪T1 )c k2 , in the following way: (a) We have khTj k2 = sX h2Tj k ≤ s1/2 khTj k∞ , k X skhTj k∞ ≤ |hTj−1i | = khTj−1 k1 . i Therefore, khTj k2 ≤ s1/2 khTj k∞ ≤ s−1/2 khTj−1 k1 . (b) Using Step 3(a), we get kh(T0 ∪T1 )c k2 = k X j≥2 hTj k2 ≤ X khTj k2 j≥2 ≤ s−1/2 X khTi k1 i≥1 ≤ s−1/2 kh(T0 )c k1 . 24 (c) Using the reverse triangle inequality and the fact that θ ? is the solution of (P2), we have kθk1 ≥ kθ + hk1 X X |θi + hi | + |θi + hi | = i∈(T0 )c i∈T0 ≥ kθ T0 k1 − khT0 k1 + kh(T0 )c k1 − kθ (T0 )c k1 . Rearranging the above equation gives us kh(T0 )c k1 ≤ kh(T0 ) k1 + 2kθ − θs k1 (d) We have kh(T0 ∪T1 )c k2 ≤ s−1/2 kh(T0 )c k1 ≤ s−1/2 (kh(T0 ) k1 + 2kθ − θs k1 ) ≤ kh(T0 ) k2 + 2s−1/2 kθ − θs k1 Using kh(T0 ) k2 ≤ khT0 ∪T1 k2 , we get kh(T0 ∪T1 )c k2 ≤ khT0 ∪T1 k2 + 2s−1/2 kθ − θs k1 . (37) 4. We will now prove the bound on kh(T0 ∪T1 ) k2 , in the following way: (a) We have r p(1 − p) (1 − p) Φ̃ + 1N ×m N N r p(1 − p) ΦΨ(θ − θ ? ) = Φ̃Ψ(θ − θ ? )+ N (1 − p) 1N ×m Ψ(θ − θ ? ) N r p(1 − p) Φ̃Ψ(θ − θ ? )+ = N (1 − p) (kΨθk1 − kΨθ ? k1 ) N Φ= As kΨθ ? k1 = kΨθk1 = I, we get r ? ΦΨ(θ − θ ) = p(1 − p) Φ̃Ψ(θ − θ ? ). N (38) Let us define B , Φ̃Ψ. If N ≥ O(s log m), then Φ̃ obeys RIP of order 2s with very high probability, and so does the product B since Ψ is an orthonormal matrix [9]. 25 From Eqn. 38 above we have, s N kΦΨ(θ − θ ? )k2 p(1 − p) s 8N I ≤2  using Eqn. 36 p(1 − p) s 8N I ∴ kBhk2 ≤ 2  p(1 − p) ? kB(θ − θ )k2 = r Defining C1 , 2 8 , we have p(1 − p) √ kBhk2 ≤ C1 N I (39) (b) The RIP of B with RIC δ2s gives us, kBhT0 ∪T1 k2 ≤ p 1 + δ2s khT0 ∪T1 k2 Using Eqn. 39 and the Cauchy-Schwartz inequality, |hBhT0 ∪T1 , Bhi| ≤ kBhT0 ∪T1 k2 kBhk2 p ≤ C1  N I(1 + δ2s )khT0 ∪T1 k2 . (40) (c) Note that the vectors hT0 and hTj , j 6= 0 have disjoint support. Consider |hBhT0 , BhTj i| = khT0 k2 khTj k2 |hB ĥT0 , B ĥTj i| where ĥT0 and ĥTj are unit-normalized vectors. This further yields, |hBhT0 , BhTj i| kB(ĥT0 + ĥTj )k2 − kB(ĥT0 − ĥTj )k2 4 (1 + δ2s )(kĥT0 k2 + kĥTj k2 ) − (1 − δ2s )(kĥT0 k2 + kĥTj k2 ) ≤ khT0 k2 khTj k2 4 = khT0 k2 khTj k2 ≤ δ2s khT0 k2 khTj k2 . (41) Analogously, |hBhT1 , BhTj i| ≤ δ2s khT1 k2 khTj k2 . (42) (d) We observe that BhT0 ∪T1 = Bh − X BhTj j≥2 kBhT0 ∪T1 k22 = hBhT0 ∪T1 , Bhi − hBhT0 ∪T1 , X j≥2 26 BhTj i. (43) (e) Using the RIP of B and Eqns. 40, 41, 42, 43, we obtain (1 − δ2s )khT0 ∪T1 k22 ≤ kBhT0 ∪T1 k22 ≤ C1  p N I(1 + δ2s )khT0 ∪T1 k2 + δ2s (khT0 k2 + khT1 k2 ) X khTj k2 . j≥2 As hT0 and hT1 are vectors with disjoint sets of non-zero indices, it follows that khT0 k2 + khT1 k2 ≤ √ 2khT0 ∪T1 k2 . Therefore, we get (1 − δ2s )khT0 ∪T1 k22   X p √ ≤ khT0 ∪T1 k2 C1  N I(1 + δ2s ) + 2δ2s khTj k2 . (44) j≥2 (f) We have X khTj k2 ≤ s−1/2 kh(T0 )c k1 j≥2 ≤ s−1/2 kh(T0 ) k1 + 2s−1/2 kθ − θs k1 ≤ kh(T0 ) k2 + 2s−1/2 kθ − θs k1 ≤ khT0 ∪T1 k2 + 2s−1/2 kθ − θs k1 . (45) Combining Eqns. 44 and 45, p √ N I(1 + δ2s ) 2 2δ2s √ √ + s−1/2 kθ − θs k1 . khT0 ∪T1 k2 ≤ C1  1 − (1 + 2)δ2s 1 − (1 + 2)δ2s (46) 5. Combining the upper bounds on kh(T0 ∪T1 ) k2 and kh(T0 ∪T1 )c k2 yields the final result as follows: khk2 = khT0 ∪T1 + h(T0 ∪T1 )c k2 ≤ khT0 ∪T1 k2 + kh(T0 ∪T1 )c k2 ≤ 2khT0 ∪T1 k2 + 2s−1/2 kθ − θs k1 . Using Eqn. 46, we get  2 − 2δ + 2√2δ  N I(1 + δ2s ) 2s 2s √ √ + s−1/2 kθ − θs k1 . 1 − (1 + 2)δ2s 1 − (1 + 2)δ2s p  2 − 2δ + 2√2δ  4 8(1 + δ2s ) 2s 2s 0 00 √ √ Let us define C , p and C , . This yields 1 − (1 + 2)δ2s p(1 − p)(1 − (1 + 2)δ2s ) p khk2 ≤ 2C1  √ khk2 ≤ C 0 N I + C 00 s−1/2 kθ − θs k1 . The positivity requirements for C 0 and C 00 are met by δ2s < √ 2 − 1. Dividing both sides by I we obtain the first part of the theorem, kθ − θ ? k2 ≤ C0 I r N C 00 s−1/2 kθ − θs k1 + . I I 27 (47) However using tail bounds on p J(y, Φx) from Theorem 1 in Section 2.2, we can set  = √ N ( 21 + √ 11 8 ). This yields the following:  kθ − θ ? k C 00 s−1/2 kθ − θ s k1  N 2 Pr ≥ 1 − 2e−N/2 , ≤ C̃ √ + I I I where C̃ , C 0 (1/2 + σ) where σ is the upper bound of (48) √ 11 8 on the standard deviation of the SQJSD as stated in Theorem 1. For high intensity signals, the previous analysis shows that σ is independent of both I and N .  8. Supplemental Material This is supplemental material accompanying the main paper. It basically contains proofs of some lemmas used in the proof of the main theorem in the main paper. Lemma 1 The square root of the Jensen-Shannon Divergence is a metric [12]. Proof: The square root of the Jensen-Shannon divergence trivially obeys the properties of symmetry, nonnegativity and identity. We would like to point out that the proof of the triangle inequality for the square-root of the Jensen-Shannon divergence given in [12] does not require p and q to be probability distributions. In p p p other words given non-negative vectors p, q, and r, we have J(p, q) ≤ J(p, r) + J(q, r) even if kpk1 6= 1, kqk1 6= 1 and krk1 6= 1. We reproduce a sketch of the proof here. 2p 2q First, we define the function L(p, q) , p log + q log where scalars p ∈ R+ , q ∈ R+ . Given any p + q p p p +q p scalar r ∈ R+ , it is proved in [12] that L(p, q) ≤ L(p, r) + L(q, r). Now, we can clearly see that p pP J(p, q) = i L(pi , qi ). Starting from this, we have v v u sX  2 uX  2 p p p uX p u J(p, q) = L(pi , qi ) = t L(pi , qi ) ≤ t L(pi , ri ) + L(qi , ri ) i i = sX i L(pi , ri ) + sX i L(qi , ri ) by Minkowski’s inequality i = p p J(p, r) + J(q, r). Lemma 2: Let us define V (p, q) , n X |pi − qi | i=1 ∆(p, q) , n 2 X |pi − qi | i=1 pi + qi . If p, q  0 and kpk1 ≤ 1, kqk1 ≤ 1 then 1 V (p, q)2 ≤ ∆(p, q) ≤ 4J(p, q). 2 28 (49) Proof: The latter inequality can be proved using arguments in [48] (Section III) as these arguments do not require p and q to be probability distributions in any of the steps. To prove the first inequality, we prove 1 that 2∆(p, q) − V (p, q)2 ≥ 0 as follows. Let us define zi , |pi − qi | and wi , |pi + qi |. If kpk1 ≤ 1, kqk1 ≤ 1 2 Pn Pn then i=1 wi ≤ 1. Hence ∃α ≥ 0 such that i=1 wi + α = 1. 2∆(p, q) − V (p, q)2 = n X zi 2 i=1 = Qn " 1 i=1 wi n X i=1 zi 2 Y j6=i wi − n X 2 zi i=1 n Y n X wi )( zi )2 i=1 i=1 wj − ( # " # n n n X Y 2 1 X 2Y zi wj − γ zi where γ , wi = γ i=1 i=1 i=1 j6=i " n # XX   1 X 2Y zi wj 1 − wi − 2 zi zj γ = γ i=1 i j>i j6=i " n # X XX   1 X 2Y zi wj wj + α − 2 zi zj γ = γ i=1 i j>i j6=i j6=i # " n X Y  2 Y 1 XX 2 zi wj ≥ 0 ( zi wj − zj wi wk ) + α = γ i=1 i j>i k6=j,k6=i (50) j6=i Notice that the first term in the last step is clearly non-negative as it is the product of a square-term and a term containing wk values all of which are non-negative and since γ ≥ 0. The second term is also non-negative 1 as α ≥ 0. Thus, the inequality V (p, q)2 ≤ ∆(p, q) is proved.  2 1 Lemma 3: Given non-negative vectors u and v, we have Ds (u, v) ≥ J(u, v). 4 u i + vi √ Proof: Following [47], we have ≥ ui vi by the arithmetic-geometric inequality. Now we have: 2 ui vi 1 X ui log + vi log ) (51) J(u, v) = ( 2 i (ui + vi )/2 (ui + vi )/2 ui ui vi 1 X vi 1 1 X ≤ ( ui log √ ui log + vi log √ )≤ ( + vi log ) = Ds (u, v). 2 i ui vi ui vi 4 i vi ui 4 (52) In [47], this proof is presented for probability mass functions, but we observe here that it extends to arbitrary non-negative vectors.  Lemma 4: Given θ which is the minimizer of problem (P4) for some λ > 0, there exists some value of  = θ for which θ is the minimizer of problem (P2), but without the constraint kΨθk1 = I. Proof: Our proof follows [25], proposition 3.2. Define θ , J(ΦΨθ, y). Consider vector θ 0 such that J(ΦΨθ 0 , y) ≤ θ . Now since θ minimizes (P3), we have λkθk1 + J(ΦΨθ, y) ≤ λkθ 0 k1 + J(ΦΨθ 0 , y) ≤ λkθ 0 k1 + J(ΦΨθ, y), 29 yielding kθk1 ≤ kθ 0 k1 , thereby establishing that θ is also the minimizer of a version of (P2) without the constraint kΨθk1 = I.  References References [1] E. Candes, The restricted isometry property and its implications for compressed sensing, Comptes Rendus Mathematique 346 (910) (2008) 589 – 592. [2] F. Alter, Y. Matsushita, X. Tang, An intensity similarity measure in low-light conditions, in: ECCV, 2006. [3] J. L. Starck, J. Bobin, Astronomical data analysis and sparsity: From wavelets to compressed sensing, Proceedings of the IEEE 98 (6) (2010) 1021–1030. [4] J. Boone, E. Geraghty, J. Seibert, S. Wootton-Gorges, Dose reduction in pediatric CT: A rational approach, Radiology 228 (2) (2003) 352–360. [5] J. Boulanger, C. Kervrann, P. Bouthemy, P. Elbau, J.-B. Sibarita, J. Salamero, Patch-based nonlocal functional for denoising fluorescence microscopy image sequences, IEEE Trans. Med. Imag. 29 (2) (2010) 442454. [6] S. Yang, et al, Estimation of multiexponential fluorescence decay parameters using compressive sensing, Journal of Biomedical Optics 20 (9). [7] T. T. Cai, A. Zhang, Sharp rip bound for sparse signal and low-rank matrix recovery, Applied and Computational Harmonic Analysis 35 (1) (2013) 74 – 93. [8] C. Studer, R. Baraniuk, Stable restoration and separation of approximately sparse signals, Applied and Computational Harmonic Analysis 37 (1) (2014) 12 – 35. [9] R. Baraniuk, M. Davenport, R. DeVore, M. Wakin, A simple proof of the restricted isometry property for random matrices, Constructive Approximation 28 (3) (2008) 253–263. [10] M. Raginsky, R. Willett, Z. Harmany, R. Marcia, Compressed sensing performance bounds under Poisson noise, Signal Processing, IEEE Transactions on 58 (8) (2010) 3990–4002. [11] C. Fevotte, A. T. Cemgil, Nonnegative matrix factorizations as probabilistic inference in composite models, in: Signal Processing Conference, 2009 17th European, 2009, pp. 1913–1917. 30 [12] D. Endres, J. Schindelin, A new metric for probability distributions, IEEE Trans. Inf. Theory 49 (7) (2003) 18581860. [13] X. Jiang, G. Raskutti, R. Willett, Minimax optimal rates for Poisson inverse problems with physical constraints, IEEE Trans. Information Theory 61 (8) (2015) 4458–4474. [14] I. Rish, G. Grabarnik, Sparse signal recovery with exponential-family noise, in: Communication, Control, and Computing, 2009. Allerton 2009. 47th Annual Allerton Conference on, 2009, pp. 60–66. [15] S. Ivanoff, F. Picard, V. Rivoirard, Adaptive lasso and group-lasso for functional Poisson regression, Journal of Machine Learning Research 17 (55) (2016) 1–46. [16] X. Jiang, P. Reynaud-Bouret, V. Rivoirard, L. Sansonnet, R. Willett, A data-dependent weighted LASSO under Poisson noise, online; accessed July 2016. URL http://arxiv.org/abs/1509.08892 [17] M.-H. Rohban, V. Saligrama, D.-M. Vaziri, Minimax optimal sparse signal recovery with Poisson statistics, IEEE Trans. Signal Processing 64 (13) (2016) 3495–3508. [18] M. Mordechay, Y. Y. Schechner, Matrix optimization for Poisson compressed sensing, in: IEEE Global Conference on Signal and Information Processing (GlobalSIP), 2014, pp. 684–688. [19] Code for reproducing results in the paper, https://www.cse.iitb.ac.in/~ajitvr/SQJSD/. [20] E. Candes, T. Tao, The Dantzig selector: Statistical estimation when p is much larger than n, The Annals of Statistics 35 (6) (2007) 2313–2351. [21] R. Saab, O. Yilmaz, Sparse recovery by non-convex optimization instance optimality, Applied and Computational Harmonic Analysis 29 (1) (2010) 30 – 48. [22] E. Candes, M. Wakin, S. Boyd, Enhancing sparsity by reweighted l1 minimization, Journal of Fourier Analysis and Applications 14 (5) (2008) 877–905. [23] D. Lingenfelter, J. Fessler, Z. He, Sparsity regularization for image reconstruction with Poisson data, Vol. 7246, 2009. [24] M. Duarte, M. Davenport, D. Takhar, J. Laska, T. Sun, K. Kelly, R. Baraniuk, Single pixel imaging via compressive sampling, IEEE Signal Processing Magazine. [25] S. Foucart, H. Rauhut, A Mathematical Introduction to Compressive Sensing, Birkhauser, 2013. [26] M. Grant, S. Boyd, CVX: Matlab software for disciplined convex programming, version 2.1, http: //cvxr.com/cvx (Mar. 2014). 31 [27] Z. T. Harmany, R. F. Marcia, R. M. Willett, This is SPIRAL-TAP: Sparse Poisson intensity reconstruction algorithms - theory and practice, IEEE Trans. Image Processing 21 (3) (2012) 1084–1096. [28] Y. Oike, A. El Gamal, CMOS image sensor with per-column sigma delta ADC and programmable compressed sensing, Solid-State Circuits, IEEE Journal of 48 (1) (2013) 318–328. [29] B. Zhang, M. Fadili, J. Starck, Wavelets, ridgelets, and curvelets for Poisson noise removal, IEEE Transactions on Image Processing 17 (7) (2008) 1093–1108. [30] S. Sra, D. Kim, B. Schlkopf, Non-monotonic Poisson likelihood maximization, Tech. Rep. 170, Max Planck Institute (2008). [31] M. Raginsky, S. Jafarpour, Z. T. Harmany, R. F. Marcia, R. M. Willett, R. Calderbank, Performance bounds for expander-based compressed sensing in Poisson noise, IEEE Transactions on Signal Processing 59 (9) (2011) 4139–4153. [32] Y. Li, G. Raskutti, Minimax optimal convex methods for Poisson inverse problems under lq-ball sparsity, online; accessed July 2016. URL https://arxiv.org/abs/1604.08943 [33] Y.-H. Li, V. Cevher, Consistency of l1-regularized maximum-likelihood for compressive Poisson regression, in: 2015 IEEE International Conference on Acoustics, Speech and Signal Processing, ICASSP 2015, 2015, pp. 3606–3610. [34] L. Wang, et al, Signal recovery and system calibration from multiple compressive Poisson measurements, SIAM J. Imaging Sciences 8 (3) (2015) 1923–1954. [35] Y. Xie, Y. Chi, R. Calderbank, Low-rank matrix recovery with Poisson noise, in: Global Conference on Signal and Information Processing (GlobalSIP), 2013 IEEE, 2013, pp. 622–622. [36] Y. Cao, Y. Xie, Poisson matrix recovery and completion, IEEE Transactions on Signal Processing 64 (6) (2016) 1609–1620. [37] A. Soni, S. Jain, J. Haupt, S. Gonella, Noisy matrix completion under sparse factor models, IEEE Trans. Information Theory 62 (6) (2016) 3636–3661. [38] D. Garg, A. Rajwade, Reconstruction error bounds for compressed sensing under poisson or poissongaussian noise using variance stabilization transforms, online; accessed Sept 2017. URL http://arxiv.org/abs/1707.00475 32 [39] M. Blazere, J. M. Loubes, F. Gamboa, Oracle inequalities for a group lasso procedure applied to generalized linear models in high dimension, IEEE Transactions on Information Theory 60 (4) (2014) 2303–2318. [40] J. Jinzhu, R. Karl, Y. Bin, The LASSO under Poisson-like heterscedasticity, Statistica Sinica 23 (1) (2013) 99–118. [41] S. Kakade, O. Shamir, K. Sindharan, A. Tewari, Learning exponential families in high-dimensions: Strong convexity and sparsity, in: Proceedings of the Thirteenth International Conference on Artificial Intelligence and Statistics, AISTATS, 2010, pp. 381–388. [42] M. Makitalo, A. Foi, Optimal inversion of the generalized anscombe transformation for Poisson-gaussian noise, IEEE Transactions on Image Processing 22 (1) (2013) 91–103. [43] F.-X. Dupé, J. Fadili, J.-L. Starck, A proximal iteration for deconvolving poisson noisy images using sparse representations, IEEE Trans. Image Processing 18 (2) (2009) 310–321. [44] D. Garg, A. Rajwade, Performance bounds for poisson compressed sensing using variance stabilization transforms, in: ICASSP, 2017, pp. 6080–6084. [45] Stirling’s approximation, https://en.wikipedia.org/wiki/Stirling%27s_approximation, online; accessed May 2016. [46] M. Collins, S. Dasgupta, R. Schapire, A generalization of principal component analysis to the exponential family, in: Advances in Neural Information Processing Systems, 2001. [47] J. Lin, Divergence measures based on the shannon entropy, IEEE Transactions on Information Theory 37 (1) (1991) 6958–6975. [48] F. Topsoe, Some inequalities for information divergence and related measures of discrimination, IEEE Transactions on Information Theory 46 (4) (2000) 1602–1609. 33
7cs.IT
Space Lower Bounds for Itemset Frequency Sketches∗ arXiv:1407.3740v4 [cs.DS] 9 Mar 2016 Edo Liberty† Michael Mitzenmacher‡ Justin Thaler† Jonathan Ullman§ Abstract Given a database, computing the fraction of rows that contain a query itemset or determining whether this fraction is above some threshold are fundamental operations in data mining. A uniform sample of rows is a good sketch of the database in the sense that all sufficiently frequent itemsets and their approximate frequencies are recoverable from the sample, and the sketch size is independent of the number of rows in the original database. For many seemingly similar problems there are better sketching algorithms than uniform sampling. In this paper we show that for itemset frequency sketching this is not the case. That is, we prove that there exist classes of databases for which uniform sampling is a space optimal sketch for approximate itemset frequency analysis, up to constant or iterated-logarithmic factors. 1 Introduction Identifying frequent itemsets is one of the most basic and well-studied problems in data mining. Formally, n we are given a binary database D ∈ {0, 1}d consisting of n rows and d columns, or attributes.1 An itemset T ⊆ [d] is a subset of the attributes, and the frequency fT of T is the fraction of rows of D that have a 1 in all columns in T . Computing itemset frequencies is a central primitive that can be used to solve the following problems (and countless others): given a large corpus of text files, compute the number of documents containing a specific search query; given user records, compute the fraction of users who belong to a specific demographic; given event logs, compute sets of events that are observed together; given shopping cart data, identify bundles of items that are frequently bought together. In many settings, an approximation of fT , as opposed to an exact result, suffices. Alternatively, in some settings it suffices to recover a single bit indicating whether or not fT ≥ ǫ for some user defined threshold ǫ; such frequent itemsets may require additional study or processing. It is easy to show that uniformly sampling poly(d/ǫ) rows from D and computing the approximate frequencies on the sample S(D) provides good approximations to fT up to additive error ǫ. Our main contribution is to provide lower bounds establishing that uniform sampling is an essentially optimal sketch, in terms of the space/accuracy tradeoff, for many parameter regimes. Here, a sketch S(D) of a database is a bit string that enables recovery of accurate approximations to itemset frequencies. Note that, unlike a row sample, in general a sketch is not limited to containing a subset of the database rows. Our lower bounds hold for any summary data structure and recovery algorithm that constitute a valid sketch. ∗ This paper supersedes an earlier manuscript of the same title by the first three authors. Yahoo Labs ‡ Harvard University, School of Engineering and Applied Sciences. § Northeastern University, College of Computer and Information Sciences. 1 Throughout, we use the terms attributes and items interchangeably. While attributes may be non-binary in many applications, any attribute with m possible values can be decomposed into 2⌈log m⌉ binary attributes, using two binary attributes to mark whether the value is 0 or 1 in the ith bit. We therefore focus on the binary case. † 1 1.1 Motivation 1.1.1 The Case Against Computing Frequent Itemsets Exactly If the task is only to identify frequent itemsets (fT ≥ ǫ for some ǫ), it is natural to ask whether we can compute all ǫ-frequent itemsets and store only those. Assuming that only a small fraction of itemsets are ǫ-frequent, this will result in significant space saving relative to naı̈ve solutions. The extensive literature on exact mining of frequent itemsets dates back to work of Agrawal et al. [AIS93], whose motivation stemmed from the field of market basket analysis. As the search space for frequent itemsets is exponentially large (i.e., size 2d ), substantial effort was devoted to developing algorithms that rapidly prune the search space and minimize the number of scans through the database. While the algorithms developed in this literature offer substantial concrete speedups over naive approaches to frequent itemset mining, they may still take time 2Ω(d) , simply because there may be these many frequent itemsets. For example, if there is a frequent itemset of cardinality d/10, each of its 2d/10 subsets is also frequent. Motivated by this simple observation, there is now an extensive literature on condensed or non-redundant representations of exact frequent itemsets. Reporting only maximal and closed frequent itemsets often works well in practice, but it still requires exponential size in the worst case (see the survey [CG07]). Irrespective of space complexity, the above methods face computational challenges. Yang [Yan04] determined that counting all frequent itemsets is #P-complete, and a bottleneck for enumeration is that the number of frequent itemsets can be exponentially large. Hamilton et al. [HCW06] provide further hardness results based on parametrized complexity. Here we observe that finding even a single frequent itemset of approximately maximal size is NP-hard. (The authors of [LLSW05] noticed this connection as well but did not mention approximation-hardness.) Consider the bipartite graph containing n nodes (rows) on one side and d nodes (attributes) on the other. An edge exists between the two sides if and only if the row contains the attribute with value 1. Assume there exists a frequent itemset of cardinality ǫn and frequency ǫ. This itemset induces a balanced complete bipartite subgraph with ǫn nodes on each side. Likewise, any balanced complete bipartite subgraph with ǫn nodes per side implies the existence of an itemset of cardinality ǫn and frequency ǫ. Finding the maximal balanced complete bipartite subgraph is NP-hard, and approximating it requires superpolynomial time assuming that SAT cannot be solved in subexponential time [FK04]. Hence, finding an itemset of approximately maximal frequency requires superpolynomial time under the same assumption. 1.1.2 The Case for Itemset Sketches Determining the smallest possible itemset sketches (as defined in § 1.3) is of interest in several data analysis settings. Interactive Knowledge Discovery. Knowledge discovery in databases is often an interactive process: an analyst poses a sequence of queries to the dataset, with later queries depending on the answers to earlier ones [MT96]. For large databases, it may be inefficient or even infeasible to reread the entire dataset every time a query is posed. Instead, a user can keep around an itemset sketch only; this sketch will be much smaller than the original database, while still providing fast and accurate answers to itemset frequency queries. Efficient Data Release. Itemset oracles capture a central problem in data release. Here, a data curator (such as a government agency like the US Census Bureau) wants to make a dataset publicly available. Due to their utility and ease of interpretation, the data format of choice in these settings is typically marginal contingency tables (marginal tables for short). For any itemset T ⊆ [d] with |T | = k, the marginal table corresponding to T has 2k entries, one for each possible setting of the attributes in T ; each entry counts 2 how many rows in the database are consistent with the corresponding setting of the k attributes. Notice that marginal tables are essentially just a list of itemset frequencies for D.2 However, marginal tables can be extremely large (as any k-attribute marginal table has 2k entries and  d there k such tables), and each released table may be downloaded by an enormous number of users. Rather than releasing marginal tables in their entirety, the data curator can instead choose to release an itemset summary. This summary can be much smaller than even a single k-attribute marginal table, while still permitting any user to obtain fast and accurate estimates for the frequency of any k-attribute marginal query. Mitigating Runtime Bottlenecks. While the use of itemset sketches cannot circumvent the hardness results discussed in Section 1.1.1, in many settings the empirical runtime bottleneck is the number of scans through the database, rather than the total runtime of the algorithm. The use of itemset sketches eliminates the need for the user to repeatedly scan or even keep a copy of the original database. The user can instead run a computationally intensive algorithm on the sketch to solve (natural approximation variants) of the hard decision or search problems. Indeed, there has been considerable work in the data mining community devoted to bounding the magnitude of errors that build up as a result of using approximate itemset frequency information when performing more complicated data mining tasks, such as rule identification [MT96]. 1.2 Other Prior Work The idea of producing condensed representations of approximate frequent itemsets is not new. Most relevant to our work, an influential paper by Mannila and Toivonen defined the notion of an ǫ-adequate representation of any class of queries [MT96]. Our For-All-Itemset-Frequency-Estimator sketching task essentially asks for an ǫ-adequate representation for the class of all itemset frequency queries. Mannila and Toivonen analyzed the magnitude of errors that build up when using ǫ-adequate representations to perform more complicated data mining tasks, such as rule identification. Subsequent work by Boulicaut et al. [BBR03] presented algorithms yielding ǫ-adequate representations for the class of all itemset queries, while Pei et al. [PDZH04] gave algorithms for approximating the frequency of all frequent itemsets to error ǫ. Unlike the trivial algorithms that we describe in Section 2, the algorithms presented in [MT96, BBR03, PDZH04] take exponential time in the worst case, and do not come with worst-case guarantees on the size of the output. Streaming algorithms for both exact and approximate variants of frequent itemset mining have also been extensively studied, in a line of work dating back to Manku and Motwani [MM02] — see the survey [CKN08]. None of these works have been able to show that these algorithms use less space than uniform random sampling of database rows, and our results justify why. In particular, to our knowledge there has been no work establishing lower bounds on the space complexity of streaming algorithms for identifying approximate frequent itemsets that are better than the lower bounds that hold for the much simpler approximate frequent items problem (a.k.a. the heavy hitters problem). Note that the lower bounds that we establish in this work apply even to summaries computed by non-streaming algorithms. Related Work by Price [Pri14]. An earlier version of this manuscript by the first three authors [LMT14] gave lower bounds on the size of sketches for frequent itemset mining that are quantitatively weaker than the bounds presented here [LMT14]. In work subsequent to [LMT14], and contemporaneous with the work presented here, Price [Pri14] discovered a short proof of an optimal lower bound for the For-All-ItemsetFrequency-Indicator sketching problem (defined in Section 1.3 below) for itemsets T of size |T | = O(1). We compare our results to Price’s in more detail in Section 3.1. 2 More precisely, itemset frequency queries are equivalent to monotone conjunction queries on a database, while marginal tables are equivalent to general (non-monotone) conjunction queries. 3 1.3 Notation and Problem Statements n Throughout, D ∈ {0, 1}d will denote a binary database consisting of n rows and d columns, or attributes. We denote the set {1, . . . , d} by [d]. An itemset T ⊆ [d] is a subset of the attributes; abusing notation, we also use T to refer to the indicator vector in {0, 1}d whose ith entry is 1 if and only if i ∈ T . We refer to any itemset T with |T | = k as a k-itemset. The ith row of D will be denoted by D(i), and the jth entry of the ith row will be denoted by D(i, j). We say that a row contains an itemset T if the row has a 1 in all columns P in T . The frequency fT (D) of T is the fraction of rows of D that contain T . Alternatively, fT (D) = n1 ni=1 I{T ⊆D(i)} . We use the simplified notation fT instead of fT (D) when the meaning is clear. Note that we may view a row D(i) of D as a one-row database in its own right; hence, fT (D(i)) equals 1 if D(i) contains T , and equals 0 otherwise. We consider four different sketching problems that each capture a natural notion of approximate itemset frequency analysis. All four sketching problems permit randomized sketching algorithms, and require that the sketching algorithm succeeds with high probability. Success can be interpreted in two different ways: (1) with high probability, for all k-itemsets the answer is correct; or (2) for each k-itemset, with high probability the answer is correct (but it may be very unlikely that one can recover accurate estimates for all k-itemsets from the sketch simultaneously). These two different notions of success are often termed, respectively, “for all” and “for each” in the compressed sensing literature [AKW14]. Our first two problem definitions (Definitions 1 and 2) correspond to the “for all” notion, while our latter two problem problem definitions (Definitions 3 and 4) correspond to the weaker “for each” notion. Definition 1 (For-All-Itemset-Frequency-Indicator sketches). A For-All-Itemset-Frequency-Indicator sketch is a tuple (S, Q). The first term S is a randomized sketching algorithm. It takes as input a database D ∈ n {0, 1}d , a precision ǫ, an itemset size k, and a failure probability δ. It outputs a summary S(D, k, ǫ, δ) ∈ s {0, 1} where s is the size of the sketch in bits. The second term is a deterministic query procedure Q : {0, 1}s × {0, 1}d → {0, 1}. It takes as input a summary S and a k-itemset T and outputs a single bit indicating whether T is frequent in D or not. More precisely, for a triple of input parameters (k, ǫ, δ), the following two conditions must hold with probability 1 − δ over the randomness of the sketching algorithm S, for every database D: ∀ k-itemsets T s.t. fT > ǫ, Q(S(D, k, ǫ, δ), T ) = 1, and (1) ∀ k-itemsets T s.t. fT < ǫ/2, Q(S(D, k, ǫ, δ), T ) = 0. (2) Note that if ǫ/2 ≤ fT ≤ ǫ then either bit value can be returned. Definition 2 (For-All-Itemset-Frequency-Estimator sketches). A For-All-Itemset-Frequency-Estimator sketch is a tuple (S, Q). Here S is defined as above but Q : {0, 1}s × {0, 1}d → [0, 1] outputs an approximate frequency. To be precise, the pair (S, Q) is a valid For-All-Itemset-Frequency-Estimator sketch for a triple of input parameters (k, ǫ, δ) if for every database D: Pr[∀ k-itemsets T, |Q(S(D, k, ǫ, δ), T ) − fT | ≤ ǫ] ≥ 1 − δ. (3) Definition 3 (For-Each-Itemset-Frequency-Indicator sketches). A For-Each-Itemset-Frequency-Indicator sketch is identical to a For-All-Itemset-Frequency-Indicator sketch, except that Equations (1) and (2) are replaced with the requirement that for every database D and any (single) k-itemset T : If fT > ǫ, then Q(S(D, k, ǫ, δ), T ) = 1 with probability at least 1 − δ, and If fT < ǫ/2, then Q(S(D, k, ǫ, δ), T ) = 0 with probability at least 1 − δ. 4 Definition 4 (For-Each-Itemset-Frequency-Estimator sketches). A For-Each-Itemset-Frequency-Estimator sketch is identical to a For-All-Itemset-Frequency-Estimator sketch, except that Equation (3) is replaced with the requirement that for every database D and any (single) k-itemset T : Pr[|Q(S(D, k, ǫ, δ), T ) − fT | ≤ ǫ] ≥ 1 − δ. Definition 5. The space complexity of a sketch, denoted by |S(n, d, k, ǫ, δ)|, is the maximum sketch size generated by S for any database with n rows and d columns. That is, |S(n, d, k, ǫ, δ)| = maxD∈({0,1}d )n |S(D, k, ǫ, δ)|. For brevity, we typically omit the parameters (n, d, k, ǫ, δ) when the meaning is clear, and simply write |S| to denote the space complexity of a sketch. 1.4 Techniques At a high level our lower bounds are proven via the standard approach of encoding arguments. That is, to prove that Ω(s) bit sketches are necessary to solve one of the problems above, we construct a distribution over s-bit databases D ∈ ({0, 1}d )s/d such that 1) the entropy of the distribution is Ω(s) and 2) any itemset frequency sketch can be used to reconstruct the database. Thus, the sketch must have size Ω(s) bits in the worst case. For the simplest case of k = 1 and ǫ = 1/3, it is easy to show that Ω(d) bits are necessary to solve every version of the itemset sketching problem, since any non-trivial estimation of the 1-itemset frequencies is sufficient to exactly encode a database consisting of a single row. In order to prove larger space lower bounds for larger values of k and smaller values of ǫ, we must show that if we are given either k-itemset queries for k = ω(1), or sketches with accuracy ǫ = o(1), then we can encode databases consisting of more than one row. To do so, we combine some new arguments with information-theoretic techniques that were previously developed to solve problems in differential privacy [DMNS06]. The problem of constructing differentially private sketches for frequent itemset queries has been studied intensely in recent years (see e.g. [BCD+ 07, KRSU10, De12, GHRU13, TUV12, CTUW14, BUV14]; in these works frequent itemset queries are called monotone conjunction queries and sometimes contingency tables). It turns out that the techniques in these works provide exactly the information-theoretic tools that we need to devise our encoding arguments. Although the connection between the two problems appears coincidental, we believe that information-theoretic tools from the privacy literature may find future applications outside of privacy.3 We now sketch roughly how our encoding arguments work. Suppose we have already proven a lower bound of Ω(s) bits for any sufficiently accurate k-itemset sketch via an encoding argument. For this informal discussion, the precise definition of accuracy will not be important. We then have a high-entropy distribution D on databases D ∈ ({0, 1}d )s/d such that a sufficiently accurate sketch for k-itemset frequency queries on D must encode D. For example, as we discussed above, we can trivially start with a lower bound of d bits for any non-trivial approximation to the 1-itemset queries, although sometimes we will need to start with 3 Indeed, our use of techniques from the privacy literature may not be purely coincidental, as there is a formal (though quantitatively loose) connection between the problems of developing private and non-private sketches for itemset frequency queries. Suppose that there is a way to take any dataset D ∈ ({0, 1}d )n and create a sketch S of s bits that encodes the answer to every itemset query fT (D) to within additive error ±ǫ. Then we can obtain a differentially private sketch that encodes the answers to every query fT (D) to within additive error ǫ + O(s/n) as follows. Output a sketch S with probability proportional to exp(−n · maxT |fT (D) − Q(S, T )|). Our claims that the output S will be differentially private and that with high probability the chosen sketch will have additive error ǫ + O(s/n) can both be proven by an elementary analysis, or by using the fact that this algorithm is a special case of the exponential mechanism [MT07] and thus standard results can be applied. Now, suppose that we had a lower bound saying that any differentially private algorithm must incur error t/n (lower bounds in differential privacy are often of the form t/n for some t independent of n). Then we would immediately obtain a lower bound saying that any ǫ-accurate sketch for itemsets requires s = Ω(t − ǫn) bits. Thus, accuracy lower bounds in differential privacy immediately imply space lower bounds for the associated sketching problem. However, this generic connection rarely leads to bounds that are quantitatively tight. 5 stronger lower bounds. We then obtain a lower bound of Ω(t · s) for any sufficiently accurate sketch for k′ itemset frequency queries using the following amplification technique, inspired by the technique in [BUV14] for amplifying lower bounds in differential privacy. Roughly, the technique allows us to construct a new distribution D ′ on databases D ′ ∈ ({0, 1}2d )ts/d such that any sufficiently accurate sketch for k′ -itemset frequency queries can be used to reconstruct an accurate k-itemset sketch on each of t different draws from the distribution D over ({0, 1}d )s/d . Since we have started by assuming that such a sketch for kitemset frequency queries requires Ω(s) bits, we conclude that any sufficiently accurate sketch of for k′ itemset frequency queries requires Ω(t · s) bits of space. The above outline is overly simplified, and the resulting reconstruction will only be approximate. Thus, we need to make sure that the approximation is good enough for our arguments to go through, especially in some of our bounds that require applying the above amplification arguments twice, where the approximation becomes even weaker. 2 Naı̈ve upper bounds In the following we describe three trivial sketching algorithms. Definition 6 (RELEASE – DB). This algorithm simply releases the database verbatim. In other words, the function S is the identity and Q is a standard database query. The space complexity of RELEASE – DB is clearly |S| = O(nd) and it produces exact estimates for both For-All-Itemset-Frequency-Estimator and For-All-Itemset-Frequency-Indicator sketches and their For-Each analogs. Definition 7 (RELEASE – ANSWERS). This algorithm precomputes and stores the results to all possible queries.  Since there are kd possible k-itemset queries, the space complexity of RELEASE – ANSWERSis |S| =    O( kd ) for For-All-Itemset-Frequency-Indicator sketches and their For-Each analogs, and |S| = O kd log(1/ǫ) for For-All-Itemset-Frequency-Estimator sketches and their For-Each analogs. The extra log(1/ǫ) factor is needed to represent frequencies as floating point numbers up to precision ǫ. Definition 8 (SUBSAMPLE). This algorithm samples rows uniformly at random with replacement from the database. The samples constitute the sketch S(D, k, ǫ, δ). The recovery algorithm Q(S(D), T ) returns the frequency of T in the sampled rows via a standard database query. Lemma 9 (Subsampling). SUBSAMPLE outputs     • a valid For-All-Itemset-Frequency-Indicator sketch of space complexity |S| = O ǫ−1 d log kd /δ ,     • a valid For-All-Itemset-Frequency-Estimator sketch of space complexity |S| = O ǫ−2 d log kd /δ ,  • a valid For-Each-Itemset-Frequency-Indicator sketch of space complexity |S| = O ǫ−1 d log(1/δ) , and  • a valid For-Each-Itemset-Frequency-Estimator sketch of space complexity |S| = O ǫ−2 d log(1/δ) . Proof. Each row sample requires d bits to represent. Thus to prove each of the above statements it suffices to bound the number of row samples required to ensure the accuracy goal. We can do so using standard probabilistic inequalities: Chernoff bounds for sums of independent random variables and union bounds. We will need the following standard forms of the Chernoff bound. 6 Lemma 10. Suppose P X1 , . . . , Xs are independent random {0, 1}-valued random variables with expectation p, and let X = 1s si=1 Xi . Then for any ǫ < 2e − 1, P[X 6∈ [(1 − ǫ)p, (1 + ǫ)p] ≤ 2 exp(−spǫ2 /4). Lemma 11. Suppose P X1 , . . . , Xs are independent random {0, 1}-valued random variables with expectation p, and let X = 1s si=1 Xi . Then for any ǫ < 1, P[X 6∈ [p − ǫ, p + ǫ] ≤ 2 exp(−2sǫ2 ). For-Each-Itemset-Frequency-Indicator sketches: Fix a dataset D and an itemset T and let p = fT (D). Consider drawing s independent uniform random samples of rows D ′ (1), . . . , D ′ (s) with replacement from D. Let D ′ be the database consisting of the s row samples. For i P = 1, . . . , s, define the random variable Xi = 1 if T ⊆ D ′ (i) and 0 otherwise. Let X = fT (D ′ ) = 1s si=1 Xi . Since the samples D ′ (i) are independent, the random variables Xi are independent. Moreover, for every i, E[Xi ] = p, and by linearity of expectation E[X] = p. Then by Lemma 10, we have that P[fT (D ′ ) 6∈ [p/2, 2p]] ≤ 2 exp(−sp/16). The right hand side will be at most δ if s ≥ 16 ln(2/δ)/p for a sufficiently large constant C. From this bound, we can deduce that, for For-Each-Itemset-Frequency-Indicator sketches, it suffices to take s = O(ǫ−1 log(1/δ)) row samples to ensure that the accuracy requirement of Definition 3 is satisfied. For-Each-Itemset-Frequency-Estimator skeches: The setup is the same, except that we apply Lemma 11 instead of Lemma 10 to obtain: P[fT (D ′ ) 6∈ [p − ǫ, p + ǫ]] ≤ 2 exp(−2sǫ2 ). The right hand side will be at most δ if s ≥ ǫ−2 ln(2/δ). Thus, for For-Each-Itemset-Frequency-Estimator sketches it suffices to take s = O(ǫ−2 log(1/δ)) row samples to ensure that the accuracy requirement of Definition 4 is satisfied. For-All-Itemset-Frequency-Indicator sketches: By the analysis above, we know that for any δ′ > 0 and any itemset T , fT (D ′ ) is accurate with probability at least 1 − δ′ if s = O(ǫ−1 log(1/δ′ )). Thus, by a union bound     d d ′ P[∃ T ⊆ [d], |T | = k, fT (D ′ ) is not accurate] ≤ P[fT (D ′ ) is not accurate] ≤ δ. k k   Now, by setting δ′ = δ/ kd , we can see that it suffices to take s = O(ǫ−1 log( kd /δ)) samples to ensure accuracy. For-All-Itemset-Frequency-Estimator sketches: Here we apply the same union bound argument to our analysis of For-Each-Itemset-Frequency-Estimator sketches. We can easily see that it suffices to take s =  O(ǫ−2 log( kd /δ)). For any setting of the parameters (n, d, k, ǫ, δ), the minimal space usage among the above three trivial algorithms constitutes our naı̈ve upper bound for all four sketching problems that we consider, formalized in Theorem 12 below. Theorem 12. (a) For any (k, ǫ, δ), there is a randomized algorithm ∈o ({0, 1}d )n ,  that, n givenany database  D  d d outputs a For-All-Itemset-Frequency-Indicator sketch of size O min nd, k , ǫ−1 d log k /δ . d )n , outputs a (b) For any (k, ǫ, δ), there is a randomized algorithmthat, n given any database D ∈ ({0,  1} o   d d For-All-Itemset-Frequency-Estimator sketch of size O min nd, k log(1/ǫ), ǫ−2 d log k /δ . 7 (c) For any (k, ǫ, δ), there is a randomized algorithm that, ({0, 1}d )n , outputs a  given n any database D ∈ o For-Each-Itemset-Frequency-Indicator sketch of size O min nd, kd , ǫ−1 d log(1/δ) . d n , outputs a (d) For any (k, ǫ, δ), there is a randomized algorithm that,  given n anydatabase D ∈ ({0, 1} ) o For-Each-Itemset-Frequency-Estimator sketch of size O min nd, kd log(1/ǫ), ǫ−2 d log(1/δ) . 3 Lower Bounds In this section, we turn to proving lower bounds on the size of For-All-Itemset-Frequency-Indicator and For-All-Itemset-Frequency-Estimator sketches. Notice that the algorithms RELEASE – ANSWERS and SUB SAMPLE produce sketches whose size is independent of n; hence, it is impossible to prove lower bounds that grow with n. Consequently, we state our lower bounds in terms of the parameters (d, k, 1/ǫ), with all of our lower bounds holding as long as n is sufficiently large relative to these three parameters. This parameter regime — with n a sufficiently large polynomial in d, k, and 1/ǫ — is consistent with typical usage scenarios, where the number of rows in a database far exceeds the number of attributes. In our formal theorem statements, we make explicit precisely how large a polynomial n must be in terms of d, k, and 1/ǫ for the lower bound to hold. Each of our lower bounds also requires d, k, and 1/ǫ to satisfy certain mild technical relationships with d/2  each other — for example, Theorems 13 and 14 require that 1/ǫ < k−1 . In all cases, the assumed technical relationship between the parameters is necessary or close to necessary for the claimed lower bound to hold. d/2  For instance, the Ω(d/ǫ) lower bound of Theorems 13 and 14 is false for 1/ǫ ≫ k−1 , as the algorithm RELEASE – ANSWERS would output a sketch of size o(d/ǫ) in this parameter regime. 3.1 Overview of the Lower Bounds We now formally state all of the lower bounds that we prove, and place our results in context. Throughout this section, we assume that the failure probability δ of the sketching algorithm is a constant less than one. Resolving the complexity of For-Each-Itemset-Frequency-Indicator sketches. The main result stated in this section is a relatively simple Ω(d/ǫ) lower bound for the For-Each-Itemset-Frequency-Indicator sketching problem (Theorem 14 below), which is essentially optimal despite its simplicity. For expository purposes, it will be convenient to first state an analogous lower bound for the (harder) For-All-ItemsetFrequency-Indicator sketching problem. In Section 3.2, we prove the For-All lower bound first, and then explain how to modify the proof to handle the For-Each case. d/2  Theorem 13. Let k ≥ 2. Suppose that 1/ǫ ≤ k−1 , and the failure probability δ < 1 is constant. Then for n ≥ 1/ǫ, the space complexity of any valid For-All-Itemset-Frequency-Indicator sketch is |S(n, k, d, ǫ, δ)| = Ω(d/ǫ). d/2  Theorem 14. Let k ≥ 2. Suppose that 1/ǫ ≤ k−1 , and δ < 1/3. Then for n ≥ 1/ǫ, the space complexity of any valid For-Each-Itemset-Frequency-Indicator sketch is |S(n, k, d, ǫ, δ)| = Ω(d/ǫ). d/2  Theorem 14 is tight whenever it applies (i.e., when 1/ǫ < k−1 ), as it matches the O(d/ǫ) upper bound obtained by the algorithm SUBSAMPLE for the For-Each-Itemset-Frequency-Indicator sketching problem  (see Theorem 12). And the algorithm RELEASE – ANSWERS achieves a summary size of kd for the Ford/2  Each-Itemset-Frequency-Indicator sketching problem, which is asymptotically optimal when 1/ǫ ≥ k−1 and k = O(1). Therefore, Theorems 12 and 14 together precisely resolve the complexity of For-EachItemset-Frequency-Indicator sketches for all values of d and ǫ, when k = O(1). 8 Resolving the complexity of For-All-Itemset-Frequency-Indicator sketches. Theorem 13 is tight for For-All-Itemset-Frequency-Indicator sketches when 1/ǫ is small relative to the other input parameters n or d. In particular, when n = 1/ǫ, RELEASE – DB provides a trivial matching sketch that is O(nd) = d/2  O(d/ǫ) bits in size. In addition, when k = O(1) and 1/ǫ ≥ k−1 , RELEASE – ANSWERS provides a d matching sketch that is O( k ) = O(d/ǫ) bits in size. The tightness of Theorem 13 in these parameter regimes is arguably surprising, as it shows that the For-All-Itemset-Frequency-Indicator sketching problem is equivalent in complexity to its For-Each analog in these regimes. d/2  However, when 1/ǫ ≪ k−1 , Theorem 13 is not tight for For-All-Itemset-Frequency-Indicator sketches, because it has suboptimal dependence on d and k. Our main result for the For-All-Itemset-Frequency Indicator sketching problem establishes a tight lower bound, matching the O(ǫ−1 d log kd ) upper bound for the problem obtained by the algorithm SUBSAMPLE.   d/3 and the failure probability δ < 1 is a Theorem 15. Let k ≥ 3, and suppose that 1/ǫ = O ⌊(k−1)/2⌋ constant. Then for any n ≥ kd log(d/k)/ǫ, the space complexity of any valid For-All-Itemset-FrequencyIndicator sketch is |S(n, k, d, ǫ, δ)| = Ω(kd log(d/k)/ǫ). Comparison to Price’s work. Price independently proved an Ω(d log(d)/ǫ) lower bound on the size of For-All-Itemset-Frequency-Indicator sketches for k ≥ 2 and 1/ǫ ≤ d.99 [Pri14]. This matches the lower bound of Theorem 15 for any k = O(1), but not for k = ω(1). One advantage of Price’s result is that it holds for k = 2 and any value of ǫ satisfying 1/ǫ ≤ d.99 ; in contrast, Theorem 15 holds for k ≥ 3. We remark that our proof of Theorem 15 actually establishes the Ω(d log(d)) lower bound even for k = 2, but our extension of the proof to sub-constant values of ǫ requires k ≥ 3. Essentially resolving the complexity of For-All-Itemset-Frequency-Estimator sketches. Theorem 16 below establishes a lower bound for the For-All-Itemset-Frequency-Estimator sketching problem with a quadratically stronger dependence on 1/ǫ, relative to the linear dependence that is necessary and sufficient for the For-All-Itemset-Frequency-Indicator problem. Our lower bound matches the space usage of SUB SAMPLE (cf. Lemma 9) up to a factor of log(q) (1/ǫ) for any desired constant q > 0, where log(q) denotes the logarithm function iterated q times (e.g. log(3) (x) = log log log(x)).4 Theorem 16. Fix any integer constants c ≥ 2, q ≥ 1, and let δ < 1 be a constant. Let k ≥ c + 1, let d, ǫ satisfy 1/ǫ2 ≤ dc−1 / log(q) (1/ǫ2 ), and let δ < 1 be a constant. Let S be a For-All-Itemset-Frequency-Estimator sketching algorithm capable of answering all k-itemset frequency queries to error D ∈  ±ǫ on databases  n kd log(d/k) d 2 2 {0, 1} for any n > d log(d/k) log (q) (1/ǫ )/ǫ . Then |S(n, d, k, ǫ, δ)| = Ω ǫ2 log (1/ǫ) . (q) For illustration, consider fixing the constants c = q = 10. Then theorem says that for every k ≥ 11, if 1/ǫ = O(d4.5 / log(10) (d)), and the database size n is sufficiently large, then there is a space lower bound of    |S| = Ω kd log(d/k)/ ǫ2 log(10) (1/ǫ) . 4 An anonymous reviewer has pointed out that subsequent work of Van Gucht et al. [GWWZ15, Theorem 6] √ can be combined with our amplification techniques to remove the log (q) (1/ǫ) factor in the bound of Theorem 16, when ǫ > 1/ d; the resulting bound matches the size of √ the sketch produced by SUBSAMPLE up to a constant factor. (Note that Theorem 16 holds even for values of ǫ smaller than 1/ d, whenever k > 3.) In more detail, the proof of [GWWZ15, Theorem 6] implies an Ω(d/ǫ2√ ) lower bound on the size of any For-All-Itemset-Frequency-Estimator sketch answering 99%of all 2-itemset queries, when ǫ > 1/ d. By  combining this result with our amplification techniques, it is possible to prove an Ω kd log(d/k) ǫ2 lower bound on the size of any √ For-All-Itemset-Frequency-Estimator sketch answering all k-itemset queries for k ≥ 3, whenever ǫ > 1/ d. 9 Finally, we use a simple reduction to show that the above theorem also implies a lower bound for the For-Each case, which is optimal up to a factor of log(q) (1/ǫ).5 Theorem 17. Fix any integer constants c ≥ 2, q ≥ 1. Let k ≥ max{3, c + 1}, let d, ǫ satisfy 1/ǫ2 ≤ dc−1 / log(q) (1/ǫ2 ), and let δ < 1/2 be a constant. Let S be an For-Each-Itemset-Frequency-Estimator sketching algorithm capable of answering any (single) k-itemset frequency queries toerror ±ǫ on databases  n D ∈ {0, 1}d for any n > d log(d/v) log (q) (1/ǫ2 )/ǫ2 . Then |S(n, d, k, ǫ, δ)| = Ω ǫ2 log d (1/ǫ) . (q) 3.2 Lower Bound Proofs for Itemset-Frequency-Indicator Sketches 3.2.1 First Lower Bound Proofs: Theorems 13 and 14 We begin by proving our two simplest bounds (Theorems 13 and 14). Recall that the former applies to ForAll-Itemset-Frequency-Indicator sketches, and the latter applies even to their For-Each analogs. The proofs consider databases in which even a single appearance of an itemset already makes it frequent. We show that, unsurprisingly, essentially no compression is possible in this setting. (For simplicity, we assume that 1/ǫ is an integer throughout.) Proof of Theorem 13. Our proof uses an encoding argument. Consider the following family of databases. There will be 1/ǫ possible settings for each row; as n ≥ 1/ǫ, some rows may be duplicated. For expository purposes, we begin by describing the setting with n = 1/ǫ, in which case there are no duplicated rows. The first d/2 columns in each row contain a unique set of exactly k − 1 attributes. The last d/2 attributes in each row are unconstrained. The only minor technicality is that to ensure that each row can receive a unique set d/2  of k − 1 items from the first d/2 attributes, we require 1/ǫ ≤ k−1 . Given a valid For-All-Itemset-Frequency-Indicator or For-All-Itemset-Frequency-Estimator sketch for this database, one can recover all of the values D(i, j) where j ≥ d/2 as follows. For any j ≥ d/2, let Ti,j be a set of k attributes, where the first k − 1 attributes in Ti,j correspond to the k − 1 attributes in the first d/2 columns in the ith row, and the final attribute in Ti,j is j. Notice that Ti,j ∈ D if and only if D(i, j) = 1. Moreover, since n = 1/ǫ we have that fT ≥ ǫ if and only if D(i, j) = 1. Given a valid For-All-ItemsetFrequency-Indicator or For-All-Itemset-Frequency-Estimator sketch for this database, one can iterate over all itemsets Ti,j to recover all the values D(i, j) where j ≥ d/2. Since these are an unconstrained set of d/(2ǫ) bits, the space complexity of storing them (with 1 − Ω(1) failure probability) is Ω(d/ǫ) by standard information theory. For n a multiple of 1/ǫ, we construct a database with 1/ǫ rows as above, and duplicate each row nǫ times; in this case we have fT ≥ ǫ if and only if D(i, j) = nǫ. More generally, when n ≥ 1/ǫ, duplicating each row at least ⌊nǫ⌋ times, we have fT ≥ ǫ if and only if D(i, j) ≥ ⌊nǫ⌋. d/2  αd  We remark that the condition 1/ǫ ≤ k−1 can be relaxed to 1/ǫ ≤ k−1 for any constant α < 1, by a simple modification of the proof. We now extend the argument used to prove Theorem 13 to the For-Each case. Proof of Theorem 14. Recall that in the setting of one-way randomized communication complexity, there are two parties, Alice and Bob. Alice has an input x ∈ X , Bob has an input y ∈ Y, and Alice and Bob both have access to a public random string r. Their goal is to compute f (x, y) for some agreed upon function f : X × Y → {0, 1}. Alice sends a single message m(x, r) to Bob. Based on this message, Bob outputs a bit, which is required to equal f (x, y) with probability at least 2/3. √ Footnote 4 implies that one can remove the log(q) (1/ǫ) factor in the bound of Theorem 17 when ǫ > 1/ d. The resulting bound matches the size of the sketch produced by SUBSAMPLE in this parameter regime up to a constant factor. 5 10 We consider the well-known INDEX function. In this setting, Alice’s input x is an N -dimensional binary vector, Bob’s input y is an index in [N ], and f (x, y) = xy , the y’th bit of x. It is well-known that one-way randomized communication protocols for INDEX require communication Ω(N ) [Abl96]. We show how to use any For-Each-Itemset-Frequency-Indicator sketching algorithm S to obtain a one-way communication protocol for INDEX on vectors of length N = (d/2)·1/ǫ, with communication proportional to |S(n, d, ǫ, k, δ)|. Specifically, let (n, d, k, ǫ, δ) be as in the statement of the theorem. Consider any Boolean vector x ∈ {0, 1}N , where N = (d/2) · 1/ǫ. We associate each index y ∈ [N ] with a unique k-itemset Ty ⊆ [d] of the following form: the first k − 1 attributes in Ty are each in [d/2], and the final attribute in Ty is in {d/2 + 1, . . . , d}. The proof of Theorem 13 established the following fact: given any vector x ∈ {0, 1}N , there exists a database Dx with d columns and n rows satisfying the following two properties for all y ∈ [N ]: xy = 1 =⇒ fTy (Dx ) ≥ ǫ, and xy = 0 =⇒ fTy (Dx ) = 0 < ǫ/2. (4) Hence, we obtain a one-way randomized protocol for the INDEX function as follows: Alice sends to Bob S(Dx , k, ǫ, δ) at a total communication of |S(n, d, ǫ, k, δ)| bits, and Bob outputs Q(S(Dx , k, ǫ, δ), Ty ). It follows immediately from Equation (4) and Definition 3 that Bob’s output equals xy with probability 1−δ. We conclude that |S(n, d, ǫ, k, δ)| = Ω(N ) = Ω(d/ǫ), completing the proof. 3.2.2 A Tight Lower Bound for For-All-Itemset-Frequency-Indicator Sketches: Proof of Theorem 15 Our proof of Theorem 15 is inspired by an approach from [BUV14] for “bootstrapping” two weak privacy lower bounds into a stronger lower bound. Proof of Theorem 15. We begin by proving an Ω(kd log(d/k)) lower bound for ǫ = 1/50 and every k ≥ 2 (the specific choice ǫ = 1/50 is for convenience; the lower bound holds for any suitably small constant). We then use the ideas underlying the proof of Theorem 14 to extend the lower bound to sub-constant values of ǫ, for any k ≥ 3. The case of ǫ = 1/50. We begin by recalling a basic combinatorial fact about k-itemset frequency queries on databases with d attributes. Fact 18. For any k′ ≥ 1, let v = k′ · log(d/k′ ). There exist strings x1 , . . . , xv ∈ {0, 1}d such that for every string s ∈ {0, 1}v , there is a k′ -itemset Ts such that fTs (xi ) = si for all i ∈ [v]. Proof of Fact 18. It is well-known that the set of k′ -itemset frequency queries (equivalently, k′ -way monotone conjunction queries), when evaluated on d-bit vectors (i.e., on d-attribute database rows), has VC dimension at least k′ · log(d/k′ ). The desired strings x1 , . . . , xv are simply the shattered set whose existence is guaranteed by having VC dimension v. It is also not difficult to directly construct the shattered set; we provide such a direct construction in Appendix A for completeness. Let k′ = k − 1, let v = (k − 1) log(d/(k − 1)), and let x1 , . . . , xv ∈ {0, 1}d be the strings promised by Fact 18. Let y1 , . . . , yv ∈ {0, 1}d be an arbitrary set of v strings of length d. We will show how to construct a database D with v rows and 2d columns such that, with probability at least 1−δ, at least 96% of the dv bits in (y1 , . . . , yv ) can be reconstructed from any For-All-Itemset-Frequency-Indicator sketch S(D, k, 1/50, δ). This will imply an Ω(dv) space lower bound. Specifically, define row i of D to be D(i) := (xi , yi ). That is, the first d bits in D(i) are equal to xi and the last d bits are equal to yi . 11 (5) The key observation behind the reconstruction of the yi ’s is that, given exact answers to all k-way itemset frequency queries, one can compute the inner product between the last d columns of D and any desired vector. Moreover, it is easy to see that, given sufficiently many inner products, any column of D can be exactly reconstructed. However, For-All-Itemset-Frequency-Indicator sketches do not provide exact answers to itemset frequency queries; they merely indicate whether the frequency of an itemset is larger than ǫ or smaller than ǫ/2. Nonetheless, we show that in order to reconstruct 96% of the bits in any given column of D, it is enough to know, for sufficiently many vectors, whether the inner product of the column with the vector is larger than ǫ = 1/50 or smaller than ǫ/2 = 1/100. In more detail, fix a column j ∈ {d + 1, . . . , 2d}. Let t := (y1,j , . . . , yv,j ) ∈ {0, 1}v be the bits in this column of D. Fix a string s in {0, 1}v , and for any j ∈ [d], let Ts,j = Ts ∪ {j}, where Ts is defined as in Fact 18. We claim that the correct answer to the itemset frequency query fTs,j (D) is hs, ti/v. To see this, notice that by the definition of D (Equation (5)), Ts,j is contained in any row i of D such that si = yij = 1, and Ts,j is not contained in any other rows. Hence, fTs,j (D) = v1 |{i : si = 1, yij = 1}| = hs, ti/v. It follows that any For-All-Itemset-Frequency-Indicator sketch S of D that provides answers with error parameter ǫ = 1/50 for all k-itemsets, provides a bit bs for every s ∈ {0, 1}v such that the following holds: bs = 1 if hs, ti/v > ǫ, and bs = 0 if hs, ti/v < ǫ/2. The following lemma implies that we can use the bs values to reconstruct a vector t′ that is close to t in Hamming distance. Lemma 19. Suppose for every s ∈ {0, 1}v , we are given a bit bs satisfying bs = 1 if hs, ti/v > ǫ, and bs = 0 if hs, ti/v < ǫ/2. Let t′ ∈ {0, 1}v be any vector that is consistent with all of the bs values, in the sense that hs, t′ i/v > ǫ for all s such that bs = 1, and hs, t′ i/v < ǫ/2 for all s such that bs = 0. Then the Hamming distance between t and t′ is at most v/25. Proof of Lemma 19. Consider any vector t′ ∈ {0, 1}v such that t and t′ differ in more than v/25 fraction of bits. Then there must a set of coordinates S ⊆ [v] of size at least v/50 such that at least one of the two conditions is satisfied: (a) t′j = 1 and tj = 0 for all j ∈ S, or (b) t′j = 0 and tj = 1 for all j ∈ S. Assume without loss of generality that Condition (a) is satisfied (the proof in the case that Condition (b) is satisfied is analogous). Consider the vector s ∈ {0, 1}v that is the indicator vector of S. Then hs, ti = 0, so bs = 0. However, hs, t′ i ≥ v/50. This implies that t′ is not consistent with the value bs returned by the For-All-Itemset-Frequency-Indicator sketch, proving the lemma. Lemma 19 implies that, for any k ≥ 2, given the For-All-Itemset-Frequency-Indicator sketch S(D, k, 1/50, δ), we can recover at least 96% of the bits of (y1 , . . . , yv ) with probability at least 1 − δ. Suppose we let (y1 , . . . , yv ) be the error-corrected encoding of a vector (y1′ , . . . , yz′ ) ∈ {0, 1}z , using a code with constant rate that is uniquely decodable from 4% errors (e.g. using a Justesen code [Jus72]). Then z = Ω(v), and it follows from the above that (y1′ , . . . , yz′ ) can be exactly reconstructed from S(D, k, 1/50, δ) with probability at least 1 − δ. Hence, S(D) allows for exact reconstruction of z = Ω(dv) arbitrary bits with probability 1 − δ. Basic information theory then implies that |S| = Ω(dv) = Ω (kd log(d/k)). The case of ǫ = o(1). For any k ≥ 3, suppose that we are given a For-All-Itemset-Frequency-Indicator sketching algorithm S that is capable of answering For-All-Itemset-Frequency-Indicator queries with error parameter ǫ for all k-itemsets. For simplicity, we assume k is odd. At a high level, we show that, given 1 m = 50ǫ independent databases Di , each with v rows and 2d columns, we can construct a single “larger” database D with mv rows and 3d columns such that the following holds: for every Di , S(D, k, ǫ, δ) can be used to answer all For-All-Itemset-Frequency-Indicator queries on Di with error parameter ǫ′ = 1/50 for all (k + 1)/2-itemsets. Since we have assumed k ≥ 3, it holds that (k + 1)/2 ≥ 2; hence, we can apply our earlier analysis to conclude that any such summary for Di contains Ω (kd log(d/k)) bits of information, in the sense that it can encode an arbitrary bit vector of this length. It follows that S(D, k, ǫ, δ) contains Ω (kd log(d/k)/ǫ) bits of information, proving the theorem. Details follow. 12 Let T1 , . . . , Tm ⊆ [d] be distinct ((k − 1)/2)-itemsets (note that as in the proof of Theorem 13, we d can indeed choose m such Ti ’s as long as 1/ǫ < (k−1)/2 ). Now consider any m independent databases D1 , . . . , Dm , each with v rows and 2d columns. We construct a new (mv) × 3d database D by appending the d-bit indicator vector of Ti to each row of Di , and letting D be the concatenation of all of the resulting databases. For each Ti , let T ′ ⊆ [3d] be defined via Ti′ = {j + 2d : j ∈ Ti }. That is, Ti′ is simply T “shifted” to operate on the final d of the 3d attributes over which the “larger” database D is defined. Let T ∗ ⊆ [2d] be any (k + 1)/2-itemset, and for each i ∈ [m], let Ti∗ ⊆ [3d] be the k-itemset defined via: Ti∗ = T ∗ ∪ Ti′ . Observe that fT ∗ (Di ) = m · fTi∗ (D ′ ). Hence, fTi∗ (D) > ǫ if and only if fT ∗ (Di ) > 1/50, and fTi∗ (D) < ǫ/2 if and only if fT ∗ (Di ) < 1/100. That is, one can use S(D, k, ǫ, δ) to answer all For-All-Itemset-FrequencyIndicator queries on Di with error parameter 1/50 for all k-itemsets (this holds simultaneously for all i with probability 1 − δ). By the argument for the case ǫ = 1/50, this implies that S(D, k, ǫ, δ) can be used to losslessly encode an arbitrary vector of length Ω(d · v · m) = Ω((kd log(d/k)/ǫ), and thus |S(D, k, ǫ, δ)| = Ω ((kd log(d/k)/ǫ)). This completes the proof of Theorem 15. 4 Lower Bounds Proofs for Itemset-Frequency-Estimator Sketches 4.1 The For-All Case: Proof of Theorem 16 4.1.1 Informal Overview of the Proof For constant k′ ≥ 2, an Ω̃(d/ǫ2 ) lower bound on the size of For-All-Itemset-Frequency-Estimator sketches follows fairly directly from existing work in the literature on differential privacy (cf. Kasiviswanathan et al. [KRSU10]; we refer to this work as KRSU). The idea of KRSU’s result is the following. Itemset frequency queries are a linear class of queries, in the sense that we can represent any database as a vector z (in which each entry of z corresponds to a possible record in {0, 1}d and its value is the number of such records in the database), and the vector of answers to all k′ -itemset frequency queries on z can be written as Az for some matrix A. Given a vector y of approximate answers to these queries, on can try to reconstruct z via the approximation ẑ = A−1 y, where A−1 denotes the Moore-Penrose pseudo-inverse of A (this is essentially reconstruction via L2 -distance minimization). If the matrix A has a “nice” spectrum, then it is possible to bound the distance between ẑ and z. If this distance is small enough, then any description of y contains many bits of information, since it essentially encodes an entire database z. However, KRSU do not actually look at the matrix A corresponding to k′ -itemset frequency queries. ′ Instead, they look at a matrix M (k ) they define as follows. Consider a database D with n rows and k′ columns, where the first k′ − 1 columns of D are generated at random. For any fixed setting of the first k′ − 1 columns, the vector of answers to k′ -itemset frequency queries on D are a function only of column ′ k′ of D. Denoting column k′ of D by x, these answers can be written in the form M (k ) x, for a particular ′ matrix M (k ) derived from the first k′ − 1 columns of D. ′ KRSU show that M (k ) behaves a lot like a matrix with truly random entries from {0, 1}, and hence has a “nice” spectrum (with high probability over the random choice of the first k′ − 1 columns of D). This −1 ensures that √ x̂ = A y is a “good” approximation to the last column x of D as long as all answers in y have′ error ǫ . n. Put another way, if the error in the answers is ǫ, then it is possible to reconstruct column k of D as long as the number of rows is at most (roughly) 1/ǫ2 . This shows that one can use a summary providing ǫ-approximate answers to all k ′ -itemset frequency queries on a database with k′ columns and 1/ǫ2 rows to reconstruct Ω̃(1/ǫ2 ) arbitrary bits. It is possible to extend this argument to databases with d + k′ − 1 columns and Ω̃(1/ǫ2 ) rows, yielding a Ω̃(d/ǫ2 ) lower bound on the size of For-All-Itemset-Frequency-Estimator sketches for such databases. 13 Our main contribution for the For-All-Itemset-Frequency-Estimator problem is to combine such an Ω̃(d/ǫ2 ) lower bound for sketches for k′ -way marginals with a technique for “amplifying” the lower bound to Ω̃(k · log(d/k) · d/ǫ2 ) for (k + k ′ )-way marginal queries (we used essentially the same amplification technique, which was inspired by work of Bun et al. [BUV14] in the context of differential privacy, in Section 3.2.2). This technique says that, given v = k · log(d/k) databases D1′ , ..., Dv′ , each with d + k′ − 1 columns and 1/ǫ2 rows, we can construct a bigger database D such that one can use ǫ-approximate answers to all (k + k′ )-way marginal queries on D to obtain ǫ-approximate answers to the k′ -way marginals on every database Di′ . This amplification technique actually requires the Ω̃(d/ǫ2 ) lower bound for k′ -way marginals to hold even if the answer vector y only has error ǫ “on average”, rather than having error at most ǫ for every single answer. Hence, we cannot directly use the KRSU lower bound in our argument. In fact, to reconstruct a database from answers that have error at most ǫ only “on average”, one cannot use L2 distance minimization as in KRSU’s lower bound argument, since L2 -minimization is highly sensitive to a few answers having large error. Fortunately, De [De12] shows how to use L1 -minimization to establish an Ω̃(1/ǫ2 ) lower bound even in the setting in which answers are only required to have error at most ǫ “on average”. We use his techniques to obtain a lower bound suitable for our argument. 4.1.2 Proof Details In the context of differential privacy, De [De12], building on [KRSU10, Rud12], described an algorithm for reconstructing a database D, given sufficiently accurate answers to all k-itemset frequency queries on D. In our terminology, De’s result establishes that any For-All-Itemset-Frequency-Estimator-sketch can be used to losslessly encode Ω( ǫ2 log d (1/ǫ) ) bits of information. Here log(q) (·) denotes the logarithm function iterated (q) q times. Formally, we use the following slight refinement of De’s result. Lemma 20 (Variant of Theorem 5.12 of [De12]). For any constant integers k ≥ 2 and q ≥ 1, there exists a constant γ = γ(k, q) > 0 and a distribution µ over k-itemset queries such that the following holds. Let d and ǫ be parameters satisfying 1/ǫ2 ≤ dk−1 / log(q) (1/ǫ2 ). Suppose S is any summary algorithm that can answer a 1 − γ fraction of all k-itemset frequency queries under µ on databases with d columns to error ±ǫ. Then there exists a b = b(d, ǫ) = Ω(d/ǫ2 log(q) (1/ǫ)), an n = n(d, ǫ) = O(log(q) (d)/ǫ2 ), a database-generation y ∈ {0, 1}b and outputs a database n algorithm A that takes as input′ a Boolean vector d ′ A(y) ∈ {0, 1} , and a decoding algorithm A such that A outputs y with high probability given S(A(y)). We prove Lemma 20 in Appendix B.   Lemma 20 alone is enough to yield a lower bound of Ω d/ǫ2 log(q) (1/ǫ) on the size of For-AllItemset-Frequency-Estimator sketches capable of answering all k-itemset frequency queries to error ±ǫ, for any of this section is to “bootstrap” this result to obtain a lower bound of  k ≥ 2. The technical contribution  2 Ω kd log(d/k)/ǫ log(q) (1/ǫ) bits, which improves over the bound that follows from a direct application of Lemma 20 even for k = 3. This lower bound is essentially optimal, matching the O(kd log(d/k)/ǫ2 ) upper bound achieved by algorithm SUBSAMPLE up to a log(q) (1/ǫ) factor (for an arbitrarily large constant q). Proof of Theorem 16. Let v = (k − c) log(d/(k − c)) and x1 , . . . , xv ∈ {0, 1}d be the strings promised by Fact 18 applied with k′ = k − c. Recall that for every vector s ∈ {0, 1}v , there is a (k − c)-itemset Ts such that fTs (xi ) = si for all i ∈ [v]. Recall that c ≥ 2 is a parameter of the theorem. Let γ = γ(c, q) be the constant in Lemma 20. Fix ǫ′ = 100ǫ/γ. Suppose that we are given v strings n y1 , . . . , yv ∈ {0, 1}b , where b = b(d, ǫ′ ) is as in Lemma 20 for k = c. Let A(yi ) = Di ∈ {0, 1}d , 14 where A is the database generation algorithm promised by Lemma 20. We show how to construct a single “large” database D with 2d columns and nv rows such that 96% of the bits of y1 , . . . , yv can be recovered from S(D, k, ǫ, δ). Note that Lemma 20 applies, since c ≥ 2. Also note that γ is indeed a constant since we required that c and q are constants; therefore ǫ′ = O(ǫ). Definition of D. Recall that Di (j) denotes the jth row of Di . Define Di′ to be the database with 2d columns and n rows defined via Di′ (j) = (xi , Di (j)). That is, Di′ is obtained from Di by appending the string xi to the front of every row. We define D to be the concatenation of all of the Di′ databases. We index the vn rows of D as (i, j) : i ∈ [v], j ∈ [n]. Reconstructing y1 , . . . , yv from S(D). For any c-itemset query T ⊆ [d], let zT denote the vector zT = (fT (D1 ), . . . , fT (Dv )). Let s ∈ {0, 1}v be any vector. Define T ′ = T ′ (T, s) ⊆ [2d] to be the k-itemset whose indicator vector is the concatenation of the indicator vectors of Ts and T ; that is, T ′ := Ts ∪ {j + d : j ∈ T }. We claim that v1 hs, zT i = fT ′ (s,T ) (D). To see this, note that T ′ is contained in row (i, j) of D if and only if si = 1 and T is contained in row j of Di . Hence, X 1 1 hs, zT i = · fT (Di ) (6) v v i∈[v]:si =1 = 1X 1 |{j ∈ [n] : T is contained in Di (j)}| v n (7) i∈[v] = 1 nv X (i,j)∈[v]×[n] |{T ′ is contained in row (i, j) of D}| (8) = fT ′ (T,s) (D). (9) Hence, from any For-All-Itemset-Frequency-Estimator sketch S(D, k, ǫ, δ), one can compute for every c-itemset T , an estimate fˆT ′ (T,s) satisfying |fˆT ′ (T,s) − v1 hs, zT i| ≤ ǫ. The following lemma describes why these estimates are useful in reconstructing y1 , . . . , yv . Lemma 21. Fix a c-itemset T ⊂ [d]. Given values fˆT ′ (s,T ) satisfying |fˆT ′ (s,T ) − v1 hs, zT i| ≤ ǫ for all s ∈ {0, 1}v , it is possible to identify a vector ẑT ∈ [0, 1]v satisfying 1v kẑT − zT k1 ≤ 4ǫ. Proof. Consider the algorithm that outputs any vector ẑT ∈ [0, 1]v satisfying the following property: For all s ∈ {0, 1}v , 1 hẑT , si − fˆT ′ (s,T ) ≤ ǫ. v (10) Note that at least one such vector always exists, because setting ẑT = zT satisfies Equation (10). Thus, the algorithm always produces some output. We claim that any ẑT output by the algorithm satisfies v1 kẑT − zT k1 ≤ 4ǫ. Indeed, suppose otherwise. (1) (2) Define s(1) ∈ {0, 1}v via si = 1 if and only if ẑT,i ≥ zT,i and s(2) ∈ {0, 1}v via si  = 1 if and only if zT,i > ẑT,i . Then either v1 hẑT , s(1) i − hzT , s(1) i > 2ǫ, or v1 hẑT , s(2) i − hzT , s(2) > 2ǫ. Assume without loss of generality that the former case holds. Then  1 1 1 hẑT , s(1) i − hzT , s(1) i − hzT , si − fˆT ′ (s,T ) > 2ǫ − ǫ = ǫ, hẑT , s(1) i − fˆT ′ (s(1) ,T ) ≥ v v v where the inequality holds by the triangle inequality. But this contradicts the assumption that ẑT satisfies (10). 15 For each c-itemset T , let ẑT be as in Lemma 21. We think of ẑT,i as an estimate of zT,i = fT (Di ). Lemma 21 guarantees that for any distribution µ over c-itemsets T , this estimate has error at most 4ǫ on average, when the averaging is done over a random c-itemset T chosen according to µ, and databases Di . In symbols: X X ET ←µ Ei∈v |ẑT,i − zT,i | = µ(T ) (Ei∈v |ẑT,i − zT,i |) ≤ µ(T ) · 4ǫ ≤ 4ǫ. T T Here, ET ←µ denotes the expectation operation when T is chosen according to the distribution µ, and the penultimate inequality holds by Lemma 21. By Markov’s inequality we conclude that for at least 96% of the databases Di , the estimates ẑT,i have error at most 100ǫ on average, where the averaging is over the choice of T according to distribution µ. That is, for at least 96% of databases Di , it holds that ET ←µEi∈v |ẑT,i − zT,i | ≤ 100ǫ. (11) For any Di satisfying Equation (11) and any γ > 0, another application of Markov’s inequality implies that the |ẑT,i − fT (Di )| ≤ 100ǫ/γ = ǫ′ for a 1 − γ fraction of all c-itemsets T under distribution µ. By Lemma 20, this implies that yi can be exactly recovered from the ẑT,i values, using algorithm A′ . Since 96% of the yi vectors can be exactly recovered, it follows that at least 96% of the bv total bits in the vectors of y1 , . . . , yv can be recovered. Suppose we let the bv bits in the collection of vectors (y1 , . . . , yv ) be the error-corrected encoding of a single vector (y1′ , . . . , yz′ ) ∈ {0, 1}z , using a code with constant rate that is uniquely decodable from 4% errors (e.g. using a Justesen code [Jus72]). Then z = Ω(bv), and it follows from the above that (y1′ , . . . , yz′ ) can be exactly reconstructed from S(D, k, ǫ, δ) with probability 1 − δ. Basic information theory then implies that ! ! kd log(d/k) kd log(d/k) |S(D, k, ǫ, δ)| = Ω(bv) = Ω =Ω 2 , (ǫ′ )2 log(q) (1/(ǫ′ )) ǫ log(q) (1/ǫ) where we have used the fact that ǫ′ = O(ǫ). This completes the proof of the theorem. 4.2 The For-Each Case: Proof of Theorem 17 Recall that Theorem 17 establishes a lower bound against For-Each-Itemset-Frequency-Estimator sketches that is tight up to a log(q) (d) factor. We prove Theorem 17 via a simple argument that shows how to transform any For-Each-Itemset-Frequency-Estimator sketch into a For-All-Itemset-Frequency-Estimator sketch with a modest increase in space. This allows us to transform Theorem 16 into the claimed lower bound against For-Each-Itemset-Frequency-Estimator sketches. Proof of Theorem 17. Suppose that we are given an For-Each-Itemset-Frequency-Estimator sketching algorithm S using space |S|. We  show how to transform S into a For-All-Itemset-Frequency-Estimator sketching  d ′ algorithm S using space O |S| · log k = O (|S(k, ǫ, δ)| · k · log(d/k)). It then follows from Theorem   16 that |S| = Ω ǫ2 log d (1/ǫ) . (q)    The For-All-Itemset-Frequency-Estimator sketching algorithm S ′ simply outputs 10 · log kd /δ inde   pendent copies of S(D) (i.e., using fresh randomness for each of the 10 · log kd /δ runs of S). Given any k-itemset T , the query procedure Q′ associated with S ′ simply runs the query procedure Q associated with S on each of the copies of S(D), and outputs the median of the results. Since each copy of S outputs an estimated frequency that has error at most ǫ with probability 1 − δ > 1/2, standard Chernoff Bounds 16 imply that for any fixed k-itemset T , the median estimate will have error at most ǫ with probability at least d d 1 − δ/ k . A union bound implies that the median estimate will have error at most ǫ for all k itemsets with probability at least 1 − δ. Thus, S ′ is a For-All-Itemset-Frequency-Estimator sketching algorithm with failure probability at most δ. 5 Conclusion We introduced four closely related notions that capture the problem of approximating itemset frequencies in databases. For all four problems, we studied the minimal size of sketches that permit a user to recover sufficiently accurate information about itemset frequencies. After identifying three naive algorithms that apply to all four problems, we turned to proving sketch size lower bounds. Our results establish that random sampling achieves optimal or essentially optimal sketch size for all four problems. This stands in contrast to several seemingly similar problems, such as identifying approximate frequent items in data streams, and various matrix approximation problems, for which uniform sampling is not an optimal sketching algorithm. We proved our lower bounds by adapting and extending techniques developed in the literature on differentially privacy data analysis. It is an interesting open question whether there are other problems in non-private data analysis that can be resolved using techniques from the literature on differential privacy. In addition, our lower bound arguments specify a “hard” distribution over databases, for which it is impossible to improve upon the space usage of the uniform sampling sketching algorithm for answering approximate itemset frequency queries. But real-world databases are likely to be substantially more structured than the databases appearing in our hard distribution, and real-world query loads are likely to be highly non-uniform. In these settings, importance sampling is a natural candidate for improving upon the space usage of the uniform sampling sketching algorithm. It would be interesting to identify rigorous yet realistic conditions on databases and query loads that allow for such an improvement. Subsequent work by Lang et al. [LLS16] takes some initial steps in this direction. Acknowledgements. The authors are grateful to Amit Chakrabarti, Graham Cormode, Nikhil Srivastava, and Suresh Venkatasubramanian for several helpful conversations during the early stages of this work. References [Abl96] Farid M. Ablayev. Lower bounds for one-way probabilistic communication complexity and their application to space complexity. Theor. Comput. Sci., 157(2):139–159, 1996. [AIS93] Rakesh Agrawal, Tomasz Imieliński, and Arun Swami. Mining association rules between sets of items in large databases. SIGMOD Rec., 22(2):207–216, 1993. [AKW14] Alexandr Andoni, Robert Krauthgamer, and David P. Woodruff. The sketching complexity of graph cuts. CoRR, abs/1403.7058, 2014. [BBR03] Jean-François Boulicaut, Artur Bykowski, and Christophe Rigotti. Free-sets: A condensed representation of boolean data for the approximation of frequency queries. Data Min. Knowl. Discov., 7(1):5–22, 2003. [BCD+ 07] Boaz Barak, Kamalika Chaudhuri, Cynthia Dwork, Satyen Kale, Frank McSherry, and Kunal Talwar. Privacy, accuracy, and consistency too: a holistic solution to contingency table release. In Leonid Libkin, editor, PODS, pages 273–282. ACM, 2007. 17 [BUV14] Mark Bun, Jonathan Ullman, and Salil Vadhan. Fingerprinting codes and the price of approximate differential privacy. In Proceedings of the 46th Annual ACM Symposium on Theory of Computing, STOC ’14, pages 1–10, New York, NY, USA, 2014. ACM. [CG07] Toon Calders and Bart Goethals. Non-derivable itemset mining. Data Min. Knowl. Discov., 14(1):171–206, February 2007. [CKN08] James Cheng, Yiping Ke, and Wilfred Ng. A survey on algorithms for mining frequent itemsets over data streams. Knowl. Inf. Syst., 16(1):1–27, 2008. [CTUW14] Karthekeyan Chandrasekaran, Justin Thaler, Jonathan Ullman, and Andrew Wan. Faster private release of marginals on small databases. In Moni Naor, editor, ITCS, pages 387–402. ACM, 2014. [De12] Anindya De. Lower bounds in differential privacy. In Ronald Cramer, editor, TCC, volume 7194 of Lecture Notes in Computer Science, pages 321–338. Springer, 2012. [DMNS06] Cynthia Dwork, Frank McSherry, Kobbi Nissim, and Adam Smith. Calibrating noise to sensitivity in private data analysis. In Theory of Cryptography, Third Theory of Cryptography Conference, TCC 2006, New York, NY, USA, March 4-7, 2006, Proceedings, pages 265–284, 2006. [FK04] Uriel Feige and Shimon Kogan. Hardness of approximation of the Balanced Complete Bipartite Subgraph problem. Technical Report MCS04-04, Weizmann Institute of Science, 2004. [GHRU13] Anupam Gupta, Moritz Hardt, Aaron Roth, and Jonathan Ullman. Privately releasing conjunctions and the statistical query barrier. SIAM J. Comput., 42(4):1494–1520, 2013. [GWWZ15] Dirk Van Gucht, Ryan Williams, David P. Woodruff, and Qin Zhang. The communication complexity of distributed set-joins with applications to matrix multiplication. In Tova Milo and Diego Calvanese, editors, Proceedings of the 34th ACM Symposium on Principles of Database Systems, PODS 2015, Melbourne, Victoria, Australia, May 31 - June 4, 2015, pages 199–212. ACM, 2015. [HCW06] Matthew Hamilton, Rhonda Chaytor, and Todd Wareham. The parameterized complexity of enumerating frequent itemsets. In Proceedings of the Second International Conference on Parameterized and Exact Computation, IWPEC’06, pages 227–238, Berlin, Heidelberg, 2006. Springer-Verlag. [Jus72] J. Justesen. A class of constructive asymptotically good algebraic codes. IEEE Transactions on Information Theory, 18(5):652–656, 1972. [KRSU10] Shiva Prasad Kasiviswanathan, Mark Rudelson, Adam Smith, and Jonathan Ullman. The price of privately releasing contingency tables and the spectra of random matrices with correlated rows. In STOC, pages 775–784, 2010. [LLS16] Kevin Lang, Edo Liberty, and Konstantin Shmakov. Stratified sampling meets machine learning, 2016. Manuscript. Available at http://www.cs.yale.edu/homes/el327/papers/lls15.pdf. [LLSW05] Jinyan Li, Haiquan Li, Donny Soh, and Limsoon Wong. A correspondence between maximal complete bipartite subgraphs and closed patterns. In PKDD, PKDD’05, pages 146–156, Berlin, Heidelberg, 2005. Springer-Verlag. 18 [LMT14] Edo Liberty, Michael Mitzenmacher, and Justin Thaler. Space lower bounds for itemset frequency sketches. CoRR, abs/1407.3740, 2014. [MM02] Gurmeet Singh Manku and Rajeev Motwani. Approximate frequency counts over data streams. In Proceedings of the 28th International Conference on Very Large Data Bases, VLDB ’02, pages 346–357. VLDB Endowment, 2002. [MT96] Heikki Mannila and Hannu Toivonen. Multiple uses of frequent sets and condensed representations. In KDD, 1996. [MT07] Frank McSherry and Kunal Talwar. Mechanism design via differential privacy. In Proceedings of the 48th Annual IEEE Symposium on Foundations of Computer Science, FOCS ’07, pages 94–103, Washington, DC, USA, 2007. IEEE Computer Society. [PDZH04] Jian Pei, Guozhu Dong, Wei Zou, and Jiawei Han. Mining condensed frequent-pattern bases. Knowl. Inf. Syst., 6(5):570–594, 2004. [Pri14] Eric Price. Optimal lower bound for itemset frequency indicator sketches. abs/1410.2640, 2014. [Rud12] Mark Rudelson. Row products of random matrices. Advances in Mathematics, 231(6):3199 – 3231, 2012. [TUV12] Justin Thaler, Jonathan Ullman, and Salil P. Vadhan. Faster algorithms for privately releasing marginals. In Artur Czumaj, Kurt Mehlhorn, Andrew M. Pitts, and Roger Wattenhofer, editors, ICALP (1), volume 7391 of Lecture Notes in Computer Science, pages 810–821. Springer, 2012. [Yan04] Guizhen Yang. The complexity of mining maximal frequent itemsets and maximal frequent patterns. In KDD, KDD ’04, pages 344–353, New York, NY, USA, 2004. ACM. A CoRR, Proof of Fact 18 We provide a direct construction of the vectors whose existence is guaranteed by Fact 18, restated here for convenience. Fact 18. For any k′ ≥ 1, let v = k′ · log(d/k ′ ). There exist strings x1 , . . . , xv ∈ {0, 1}d such that for every string s ∈ {0, 1}v , there is a k′ -itemset Ts such that fTs (xi ) = si for all i ∈ [v]. ′ Proof of Fact 18. For expository purposes, we first describe a set of vectors w1 , . . . , wk′ ∈ {0, 1}k that are ′ “shattered” by k′ -itemset frequency queries, i.e., for every string s ∈ {0, 1}k , there is a k′ -itemset Ts such that fTs (yi ) = si for all i ∈ [k′ ]. We then describe a set of vectors y1 , . . . , ylog d ∈ {0, 1}d that are shattered even by 1-itemset frequency queries. Finally, we explain how to “glue together” the wi ’s and yi ’s to obtain the full set x1 , . . . , xv ∈ {0, 1}d whose existence is claimed in the statement of Fact 18. ′ Description of the wi ’s. For each i ∈ [k′ ], define wi ∈ {0, 1}k via: ( wi,j = 1 : 1 ≤ j ≤ k′ , j 6= i wi,j = 0 j=i ′ To restate the above in matrix notation, we define the k′ × k′ matrix W (k ) whose rows are the wi ’s via: 19 ′ W (k ) ′ w1 w2 .. . 0 1 1 ...   1 0 1 . . .   . . .  = . . . :=    . . . ... w ′  1 1 1 . . . k −1 wk′ 1 1 1 ...     1 1 1 1 .. ..   . . 0 1 1 0 For any string s ∈ {0, 1}k , let Ts := {i : si = 0}. It is straightforward to check that fTs (wi ) = si as desired. Description of the yi ’s. For each i ∈ [log d], we define each yi ∈ {0, 1}d to ensure that the matrix whose rows are the yi ’s contains every possible log(d)-bit string as a column. In matrix notation, we define the log(d) × d matrix Y (d) via: Y (d) y1 y2 .. . 0 0 0 ...  0 0 0 . . .   . . .   = . . . :=   . . . ...   0 0 1 . . . y log(d)−1 0 1 0 ... ylog d     1 1 1 1 .. ..   . . 1 1 0 1 For any string s ∈ {0, 1}log d , we interpret s as the binary representation of an integer int(s) ∈ {0, . . . , d − 1}, and define Ts := {int(s)}. It is straightforward to check that fTs (yi ) = si as desired. Description of the xi ’s. Recall that v = k′ · log(d/k′ ). Consider the v × d matrix X whose rows are the xi ’s. We view this matrix as a collection of sub-matrices, where each sub-matrix has dimension k′ × (d/k ′ ). More specifically, let J denote the k′ × (d/k′ ) matrix of all-ones. We define X to be the matrix obtained ′ ′ from W (d/k ) by replacing each entry of W (d/k ) that is equal to 1 with the matrix J, and replacing each ′ ′ entry of W (d/k ) that is equal to 0 with the matrix Y (d/k ) . In more detail, define:   Y (d/k′ )  J J ... J J x1 ′ J Y (d/k ) J . . . J J   x2     .   ..  .. .. .. .. = . X :=   .  . . ... .  .   .  ′) x ′   (d/k J J J ... Y J  k −1 ′ xk ′ J J J ... J Y (d/k ) Given any vector s ∈ {0, 1}v , we interpret s as specifying k′ integers ℓ1 , . . . , ℓk′ ∈ {0, . . . , d/k′ } in the natural way. We view [d] as the cross-product [k′ ] · [d/k′ ], and associate each j ∈ [d] with a pair (r1 , r2 ) ∈ [k′ ] × [d/k ′ ] in the natural way. We then define Ts := {(i, ℓi ) : i ∈ [k′ ]}. It is then straightforward to observe that fTs (xi ) = si . B Proof of Lemma 20 We restate Lemma 20 for convenience, before providing its proof. Lemma 20. (Refinement of Theorem 5.12 of [De12]) For any constant integers k ≥ 2 and q ≥ 1, there exists a constant γ = γ(k, q) > 0 and a distribution µ over k-itemset queries such that the following holds. Let d and ǫ be parameters satisfying 1/ǫ2 ≤ dk−1 / log(q) (1/ǫ2 ). Suppose S is any summary algorithm that can answer a 1 − γ fraction of all k-itemset frequency queries under µ on databases with d columns to error ±ǫ. Then there exists a b = b(d, ǫ) = Ω(d/ǫ2 log(q) (1/ǫ)), an n = n(d, ǫ) = O(log(q) (d)/ǫ2 ), a 20 database-generation y ∈ {0, 1}b and outputs a database n algorithm A that takes as input′ a Boolean vector ′ d A(y) ∈ {0, 1} , and a decoding algorithm A such that A outputs y with high probability given S(A(y)). As Lemma 20 is a refinement of Theorem 5.12 of De’s work [De12], the presentation of our proof borrows heavily from De’s. Proof. We begin by defining the Hadamard product of matrices. Definition 22 (Hadamard product of matrices). Let A1 , . . . , As ∈ Rℓi ×n . Then, the Hadamard product of A1 , . . . , As is denoted by A = A1 ◦ A2 ◦ · · · ◦ As ∈ RL×n , where L = ℓ1 · · · · · ℓs and is defined as follows: Every row of A is identified with a unique element of [ℓ1 ] × · · · × [ℓs ]. For i = (i1 , . . . is ), define A[i, h] = s Y Aj [ij , h] j=1 where A[i, h] represents the element in row i and column h of A. We will also require the definition of Euclidean sections, which play an important role in the analysis of LP decoding algorithms. Definition 23 (Euclidean Sections). V ⊆ Rz is said to be a (δ, d′ , z) Euclidean Section if V is a linear subspace of dimension d′ and for every x ∈ V , the following holds: √ √ zkxk2 ≥ kxk1 ≥ δ zkxk2 . ′ A linear operator A : Rd → Rz is said to be δ-Euclidean if the range of A is a Euclidean (δ, d′ , z) section. The following lemma follows directly from the proof of [De12, Lemma 5.9]. Lemma 24 (Reformulation of Lemma 5.9 of [De12]). Let d0k−1 > n. Suppose there exist Boolean matrices A1 , . . . , Aℓ−1 ∈ Rd0 ×n such that A = A1 ◦ A2 ◦ · · · ◦ Ak−1 , all the singular values of A are at least σ, and the range of A is a (δ, n, d0k−1 )-Euclidean section. Let D0 denote the database with n rows and (k − 1) · d0 columns obtained from the Ai ’s as follows: the jth row of D0 is the concatenation of the jth row of each of the matrices AT1 , AT2 , . . . , ATk−1 . Let A1 denote the database generation algorithm that takes as input a Boolean vector y ∈ {0, 1}n , and outputs the database D1 (y) with n rows and d1 := (k − 1) · d0 + 1 columns obtained from D0 by appending an additional column equal to y. Then, there exists a constant γ1 = γ1 (δ) > 0, a distribution µ1 over q k-itemsets T ⊆ [d1 ], and a √ reconstruction algorithm R satisfying the following. Fix any ζ1 ∈ o( nσ/ d1k−1 ). Suppose R is given D0 and approximate itemset frequencies fˆT for all k-itemsets T ⊆ [d1 ]. Let S1 denote the set of all k-itemsets P T satisfying n · |fˆT − fT (D2 (y))| ≤ ζ1 , and suppose that T ∈S1 µ(T ) ≥ 1 − γ1 . Then R outputs a vector ŷ of Hamming distance o(n) from y. We use Lemma 24 to establish the following stronger statement. Lemma 25. Let A1 , . . . , Ak−1 , δ, D0 , µ1 , d0 , d1 , n, γ1 , and ζ1 be as in Lemma 24. There is a b = b(d0 , n) ∈ Ω(d0 · n) and database generation algorithm A2 that takes as input a Boolean vector y ′ ∈ {0, 1}b , and outputs a database D2 with n rows and d2 := (k − 1) · d0 + d0 = k · d0 columns such that the following holds. There exists a constant γ2 = γ2 (δ) > 0, a distribution µ2 over k-itemsets T ⊆ [d2 ], and a reconstruction algorithm R2 satisfying the following. Suppose R2 is given D0 and approximate itemset frequencies fˆT for all k-itemsetsP T ⊆ [d2 ]. Let S2 denote the set of all k-itemsets T satisfying n · |fˆT − fT (D2 (y ′ ))| ≤ ζ1 , and suppose that T ∈S2 µ2 (T ) ≥ 1 − γ2 . Then R2 outputs y ′ . 21 Proof. Let A2 be the database generation algorithm that takes as input a Boolean vector y ′ ∈ {0, 1}b , and first replaces y ′ with an error-corrected encoding Enc(y ′ ) ∈ {0, 1}d0 ·n of y ′ , using an error-correcting code of constant rate that is uniquely decodable from 2% errors. A2 then outputs the database D2 (y ′ ) with n rows and d2 columns obtained from D0 by appending d0 additional columns, with the first additional column equal to the first n bits of Enc(y ′ ), the second additional column equal to the second n bits of Enc(y ′ ), and so on. We refer to the d0 attributes corresponding to these additional columns as special attributes. Similarly, we call an itemset T ⊆ [d2 ] special if T contains exactly one special attribute. For each i ∈ [d0 ], let y (i) ∈ {0, 1}n denote the vector (Enc(y ′ )(i−1)·n+1 , . . . , Enc(y ′ )i·n ); that is, y (i) is the ith “block” of n bits from Enc(y ′ ). Let D1 (y (i) ) be as in the statement of Lemma 24. Note that D1 (y (i) ) is a sub-database of D2 (y ′ ), in the sense that D1 (y (i) ) equals D2 (y ′ ) with several columns removed. Hence, for any k-itemset T1 ⊆ [d1 ], there is a unique itemset gi (T1 ) ⊆ [d2 ] such that fT1 (D1 (y (i) )) = fgi (T1 ) (D2 (y ′ )). Notice that gi (T1 ) is a special itemset, for any i and T1 . Moreover, the gi ’s are all invertible: for any special itemset T2 ⊆ [d2 ], there is a unique itemset h(T2 ) ⊆ [d1 ] and a unique i satisfying gi (h(T2 )) = T2 . Let γ2 = γ/100. We define the distribution µ2 over k-itemsets T ⊆ [d2 ] as follows. ( 0 if T is not special. µ2 (T ) = (1/d0 ) · µ1 (h(T )) if T is special. As per the hypothesis of the lemma, suppose R2 is given D0 and approximate itemset frequencies fˆT for all k-itemsets P T ⊆ [d2 ]. Let S2 denote the set of all k-itemsets T satisfying n · |fˆT − fT (D2 (y ′ ))| ≤ ζ1 , and suppose that T ∈S2 µ2 (T ) ≥ 1 − γ2 . The recovery algorithm R2 will reconstruct y ′ by first constructing a vector y ′′ ∈ {0, 1}d0 ·n such that the fractional Hamming distance between y ′′ and Enc(y ′ ) is at most .02, and then running the decoding algorithm for the error-correcting code on y ′′ . R2 constructs the vector y ′′ as follows. For each i ∈ [d0 ], R2 constructs the i’th block of n bits of y ′′ by simulating R1 on D1 (y (i) ) in the natural way: whenever R1 ′′ ′′ ) to the vector ŷ output requests a value fˆT1 , R2 returns the value fgi (T1 ) . R2 then sets (y(i−1)·n+1 , . . . , yi·n by R1 . Showing y ′′ is close to Enc(y ′ ) in Hamming distance. For each special attribute i, let S1,i denote the set of itemsets T ⊆ [d2 ] in Range(gi ) satisfying n · |fˆT − fT (D2 (y ′ ))| ≤ ζ1 . Since a 1 − γ2 fraction of the ′ ˆ estimates fˆP T under µ2 satisfy n · |fT − fT (D2 (y ))| ≤ ζ1 , Markov’s inequality implies that 99% of the i’s satisfy T ∈S1,i µ2 (T )/d0 ≥ 1 − 100γ2 = 1 − γ1 . Lemma 24 implies that for each such i, the ith ′′ ′′ ), will have Hamming distance o(n) from the ith block of block output by R2 , namely (y(i−1)·n+1 , . . . , yi·n ′ ′′ Enc(y ). Hence, y has fractional Hamming distance at most .01 + o(1) ≤ .02 from Enc(y ′ ). Rudelson [Rud12] proved the existence of matrices A1 , . . . , Ak−1 satisfying the conditions of Lemmas 24 and 25. Lemma 26 (Rudelson [Rud12], see also Theorem 5.11 of [De12]). Let q, k be constants. Also, let ν ∼ ′ Rd ×n be a distribution over matrices such that every entry of the matrix is an independent and unbiased {0, 1} random variable. Let A1 , . . . , Ak−1 be i.i.d. copies of random matrices drawn from the distribution ν and A be the Hadamard product of A1 , . . . , Ak−1 . Then, provided that dk−1 = o(n log(q) (n)), with  √ dk−1 . probability 1 − o(1), the smallest singular value of A, denoted by σn (A), satisfies σn (A) = Ω Also, the range of A is a (γ(q, ℓ), n, dk−1 ) Euclidean section for some γ(q, ℓ) > 0. Combining Lemmas 26 and Lemma 25, we obtain the following lemma. 22 Lemma 27. For any positive constants q, k, and any pair d0 , n > 0 satisfying n log(q) (n) < d0k−1 , there is a b = b(d0 , n) ∈ Ω(d0 · n) and database generation algorithm A2 that takes as input a Boolean vector y ∈ {0, 1}b , and outputs a database D2 with n rows and d2 := (k − 1) · d0 + d0 = k · d0 columns such that the following holds. There exists a constant γ2 = γ2 (k, q) > 0, a distribution √ µ2 over k-itemsets T ⊆ [d2 ], and a reconstruction algorithm R2 satisfying the following. Let ζ1 = n/ log(q+1) (n). Suppose R2 is given D0 and approximate itemset frequencies fˆT for all k-itemsets T ⊆ [d2 ]. Let S2 denote the set of all k-itemsets T P satisfying n · |fˆT − fT (D2 (y ′ ))| ≤ ζ1 , and suppose that T ∈S2 µ2 (T ) ≥ 1 − γ2 . Then R2 outputs y ′ . √ Remark: Note that Lemma 27 actually holds for any ζ1 = o( n); we choose a particular ζ1 that makes the lemma particularly convenient to apply in our context. For any ǫ > 0, suppose we set n = 1/(ǫ2 · log(q) (n)) in the statement of Lemma 27. This causes q √ ζ1 /n to equal 1/( n · log(q+1) (n)) = ǫ log(q) (n)/ log(q+1) (n) > ǫ. Hence, we conclude that an For-AllItemset-Frequency-Estimator sketch that can answer all k-itemset frequency queries with error bounded by ǫ provides sufficiently accurate itemset frequency estimates fˆT to apply Lemma 27 with n = 1/(ǫ2 ·log(q) (n)), and Lemma 20 follows. 23
8cs.DS
arXiv:1506.06420v2 [math.AC] 5 Apr 2016 THE MONOMIAL CONJECTURE AND ORDER IDEALS II S. P. DUTTA Abstract. Let I be an ideal of height d in a regular local ring (R, m, k = R/m) of dimension n and let Ω denote the canonical module of R/I. In this paper we first prove the equivalence of the following: the nonvanishing of the edge homomorphism ηd : Extn−d (k, Ω) → Extn R (k, R), R the validity of the order ideal conjecture for regular local rings, and the validity of the monomial conjecture for all local rings. Next we prove several special cases of the order ideal conjecture/monomial conjecture. 1. Introduction This paper is a sequel to our work in [9]. Let us first state the two conjectures that would constitute the central theme of this article. Monomial Conjecture. (M. Hochster) Let (R, m) be a local ring of dimension n and let x1 , x2 , . . ., xn be a system of parameters of R. Then, for every t+1 t > 0, (x1 x2 · · · xn )t ∈ / (xt+1 1 , . . . , xn ). Order Ideal Conjecture. (Due to Evans and Griffith) Let (R, m) be a local ring. Let M be a finitely generated module of finite projective dimension over R and let Syzi (M ) denote the i-th syzygy of M in a minimal free resolution F• of M over R. If α is a minimal generator of Syzi (M ), then the ideal OSyzi (M ) (α), generated by entries of α in Fi−1 , has grade greater than or equal to i for every i > 0. We note that the validity of the assertion for OSyzi (M ) (α) as defined above is equivalent to the validity of the assertion that the order ideal for α(= {f (α)|f ∈ HomR (Syzi (M ), R)}) has grade greater than or equal to i for every i > 0. Both these conjectures are open in mixed characteristic. A brief account of these and other equivalent conjectures is provided towards the end of this introduction. In this paper we focus our attention on several aspects of the order ideal conjecture over regular local rings and its connection with the monomial conjecture. As a consequence of the order ideal conjecture Bruns and Herzog [2] observed the following: AMS Subject Classification: Primary: 13D02, 13D22 Secondary: 13C15, 13D25, 13H05 1 2 S. P. DUTTA Let (R, m, k = R/m) be a regular local ring and let I be an ideal of height d ≥ 0 with a minimal set of generators {xi }1≤i≤t . Let K• (x, R) denote the Koszul complex corresponding to {xi }. Then θi : Ki (x; R) ⊗ k → TorR i (R/I, k) are 0-maps for i > d. In one of our main results [9, Corollary 1.4 ] we proved that if, for any d ≥ 0 and for any almost complete intersection ideal I = (x1 , . . . , xd , xd+1 ) of height d in a regular local ring R, θd+1 : Kd+1 (x; R)⊗ k → TorR d+1 (R/I, k) is the 0-map, then the monomial conjecture is valid for all local rings. Equivalently, we showed that if the canonical module Ω of R/I is such that Syzd (Ω) has a free summand for d > 0, then the monomial conjecture is valid [9, Section 1.6]. The non-vanishing of θd+1 for almost complete intersection ideals refers to a very special case of the consequence of the order ideal conjecture. In the light of the significance of this special case mentioned above, the following question emerged: How “special” is this special case? We are now able to answer this question in the first theorem of this paper. Theorem 2.1. The following statements are equivalent: (1) The order ideal conjecture is valid over any regular local ring R. (2) For every ideal I of R of height d > 0, the d-th syzygy in a minimal free resolution of the canonical module of R/I has a free summand. (3) The same statement as in (2) for every prime ideal of R. (4) For every almost complete intersection ideal I of height d > 0, with I = (x1 , . . . , xd+1 ), the map θd+1 : Kd+1 (x; R) ⊗ k → TorR d+1 (R/I, k) is the 0-map. Thus, the very special case of a consequence of the order ideal conjecture, as mentioned above in (4), implies the order ideal conjecture over regular local rings. For our next theorem, we need the following set up. Let (R, m, k) be a regular local ring of dimension n and let I be an ideal of height d. From the associativity property of Hom and tensor product, we obtain two spectral sequences with E2i,j terms ExtiR (k, ExtjR (R/I, R)) and ExtiR (TorR j (k, R/I), R) that converge to the same limit. Since the height of I = d, we have ExtjR (R/I, R) = 0 for j < d. When i + j = n we obtain the “edge” hon−d (k, Extd (R/I, R)) → ExtnR (k, R). We note that in momorphism ηd : ExtR this case, the second spectral sequence collapses to the limit ExtnR (k, R). The obvious question is : when is ηd 6= 0? Our next Theorem answers this question by relating it with two of the most important homological conjectures in commutative algebra. Theorem 2.2. The following statements are equivalent: (1) For every regular local ring R of dimension n and for any ideal I of n−d (k, Extd (R/I, R)) height d of R, the edge homomorphism ηd : ExtR → ExtnR (k, R) is non-zero. (2) The same statement where I is replaced by a prime ideal P of R. THE MONOMIAL CONJECTURE AND ORDER IDEALS II 3 (3) The order ideal conjecture is valid over regular local rings. (4) The monomial conjecture is valid for all local rings. The proof of this theorem takes into account our previous work on the canonical element conjecture in [5] and [6]. This theorem places the order ideal conjecture over regular local rings at a central position among several homological conjectures. It also shows that the statement of the order ideal conjecture over local rings presents a much stronger assertion than that of the monomial conjecture over local ones. We refer the reader to [10] for our work involving the general case of the order ideal conjecture. A very special case of “(1) → (4)” in the above theorem was established in [6] over Gorenstein local rings. As a corollary of Theorem 2.2 we obtain the following result which this author has been seeking since his work in [6]. Theorem 2.3. Let (R, m, k) be an equicharacteristic regular local ring of dimension n. Let I be an ideal of R of height d. Then the edge homomorphism n−d (k, Extd (R/I, R)) → ExtnR (k, R) is non-zero. ηd : ExtR In Section 3 we present proofs of several aspects of the order ideal conjecture (we do not mention the results in [9] here). In our first theorem of this section we prove the following: Theorem 3.1. Let M be a finitely generated module over a regular local ring R such that M satisfies Serre-condition S1 and M is equidimensional. Let d be the codimension of M . Then minimal generators of Syzi (M ) with i ≥ d satisfies the order ideal conjecture. In our next proposition we consider a special generator of Syzi (M ) and show that when such a generator exists, the restriction of finite projective dimension is not required. We prove the following: Let M be a finitely generated module over a Cohen-Macaulay ring. Let α be a minimal generator of Syzi (M ), i ≥ 1, such that it generates a free summand of Syzi (M ). Then grade OSyzi (M ) (α) ≥ i. Our next theorem points out the connection between Syzd (R/P ) and Syzd (Ω) in terms of having a free summand. Theorem 3.3. If P is a prime ideal of height d in a regular local ring R such that Syzd (R/P )) has a free summand, then Syzd (Ω), where Ω is the canonical module of R/P , also has a free summand. n−d (k, R/P ) → As a corollary we derive that the direct limit map ExtR n−d Hm (R/P ) is non-null and hence R/P satisfies a stronger version of the monomial conjecture. In our final theorem of this paper we prove the following: Theorem 3.4. Let R be a regular local ring and let P be a prime ideal of height d. Let ν(Ω) denote the minimal number of generators the canonical module Ω of R/P . If ν(Ω) = 2 and R/P satisfies Serre-condition S4 , then Syzd (Ω) has a free summand. 4 S. P. DUTTA As a corollary we derive the following: Let A be a complete local domain satisfying Serre-condition S4 . Suppose ν(Ω) = 2. Then A satisfies the monomial conjecture. We would remind the reader that the validity of the monomial conjecture when ν(Ω) = 1 and A satisfies Serre-condition S3 has already been established in [6]. Let us now provide a brief history. In [18] Hochster proved the monomial conjecture in equicharacteristic and proposed it as a conjecture for local rings in mixed characteristic. He also showed that this conjecture is equivalent to the direct summand conjecture which asserts the following: Let R be a regular local ring and let i : R → A be a module finite extension. Then i splits as an R-module map. In the eighties in order to prove their syzygy theorem [13, 14, 15] Evans and Griffith proved an important aspect of order ideals of syzygies over equicharacteristic local rings. The order ideal conjecture stated in this article originates from their work. For their proof of the syzygy theorem Evans and Griffith [13] actually needed a particular case of the above conjecture: M is locally free on the punctured spectrum and R is regular local. They reduced the proof of the above special case to the validity of the improved new intersection conjecture (also introduced by them) which asserts the following: Let (A, m) be a local ring of dimension n. Let F• be a complex of finitely generated free A- modules. F• : 0 → Fs → Fs−1 → · · · → F1 → F0 → 0, such that ℓ(Hi (F• )) < ∞ for i > 0 and H0 (F• ) has a minimal generator annihilated by a power of the maximal ideal m. Then dimension of A ≤ s. Evans and Griffith proved this conjecture for equicharacteristic local rings by using the existence of big Coehn-Macaulay modules in equicharacteristic due to Hochster [19]. In the mid-eighties, Hochster proposed the canonical element conjecture. In this conjecture Hochster assigned a canonical element ηR to every local ring R and asserted that ηR 6= 0. An equivalent statement, due to Lipman, of the canonical element conjecture that would be relevant to our work is the following: let (A, m, k = A/m) be a local ring of dimension n which is homomorphic image of a Gorenstein ring. Let Ω denote the canonical module of A. Then the direct limit map n ExtnA (k, Ω) → Hm (Ω) is non-zero [20]. Hochster proved this conjecture in equicharacteristic [20] and showed that the canonical element conjecture is equivalent to the monomial conjecture and it implies the improved new intersection conjecture. Later this author proved the reverse implication [3]. Thus the monomial conjecture implies a special case of the order ideal conjecture: the case when M is locally free on the punctured spectrum of R and R is regular local. Over the years different aspects of the monomial conjecture have been studied, special THE MONOMIAL CONJECTURE AND ORDER IDEALS II 5 cases have been proved and new equivalent forms have been introduced (see [1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 16, 17, 21, 22, 23]). Notation. Throughout this work “local” means noetherian local. For any R-module N , N ∗ stands for HomR (N, R) and given any R-linear map f : M → N between two R-modules, f ∗ : M ∗ → N ∗ denote the dual map obtained by applying Hom(−, R) to f : M → N . Similar notations would be used for maps between two complexes of R-modules. Section 2 . Theorem 2.1. Let (R, m, k) be a regular local ring. The following statements are equivalent: (1) The order ideal conjecture is valid on R. (2) Given any positive integer d > 0, for every ideal I of height d in R, the d-th syzygy in a minimal free resolution of the canonical module of R/I has a free summand. (3) For every prime ideal of P of height d in R, the d-th syzygy in a minimal free resolution of the canonical module of R/P has a free summand. (4) For every almost complete intersection ideal I of height d, with I = (x1 , . . . , xd , λ), {x1 , . . . , xd } being an R-sequence, the natural map : Kd+1 (x1 , . . . , xd , λ; R) ⊗ k → TorR d+1 (R/I, k) is the 0-map. Proof. We will prove that (1) ⇒ (2) ⇒ (3) ⇒ (1) and (1) ⇒ (4) ⇒ (3). (1) ⇒ (2). Let φd+1 φ1 φ (F• , φ• ) :→ Rtd+1 → Rtd →d Rtd−1 → · · · → Rt1 → R → R/I → 0 be a minimal projective resolution of R/I over R. Let Gi = coker(φ∗i ) and let F•∗ denote the following truncated part of HomR (F• , R): φ∗ ∗ F•∗ : 0 → R →1 Rt1 → · · · → Rtd → Rtd+1 → Gd+1 → 0. ∗ ∗ We have H i (F•∗ ) = 0 for i < d, H d (F•∗ ) = Ω - the canonical module of R/I. Let j : Ω ֒→ Gd denote the natural inclusion of Extd (R/I, R) ֒→ Gd . Let ψ (L• , ψ• ) :→ Rγd →d Rγd−1 → · · · → Rγ0 → Ω → 0 be a minimal free resolution of Ω and j• : L• → F•∗ denote a left of j. Claim. jd (Rγd ) = R. Proof of the Claim. If possible let jd (Rγd ) ⊂ m. The mapping cone V• of j• is a free resolution of Gd+1 . Since jd (Rγd ) ⊂ m, in the minimal free resolution U• of Gd+1 extracted from V• , the copy of R at the (d + 1) − th spot of F•∗ survives. Since height I = d and the coordinates of φ∗1 are the minimal generators of I, the above statement implies that Syzd+1 (Gd+1 ) 6 S. P. DUTTA has a minimal generator whose entries generate an ideal of height d. This contradicts the order ideal conjecture. Hence jd (Rγd ) = R. We can now choose a basis e1 , . . . , eγd of Rγd such that jd (e1 ) = 1 and jd (ei ) = 0 for i > 1. Due to the commutativity of diagram in j• : L• → F•∗ , ψd+1 Rγd+1 −−−−→   y Rγd  j yd 0 −−−−→ R is contained in the free submodule generated by it follows that ψd+1 {ei }i≥2 . Hence Syzd (Ω) has a free summand. (2) ⇒ (3) is obvious. (3) ⇒ (1). Let M be a finitely generated R-module and let Si denote the i-th syzygy of M in a minimal free resolution (F• , φ• ) of M over R. Since R is an integral domain, the assertion of the order ideal conjecture is valid for minimal generators of S1 . So we can assume d > 1. Let (F• , φ• ) be given by (Rγd+1 ) φd+1 φ φ1 F• :→ Rtd+1 → Rtd →d Rtd−1 → · · · → Rt1 → Rt0 → M → 0. Let e, {ei }1≤i≤td −1 be a basis of Rtd and let φd (e) = (a1 , a2 , . . . , atd−1 ). We denote by I the ideal generated by a1 , . . . , atd−1 and let P be a minimal prime ideal of I such that height(P ) = height(I). If possible let height(I) = height(P ) < d. By induction, since Sd = Syzd−1 (S1 ), we can assume the height of P = (d − 1). Let Ω(= Extd−1 (R/P, R)) denote the canonical module of R/P . Let (P• , ψ• ) denote a minimal free resolution of R/P and let F•∗ denote the ∗ truncated part of HomR (F• , R) up to the d-th spot. Let η0 : Rtd → R be given by η0 (e∗ ) = 1 and η0 (e∗i ) = 0 for i > 0. Then im η0 ◦ φ∗d ⊂ P and hence η0 induces a map η : Gd = coker φ∗d → R/P . Let η• : F•∗ → P• denote a lift of η. We have the following commutative diagram. (1) F•∗ : 0 // Rt∗0 P• :  d // Rsd η φ∗1 // · · · // Rt∗d−1  ψ // Rsd−1 d−1// · · ·  1 // Rs1 ψd // Rt∗1 φ∗d η // Rt∗d η0 ψ1  // R // Gd // 0 η  // R/P // 0 ed−1 = coker ψ ∗ ; then Ω is a submodule of G ed−1 . Applying HomR (−, R) Let G d−1 ed−1 → S1 = to (1), we obtain η•∗ : P•∗ → F• which induces a map η ′ : G 1 Syz (M ). Since R is regular local, height (P ) = grade (P ) = (d − 1) and hence Ω = Extd−1 (R/P, R) 6= 0. Since Ω is annihilated by P and S1 is torsion free (submodule of Rt0 ), we have η ′ (Ω) = 0. By our assumption, Syzd−1 (Ω) has a free summand. Let (L• , a• ), Li = Rγi , denote a minimal free resolution of e) Ω. Let {e e, eei } with 1 ≤ i ≤ γd−1 − 1 be a basis of Rγd−1 such that ad−1 (e d−1 γ d generates a free summand of Syz (Ω). Then ad (R ) is contained in the ei }1≤i≤γd−1 . Hence a∗d (e e∗ ) = 0, where free submodule of Rγd−1 generated by {e THE MONOMIAL CONJECTURE AND ORDER IDEALS II 7 ∗ {e e∗ , ee∗i } denote the corresponding dual basis of Rrd−1 . We now want to make the following claim. Claim. im ee∗ ǫ Extd−1 (Ω, R) = HomR (Ω, Ω)(= HomR/P (Ω, Ω)) is the identity element idΩ in HomR (Ω, Ω) (or a unit times idΩ ). Proof of the Claim. We can choose x1 , . . . , xd−1 ∈ P , an R-sequence, such that P RP = (x1 , . . . , xd−1 )RP . Hence the primary decomposition of (x1 , . . . , xd−1 ) can be written as P ∩ q2 ∩ · · · ∩ qr where qi is Pi -primary, height(Pi ) = d − 1, 2 ≤ i ≤ r. Let S = R/(x1 , . . . , xd−1 ). Then (0) = P ∩q2 ∩· · ·∩qr , where ν means the image of ν in S, is a primary decomposition of (0) in S. It can be easily checked that ΩR/P = the canonical module of R/P = Extd−1 R (R/P, R) = HomS (S/P , S) = q 2 ∩ · · · ∩ q r . Let K• (x; R) denote the Koszul complex corresponding to x1 , ..., xd−1 . Let α e : S → coker a∗d−1 be defined by α e(1) = imẽ∗ and let α• : K• (x; R) → L∗• be a lift of α e. Applying Hom(−, R) to α• , as above, we obtain a map α∗• : L• → K • (x; R) which yields a map α : Ω → S. Since Ω is a submodule of R/P , for any µ in Ω, Ω/(µ) has codimension ≥ d. Hence α is injective. α Consider the short exact sequence : 0 → Ω → S → S/Ω → 0. d−1 By construction ExtR (S/Ω, R) = HomS (S/Ω, S) = P . Applying HomR (−, R) or HomS (−, S) to the above exact sequence we obtain an ∗ injection βe : R/P = S/P ֒→ HomS (Ω, Ω) = Extd−1 R (Ω, R) ⊂ coker ad−1 such ∗ e =idΩ =ime e . Hence the claim. that β(1) Now let us consider βe : R/P ֒→ Extd−1 (Ω, R) ⊂ coker a∗d−1 . Let β•∗ : ∗ ∗ (1) = e e∗ , denote a lift of P• → L∗• , where βi∗ : Rsi → Rγd−1−i and βd−1 e Since Ω is the canonical module of R/P , coker βe has grade ≥ d + 1. It β. follows that the corresponding dual map β : Ω = Extd−1 (coker a∗d−1 , R) = ed−1 is an isomorExtd−1 (Extd−1 (Ω, R), R) → Extd−1 (R/P, R) = Ω ⊂ G ∗ ∗ phism. Hence applying Hom(−, R) to β• : P• → L• , we obtain β• : L• → P•∗ , ed−1 , such that βd−1 (e a lift of β : Ω ֒→ G e) = 1 and βd−1 (e ei ) = 0, 1 ≤ i ≤ γd−1 . Thus we obtain the following commutative diagram. L• : (2) P•∗ :0 // Rγd−1  βd−1 // R η0∗ F• : ad−1  // Rtd // Rγd−2 // · · · // Rγ0  // Rs∗1 // · · ·  // Rs∗d−1  // Rtd−1 ∗ ηd−1 // · · ·  // Rt1 // Ω  β // 0 // G ed−1 // 0  // S1 ֒→ Rt0 // M η′ // 0 ed−1 → S1 is induced by η ∗ . where η ′ : G d−1 Since η•∗ ◦ β• is a lift of η ′ ◦ β = 0, η•∗ ◦ β• is homomorphic to 0. By e) = e, which is part of a basis of Rtd . Since both construction η0∗ ◦ βd−1 (e F• , L• are minimal free resolutions, this leads to a contradiction. Hence height(I) ≥ d. 8 S. P. DUTTA (1) ⇒ (4). This has already been mentioned as a special case of a consequence of the order ideal conjecture [2]. (4) ⇒ (3). We first note that by Corollary 1.6 in [9] the statement in (4) is equivalent to the following: let Ω denote the canonical module of R/I where I is an almost complete intersection ideal of height d. Then Syzd (Ω) has a free summand. Let P be a prime ideal of height d. We can choose x1 , . . . , xd ∈ P , an R-sequence, such that P RP = (x1 , . . . , xd )RP . Hence the primary decomposition of (x1 , . . . , xd ) can be written as P ∩ q2 ∩ · · · ∩ qr where qi is Pi -primary, height(Pi ) = d, 2 ≤ i ≤ r. Let S = R/(x1 , . . . , xd ). Then (0) = P ∩ q2 ∩ · · · ∩ qr , where ν means the image of ν in S, is a primary decomposition of (0) in S. It can be easily checked that ΩR/P = the canonical module of R/P = ExtdR (R/P, R) = HomS (S/P , S) = q 2 ∩ · · · ∩ qr . S Let us choose λ ∈ P − i≥2 Pi . Then ΩS/λS = HomS (S/λS, S) = HomS (S/P , S) = ΩR/P . Thus, the almost complete intersection ideal (x1 , . . . , xd , λ) ⊂ P is such that ΩR/(x1 ,...,xd ,λ) = ΩR/P . Hence Syzd (ΩR/P ) has a free summand.  Corollary. Let (R, m, k) be a regular local ring. For the validity of the order ideal conjecture it is enough check the validity of the assertion for minimal generators of Syzd+1 (M ) for any finitely generated R-module M of codimension d ≥ 0, in particular for cyclic modules R/I where I is an almost complete intersection ideal of height d. . 2.2 Let (R, m, k) be a local ring of dimension n and let I be an ideal of R of grade d. Due to the associativity property of Hom and tensor product we obtain two spectral sequences converging to the same limit whose E2i,j i j terms are: ExtiR (TorR j (k, R/I), R) and ExtR (k, Ext (R/I, R)). j Since grade of I = d, Ext (R/I, R) = 0 for j < d. Thus, the standard edge homomorphism reduces to: ExtiR (k, Extd (R/I, R)) → (i + d)-th limit. When R is a regular local ring of dimension n and i + j = n, this limit is ExtnR (k, R) and the first E2i,j mentioned above collapses to this term. In this situation the following question is raised: when is the edge homomorphism n−d (k, Extd (R/I, R)) → ExtnR (k, R) non-zero? Our next theorem ηd : ExtR answers this question in relation to the two most important homological conjectures in commutative algebra. Theorem. The following statements are equivalent: (1) For every regular local ring R of dimension n and for any ideal I of n−d (k, Extd (R/I, R)) → height d of R, the edge homomorphism ηd : ExtR n ExtR (k, R) is non-zero. (2) The same statement where I is replaced by a prime ideal P of R. (3) The order ideal conjecture is valid over regular local rings. (4) The monomial conjecture is valid for all local rings. THE MONOMIAL CONJECTURE AND ORDER IDEALS II 9 Proof. We will prove that (1) ⇒ (2) ⇒ (3) ⇒ (4) ⇒ (1). (1) ⇒ (2) is obvious. (2) ⇒ (3). By Theorem 2.1, in order to prove the order ideal conjecture on a regular local ring R, we need to show that for every prime ideal P of height d, if Ω = ExtdR (R/P, R) (the canonical module of R/P ), then Syzd (Ω) has a free summand. Let x1 , . . ., xd be an R-sequence contained in P . Let S = R/(x1 , . . . , xd ). Then Ω = HomR (R/P, S) = HomS (R/P, S); let i : Ω ֒→ S denote the natural inclusion. Let K• = K• (x1 , . . . , xd ; R), L• denote the Koszul complex with respect to x1 , . . ., xd and a minimal free resolution of Ω over R respectively and let f• : L• → K• be a lift of i : Ω ֒→ S. It has been pointed out in Sections 1.5 and 1.6 of [9] that Syzd (Ω) has a free summand if and only if fd (Ld ) = R = Kd (x; R), and hence if and R only if TorR d (k, Ω) → Tord (k, S) is non-zero. Since R is a regular local ring of dimension n, the maximal ideal m is generated by a regular system of parameters y1 , . . ., yn . Hence K• (y; R), the Koszul complex with respect to y1 , . . ., yn , is a minimal free resolution R of k = R/m. Thus, ĩ : TorR d (k, Ω) → Tord (k, S) 6= 0 if and only if ĩ : n−d n−d (k, S) is non-zero. For any local ring (A, m, k), let (k, Ω) → ExtR ExtR EA denote the injective hull of the residue field k. Let F• (Fi = Rti ) be a minimal free resolution of R/P and let I • be a minimal injective resolution of R. Let us consider the double complex D •• = HomR (F• , I • ). Since height of P = d, H i (D •• ) = 0 for i < d, H d (D •• ) = Ω and H i (D •• ) = Exti (R/P, R) for i > d. After deleting the initial exact part of D •• we obtain a minimal complex of injective modules (T • , ψ • )({T i }i≥0 ) over R such that L T i = r+s=d+i D r,s for i > 0, H 0 (T • ) = Ω and H i (T • ) = Extd+i (R/P, R), for i > 0. By proposition 1.1 in [5] we can construct a minimal injective complex J • ({J i }i≥0 ) such that H i (J • ) ≃ Extd+1+i (R/P, R) for i ≥ 0, and a map φ• : T • → J • (φi : T i+1 → J i , i ≥ 0) such that φ• induces an isomorphism between H i+1 (T • ) and H i (J • ) for i ≥ 0. The mapping cone of φ• provides an injective resolution of Ω over R. We have the following commutative diagram n−d (3) 0 // T 0 0 // T 1 // T 2 // · · ·  φ0  φ1 // J 1 // · · · // J 0 // T n−d ψ // T n−d+1 // · · ·  φn−d−1  φn−d // J n−d−1 // J n−d // · · · 0 (−) (the 0-th local cohomology functor with respect to the Applying Hm maximal ideal m) to this diagram we obtain the following commutative diagram n−d (4) 0 // 0 0 // 0  // E r0 // 0  // E r1 // · · · 0  // · · · // E ψ̃ // E t1 n−d−1  φ̃  φ̃n−d // E rn−d // E rn−d−1 // · · · // · · · 10 S. P. DUTTA where E denotes the injective hull of the residue field k over R, ψ̃ etc. 0 (J i ) = E ri , for i ≥ 0. denote the corresponding restriction maps and Hm n−d (k, Ω) → ExtnR (k, R) 6= 0 ⇔ Now it can be checked that ηd : ExtR n−d n−d−1 (k, Ω) → φ̃ in diagram (4) is not injective ⇔ the composite map ExtR n−d n−d n−d Hm (Ω) → ER 6= 0 ⇔ the composite map ExtR (k, Ω) → Hm (Ω) → HomR (R/P, ER ) ֒→ ES (֒→ ER ) is non-zero. The last equivalence follows n−d (Ω) ∼ from the observations that ker(ψ̃ n−d ) = HomR (R/P, ER ) and Hm = d HomR (Ext (Ω, R), ER ) (Grothendieck duality) → HomR (R/P, ER ) is an onto map. Since x1 , . . ., xd form an R-sequence and R is regular it foln−d (k, S). We have the following commutative lows that ExtnR (k, R) ∼ = ExtR diagram via i : Ω ֒→ S. n−d (k, Ω) ExtR n−d (S) // Extn−d (k, S) = k ֒→ ES Hm 4 4 ✐ ❱❱❱❱ R ✐ ❱❱❱❱ ✐✐✐✐ ❱❱** ✐✐✐✐ n−d (Ω) Hm Thus ηd 6= 0 if and only if the composite of the bottom maps is non-zero, n−d n−d (k, S) is non-zero. (k, Ω) → ExtR i.e., if and only if ei : ExtR n−d (k, Ω) → ExtnR (k, R)(= k) That the spectral sequence map ηd : ExtR n−d n−d boils down to ei : ExtR (k, Ω) → ExtR (k, S)(= k) can be checked by comparing the double complexes HomR (F• , J • ) and HomR (K• (x; R), J • ) 0 (−) to each via the natural surjection S = R/(x) → R/P after applying Hm one of them. (3) ⇒ (4). This follows readily from Theorem 1.4 in [9]. (4) ⇒ (1). Since the monomial conjecture is valid for all local rings, the canonical element conjecture is also valid for all local rings. Thus, if (A, m, k) is a local ring of dimension t such that A is the image of a Gorenstein ring t (Ω) → E and Ω its canonical module, the composite of ExttA (k, Ω) → Hm A is non-zero [19]. Let (R, m, k) be a regular local ring and let I be an ideal of height d > 0. Let A = R/I, Ω = ExtdR (R/I, R), the canonical module of A. We are n−d (k, Ω) → required to prove that the edge homomorphism map ηd : ExtR n • ExtR (k, R) is non-null. Let F• , J denote the minimal projective resolution of R/I and the minimal injective resolution of R over itself respectively. Considering the double-complex HomR (F• , J • ) and arguing as in the previous part, we observe that ηd 6= 0 if and only if the composite map n−d n−d (Ω) → E is non-null. Since A satisfies the canonical (k, Ω) → Hm ExtR R n−d n−d (A) → E (= (k, Ω) → Hm element conjecture the composite map ExtA A HomR (A, ER )) 6= 0. Hence, from the commutative diagram n−d n−d (Ω) − −−−→ (k, Ω) −−−−→ Hm ExtA   y EA   y n−d n−d (Ω) − −−−→ ER (k, Ω) −−−−→ Hm ExtR THE MONOMIAL CONJECTURE AND ORDER IDEALS II 11 It follows that ηd 6= 0 and our proof is complete.  2.3 As a consequence of the above theorem we obtain the following. Theorem. Let (R, m, k) be an equicharacteristic regular local ring of dimension n. Let I be an ideal of R of height d. Then the edge homomorphism n−d (k, Extd (R/I, R)) → ExtnR (k, R) is non-zero. ηd : ExtR The proof follows readily from the validity of the monomial conjecture/order ideal conjecture over equicharacteristic local rings. Remark. The equivalence of the monomial conjecture and the order ideal conjecture on regular local rings implies the stronger nature of the validity of the order ideal conjecture for all local rings. We refer the reader to [10] and [11] for relevant observations/reduction and proofs of special cases of this general statement of the order ideal conjecture in mixed characteristic. Section 3 . 3.1 As remarked earlier that for the validity of the order ideal conjecture over a regular local ring R, it is enough to check the assertion of the conjecture for minimal generators of Syzd+1 (M ) for finitely generated R-modules M of codimension d. At present we are able to prove the following. Theorem. Let (R, m, k) be a regular local ring of dimension n and let M be a finitely general R-module of codimension d. Suppose that M satisfies Serre-condition S1 and is equidimensional. Then, for every minimal generator β of Si (M )(= Syzi (M )), grade(OSi (M ) (β)) ≥ i, for i ≥ d. Proof. We consider a minimal free resolution of M : φi+1 φ0 φi (F• , φ• ) :→ Rti+1 → Rti → Rti−1 → · · · → Rt1 → Rt0 → M → 0. Assume i ≥ d. Let β be a minimal generator of Si (M ). Let {e, ej }1≤j≤ti −1 be a basis of Rti such that φi (e) = β. Let β = (a1 , . . . , ati−1 ) ∈ Rti−1 and let I denote the ideal generated by a1 , . . ., ati−1 . We assert that the grade of I (which equals the height of I) is greater than or equal to i. If possible, let height(I) ≤ i − 1. By induction on i, since Si (M ) = Si−1 (S1 (M )), we can assume height(I) = i − 1. Let P be a minimal prime ideal of I such that height(P ) = height(I) = i − 1. Let Gi = coker(φ∗i ). Let F•∗ denote the complex ∗ ∗ ∗ ∗ 0 → Rt0 → Rt1 → · · · → Rti−1 → Rti → Gi → 0, ∗ and let π ′ : Rti → R be the projection onto the e∗ -th component. Then π ′ ◦ φ∗i = I. Let (Q• , ψ• ) be a minimal free resolution of R/P . We have the following commutative diagram, (5) F•∗ : 0 Q• : // Rt∗0 // φ∗0 π0 ψi s R i //  // Rt∗1 // · · · π  1ψd−1 s R i−1 // ··· // Rt∗i−1 // φ∗i π  i−1 ψ1 s R1 // Rt∗i  π′ // R // Gi // 0  π // R/P // 0 12 S. P. DUTTA where π• is a lift of π : Gi → R/P induced by π ′ . Applying HomR (−, R) to (5) we obtain the following commutaive diagram, (6) Q∗•,i : 0 // Rs∗1 // R ∗ πi−1 ′  π ∗  // Rti−1 // Rti F : // · · · // Rs∗i−1 π1∗ // · · ·  // Rt1 ψi∗ // Rs∗i π0∗  // Rt0 // G ei  πe // M // 0 // 0 ei = coker ψ ∗ and π where G e is induced by π ∗ . i i−1 Let Ω = ExtR (R/P, R). Since height(P ) = i − 1, Extj (R/P, R) = 0 ∗ for j < i − 1 and Ω 6= 0. Let α : Ω ֒→ coker ψi−1 denote the natural ∗ ∗ inclusion. π1 maps coker ψi−1 to S1 (M ); since P annihilates Ω, π1∗ ◦ α = 0. Since height(P ) = i − 1, the codimension of Exti (R/P, R) > i. Let γ : ei denote the natural inclusion. Since M satisfies SerreExti (R/P, R) ֒→ G condition S1 and is equidimensional of codimension d and i ≥ d, we have π e(Exti (R/P, R)) = 0. Now applying Proposition 1.1 in [3] we can construct a minimal free complex (L• , θ• ) such that H0 (L• ) = Exti (R/P, R), H1 (L• ) = Exti−1 (R/P, R) = Ω and a map g• : L• → Q∗•,i such that it induces the inclusion map γ : Exti (R/P, R) ֒→ coker ψi∗ and isomorphism on higher homologies. Then ∗ . We have the the mapping cone V• of g• is a free resolution of Im ψi+1 following commutative diagram. L• : // Rpi gi (7) Q∗•,i :0  // R // Rpi−1 // · · ·  gi−1 // Rs∗1 // · · · // Rp1 g1  // Rsi−1 // Rp0 g0  // Rsi // H (L• ) 0 // 0  γ // G ei // 0 Claim. Im gi = R. If not, then the copy of R in Q∗•,i survives in a minimal free resolution U• ∗ of Im ψi+1 extracted from V• . Since height(P ) = i − 1, from (7) it follows i ∗ ) has a minimal generator whose entries generate an ideal that Syz (Im ψi+1 ∗ of height less than i. Since Im ψi+1 ⊂ Rsi+1 , the mixed characteristic p(> 0) ∗ is a non-zero divisor on Im ψi+1 . Since the order ideal conjecture is valid over equicharacteristic local rings, we arrive at a contradiction by tensoring U• with R/pR. Hence Im gi = R. Let e′ be a part of a basis of Li (= Rpi ) such that gi (e′ ) = 1. By construce ◦ γ. Since π e(Exti (R/P, R)) = 0, we have π e ◦ γ = 0. tion π•∗ ◦ g• is a lift of π ∗ Hence π• ◦g• is homotopic to 0. Since L• and F• are minimal free complexes and π ′∗ ◦gi (e′ ) = e, a part of a basis of Rti = Fi , we arrive at a contradiction. Hence height(I) ≥ i, for i ≥ d.  . 3.2 In our next proposition we study a special case of order ideals of syzygies of modules, not necessarily of finite projective dimension, over any Cohen-Macaulay local ring. Proposition. Let (R, m, k) be a Cohen-Macaulay local ring of dimension n and let M be a finitely generated R-module. Let Si denote the i-th syzygy THE MONOMIAL CONJECTURE AND ORDER IDEALS II 13 of M for j > 0. Let α be a minimal generator of Si such that it generates a free summand of Si . Then height(OSi (α)) ≥ i, for i ≤ n − 1, and height(OSi (α)) = n for i ≥ n. Proof. Let (F• , φ• ){Rri , φi : Rri → Rri−1 } be a minimal free resolution of M . Let i = 1. Since S1 has a free summand generated by α we can write S1 = Rα ⊕ T1 . Let α1 : R ֒→ Rr0 denote the restriction of the inclusion map : S1 ֒→ Rr0 . Let α1 (1) = (a1 , . . . , ar0 ). Since cokerα1 has projective dimension 1, we have grade Ext1 (cokerα1 , R) is ≥ 1. Thus grade of the ideal generated by a1 , . . . , ar0 is greater than or equal to 1. Now we use induction on i. Let Si = Rα ⊕ Ti . Let αi : R ֒→ Rri−1 denote the restriction of the inclusion map Si ֒→ Rri−1 . Let I denote the ideal generated by the entries of αi (1). Then, by above, grade I ≥ 1. Let x ∈ I be a non-zero-divisor on R and let (¯) denote the image modulo xR. Then S i = Syzi−1 (S 1 ). By induction, grade(I) ≥ i − 1. Hence grade I ≥ i.  . 3.3 The following theorem points out a connection between dth syzygies of R/P and its canonical module in terms of having a free summand. Theorem. Let (R, m, k) be a complete regular local ring of dimension n and let P be a prime ideal of height d, Ω = Extd (R/P, R) — the canonical module for R/P . Suppose Syzd (R/P ) has a free summand. Let x1 , . . . , xd ∈ P form an R-sequence; let S = R/(x1 , . . . , xd ). Then there exists µ ∈ S and n−d (k, R/P ) → a map α : R/P ֒→ S, α(1̄) = µ such that the map : ExtR n−d d ExtR (k, S) induced by α is non-null. Moreover, Syz (Ω) has a free summand. Proof. Let (F• , φ• ) be a minimal free resolution of R/P . φd+1 φ1 φ F• :→ Rtd+1 → Rtd →d Rtd−1 → · · · → Rt1 → R → R/P → 0. Let F•∗ = HomR (F• , R) and ∗ ∗ : 0 → R → Rt1 → · · · → Rtd−1 → Rtd → Gd → 0, F•,d ∗ ∗ where Gd = coker(φ∗d ). Since Syzd (R/P ) has a free summand, Rtd has a basis {e, ei }1≤i≤td −1 such that im φd+1 is contained in the submodule generated by {ei }1≤i≤td −1 and φ∗d+1 (e∗ ) = 0. Then im e∗ ∈ Ω ֒→ Gd . By construction, Ω = Extd (R/P, R) = HomS (R/P, S). Let K• (x; R) denote the Koszul complex corresponding to x1 , . . ., xd . Consider the map η : S → ∗ denote a lift of η. We have Ω ⊂ Gd , η(1) = im e∗ . Let η• : K• (x; R) → F•,d the following commutative diagram. K• : 0 (8) ∗ F•,d :0 // R  // Rd ηd =µ // R  // · · · // Rd // R // R/(x) = S // · · ·  η1 // Rt∗d−1  η0 // Rt∗d  // Gd ηd−1 // Rt∗1 η // 0 Since P is a prime ideal of height d, Exti (R/P, R) = 0 for i < d and ExtiR (ExtiR (R/P, R), R) = 0 for i > d. Applying HomR (−, R) to (8) we 14 S. P. DUTTA obtain the following: ηd∗ induces a map α : R/P = Extd (Gd , R) ֒→ S, α(1) = µ and η0∗ (e) = 1 ∈ R = Kd (x; R). Since µP = 0 in S, µ ∈ Ω and β γ hence α factors through R/P ֒→ Ω ֒→ S where β(1) = µ and γ is the natural inclusion. Let L• be a minimal free resolution of Ω. Let β• : F• → L• and γ• : L• → K• (x, R) denote lifts of β and γ. Then γ• ◦ β• is homotopic to η ∗ . Since η0∗ (Rtd ) = R, we have γd (Ld ) = R. Thus Syzd (Ω) has a free summand. n−d n−d R (k, R/P ) = TorR Since ExtR d (k, R/P ), ExtR (k, S) = Tord (k, S) (R ben−d n−d (k, S), (k, R/P ) → ExtR ing regular local), η0∗ (e) = 1, it follows that ExtR induced by α, is non-null.  Corollary. Let R, P be as above in the theorem and let us assume that n−d (k, R/P ) → Syzd (R/P ) has a free summand. Then the direct limit map ExtR n−d Hm (R/P ) is non-zero. This follows from our theorem and the following commutative diagram. ֒→ n−d n−d (k, S) = k (k, R/P ) −−−−→ ExtR ExtR   y n−d (R/P ) Hm −−−−→ n−d (S) Hm Remark. Let A be a complete local normal domain of dimension t. In Theorem 3.8 of [6] we showed that if Ω∩(mS −m2S ) 6= ∅, then the direct limit map t (A) is non-null. However we couldn’t figure out the i : ExttA (k, A) → Hm real significance of non-null property of the direct limit map i. The above theorem shows that if i is non-null and A = R/P where R is a complete regular local ring, d = height(P ), then Syzd (R/P ) must have a free summand. For details we refer the reader to [6, Section 3]. . 3.4 Our final theorem proves another special case of the order ideal/monomial conjecture. Theorem. Let (R, m, k) be a regular local ring of dimension n and let P be a prime ideal of height d. We assume R/P satisfies Serre-condition S4 and ν(Ω) ≤ 2, where ν(Ω) is the minimal number of generators of the canonical module Ω of R/P . Then Syzd (Ω) has a free summand. Proof. If ν(Ω) = 1 and R/P satisfies Serre-condition S3 , the assertion follows from Theorem 2.6 [6] and Theorem 2.2. Let {µ1 , µ2 } be a minimal set of generators of Ω. As pointed out in the proof of (4) ⇒ (3) in Theorem 2.1, we have Ω ֒→ R/P . Then, for µ = µ1 or µ2 , we have Ω/(µ) ֒→ R/(P + µR). Since R/P satisfies Serre-condition S2 , R/(P + µR) satisfies S1 and hence Ω/(µ) ∼ = R/I, where height I = d + 1. We consider a minimal free resolution (F• , φ• ) of Ω φd+2 φd+1 φ φ1 F• :→ Rtd+2 → Rtd+1 → Rtd →d · · · → Rt1 → R2 → Ω → 0. Since R/P satisfies Serre-condition S4 , we have R/P ∼ = HomR (Ω, Ω) = ExtdR (Ω, R), Extd+1 (Ω, R) = 0, Extd+2 (Ω, R) = 0. We consider the following THE MONOMIAL CONJECTURE AND ORDER IDEALS II 15 truncated part of F•∗ = HomR (F• , R) : φ∗ ∗ ∗ ∗ ∗ ∗ F•,d+2 : 0 → R2 →1 Rt1 → · · · → Rtd → Rt1+1 → Rtd+2 → Im φ∗d+3 → 0. α Let Gi = coker φ∗i ; then R/P = Extd (Ω, R) ֒→ Gd and coker(φ∗d+2 ) = ∗ Im φ∗d+3 . Let L• be a minimal free resolution of R/P and f• : L• → F•,d+2 be a lift of α : R/P ֒→ Gd . Claim. fd (Ld ) = R2 . If possible, let fd (Ld ) 6= R2 . Then there exists a minimal generator e of R2 such that e ∈ / fd (Ld ). The mapping cone V• of f• provides a free resolution of Im φ∗d+3 . In the minimal free resolution of U• of Im φ∗d+3 extracted from V• , the copy of e survives as a minimal generator of Ud+2 . Since height(I) = ∗ d + 1, the entries of φ∗1 (e) has height d + 1 < d + 2. Since Im φ∗d+3 ⊂ Rtd+3 , the mixed characteristic p(> 0) is a non-zero-divisor on Im φ∗d+3 . Hence tensoring U• with R/pR we arrive at a contradiction due to the validity of the order ideal conjecture in equicharacteristic. Hence fd (Ld ) = R2 . This implies that Syzd (R/P ) has a free summand. Hence, by the previous theorem, Syzd (Ω) has a free summand.  Corollary. Let A be a complete local domain satisfying Serre-condition S4 . Assume that the canonical module is generated by two elements. Then A satisfies the monomial conjecture. Remark. The consequence of the order ideal conjecture due to Bruns and Herzog mentioned in the introduction can be improved. It has been proved in [11], that if R is a regular local ring and I is an ideal of R of height d generated by {xi } such that R/I is S2 , then Kd (x; R) ⊗ k → TorR d (R/I, k) is the 0-map. References [1] B. Bhatt, Almost direct summands, Nagoya Math. J. 214 (2014), 195-204. [2] W. Bruns, J. Herzog, Cohen-Macaulay Rings, Cambridge Stud. Adv. Math, 39, Cambridge Univ. Press, Cambridge, 1993. [3] S. P. Dutta, On the canonical element conjecture, Trans. Amer. Math. Soc. 299 (1987) 803–811. [4] S. P. Dutta, Syzygies and homological conjectures, in: Commutative Algebra, Math. Sci. Res. Inst. Publ. 15 (1989) 139–156. [5] S. P. Dutta, Dualizing complex and the canonical element conjecture, J. Lond. Math. Soc. 50 no. 2, (1994) 477–487. [6] S. P. Dutta, Dualizing complex and the canonical element conjecture II, J. Lond. Math. Soc. 2 no. 56, (1997) 46–63. [7] S. P. Dutta, A note on the monomial conjecture, Trans. Amer. Math. Soc. 350 (1998) 2871–2878. [8] S. P. Dutta, Splitting of local cohomology of syzygies of the residue field, J. Algebra 244 (2001) 168–185. [9] S. P. Dutta, Monomial Conjecture and order ideals, J. Algebra 383 (2013) 232–241. 16 S. P. DUTTA [10] S. P. Dutta, On modules of finite projective dimension, Nagoya Math J. 219 (2015) 87–111. [11] S. P. Dutta, On a consequence of the order ideal conjecture, JPAA 219 no. 3 (2015) 482–487. [12] S. P. Dutta, P. Griffith, Intersection multiplicities, the canonical element conjecture and the syzygy problem, Michigan Math. J. 57 (2008) 227–247. [13] E. G. Evans, P. Griffith, The syzygy problem, Ann. of Math. 114 no. 2 (1981) 323– 333. [14] E. G. Evans, P. Griffith, Order ideals, in: Commutative Algebra, Math. Sci. Res. Inst. Publ., vol. 15, Springer (1989) 213–225. [15] E.G. Evans, P. Griffith, Syzygies, Lecture Note Series 106, London Mathematical Society, Cambridge University Press, 1985. [16] S. Goto, On the associated graded rings of parameter ideals in Buchsbaum rings, J. Algebra 85 no. 2 (1983) 490–534. [17] R. Heitman, The direct summand conjecture in dimension three, Ann. of Math. 156 no. 2 (2002) 695–712. [18] M. Hochster, Contracted ideals from integral extensions of regular rings, Nagoya Math. J. 51 (1973) 25–43. [19] M. Hochster, Topics in the Homological Theory of Modules Over Commutative Rings, CBMS Reg. Conf. Ser. Math. vol. 24, Amer. Math. Soc., Providence, RI, 1975. [20] M. Hochster, Canonical elements in local cohomology modules and the direct summand conjecture, J. Algebra 84 (1983) 503–553. [21] J. Koh, Degree p extensions of an unmixed regular ring of mixed characteristic p, J. Algebra 99 (1986) 310–323. [22] T. Ohi, Direct summand conjecture and descent of flatness, Proc. Amer. Math. Soc. 124 (1996) 1967–1968. [23] J. Valez, Splitting results in module-finite extension rings and Koh’s conjecture, J. Algebra 172 (1995) 454–469. Department of Mathematics, University of Illinois at Urbana-Champaign, 1409 West Green Street, Urbana, Illinois 61801
0math.AC
sensors Article Fusion of an Ensemble of Augmented Image Detectors for Robust Object Detection Pan Wei 1 , John E. Ball 1, * and Derek T. Anderson 2 1 2 arXiv:1803.06554v1 [cs.CV] 17 Mar 2018 * Mississippi State University, Electrical and Computer Engineering Department, Starkville, MS 39759, USA; [email protected] University of Missouri-Columbia, Electrical Engineering and Computer Science Department, Columbia, MO 65211, USA; [email protected] Correspondence: [email protected]; Tel.: +1-662-325-4169 Received: 6 February 2018; Accepted: 15 March 2018; Published: 17 March 2018 Abstract: A significant challenge in object detection is accurate identification of an object’s position in image space, whereas one algorithm with one set of parameters is usually not enough, and the fusion of multiple algorithms and/or parameters can lead to more robust results. Herein, a new computational intelligence fusion approach based on the dynamic analysis of agreement among object detection outputs is proposed. Furthermore, we propose an online versus just in training image augmentation strategy. Experiments comparing the results both with and without fusion are presented. We demonstrate that the augmented and fused combination results are the best, with respect to higher accuracy rates and reduction of outlier influences. The approach is demonstrated in the context of cone, pedestrian and box detection for Advanced Driver Assistance Systems (ADAS) applications. Keywords: object detection; deep learning; fuzzy measure; fuzzy integral; computer vision; ADAS 1. Introduction Object detection is an important and active area in machine learning research. In many instances, especially for Advanced Driver Assistance Systems (ADAS), it is important to accurately localize objects in real time. Due to the development of deep learning, the localization accuracy for object detection has largely been improved. However, in our experimenting with deep learning for object detection (such as detecting pedestrians), we noticed that even with a well-trained network with image augmentation (such as translation, rotation, stretching) during training, changes in the image characteristics such as brightness or contrast can still have a large effect on the detection result. Based on these observations, we hypothesize that presenting a deep network with multiple augmented images during testing and fusing the results could result in a more robust detection system. Herein, we develop a system utilizing image augmentation combined with Axis-Aligned Bounding Box Fuzzy Integral (AABBFI)-based fusion to enhance the detection results. The fusion method applied in this paper originates from the field of computational intelligence. This method analyses the agreement among object detection outputs and fuses them dynamically. We choose not to use a supervised learning-based method (learn the fusion from training data), because the fusion method in this scenario cannot be learned in general, as the “optimal” fusion result changes from case to case. Specifically, even with the same inputs are to be fused, the expected fusion result is different when the environmental surroundings and/or detection object type changes. Instead, the method we apply in this paper automatically evaluates the characteristics among inputs for each case and fuses the detection results dynamically. The primary research task we were investigating for this paper is developing a robust detection sub-system for ADAS. During road construction, street repairs and accidents, often, traffic lanes are quarantined with barrels or cones. Furthermore, ADAS detect pedestrians to estimate their locations Sensors 2018, 18, 894; doi:10.3390/s18030894 www.mdpi.com/journal/sensors Sensors 2018, 18, 894 2 of 21 and help with collision avoidance. In our specific industrial project, we also need to detect boxes. This motivated the study of cone, pedestrian and box detection herein, and a dataset consisting of traffic cones, pedestrians and boxes has been collected and analyzed. In the experimental results, we also include results using the PASCAL VOC (Visual Object Classes) dataset [1] for generalization purposes. This paper shows that the proposed method gives better detection results than both the original non-fusion results and the average/median fusion results. Specifically, the contributions of this work are: • • • • A detection fusion system is proposed, which uses online image augmentation before the detection stage (i.e., during testing) and fusion after to increase detection accuracy and robustness. The proposed fusion method is a computationally-intelligent approach, based on the dynamic analysis of agreement among inputs for each case. The proposed system produces more accurate detection results in real time; therefore, it helps with developing an accurate and fast object detection sub-system for robust ADAS. The Choquet Integral (ChI) is extended from a one-dimensional interval to a two-dimensional axis-aligned bounding box (AABB). The following acronyms and mathematical nomenclature, shown in Table 1, are used in the paper. Table 1. Acronyms and mathematical nomenclature . Variable/Symbol Description AABB AABBFI ADAS ChI FI FM FPS IoU NMS xi X = { x1 , ..., xn } I g g({ xi }) g({ xi , ..., x j }) h h ( x i ), h i h̄i [h̄i ]− + R[h̄i ] h◦g h ( x π (i ) ) Axis-Aligned Bounding Box Axis-Aligned Bounding Box Fuzzy Integral Advanced Driver Assistance Systems Choquet Integral Fuzzy Integral Fuzzy Measure Frames Per Second Intersection over Union Non-Maxima Suppression i-th data/information input Finite set of n data/information inputs Set of intervals, {[il , ir ] ∈ I, il ≤ ir , il , ir ∈ <} Fuzzy measure g: 2X → [0,1] Fuzzy measure on input xi Fuzzy measure on inputs xi , ..., x j Real-valued evidence function h : X → < Real-valued evidence from input xi Interval-valued evidence from input xi Left endpoint of h̄i Right endpoint of h̄i Fuzzy integral of h with respect to g π is a permutation of X, such that h( xπ (1) ) ≥ h( xπ (2) ), ..., ≥ h( xπ (n) ) This paper is organized as follows: Section 2 introduces basic concepts related to the Fuzzy Integral (FI). Furthermore, it introduces recent developments in object detection for ADAS, image augmentation in deep learning and model ensembles. Section 3 discusses the proposed fusion system, and Section 4 gives synthetic and ADAS experimental examples showing how fusion and the system work. Finally, Section 5 contains conclusions and future work. 2. Background In the proposed detection fusion system, a fusion method from the field of computational intelligence is applied after the detection stage to increase the detection accuracy. There are various methods performing fusion in a computationally-intelligent way, and one example is in [2,3]. Sensors 2018, 18, 894 3 of 21 Herein, the Fuzzy Integral (FI), a parametric nonlinear aggregation operator, is used for fusion [4–6]. To facilitate a better understanding of this fusion method, in this section, the definitions of Fuzzy Measure (FM), Choquet Integral (ChI), interval-valued fuzzy integral and FM of agreement are reviewed. Next, object detection for ADAS, image augmentation in deep learning and model ensembles are discussed. 2.1. Fuzzy Measure The ChI is defined with respect to the Fuzzy Measure (FM). The FM is the modeling of the worth of the individual inputs and their various interactions. Ultimately, once we select an FM, the ChI becomes a specific operator. Let X = { x1 , ..., xn } be a set of n information inputs (e.g., experts, sensors, algorithms, etc.), where xi represents the i-th input. For example, in our application, xi is the i-th AABB. The definition of FM is as follows, Definition 1 (Fuzzy measure). For a finite set X, a measure g: 2X → [0,1] is an FM if it has the following properties: 1. 2. (Normality) g(∅) = 0, (Monotonicity) If A, B ∈ 2X and A ⊆ B ⊆ X, then g( A) ≤ g( B) ≤ 1. Note, often, g( X ) = 1 for problems like confidence/decision fusion. Property 2 of the FM states that g is monotone. For example, if there are three inputs { x1 , x2 , x3 }, then the FM g({ x1 , x2 , x3 }) ≥ max ( g({ x1 , x2 }), g({ x1 , x3 }), g({ x2 , x3 })) and g({ x1 , x2 }) ≥ max ( g({ x1 }), g({ x2 })). What this means is adding inputs never decreases the measure. The FM (g) lattice (a graph that shows the variables and the minimal set of required monotonicity constraints as edges) for three inputs (N = 3) is shown in Figure 1. In the first layer, the variables are only for a single input. In the second layer, variables are for two inputs, and so forth. Figure 1. Fuzzy measure shown for three information inputs. 2.2. Choquet Integral Many variants of the fuzzy integral have been put forth to date [6], e.g., the Sugeno FI [4], the Choquet Integral (ChI) [5], etc. Herein, we use the ChI, as it produces results anywhere between the minimum and maximum inputs. The Sugeno FI only yields one of the N inputs or 2 N FM variable values due to its min/max formulation. Definition 2 (Choquet integral). Let h( xi ) represent real-valued evidence from input xi . Let g({ xi , ..., x j }) represent the FM on inputs xi , ..., x j . Let π be a permutation of X, such that h( xπ (1) ) ≥ h( xπ (2) ), ..., ≥ Sensors 2018, 18, 894 4 of 21 h( xπ (n) ), Ai = { xπ (1) , ..., xπ (i) } and g( A0 ) = 0. Let h : X → < be a real-valued function that represents inputs. The ChI is: n Z c h ◦ g = Cg ( h ) = ∑ h(xπ(i) )[ g( Ai ) − g( Ai−1 )]. (1) i =1 An example showing this calculation is shown in Section 4.1. 2.3. Interval-Valued Fuzzy Integral In some cases, evidence h is not represented as a single value, but as an interval. Intervals capture uncertainty at a level of granularity that is acceptable for many applications. For example, a radar might measure range and give a value, but this value has uncertainty, so it could be represented as an interval. Definition 3 (Interval-valued fuzzy integral). Let h̄i ⊆ I be the continuous interval-valued evidence from input xi , and let [h̄i ]− ≤ [h̄i ]+ be the left and right endpoints of interval h̄i , respectively. The interval-valued FI is [6]: Z Z − h̄ ◦ g = [ [h̄] ◦ g, Z [h̄]+ ◦ g]. (2) This equation means that interval-valued input breaks down into the extreme (interval boundaries) case. This is the same for set-valued input, as well. In [7], there is a review of different extensions of the FI for uncertain h and/or g. 2.4. Fuzzy Measure of Agreement The FM can be (i) specified by an expert, (ii) learned from the training data, (iii) input from densities or (iv) extracted from the current observation (this paper). One example to extract the FM from the current observation is the FM of agreement proposed in [8–10]. The motivation for the proposal of the FM of agreement is that sometimes, experts’ estimation or the ground-truth can be challenging to obtain, and all we have is the data themselves. This means that we have the inputs, but we do not know their “worth”. How the FM of agreement decides the “worth” of each input is by calculating the amount of agreement between each input and other inputs. Herein, agreement means the amount of overlap among different inputs. In the extreme case, if one input has no overlap with any other inputs, the FM of agreement for two-tuples is zero. The following demonstrates the way to calculate the FM of agreement when the available evidence h̄ = { h̄1 , ..., h̄n } is interval-valued. Let Āi = {h̄π (1) , ..., h̄π (i) } be the permuted set of intervals and zi be the weight of each term, where z2 ≤ z3 ≤ ... ≤ zn . In [8], zi = i/n and: g̃ AG ( Ā0 ) = g̃ AG ( Ā1 ) = 0, g̃ AG ( Āi ) = i[ −1 i [ (3a) h̄π (k1 ) ∩ h̄π (k2 ) z2 k 1 =1 k 2 = k 1 +1 + i[ −2 i[ −1 i [ h̄π (k1 ) ∩ h̄π (k2 ) ∩ h̄π (k3 ) z3 (3b) k 1 =1 k 2 = k 1 +1 k 3 = k 2 +1 + ... + |h̄π (1) ∩ h̄π (2) ∩ ... ∩ h̄π (i) |zi , g AG ( Āi ) = g̃ AG ( Āi ) , g̃ AG (h̄) i = [2 : n ]. (3c) Sensors 2018, 18, 894 5 of 21 Equation (3a) means that there is no “worth” for the empty and one-element set, because we need at least two elements to compare. An example showing the calculation of the FM using Equations (3a)–(3c) is given in Section 4.1. 2.5. Object Detection Using Deep Learning in ADAS In recent years, deep learning has become the focus of much research. The beginning of the surge in deep learning was the winning of the ImageNet Large-Scale Visual Recognition Challenge (ILSVRC) [11] by AlexNet [12] developed by Alex Krizhevsky et al. Since then, deep learning has been integrated in many systems with outstanding performance, as shown in [13–16]. Due to the development of deep learning, the accuracy of object detection in images has largely been improved. Examples of these object detectors includes: YOLO [17,18], Faster R-CNN [19], Multibox [20], Region-based Fully Convolutional Networks (R-FCN) [21] and the Single Shot multibox Detector (SSD) [22]. Furthermore, there are various methods focusing on improving localization accuracy. One approach utilizes a probabilistic method. One example of this approach is called an object Localization Network (LocNet) [23], which relies on assigning conditional probabilities to rows and columns of the bounding box. LocNet exceeds the performance of Fast R-CNN [24], but it has been surpassed by Faster R-CNN [19]. A second approach focuses on improvement of Non-Maximum Suppression (NMS) [25]. One example is the so–called Gossip Net (Gnet) [26], which incorporates NMS into the detection network, but requires a large number of training data. In another example, the authors gave slight modification to NMS, but the improvement typically only happens in some specific cases [27]. A third type of approach uses neural networks to refine the localization. One example is RefineNet [28], which iteratively pools features from previous predictions. However, its performance using deeper networks is yet to be studied. Our approach is different from these three types. We use a computationally-intelligent method to fuse different detection results obtained from augmented images. For ADAS, two of the most important metrics for the object detection sub-system are accuracy and speed. When using ADAS to help a driver in the process of driving, we first need the system to accurately detect objects near or far, big or small in various environmental conditions. Misdetection or false detection could possibly lead to disasters. Second, the detection needs to be in real time. In our application for an industrial collision avoidance system, the maximum speed of the vehicle is about 5 m per second, which is roughly 18 km/h. To guarantee a safe stop for collision avoidance, the maximum computational time is 0.2 s, so real time in our application is defined as having a detection rate of 5 Hz or above. Other systems with different parameters will have different requirements. 2.6. Image Augmentation In many deep learning systems, there is a large number of parameters to be estimated, and thus, a large amount of training data is required. Often, augmentation techniques such as image translation, rotation, stretching, shearing, rescaling, etc., are utilized to provide augmented imagery for training, and these image augmentation techniques during training often help the system be more robust. After performing a thorough literature search, we found that there were rarely any previously published systems that utilized multiple augmentations and fusion for processing test images. One system is Howard’s [29] entry for ILSVRC [11] in 2013, in which he modified the winning 2012 entry [12] by adding augmentations in both training and testing. The training augmentations were (1) extended pixel crops, (2) horizontal flips and (3) manipulating the contrast, brightness and color. For testing, a combination of 5 translations, 2 flips, 3 scales and 3 views yielded 90 enhanced images. A greedy algorithm then down-selected this to the top ten predictions, which were combined to form the final result. However, this augmentation employed during testing [29] yielded an increased classification accuracy, but did not improve detection localization accuracy. Sensors 2018, 18, 894 6 of 21 2.7. Model Ensembles In order to improve performance during testing and add some robustness to the system, one idea is to utilize ensembles of multiple models. In this approach, one would train multiple models and average their predictions during the test time. One example is in a YOLO paper [17], where the authors combined Faster R-CNN and YOLO together and obtained some performance improvement. In [30], rather than training separate models independently, the authors kept multiple snapshots of the model during training. At test time, they averaged the predictions of these multiple snapshots. Malisiewicz et al. [31] trained a linear SVM for each class in the training set. The main disadvantage is each class requires millions of negative examples to train. Szegedy et al. [20] demonstrated that proposal generation can be learned from data (vs. hand-crafted) and utilized an ensemble approach to aggregate detections. Their solution was limited to one object per grid entry with a course grid, vs. YOLO, which has a finer grid and allows multiple objects to be detected per grid location. Maree et al. [32] utilized ensembles of extremely randomized decision trees and randomly extracted subwindows for object detection. The tree sizes were very large, and this method may not be appropriate for a real-time system. There are also unsupervised methods such as applying an ensemble clustering to extract ROIs from low depth of field images by Rafiee et al. [33]. Performance improvements could be obtained if this were a supervised method. There are two major differences between the model ensemble approach and our proposed method. First, instead of using multiple models, we use one model, and we change the inputs of the model instead of the model itself. Second, instead of averaging all predictions, we propose a computationally-intelligent method to fuse all predictions together. 3. Proposed System 3.1. Overview For the proposed system, during the in-line (testing) phase, the input goes through three stages. First, the input is augmented to produce several variations, so we can have augmented inputs for future stages. Second, a detector is applied to obtain AABBs and related labels in each augmented image. Practically, this would be implemented by applying multiple detectors in parallel, one for each of the augmented images. This system can handle multiple objects in the input image. The largest number of detected objects in the augmented inputs is chosen as the number of objects (S) in the input. For example, suppose three augmented images provide 3, 2 and 2 detections; we then choose the conservative approach and set S = 3. All AABBs are grouped for each object using k-means clustering [34], where k equals S. Third, for each object, a certain number of AABBs with the top T confidence scores in augmented inputs is selected, where T can be any integer that is equal to or smaller than the number of augmented inputs (M). Then, the AABBFI fusion method is used to fuse the T AABBs to obtain one AABB for each object in the input. In the ADAS examples in Section 4, we use three AABBs for tractability, but more AABBs can be fused using the method proposed in [35]. In summary, the system produces variations of each input, detects objects in each variation and fuses the top T results for each object, with the expectation of getting a more accurate AABB for each object in the input. The overview of the proposed system is shown in Figure 2, and Algorithm 1 is a formal description of the proposed system. In the following paragraphs, each part of the proposed system, including augmentation, detection and fusion, is discussed in detail. Sensors 2018, 18, 894 7 of 21 Figure 2. Proposed system for detection fusion. Algorithm 1 Algorithm for the proposed detection fusion system. input: input: image I output: fused AABBs for S objects: { B̂1 , B̂2 , ..., B̂S } global: augmentation methods: { P1 , P2 , ..., PM } global: augmented inputs: { Î1 , Î2 , ..., Î M } global: number of objects in input: S global: AABBs for all objects: { B1 , B2 , ..., BX } global: labels for all objects: {l1 , l2 , ..., lX } global: AABBs for each object: { B1 , B2 , ..., BN }, N may vary global: labels for each object: {l1 , l2 , ..., l N }, N may vary global: Number of AABBs to be fused: T start: for each augmentation method in { P1 , P2 , ..., PM } do Use the augmentation method on I to obtain augmented inputs { Î1 , Î2 , ..., Î M }. Use the detector to get { B1 , B2 , ..., BX } and {l1 , l2 , ..., lX } for all objects of all augmented inputs. Choose the largest number of detection in each variation as S. Group the detection into S object groups using k-means clustering [34], where k equals S. for k from 1 to S do Choose the grouped detection results { B1 , B2 , ..., BN } and {l1 , l2 , ..., l N } for each object, where these N detection results from N augmented images correspond to the same object. Here, N may vary. Choose the majority in {l1 , l2 , ..., l N } as the object label. if N ≥ 3 then Fuse T AABBs with the top T confidence scores using AABBFI to get B̂k else if N = 2 then. Average the AABBs to get B̂k . else if N = 1 then Use only this detection AABB as B̂k . else if N = 0 then B̂k = None. return { B̂1 , B̂2 , ..., B̂S }. 3.2. Augmentation For augmentation of each input, the goal is to produce a range of inputs. The “optimal” augmentation cannot be determined algorithmically, and it varies depending on the type of objects detected, the image background, etc. Instead, a range of images of varying quality is generated and presented to the detector. The augmentation methods used herein include changing brightness, contrast, edge enhancement, global histogram equalization, Gaussian blurring and adding independent and identically distributed (IID) Gaussian noise to simulate different scenarios. Although there are Sensors 2018, 18, 894 8 of 21 other augmentation methods, in this initial work, we choose to focus on basic operations, which we have already shown lead to success. Future investigations can study other more complicated local and global operators. In order to see whether all these basic augmentation methods work for the final result, we choose 17 of them to test on 572 images of traffic cones and summarize the choice of each augmentation method. During testing, each augmentation method that is chosen by the proposed algorithm as the top three choices is tallied. Detection algorithms usually output confidence scores (as in YOLO [17,18]) or objectness scores (as in Faster R-CNN [19]) for each detected object. Herein, we use these scores to determine the top choices. We run our system and count how many times each enhancement method is chosen. The results are as shown in Figure 3. The number of times selected for each augmentation method is shown on the x-axis. The different augmentation methods are listed on the y-axis, including the parameters for each method. For example, “brightness with factor 0.25” means the image is darker than the original image, while “brightness with factor 2” is two times brighter than the original image. Figure 3. Augmentation analysis. From Figure 3, we can see that each augmentation method is chosen in certain scenarios as one of the top three choices. For each method, if it is chosen equally, the average number of chosen times would be around 95, as shown in the figure as a red line. In Figure 3, the highest number of chosen times is 188, when using contrast with factor 1.5. The lowest chosen times is 21, when using contrast with factor 0.25. However, all these numbers fluctuate around the average 95, which means that each augmentation method has a certain influence on the final result, which cannot be ignored. This figure also shows that there is really no overall “magic-bullet” method that universally helps for all images and the detection of all objects. As the computational time scales linearly with the number of augmentation methods, we want to evaluate how the performance of the fusion system changes as the number of augmentation methods increases. In order to do this, the methods shown in Figure 3 are sorted in descending order based on Sensors 2018, 18, 894 9 of 21 the number of times each was selected during training. The original image without any augmentation is used as a starting point. For M augmented images, the M methods that were selected the most often are utilized. For instance, when using M = 3 augmented images, the contrast with factor 1.5 and contrast with factor 2 methods are chosen. Together with the original image, we can have three input images. The results are shown in Figure 4. From this figure, we can see that the performance reaches the highest point when we choose all 18 augmentation methods. However, the results also show fluctuations between one and 11 methods. It is important to note that when the number of augmentation methods is three, the performance reaches a local maximum point. This means that although the general trend line is going up, when computational resources are limited or there is higher speed requirement, we can choose three methods instead of 18 and still get improved performance. In Figure 4, the number of augmented methods is varied, and the IoU fusion result is calculated. The fusion really only occurs when M ≥ 3 methods are used. The dashed vertical lines show the limits of what was examined in this paper, the M = 3 to M = 18 cases. The dashed blue line shows a trend line fitted to the data. The red dashed lines show the minimum (3) and maximum (18) number of augmentation methods investigated. The solid blue line shows the data trend (the data points are blue dots). Figure 4. Changes of performance with the increase of the number of augmentation methods. 3.3. Detection There are basically two types of detection (localization) methods using deep learning. One type is based on region proposals, and one example is Faster R-CNN [19]. For Faster R-CNN, the input image first runs through some convolutional layers to obtain a feature map representing the entire image, then there is a separate region proposal network, which works on top of the convolutional feature map and predicts its region proposals. Once we have these predicted region proposals, we pass them up to the rest of the network to get a classification of these regions. Therefore, there are two parts in the network; one is for proposing regions, and the other is for classification. The other type of detection method detects without proposing possible regions. Instead, it localizes and classifies objects using one giant convolutional network. One typical example for this type of detector is called YOLO [17,18]. Given an input image, YOLO first divides it into some coarse grids. Within each of these grid cells, YOLO assigns some base bounding boxes. For each of these base bounding boxes, YOLO predicts an offset off the base bounding box to predict what is the true location of the object off this base bounding box, a confidence score for the location and classification scores. To summarize, YOLO uses a single neural network for simultaneously predicting the location of the object, the confidence score for the location and classification scores. Compared with methods based on region proposals, YOLO is considered to be real time, but it also has relatively high detection accuracy. One version of YOLO training on the PASCAL VOC Sensors 2018, 18, 894 10 of 21 dataset [1] can achieve 40 Frames Per Second (FPS) and 78.6 mean Average Precision (mAP), while with the same training dataset, Faster R-CNN obtains 70 mAP and 0.5 FPS. In the YOLO paper [17], the authors admitted that they struggled to localize small objects, which can be mitigated by training special detectors for small objects, as shown in [36]. One thing we observe from the experiment is that YOLO is more sensitive to input changes than Faster R-CNN, which means that there would be more variety in YOLO’s outputs. This variety is a good fit for our proposed AABBFI method to produce a more accurate result. Therefore, YOLOv2 [18] is chosen in our proposed system to achieve real-time accurate detection for robust ADAS. 3.4. Fusion For the fusion part, the FM of agreement as defined in Section 2.4 is used. Herein, the AABB Fuzzy Integral (AABBFI) is proposed to fuse AABBs. In this paper, evidence is represented as an AABB. In other words, evidence is an AABB indicating where the network delineated the detected object’s boundaries. For example, an AABB can be represented by the coordinates of upper-left and bottom-right vertices, such as [1, 2, 3, 4], which means that the coordinates for the upper-left vertex are [1, 2], and the coordinates for the bottom-right vertex are [3, 4]. However, the FI have only been extended to one-dimensional interval-valued information. Herein, we extended it to two dimensions and specifically AABBs. Note, the advantages of an AABB are that (i) it is a convex and normal set and (ii) it can easily be decomposed without loss into two separate intervals, one on the row and one on the column axis. Hereby, the AABBFI is defined as follows: Definition 4 (AABB fuzzy integral). Let hi be the AABB evidence from the i-th input. Let h x,i ⊆ I be the interval-valued evidence for the x-axis of the i-th AABB from the i-th input. Furthermore, let [h x,i ]− and [h x,i ]+ be the left and right endpoints of interval h x,i . In the same way, let hy,i ⊆ I be the interval-valued evidence from AABB’s y-axis from the i-th input, and let [hy,i ]− and [hy,i ]+ be the top and bottom endpoints of interval hy,i . Herein, the membership at each location of the AABB is assumed to be one. The AABBFI can be computed as follows, Z Z h ◦ g = [ [h x ]− ◦ g, Z [hy ]− ◦ g, Z [h x ]+ ◦ g, Z [ h y ] + ◦ g ]. (4) Because an AABB is convex and the heights of all of our sets are one, we can disregard the third dimension (the “value” at each location in the AABB). These AABBs are assumed herein to be binary sets. Furthermore, the axis-aligned convexity makes proving Equation (4) trivial because it is easily decomposed; meaning each AABB can clearly be represented by the union of two closed intervals, and one can compute that as two separate individual interval-valued integrals and union the result (verifiable by the extension principle [37]). 4. Examples and Discussion In order to explain and validate the AABBFI fusion method, three synthetic examples are given. Then real-world ADAS examples are analyzed to reinforce the proposed system’s efficacy. For comparison with the proposed fusion method, two expected value operations, average and median, are chosen. They are two of the most commonly-used methods for summarizing multiple inputs into one output, and median operation is supposed to be robust to noise. 4.1. Synthetic Examples The following are three synthetic examples of different scenarios, where the first example has three similar AABBs; the second example has three AABBs with one outlier; and third example has three AABBs with one extreme outlier. These three different synthetic examples show how this fusion Sensors 2018, 18, 894 11 of 21 process works and give us some intuition about why the proposed AABBFI method works better than average and median operations. Example 1. Three similar AABBs: In the first example, there are three AABBs to be fused. The reason these AABBs are chosen is that they have the same size, and they overlap, which means that they are similar. The top and bottom vertices’ coordinates ([ xtop , ytop , xbottom , ybottom ]) are used to represent each AABB. The coordinates of the three AABBs are [1, 1, 4, 6], [2, 2, 5, 7], [3, 3, 6, 8], as shown in Figure 5. Note that the x and y axes units are arbitrary units of measure. The lattice of the FM of agreement is shown in Figure 6. The result using the proposed AABBFI method is shown in Figure 5 with the red dashed line, while the average result is shown with the yellow dashed line, and the median result is shown with the purple dashed line for comparison. The coordinates of the AABB obtained from the proposed AABBFI method are [1.44, 1.42, 4.44, 6.42]; the average AABB’s coordinates are [2, 2, 5, 7]; and the median AABB’s coordinates are [2, 2, 5, 7]. Figure 5. First example of fusing three similar AABBs. (a) (b) Figure 6. Lattice of the FM of agreement for the first example of three similar AABBs. See the text for an example of how to calculate g({ x1 , x2 }). (a) Lattice of the FM of agreement on the x-axis for the first example; (b) lattice of the FM of agreement on the y-axis for the first example. Sensors 2018, 18, 894 12 of 21 For the calculation of the FM of agreement, take the calculation of g({ x1 , x2 }) as an example. For the x-axis, the three intervals to be fused are x1 = [1, 4], x2 = [2, 5] and x3 = [3, 6]. From Equation (3b), we have: 2 2 4 2 g̃ AG ({ x1 , x2 }) = [1, 4] ∩ [2, 5] × = [2, 4] × = 2 × = 3 3 3 3 g̃ AG ({ x1 , x2 , x3 }) = ([1, 4] ∩ [2, 5]) ∪ ([1, 4] ∩ [3, 6]) ∪ ([2, 5] ∩ [3, 6]) × = [2, 4] ∪ [3, 4] ∪ [3, 5] × = [2, 5] × 2 3 + [1, 4] ∩ [2, 5] ∩ [3, 6] × 3 3 2 3 + [3, 4] × 3 3 2 3 2 +1× = 3× +1 = 3 3 3 3 From Equation (3c), the calculation is: g AG ({ x1 , x2 }) = 4 3 3 = 4 ≈ 0.44. 9 This value is shown in the shaded box in Figure 6a. Next, we show how to calculate the xtop coordinate using the proposed method. The xtop coordinates from the three AABBs are 1, 2 and 3, which means that the permutation sorting gives [h( xπ (1) )]− = 3, [h( xπ (2) )]− = 2, [h( xπ (3) )]− = 1. By using the FM in Figure 6a, we can calculate the xtop using Equations (1) and (4) as follows: xtop = R [ h x ]− ◦ g = 3 × [ g({ x3 }) − 0] + 2 × [ g({ x2 , x3 }) − g({ x3 })] + 1 × [ g({ x1 , x2 , x3 }) − g({ x2 , x3 })] = 3 × (0 − 0) + 2 × (0.44 − 0) + 1 × (1 − 0.44) = 1.44. In this example, three AABBs are similar, with the same size and overlapping with each other. Therefore, we expect the fused AABB to be influenced by all three AABBs, both in shape and position. From the result, we can see that the majority of the proposed AABB is the overlapping area of the three AABBs, and it has the same size, just like our expectation. On the other hand, the average AABB and median AABB are exactly the same as AABB 2, which may be or may not be influenced by AABB 1 and AABB 3. In the case of fusing three similar AABBs, the proposed method gives a result that fits our natural expectations. Example 2. Three AABBs with one outlier: In the second example, there are three AABBs to be fused, with one possible outlier being AABB 3, as AABB 3 has no overlapping area with AABBs 1 and 2. The three AABBs are [1, 1, 4, 6], [2, 2, 5, 7], [7, 4, 10, 9], as shown in Figure 7. The lattice of the FM of agreement is shown in Figure 8. The proposed AABBFI result is shown in Figure 7 with the red dashed line, with the average result with the yellow dashed line and median result with the purple dashed line. The proposed AABB’s coordinates are [1, 1.38, 4, 6.38]; the average AABB’s coordinates are [3.33, 2.33, 6.33, 7.33]; and the median AABB’s coordinates are [2, 2, 5, 7]. In this example, AABB 3 has no overlap with the other two AABBs, and it seems like an outlier even though it is the same size. We expect that the fused result should have more agreement with the first two AABBs. From the result, it is shown that the AABB from the proposed AABBFI method is most similar to AABB 1 and influenced by AABB 2 without any overlap with possible outlier AABB 3. On the other hand, if averaging the three AABBs, the result is shifted towards AABB 3, which means that the average result is influenced heavily by AABB 3. The median result is again the same as AABB 2, without any influence from either AABB 1 or AABB 3. The two results by average and median operations do not fit our expectation, while the result produced by the AABBFI method fits Sensors 2018, 18, 894 13 of 21 our expectation that the fused result is largely influenced by AABB 1 and AABB 2, with little influence from AABB 3. Figure 7. Second example of fusing three AABBs with one outlier. (a) (b) Figure 8. Lattice of the FM of agreement for the second example of three AABBs with one outlier. (a) Lattice of the FM of agreement on the x-axis for the second example; (b) lattice of the FM of agreement on the y-axis for the second example. Example 3. Three AABBs with one extreme outlier: In the third example, there are three AABBs to be fused with one obvious outlier AABB 3, which has a much smaller size than the other two and has no overlapping area. The three AABBs are [1, 1, 4, 6], [2, 2, 5, 7], [7, 8, 8, 9], as shown in Figure 9. The lattice of the FM of agreement is shown in Figure 10. The result from the proposed AABBFI method is shown in Figure 9 with the red dashed line. The average result is shown with the yellow dashed line and the median result with the purple dashed line. The proposed AABB’s coordinates are [1, 1, 4, 6]; the average AABB’s coordinates are [3.33, 3.66, 5.67, 7.33]; and the median AABB’s coordinates are [2, 2, 5, 7]. In this example, AABB 3 looks like an obvious outlier and should not influence the final fused result at all. From the fused result using the AABBFI method, we can see that the fused AABB is the same as AABB 1, without any influence from AABB 3, which is the same as our expectation. On the other hand, the average AABB is largely influenced by AABB 3. The average AABB not only shifts towards AABB 3, but also shrinks in size, which is different from our expectation. Once again, the Sensors 2018, 18, 894 14 of 21 median result is the same as AABB 2. Comparing the three fusion results, AABB by the proposed AABBFI fits our expectation most. Figure 9. Third example of fusing three AABBs with one extreme outlier. (a) (b) Figure 10. Lattice of the FM of agreement for the third example of three AABBs with one extreme outlier. (a) Lattice of the FM of agreement on the x-axis for the third example; (b) lattice of the FM of agreement on the y-axis for the third example. 4.2. ADAS Examples In the ADAS examples, we focus on the accurate detection of three types of objects: cones, pedestrians and boxes. The proposed system is also tested on all of the PASCAL VOC 2007 testing dataset, and mAP is calculated to show general improvement on detection [1,38]. One metric for measuring the accuracy of an object detector is called Intersection over Union (IoU), also known as the Jaccard index [39]. This index is used to compute the similarity between finite sets. Suppose we have two sets A and B, which could be two AABBs. To measure similarity between them, IoU can be used and is calculated as follows, Area o f Overlap | A B| S . = Area o f Union | A B| T IoU = J ( A, B) = (5) Sensors 2018, 18, 894 15 of 21 Herein, we use IoU as the primary metric for detection accuracy. We also utilize mAP to provide a metric that can be compared to many results in the literature. 4.2.1. Augmentation Methods In the experiments performed, the Python Imaging Library (PIL) is utilized [40] to obtain augmented images. In PIL brightness and contrast enhancement classes, a factor is used for the change of brightness and contrast. When this factor is one, it gives the original image. Based on the experimental evaluation, in ADAS examples, factor values are chosen to be 1, 0.25, 0.5, 1.5, 2.0 and 2.5 for brightness and contrast. To add Gaussian noise, the noise variance is chosen to be 0.001, 0.003 and 0.005. This is based on qualitative image assessment, since these noise levels do not drastically alter the appearance of the input image. Other augmentation methods, including edge enhancement, global histogram equalization and Gaussian blurring (radius = 2), are predefined image operations in PIL. 4.2.2. Datasets The primary research task is developing a robust system for ADAS, and two of the major objects that are crucial for detection in ADAS are traffic cones and pedestrians. In our specific industrial application, we also need to detect boxes, because they are commonplace items in our project’s industrial setting. Therefore, we collect cone, pedestrian and box images in controlled scenarios, which produce variations in different angles and distances. Specifically, the image dataset is collected using an FLIR Chameleon3 USB camera with a Fujinon 6-mm lens. Training images also include images taken by a Nikon D7000 camera and images from the PASCAL VOC dataset [1]. The total number of training images is around 22,000. For testing images, one cone, pedestrian or box is randomly placed or stands at different locations from 5 m to 20 m away and −20 degrees to +20 degrees in azimuth (left to right) from the camera, which covers the FLIR camera’s full field of view horizontally and the detection range. For traffic cones, there are 287 testing images; for pedestrian, there are 208 testing images; and for boxes, there are 200 testing images. For generalization purposes, we also show results for the PASCAL VOC 2007 test dataset [1]. 4.2.3. Training Parameters The network structure for YOLO is basically the same as the default structure of YOLOv2 [18] except the last layer. YOLOv2 divides each image into 13 by 13 grids. For our application, we predict five base bounding boxes for each grid in the image. For each box, there are 4 numbers (for the top left and bottom right coordinates of the AABB), 1 confidence score and 5 class scores. Therefore, we change the filter size to 13 × 13 × 50 (5 × (4 + 1 + 5) = 50) in the last layer. We also change the learning rate to 10−5 to avoid divergence. We use a batch size of 64, a momentum of 0.9 and a decay of 0.0005, which are the same as those in the original YOLOv2 configuration. For Faster R-CNN, the model is trained with a VGG net. Most parameters are set to be the same as the original Faster R-CNN [19]. The changes are as follows: the number of classes is modified to five; the number of outputs in the class score layer is modified to five; the number of outputs in the bounding box prediction layer is modified to 20 (4 × 5). 4.2.4. Results Figure 11 is one example image for pedestrian detection with ground-truth AABB, three AABBs from different augmented images and fused AABB using the proposed method. In this image, the yellow AABB is the ground-truth, which is human-determined and hand-labeled. Three augmentation methods are chosen, which are global histogram equalization, changing contrast with factor two and changing brightness with factor 2.5. The AABBs obtained from these augmented images are shown in white. The fused AABB using the proposed AABBFI method is shown in pink. Sensors 2018, 18, 894 16 of 21 Figure 11. Fusion of three detection AABBs (white) into one AABB (pink), compared with the ground-truth (yellow). The value of g({ x2 , x3 }) for the FM of agreement on the x-axis for cone detection is shown in Figure 12. From this figure, we can see that the value of the FM of agreement substantially changes from case to case. In other words, for each detection, the proposed fusion method gives different “weight” to each AABB, unlike the average operation, which gives the same “weight” around 0.33 when the number of AABBs to be fused is three. Figure 12. Value changes of g({ x2 , x3 }) for the FM of agreement on the x-axis for cone detection. In the experiment, we use a PC with an Intel i5-4460 dual-core CPU and one Nvidia GTX 1080 GPU. The computational overhead for AABBFI-based fusion is around 2.15 milliseconds (466 FPS), while for processing 10 augmented inputs, it is around 142.86 milliseconds (7 FPS). The fusion overhead is small compared to the overhead for using multiple inputs. The computational load is linear with the number of given inputs. More discussion about computational complexity is given in Section 4.3. All ADAS experiment results are shown in Table 2. In this table, the “No fusion” column means that the results are detection outputs from the original images without any fusion method applied. Sensors 2018, 18, 894 17 of 21 Under the “With fusion” section, four fusion methods are listed: NMS, average, median and the proposed AABBFI. Table 2. ADAS experimental results. Baseline means there is no fusion performed, that is only the original image is processed. No Fusion Fusion method Baseline With Fusion NMS Average Median Proposed 0.6676 287/287 0.6717 287/287 0.6763 287/287 0.6925 200/200 0.6872 200/200 0.7031 200/200 0.7966 208/208 0.8141 208/208 0.7581 206/208 0.7499 206/208 0.6728 72.41% 0.6746 72.87% YOLO Cone Average IoU Detection 0.6199 260/287 0.6676 287/287 YOLO Box Average IoU Detection 0.6722 200/200 0.6756 200/200 YOLO Pedestrian Average IoU Detection 0.7727 208/208 0.7023 208/208 0.7995 208/208 Faster R-CNN Pedestrian Average IoU Detection 0.7402 206/208 0.7377 206/208 0.7660 206/208 YOLO VOC 2007 All Average IoU mAP 0.6106 71.10% 0.6654 72.36% 0.6678 72.82% 4.3. Discussion For all five fusion/non-fusion methods, the average IoU obtained and the number of detections are listed. We find that for cones, pedestrians and boxes, the highest accuracy and detection happen when using the proposed AABBFI method together with YOLO. For the PASCAL VOC dataset [1], we use the threshold of 0.25 for the confidence score to calculate mAP, and we find that after fusion, not only the average IoU increases, but also mAP increases. In Table 2, we also include results on detecting pedestrians using Faster R-CNN [19]. Comparing the results, it is shown that YOLO outperforms Faster R-CNN both in accuracy and detection. Moreover, in the case that we choose Faster R-CNN as the detector, the AABBFI method does not help with accuracy compared with the average and median methods. Furthermore, Table 2 shows that mAP improves by using fusion. The mAP improved the most by using the proposed method. In table 2, the best results are shown in bold. From the synthetic results, it is clear that with the presence of possible or obvious outliers, the proposed AABBFI method can fuse the AABBs in a way more similar to our expectation, and it also can reduce or eliminate the effects of possible or obvious outliers. From the ADAS experimental results, there is improvement both on IoU and detection by using the proposed AABBFI method together with YOLO. Specifically, in most cases, fusion methods help with increasing detection. It is also shown that comparing with input images’ average IoU without fusion, by using the average, median and proposed fusion methods, the average IoU results increase. Comparing NMS, average, median and the proposed fusion operation, the proposed AABBFI method gives the average IoU the most improvement. From Figure 12, we can see that unlike the static operations such as average and median, the proposed fusion method is dynamic. The FM of agreement substantially changes from case to case. Consequently, the fusion is done in a detection-by-detection and object-by-object manner. For fusion, we evaluate the FM of agreement among AABBs for each detection and fuse them using a Sensors 2018, 18, 894 18 of 21 computationally-intelligent method named AABBFI. As mentioned in Section 1, the fusion for detection in this scenario cannot be learned in general and is done in a case-by-case manner in this paper. For the proposed AABBFI method, it works when the networks have variety in the results. Faster R-CNN is a region proposal-based method, which means that it uses part of its network to propose possible regions that could have objects we want to detect, and this may reduce the variety in the output. On the other hand, YOLO predicts both AABBs and labels through one giant network, which makes it fast. Furthermore, this kind of one-shot network design may produce more variations, which leads to more accurate output by using the AABBFI method. As a result, we choose YOLO together with the AABBFI method in the proposed system. The results from the ADAS experiments show that in cone, pedestrian and box detection, the proposed method gives the best results. In the ADAS examples, the improvement of both detection and IoU could come from two aspects. First, variation can lead to detection. In the original image, the detector might not be able to detect cones, pedestrians or boxes, but in its variations, the detector may work. Second, fusion based on agreement stabilizes the finally AABB. AABBFI is a dynamic fusion method that produces different result when the “agreement” among inputs changes. NMS is also a dynamic fusion method, but the results using it are not as good as the proposed fusion method. On the other hand, the average and median operations are both static, which means that they do not consider the specific characteristics of each input. To guarantee a real-time ADAS, we expect that the fusion adds as little computational complexity as possible to the original detection system. The computational complexity of the proposed AABBFI (fusion only) is actually tiny, which is O(n), where n stands for the number of input images. It is the same as NMS, average and median operation. This means that the four fusion methods all have the same low computational complexity and do not add much computational burden to the system. Another thing that may slow down the system is there are multiple augmented inputs that need to be processed. We can avoid the slowdown either via multiple processing units or a more powerful processing unit. This highlight a trade-off in many systems: there are multiple approaches, some more computationally complexity, and some less computationally complexity. Given sufficient hardware resources to keep an appropriate frame rate, the proposed solution is feasible. The computational overhead in Section 4.2.4 shows that with ten augmented images, using our hardware configuration, we can achieve real-time performance in our definition (5 Hz or above). In summary, from ADAS examples, we find that AABB-based fusion with YOLO produces the highest accuracy and detection results compared with other methods listed. From the synthetic example, we could obtain some rationality behind this improvement. The proposed system increases the accuracy in the detection stage while maintaining the real-time characteristic in the original detection system, which makes this a realistic solution for a real-time domain like ADAS. 5. Conclusions and Future Work This paper proposed a computational intelligence system for more accurate object detection in real time. This system uses augmentation methods before a deep learning detector and then an AABB fuzzy integral (AABBFI) on the resultant AABBs. Three synthetic examples show the rationality of using the AABBFI rather than NMS/average/median operation. Experimental ADAS examples show that for real-world datasets, the proposed system gives the highest accuracy and detection results, without adding much computational complexity for real-time purposes. Our proposed system is not only fast, but also accurate, which are two important criteria in ADAS. By using this computational intelligence system, we are able to build a more robust object detection sub-system for ADAS applications, with the proposed system showing improvement in both IoU and mAP metrics. Furthermore, very good results were obtained when only utilizing three combined inputs, making the computational load roughly three-times the load for only using one input (the original image). In the future, our next planned effort includes: (i) exploring different deep learning-based methods, (ii) studying why deep learning-based methods have such sensitivity to input variations, (iii) Sensors 2018, 18, 894 19 of 21 incorporating the detector’s confidence score in the detection result as height, (iv) non-AABB region fusion (non-convex and non-normal) and (v) using various FMs beyond the FM of agreement. Finally, we wish to thank the anonymous reviewers for their constructive comments, which have strengthened our paper. Author Contributions: Pan Wei conceived the proposed algorithm, designed and executed experiments, and wrote a majority of the paper. John Ball and Derek Anderson reviewed experimental results, provided technical guidance, reviewed and authored parts of the paper. Conflicts of Interest: The authors declare no conflict of interest. References 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. Everingham, M.; Van Gool, L.; Williams, C.K.; Winn, J.; Zisserman, A. The pascal visual object classes (voc) challenge. Int. J. Comput. Vis. 2010, 88, 303–338. Wei, P.; Ball, J.E.; Anderson, D.T.; Harsh, A.; Archibald, C. Measuring conflict in a Multi-source environment as a normal measure. In Proceedings of the 2015 IEEE 6th International Workshop on Computational Advances in Multi-Sensor Adaptive Processing (CAMSAP), Cancun, Mexico, 13–16 December 2015; pp. 225–228. Wei, P.; Ball, J.E.; Anderson, D.T. Multi-sensor conflict measurement and information fusion. In Signal Processing, Sensor/Information Fusion, and Target Recognition XXV; International Society for Optics and Photonics: Baltimore, MD, USA, 2016; Volume 9842, p. 98420F. Sugeno, M. Theory of Fuzzy Integrals and Its Applications. Ph.D. Thesis, Tokyo Institute of Technology, Tokyo, Japan, 1974. Murofushi, T.; Sugeno, M. An interpretation of fuzzy measures and the Choquet integral as an integral with respect to a fuzzy measure. Fuzzy Sets Syst. 1989, 29, 201–227. Grabisch, M.; Murofushi, T.; Sugeno, M. Fuzzy Measures and Integrals: Theory and Applications; Physica-Verlag: New York, NY, USA, 2000. Anderson, D.T.; Havens, T.C.; Wagner, C.; Keller, J.M.; Anderson, M.F.; Wescott, D.J. Extension of the fuzzy integral for general fuzzy set-valued information. IEEE Trans. Fuzzy Syst. 2014, 22, 1625–1639. Wagner, C.; Anderson, D. Extracting meta-measures from data for fuzzy aggregation of crowd sourced information. In Proceedings of the 2012 IEEE International Conference on Fuzzy Systems (FUZZ-IEEE), Brisbane, QLD, Australia, 10–15 June 2012; pp. 1–8. Havens, T.; Anderson, D.; Wagner, C.; Deilamsalehy, H.; Wonnacott, D. Fuzzy integrals of crowd-sourced intervals using a measure of generalized accord. In Proceedings of the 2013 IEEE International Conference on Fuzzy Systems (FUZZ), Hyderabad, India, 7–10 July 2013; pp. 1–8. Havens, T.; Anderson, D.; Wagner, C. Data-Informed Fuzzy Measures for Fuzzy Integration of Intervals and Fuzzy Numbers. IEEE Trans. Fuzzy Syst. 2015, 23, 1861–1875. Deng, J.; Dong, W.; Socher, R.; Li, L.J.; Li, K.; Fei-Fei, L. Imagenet: A large-scale hierarchical image database. In Proceedings of the 2009 IEEE Conference on Computer Vision and Pattern Recognition, Miami, FL, USA, 20–25 June 2009; pp. 248–255. Krizhevsky, A.; Sutskever, I.; Hinton, G.E. Imagenet classification with deep convolutional neural networks. In Advances in Neural Information Processing Systems; NIPS: Stateline, NV, USA, 2012; pp. 1097–1105. Zeiler, M.D.; Fergus, R. Visualizing and understanding convolutional networks. In Proceedings of the European Conference on Computer Vision, Zurich, Switzerland, 6–12 September 2014; Springer: Cham, Switzerland, 2014; pp. 818–833. Simonyan, K.; Zisserman, A. Very deep convolutional networks for large-scale image recognition. arXiv 2014, arXiv:1409.1556. Szegedy, C.; Liu, W.; Jia, Y.; Sermanet, P.; Reed, S.; Anguelov, D.; Erhan, D.; Vanhoucke, V.; Rabinovich, A. Going deeper with convolutions. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Boston, MA, USA, 7–12 June 2015; pp. 1–9. Sensors 2018, 18, 894 16. 17. 18. 19. 20. 21. 22. 23. 24. 25. 26. 27. 28. 29. 30. 31. 32. 33. 34. 35. 36. 37. 38. 20 of 21 He, K.; Zhang, X.; Ren, S.; Sun, J. Deep residual learning for image recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Seattle, WA, USA, 27–30 June 2016; pp. 770–778. Redmon, J.; Divvala, S.; Girshick, R.; Farhadi, A. You only look once: Unified, real-time object detection. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Seattle, WA, USA, 27–30 June 2016; pp. 779–788. Redmon, J.; Farhadi, A. YOLO9000: Better, Faster, Stronger. arXiv 2016, arXiv:1612.08242. Ren, S.; He, K.; Girshick, R.; Sun, J. Faster r-cnn: Towards real-time object detection with region proposal networks. In Advances in Neural Information Processing Systems; NIPS: Montreal, Quebec, Canada, 2015; pp. 91–99. Szegedy, C.; Reed, S.; Erhan, D.; Anguelov, D.; Ioffe, S. Scalable, high-quality object detection. arXiv 2014, arXiv:1412.1441. Li, Y.; He, K.; Sun, J. R-fcn: Object detection via region-based fully convolutional networks. In Advances in Neural Information Processing Systems; NIPS: Barcelona, Spain, 2016; pp. 379–387. Liu, W.; Anguelov, D.; Erhan, D.; Szegedy, C.; Reed, S.; Fu, C.Y.; Berg, A.C. SSD: Single shot multibox detector. In Proceedings of the European Conference on Computer Vision, Amsterdam, The Netherlands, 8–16 October 2016; Springer: Cham, Switzerland, 2016; pp. 21–37. Gidaris, S.; Komodakis, N. Locnet: Improving localization accuracy for object detection. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Seattle, WA, USA, 27–30 June 2016; pp. 789–798. Girshick, R. Fast r-cnn. arXiv 2015, arXiv:1504.08083. Felzenszwalb, P.F.; Girshick, R.B.; McAllester, D.; Ramanan, D. Object detection with discriminatively trained part-based models. IEEE Trans. Pattern Anal. Mach. Intel. 2010, 32, 1627–1645. Hosang, J.; Benenson, R.; Schiele, B. Learning non-maximum suppression. arXiv 2017, arXiv:1705.02950 . Bodla, N.; Singh, B.; Chellappa, R.; Davis, L.S. Improving object detection with one line of code. arXiv 2017, arXiv:1704.04503. Lin, G.; Milan, A.; Shen, C.; Reid, I. Refinenet: Multi-path refinement networks for high-resolution semantic segmentation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Hawaii Convention Center, HI, USA, 21–26 July 2017. Howard, A.G. Some improvements on deep convolutional neural network based image classification. arXiv 2013, arXiv:1312.5402. Huang, G.; Li, Y.; Pleiss, G.; Liu, Z.; Hopcroft, J.E.; Weinberger, K.Q. Snapshot ensembles: Train 1, get M for free. arXiv 2017, arXiv:1704.00109. Malisiewicz, T.; Gupta, A.; Efros, A.A. Ensemble of exemplar-svms for object detection and beyond. In Proceedings of the 2011 IEEE International Conference on Computer Vision (ICCV), Barcelona, Spain, 6–13 November 2011; pp. 89–96. Maree, R.; Geurts, P.; Piater, J.; Wehenkel, L. Random subwindows for robust image classification. In Proceedings of the 2005 IEEE Computer Society Conference on Computer Vision and Pattern Recognition, San Diego, CA, USA, 20–25 June 2005; Volume 1; pp. 34–40. Rafiee, G.; Dlay, S.S.; Woo, W.L. Region-of-interest extraction in low depth of field images using ensemble clustering and difference of Gaussian approaches. Pattern Recognit. 2013, 46, 2685–2699. Lloyd, S. Least squares quantization in PCM. IEEE Trans. Inf. Theory 1982, 28, 129–137. Islam, M.A.; Anderson, D.T.; Pinar, A.J.; Havens, T.C. Data-Driven Compression and Efficient Learning of the Choquet Integral. IEEE Trans. Fuzzy Syst. 2017, doi:10.1109/TFUZZ.2017.2755002. Hu, P.; Ramanan, D. Finding tiny faces. In Proceedings of the 2017 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Hawaii Convention Center, HI, USA, 21–26 July 2017; pp. 1522–1530. De Barros, L.C.; Bassanezi, R.C.; Lodwick, W.A. The Extension Principle of Zadeh and Fuzzy Numbers. In A First Course in Fuzzy Logic, Fuzzy Dynamical Systems, and Biomathematics; Springer: Berlin/Heidelberg, Germany, 2017; pp. 23–41. Everingham, M.; Winn, J. The PASCAL Visual Object Classes Challenge 2012 (VOC2012) Development Kit. http://host.robots.ox.ac.uk/pascal/VOC/voc2012/#devkit (accessed on 13 November 2017). Sensors 2018, 18, 894 39. 40. 21 of 21 Jaccard, P. Étude comparative de la distribution florale dans une portion des Alpes et des Jura. Bull. Soc. Vaud. Sci. Nat. 1901, 37, 547–579. Lundh, F.; Contributors. Python Imaging Library. 2016. http://pillow.readthedocs.io/en/3.1.x/index.html (accessed on 13 November 2017). c 2018 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).
2cs.AI
Safer Classification by Synthesis arXiv:1711.08534v1 [cs.LG] 22 Nov 2017 William Wang, Angelina Wang, Aviv Tamar, Xi Chen & Pieter Abbeel Dept. of Electrical Engineering and Computer Sciences UC Berkeley Berkeley, CA 94709 Abstract The discriminative approach to classification using deep neural networks has become the de-facto standard in various fields. Complementing recent reservations about safety against adversarial examples, we show that conventional discriminative methods can easily be fooled to provide incorrect labels with very high confidence to out of distribution examples. We posit that a generative approach is the natural remedy for this problem, and propose a method for classification using generative models. At training time, we learn a generative model for each class, while at test time, given an example to classify, we query each generator for its most similar generation, and select the class corresponding to the most similar one. Our approach is general and can be used with expressive models such as GANs and VAEs. At test time, our method accurately “knows when it does not know,” and provides resilience to out of distribution examples while maintaining competitive performance for standard examples. 1 Introduction “What I cannot create, I do not understand.” This famous quote by Richard Feynman stands in stark contrast to the majority of image classification breakthroughs of the last decade. The prevalent deep learning approach is discriminative, where a deep network maps an observation into a probability over decisions, providing little to no understanding of why a particular decision is chosen (e.g., Krizhevsky et al. 2012, Szegedy et al. 2015, He et al. 2016 among others). While this approach has demonstrated remarkable empirical results, its opaque nature raises questions of safety and trust [Amodei et al., 2016]. For example, much attention has recently been focused on dealing with adversarial perturbations to discriminative image classifiers, which make small image modifications that result in misclassification [Goodfellow et al., 2014b]. In this work we complement this view, by showing that discriminative models can also be easily fooled to give erroneous predictions with a high confidence for out-of-distribution examples, which are significantly different from examples in the data. Motivated by the safety issues of discriminative classifiers, in this work we propose a safer generative image classification paradigm. We build on recent breakthroughs in deep generative modelling such as variational autoencoders (VAEs; Kingma and Welling 2014) and generative adversarial nets (GANs; Goodfellow et al. 2014a), which have shown convincing results for generating complex observations such as images directly from data. Our idea is to use labeled training data for building generative models for images from each class. In these models (either GANs or VAEs), a random input vector is transformed by a deep neural network into an image. At test-time, given an image to classify, we search across the input vectors for an image that is sufficiently similar to the test image, across all the generators. The corresponding class of the best image is taken as the classification result. An immediate benefit of this approach is interpretability – once a class decision is made, we know exactly why it was chosen, since we readily know the image which our model imagined as most representative of it. Another benefit, which we show here to be significant, is safety. When a traditional discriminative model is trained to classify, say, road signs, we have no idea what it would do when faced with an out-of-distribution example, say, of an elephant. This poses a severe problem for safety critical systems such as self driving cars. Our model, by definition, would never generate an image of an elephant if elephant images are not in the training data. Thus, distinguishing when the model does not know becomes straightforward. This brings us back to the premise in the Feynman quote. For objects that we understand, and can therefore reliably generate, our model provides reliable classification. 1.1 Related Work Generative classification is an old idea. Using shallow architectures, Ng and Jordan [2002] compared discriminative and generative learning by investigating logistic regression and naive Bayes, and observed improved performance of generative models in low-data regimes. Jaakkola and Haussler [1999] used a generative model to extract kernels for a discriminative logistic regression classifier. In the seminal work of Hinton et al. [2006] on deep belief networks (DBNs), deep generative models for images and matching class labels were learned. For classification using DBNs, the image is used to calculate activations of a restricted Boltzman machine (RBM) for the image and label, which are clamped, and MCMC sampling is then used to generate the corresponding label. Over the last decade, DBNs have been outperformed by discriminative models trained using backpropagation [Vincent et al., 2010, Krizhevsky et al., 2012]. More recently, generative models that can be trained using backpropagation have become popular. VAEs [Kingma and Welling, 2014] and GANs [Goodfellow et al., 2014a] can be seen as extensions of the Helmholtz machine model [Dayan et al., 1995], where a random vector with a known distribution is mapped through a neural network to generate the data distribution. VAEs can be trained using a variational lower bound, while GANs are trained using an adversarial method. While such generative models have been used with success in semi-supervised learning [Kingma et al., 2014], they have not yet been explored in the context of supervised learning. Given a test image, the VAE recognition network can be used to sample from the distribution over latent variables, and generate a similar image. For GANs, models that learn an inference network have been proposed [Donahue et al., 2017, Dumoulin et al., 2017]. In this work we describe an alternative inference approach for GANs that does not require a change to the training objective. Selective classification [Chow, 1957, El-Yaniv and Wiener, 2010] is an established approach for improving classification accuracy by rejecting examples that fall below a confidence threshold. In this work we use this method for rejecting out-of-distribution examples based on the confidence score. We build on the recent work of Geifman and El-Yaniv [2017], who investigated suitable confidence scores for deep neural networks. Very recently, Mandelbaum and Weinshall [2017] studied different distance metrics for use as a confidence score. In concurrent work by other authors, generative models have been used to detect examples that are outliers or outside the training distribution. Anonymous [2018a] uses a similar technique of searching over the latent space of a GAN to discover outliers, but does not use such a technique for classification. Anonymous [2018b] trains GANs with feature matching loss to develop a model that is capable of simultaneous classification and novelty detection. While both of these use ROC curves to benchmark their model, in our context of classification, we believe that the risk-coverage analysis is more appropriate, as it evaluate the confidence of both classification performance and novelty detection. An ROC analysis of novelty detection, on the other hand, ignores information about the classification accuracy. 1.2 Our Contribution In this work we make the following contributions. 1. Using the selective classification paradigm, we show in a principled way that discriminatively trained deep neural networks can easily be fooled by out-of-distribution examples. 2. We propose a general method for generative classification, that can be used with either GANs, VAEs, or even K-nearest neighbor methods as the generative model. 2 3. We show that our method can provide significantly better resilience to out-of-distribution examples, while maintaining competitive accuracy on within-class examples. 2 Preliminaries Consider a classification problem with K classes. The inputs (e.g., images) are denoted by x and the outputs (classes) are denoted by y. Our data consists of pairs {xi , yi }, where xi ∼ P (x) and yi ∼ P (y|xi ). Discriminative classification learns P a model Pθ (y|x) with parameters θ, typically by maximizing the data log-likelihood maxθ i log Pθ (yi |xi ). A popular model for classification is the softmax exp f (x) Pθ (y = k|x) = P expθ,k fθ,j (x) , where fθ,k (x) for k = 1, ..., K are a deterministic functions, e.g., the j outputs of a neural network with weights θ. 2.1 Generative Models The central component of our method is a generative model G, which takes as input a random m-dimensional latent vector z from a distribution P (z) and learns to transform z into a sample from P (x). Learning G is an unsupervised learning task, and recently, several efficient training methods that use backpropagation were proposed, such as GANs [Goodfellow et al., 2014a] and VAEs [Kingma and Welling, 2014]. GANs are adversarially trained networks consisting of a generator and a discriminator. The generator network takes a latent vector and produces an image, while the discriminator network takes an image and outputs a predicted probability that this image came from the distribution of the training set. Training consists of a two-player game where the generator tries to produce images that the discriminator is unable to distinguish from the training distribution, while the discriminator improves its ability to discern between real data and generated images. VAEs are trained using a variational lower bound, by learning a encoder network that maps a training image into a corresponding distribution over the latent vector, and a decoder network that maps the latent vector back into an image. The training balances the reconstruction loss of the decoder with the Kullback-Leibler distance of the encoded latent vector distribution from P (z). 2.2 Selective Classification A central motivation for our approach is accurately identifying when the classifier ‘does not know’ the correct class. This problem, typically explored in the context of discriminative classification, is known as selective classification [Geifman and El-Yaniv, 2017]. Suppose we have a classifier f which takes as input an image and outputs a predicted class along with a measure of confidence in its prediction. For example, f could be a CNN with the maximum softmax output as its confidence. Selective classifiers abstain from prediction if the confidence score is below a certain threshold θ. The threshold parameter thus offers a balance between the proportion of the data classified and the accuracy on this portion of the dataset. The coverage of a selective classifier with threshold θ is defined as the proportion of test observations that are classified with confidence greater than θ [ElYaniv and Wiener, 2010]. The empirical risk given θ is then defined as the error rate on the subset of the test set that was classified with confidence greater than θ. A principled method for comparing selective classifiers is to examine their risk-coverage plots, as exemplified in Figure 1. Classifiers with meaningful measures of confidence should predict difficult or out of distribution images with lower confidence, and thus, as the coverage is decreased, the risk should shrink to zero. Recently, Geifman and El-Yaniv [2017] showed that for discriminatively-trained CNNs, thresholding the softmax output provides state-of-the-art selective classification, surpassing alternative confidence measures such as MC-Dropout [Gal and Ghahramani, 2016]. 3 Figure 1: Risk-coverage plot for a CNN trained on MNIST. Observe that we can choose a confidence threshold such that around 90% of the data is covered, and for this data portion the classification is perfect. As we increase the desired coverage, the accuracy decreases (risk increases). Choosing a threshold that covers more than 99 percent of the data will result in a sharp decrease in accuracy, which indicates that the low-confidence predictions generally correspond to misclassified data, as we would expect. 3 Discriminative Models are Easily Fooled by Out-of-Distribution Examples We begin our discussion by showing that a discriminatively trained CNN can easily be fooled to give high-confidence predictions to out-of-distribution examples – examples that are significantly different from any example in its training data, and that do not correspond to any particular class it was trained to predict. We present our results under the selective classification paradigm, for a principled evaluation of confidence and accuracy. Consider the classification task where a selective classifier is trained on data containing a certain set of classes, but is tested on data X1 ∪ X2 where X1 contains data from classes seen during training and X2 contains data that do not match any of the classes seen in the training set. Obviously, the classifier will be unable to correctly classify any points in X2 , so we expect it to abstain from prediction on these points. Concretely, we would like to pick a threshold θ such that most points in X2 have confidence less than θ and so are left unclassified, while most points in X1 have confidence greater than θ and are classified correctly. If the data in X1 and X2 is significantly different and our confidence measure is reliable, we should be able to determine such a threshold. Unfortunately, as we show next, discriminative CNN classifiers are easily fooled to give highconfidence predictions for out-of-distribution examples that are wildly different from their training data. 3.1 MNIST Augmented with Omniglot We train a standard CNN on the well-known MNIST dataset and test its selectivity by running predictions on MNIST augmented with 31460 rescaled images from the Omniglot dataset. The Omniglot dataset, compiled by Lake et al. [2015], contains handwritten characters from 50 different alphabets, such as in Figure 2b. The images were resized with nearest neighbor interpolation in order to be the same 28 by 28 size as MNIST. We removed some ambiguous images such as those in Figure 2c, where characters from different languages resembled digits to the point that even a human would categorize them as numerical digits. Our augmented dataset is composed of 24 percent MNIST data and 76 percent Omniglot. Because the Omniglot images we chose to include 4 (a) MNIST (b) Omniglot (c) Removed Omniglot Figure 2: MNIST and Omniglot data Figure 3: Risk-coverage for CNN on augmented dataset. The lowest attainable risk is .061. do not resemble the images from the MNIST training set, we should expect the CNN to predict these images with low confidence. Thus, we expect the risk-coverage plot1 to be similar to Figure 1 in that it starts off low and increases once the images the CNN is uncertain about are included in classification. Because MNIST composes 24 percent of our data and the CNN performs well on the MNIST dataset, we expect a flat line that begins to rise monotonically after the 24 percent coverage mark. Further, we expect the risk to decrease towards 0 as we decrease the coverage this “vanishing risk” property reflects the idea that increased confidence should be associated with increased classification accuracy, and can be observed in the MNIST experiment in Figure 1. However, the risk-coverage plot we actually obtained for this experiment, shown in Figure 3, does not exhibit the vanishing risk property. The lowest risk attainable by the CNN is .061 using the maximum possible confidence threshold of 1 (up to floating point precision) – in this case, 343 of the 5644 images classified with this threshold of confidence were Omniglot images. These images, displayed in Figure 4, attain the highest level of confidence despite not resembling any digit from the MNIST training set, and thus there is no choice of threshold that will allow the CNN to abstain from classifying these images. Combining the risk-coverage results from the MNIST and augmented MNIST datasets, we see that if an image is classified with low confidence, then it is likely an incorrect classification, but the converse is not true: if an image would be incorrectly classified, then there is still a good chance that its prediction confidence was high. Thus the CNN confidence metric does not accurately reflect the ability of the classifier to make an precise prediction, given out-of-distribution examples. The results on this toy example may seem innocuous at first glance. However, one can easily imagine a scenario where such performance would lead to dire consequences. For example, a realistic scenario for self-driving cars is to defer a decision about road signs to a human based on its confidence in prediction. From what we learned in this toy example, a CNN confidence cannot be trusted if, say, 1 For calculating the risk in the risk coverage plot with the augmented data set, every prediction of an Omniglot image is considered to be wrong. 5 Figure 4: Omniglot Images Classified by CNN with Highest Confidence a new road sign is introduced, but also if any random object not seen during training is encountered on the road. Figure 5: An illustration of an out-of-distribution example with a discriminative classifier. Here, a classifier discriminates between the square and circle examples. We can relate the confidence of the classifier with the distance to the decision boundary. As shown, an out-of-distribution example that is far away from this boundary will be classified with a high confidence to belong, in this case, to the class of circles. In principle, the fact that a discriminative approach can be fooled by out-of-distribution examples should not be very surprising. In Figure 5 we provide an explanation for this result in a simple binary classification task. Intuitively, the confidence of a discriminative classifier can be related to the distance from the decision boundary. Therefore, we can imagine that there exists examples that are very different from our data, but still lie far away from the decision boundary, and therefore have a high confidence value. While it is not immediate that the conclusion from this toy example carries over to high-dimensional problems and expressive CNN classifiers, our results above suggest that this is indeed the case. From Figure 5 it is also clear that a viable solution for the out-of-distribution detection problem is to identify examples that are too far, in some suitable distance metric, from the training data [Mandelbaum and Weinshall, 2017]. The problem then becomes how to identify a suitable distance metric, and how to compute the distance efficiently, as typically the distance computation scales with the amount of training data. In the following we propose an alternative approach based on generative models. The idea is that by learning to generate samples from a low-dimensional latent vector, we would effectively learn the manifold for each class. The distance to each manifold is expected to be a reliable measure for classification confidence. 4 Generative Approach to Classification We now propose a different approach to classification, which, by relying on a generative model, provides a better signal for knowing when an example from an unknown class is encountered. 6 4.1 Generative Classifier Model Our generative classifier consists of class-conditional generative models Gk (z) and a similarity measure s(x1 , x2 ). Each generator takes as input a latent variable (say, a random uniform variable over [−1, 1]m ) and outputs a generated image of its respective class. The similarity measure s(x1 , x2 ) could be the negative L2 or L1 distance between x1 and x2 2 , or it could be a more complex function such as a Siamese network [Koch et al., 2015] that predicts the probability the two images are of the same class. In this work we only consider the negative L2 distance, which allows a fair comparison with conventional novelty detection approaches that use similarity metrics. In the future we will investigate using alternative measures of similarity not exclusive to metrics. To classify a test image x with class y, for each generator Gk , we solve the following optimization problem: zk∗ = arg max s(x, Gk (z)) (1) z That is, for each class k, we find the most similar image in the range of Gk to the test image x under the similarity measure s, and keep track of the latent vector that produces it, zk∗ . Once we have the optimal latent vectors for each class, we classify x as arg max s(x, Gk (zk∗ )) k In practice, (1) is a non-convex optimization problem. As an optimization heuristic, we perform Monte Carlo sampling from P (z), evaluate the similarity to the generated image for each latent variable, and use the optimal latent vector as a starting point for a further non-linear optimization method such as L-BFGS [Nocedal, 1980]. If the generative model is a VAE with a Gaussian latent model, then we also have the option of feeding the test image into the encoder network to obtain a parameter estimate for the mean of the Gaussian and use that as a heuristic to solve the optimization. We find that this method works better in practice for the goal of classification accuracy. 4.2 Comparison with Nearest Neighbors Our approach has parallels with the 1-nearest neighbor classifier - in both methods, to classify a test point, there is an optimization performed to find the most similar match over some set of images with known classes. For nearest neighbors, this is the training set, while for our generative classifier, this is the set of all images that are in the range of our generators. Because the generators are presumably capable of reproducing the training set, we would expect our method to outperform nearest neighbors in classification accuracy, as long as the generator spaces for each class do not intersect. Nearest neighbors can be improved on by using different distance metrics - for example, the L3 distance is known to outperform the L2 distance on MNIST. Similarly, it would be possible to use such distance metrics with our generative classifier. While the runtime of nearest neighbors increases with the number of training samples, our method does not, and its runtime is controlled by hyperparameters for the optimization routine. Nearest neighbors has the desirable property of interpretability - with any prediction, there is a rationale for the prediction in the form of the closest image to the test point and its metric score. By using this score as a confidence value, we can view KNN as a selective classifier, and we would expect that higher confidence thresholds would lead to more accurate predictions. Our generative classifier retains these properties - for example, we can visualize the optimization procedure, yielding a set of images that explains why our classifier made its prediction (Figure 6). We can also take the maximum similarity as a confidence measure for the purpose of selective classification, and intuitively this should accurately reflect the ability of the classifier to accurately make a prediction. 7 Figure 6: MNIST classification performed by a generative classifier: test image on the left accompanied with generated images and their L2 distances to test point. All generators try their best to match the test image, and the predicted class is the class of the image that most closely matches the test image in L2 distance. (a) The GAN and VAE misclassify the 6, but their predicted classes disagree. Both generated images exhibit a right slant to match the test image. (b) The 8 and 6 generators for GAN and VAE respectively are capable of producing an image similar to the 5 in L2 distance. Figure 7: The mistakes made by the generative classifier can be interpretable - on the left we see that the model has not learned how to reproduce the test image, resulting in an unconfident, incorrect prediction. On the right we see that the generator of an incorrect class is capable of reproducing the test image to some extent, pointing to degeneracies in the generator space. 5 MNIST Experiments 5.1 Model Training For the generative models, we trained DCGANs [Radford et al., 2015] with a 15-dimensional latent space and VAEs with a 10-dimensional latent space - the dimensions were chosen by crossvalidation. For both generative models, we used an L2 similarity measure. To train the DCGANs, we employed techniques such as label smoothing [Salimans et al., 2016], noise injection [Arjovsky and Bottou, 2017], and weight normalization [Salimans and Kingma, 2016], which helped to improve the quality of the images and stabilize training. 5.2 Results Using a DCGAN as our generative model, we achieved an accuracy of 97.81 percent on MNIST. Using a VAE with the encoder output in place of iterative optimization, we achieved an accuracy of 98.35 percent. As a baseline, 1 nearest neighbor achieves an accuracy of 96.91 percent. In addition, the mistakes made by the generative classification method are readily interpretable - in Figure 7a, both GAN and VAE models are unable to produce the 6 that is in the test set, which demonstrates that this test 6 is dissimilar from the 6’s seen in the training set and thus is more difficult to correctly classify. Indeed, the confidence for the GAN and VAE predictions lie within the bottom 5.48 and 7.07 percentiles of the confidences for these respective models. However, one issue with this classification method is that it highly depends on the regularity of the images that are produced by the generators - if a test image is a 5 and the 8 generator is capable of producing something that looks like the 5, then it is possible for our method to misclassify the 5 as an 8 - see Figure 7b. We observed similar results when using various recent generative model formulations that are known to produce high quality images such as Wasserstein GAN [Arjovsky et al., 2017]. One possible fix is to try alternative similarity measures - the two images that are produced by the generators in Figure 7b are similar to the test image in L2 distance, but they may not be close with respect to another similarity measure. On the other hand, the optimization procedure can exploit 2 These similarities would be the negative distance, since according to our convention, larger values of s(x1 , x2 ) should mean the images are more similar. 8 more complex neural network similarity metrics by finding images that do not visually resemble the test image but still produce high similarity scores. Another approach would be to train the generators in such a way that the search space for a certain conditional generator does not contain examples from other classes. For example, BEGAN [Berthelot et al., 2017] is a variation of GAN with a hyperparameter that controls the trade-off between image quality and image diversity, so it is possible that emphasizing image quality would remove such out-of-distribution examples from each conditional GAN’s search space. Figure 8: MNIST images misclassified by KNN but correctly classified by VAE-based GC using L2 distance from test image. Each horizontal triplet of images shows the test image, the nearest neighbor in the data, and the VAE generated image. The VAE is able to produce images very similar to the test image, while no such images of the correct class exist in the training set and so KNN misclassifies the data. 6 Out-of-Distribution Results for Generative Classifiers We run the same out of distribution experiment on Omniglot-augmented MNIST using the generative classifier models described above. We find that although the generative classifier with L2 distance has a lower baseline performance than the CNN on the original test set, it does possess the vanishing risk property even with the inclusion of out-of-distribution examples, as demonstrated in the risk-coverage plot in Figure 9b. This means that in contrast to the CNN, the risk can be driven down to zero by increasing the selectivity - thus the confidence measure really does reflect the classifier’s inherent ability to classify an image. As an example, Figure 10 displays the optimal images produced by our generators on an Omniglot image that was classified by a CNN with the highest possible confidence. Our generators are unable to match this image, and the closest L2 distance achieved is on the order of 10−2 , as opposed to the L2 distances on the order of 10−3 on MNIST images as seen in Figure 6. The lower confidence score of the generative classifier on Omniglot reflects the fact that we cannot actually classify these images correctly, while the high confidence of the CNN on these images misleads us to believe that we are capable of doing so. In order to improve the accuracy on MNIST while preserving our desirable selectivity properties, we can first use the generator confidence to determine coverage – after thresholding appropriately, we can use the CNN to make a final classification of the data. This procedure of generative novelty detection and CNN classification results in a risk-coverage curve that lies entirely at or below the CNN curve (Figure 9a). Thus we are able to maintain the same performance on MNIST while achieving the desired selectivity properties. Future work in improving the generative models and selecting an appropriate similarity measure may result in a generative classifier that can simultaneously outperform the CNN in classification and serve as a novelty detector. 7 Conclusion We proposed a general method for classification using generative models that can be used with various VAE and GAN models. As we have shown, the generative approach offers resilience to misclassification of out-of-distribution examples, and provides a reliable measure of classification confidence. Much more work is required to scale our approach to more challenging image recognition domains. At present, we are not aware of generative models that can reliably capture the latent manifold of 9 (a) Using a GC as novelty detection globally outperforms using the CNN softmax threshold. (b) The GC outperforms the CNN for low values of coverage. Figure 9: Risk-coverage for generative classifier. Left: results for the generative classifiers (VAE and GAN) vs. the discriminative CNN. Note that for low coverage, the generative classifiers perform better (risk is lower and vanishes to zero). For higher coverage, the CNN outperforms the generative models due to its higher accuracy on in-distribution examples. Right: using the generative models for novelty detection and the CNN for classification, we obtain models that outperform the discriminative CNN for all coverage values. Figure 10: An Omniglot image classified with high confidence by a CNN is classified with low confidence by a GAN-based generative classifier. The L2 distance to the closest image is an order of magnitude higher than that of the MNIST images in Figure 6. complex realistic images such as in the Imagenet dataset [Deng et al., 2009], although considerable progress has been made [e.g., the impressive results of Karras et al., 2017]. We believe that our work provides additional motivation for further improving the performance of generative models. Our work also offers a possible principled way of evaluating a generative model by its performance when used as a generative classifier. Future research in fundamentally understanding and controlling the behavior of generative models will increase their effectiveness when applied to problems such as safe prediction. References Dario Amodei, Chris Olah, Jacob Steinhardt, Paul Christiano, John Schulman, and Dan Mané. Concrete problems in ai safety. arXiv preprint arXiv:1606.06565, 2016. Anonymous. Anomaly detection with generative adversarial networks. International Conference on Learning Representations, 2018a. URL https://openreview.net/forum?id= S1EfylZ0Z. Anonymous. Novelty detection with gan. International Conference on Learning Representations, 2018b. URL https://openreview.net/forum?id=Hy7EPh10W. Martin Arjovsky and Léon Bottou. Towards principled methods for training generative adversarial networks. arXiv preprint arXiv:1701.04862, 2017. Martin Arjovsky, Soumith Chintala, and Léon Bottou. arXiv:1701.07875, 2017. Wasserstein gan. arXiv preprint David Berthelot, Tom Schumm, and Luke Metz. Began: Boundary equilibrium generative adversarial networks. arXiv preprint arXiv:1703.10717, 2017. 10 Chi-Keung Chow. An optimum character recognition system using decision functions. IRE Transactions on Electronic Computers, EC-6(4):247–254, 1957. Peter Dayan, Geoffrey E Hinton, Radford M Neal, and Richard S Zemel. The helmholtz machine. Neural computation, 7(5):889–904, 1995. J. Deng, W. Dong, R. Socher, L.-J. Li, K. Li, and L. Fei-Fei. ImageNet: A Large-Scale Hierarchical Image Database. In CVPR09, 2009. Jeff Donahue, Philipp Krähenbühl, and Trevor Darrell. Adversarial feature learning. In Proceedings of the International Conference on Learning Representations (ICLR), 2017. Vincent Dumoulin, Ishmael Belghazi, Ben Poole, Alex Lamb, Martin Arjovsky, Olivier Mastropietro, and Aaron Courville. Adversarially learned inference. In Proceedings of the International Conference on Learning Representations (ICLR), 2017. Ran El-Yaniv and Yair Wiener. On the foundations of noise-free selective classification. Journal of Machine Learning Research, 11(May):1605–1641, 2010. Yarin Gal and Zoubin Ghahramani. Dropout as a bayesian approximation: Representing model uncertainty in deep learning. In international conference on machine learning, pages 1050–1059, 2016. Yonatan Geifman and Ran El-Yaniv. Selective classification for deep neural networks, 2017. Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. In Advances in neural information processing systems, pages 2672–2680, 2014a. Ian J Goodfellow, Jonathon Shlens, and Christian Szegedy. Explaining and harnessing adversarial examples. arXiv preprint arXiv:1412.6572, 2014b. Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 770–778, 2016. Geoffrey E Hinton, Simon Osindero, and Yee-Whye Teh. A fast learning algorithm for deep belief nets. Neural computation, 18(7):1527–1554, 2006. Tommi Jaakkola and David Haussler. Exploiting generative models in discriminative classifiers. In Advances in neural information processing systems, pages 487–493, 1999. Tero Karras, Timo Aila, Samuli Laine, and Jaakko Lehtinen. Progressive growing of gans for improved quality, stability, and variation. arXiv preprint arXiv:1710.10196, 2017. Diederik P Kingma and Max Welling. Auto-encoding variational bayes. In Proceedings of the 2nd International Conference on Learning Representations (ICLR), 2014. Diederik P Kingma, Shakir Mohamed, Danilo Jimenez Rezende, and Max Welling. Semi-supervised learning with deep generative models. In Z. Ghahramani, M. Welling, C. Cortes, N. D. Lawrence, and K. Q. Weinberger, editors, Advances in Neural Information Processing Systems 27, pages 3581–3589, 2014. Gregory Koch, Richard Zemel, and Ruslan Salakhutdinov. Siamese neural networks for one-shot image recognition. In Proceedings of the 32nd international conference on Machine learning. ACM, 2015. Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. In Advances in neural information processing systems, pages 1097–1105, 2012. Brendan M Lake, Ruslan Salakhutdinov, and Joshua B Tenenbaum. Human-level concept learning through probabilistic program induction. Science, 350(6266):1332–1338, 2015. 11 Amit Mandelbaum and Daphna Weinshall. Distance-based confidence score for neural network classifiers. arXiv preprint arXiv:1709.09844, 2017. Andrew Y Ng and Michael I Jordan. On discriminative vs. generative classifiers: A comparison of logistic regression and naive bayes. In Advances in neural information processing systems, pages 841–848, 2002. Jorge Nocedal. Updating quasi-newton matrices with limited storage. Mathematics of computation, 35(151):773–782, 1980. Alec Radford, Luke Metz, and Soumith Chintala. Unsupervised representation learning with deep convolutional generative adversarial networks. arXiv preprint arXiv:1511.06434, 2015. Tim Salimans and Diederik P Kingma. Weight normalization: A simple reparameterization to accelerate training of deep neural networks. In Advances in Neural Information Processing Systems, pages 901–909, 2016. Tim Salimans, Ian Goodfellow, Wojciech Zaremba, Vicki Cheung, Alec Radford, and Xi Chen. Improved techniques for training gans. In Advances in Neural Information Processing Systems, pages 2234–2242, 2016. Christian Szegedy, Wei Liu, Yangqing Jia, Pierre Sermanet, Scott Reed, Dragomir Anguelov, Dumitru Erhan, Vincent Vanhoucke, and Andrew Rabinovich. Going deeper with convolutions. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 1–9, 2015. Pascal Vincent, Hugo Larochelle, Isabelle Lajoie, Yoshua Bengio, and Pierre-Antoine Manzagol. Stacked denoising autoencoders: Learning useful representations in a deep network with a local denoising criterion. Journal of Machine Learning Research, 11(Dec):3371–3408, 2010. 12
2cs.AI
Quantized Minimax Estimation over Sobolev Ellipsoids arXiv:1503.07368v3 [math.ST] 11 Apr 2017 Yuancheng Zhu∗ ∗ Department of Statistics The Wharton School University of Pennsylvania and John Lafferty† † Department of Statistics Department of Computer Science University of Chicago April 13, 2017 Abstract: We formulate the notion of minimax estimation under storage or communication constraints, and prove an extension to Pinsker’s theorem for nonparametric estimation over Sobolev ellipsoids. Placing limits on the number of bits used to encode any estimator, we give tight lower and upper bounds on the excess risk due to quantization in terms of the number of bits, the signal size, and the noise level. This establishes the Pareto optimal tradeoff between storage and risk under quantization constraints for Sobolev spaces. Our results and proof techniques combine elements of rate distortion theory and minimax analysis. The proposed quantized estimation scheme, which shows achievability of the lower bounds, is adaptive in the usual statistical sense, achieving the optimal quantized minimax rate without knowledge of the smoothness parameter of the Sobolev space. It is also adaptive in a computational sense, as it constructs the code only after observing the data, to dynamically allocate more codewords to blocks where the estimated signal size is large. Simulations are included that illustrate the effect of quantization on statistical risk. nonparametric estimation, minimax bounds, rate distortion theory, constrained estimation, Sobolev ellipsoid 1. Introduction In this paper we introduce a minimax framework for nonparametric estimation under storage constraints. In the classical statistical setting, the minimax risk for estimating a function f from a function class F using a sample of size n places no constraints on the estimator fbn , other than requiring it to be a measurable function of the data. However, if the estimator is to be constructed with restrictions on the computational resources used, it is of interest to understand how the error can degrade. Letting C(fbn ) ≤ Bn indicate that the computational resources C(fbn ) used to construct fbn are required to fall within a budget Bn , the constrained minimax risk is Rn (F, Bn ) = inf sup R(fbn , f ). fbn :C(fbn )≤Bn f ∈F Minimax lower bounds on the risk as a function of the computational budget thus determine a feasible region for computation constrained estimation, and a Pareto optimal tradeoff for 1 risk versus computation as Bn varies. Several recent papers have presented results on tradeoffs between statistical risk and computational resources, measured in terms of either running time of the algorithm, number of floating point operations, or number of bits used to store or construct the estimators [5, 6, 16]. However, the existing work quantifies the tradeoff by analyzing the statistical and computational performance of specific procedures, rather than by establishing lower bounds and a Pareto optimal tradeoff. In this paper we treat the case where the complexity C(fbn ) is measured by the storage or space used by the procedure and sharply characterize the optimal tradeoff. Specifically, we limit the number of bits used to represent the estimator fbn . We focus on the setting of nonparametric regression under standard smoothness assumptions, and study how the excess risk depends on the storage budget Bn . We view the study of quantized estimation as a theoretical problem of fundamental interest. But quantization may arise naturally in future applications of large scale statistical estimation. For instance, when data are collected and analyzed on board a remote satellite, the estimated values may need to be sent back to Earth for further analysis. To limit communication costs, the estimates can be quantized, and it becomes important to understand what, in principle, is lost in terms of statistical risk through quantization. A related scenario is a cloud computing environment where data are processed for many different statistical estimation problems, with the estimates then stored for future analysis. To limit the storage costs, which could dominate the compute costs in many scenarios, it is of interest to quantize the estimates, and the quantization-risk tradeoff again becomes an important concern. Estimates are always quantized to some degree in practice. But to impose energy constraints on computation, future processors may limit precision in arithmetic computations more significantly [11]; the cost of limited precision in terms of statistical risk must then be quantified. A related problem is to distribute the estimation over many parallel processors, and to then limit the communication costs of the submodels to the central host. We focus on the centralized setting in the current paper, but an extension to the distributed case may be possible with the techniques that we introduce here. We study risk-storage tradeoffs in the normal means model of nonparametric estimation assuming the target function lies in a Sobolev space. The problem is intimately related to classical rate distortion theory [12], and our results rely on a marriage of minimax theory and rate distortion ideas. We thus build on and refine the connection between function estimation and lossy source coding that was elucidated in David Donoho’s 1997 Wald Lectures [9]. We work in the Gaussian white noise model dX(t) = f (t)dt + εdW (t), 0 ≤ t ≤ 1, (1.1) where W is a standard Wiener process on [0, 1], ε is the standard deviation of the noise, f (m, c) of order m and radius c. (We discuss the and f lies in the periodic Sobolev space W nonperiodic Sobolev space W (m, c) in Section 4.) The white noise model is a centerpiece of nonparametric estimation. It is asymptotically equivalent to nonparametric regression [4] and density estimation [18], and simplifies some of the mathematical analysis in our framework. In this classical setting, the minimax risk of estimation Rε (m, c) = inf sup E kf − fbε k2 fbε f ∈W f (m,c) 2 2 is well known to satisfy lim ε ε→0 4m − 2m+1  Rε (m, c) = c2 (2m + 1) π 2m 1   2m+1 m m+1 2m  2m+1 , Pm,c (1.2) where Pm,c is Pinsker’s constant [19]. The constrained minimax risk for quantized estimation becomes Rε (m, c, Bε ) = inf sup E kf − fbε k22 fbε ,C(fbε )≤Bε f ∈W f (m,c) where fbε is a quantized estimator that is required to use storage C(fbε ) no greater than Bε bits in total. Our main result identifies three separate quantization regimes. 2 • In the over-sufficient regime, the number of bits is very large, satisfying Bε  ε− 2m+1 4m and the classical minimax rate of convergence Rε  ε 2m+1 is obtained. Moreover, the optimal constant is the Pinsker constant Pm,c . 2 • In the sufficient regime, the number of bits scales as Bε  ε− 2m+1 . This level of quantization is just sufficient to preserve the classical minimax rate of convergence, and 4m thus in this regime Rε (m, c, Bε )  ε 2m+1 . However, the optimal constant degrades to a new constant Pm,c + Qm,c,d , where Qm,c,d is characterized in terms of the solution of a 2 certain variational problem, depending on d = limε→0 Bε ε 2m+1 . 2 • In the insufficient regime, the number of bits scales as Bε  ε− 2m+1 , with however Bε → ∞. Under this scaling the number of bits is insufficient to preserve the unquantized minimax rate of convergence, and the quantization error dominates the estimation error. We show that the quantized minimax risk in this case satisfies lim Bε2m Rε (m, c, Bε ) = ε→0 c2 m2m . π 2m Thus, in the insufficient regime the quantized minimax rate of convergence is Bε−2m , with optimal constant as shown above. By using an upper bound for the family of constants Qm,c,d , the three regimes can be combined together to view the risk in terms of a decomposition into estimation error and quantization error. Specifically, we can write Rε (m, c, Bε ) ≈ 4m c2 m2m −2m Pm,c ε 2m+1 + Bε . 2m | {z } | π {z } estimation error 2 quantization error When Bε  ε− 2m+1 , the estimation error dominates the quantization error, and the usual 2 minimax rate and constant are obtained. In the insufficient case Bε  ε− 2m+1 , only a slower 2 rate of convergence is achievable. When Bε and ε− 2m+1 are comparable, the estimation error 2 and quantization error are on the same order. The threshold ε− 2m+1 should not be surprising, 3 given that in classical unquantized estimation the minimax rate of convergence is achieved by 2 estimating the first ε− 2m+1 Fourier coefficients and simply setting the remaining coefficients 1 to zero. This corresponds to selecting a smoothing bandwidth that scales as h  n− 2m+1 with the sample size n. At a high level, our proof strategy integrates elements of minimax theory and source coding theory. In minimax analysis one computes lower bounds by thinking in Bayesian terms to look for least-favorable priors. In source coding analysis one constructs worst case distributions by setting up an optimization problem based on mutual information. Our quantized minimax analysis requires that these approaches be carefully combined to balance the estimation and quantization errors. To show achievability of the lower bounds we establish, we likewise need to construct an estimator and coding scheme together. Our approach is to quantize the blockwise James-Stein estimator, which achieves the classical Pinsker bound. However, our quantization scheme differs from the approach taken in classical rate distortion theory, where the generation of the codebook is determined once the source distribution is known. In our setting, we require the allocation of bits to be adaptive to the data, using more bits for blocks that have larger signal size. We therefore design a quantized estimation procedure that adaptively distributes the communication budget across the blocks. Assuming only a lower bound m0 on the smoothness m and an upper bound c0 on the radius c of the Sobolev space, our quantization-estimation procedure is adaptive to m and c in the usual statistical sense, and is also adaptive to the coding regime. In other words, given a storage budget Bε , the coding procedure achieves the optimal rate and constant for the unknown m and c, operating in the corresponding regime for those parameters. In the following section we establish some notation, outline our proof strategy, and present some simple examples. In Section 3 we state and prove our main result on quantized minimax lower bounds, relegating some of the technical details to an appendix. In Section 4 we show asymptotic achievability of these lower bounds, using a quantized estimation procedure based on adaptive James-Stein estimation and quantization in blocks, again deferring proofs of technical lemmas to the supplementary material. This is followed by a presentation of some results from experiments in Section 5, illustrating the performance and properties of the proposed quantized estimation procedure. 2. Quantized estimation and minimax risk Suppose that (X1 , . . . , Xn ) ∈ X n is a random vector drawn from a distribution Pn . Consider the problem of estimating a functional θn = θ(Pn ) of the distribution, assuming θn is restricted to lie in a parameter space Θn . To unclutter some of the notation, we will suppress the subscript n and write θ and Θ in the following, keeping in mind that nonparametric settings are allowed. The subscript n will be maintained for random variables. The minimax `2 risk of estimating θ is then defined as Rn (Θ) = inf sup Eθ kθ − θbn k2 θbn θ∈Θ where the infimum is taken over all possible estimators θbn : X n → Θ that are measurable with respect to the data X1 , . . . , Xn . We will abuse notation by using θbn to denote both the 4 estimator and the estimate calculated based on an observed set of data. Among numerous approaches to obtaining the minimax risk, the Bayesian method is best aligned with quantized estimation. Consider a prior distribution π(θ) whose support is a subset of Θ. Let δ(X1:n ) be the posterior mean of θ given the data X1 , . . . , Xn , which minimizes the integrated risk. Then for any estimator θbn , Z Z 2 2 b b sup Eθ kθ − θn k ≥ Eθ kθ − θn k dπ(θ) ≥ Eθ kθ − δ(X1:n )k2 dπ(θ). θ∈Θ Θ Θ Taking the infimum over θbn yields inf sup Eθ kθ − θbn k2 ≥ θbn θ∈Θ Z Θ Eθ kθ − δ(X1:n )k2 dπ(θ) , Rn (Θ; π). Thus, any prior distribution supported on Θ gives a lower bound on the minimax risk, and selecting the least-favorable prior leads to the largest lower bound provable by this approach. Now consider constraints on the storage or communication cost of our estimate. We restrict to the set of estimators that use no more than a total of Bn bits; that is, the estimator takes at most 2Bn different values. Such quantized estimators can be formulated by the following two-step procedure. First, an encoder maps the data X1:n to an index φn (X1:n ), where φn : X n → {1, 2, . . . , 2Bn } is the encoding function. The decoder, after receiving or retrieving the index, represents the estimates based on a decoding function ψn : {1, 2, . . . , 2Bn } → Θ, mapping the index to a codebook of estimates. All that needs to be transmitted or stored is the Bn -bit-long index, and the quantized estimator θbn is simply ψn ◦ φn , the composition of the encoder and the decoder functions. Denoting by C(θbn ) the storage, in terms of the number of bits, required by an estimator θbn , the minimax risk of quantized estimation is then defined as Rn (Θ, Bn ) = inf sup Eθ kθ − θbn k2 , θbn ,C(θbn )≤Bn θ∈Θ and we are interested in the effect of the constraint on the minimax risk. Once again, we consider a prior distribution π(θ) supported on Θ and let δ(X1:n ) be the posterior mean of θ given the data. The integrated risk can then be decomposed as Z Eθ kθ − θbn k2 dπ(θ) = Ekθ − δ(X1:n ) + δ(X1:n ) − θbn k2 (2.1) Θ 2 2 = Ekθ − δ(X1:n )k + Ekδ(X1:n ) − θbn k where the expectation is with respect to the joint distribution of θ ∼ π(θ) and X1:n | θ ∼ Pθ , 5 and the second equality is due to Ehθ − δ(X1:n ), δ(X1:n ) − θbn i    = E E hθ − δ(X1:n ), δ(X1:n ) − θbn i | X1:n   b = E hE(θ − δ(X1:n ) | X1:n ), δ(X1:n ) − θn i   = E h0, δ(X1:n ) − θbn i = 0, using the fact that θ → X1:n → θbn forms a Markov chain. The first term in the decomposition (2.1) is the Bayes risk Rn (Θ; π). The second term can be viewed as the excess risk due to quantization. Let Tn = T (X1 , . . . , Xn ) be a sufficient statistic for θ. The posterior mean can be expressed in terms of Tn and we will abuse notation and write it as δ(Tn ). Since the quantized estimator θbn uses at most Bn bits, we have Bn ≥ H(θbn ) ≥ H(θbn ) − H(θbn | δ(Tn )) = I(θbn ; δ(Tn )), where H and I denote the Shannon entropy and mutual information, respectively. Now consider the optimization inf P (· | δ(Tn )) Ekδ(Tn ) − θen k2 such that I(θen ; δ(Tn )) ≤ Bn where the infimum is over all conditional distributions P (θen | δ(Tn )). This parallels the definition of the distortion rate function, minimizing the distortion under a constraint on mutual information [12]. Denoting the value of this optimization by Qn (Θ, Bn ; π), we can lower bound the quantized minimax risk by Rn (Θ, Bn ) ≥ Rn (Θ; π) + Qn (Θ, Bn ; π). Since each prior distribution π(θ) supported on Θ gives a lower bound, we have n o Rn (Θ, Bn ) ≥ sup Rn (Θ; π) + Qn (Θ, Bn ; π) π and the goal becomes to obtain a least favorable prior for the quantized risk. Before turning to the case of quantized estimation over Sobolev spaces, we illustrate this technique on some simpler, more concrete examples. Example 2.1 (Normal means in a hypercube). Let Xi ∼ N (θ, σ 2 Id ) for i = 1, 2, . . . , n. Suppose that σ 2 is known and θ ∈ [−τ, τ ]d is to be estimated. We choose the prior π(θ) on θ to be a product distribution with density π(θ) = d Y 3 (τ − |θj |)+ 2 . 3 2τ j=1 6 It is shown in [15] that Rn (Θ; π) ≥ σ2d τ2 σ2d ≥ c 1 n τ 2 + 12σ 2 /n n 2 (n) (n) τ (n) = (T1 , . . . , Td ) = E(θ|X1:n ) be the where c1 = τ 2 +12σ 2 . Turning to Qn (Θ, Bn ; π), let T posterior mean of θ. In fact, by the independence and symmetry among the dimensions, we (n) know T1 , . . . , Td are independently and identically distributed. Denoting by T0 this common distribution, we have Qn (Θ, Bn ; π) ≥ d · q(Bn /d) (n) where q(B) is the distortion rate function for T0 , i.e., the value of the following problem inf (n) P (Tb | T0 ) (n) E(T0 − Tb)2 (n) such that I(Tb; T0 ) ≤ B. Now using the Shannon lower bound [8], we get Qn (Θ, Bn ; π) ≥ (n) 2Bn d · 2h(T0 ) · 2− d . 2πe (n) Note that as n → ∞, T0 converges to θ in distribution, so there exists a constant c2 independent of n and d such that Rn (Θ, Bn ) ≥ c1 2Bn σ2d + c2 d 2− d . n This lower bound intuitively shows the risk is regulated by two factors, the estimation error and the quantization error; whichever is larger dominates the risk. The scaling behavior of this lower bound (ignoring constants) can be achieved by first quantizing each of the d intervals [−τ, τ ] using Bn /d bits each, and then mapping the mle to its closest codeword. Example 2.2 (Gaussian sequences in Euclidean balls). In the example shown above, the lower bound is tight only in terms of the scaling of the key parameters. In some instances, we are able to find an asymptotically tight lower bound for which we can show achievability of both the rate and the constants. Estimating the mean vector of a Gaussian sequence with an `2 norm constraint on the mean is one of such case, as we showed in previous work [27]. Specifically, let Xi ∼ N (θi , σn2 ) for i = 1, 2, . . . , n, where σn2 =P σ 2 /n. Suppose that the parameter θ = (θ1 , . . . , θn ) lies in the Euclidean ball Θn (c) = {θ : ni=1 θi2 ≤ c2 }. Furthermore, suppose that Bn = nB. Then using the prior θi ∼ N (0, c2 ) it can be shown that lim inf Rn (Θn (c), Bn ) ≥ n→∞ c4 2−2B σ 2 c2 + . σ 2 + c2 σ 2 + c2 The asymptotic estimation error σ 2 c2 /(σ 2 + c2 ) is the well-known Pinsker bound for the Euclidean ball case. As shown in [27], an explicit quantization scheme can be constructed 7 that asymptotically achieves this lower bound, realizing the smallest possible quantization error c4 2−2B /(σ 2 + c2 ) for a budget of Bn = nB bits. The Euclidean ball case is clearly relevant to the Sobolev ellipsoid case, but new coding strategies and proof techniques are required. In particular, as will be made clear in the sequel, we will use an adaptive allocation of bits across blocks of coefficients, using more bits for blocks that have larger estimated signal size. Moreover, determination of the optimal constants requires a detailed analysis of the worst case prior distributions and the solution of a series of variational problems. 3. Quantized estimation over Sobolev spaces Recall that the Sobolev space of order m and radius c is defined by n W (m, c) = f ∈ [0, 1] → R : f (m−1) is absolutely continuous and Z 1 o (f (m) (x))2 dx ≤ c2 . 0 The periodic Sobolev space is defined by  f (m, c) = f ∈ W (m, c) : f (j) (0) = f (j) (1), j = 0, 1, . . . , m − 1 . W (3.1) The white noise model (1.1) is asymptotically equivalent to making n equally spaced observations along the sample path, Yi = f (i/n) + σi , where i ∼ N (0, 1) [4]. In this formulation, the noise level in the formulation (1.1) scales as 2 = σ 2 /n, and the rate of convergence takes 2m the familiar form n− 2m+1 where n is the number of observations. To carry out quantized estimation we now require an encoder φε : R[0,1] → {1, 2, . . . , 2Bε } which is a function applied to the sample path X(t). The decoding function then takes the form ψε : {1, 2, . . . , 2Bε } → R[0,1] and maps the index to a function estimate. As in the previous section, we write the composition of the encoder and the decoder as fbε = ψε ◦ φε , which we call the quantized estimator. The communication or storage C(fbε ) required by this quantized estimator is no more than Bε bits. To recast quantized estimation in terms of an infinite sequence model, let (ϕj )∞ j=1 be the trigonometric basis, and let Z 1 θj = ϕj (t)f (t)dt, j = 1, 2, . . . , 0 P f be the Fourier coefficients. It is well known [22] that f = ∞ j=1 θj ϕj belongs to W (m, c) if and only if the Fourier coefficients θ belong to the Sobolev ellipsoid defined as ( ) ∞ 2 X c (3.2) Θ(m, c) = θ ∈ `2 : a2j θj2 ≤ 2m π j=1 8 where ( j m, for even j, aj = m (j − 1) , for odd j. Although this is the standard definition of a Sobolev ellipsoid, for the rest of the paper we will set aj = j m , j = 1, 2, . . . for convenience of analysis. All of the results hold for both definitions of aj . Also note that (3.2) actually gives a more general definition, since m is no longer assumed to be an integer, as it is in (3.1). Expanding with respect to the same orthonormal basis, the observed path X(t) is converted into an infinite Gaussian sequence Z 1 Yj = ϕj (t) dX(t), j = 1, 2, . . . , 0 ∞ with Yj ∼ N (θj , ε2 ). For an estimator (θbj )∞ j=1 of (Yj )j=1 , an estimate of f is obtained by fb(x) = ∞ X θbj ϕj (x) j=1 with squared error kfb − f k22 = kθb − θk22 . In terms of this standard reduction, the quantized minimax risk is thus reformulated as Rε (m, c, Bε ) = inf sup E θ kθ − θbε k22 . (3.3) θbε ,C(θbε )≤Bε θ∈Θ(m,c) To state our result, we need to define the value of the following variational problem: Vm,c,d , (3.4) Z max (σ 2 ,x0 )∈F (m,c,d) 0 x0 2 σ (x) dx + x0 exp σ 2 (x) + 1  1 x0 Z x0 4 log 0 σ (x) 2d dx − σ 2 (x) + 1 x0  where the feasible set F(m, c, d) is the collection of increasing functions σ 2 (x) and values x0 satisfying Z x0 x2m σ 2 (x)dx ≤ c2  Z0 x0  4 1 σ 4 (x) 2d σ (x) ≥ exp log 2 dx − for all x ≤ x0 . σ 2 (x) + 1 x0 0 σ (x) + 1 x0 The significance and interpretation of the variational problem will become apparent as we outline the proof of this result. Theorem 3.1. Let Rε (m, c, Bε ) be defined as in (3.3), for m > 0 and c > 0. 2 (i) If Bε ε 2m+1 → ∞ as ε → 0, then 4m lim inf ε− 2m+1 Rε (m, c, Bε ) ≥ Pm,c ε→0 where Pm,c is Pinker’s constant defined in (1.2). 9 2 (ii) If Bε ε 2m+1 → d for some constant d as ε → 0, then 4m lim inf ε− 2m+1 Rε (m, c, Bε ) ≥ Pm,c + Qm,c,d = Vm,c,d ε→0 where Vm,c,d is the value of the variational problem (3.4). 2 (iii) If Bε ε 2m+1 → 0 and Bε → ∞ as ε → 0, then lim inf ε→0 Bε2m Rε (m, c, Bε ) c2 m2m ≥ . π 2m 2 In the first regime where the number of bits Bε is much greater than ε− 2m+1 , we recover the same convergence result as in Pinsker’s theorem, in terms of both convergence rate and leading constant. The proof of the lower bound for this regime can directly follow the proof of Pinsker’s theorem, since the set of estimators considered in our minimax framework is a subset of all possible estimators. In the second regime where we have “just enough” bits to preserve the rate, we suffer a 4m loss in terms of the leading constant. In this “Goldilocks regime,” the optimal rate ε− 2m+1 is achieved but the constant in front of the rate is Pinsker’s constant Pm,c plus a positive quantity Qm,c,d determined by the variational problem. While the solution to this variational problem does not appear to have an explicit form, it can be computed numerically. We discuss this term at length in the sequel, where we explain the origin of the variational problem, compute the constant numerically and approximate it from above and below. The constants Pm,c and Qm,c,d are shown graphically in Figure 1. Note that the parameter d can be thought of as the average number of bits per coefficient used 2 by an optimal quantized estimator, since ε− 2m+1 is asymptotically the number of coefficients needed to estimate at the classical minimax rate. As shown in Figure 1, the constant for quantized estimation quickly approaches the Pinsker constant as d increases—when d = 3 the two are already very close. In the third regime where the communication budget is insufficient for the estimator to achieve the optimal rate, we obtain a sub-optimal rate which no longer depends explicitly on the noise level ε of the model. In this regime, quantization error dominates, and the risk 2 1 decays at a rate of B − 2m no matter how fast ε approaches zero, as long as B  ε− 2m+1 . Here the analogue of Pinsker’s constant takes a very simple form. Proof of Theorem 3.1. Consider a Gaussian prior distribution on θ = (θj )∞ j=1 with θj ∼ 2 2 2 ∞ N (0, σj ) for j = 1, 2, . . . , in terms of parameters σ = (σj )j=1 to be specified later. One requirement for the variances is ∞ X c2 a2j σj2 ≤ 2m . π j=1 We denote this prior distribution by π(θ; σ 2 ), and show in Section A that it is asymptotically concentrated on the ellipsoid Θ(m, c). Under this prior the model is θj ∼ N (0, σj2 ) Yj | θj ∼ N (θj , ε2 ), 10 j = 1, 2, . . . Leading constant value 6 4 Pm,c + Qm,c,d Pinsker 2 0 1 2 3 4 Bits per coefficient d Fig 1. The constants Pm,c + Qm,c,d as a function of quantization level d in the sufficient regime, where 2 Bε ε 2m+1 → d. The parameter d can be thought of as the average number of bits per coefficient used by an 2 optimal quantized estimator, because ε− 2m+1 is asymptotically the number of coefficients needed to estimate at the classical minimax rate. Here we take m = 2 and c2 /π 2m = 1. The curve indicates that with only 2 bits per coefficient, optimal quantized minimax estimation degrades by less than a factor of 2 in the constant. With 3 bits per coefficient, the constant is very close to the classical Pinsker constant. and the marginal distribution of Yj is thus N (0, σj2 + ε2 ). Following the strategy outlined in Section 2, let δ denote the posterior mean of θ given Y under this prior, and consider the optimization e2 inf Ekδ − θk e ≤ B such that I(δ; θ) where the infimum is over all distributions on θe such that θ → Y → θe forms a Markov chain. Now, the posterior mean satisfies δj = γj Yj where γj = σj2 /(σj2 + 2 ). Note that the Bayes risk under this prior is ∞ X σj2 ε2 2 E kθ − δk2 = . σ 2 + ε2 j=1 j Define µ2j , E (δj − θej )2 . 11 Then the classical rate distortion argument [8] gives that e ≥ I(δ; θ) ≥ = ∞ X j=1 ∞ X j=1 ∞ X j=1 I(γj Yj ; θej ) 1 log+ 2  γj2 (σj2 + ε2 ) µ2j  1 log+ 2  σj4 µ2j (σj2 + ε2 )  where log+ (x) = max(log x, 0). Therefore, the quantized minimax risk is lower bounded by Rε (m, c, Bε ) = inf sup Ekθ − θbε k2 ≥ Vε (Bε , m, c)(1 + o(1)) θbε ,C(θbε )≤Bε θ∈Θ(m,c) where Vε (Bε , m, c) is the value of the optimization ∞ X ∞ X σj2 ε2 min + max µ2 σ2 σ 2 + ε2 j=1 j=1 j   ∞ X σj4 1 ≤ Bε such that log+ 2 µ2j (σj2 + ε2 ) j=1 ∞ X j=1 µ2j a2j σj2 ≤ (P1 ) c2 π 2m and the (1 + o(1)) deviation term is analyzed in the supplementary material. Observe that the quantity Vε (Bε , m, c) can be upper and lower bounded by n o max Rε (m, c), Qε (m, c, Bε ) ≤ Vε (m, c, Bε ) ≤ Rε (m, c) + Qε (m, c, Bε ) (3.5) where the estimation error term Rε (m, c) is the value of the optimization ∞ X σj2 ε2 max σ2 σ 2 + ε2 j=1 j such that ∞ X a2j σj2 j=1 (R1 ) c2 ≤ 2m π and the quantization error term Qε (m, c, Bε ) is the value of the optimization max min 2 2 σ µ such that ∞ X µ2j j=1 ∞ X 1 j=1 ∞ X j=1 2  log+ a2j σj2 ≤ 12 σj4 µ2j (σj2 + ε2 ) c2 . π 2m  ≤ Bε (Q1 ) The following results specify the leading order asymptotics of these quantities. Lemma 3.1. As ε → 0, 4m Rε (m, c) = Pm,c ε 2m+1 (1 + o(1)). Lemma 3.2. As ε → 0, Qε (m, c, Bε ) ≤ c2 m2m −2m (1 + o(1)). B π 2m ε (3.6) 2 Moreover, if Bε ε 2m+1 → 0 and Bε → ∞, c2 m2m −2m Qε (m, c, Bε ) = (1 + o(1)). B π 2m ε This yields the following closed form upper bound. Corollary 3.1. Suppose that Bε → ∞ and ε → 0. Then   2 2m 4m c m −2m Vε (m, c, Bε ) ≤ Pm,c ε 2m+1 + 2m Bε (1 + o(1)). π (3.7) 2 In the insufficient regime Bε ε 2m+1 → 0 and Bε → ∞ as ε → 0, equation (3.5) and Lemma 3.2 show that c2 m2m −2m B Vε (m, c, Bε ) = (1 + o(1)). π 2m ε 2 Similarly, in the over-sufficient regime Bε ε 2m+1 → ∞ as ε → 0, we conclude that 4m Vε (m, c, Bε ) = Pm,c ε 2m+1 (1 + o(1)). 2 We now turn to the sufficient regime Bε ε 2m+1 → d. We begin by making three observations about the solution to the optimization (P1 ). First, we note that the series (σj2 )∞ j=1 that solves 2 (P1 ) can be assumed to be decreasing. If (σj ) were not in decreasing order, we could rearrange it to be decreasing, and correspondingly rearrange (µ2j ), without violating the constraints or changing the value of the optimization. Second, we note that given (σj2 ), the optimal (µ2j ) is obtained by the “reverse water-filling” scheme [8]. Specifically, there exists η > 0 such that  σj4    if 2 ≥η η σj + ε2 2 µj =  σj4    σ 2 + ε2 otherwise, j where η is chosen so that ∞ 1X log+ 2 j=1  σj4 µ2j (σj2 + ε2 ) 13  ≤ Bε . Third, there exists an integer J > 0 such that the optimal series (σj2 ) satisfies σj4 ≥ η, for j = 1, . . . , J σj2 + ε2 and σj2 = 0, for j > J, where η is the “water-filling level” for (µ2j ) (see [8]). Using these three observations, the optimization (P1 ) can be reformulated as J X σj2 ε2 max Jη + σ 2 ,J σ 2 + ε2 j=1 j   J σj4 1X log+ = Bε such that 2 j=1 η(σj2 + ε2 ) J X j=1 (P2 ) 2 a2j σj2 ≤ c π 2m (σj2 ) is decreasing and σJ4 ≥ η. σJ2 + ε2 To derive the solution to (P2 ), we use a continuous approximation of σ 2 , writing σj2 = σ 2 (jh)h2m+1 where h is the P bandwidth to be specified and σ 2 (·) is a function defined on (0, ∞). The c2 2 2 constraint that ∞ j=1 aj σj ≤ π 2m becomes the integral constraint [19] Z ∞ c2 x2m σ 2 (x)dx ≤ 2m . π 0 We now set the bandwidth so that h2m+1 = ε2 . This choice of bandwidth will balance the two terms in the objective function, and thus gives the hardest prior distribution. Applying the above three observations under this continuous approximation, we transform problem (P2 ) to the following optimization: Z x0 σ 2 (x) dx max x η + 0 σ 2 ,x0 σ 2 (x) + 1 0   Z x0 1 σ 4 (x) such that log+ =d 2 η(σ 2 (x) + 1) 0 (P3 ) Z x0 c2 2m 2 x σ (x)dx ≤ 2m π 0 σ 4 (x) σ 2 (x) is decreasing and 2 ≥ η for all x ≤ x0 . σ (x) + 1 4m Note that here we omit the convergence rate h2m = ε 2m+1 in the objective function. The asymptotic equivalence between (P2 ) and (P3 ) can be established by a similar argument to 14 Theorem 3.1 in [9]. Solving the first constraint for η yields  Z x0  Z x0 σ 2 (x) 1 σ 4 (x) 2d max dx + x0 exp log 2 dx − σ 2 ,x0 σ 2 (x) + 1 x0 0 σ (x) + 1 x0 0 Z x0 2 c x2m σ 2 (x)dx ≤ 2m such that π 0 2 σ (x) is decreasing  Z x0  1 σ 4 (x) 2d σ 4 (x) ≥ exp log 2 dx − σ 2 (x) + 1 x0 0 σ (x) + 1 x0 for all x ≤ x0 . (P4 ) The following is proved using a variational argument in the supplementary material. Lemma 3.3. The solution to (P4 ) satisfies  Z x0  1 σ 4 (x) 2d 1 σ 2 (x) + 2 + exp log dx − = λx2m 2 2 2 2 2 (σ (x) + 1) x0 0 σ (x) + 1 x0 σ (x)(σ (x) + 1) for some λ > 0. Fixing x0 , the lemma shows that by setting  Z x0  1 σ 4 (x) 2d α = exp log 2 dx − x0 0 σ (x) + 1 x0 we can express σ 2 (x) implicitly as the unique positive root of a third-order polynomial in y, λx2m y 3 + (2λx2m − α)y 2 + (λx2m − 3α − 1)y − 2α. This leads us to an explicit form of σ 2 (x) for a given value α. However, note that α still depends on σ 2 (x) and x0 , so the solution σ 2 (x) might not be compatible with α and x0 . We can either search through a grid of values of α and x0 , or, more efficiently, use an iterative method to find the pair of values that gives us the solution. We omit the details on how to calculate the values of the optimization as it is not main purpose of the paper. 2 To summarize, in the regime Bε ε 2m+1 → d as ε → 0, we obtain 4m Vε (m, c, Bε ) = (Pm,c + Qm,c,d ) ε 2m+1 (1 + o(1)), where we denote by Pm,c + Qm,c,d the values of the optimization (P4 ). 4. Achievability In this section, we show that the lower bounds in Theorem 3.1 are achievable by a quantized estimator using a random coding scheme. The basic idea of our quantized estimation procedure is to conduct blockwise estimation and quantization together, using a quantized form of James-Stein estimator. 15 Before we present a quantized form of the James-Stein estimator, let us first consider a b class of simple procedures. Suppose that θb = θ(X) is an estimator of θ ∈ Θ(m, c) without b quantization. We assume that θ ∈ Θ(m, c), as projection always reduces mean squared error. To design a B-bit quantized estimator, let Θ̌ be the optimal δ-covering of the parameter space Θ(m, c) such that |Θ̌| ≤ 2B , that is, δ = δ(B) = inf Θ̌⊂Θ:|Θ̌|≤2B sup inf kθ − θ0 k. θ∈Θ θ0 ∈Θ̌ The quantized estimator is then defined to be b θ̌ = θ̌(X) = arg min kθ(X) − θ0 k. θ0 ∈Θ̌ Now the mean squared error satisfies b 2 ≤ 2 sup E θ0 kθb − θ0 k2 + 2δ(B)2 . E θ kθ̌ − θk2 = E θ kθ̌ − θb + θb − θk2 ≤ 2E θ kθb − θk2 + 2E θ kθ̌ − θk θ0 If we pick θb to be a minimax estimator for Θ, the first term above gives the minimax risk for estimating θ in the parameter space Θ. The second term is closely related to the metric entropy of the parameter space Θ(m, c). In fact, for the Sobolev ellipsoid Θ(m, c), it is shown 2 2m in [9] that δ(B)2 = c πm2m B −2m (1 + o(1)) as B → ∞. Thus, with an extra constant factor of 2, the mean squared error of this quantized estimator is decomposed into the minimax risk for Θ and an error term due to quantization. In addition to the fact that this procedure does not achieve the exact lower bound of the minimax risk for the constrained estimation problem, it is not clear how such an ε-net can be generated. In what follows we will describe a quantized estimation procedure that we will show achieves the lower bound with the exact constants, and that also adapts to the unknown parameters of the Sobolev space. We begin by defining the block system to be used, which is usually referred to as the weakly geometric system of blocks [22]. Let Nε = b1/ε2 c and ρε = (log(1/ε))−1 . Let J1 , . . . , JK be a partition of the set {1, . . . , Nε } such that K [ k=1 Jk = {1, . . . , Nε }, Jk1 ∩ Jk2 = ∅ for k1 6= k2 , and min{j : j ∈ Jk } > max{j : j ∈ Jk−1 }. Let Tk be the cardinality of the kth block and suppose that T1 , . . . , Tk satisfy T1 = dρ−1 ε e = dlog(1/ε)e, T2 = bT1 (1 + ρε )c, .. . TK−1 = bT1 (1 + ρε )K−2 c, TK = Nε − K−1 X k=1 16 Tk . (4.1) Then K ≤ C log2 (1/ε) (see Lemma A.4). For an infinite sequence x ∈ `2 , denote by x(k) the P vector (xj )j∈Jk ∈ RTk . We also write jk = k−1 l=1 Tl + 1, which is the smallest index in block Jk . The weakly geometric system of blocks is defined such that the size of the blocks does not grow too quickly (the ratio between the sizes of the neighboring two blocks goes to 1 asymptotically), and that the number of the blocks is on the logarithmic scale with respect to 1/ε (K . log2 (1/ε)). See Lemma A.4. We are now ready to describe the quantized estimation scheme. We first give a high-level description of the scheme, and then the precise specification. In contrast to rate distortion theory, where the codebook and allocation of the bits are determined once the source distribution is known, here the codebook and allocation of bits are adaptive to the data—more bits are used for blocks having larger signal size. The first step in our quantization scheme is to construct a “base code” of 2Bε randomly generated vectors of maximum block length TK , with N (0, 1) entries. The base code is thought of as a 2Bε × TK random matrix Z; it is generated before observing any data, and is shared between the sender and receiver. After observing data (Yj ), the rows of Z are apportioned to different blocks k = 1, . . . , K, with more rows being used for blocks having larger estimated signal size. To do so, the norm kY(k) k of each block k is first quantized as a discrete value Šk . A subcodebook Zk is then constructed by normalizing the appropriate rows and the first Tk columns of the base code, yielding a collection of random points on the unit sphere STk −1 . To form a quantized estimate of the coefficients in the block, the codeword Ž(k) ∈ Zk having the smallest angle to Y(k) is then found. The appropriate indices are then transmitted to the receiver. To decode and reconstruct the quantized estimate, the receiver first recovers the quantized norms (Šk ), which enables reconstruction of the subdivision of the base code that was used by the encoder. After extracting for each block k the appropriate row of the base code, the codeword Ž(k) is reconstructed, and a James-Stein type estimator is then calculated. The quantized estimation scheme is detailed below. Step 1. Base code generation. √ 1.1. Generate codebook Sk = Tk ε2 + iε2 : dε−2 c(jk π)−m e, for k = 1, . . . , K. i = 0, 1, . . . , sk where sk = 1.2. Generate base code Z, a 2B × TK matrix with i.i.d. N (0, 1) entries. (Sk ) and Z are shared between the encoder and the decoder, before seeing any data. Step 2. Encoding. 2.1. Encoding block radius. For k = 1, . . . , K, encode Šk = arg min {|s − Sk | : s ∈ Sk } where √ √ 2  if kY(k) k < Tk ε2 √Tk ε √ Sk = Tk ε2 + c(jk π)−m if kY(k) k > Tk ε2 + c(jk π)−m   kY(k) k otherwise. 17 2.2. Allocation of bits. Let (ebk )K k=1 be the solution to the optimization min b̄ such that K X (Š 2 − Tk ε2 )2 k k=1 K X k=1 Šk2 · 2−2b̄k (4.2) Tk b̄k ≤ B, b̄k ≥ 0. 2.3. Encoding block direction. Form the data-dependent codebook as follows. Divide the rows of Z into blocks of sizes 2dT1 b1 e , . . . , 2dTK bK e . Based on the kth block of rows, construct the data-dependent codebook Zek by keeping only the first Tk entries and normalizing each truncated row; specifically, the jth row of Zek is given by Zi,1:Tk ∈ STk −1 Zek,j = kZi,1:Tk k e e where i is the appropriate row of the base code Z and Zi,1:t denotes the first t entries of the row vector. A graphical illustration is shown below in Figure 2. With this data-dependent codebook, encode Ž(k) = arg max{hz, Y(k) i : z ∈ Zek } for k = 1, . . . , K. 2⌈T1 b̃1 ⌉ 2⌈T2 b̃2 ⌉ Z̃1 Z̃2 2B 2⌈TK b̃K ⌉ Z̃K TK Fig 2. An illustration of the data-dependent codebook. The big matrix represents the base code Z, and the e shaded areas are (Zek ), sub-matrices of size Tk × 2dTk bk e with rows normalized. K Step 3. Transmission. Transmit or store (Šk )K k=1 and (Ž(k) )k=1 by their corresponding indices. 18 Step 4. Decoding & Estimation. 4.1. Recover (Šk ) based on the transmitted or stored indices and the common codebook (Sk ). 4.2. Solve (4.2) and get (ebk ). Reconstruct (Zek ) using Z and (ebk ). 4.3. Recover (Ž(k) ) based on the transmitted or stored indices and the reconstructed codebook (Zek ). 4.4. Estimate θ(k) by θ̌(k) Š 2 − Tk ε2 = k Šk q 1 − 2−2ebk · Ž(k) . 4.5. Estimate the entire vector θ by concatenating the θ̌(k) vectors and padding with zeros; thus,  θ̌ = θ̌(1) , . . . , θ̌(K) , 0, 0, . . . . The following theorem establishes the asymptotic optimality of this quantized estimator. Theorem 4.1. Let θ̌ be the quantized estimator defined above. 2 (i) If Bε 2m+1 → ∞, then 4m lim ε− 2m+1 ε→0 sup Ekθ − θ̌k2 = Pm,c . θ∈Θ(m,c) 2 (ii) If Bε 2m+1 → d for some constant d as ε → 0, then 4m lim ε− 2m+1 ε→0 sup Ekθ − θ̌k2 = Pm,c + Qd,m,c . θ∈Θ(m,c) 2 (iii) If Bε 2m+1 → 0 and B(log(1/ε))−3 → ∞, then lim B 2m sup Ekθ − θ̌k2 = ε→0 θ∈Θ(m,c) c2 m2m . π 2m The expectations are with respect to the random quantized estimation scheme Q and the distribution of the data. We pause to make several remarks on this result before outlining the proof. Remark 4.1. The total number of bits used by this quantized estimation scheme is K X k=1 dTkebk e + K X k=1 −2 −m logdε c(jk π) e≤ K X k=1 dTkebk e + K X logdε−2 ce k=1 2Kρ−1 ε ≤B+K + + K logdce = B + O((log(1/ε))3 ), where we use the fact that K . log2 (1/ε2 ) (See Lemma A.4). Therefore, as long as B(log(1/ε))−3 → ∞, the total number of bits used is asymptotically no more than B, the given communication budget. 19 Remark 4.2. The quantized estimation scheme does not make essential use of the parameters of the Sobolev space, namely the smoothness m and the radius c. The only exception is that in Step 1.1 the size of the codebook Sk depends on m and c. However, suppose that we know a lower bound on the smoothness m, say m ≥ m0 , and an upper bound on the radius c, say c ≤ c0 . By replacing m and c by m0 and c0 respectively, we make the codebook independent of the parameters. We shall assume m0 > 1/2, which leads to continuous functions. This modification does not, however, significantly increase the number of bits; in fact, the total number of bits is still B+O(ρ−3 ε ). Thus, we can easily make this quantized estimator minimax adaptive to the class of Sobolev ellipsoids {Θ(m, c) : m ≥ m0 , c ≤ c0 }, as long as B grows faster than (log(1/ε))3 . More formally, we have Corollary 4.1. Suppose that Bε satisfies Bε (log(1/ε))−3 → ∞. Let θ̌0 be the quantized estimator with the modification described above, which does not assume knowledge of m and c. Then for m ≥ m0 and c ≤ c0 , lim ε→0 supθ∈Θ(m,c) Ekθ − θ̌0 k2 b2 inf θ,C( supθ∈Θ(m,c) Ekθ − θk b θ)≤B b = 1, where the expectation in the numerator is with respect to the data and the randomized coding scheme, while the expectation in the denominator is only with respect to the data. Remark 4.3. When B grows at a rate comparable to or slower than (log(1/ε))3 , the lower bound is still achievable, just no longer by the quantized estimator we described above. The main reason is that when B does not grow faster than log(1/ε)3 , the block size T1 = dlog(1/ε)e is too large. The blocking needs to be modified to get achievability in this case. Remark 4.4. In classical rate distortion [8, 12], the probabilistic method applied to a randomized coding scheme shows the existence of a code achieving the rate distortion bounds. Comparing to Theorem 3.1, we see that the expected risk, averaged over the randomness in the codebook, similarly achieves the quantized minimax lower bound. However, note that the average over the codebook is inside the supremum over the Sobolev space, implying that the code achieving the bound may vary over the ellipsoid. In other words, while the coding scheme generates a codebook that is used for different θ, it is not known whether there is one code generated by this randomized scheme that is “universal,” and achieves the risk lower bound with high probability over the ellipsoid. The existence or non-existence of such “universal codes” is an interesting direction for further study. Remark 4.5. We have so far dealt with the periodic case, i.e., functions in the periodic f (m, c) defined in (3.1). For the Sobolev space W (m, c), where the functions Sobolev space W f (m, c) are not necessarily periodic, the lower bound given in Theorem 3.1 still holds, since W is a subset of the larger class W (m, c). To extend the achievability result to W (m, c), we again need to relate W (m, c) to an ellipsoid. Nussbaum [17] shows using spline theory that the non-periodic space can actually be expressed as an ellipsoid, where the length of the jth principal axis scales as (π 2 j)m asymptotically. Based on this link between W (m, c) and the ellipsoid, the techniques used here to show achievability apply, and since the principal axes scale as in the periodic case, the convergence rates remain the same. 20 Proof of Theorem 4.1 We now sketch the proof of Theorem 4.1, deferring the full details to Section A. To provide only an informal outline of the proof, we shall write A1 ≈ A2 as a shorthand for A1 = A2 (1 + o(1)), and A1 . A2 for A1 ≤ A2 (1 + o(1)), without specifying here what these o(1) terms are. To upper bound the risk Ekθ̌ − θk2 , we adopt the following sequence of approximations and inequalities. First, we discard the components whose index is greater than N and show that K X Ekθ̌ − θk2 ≈ E kθ̌(k) − θ(k) k2 . k=1 Since Šk is close enough to Sk , we can then safely replace θ̌(k) Ž(k) and obtain ≈E Writing λk = K X k=1 Sk2 −Tk ε2 Sk2 by θb(k) = Sk2 −Tk ε2 Sk q e 1 − 2−2b(k) · kθb(k) − θ(k) k2 . , we further decompose the risk into K  X =E kθb(k) − λk Y(k) k2 + kλk Y(k) − θ(k) k2 k=1  b + 2hθ(k) − λk Y(k) , λk Y(k) − θ(k) i . Conditioning on the data Y and taking the expectation with respect to the random codebook yields  K  X (Sk2 − Tk ε2 )2 −2ebk 2 .E 2 + kλk Y(k) − θ(k) k . 2 S k k=1 By two oracle inequalities upper bounding the expectations with respect to the data, and the fact that eb is the solution to (4.2),  K  X kθ(k) k4 kθ(k) k2 Tk ε2 −2b̄k 2 + . . min 2 2 2 2 b∈Πblk (B) kθ kθ (k) k + Tk ε (k) k + Tk ε k=1 Showing that the blockwise constant oracles are almost as good as the monotone oracle, we get for some B 0 ≈ B  N  X θj4 −2bj 2 2 2 2 . min 2 + (1 − ωj ) θj + ωj ε , b∈Πmon (B 0 ), ω∈Ωmon θj2 + ε2 j=1 where Πblk (B), Πmon (B) are the classes of blockwise constant and monotone allocations of the bits defined in (A.8), (A.9), and Ωmon is the class of monotone weights defined in (A.11). The proof is then completed by Lemma A.9 showing that the last quantity is equal to Vε (m, c, B). 21 0.6 0.3 0.0 -0.6 y 0.0 0.2 0.4 0.6 0.8 1.0 0.6 0.8 1.0 0.6 0.8 1.0 0.0 -0.6 y 0.3 0.6 n = 500 0.0 0.2 0.4 0.0 -0.6 y 0.3 0.6 n = 5000 0.0 0.2 0.4 n = 50000 true function blockwise J-S 5 bits 30 bits Fig 3. The damped Doppler function (solid gray) and typical realizations of the estimators under different noise levels (n = 500, 5000, and 50000). Three estimators are used: the blockwise James-Stein estimator (dashed black), and two quantized estimator with budgets of 5 bits (dashed red) and 30 bits (dashed blue). 5. Simulations Here we illustrate the performance of the proposed quantized estimation scheme. We use the function   p 2.1π f (x) = x(1 − x) sin , 0 ≤ x ≤ 1, x + 0.3 which we shall refer to as the “damped Doppler function,” shown in Figure 3 (the gray lines). Note that the value 0.3 differs from the value 0.05 in the usual Doppler function used to illustrate spatial adaptation of methods such as wavelets. Since we do not address spatial adaptivity in this paper, we “slow” the oscillations of the Doppler function near zero in our illustrations. We use this f as the underlying true mean function and generate our data according to 22 0.100 Risk 0.075 0.050 0.025 0.000 0 2500 5000 7500 10000 Effective sample size n Risk 0.100 0.010 100 1000 10000 Effective sample size n blockwise J-S 5 bits 10 bits 15 bits 20 bits 25 bits 30 bits Fig 4. Risk versus effective sample size n = 1/ε2 for estimating the damped Doppler function with different estimators. The dashed line represents the risk of the blockwise James-Stein estimator, and the solid ones are for the quantized estimators with different budgets. The budgets are 5, 10, 15, 20, 25, and 30 bits, corresponding to the lines from top to bottom. The two plots are the same curves on the original scale and the log-log scale. the corresponding white noise model (1.1), dX(t) = f (t)dt + εdW (t), 0 ≤ t ≤ 1. We apply the blockwise James-Stein estimator, as well as the proposed quantized estimator with different communication budgets. We also vary the noise level ε and, equivalently, the effective sample size n = 1/ε2 . 23 We first show in Figure 3 some typical realizations of these estimators on data generated under different noise levels (n = 500, 5000, and 50000 respectively). To keep the plots succinct, we show only the true function, the blockwise James-Stein estimates and quantized estimates using total bit budgets of 5 and 30 bits. We observe, in the first plot, that both quantized estimates deviate from the true function, and so does the blockwise James-Stein estimates. This is when the noise is relatively large and any quantized estimate performs poorly, no matter how large a budget is given. Both 5 bits and 30 bits appear to be “sufficient/over-sufficient” here. In the second plot, the blockwise James-Stein estimate is close to the quantized estimate with a budget of 30 bits, while with a budget of 5 bits it fails to capture the fluctuations of the true function. Thus, a budget of 30 bits is still “sufficient,” but 5 bits apparently becomes “insufficient.” In the third plot, the blockwise James-Stein estimate gives a better fit than the two quantized estimates, as both budgets become “insufficient” to achieve the optimal risk. Next, in Figure 4 we plot the risk as a function of sample size n, averaging over 2000 simulations. Note that the bottom plot is the just the first plot on a log-log scale. In this set of plots, we are able to observe the phase transition for the quantized estimators. For relatively small values of n, all quantized estimators yield a similar error rate, with risks that are close to (or even smaller than) that of the blockwise James-Stein estimator. This is the over-sufficient regime—even the smallest budget suffices to achieve the optimal risk. As n increases, the curves start to separate, with estimators having smaller bit budgets leading to worse risks compared to the blockwise James-Stein estimator, and compared to estimators with larger budgets. This can be seen as the sufficient regime for the smallbudget estimators—the risks are still going down, but at a slower rate than optimal. The six quantized estimators all end up in the insufficient regime—as n increases, their risks begin to flatten out, while the risk of the blockwise James-Stein estimator continues to decrease. 6. Related work and future directions Concepts related to quantized nonparametric estimation appear in multiple communities. As mentioned in the introduction, Donoho’s 1997 Wald Lectures [9] (on the eve of the 50th anniversary of Shannon’s 1948 paper), drew sharp parallels between rate distortion, metric entropy and minimax rates, focusing on the same Sobolev function spaces we treat here. One view of the present work is that we take this correspondence further by studying how the risk continuously degrades with the level of quantization. We have analyzed the precise leading order asymptotics for quantized regression over the Sobolev spaces, showing that these rates and constants are realized with coding schemes that are adaptive to the smoothness m and radius c of the ellipsoid, achieving automatically the optimal rate for the regime corresponding to those parameters given the specified communication budget. Our detailed analysis is possible due to what Nussbaum [19] calls the “Pinsker phenomenon,” refering to the fact that linear filters attain the minimax rate in the over-sufficient regime. It will be interesting to study quantized nonparametric estimation in cases where the Pinsker phenomenon does not hold, for example over Besov bodies and different Lp spaces. Many problems of rate distortion type are similar to quantized regression. The standard “reverse water filling” construction to quantize a Gaussian source with varying noise levels 24 plays a key role in our analysis, as shown in Section 3. In our case the Sobolev ellipsoid is an infinite Gaussian sequence model, requiring truncation of the sequence at the appropriate level depending on the targeted quantization and estimation error. In the case of Euclidean balls, Draper and Wornell [10] study rate distortion problems motivated by communication in sensor networks; this is closely related to the problem of quantized minimax estimation over Euclidean balls that we analyzed in [27]. The essential difference between rate distortion and our quantized minimax framework is that in rate distortion the quantization is carried out for a random source, while in quantized estimation we quantize our estimate of the deterministic and unknown basis coefficients. Since linear estimators are asymptotically minimax for Sobolev spaces under squared error (the “Pinsker phenomenon”), this naturally leads to an alternative view of quantizing the observations, or said differently, of compressing the data before estimation. Statistical estimation from compressed data has appeared previously in different communities. In [26] a procedure is analyzed that compresses data by random linear transformations in the setting of sparse linear regression. Zhang and Berger [25] study estimation problems when the data are communicated from multiple sources; Ahlswede and Csiszár [2] consider testing problems under communication constraints; the use of side information is studied by Ahlswede and Burnashev [1]; other formulations in terms of multiterminal information theory are given by Han and Amari [14]; nonparametric problems are considered by Raginsky in [20]. In a distributed setting the data may be divided across different compute nodes, with distributed estimates then aggregated or pooled by communicating with a central node. The general “CEO problem” of distributed estimation was introduced by Berger, Zhang and Viswanathan [3], and has been recently studied in parametric settings in [13, 24]. These papers take the view that the data are communicated to the statistician at a certain rate, which may introduce distortion, and the goal is to study the degradation of the estimation error. In contrast, in our setting we can view the unquantized data as being fully available to the statistician at the time of estimation, with communication constraints being imposed when communicating the estimated model to a remote location. Finally, our quantized minimax analysis shows achievability using random coding schemes, which are not computationally efficient. A natural problem is to develop practical coding schemes that come close to the quantized minimax lower bounds. In our view, the most promising approach currently is to exploit source coding schemes based on greedy sparse regression [23], applying such techniques blockwise according to the procedure we developed in Section 4. Acknowledgements Research supported in part by ONR grant N00014-15-1-2379, and NSF grants DMS-1513594 and DMS-1547396. The authors thank Andrew Barron, John Duchi, Maxim Raginsky, Philippe Rigollet, Harrison Zhou, and the anonymous referees for valuable comments on this work. 25 References [1] Rudolf Ahlswede and MV Burnashev. On minimax estimation in the presence of side information about remote data. Ann. Statist., pages 141–171, 1990. [2] Rudolf Ahlswede and Imre Csiszár. Hypothesis testing with communication constraints. IEEE Trans. Inform. Theory, 32(4):533–542, 1986. [3] Toby Berger, Zhen Zhang, and Harish Viswanathan. The CEO problem. IEEE Trans. Inform. Theory, 42(3):887–902, 1996. [4] Lawrence D Brown, Mark G Low, et al. Asymptotic equivalence of nonparametric regression and white noise. Ann. Statist., 24(6):2384–2398, 1996. [5] John J Bruer, Joel A Tropp, Volkan Cevher, and Stephen Becker. Time–data tradeoffs by aggressive smoothing. In Advances in Neural Information Processing Systems, pages 1664–1672, 2014. [6] Venkat Chandrasekaran and Michael I Jordan. Computational and statistical tradeoffs via convex relaxation. Proc. Natl. Acad. Sci. USA, 110(13):E1181–E1190, 2013. [7] R Chattamvelli and MC Jones. Recurrence relations for noncentral density, distribution functions and inverse moments. J. Stat. Comput. Simul., 52(3):289–299, 1995. [8] Thomas M Cover and Joy A Thomas. Interscience, 2006. Elements of Information Theory. Wiley- [9] David L Donoho. Wald lecture I: Counting bits with Kolmogorov and Shannon. Note for the Wald Lectures, 1997. [10] Stark C Draper and Gregory W Wornell. Side information aware coding strategies for sensor networks. IEEE Journal on Selected Areas in Communications, 22(6):966–976, 2004. [11] Sameh Galal and Mark Horowitz. Energy-efficient floating-point unit design. IEEE Trans. Comput., 60(7):913–922, 2011. [12] Robert G Gallager. Information Theory and Reliable Communication. John Wiley & Sons, 1968. [13] Ankit Garg, Tengyu Ma, and Huy Nguyen. On communication cost of distributed statistical estimation and dimensionality. In Advances in Neural Information Processing Systems, pages 2726–2734, 2014. [14] Te Sun Han and Shun-ichi Amari. Statistical inference under multiterminal data compression. IEEE Trans. Inform. Theory, 44(6):2300–2324, 1998. [15] Iain M Johnstone. Gaussian estimation: Sequence and wavelet models. Unpublished manuscript, 2015. [16] Mario Lucic, Mesrob I Ohannessian, Amin Karbasi, and Andreas Krause. Tradeoffs for 26 space, time, data and risk in unsupervised learning. In International Conference on Artificial Intelligence and Statistics, 2015. [17] Michael Nussbaum. Spline smoothing in regression models and asymptotic efficiency in L2 . Ann. Statist., 13(3):984–997, 1985. [18] Michael Nussbaum. Asymptotic equivalence of density estimation and gaussian white noise. Ann. of Statist., pages 2399–2430, 1996. [19] Michael Nussbaum. Minimax risk: Pinsker bound. Encyclopedia of Statistical Sciences, 3:451–460, 1999. [20] Maxim Raginsky. Learning from compressed observations. In IEEE Information Theory Workshop, pages 420–425, 2007. [21] D Sakrison. A geometric treatment of the source encoding of a Gaussian random variable. IEEE Trans. Inform. Theory, 14(3):481–486, 1968. [22] Alexandre B Tsybakov. Introduction to Nonparametric Estimation. Springer Series in Statistics, 1st edition, 2008. [23] Ramji Venkataramanan, Tuhin Sarkar, and Sekhar Tatikonda. Lossy compression via sparse linear regression: Computationally efficient encoding and decoding. In IEEE International Symposium on Information Theory (ISIT), pages 1182–1186. IEEE, 2013. [24] Yuchen Zhang, John Duchi, Michael I Jordan, and Martin J Wainwright. Informationtheoretic lower bounds for distributed statistical estimation with communication constraints. In Advances in Neural Information Processing Systems, pages 2328–2336, 2013. [25] Zhen Zhang and Toby Berger. Estimation via compressed information. IEEE Trans. Inform. Theory, 34(2):198–211, 1988. [26] Shuheng Zhou, John Lafferty, and Larry Wasserman. Compressed and privacy-sensitive sparse regression. IEEE Trans. Inform. Theory, 55(2):846–866, 2009. [27] Yuancheng Zhu and John Lafferty. Quantized estimation of Gaussian sequence models in euclidean balls. In Advances in Neural Information Processing Systems, pages 3662– 3670, 2014. 27 Appendix A: Proofs of Technical Results In this section, we provide proofs for Theorems 3.1 and 4.1. A.1. Proof of Theorem 3.1 We first show Lemma A.1. The quantized minimax risk is lower bounded by Vε (m, c, Bε ), the value of the optimization (P1 ). Proof. As will be clear to the reader, Vε (m, c, Bε ) is achieved by some σ 2 that is nonincreasing and finitely supported. Let σ 2 be such that σ12 ≥ ··· ≥ σn2 > 0 = σn+1 = . . . , n X a2j σj2 = j=1 c2 , π 2m and let Θn (m, c) = {θ ∈ `2 : n X a2j θj2 j=1 c2 ≤ 2m , θj = 0 for j ≥ n + 1} ⊂ Θ(m, c). π We build on this sequence of σ 2 a prior distribution of θ. In particular, for τ ∈ (0, 1), write s2j = (1 − τ )σj2 and let πτ (θ; σ 2 ) be a the prior distribution on θ such that θj ∼ N (0, s2j ), j = 1, . . . , n, P(θj = 0) = 1, j ≥ n + 1. We observe that Rε (m, c, Bε ) ≥ ≥ inf sup b θ)≤B b θ,C( ε θ∈Θn (m,c) Z inf b θ)≤B b θ,C( ε Θn (m,c) b2 Ekθ − θk b 2 dπτ (θ; σ 2 ) Ekθ − θk ≥ Iτ − rτ where Iτ is the integrated risk of the optimal quantized estimator Z b 2 dπτ (θ; σ 2 ) Iτ = inf Ekθ − θk b θ)≤B b θ,C( ε and rτ is the residual Rn ⊗{0}∞ Z rτ = sup b θ∈Θ(m,c) Θ(m,c) b 2 dπτ (θ; σ 2 ) Ekθ − θk 28 where Θ(m, c) = (Rn ⊗ {0}∞ )\Θn (m, c). As shown in Section 3, limτ →0 Iτ is lower bounded by the value of the optimization ∞ X ∞ X σj2 ε2 min + µ2 σ 2 + ε2 j=1 j=1 j   ∞ X σj4 1 log+ ≤ Bε . such that 2 µ2j (σj2 + ε2 ) j=1 µ2j It then suffices to show that rτ = o(Iτ ) as ε → 0 for τ ∈ (0, 1). Let dn = supθ∈Θn (m,c) kθk, which is bounded since for any θ ∈ Θn (m, c) s s s sX X X 1 1 1 c2 c 2 2 2 2 θ ≤ θj2 = a a θ ≤ kθk = = . 1 j j j 2 2 2 2m a1 j a1 j a1 π a1 π m j We have Z rτ = sup b θ∈Θ(m,c) ≤2 ≤2 Θn (m,c) Z b 2 dπτ (θ; σ 2 ) Ekθ − θk (d2n + Ekθk2 )dπτ (θ; σ 2 ) Θn (m,c)  d2n P (θ ∈ / Θn (m, c)) + P(θ ∈ / Θn (m, c))Ekθk  4 1/2 where we use the Cauchy-Schwarz inequality. Noticing that  X n 2  2 Ekθk = E θj 4 j=1 = X E(θj21 )E(θj22 ) + j1 6=j2 ≤ X E(θj4 ) j=1 s2j1 s2j2 + 3 j1 6=j2 n X ≤3 n X n X s4j j=1 s2j 2 j=1 ≤ 3d4n , we obtain  p / Θn (m, c)) rτ ≤ P (θ ∈ / Θn (m, c)) + 3P (θ ∈ p ≤ 6d2n P (θ ∈ / Θn (m, c)). 2d2n  29  Thus, we only need to show that p P (θ ∈ / Θn (m, c)) = o(Iτ ). In fact, P(θ ∈Θ / n (m, c)) ! n 2 X c =P a2j θj2 > 2m π j=1 n X n X c2 2 2 2 =P aj (θj − E(θj )) > 2m − (1 − τ ) a2j σj2 π j=1 j=1 ! n X τ c2 =P a2j (θj2 − E(θj2 )) > 2m π j=1 ! n n X X τ =P a2j s2j (Zj2 − 1) > a2j s2j 1 − τ j=1 j=1 ! where Zj ∼ N (0, 1). By Lemma A.2, we get ! ! Pn Pn 2 2 2 2 2 s σ a a τ2 τ j=1 j j j=1 j j P(θ ∈ / Θn (m, c)) ≤ exp − = exp − 8(1 − τ )2 max1≤j≤n a2j s2j 8(1 − τ )2 max1≤j≤n a2j σj2 p / Θn (m, c)) = Next we will show that for the σ 2 that achieves Vε (m, c, Bε ), we have P(θ ∈ 2 o(Iτ ). For the sufficient regime where Bε ε 2m+1 → ∞ as ε → 0, it is shown in [22] that p 2 4m / Θn (m, c)) = o(Iτ ). max1≤j≤n a2j σj2 = O(ε 2m+1 ) and Iτ = O(ε 2m+1 ), and hence that P(θ ∈ 2 2m+1 For the insufficient regime where Bε ε → 0 but still Bε → ∞ as ε → 0, an achieving 2 sequence σ is given later by (A.4) and (A.3). We obtain that max1≤j≤n a2j σj2 = O(Bε−1 ) p and Iτ = O(Bε−2m ), and therefore P(θ ∈ / Θn (m, c)) = o(Iτ ). The sufficient regime where 2 Bε ε 2m+1 → d for some constant d is a bit more complicated as we don’t have an explicit formula for the optimal sequence σ 2 . However, by Lemma 3.3, for the continuous approximation σ 2 (x) such that σj2 = σ 2 (jh)h2m+1 , we have σ 2 (x) + 2 σ 2 (x) 1 + α · ≤ + 2α 2 2 2 (σ (x) + 1) σ (x) + 1 4  R x0 σ 4 (x) 2d log dx − and λ are both constants. Therefore, σ 2 (x)+1 x0 0 λx2m σ 2 (x) = where α = exp  1 x0 max a2j σj2 ≈ j 2m σ 2 (jh)h2m+1 ≤ 1≤j≤n 2 Pn 1 1 ( + 2α) · h. λ 4 a2j σj2 = O(h2m ) and that h = ε 2m+1 . We obtain that for this case Iτ = p 4m O(ε 2m+1 ) and P(θ ∈ / Θn (m, c)) = o(Iτ ). Thus, for each of the three regimes, we have rτ = o(Iτ ). Note that j=1 30 Lemma A.2 (Lemma 3.5 in [22]). Suppose that X1 , . . . , Xn are i.i.d. N (0, 1). For t ∈ (0, 1) and ωj > 0, j = 1, . . . , n, we have ! ! Pn n n 2 X X t ω j j=1 P ωj (Xj2 − 1) > t Xj ≤ exp − . 8 max ω 1≤j≤n j j=1 j=1 Proof of Lemma 3.1. This is in fact Pinsker’s theorem, which gives the exact asymptotic minimax risk of estimation of normal means in the Sobolev ellipsoid. The proof can be found in [19] and [22]. Proof of Lemma 3.2. As argued in Section 3 for the lower bound in the sufficient regime, optimization problem (Q1 ) can be reformulated as max Jη 2 σ ,J J 1X such that log+ 2 j=1 J X j=1 a2j σj2  σj4 η(σj2 + ε2 )  ≤ Bε (Q2 ) c2 ≤ 2m π (σj2 ) is decreasing and σJ4 ≥ η. σJ2 + ε2 Now suppose that we have a series (σj2 ) which satisfies the last constraint and is supported on {1, . . . , J}. By the first constraint, we have that ! J1   Y J 4 σ 2Bε j Jη = J exp − 2 J σ + ε2 j=1 j ! J1   Y J 2Bε ≤ J exp − σj2 J j=1 ! J1 ! J1  Y  J J Y 2Bε a2j σj2 a−2 = J exp − j J j=1 j=1 ! J ! J1   X J Y 2Bε ≤ exp − a−2 a2j σj2 j J j=1 j=1 ! J1   Y J 2 c 2Bε ≤ 2m exp − a−2 j π J j=1    − 2m J c2 Bε = 2m exp J! . π m 31 (A.1) This provides a series of upper bounds for Qε (m, c, Bε ) parameterized by J. To minimize (A.1) over J, we look at the ratio of the neighboring terms with J and J + 1, and compare it to 1. We obtain that the optimal J satisfies   Bε (J + 1)J+1 JJ < exp ≤ . (A.2) J! m (J + 1)! Denote this optimal J by Jε . By Stirling’s approximation, we have Bε /m = 1, ε→0 Jε lim (A.3) and plugging this asymptote into (A.1), we get as ε → 0 c2 π 2m    − 2m Jε c2 −2m c2 m2m −2m Bε ∼ . ∼ 2m Jε B exp Jε ! m π π 2m ε This gives the desired upper bound (3.6). 2 Next we show that the upper bound (3.6) is asymptotically achievable when Bε ε 2m+1 → 0 and Bε → ∞. It suffices to find a feasible solution that attains (3.6). Let σ ej2 = c2 /π 2m , j = 1, . . . , Jε . Jε a2j (A.4) ε Note that the entire sequence of (e σj2 )Jj=1 does not qualify for a feasible solution, since the first constraint in (Q2 ) won’t be satisfied for any η ≤ of (e σj2 ), where Jε0 is the largest j such that σ eJ4ε 2 σ eJε +ε2 . We keep only the first Jε0 terms σ ej4 ≥σ eJ2ε . 2 2 σ ej + ε (A.5) Thus,  Jε0 X1 j=1 2 σ ej4 2  σej +ε2 log+  σ eJ2ε  Jε0  X1 log+ ≤ 2 j=1  σ ej2 σ eJ2ε  ≤ Jε X 1 j=1 2  log+ σ ej2 σ eJ2ε  ≤ Bε , where the last inequality is due to (A.2). This tells us that setting η = σ eJ2ε leads to a feasible solution to (Q2 ). As a result, Qε (m, c, Bε ) ≥ Jε0 σ eJ2ε . (A.6) If we can show that Jε0 ∼ Jε , then Jε0 σ eJ2ε ∼ Jε σ eJ2ε c2 m2m −2m ∼ B . π 2m ε 32 (A.7) To show that Jε0 ∼ Jε , it suffices to show that aJε0 ∼ aJε . Plugging the formula of σ ej2 into (A.5) and solving for a2Jε0 , we get s c2 c2 c2 − 2m + ( 2m )2 + 4 2m ε2 a2Jε π Jε π Jε π Jε a2Jε0 ∼ 2ε2 2 2 c 1 π 2m Jε c2 2 2 c ε aJ ε 4 − 2m + 2m + π Jε π Jε 2 c2 π 2m Jε ∼ = a2Jε 2 2ε 2 where the equivalence is due to the assumption Bε ε 2m+1 → 0 and a Taylor’s expansion of √ the function x. Proof of Lemma 3.3. Suppose that σ 2 (x) with x0 solves (P4 ). Consider function σ 2 (x)+ξv(x) such that it is still feasible for (P4 ), and thus we have Z x0 x2m v(x)dx ≤ 0. 0 Now plugging σ 2 (x) + ξv(x) for σ 2 (x) in the objective function of (P4 ), taking derivative with respect to ξ, and letting ξ → 0, we must have  Z x0  Z Z x0 σ 4 (x) 1 2d 1 x0 2v(x) v(x) v(x) log 2 dx+x0 exp dx − − 2 dx ≤ 0, 2 2 2 (σ (x) + 1) x0 0 σ (x) + 1 x0 x0 0 σ (x) σ (x) + 1 0 which, after some calculation and rearrangement of terms, yields   Z x0   Z x0 1 1 σ 4 (x) 2d σ 2 (x) + 2 v(x) + exp log 2 dx − dx ≤ 0. (σ 2 (x) + 1)2 x0 0 σ (x) + 1 x0 σ 2 (x)(σ 2 (x) + 1) 0 Thus, by the lemma that follows, we obtain that for some λ  Z x0  1 σ 4 (y) 2d σ 2 (x) + 2 1 + exp log 2 dy − = λx2m . 2 2 2 2 (σ (x) + 1) x0 0 σ (y) + 1 x0 σ (x)(σ (x) + 1) Lemma A.3. Suppose Rthat f (x) and g(x) are two non-zero R x0functions on (0, x0 ) such that x0 for any v(x) satisfying 0 f (x)v(x)dx ≤ 0, it holds that 0 g(x)v(x)dx ≤ 0. Then there exists a constant λ such that f (x) = λg(x). R x0 R x0 Proof. First we show that for any v(x) such that f (x)v(x)dx = 0 we must have g(x)v(x)dx = 0 R x00 R x0 0. Otherwise, suppose that v0 (x) is such that f (x)v (x)dx = 0 and g(x)v (x)dx < 0. 0 0 0 0 R x0 Then Rtake another v(x) with 0R f (x)v(x)dx ≤ R0 and consider vγ (x) R x = v(x) − γv0 (x). We x x x have 0 0 f (x)vγ (x)dx ≤ 0 and 0 0 g(x)vγ (x) = 0 0 v(x)g(x)dx − γ 0 0 g(x)v0 (x)dx > 0 for large enough Rγ, which results R x0 in contradiction. x0 2 λ = 0 f (x) dx/ 0 f (x)g(x)dxR as the denominator cannot be zero. In fact, if R xLet x 0 2 f (x)g(x)dx = 0, it would imply that 0 0 g(x) 0 R x0 dx = 0 and hence g(x) ≡ 0. Now consider the function f (x)−λg(x). R x Notice that we have 0 f (x)(f (x)−λg(x))dx R x = 0 by the definition of λ. It follows that 0 0 g(x)(f (x) − λg(x))dx = 0, and therefore, 0 0 (f (x) − λg(x))2 dx = 0, which concludes the proof. 33 A.2. Proof of Theorem 4.1 Now we give the details of the proof of Theorem 4.1. For the purpose of our analysis, we define two allocations of bits, the monotone allocation and the blockwise constant allocation, ) ( ∞ X ∞ Πblk (B) = (bj )j=1 : bj ≤ B, bj = b̄k for j ∈ Jk , 0 ≤ bj ≤ bmax , (A.8) j=1 ( Πmon (B) = (bj )∞ j=1 : ) ∞ X bj ≤ B, bj−1 ≥ bj , 0 ≤ bj ≤ bmax j=1 , (A.9) where bmax = 2 log(1/ε). We also define two classes of weights, the monotonic weights and the blockwise constant weights,  (A.10) Ωblk = (ωj )∞ j=1 : ωj = ω̄k for j ∈ Jk , 0 ≤ ωj ≤ 1 ,  ∞ Ωmon = (ωj )j=1 : ωj−1 ≥ ωj , 0 ≤ ωj ≤ 1 . (A.11) We will also need the following results from [22] regarding the weakly geometric system of blocks. Lemma A.4. Let {Jk } be a weakly geometric block system defined by (4.1). Then there exists 0 < ε0 < 1 and C > 0 such that for any ε ∈ (0, ε0 ), K ≤ C log2 (1/ε), Tk+1 ≤ 1 + 3ρε . max 1≤k≤K−1 Tk We divide the proof into four steps. Step 1. Truncation and replacement The loss of the quantized estimator θ̌ can be decomposed into 2 kθ̌ − θk = K X k=1 2 kθ̌(k) − θ(k) k + ∞ X θj2 , j=N +1 where the remainder term satisfies ∞ X j=N +1 θj2 ≤N −2m ∞ X a2j θj2 = O(N −2m ). j=N +1 If we assume that m > 1/2, which corresponds to classes of continuous functions, the remainder term is then o(ε2 ). If m ≤ 1/2, the remainder term is on the order of O(ε4m ), which 4m is still negligible compared to the order of the lower bound ε 2m+1 . To ease the notation, we will assume that m > 1/2, and write the remainder term as o(ε2 ), but need to bear in mind 34 that the proof works for all m > 0. We can thus discard the remainder term in our analysis. Recall that the quantized estimate for each block is given by q Šk2 − Tk ε2 θ̌(k) = 1 − 2−2ebk Ž(k) , Šk and consider the following estimate with Šk replaced by Sk q Sk2 − Tk ε2 b 1 − 2−2ebk Ž(k) . θ(k) = Sk Notice that q Šk2 − Tk ε2 Sk2 − Tk ε2 b kθ(k) − θ̌(k) k = − 1 − 2−2ebk kŽ(k) k S Šk k 2 Šk Sk + Tk ε Šk − Sk ≤ Šk Sk ≤ 2ε2 where the last inequality is because Šk Sk ≥ Tk ε2 and Šk − Sk ≤ ε2 . Thus we can safely replace θ̌(k) by θb(k) because kθ̌(k) − θ(k) k2 = kθ̌(k) − θb(k) + θb(k) − θ(k) k2 ≤ kθ̌(k) − θb(k) k2 + kθb(k) − θ(k) k2 + 2kθ̌(k) − θb(k) kkθb(k) − θ(k) k = kθb(k) − θ(k) k2 + O(ε2 ). Therefore, we have Ekθ̌ − θk2 = E K X k=1 kθb(k) − θ(k) k2 + O(Kε2 ). Step 2. Expectation over codebooks Now conditioning on the data Y , we work under the probability measure introduced by the random codebook. Write Y(k) S 2 − Tk ε2 λk = k 2 and Z(k) = . Sk kY(k) k We decompose and examine the following term Ak = kθb(k) − θ(k) k2 = kθb(k) − λk Sk Z(k) + λk Sk Z(k) − θ(k) k2 = kθb(k) − λk Sk Z(k) k2 + kλk Sk Z(k) − θ(k) k2 | {z } | {z } Ak,1 Ak,2 + 2hθb(k) − λk Sk Z(k) , λk Sk Z(k) − θ(k) i . | {z } Ak,3 35 To bound the expectation of the first term Ak,1 , we need the following lemma, which bounds the probability of the distortion of a codeword exceeding the desired value. Lemma A.5. Suppose that Z1 , . . . , Zn are independent and each follows the uniform distribution on the t-dimensional unit sphere St−1 . Let y ∈ St−1 be a fixed vector, and Z ∗ = arg min √ z∈Z1:n If n = 2qt , then E √ 1 − 2−2q Z ∗ − y where ν(t) = Observe that 2 1 − 2−2q z − y 2 . ≤ 2−2q (1 + ν(t)) + 2e−2t 6 log t + 7 . t − 6 log t − 7 2 Ak,1 = θb(k) − λk Sk Z(k) q = λk Sk 1 − 2−2ebk Ž(k) − λk Sk Z(k) = λ2k Sk2 q 1 − 2−2ebk Ž(k) − Z(k) 2 2 . Then, it follows as a result of Lemma A.5 that  (Sk2 − Tk ε2 )2  −2ebk −2Tk (1 + νε ) + 2e E Ak,1 | Y(k) ≤ 2 Sk2  (S 2 − Tk ε2 )2  −2ebk 2 (1 + νε ) + 2e−2T1 ≤ k 2 Sk 2 (S − Tk ε2 )2 −2ebk 2c2 2 (1 + νε ) + ε2 , ≤ k 2 Sk (jk π)2m  log T1 +7 where νε = T16−6 . Since Ak,2 only depends on Y(k) , E Ak,2 | Y(k) = Ak,2 . Next we log T1 −7  consider the cross term Ak,3 . Write γk = Ak,3 hθ(k) ,Y(k) i kY(k) k2 D and = 2 θb(k) − λk Sk Z(k) , λk Sk Z(k) − θ(k) D E = 2 θb(k) − λk Sk Z(k) , γk Y(k) − θ(k) | {z } E Ak,3a D E + 2 θb(k) − λk Sk Z(k) , λk Sk Z(k) − γk Y(k) . | {z } Ak,3b 36 The quantity γk is chosen such that hY(k) , γk Y(k) − θ(k) i = 0 and therefore D E Ak,3a = 2 θb(k) − λk Sk Z(k) , γk Y(k) − θ(k) D E b = 2 ΠY(k) ⊥ (θ(k) − λk Sk Z(k) ), γk Y(k) − θ(k) where ΠY(k) ⊥ denotes the projection onto the orthogonal complement of Y(k) . Due to the choice  of Ž(k) , the projection ΠY ⊥ (θb(k) −λk Sk Z(k) ) is rotation symmetric and hence E Ak,3a | Y(k) = (k) 0. Finally, for Ak,3b we have  E Ak,3b | Y(k)   ≤ 2kλk Sk Z(k) − γk Y(k) kE kθb(k) − λk Sk Z(k) k | Y(k) r   2 b ≤ 2kλk Sk Z(k) − γk Y(k) k E kθ(k) − λk Sk Z(k) k | Y(k) s ≤ 2kλk Sk Z(k) − γk Y(k) k (Sk2 − Tk ε2 )2 −2eb 2c2 k (1 + ν ) + ε2 . 2 ε Sk2 (jk π)2m Combining all the analyses above, we have  E Ak | Y(k) (Sk2 − Tk ε2 )2 −2ebk 2c2 ≤ (1 + νε ) + ε2 + kλk Sk Z(k) − θ(k) k2 2 2 2m Sk (jk π) s (Sk2 − Tk ε2 )2 −2eb 2c2 k (1 + ν ) + 2 ε2 , + 2kλk Sk Z(k) − γk Y(k) k ε Sk2 (jk π)2m and summing over k we get  E kθ̌ − θk2 | Y ≤ K X (S 2 − Tk ε2 )2 k Sk2 k=1 +2 K X k=1 −2e bk 2 (1 + νε ) + K X k=1 s kλk Sk Z(k) − γk Y(k) k kλk Sk Z(k) − θ(k) k2 (A.12) (Sk2 − Tk ε2 )2 −2eb 2 k (1 + νε ) + O(ε2 ) + O(Kε2 ). Sk2 Step 3. Expectation over data First we will state three lemmas, which bound the deviation of the expectation of some particular functions of the norm of a Gaussian vector to the desired quantities. The proofs are given in Section A.3. 37 Lemma A.6. Suppose that Xi ∼ N (θi , σ 2 ) Let S be given by √ 2  √nσ S= nσ 2 + c   kXk independently for i = 1, . . . , n, where kθk2 ≤ c2 . √ if kXk < nσ 2 √ if kXk > nσ 2 + c otherwise. Then there exists some absolute constant C0 such that 2  2 S − nσ 2 hθ, Xi − E ≤ C0 σ 2 . S kXk Lemma A.7. Let X and S be the same as defined in Lemma A.6. Then for n > 4 E (S 2 − nσ 2 )2 kθk4 4n 2 σ . ≤ + 2 2 2 S kθk + nσ n−4 Lemma A.8. Let X and S be the same as defined in Lemma A.6. Define   2 2 kXk2 − nσ 2 b b† = S − nσ X. θ+ = X, θ kXk2 SkXk + Then nσ 2 kθk2 + 4σ 2 . Ekθb† − θk2 ≤ Ekθb+ − θk2 ≤ kθk2 + nσ 2 We now take the expectation with respect to the data on both sides of (A.12). First, by the Cauchy-Schwarz inequality s ! (Sk2 − Tk ε2 )2 −2eb E kλk Sk Z(k) − γk Y(k) k 2 k (1 + νε ) + O(ε2 ) Sk2 (A.13) s   q 2 2 2 (Sk − Tk ε ) −2eb ≤ Ekλk Sk Z(k) − γk Y(k) k2 E 2 k (1 + νε ) + O(ε2 ) . Sk2 We then calculate q Ekλk Sk Z(k) − γk Y(k) k2 s hθ(k) , Y(k) i Y(k) S 2 − Tk ε2 Y(k) = E k − Sk kY(k) k kY(k) k kY(k) k s  2 Sk2 − Tk ε2 hθ(k) , Y(k) i = E − Sk kY(k) k ≤ C0 ε, 38 2 where the last inequality is due to Lemma A.6, and C0 is the constant therein. Plugging this in (A.13) and summing over k, we get s ! K X (Sk2 − Tk ε2 )2 −2eb 2 k (1 + νε ) + O(ε2 ) E kλk Sk Z(k) − γk Y(k) k 2 S k k=1 s   K X (Sk2 − Tk ε2 )2 −2eb ≤ C0 ε E 2 k (1 + νε ) + O(ε2 ) 2 S k k=1 v u K √ u X (Sk2 − Tk ε2 )2 −2eb ≤ C0 KεtE 2 k (1 + νε ) + O(Kε2 ). 2 S k k=1 Therefore, Ekθ̌ − θk2 K X (S 2 − Tk ε2 )2 K X −2e bk k 2 kλk Sk Z(k) − θ(k) k2 (1 + νε ) + E 2 S k | k=1 {z } | k=1 {z } B1 B2 v u K √ u X (Sk2 − Tk ε2 )2 −2eb 2 k (1 + νε ) + O(Kε2 ) + C0 KεtE 2 S k k=1 ≤E + O(Kε2 ). Now we deal with the term B1 . Recall that the sequence eb solves problem (4.2), so for any sequence b ∈ Πblk K K X (Šk2 − Tk ε2 )2 −2ebk X (Šk2 − Tk ε2 )2 −2b̄k 2 ≤ 2 . Šk2 Šk2 k=1 k=1 Notice that 2 2 2 (Šk2 − Tk ε2 )2 (Sk2 − Tk ε2 )2 2 2 Šk Sk − Tk ε − = Š − S = O(ε2 ) k k 2 2 2 2 S Šk Šk Sk k and thus, K X (S 2 − Tk ε2 )2 k Sk2 k=1 2−2bk ≤ e K X (S 2 − Tk ε2 )2 k k=1 Sk2 2−2b̄k + O(Kε2 ). Taking the expectation, we get E K X (S 2 − Tk ε2 )2 k Sk2 k=1 2−2bk ≤ e K X (S 2 − Tk ε2 )2 −2b̄k E k 2 2 + O(Kε2 ). S k k=1 Applying Lemma A.7, we get for Tk > 4 E kθ(k) k4 (Sk2 − Tk ε2 )2 4Tk 2 ≤ + ε Sk2 kθ(k) k2 + Tk ε2 Tk − 4 39 and it follows that E K X (S 2 − Tk ε2 )2 k Sk2 k=1 −2e bk 2 ≤ K X k=1 kθ(k) k4 2−2b̄k + O(Kε2 ). kθ(k) k2 + Tk ε2 Since b ∈ Πblk is arbitrary, E K X (S 2 − Tk ε2 )2 k Sk2 k=1 2−2bk ≤ min e b∈Πblk K X k=1 kθ(k) k4 2−2b̄k + O(Kε2 ). 2 2 kθ(k) k + Tk ε Turning to the term B2 , as a result of Lemma A.8 we have kλk Sk Z(k) − θ(k) k2 ≤ kθ(k) k2 Tk ε2 + 4ε2 . kθ(k) k2 + Tk ε2 Combining the above results, we have shown that √ p Ekθ̌ − θk2 ≤ M + O(Kε2 ) + C0 Kε M + O(Kε2 ) (A.14) where M = (1 + νε ) = (1 + νε ) K X min b∈Πblk (B) min b∈Πblk (B) + min K X ω∈Ωblk k=1 k=1 K X k=1 K X kθ(k) k2 Tk ε2 kθ(k) k4 −2b̄k 2 + kθ(k) k2 + Tk ε2 kθ(k) k2 + Tk ε2 k=1 kθ(k) k4 2−2b̄k kθ(k) k2 + Tk ε2  (1 − ω̄k )2 kθ(k) k2 + ω̄k2 Tk ε2 . Step 4. Blockwise constant is almost optimal We now show that in terms of both bit allocation and weight assignment, blockwise constant 1 is almost optimal. Let’s first consider bit allocation. Let B 0 = 1+3ρ (B − T1 bmax ). We are ε going to show that min b∈Πblk (B) K X k=1 N X θj4 kθ(k) k4 −2b̄k 2 ≤ min 2−2bj . 2 2 b∈Πmon (B 0 ) kθ(k) k2 + Tk ε2 θ + ε j=1 j (A.15) In fact, suppose that b∗ ∈ Πmon (B 0 ) achieves the minimum on the right hand side, and define b? by ( maxi∈Bk b∗i j ∈ Bk b?j = . 0 j≥N 40 The sum of the elements in b? then satisfies ∞ X b?j = j=1 K−1 X Tk+1 max b∗j j∈Bk+1 k=0 = T1 b?1 K−1 X + Tk+1 max b∗j j∈Bk+1 k=1 K−1 X ≤ T1 bmax + Tk+1 X ∗ b Tk j∈B j k=1 k ≤ T1 bmax + (1 + 3ρε ) K−1 X X b∗j k=1 j∈Bk 0 ≤ T1 bmax + (1 + 3ρε )B = B, which means that b? ∈ Πblk (B). It then follows that K X min b∈Πblk (B) ≤ ≤ = K X k=1 K X kθ(k) k4 ? 2−2b̄k 2 2 kθ(k) k + Tk ε X k=1 j∈Bk N X j=1 = k=1 kθ(k) k4 2−2b̄k kθ(k) k2 + Tk ε2 θj4 ? 2−2bj 2 2 θj + ε (A.16) θj4 −2b∗j 2 2 θj + ε2 min N X b∈Πmon (B 0 ) j=1 θj4 2−2bj , θj2 + ε2 where (A.16) is due to Jensen’s inequality on the convex function  2 1 2 kθ k (k) Tk 1 X θj4 ≤ . 1 Tk j∈B θj2 + ε2 kθ(k) k2 + ε2 Tk x2 x+ε2 k Next, for the weights assignment, by Lemma 3.11 in [22], we have min ω∈Ωblk K X k=1 (1 − ω̄k )2 kθ(k) k2 + ω̄k2 Tk ε2 ≤ (1 + 3ρε ) min ω∈Ωmon K X k=1 41  (1 − ωj )2 θj2 + ωj2 ε2 !  (A.17) 2 + T1 ε . Combining (A.15) and (A.17), we get M = (1 + νε ) min b∈Πblk (B) + min ω∈Ωblk ≤ (1 + νε ) K X K X k=1 kθ(k) k4 2−2b̄k kθ(k) k2 + Tk ε2 (1 − ω̄k )2 kθ(k) k2 + ω̄k2 Tk ε2 k=1 K X min b∈Πblk (B) k=1 kθ(k) k4 2−2b̄k kθ(k) k2 + Tk ε2 K X + (1 + 3ρε ) min  (1 − ω̄k )2 kθ(k) k2 + ω̄k2 Tk ε2 + T1 ε2 ω∈Ωmon  ≤ (1 + νε ) + min min k=1 N X b∈Πmon (B 0 ) N X ω∈Ωmon j=1 j=1 (1 −  θj4 2−2bj θj2 + ε2 ωj )2 θj2 + ωj2 ε2   + T1 ε2 . Then by Lemma A.9, M ≤ (1 + νε )Vε (m, c, B 0 ) + T1 ε2 . which, plugged into (A.14), gives us Ekθ̌ − θk2 ≤ (1 + νε )Vε (m, c, B 0 ) + O(Kε2 ) √ p + C0 Kε (1 + νε )Vε (m, c, B 0 ) + O(Kε2 ). Recall that  νε = O and that Thus, log log(1/ε) log(1/ε)  , B0 1 lim = lim ε→0 B ε→0 1 + 3ρε  K = O(log2 (1/ε)), T1 bmax 1− B Vε (m, c, B 0 ) = 1. ε→0 Vε (m, c, B) lim 42  = 1. 4m Also notice that no matter how B grows as ε → 0, Vε (m, c, B) = O(ε 2m+1 ). Therefore, Ekθ̌ − θk2 ε→0 Vε (B, m, c) lim ≤ lim (1 + νε ) ε→0 Vε (B 0 , m, c) O(Kε2 ) + Vε (B, m, c) V (B, m, c) s Kε2 Vε (B 0 , m, c) (1 + νε ) + Vε (B, m, c) Vε (B, m, c) + C0  O(Kε2 ) Vε (B, m, c) 2 ! =1 which concludes the proof. Lemma A.9. Let V1 be the value of the optimization max min θ b N  X j=1 θj4 θj2 ε2 −2bj 2 + 2 θj2 + ε2 θj + ε2 N X  J X c2 such that bj ≤ B, bj ≥ 0, a2j θj2 ≤ 2m , π j=1 j=1 (A1 ) and let V2 be the value of the optimization max min θ b,ω such that N  X j=1 N X j=1 J X j=1 θj4 2−2bj + (1 − ωj )2 θj2 + ωj2 ε2 θj2 + ε2  bj ≤ B, bj−1 ≥ bj , 0 ≤ bj ≤ bmax , ωj−1 ≥ ωj , a2j θj2 ≤ c2 . π 2m Then V1 = V2 . A.3. Proofs of Lemmas Proof of Lemma A.5. Let ζ(t) be a positive function of t to be specified later. Let  √  p p0 = P 1 − 2−2q Z1 − y ≤ 2−q 1 + ζ(t) . By Lemma A.10, when ζ(t) ≤ 2(1 − 2−2q ), p0 can be lower bounded by t−1 Γ( t + 1)  p p0 ≥ √ 2 t+1 2−q 1 + ζ(t)/2 . πtΓ( 2 ) 43 (A2 ) We obtain that E √ 2 1 − 2−2q Z ∗ − y ≤ 2−2q (1 + ζ(t)) + 2P  √  p 1 − 2−2q Z ∗ − y > 2−q 1 + ζ(t) = 2−2q (1 + ζ(t)) + 2(1 − p0 )n . To upper bound (1 − p0 )n , we consider log ((1 − p0 )n ) = n log(1 − p0 ) ≤ −np0 t−1 Γ( t + 1)  p ≤ −2qt √ 2 t+1 2−q 1 + ζ(t)/2 πtΓ( 2 ) t−1 Γ( t + 1) ≤ −2q √ 2 t+1 (1 + ζ(t)/2)(2/ζ(t)+1) 2(2/ζ(t)+1) πtΓ( 2 ) √ 1 t t t−1 2π( 2t ) 2 + 2 e− 2 2(2/ζ(t)+1) ≤ −√ e t 1 t πte( 2t − 12 ) 2 e−( 2 − 2 )   2t t−1 t − 23 − 12 = −e t e 2(2/ζ(t)+1) t−1 t−1 1 ≤ −e−1 t− 2 e 2(2/ζ(t)+1) where we have used Stirling’s approximation in the form √ 2πz z+1/2 e−z ≤ Γ(z + 1) ≤ ez z+1/2 e−z . In order for (1 − p0 )n ≤ e−2t to hold, we need 1 t−1 −2t = −e−1 t− 2 e 2(2/ζ(t)+1) , which leads to the choice of ζ(t) ζ(t) = 2 t−1 3 2 log(2et 2 ) −1 = 6 log t + 4 log(2e) . t − 3 log t − 2 log(2e) − 1 Thus, we have shown that when q is not too close to 0, satisfying 1 − 2−2q ≥ ζ(t)/2, we have E √ 1 − 2−2q Z ∗ − y 2 ≤ 2−2q (1 + ζ(t)) + e−2t . When 1 − 2−2q < ζ(t)/2, we observe that E √ 1 − 2−2q Z ∗ − y 2 √ = 1 − 2−2q + 1 − 2 1 − 2−2q EhZ ∗ , yi  ≤ 2 − 2−2q = 2−2q 1 + 2 22q − 1 44 y √ δ 1+ν Disk 1 √ 1 − δ2 θ0 Fig 5. Illustration of the geometry for calculating p0 and that 2(22q − 1) < Now take ν(t) = 2 2ζ(t) 6 log t + 4 log(2e) −2= = . 1 − ζ(t)/2 2 − ζ(t) t − 6 log t − 4 log(2e) − 1 6 log t+7 . t−6 log t−7 E Notice that ν(t) > √ 1 − 2−2q Z ∗ − y 2 6 log t+4 log(2e) t−6 log t−4 log(2e)−1 ≥ ζ(t), we have for any q ≥ 0 ≤ 2−2q (1 + ν(t)) + e−2t . Lemma A.10. Suppose Z is a t-dimensional random vector uniformly distributed on the unit sphere St−1 . Let y be a fixed vector on the unit sphere. For δ < 1 and ζ > 0 satisfying ζ ≤ 2(1 − δ 2 ), define   p p0 = P kZ − yk ≤ δ 1 + ζ . We have  t−1 Γ 2t + 1  p  p0 ≥ √ δ 1 + ζ/2 πtΓ t+1 2 Proof. The proof is based on an idea from [21]. Denote by Vt and At the volume and the surface area of a t-dimensional unit sphere, respectively. We have Z 1 1 Vt = At rt−1 dr = At . t 0 45 From the geometry of the situation as illustrated in Figure 5, p0 is equal to the ratio of two areas S1 and S2 . The first area S1 is the portion of the surface √ √ area of the sphere of radius 2 1 − δ and center O contained within the sphere of radius √ δ 1 + ζ and center y. It is the surface area of a (t − 1)-dimensional polar cap of radius 1 − δ 2 and polar √ angle θ0 , and can be lower bounded by the area of a (t − 1)-dimensional disk of radius 1 − δ 2 sin θ0 , that is, √ √ t−1 t−1 1 At−1 S1 ≥ Vt−1 1 − δ 2 sin θ0 1 − δ 2 sin θ0 = t−1 √ The second area S2 is simply the surface area of a (t−1)-dimensional sphere of radius 1 − δ 2 t−1 √ 2 1−δ S2 = A t . Therefore, we obtain S1 ≥ p0 = S2 1 A t−1 t−1 √ 1 − δ 2 sin θ0 √ t−1 At 1 − δ2 t−1  Γ t+1 + 12 At−1 t−1 2  (sin θ0 )t−1 , = (sin θ0 ) = √ t+1 (t − 1)At πtΓ 2 where we have used the well-known relationship between At−1 and At  At−1 1 (t − 1)Γ 2t + 1  . =√ At π tΓ t−1 + 1 2 Now we need to calculate sin θ0 . By the law of cosines, we have cos θ0 = 1 + 1 − δ 2 − δ 2 (1 + ζ) 1 − δ 2 (1 + ζ/2) √ = √ 2 2 1 − δ2 1−δ and it follows that sin2 θ0 = 1 − cos2 θ0 = 1 − 1 + δ 4 (1 + ζ/2)2 − 2δ 2 (1 + ζ/2) δ4ζ 2 2 = δ (1 + ζ) − . 1 − δ2 4(1 − δ 2 ) Now since ζ ≤ 2(1 − δ 2 ), we get sin θ0 ≥ δ p 1 + ζ/2, which completes the proof. Proof of Lemma A.6. We first claim that  2 2  2 S − nσ 2 hθ, Xi kXk2 − nσ 2 hθ, Xi E − ≤E − . S kXk kXk kXk In fact, √ writing Er (·) for √ the conditional expectation E(· | kXk = r), it suffices to show that 2 for r < nσ and r > nσ 2 + c  2 2  2 S − nσ 2 hθ, Xi kXk2 − nσ 2 hθ, Xi Er − ≤ Er − . S kXk kXk kXk 46 When r < √ nσ 2 , it is equivalent to  Er hθ, Xi kXk 2  ≤ Er hθ, Xi kXk2 − nσ 2 − kXk kXk 2 It is then sufficient to show that Er hθ, Xi ≥ 0.√This can be obtained by following a similar argument as in Lemma A.6 in [22]. When r > nσ 2 + c, we need to show that !2 √ 2  ( nσ 2 + c)2 − nσ 2 hθ, Xi kXk2 − nσ 2 hθ, Xi √ − − , ≤ Er kXk kXk kXk nσ 2 + c Er which, after some algebra, boils down to √ 2 ( nσ 2 + c)2 − nσ 2 r2 − nσ 2 √ ≥ Er hθ, Xi. + 2 r r nσ + c This holds because r ! √ ( nσ 2 + c)2 − nσ 2 r2 − nσ 2 2 √ − Er hθ, Xi + r r nσ 2 + c ≥ kθk2 + r2 − nσ 2 − 2Er hθ, Xi ≥ Er kX − θk2 − nσ 2 ≥0 √ nσ 2 + c, kθk ≤ c and that √ Er kX − θk ≥ Er kXk − kθk ≥ nσ 2 . where we have used the assumption that r > Now that we have shown (A.3) and noting that  E kXk2 − nσ 2 hθ, Xi − kXk kXk 2 2 =σ E  kX/σk2 − n hθ/σ, X/σi − kX/σk kX/σk 2 , we can assume that X ∼ N (θ, In ) and equivalently show that there exists a universal constant C0 such that  2 kXk2 − n hθ, Xi E − ≤ C0 kXk kXk 47 holds for any n and θ. Letting Z = X − θ and writing kθk2 = ξ, we have  2 kXk2 − n hθ, Xi E − kXk kXk 2  2 hθ, Zi kZ + θk − n − ξ − =E kZ + θk kZ + θk    2 2 kZ + θk2 − n − ξ hθ, Zi ≤ 2E + 2E kZ + θk kZ + θk 2  (n + ξ)2 hθ, Zi 2 ≤ 2EkZ + θk − 4(n + ξ) + 2E + 2E kZ + θk2 kZ + θk  2 2 (n + ξ) hθ, Zi ≤ 2(n + ξ) − 4(n + ξ) + 2 + 2E n+ξ−4 kZ + θk  2 8(n + ξ) hθ, Zi = + 2E . n+ξ−4 kZ + θk where the last inequality is due to Lemma A.11. To bound the last term, we apply the Cauchy-Schwarz inequality and get 2 s  1 hθ, Zi Ehθ, Zi4 ≤ E E kZ + θk kZ + θk4 s 3(n − 4)ξ 2 ≤ (n − 6)(n + ξ − 4)(n + ξ − 6) where the last inequality is again due to Lemma A.11. Thus we just need to take C0 to be s 8(n + ξ) 3(n − 4)ξ 2 +2 , sup (n − 6)(n + ξ − 4)(n + ξ − 6) n≥7,ξ≥0 n + ξ − 4 which is apparently a finite quantity. √ 2 2 2 2 Proof of Lemma A.7. Since the function (x − nσ ) /x is decreasing on (0, nσ 2 ) and in√ creasing on ( nσ 2 , ∞), we have (S 2 − nσ 2 )2 (kXk2 − nσ 2 )2 ≤ , S2 kXk2 and it follows that if n > 4 (kXk2 − nσ 2 )2 (S 2 − nσ 2 )2 E ≤ E S2 kXk2 2 2 (A.18) 2 4 = EkXk − 2nσ + n σ E  1 kXk2 n2 σ 4 kθk2 + nσ 2 − 4σ 2 4n 2 kθk4 ≤ + σ 2 2 kθk + nσ n−4 48 ≤ kθk2 − nσ 2 +  (A.19) (A.20) (A.21) where (A.20) is due to Lemma A.11, and (A.21) is obtained by n2 σ 4 kθk4 − kθk2 + nσ 2 − 4σ 2 kθk2 + nσ 2 kθk4 + 4σ 2 (nσ 2 − kθk2 ) kθk4 = − kθk2 + nσ 2 − 4σ 2 kθk2 + nσ 2 2 6 4n σ = 2 2 (kθk + nσ − 4σ 2 )(kθk2 + nσ 2 ) 4n 2 ≤ σ . n−4 kθk2 − nσ 2 + Proof of Lemma A.8. First, the second inequality Ekθb+ − θk2 ≤ nσ 2 kθk2 + 4σ 2 kθk2 + nσ 2 is given by Lemma 3.10 from [22]. We thus focus on the first inequality. For convenience we write   s(x)2 − nσ 2 kxk2 − nσ 2 , g (x) = g+ (x) = † kxk2 s(x)kxk + with √ √ 2  nσ if kxk < nσ 2 √ √ s(x) = nσ 2 + c if kxk > nσ 2 + c .   kxk otherwise √ √ Notice that g+ (x) = g† (x) when kxk ≤ nσ 2 + c and g+ (x) > g† (x) when kxk > nσ 2 + c. Since g† and g+ both only depend on kxk, we sometimes will also write g† (kxk) for g† (x) and g+ (kxk) for g+ (x). Setting Er (·) to denote the conditional expectation E(· | kXk = r) √ 2 for brevity, it suffices to show that for r ≥ nσ + c   Er kg† (X)X − θk2 ≤ Er kg+ (X)X − θk2 ⇐⇒ g† (r)2 r2 − 2g† (r)Er hX, θi ≤ g+ (r)2 r2 − 2g+ (r)Er hX, θi ⇐⇒ (g† (r)2 − g+ (r)2 )r2 ≥ 2(g† (r) − g+ (r))Er hX, θi ⇐⇒ (g† (r) + g+ (r))r2 ≥ 2Er hX, θi. (A.22) On the other hand, we have  kθk2 r2 − nσ 2 + r2 (g† (r) + g+ (r))r ≥ 2 2 r r 2 2 = kθk + r − nσ 2 = kθk2 + r2 − 2Er hX, θi − nσ 2 + 2Er hX, θi = Er kX − θk2 − nσ 2 + 2Er hX, θi ≥ 2Er hX, θi 2  49 where the last inequality is because kX − θk2 ≥ (kXk − kθk)2 ≥ nσ 2 . Thus, (A.22) holds and hence Ekθb† − θk2 ≤ Ekθb+ − θk2 . Proof of Lemma A.9. It is easy to see that V1 ≤ V2 , because for any θ the inside minimum is smaller for (A1 ) than for (A2 ). Next, we will show V1 ≥ V2 . Suppose that θ∗ achieves the value V2 , with corresponding b∗ and ω ∗ . We claim that θ∗ is non-increasing. In fact, if θ∗ is not non-increasing, then there must exist an index j such ∗ and for simplicity let’s assume that θ1∗ < θ2∗ . We are going to show that this that θj∗ < θj+1 ∗ ∗ leads to b1 = b2 and ω1∗ = ω2∗ . Write θ1∗4 s1 = ∗2 , θ 1 + ε2 We have s1 < s2 . Let b̄∗ = θ2∗4 s2 = ∗2 . θ 2 + ε2 b∗1 +b∗2 2 and observe that b∗1 ≥ b̄∗ ≥ b∗2 . Notice that    −2b̄∗ −2b∗1 −2b∗2 −2b̄∗ s1 2 + s2 2 − s1 2 + s2 2     ∗ ∗ ∗ ∗ = s1 2−2b1 − 2−2b̄ + s2 2−2b2 − 2−2b̄     ∗ ∗ ∗ ∗ ≥ s2 2−2b1 − 2−2b̄ + s2 2−2b2 − 2−2b̄   −2b∗1 −2b∗2 −2b̄∗ +2 −2·2 ≥ s2 2 ≥ 0, where equality holds if and only if b∗1 = b∗2 , since s2 > s1 ≥ 0. Hence, b∗1 and b∗2 have to be equal, or otherwise it would contradict with ∗the∗ assumption that b∗ achieves the inside ω +ω minimum of (A2 ). Now turn to ω ∗ . Write ω̄ ∗ = 1 2 2 and note that ω1∗ ≥ ω̄ ∗ ≥ ω2∗ . Consider    (1 − ω1∗ )2 θ1∗2 + ω1∗2 ε2 + (1 − ω2∗ )2 θ2∗2 + ω2∗2 ε2 − (1 − ω̄ ∗ )2 (θ1∗2 + θ2∗2 ) + 2ω̄ ∗2 ε2    = (1 − ω1∗ )2 − (1 − ω̄ ∗ )2 θ1∗2 + (1 − ω2∗ )2 − (1 − ω̄ ∗ )2 θ2∗2 + ω1∗2 + ω2∗2 − 2ω̄ ∗2 ε2    ≥ (1 − ω1∗ )2 − (1 − ω̄ ∗ )2 θ2∗2 + (1 − ω2∗ )2 − (1 − ω̄ ∗ )2 θ2∗2 + ω1∗2 + ω2∗2 − 2ω̄ ∗2 ε2   = (1 − ω1∗ )2 + (1 − ω2∗ )2 − 2(1 − ω̄ ∗ )2 θ2∗2 + ω1∗2 + ω2∗2 − 2ω̄ ∗2 ε2 ≥ 0, where the equality holds if and only if ω1∗ = ω2∗ . Therefore, ω1∗ and ω2∗ must be equal. Now, with b∗1 = b∗2 and ω1∗ = ω2∗ , we can switch θ1∗ and θ2∗ without increasing the objective function and violating the constraints. Thus, our claim that θ∗ is non-increasing is justified. Now that we have shown that the solution triplet (θ∗ , b∗ , ω ∗ ) to (A2 ) satisfy that θ∗ is non-increasing, in order to prove V1 ≥ V2 , it suffices to show that if we take θ = θ∗ in (A1 ), the minimizer b? is non-increasing and b?1 ≤ bmax . In fact, if so, we will have b? = b∗ as well as ω ∗ = θj∗2 ∗2 θj +ε2 and then V1 ≥ b: min PN j=1 bj ≤B N  X j=1 θj∗4 θj∗2 ε2 −2bj 2 + θj∗2 + ε2 θj∗2 + ε2 50  ≥ V2 . Let’s take θ = θ∗ in (A1 ). The optimal b? is non-increasing because the solution is given by the “reverse water-filling” scheme and θ∗ is non-increasing. Next, we will show that b?1 ≤ bmax . If b?1 > bmax , then we would have for j = 1, . . . , N θj∗4 θ1∗4 ? −2b?j 2−2b1 ≤ θ1∗2 2−2bmax ≤ c2 2−4 log(1/ε) = c2 ε4 , 2 ≤ ∗2 ∗2 2 2 θj + ε θ1 + ε where the first inequality follows from the “reverse water-filling” solution, and therefore N X j=1 θj∗4 4m −2b?j 2 4 2m+1 ), 2 ≤ N c ε = o(ε θj∗2 + ε2 which would not give the optimal solution. Hence, b?1 ≤ bmax , and this completes the proof. Lemma A.11. Suppose that Wn,ξ follows a non-central chi-square distribution with n degrees of freedom and non-centrality parameter ξ. We have for n ≥ 5  −1 E Wn,ξ ≤ and for n ≥ 7 1 , n+ξ−4 n−4 . (n − 6)(n + ξ − 4)(n + ξ − 6) Proof. It is well known that the non-central chi-square random variable Wn,ξ can be written as a Poisson-weighted mixture of central chi-square distributions, i.e., Wn,ξ ∼ χ2n+2K with K ∼ Poisson(ξ/2). Then     1 −1 −1 E Wn,ξ = E E(Wn,ξ | K) = E n + 2K − 2 1 1 ≥ = n + 2EK − 2 n+ξ−2  −2 E Wn,ξ ≤ where we have used the fact that E(1/χ2n ) = n − 2 and Jensen’s inequality. Similarly, we have     1 −2 −2 E Wn,ξ = E E(Wn,ξ | K) = E (n + 2K − 2)(n + 2K − 4) 1 ≥ (n + 2EK − 2)(n + 2EK − 4) 1 = (n + ξ − 2)(n + ξ − 4) Using the Poisson-weighted mixture representation, the following recurrence relation can be derived [7]   −1 −1 1 = ξE Wn+4,ξ + nE Wn+2,ξ , (A.23)    −1 −2 −2 E Wn,ξ = ξE Wn+4,ξ + nE Wn+2,ξ , (A.24) 51 for n ≥ 3. Thus,   1 n −1 −1 E Wn+4,ξ = − E Wn+2,ξ ξ ξ 1 n 1 ≤ − ξ ξ n+ξ 1 = . n+ξ Replacing n by n − 4 proves (A.11). On the other hand, rearranging (A.23), we get  1  ξ −1 −1 E Wn+2,ξ = − E Wn+4,ξ n n 1 ξ 1 ≤ − n nn+ξ +2 n+2 . = n(n + ξ + 2) Now using (A.24), we have  n   1 −1 −2 −2 E Wn+4,ξ − E Wn+2,ξ = E Wn,ξ ξ ξ n n ≤ − ξ(n − 2)(n + ξ) ξ(n + ξ)(n + ξ − 2) n = . (n − 2)(n + ξ)(n + ξ − 2) Replacing n by n − 4 proves (A.11). 52
10math.ST
Statistical Properties and Variations of LOS MIMO Channels at Millimeter Wave Frequencies Tim Hälsig∗ , Darko Cvetkovski† , Eckhard Grass†‡ , and Berthold Lankl∗ ∗ Institute for Communications Engineering, Universität der Bundeswehr München, Germany of Computer Science, Humboldt-Universität zu Berlin, Germany ‡ IHP Microelectronics, Frankfurt (Oder), Germany Email: [email protected] arXiv:1803.07768v1 [eess.SP] 21 Mar 2018 † Department Abstract—Measurement results for millimeter wave LOS MIMO systems are presented with a focus on time variation and multipath propagation. Different system setups are used, including 2×2 and 3×3 MIMO, and involving different synchronization procedures and front-ends. Furthermore, different propagation scenarios are evaluated, covering a wide area of applications. The results show that the LOS component carries significantly more power than the NLOS components, and that frequency selectivity from front-ends should be taken into account when designing these high bandwidth systems. Frequency offsets and other phase variations due to transmit and receive oscillator differences are treated as part of the channel and thus, depending on the synchronization setup, the MIMO system exhibits different time variations, particularly in the case of independent local oscillators. It is also observed that these systems experience significant non-trivial long-term variations in terms of amplitude and phase. I. I NTRODUCTION Millimeter wave (mmWave) wireless communication systems are expected to play a significant role in the improvement of per user data rates in the next few years, due to the wide available bandwidths [1]. The combination of millimeter wave frequencies with MIMO techniques makes it possible to achieve data rates of several Gbit/s, especially if the transmission is line of sight (LOS) dominant [2]. Such links occur, for example, in backhauling or satellite transmission scenarios, where the channel can be assumed almost static or deterministic [3], [4]. However, the time resolution in these studies is not sufficient to determine effects on the symbol or packet level when GBd/s symbol rates are used. In practice the transmission channels, including effects due to the front-ends, are rarely fully static. This is, for example, due to the fact that independent oscillators are usually used at the transmitter and receiver side, generating slightly different carrier frequencies and thus a time varying behavior. This time variation can be lowered by suitable synchronization algorithms but some residual variation should always be expected [5]. In MIMO systems two different arrangements can be considered. If there is a shared reference frequency among the front-ends on the transmitter and receiver side, This work was supported in part by the German Research Foundation (DFG) in the framework of priority program SPP 1655 ”Wireless Ultra High Data Rate Communication for Mobile Internet Access”. We are indebted to IHP’s system design department for providing some of the measurement equipment and assisting during the measurements. respectively, the channel matrix experiences a common timevarying behavior. For cases where independent oscillators are used for the front-ends, each entry of the channel matrix will exhibit a different time-varying behavior. Such a setup may be necessary when the antennas need to be widely spaced as, e.g., in a satellite system. When combinations of the two cases are used, a common variation between the corresponding channel matrix entries will occur. In order to design suitable synchronization and equalization algorithms, it is necessary to characterize the impact of these effects on MIMO systems. Another effect that has significant impact on the system performance is the presence of multipath components. It is typically assumed that multipath components due to the propagation environment have significantly less power compared to LOS components at millimeter wave frequencies, e.g., at least 10 dB difference at 28 GHz [6] and 38 GHz [7]. For a full system design it is also important to consider how the front-ends, i.e., the properties of their internal components, contribute to the frequency selectivity of the complete transmission chain. It has been observed, e.g., in [8], [9], [10], that front-ends operating at such high bandwidths generate significant frequency selectivity which needs to be taken into account, if not removed by some form of compensation during manufacturing. The following sections of the paper provide measurement results characterizing different behaviors of the LOS millimeter wave MIMO systems with respect to multipath impact and time variations. In particular some statistics and examples for multipath propagation in different MIMO scenarios and environments including the effects of different front-ends at 60 GHz are shown. The paper considers time variations due to frequency differences in the transmit and receive oscillators as part of the channel and investigates their long-term behavior. Furthermore, much shorter time durations, comparable to the symbol or packet level, are considered in order to characterize this time varying behavior of the system, as compared to the existing literature. In comparison to the earlier papers [11], [12], where it was shown that LOS mmWave MIMO systems exhibit good spatial multiplexing capabilities if designed properly, this paper characterizes the impact of frequency selectivity as well as time variation for these systems. In this paper, boldface small letters, e.g., x, are used for vectors while boldface capital letters, e.g., X, are used for Fig. 1. Three example measurement scenarios. Left: outdoor 2 × 2 scenario, FE1, link distance between 10 m and 60 m. Center: indoor short-range backhaul 2 × 2 scenario, FE1, distance of 15 m. Right: anechoic chamber 3 × 3 scenario, FE2, distance of 5 m. TABLE I 60 GHz FRONT- END COMPARISON RF bandwidth Max. EIRP Tx/Rx Antenna gain Noise figure Phase noise @1 MHz External ref. clock FE1 FE2 1.8 GHz 23.5 dBm 7.5 dBi 7 dB −86 dBc/Hz yes 1 GHz 38 dBm 23 dBi 8 dB −104 dBc/Hz no matrices. Furthermore, IN denotes the N × N identity matrix and (·)† denotes the pseudoinverse of a matrix. II. M EASUREMENT S ETUPS , S CENARIOS , AND C HANNEL E STIMATION The measurement data comes from two different campaigns, carried out with different settings and setups as outlined next. A. Hardware Setup The general hardware setup consists of two building blocks: the front-ends (FEs) with antenna and the baseband generating/recording instruments with corresponding processing. Two different FEs were used during the campaigns, an overview of their most important parameters can be found in Table I. The left foto of Fig. 1 shows a 2 × 2 setup with FE1, the right foto shows a 3 × 3 setup with FE2. With FE1 a synchronization of the carrier frequencies is possible through sharing a 308 MHz reference clock, whereas FE2 does not have an external reference input. In the MIMO measurements there were three clock setups investigated: (i) one shared reference clock among all transmitter and receiver front-ends, with FE1, (ii) one shared reference clock among transmitter & one shared reference clock among receiver front-ends, with FE1, (iii) independent clock for every front-end, with FE1/2. The baseband part consists of arbitrary waveform generators and oscilloscopes with sufficient sampling rates and analog bandwidths to cover the full RF bandwidth of the front-ends. For almost all of the setups a symbol rate of 1.25 GBd/s was used. Since the sampling clocks of the waveform generators and oscilloscopes were not synchronized, an oversampled signal was captured, and a digital synchronization algorithm including interpolation was used in order to align the clocks in a post-processing step. With approximately aligned sampling, a symbol spaced channel representation suffices and training signals were used in order to determine the variations of the effective transmission channel between the baseband input at the transmitter and baseband output at the receiver. More detailed descriptions about, e.g., the connection of front-end to baseband, reference clock generation, and sampling synchronization can be found in [11], [12]. B. Measurement Scenarios Different measurement scenarios were employed focusing on two investigation points. First, examining the significance of frequency selectivity in mmWave LOS MIMO systems, either due to multipath components from the environment, or due to distortions in the front-ends. Thus, a variety of short- and mid-range (5 m-60 m) measurements in different environments, always with a clear LOS path, were carried out. Three of the scenarios can be seen in Fig. 1. While most of the indoor and outdoor scenarios were measured with FE1, both FEs were used in the anechoic chamber in order to determine the frequency-selectivity due to the front-ends, as no multipath from the environment is expected in that case. Secondly, the time variation of the channel due to the environment and hardware is investigated. From the scenarios described above, and by changing the synchronization setup as mentioned in the previous section, short- and long-term variability can be deduced. C. System Model & Channel Estimation In order to estimate the channel responses, consider a frequency selective and time-varying MIMO system to be modeled by y(k) = HL (k)xL (k) + w(k), (1)  T where y(k) = y1 (k) y2 (k) · · · yM (k) is the sample vector of the M receive antennas at time k, xL (k) = III. M EASUREMENT R ESULTS The results are grouped in different categories and presented in the next couple of sections. A. Multipath in mmWave LOS MIMO At first the combined statistics for all setups and scenarios are shown in Fig. 2. For them, the phase variation due to the frequency offset was removed by estimating it from the LOS component. In total there were five different measurement environments, three of them can be seen in Fig. 1, the other two are short-range indoor scenarios. The estimates of the probability density functions (PDFs) of the amplitude and phase come from 15 different setups, most of them using FE1, each with 40 impulse response snapshots, yielding 600 in total. The setups include both optimally- and ill-conditioned LOS MIMO setups, refer to [11], and 2 × 2 as well as −2 0 2 1 dB PDF in 0.15 0.6 1 π 0.8 PDF in 1 dB 0.2 0.1 0.05 0 −30 −20 −10 0.4 0.2 0 −1 −0.5 0 0.5 1   arg Ĥ1:L−1 (k) in π 0 Ĥ1:L−1 (k) in dB ĥL,12 (k) in dB Fig. 2. Amplitude and phase distributions of 15 different measurement setups, each with 40 recordings, optimally- and ill-conditioned LOS MIMO channel, 2 × 2 and 3 × 3, FE1 & FE2, and frequency offsets removed. Top: amplitude of LOS component. Bottom: amplitude and phase of NLOS components. 0 −10 −20 0 10 0 −10 −20 0 10 20 Symbol Index l 0 −10 −20 20 ĥL,22 (k) in dB where the training matrix is a block version of the LT  transmitted training vectors with  XL,LT (k) = xL (k) xL (k − 1) · · · xL (k − LT + 1) . The block of received samples corresponding to the training period is described by the matrix   y(k) y(k − 1) · · · y(k − LT + 1) . YLT (k) = The channel can then be well estimated if the training matrix fulfills XL,LT (k)X†L,LT (k) ≈ IN ·L . In other words, the training sequences possess nearly perfect auto- and crosscorrelation properties. For the measurements pseudorandom sequences that approximately fulfill this property were used. Note that any variations that happen during the transmission of one training block of length LT cannot be properly estimated with this method. Since the attenuation varies significantly due to the different setups, e.g., front-ends, and scenarios, e.g., distances, and because the focus is on the relative behavior between LOS and NLOS, each channel estimate is normalized with respect to the average LOS path power of the corresponding snapshot with ĤL (k) . (3) ĤL (k) = P P 1 mn k Ĥ0 (k) M N ·K 0.2 Ĥ0 (k) in dB PDF in (2) 0.4 0 ĥL,11 (k) in dB ĤL (k) = YLT (k)X†L,LT (k), 0.6 ĥL,21 (k) in dB  T x(k) x(k − 1) · · · x(k − L + 1) is the space-time stacked transmit vector of the N transmit antennas, with x(k) being defined similar to y(k). The parameter L describes the number of multipath components in the system, yielding the time-varying channel matrix HL (k) =  H0 (k) H1 (k) · · · HL−1 (k) , where each Hl (k) includes the transfer characteristics between the N transmit and M receive antennas for the lth multipath component. L can in general be time-varying but will in this work be fixed, such that it captures the most significant channel effects. Finally, w(k) ∼ CN (0, IM ) models a spatially and temporally white Gaussian noise process. For the estimation of the time-varying channel matrix HL (k), a least-squares approach is used, i.e., 0 10 20 0 −10 −20 0 10 20 Symbol Index l Fig. 3. Superposition of 75 consecutive channel impulse response estimates of an example recording of a 2×2 LOS MIMO setup with FE2 in an anechoic chamber, sample rate 5 GSa/s, symbol rate 1.25 GBd/s, distance 5 m. 3 × 3. The goal here is to get a rough parameter range that is relevant for mmWave LOS MIMO systems, as in general each environment and setup generates significantly different channels at mmWave carrier frequencies. The results in Fig. 2 show a significant difference in power between the LOS Ĥ0 and the NLOS components Ĥ1:L−1 . While the LOS component has an average relative power of 0 dB, due to the normalization described above, the NLOS   arg Ĥ0 (k) in π Ĥ0,norm (k) 1.4 Ĥ0 (k) in dB Condition Number κ̂(k) Ĥ0 (k) 1.2 1 0 0.5 1 Sample Index k 1.5 2 7 ·10 (a) 5 0 −5 −10 1 ĥ0,11 (k) ĥ0,12 (k) ĥ0,22 (k) Linear Fit ĥ0,21 (k) 0.5 0 −0.5 −1 0 0.5 1 Sample Index k 1.5 2 ·10 7 (b) Fig. 4. Example recording of a 2 × 2 optimally arranged LOS MIMO setup with FE2 in an anechoic chamber, clock setup (iii), sample rate of 10 GSa/s corresponding to a full snapshot length of 2 ms: (a) Condition number variation of the LOS component over time, also including the normalized case where amplitude gain imbalances are neglected; (b) Phase and amplitude variations of the LOS component over time. components average relative power is −11.2 dB. This result is consistent with others from the literature, e.g., [6], [7]. The variation of the LOS component is due to a couple of factors. For example, with short ranges the antenna pattern has a significant impact, especially for the cross connections, i.e., m 6= n. In general this statistic gives a good indication of how the power can vary for the LOS component of mmWave MIMO system setups, when no significant additional effort is spent on antenna alignment. The phases of the NLOS components appear almost uniformly distributed with a tendency to the phase state of the LOS component and its opposite. B. Short-Term Amplitude Variation and Frequency Selectivity due to Hardware In order to investigate the short-term variability and the frequency selectivity due to the front-ends, measurements in an anechoic chamber, where no multipath from the environment is expected, were carried out with FE2 in a 2 × 2 setup. The amplitude of the channel impulse response estimates for one snapshot are shown in Fig. 3. For the plot, 75 consecutive estimates are superimposed, where an estimate was formed roughly every 0.8 µs, yielding a complete snapshot length of 60 µs. Note that for the symbol rate of 1.25 GBd/s this corresponds to 75 kSymbols. It is seen that there is only a minor variation in the amplitude of the impulse responses, especially for the most significant components. Furthermore, multiple components about 10 dB lower than the LOS component can be observed. Since no reflections ought to be coming from the wireless propagation in this environment, they must be due the front-ends, see also [8], [9], [10]. In fact, by inspecting the plots in the columns of Fig. 3 it seems that most of the selectivity is coming from the transmitter side, as the column entries have similar significant components at similar positions. Measurements with FE1 showed similar but less severe behavior. This is probably due to the increased RF bandwidth and also due to the fact that the frequency selectivity is harder to measure due to an increased noise floor from phase noise, refer to Table I. C. Long-Term Variations of the LOS Component For checking the long-term behavior of the system, specifically the LOS component, the same setup as in the previous section, i.e., FE2 in an anechoic chamber, is used. The results are presented in Fig. 4, where the condition number of the LOS channel matrix given by   σmax Ĥ0 (k)  , κ̂(k) = (4) σmin Ĥ0 (k) with σmax (·) and σmin (·) being the largest and smallest singular value of a matrix, respectively, is used as a metric. It has been observed in [11] that typical values for properly designed LOS MIMO systems are 1 < κ ≤ 3. This metric gives direct insight into the spatial multiplexing capabilities of the MIMO system. As was seen in section III-A, and also observed in [11], there is some variation of the amplitude of the channel entries. Thus, the normalized channel matrix Ĥ0,norm (k), where all paths carry the same amount of power, is also added as a reference. The results show that there is a strong correspondence between the conditioning of the channel matrix and the variation in phase and amplitude. Since the setup is static, such variations are suspected to come from the front-ends. In fact, by checking the SNRs of the recordings it is seen that they do not change over time, as also visible in the bottom plot of Fig. 4b. In that plot it is seen that the gains of receivers 1 and 2 change relative to each other, meaning that there is a gain variation in the front-ends over time which needs to be   arg Ĥ0 (k) in π ĥ0,11 (k) ĥ0,12 (k) ĥ0,21 (k) ĥ0,22 (k) 1 4 0.5 2 200 0 0 0 −0.5 −2 −200 −1 0 0.5 1 1.5 2 6 Sample Index k ·10 −4 0 0.5 1 1.5 2 6 Sample Index k ·10 (a) 0 0.5 1 1.5 2 6 Sample Index k ·10 (b) (c) Fig. 5. Example of three different MIMO system synchronization setups in an anechoic chamber, FE1, sample rate of 10 GSa/s: (a) Shared clock among all transmit and receive front-ends, setup (i); (b) One shared clock on the transmit side and one shared clock on the receive side, setup (ii); (c) Independent clocks for all front-ends, setup (iii). D. Long-Term Phase Variations with different Clock Setups In this section the phase variations of the mmWave LOS MIMO channel with respect to different synchronization setups are investigated. For that an anechoic chamber setup with FE1 is used. With FE1 all of the three synchronization setups mentioned in section II-A are possible and the results are shown in Fig. 5. Fig. 5a shows the case were a common reference clock is used for all FEs, i.e., setup (i). The phases are relatively constant over the complete recording but have a fixed difference. This difference is partly due to the LOS MIMO channel, which generates phase shifts between the different transmit and receive antennas, and partly due to different initial phases of the carrier frequencies. Although a reference clock is shared, each front-end has an independent phase locked loop which generates the carrier frequency from the reference, and whose phase states are not equivalent. The same can also be observed for the other synchronization setups. In 5b the phase changes of the system with shared reference on transmitter and receiver side, respectively, are shown, i.e., setup (ii). A slowly increasing phase, with approximately the same amount for all entries, can be observed, essentially showing the frequency difference between the transmitter and receiver carrier frequencies generated from the two reference clocks. Results for the independent clock setup (iii) are given in Fig. 5c. The phase 8 · 103 1 π 6 · 103 PDF in accounted for in a system design. The top plot of that figure shows the phase variation of the channel entries, each of them having a different phase trajectory. This is due to the fact that the frequencies cannot be synchronized with FE2, i.e., only clock setup (iii) is possible, as will be explored further in the next section. Additionally, the trajectories of the phase are not just simple ramps, compared to the linear fits, but exhibit more complex behaviors, which needs to be taken into account for frequency offset estimation and compensation. Note again that the full length of the recording is 2 ms corresponding to 2.5 MSymbols meaning that these effects are less severe on the symbol level, but nevertheless important for the general system design. 4 · 103 2 · 103 0 −2 · 10−3 2 · 10−3    −4 arg Ĥ0 (k − 1) − arg Ĥ·10 0 (k) in π 0 Fig. 6. Distribution of symbol to symbol phase variations from 15 different measurement setups, each with 40 recordings, optimally- and ill-conditioned LOS MIMO channel, 2 × 2 and 3 × 3, FE1 & FE2. change for each entry of the channel matrix is different over time and displays the frequency difference of the oscillators of the corresponding transmitter and receiver front-end. The phase change over time is significantly higher compared to the other two cases, as the internal reference clocks have orders of magnitude higher inaccuracies compared to the external ones. As in the previous section, it can be observed that the phase change is not just linearly increasing but has a more complex behavior, which needs to be taken into account when designing estimation and equalization schemes. For the last case this becomes more obvious when a longer time frame, as in Fig. 4b, is considered. E. Short-Term Phase Variations on the Symbol-Level Finally, the symbol-level behavior of the phase variation is investigated. The complete set of measurements, as in section III-A is used, and the phase difference between two consecutive symbols is estimated. The distribution of the results can be seen in Fig. 6. The mean value is 1.3 · 10−5 π/Symbol. With the often used symbol rate of 1.25 GBd/s this corresponds, for example, to a mean frequency offset of 8.13 kHz. As is usually the case, the phase variation on the individual symbol level due to frequency offset is low, but accumulates and needs to be compensated for over time. Note that these plots just give an indication on the average phase change per symbol over time, but lack information about the behavior of the phase in terms of dependence over time. IV. C ONCLUSION This paper provides measurement results for mmWave LOS MIMO systems with different front-ends in different environments, and with different synchronization setups. The analysis shows that in LOS dominant MIMO at 60 GHz, the power level of the NLOS components is at least 10 dB below the desired LOS component. Although great care was taken when setting up the systems, significant variations of around 2 dB can still be noted for the LOS component. With automated alignment procedures, the power loss due to the non-ideal alignment could be further reduced. Contrary to the initial expectation, the frequency selectivity due to the front-ends has a dominant impact on the effective channel in comparison to multipath propagation and needs to be adequately compensated. Amplitude variations over time can be considered insignificant even for a large number of symbols, but are important for the long-term behavior of the system. On the other hand, phase variations are strongly pronounced, particularly for the independent reference clock setup, and exhibit complex behavior that needs to be modeled appropriately for the system design. Additionally, in the independent clock case, the differently evolving phases of each channel matrix entry need to be taken into account for the equalizer design. In other words, frequency offset compensation cannot be done by premultiplying with a common rotation before equalization, but needs to be done for each entry individually. Finally, it should be noted that all the effects discussed are relatively slow compared to the typical symbol durations in millimeter wave systems. To be specific, symbol durations are typically in the order of ns whereas the changes observed occur in the order of µs. This means that slowly adapting and tracking receivers may be a very good choice in these systems. R EFERENCES [1] J. Antes, F. Boes, T. Messinger, U. J. Lewark, T. Mahler, A. Tessmann, R. Henneberger, T. Zwick, and I. Kallfass, “Multi-Gigabit MillimeterWave Wireless Communication in Realistic Transmission Environments,” IEEE Trans. Terahertz Sci. Technol., vol. 5, no. 6, pp. 1078– 1087, 2015. [2] X. Song, D. Cvetkovski, T. Hälsig, W. Rave, G. Fettweis, E. Grass, and B. Lankl, “High Throughput Line-of-Sight MIMO Systems for Next Generation Backhaul Applications,” Frequenz, vol. 71, no. 9-10, pp. 389–398, 2017. [3] L. Bao and B.-E. Olsson, “Methods and Measurements of Channel Phase Difference in 2x2 Microwave LOS-MIMO Systems,” in Proc. IEEE Int. Conf. Commun., 2015, pp. 1358–1363. [4] K.-U. Storek, C. A. Hofmann, and A. Knopp, “Measurements of Phase Fluctuations for Reliable MIMO Space Communications,” in Proc. IEEE Asia Pacific Conf. Wirel. Mob., 2015, pp. 157–162. [5] H. Meyr, M. Moeneclaey, and S. A. Fechtel, Digital Communication Receivers: Synchronization, Channel Estimation, and Signal Processing. Wiley Online Library, 1998. [6] J. Ko, Y.-J. Cho, S. Hur, T. Kim, J. Park, A. F. Molisch, K. Haneda, M. Peter, D.-J. Park, and D.-H. Cho, “Millimeter-Wave Channel Measurements and Analysis for Statistical Spatial Channel Model in InBuilding and Urban Environments at 28 GHz,” IEEE Trans. Wirel. Commun., vol. 16, no. 9, pp. 5853–5868, 2017. [7] T. S. Rappaport, S. Sun, R. Mayzus, H. Zhao, Y. Azar, K. Wang, G. N. Wong, J. K. Schulz, M. Samimi, and F. Gutierrez, “Millimeter Wave Mobile Communications for 5G Cellular: It Will Work!” IEEE Access, vol. 1, pp. 335–349, 2013. [8] J. Antes and I. Kallfass, “Performance Estimation for Broadband MultiGigabit Millimeter- and Sub-Millimeter-Wave Wireless Communication Links,” IEEE Trans. Microw. Theory Tech., vol. 63, no. 10, pp. 3288– 3299, 2015. [9] R. Wu, R. Minami, Y. Tsukui, S. Kawai, Y. Seo, S. Sato, K. Kimura, S. Kondo, T. Ueno, N. Fajri, S. Maki, N. Nagashima, Y. Takeuchi, T. Yamaguchi, A. Musa, K. K. Tokgoz, T. Siriburanon, B. Liu, Y. Wang, J. Pang, N. Li, M. Miyahara, K. Okada, and A. Matsuzawa, “64-QAM 60-GHz CMOS Transceivers for IEEE 802.11ad/ay,” IEEE J. Solid-State Circuits, vol. 52, no. 11, pp. 2871–2891, 2017. [10] Z. Du, E. Ohlmer, K. Aronkytö, J. Putkonen, J. Kapanen, and D. Swist, “5G E-band Backhaul System Measurements in Urban Street-Level Scenarios,” in Proc. 47th Eur. Microw. Conf., 2017, pp. 372–375. [11] T. Hälsig, D. Cvetkovski, E. Grass, and B. Lankl, “Measurement Results for Millimeter Wave pure LOS MIMO Channels,” in Proc. IEEE Wirel. Commun. Netw. Conf., 2017. [12] D. Cvetkovski, E. Grass, T. Hälsig, and B. Lankl, “Hardware-in-theLoop Demonstration of a 60GHz Line-of-Sight 2x2 MIMO Link,” in Proc. IEEE EUROCON, 2017, pp. 631–636.
7cs.IT
Submitted to the Annals of Statistics arXiv: arXiv:0000.0000 I-LAMM FOR SPARSE LEARNING: SIMULTANEOUS CONTROL OF ALGORITHMIC COMPLEXITY AND STATISTICAL ERROR∗ arXiv:1507.01037v3 [math.ST] 5 Apr 2017 By Jianqing Fan†,‡ , Han Liu† , Qiang Sun† , and Tong Zhang§,‡ Princeton University† , Fudan University‡ and Tecent AI Lab§ We propose a computational framework named iterative local adaptive majorize-minimization (I-LAMM) to simultaneously control algorithmic complexity and statistical error when fitting high dimensional models. I-LAMM is a two-stage algorithmic implementation of the local linear approximation to a family of folded concave penalized quasi-likelihood. The first stage solves a convex program with a crude precision tolerance to obtain a coarse initial estimator, which is further refined in the second stage by iteratively solving a sequence of convex programs with smaller precision tolerances. Theoretically, we establish a phase transition: the first stage has a sublinear iteration complexity, while the second stage achieves an improved linear rate of convergence. Though this framework is completely algorithmic, it provides solutions with optimal statistical performances and controlled algorithmic complexity for a large family of nonconvex optimization problems. The iteration effects on statistical errors are clearly demonstrated via a contraction property. Our theory relies on a localized version of the sparse/restricted eigenvalue condition, which allows us to analyze a large family of loss and penalty functions and provide optimality guarantees under very weak assumptions (For example, I-LAMM requires much weaker minimal signal strength than other procedures). Thorough numerical results are provided to support the obtained theory. 1. Introduction. Modern data acquisitions routinely measure massive amounts of variables, which can be much larger than the sample size, making statistical inference an ill-posed problem. For inferential tractability and interpretability, one common approach is to exploit the penalized M-estimator n o (1.1) βb = argmin L(β) + Rλ (β) , β∈Rd ∗ This research is supported in part by NIH Grants 5R01-GM072611-11, R01GM100474-04, R01-MH102339, R01-GM083084 and R01-HG06841, NSF grants DMS1206464-04, DMS-1308566, DMS-1454377, DMS-1206464, IIS-1408910, IIS-1332109, and Science and Technology Commission of Shanghai Municipality 16JC1402600. MSC 2010 subject classifications: Primary 62J07; secondary 62C20, 62H35 Keywords and phrases: Algorithmic statistics, iteration complexity, local adaptive MM, nonconvex statistical optimization, optimal rate of convergence. 1 2 FAN ET AL. where L(·) is a smooth loss function, Rλ (·) is a sparsity-inducing penalty with a regularization parameter λ. Our framework encompasses the square loss, logistic loss, Gaussian graphical model negative log-likelihood loss, Huber loss, and the family of folded concave penalties [9]. Finding optimal statistical procedures with controlled computational complexity characterizes the efforts of high-dimensional statistical learning in the last two decades. This paper makes an important leap toward this grand challenge by proposing a general algorithmic strategy for solving (1.1) even when Rλ (β) is nonconvex. A popular choice of Rλ (β) is the Lasso penalty [25], a convex penalty. Though a large literature exists on understanding the theory of penalized M-estimators with convex penalties [8, 4, 26, 22], it has been well known [9, 33] that the convex penalties introduce non-negligible estimation biases. In addition, the algorithmic issues for finding global minimizer are rarely addressed. To eliminate the estimation bias, a family of folded-concave penalties was introduced by [9], which includes the smooth clipped absolute deviation (SCAD) [9], minimax concave penalty (MCP) [29], and capped `1 -penalty [32]. Compared to their convex counterparts, these nonconvex penalties eliminate the estimation bias and attain more refined statistical rates of convergence. However, it is more challenging to analyze the theoretical properties of the resulting estimators due to nonconvexity of the penalty functions. Existing work on nonconvex penalized M-estimators treats the statistical properties and practical algorithms separately. On one hand, statistical properties are established for the hypothetical global optimum (or some local minimum), which is usually unobtainable by any practical algorithm in polynomial time. For example, [9] showed that there exists a local solution that possesses an oracle property; [15] and [11] showed that the oracle estimator is a local minimizer with high probability. Later on, [16] and [30] proved that the global optimum achieves the oracle property under certain conditions. Nevertheless, none of these paper specifies an algorithm to find the desired solution. More recently, [20, 22, 1] develop a projected gradient algorithm with desired statistical guarantees. However, they need to modify the estimating procedures to include an additional `1 -ball constraint, kβk1 ≤ R, which depends on the unknown true parameter. On the other hand, practitioners have developed numerous heuristic algorithms for nonconvex optimization problems, but without theoretical guarantees. One such example is the coordinate optimization strategy studied in [6] and [13]. So there is a gap between theory and practice: What is actually computed is not the same as what has been proved. To bridge this gap, we propose an iterative local adaptive majorize-minimization (I-LAMM) algorithm for LOCAL ADAPTIVE MAJORIZE-MINIMIZATION 3 fitting high dimensional statistical models. Unlike most existing methods, which are mainly motivated from a statistical perspective and ignore the computational consideration, I-LAMM is both algorithmic and statistical: it computes an estimator within polynomial time and achieves optimal statistical accuracy for this estimator. In particular, I-LAMM obtains estimators with the strongest statistical guarantees for a wide family of loss functions under the weakest possible assumptions. Moreover, the statistical properties are established for the estimators computed exactly by our algorithm, which is designed to control the cost of computing resources. Compared to existing works [20, 22, 1], our method does not impose any constraint that depends on the unknown true parameter. Inspired by the local linear approximation to the folded concave penalty [34], we use I-LAMM to solve a sequence of convex programs up to a prefixed optimization precision n  o (1.2) min L β + R λ(`−1) β , for ` = 1, . . . , T, β∈Rd (`−1)  (`−1) T e(`) where λ(`−1) = λw |βe1 | , . . . , λw |βed | , β is an approximate solution to the `th optimization problem in (1.2), w(·) is a weighting function, R(·) is a decomposable convex penalty function, and ‘ ’ denotes the Hadamard product. In this paper, we mainly consider R(β) = kβk1 , though our theory is general. The weighting function corresponds to the derivative of the folded concave penalty in [9], [34] and [11]. In particular, the I-LAMM algorithm obtains a crude initial estimator βe(1) and further solves the optimization problem (1.2) for ` ≥ 2 with established algorithmic and statistical properties. This provides theoretical insights on how fast the algorithm converges and how much computation is needed, as well as the desired statistical properties of the obtained estimator. The whole procedure consists of T convex programs, each only needs to be solved approximately to control the computational cost. Under mild conditions, we √ show that only log(λ n) steps are needed to obtain the optimal statistical rate of convergence. Even though I-LAMM solves approximately a sequence of convex programs, the solution enjoys the same optimal statistical property of the unobtainable global optimum for the folded-concave penalized regression. The adaptive stopping rule for solving each convex program in (1.2) allows us to control both computational costs and statistical errors. Figure 1 provides a geometric illustration of the I-LAMM procedure. It contains a contraction stage and a tightening stage as described below. ∗ Contraction Stage: In this stage (` = 1), we approximately solve a convex optimization problem (1.2), starting from any initial value βe(0) , and 4 FAN ET AL. hB;?i2MBM; bi;2 s/n ˜ (T ) ˜ (T s 1) PTiBKH `2;BQM (1) ˜ (2) ˜ ˜ (0) *QMi`+iBQM bi;2 *QMi`+iBQM `2;BQM Fig 1. Geometric illustration of the contraction property. The contraction stage produces e(0) that falls in the contraction region an initial estimator, starting from any initial value β which secures the tightening stage to enjoy optimal statistical and computational rates of convergence. The tightening stage adaptively refines the contraction estimator till it enters the optimal region, which is stated in (1.3). Here λ is a regularization parameter, s the number of nonzero coefficients in β ∗ and n the sample size. terminate the algorithm as long as the approximate solution enters a desired contraction region which will be characterized in Section 2.3. The obtained estimator is called the contraction estimator, which is very crude and only serves as initialization. ∗ Tightening Stage: This stage involves multiple tightening steps (` ≥ 2). Specifically, we iteratively tighten the contraction estimator by solving a sequence of convex programs. Each step contracts its initial estimator towards the true parameter until it reaches the optimal region of convergence. At that region, further iteration does not improve statistical performance. See Figure 1. More precisely, we will show the following contraction property r s (`) ∗ e (1.3) β −β 2 . + δ · βe(`−1) − β ∗ 2 for ` ≥ 2, n where β ∗ is the truepregression coefficient, δ ∈ (0, 1) a prefixed contraction parameter and s/n the order of statistical error. Tightening helps improve the accuracy only when kβe(`−1) −β ∗ k2 dominates the statistical error. The iteration effect is clearly demonstrated. Since βe(`) is only used to create an adaptive weight for βe(`+1) , we can control the iteration complexity by solving each subproblem in (1.2) approximately. What differs from the contraction stage is that the initial estimators in the tightening stage are already in the contraction region, making the optimization algorithm enjoy geometric rate of convergence. This allows us to rapidly solve (1.2) with small optimization error. ∗ (Phase Transition in Algorithmic Convergence) In the contraction stage (` = 1), the optimization problem is not strongly convex and therefore our LOCAL ADAPTIVE MAJORIZE-MINIMIZATION 5 algorithm has only a sublinear convergence rate. Once the solution enters the contraction region, we will show that the feasible solutions are sparse and the objective function is essentially ’low’-dimensional and becomes (restricted) strongly convex and smooth in that region. Therefore, our algorithm has a linear convergence rate for ` > 1. Indeed, this holds even for ` = 1, which admits a sublinear rate until it enters into the contraction region and enjoys a linear rate of convergence after that. See Figure 2. But this estimator (for ` = 1) is the estimator that corresponds to LASSO penalty, not folded concave penalty that we are looking for. Computational Rate for Constant Correlation Design 0 -10 -15 log ( ,k) ( ) 2 -5 contraction stage : = 1 tightening stage : = 2 tightening stage : = 3 -20 tightening stage : = 4 -25 0 50 100 150 200 iteration count Fig 2. Computational rate of convergence in each stage for the simulation experiment specified in case 2 in Example 6.1. The x-axis is the iteration count k within the `th subproblem. The phase transition from sublinear rate to liner rate of algorithmic convergence is clearly b(`) is the global minimizer seen once the iterations enter the contraction region. Here β (`,k) of the `th optimization problem in (1.2) and β is its kth iteration (see Figure 3). For ` = 1, the initial estimation sequence has sublinear rate and once the solution sequence enters the contraction region, it becomes linear convergent. For ` ≥ 2, the algorithm achieves linear rate, since all estimators β (`,k−1) are in the contraction region. This paper makes four major contributions. First, I-LAMM offers an algorithmic approach to obtain the optimal estimator with controlled computing 6 FAN ET AL. resources. Second, compared to the existing literature, our method requires weaker conditions due to a novel localized analysis of sparse learning problems. Specifically, our method does not need the extra ball constraint as in [20] and [28], which is an artifact of their proofs. Third, our computational framework takes the approximate optimization error into analysis and provides theoretical guarantees for the estimator that is computed by the algorithm. Fourth, our method provides new theoretical insights about the adaptive lasso and folded-concave penalized regression. In particular, we bridge these two methodologies together using a unified framework. See Section 3.2 for more details. The rest of this paper proceeds as follows. In Section 2, we introduce I-LAMM and its implementation. Section 3 is contributed to new insights into existing methods for high dimensional regression. In Section 4, we introduce both the localized sparse eigenvalue and localized restricted eigenvalue conditions. Statistical property and computational complexity are then presented. In Section 5, we outline the key proof strategies. Numerical simulations are provided to evaluate the proposed method in Section 6. We conclude by discussions in Section 7. All the proofs are postponed to the online supplement. Notation: For u = (u1 , u2 , . . . , ud )T ∈ Rd , we define the `q -norm of u by P kukq = ( dj=1 |uj |q )1/q , where q ∈ [1, ∞). Let kukmin = min{uj : 1 ≤ j ≤ d}. For a set S, let |S| denote its cardinality. We define the `0 -pseudo norm of u as kuk0 = |supp(u)|, where supp(u) = {j : uj 6= 0}. For an index set I ⊆ {1, . . . , d}, uI ∈ Rd is defined to be the vector whose i-th entry is equal to ui if i ∈ I and zero otherwise. Let A = [ai,j ] ∈ Rd×d . For q ≥ 1, we define kAkq as the matrix operator q-norm of A. For index sets I, J ⊆ {1, . . . , d}, we define AI,J ∈ Rd×d to be the matrix whose (i, j)-th entry is equal to ai,j if i ∈ I and j ∈ J , and zero otherwise. We use sign(x) to denote the sign of x: sign(x) = x/|x| if x 6= 0 and sign(x) = 0 otherwise. For two functionals f (n, d, s) and g(n, d, s), we denote f (n, d, s) & g(n, d, s) if f (n, d, s) ≥ Cg(n, d, s) for a constant C; f (n, d, s) . g(n, d, s) otherwise. 2. Methodology. In this paper, we assume that the loss function L(·) ∈ FL , a family of general convex loss functions specified in Appendix A. 2.1. Local Adaptive Majorize-Minimization. Recall that the estimators are obtained by solving a sequence of convex programs in (1.2). We require the function w(·) used therein to be taken from the tightening function class LOCAL ADAPTIVE MAJORIZE-MINIMIZATION 7 T , defined as (2.1) n T = w(·) ∈ M : w(t1 ) ≤ w(t2 ) for all t1 ≥ t2 ≥ 0, o 0 ≤ w(t) ≤ 1 if t ≥ 0, w(t) = 0 if t ≤ 0 . P To fix ideas, we take Rλ (β) in (1.1) to be dj=1 pλ (|βj |), where pλ (·) is a folded concave penalty [9] such as the SCAD or MCP. As discussed in [9], the penalized likelihood function in (1.1) is folded concave with respect to β, making it difficult to be maximized. We propose to use the adaptive local linear approximation (adaptive LLA) to the penalty function [34, 12] and approximately solve (2.2) d n o X (`−1) argmin L(β) + p0λ (|βej |)|βj | , for 1 ≤ ` ≤ T, β j=1 (`−1) where βej is the jth component of βe(`−1) and βe(0) can be an arbitrary bad initial value: βe(0) = 0, for example. If we assume that w(·) ≡ λ−1 p0λ (·) ∈ T , such as the SCAD or MCP, then the adaptive LLA algorithm can be regarded as a special case of our general formulation (1.2). Note that the LLA algorithm with `q -penalty (q < 1) is not covered by our algorithm since its derivative is unbounded at the origin and thus λ−1 p0λ (·) 6∈ T . The latter creates a zero-absorbing state: once a component is shrunk to zero, it will remain zero throughout the remaining iterations, as noted in [10]. Of course, we can truncate the loss derivative of the loss function to resolve this issue. We now propose a local adaptive majorize-minimization (LAMM) principal, which will be repeatedly called to practically solve the optimization problem (2.2). We first review the majorize-minimization (MM) algorithm. To minimize a general function f (β), at a given point β (k) , MM majorizes it by g(β|β (k) ), which satisfies g(β|β (k) ) ≥ f (β) and g(β (k) |β (k) ) = f (β (k) )  and then compute β (k+1) = argminβ g(β|β (k) ) [17, 14]. The objective value of such an algorithm is non-increasing in each step, since (2.3) major. min. init. f (β (k+1) ) ≤ g(β (k+1) | β (k) ) ≤ g(β (k) | β (k) ) = f (β (k) ). An inspection of the above arguments shows that the majorization requirement is not necessary. It requires only the local property: (2.4) f (β (k+1) ) ≤ g(β (k+1) |β (k) ) and g(β (k) |β (k) ) = f (β (k) ) 8 FAN ET AL. for the inequalities in (2.3) to hold. Inspired by the above observation, we locally majorize (2.2) at the `th step. It is similar to the iteration steps used in the (proximal) gradient method [5, 23]. Instead of computing and storing a large Hessian matrix as in [34], we majorize L(β) in (2.2) at βe(`−1) by an isotropic quadratic function L(βe(`−1) ) + ∇L(βe(`−1) ), β − βe(`−1) + φ kβ − βe(`−1) k22 , 2 where ∇ is used to denote derivative. By Taylor’s expansion, it suffices to  take φ that is no smaller than the largest eigenvalue of ∇2 L βe(`−1) . More importantly, the isotropic form also allows a simple analytic solution to the subsequent majorized optimization problem: n (2.5) argmin L(βe(`−1) ) + ∇L(βe(`−1) ), β − βe(`−1) β∈Rd + d o X φ (`−1)  | |βj | . kβ − βe(`−1) k22 + p0λ |βej 2 j=1 (`−1) T (`−1) |) , it is easy to show that (2.5) |), . . . , p0λ (|βed With λ(`−1) = p0λ (|βe1 is minimized at  β (`,1) = Tλ(`−1) ,φ (βe(`−1) ) ≡ S βe(`−1) − φ−1 ∇L(βe(`−1) ), φ−1 λ(`−1) , where S(x, λ) is the  soft-thresholding operator, defined by S(x, λ) ≡ sign(xj )· max{|xj | − λj , 0} . The simplicity of this updating rule is due to the fact that (2.5) is an unconstrained optimization problem. This is not the case in [20] and [28]. However, finding the value of φ ≥ k∇2 L(βe(`−1) )k2 is not an easy task in computation. To avoid storing and computing the largest eigenvalue of a big matrix, we now state the LAMM algorithm, thanks to the local requirement (2.4). The basic idea of LAMM is to start from a very small isotropic parameter φ0 and then successfully inflate φ by a factor γu > 1 (say, 2). If the solution satisfies (2.4), we stop this part of the algorithm, which will make the target value non-increasing. Since after the kth iteration, φ = γuk−1 φ0 , there always exists a k such that it is no larger than k∇2 L(βe(`−1) )k2 . In this manner, the LAMM algorithm will find a smallest iteration to make (2.4) hold. Specifically, our proposed LAMM algorithm to solve (2.5) at βe(`−1) begins with φ = φ0 , say 10−6 , iteratively increases φ by a factor of γu > 1 inside the LOCAL ADAPTIVE MAJORIZE-MINIMIZATION 9 Algorithm 1 The LAMM algorithm in the kth iteration of the `th tightening subproblem. 1: 2: 3: 4: 5: 6: 7: 8: Algorithm: {β (`,k) , φ(`,k) } ← LAMM(λ(`−1) , β (`,k−1) , φ0 , φ(`,k−1) ) Input: λ(`−1) , β (`,k−1) , φ0 , φ(`,k−1) Initialize: φ(`,k) ← max{φ0 , γu−1 φ(`,k−1) } Repeat β (`,k) ← Tλ(`−1) ,φ(`,k) (β (`,k−1) ) If F (β (`,k) , λ(`−1) ) > Ψλ(`−1) ,φ(`,k) (β (`,k) ; β (`,k−1) ) then φ(`,k) ← γu φ(`,k) Until F (β (`,k) , λ(`−1) ) ≤ Ψλ(`−1) ,φ(`,k) (β (`,k) ; β (`,k−1) ) Return {β (`,k) , φ(`,k) } `th step of optimization, and computes β (`,1) = Tλ(`−1) ,φ(`,k) (β (`,0) ), β (`,0) = βe(`−1) , with φ(`,k) = γuk−1 φ0 , until the local property (2.4) holds. In our context, LAMM stops when Ψλ(`−1) ,φ(`,k) (β (`,1) , β (`,0) ) ≥ F (β (`,1) , λ(`−1) ), where F (β, λ(`−1) ) ≡ L(β) + Pd (`−1) |βj | j=1 λj and Ψλ(`−1) ,φ(`,k) (β, β (`,0) ) ≡ L(β (`,0) ) + ∇L(β (`,0) ), β − β (`,0) d + X (`−1) φ(`,k) kβ − β (`,0) k22 + λj |βj |. 2 j=1 Inspired by [23], to accelerate LAMM within the next majorizing step, we keep track of the sequence {φ(`,k) }`,k and set φ(`,k) = max{φ0 , γu−1 φ(`,k−1) }, with the convention that φ`,0 = φe`−1 and φe0 = φ0 , in which φe`−1 is the isotropic parameter corresponding to the solution βe(`−1) . This is summarized in Algorithm 1 with a generic initial value. The LAMM algorithm solves only one local majorization step. It corresponds to moving one horizontal step in Figure 3. To solve (2.2), we need to use LAMM iteratively, which we shall call the iterative LAMM (I-LAMM) algorithm, and compute a sequence of solutions β (`,k) using the initial value β (`,k−1) . Figure 3 depicts the schematics of our algorithm: the `th row corresponds to solving the `th subproblem in (2.2) approximately, beginning by computing the adaptive weight λ(`−1) . The number of iterations needed within each row will be discussed in the sequel. 2.2. Stopping Criterion. I-LAMM recognizes that the exact solutions to (2.2) can never be achieved in practice with algorithmic complexity control. 10 FAN ET AL. Instead, in the `th optimization subproblem, we compute the approximate solution, βe(`) , up to an optimization error ε, the choice of which will be discussed in next subsection. To calculate this approximate solution, starting from the initial value β (`,0) = βe(`−1) , the algorithm constructs a solution sequence {β (`,k) }k=1,2,··· using the introduced LAMM algorithm. See Figure 3. We then introduce a stopping criterion for the I-LAMM algorithm. From optimization theory (Section 5.5 in [5]), we know that any exact solution βb(`) to the `th subproblem in (2.2) satisfies the first order optimality condition: ∇L(βb(`) ) + λ(`−1) (2.6) ξ = 0, for some ξ ∈ ∂kβb(`) k1 ∈ [−1, 1]d , where ∂ is used to indicate the subgradient operator. The set of subgradients of a function f : Rd → R at a point x0 , denoted as ∂f (x0 ), is defined as the collection of vectors, ξ, such that f (x) − f (x0 ) ≥ ξ T (x − x0 ), for any x. Thus, a natural measure for suboptimality of β can be defined as  ωλ(`−1) (β) = min k∇L(β) + λ ξk∞ . ξ∈∂kβk1 For a prefixed optimization error ε, we stop the algorithm within the `th subproblem when ωλ(`−1) (β (`,k) ) ≤ ε. We call βe(`) ≡ β (`,k) an ε-optimal solution. More details can be found in Algorithm 2. Algorithm 2 I-LAMM algorithm for each subproblem in (2.2). 1: 2: 3: 4: 5: 6: e(`) } ← I-LAMM(λ(`−1) , β (`,0) ) Algorithm:{β Input: φ0 > 0 for k = 0, 1, · · · until ωλ(`−1) (β (`,k) ) ≤ ε do {β (`,k) , φ(`,k) } ← LAMM(λ(`−1) , β (`,k−1) , φ0 ) end for e(`) = β (`,k) Output: β (0) : (1) : (1,0) =0 (2,0) = (1) LAMM LAMM (2,1) LAMM (T,1) LAMM (1,k1 ) (2,k2 ) = = (1) = (T ) , k1 (2) k , 2 ... (T 1) . . . LAMM . . . LAMM : (T,0) = (T 1) LAMM . . . LAMM 2 ; log( c t 1 ); ... LAMM ... (1,1) (T,kT ) , kT log( t 1 ). Fig 3. Paradigm illustration of I-LAMM. k` , 1 ≤ ` ≤ T , is the iteration index for the `th optimization in (2.2). εc and εt are the precision parameters for the contraction and tightening stage respectively and will be described in Section 2.3 in detail. LOCAL ADAPTIVE MAJORIZE-MINIMIZATION 11 Remark 2.1. The I-LAMM algorithm is an early-stop variant of the ISTA algorithm to handle general loss functions and nonconvex penalties [2]. The LAMM principal serves as a novel perspective for the proximal gradient method. 2.3. Tightening After Contraction. From the computational perspective, optimization in (2.2) can be categorized into two stages: contraction (` = 1) and tightening (2 ≤ ` ≤ T ). In the contraction stage, we start from an arbitrary initial value, which can be quite remote from the underlying true parameter. We take ε as εc  λ, reflecting the precision needed to bring the initial solution to a contracting neighborhood of the global minimum. For instance, inplinear model with sub-Gaussian errors, εc can be taken in the order of log d/n. This stage aims to find a good initial estimator βe(1) for the subsequent optimization subproblems in the tightening stage. Recall that s = kβ ∗ k0 is the sparsity level. We will show in section 4.3 that with a properly chosen λ, the approximate solution βe(1) , produced by the early stopped I-LAMM algorithm, falls in the region of such good initials estimators  √ β : kβ − β ∗ k2 ≤ Cλ s and β is sparse . We call this region the contraction region. However, the estimator βe(1) suffers from a suboptimal statistical rate of convergence which is inferior to the refined one obtained by nonconvex regularization. A second stage to tighten this coarse contraction estimator into the optimal region of convergence is needed. This is achieved by the subsequent optimization (` ≥ 2) and referred to as a tightening stage. Because the initial estimators are already good and sparse at each iteration of the tightening stage, the I-LAMM algorithm at this stage enjoys geometric rate of convergence, due to the sparse strong convexity. Therefore, the optimization error ε = εt can be much smaller to simultaneously ensure statistical p accuracy and control computational complexity. p To achieve the oracle rate s/n: εt must be no larger than the order of 1/n. A graphical illustration of the full algorithm is presented in Figure 3. Theoretical justifications are provided in Section 4. From this perspective, we shall also call the psuedo-algorithm in (1.2) or (2.2), combined with LAMM, the tightening after contraction (TAC) algorithm. 3. New Insights into Existing Methods. 3.1. Connection to One-step Local Linear Approximation. In the low dimensional regime, [34] shows that the one-step LLA algorithm produces 12 FAN ET AL. an oracle estimator if the maximum likelihood estimator (MLE) is used for initialization. They thus claim that the multi-step LLA is unnecessary. However, this is not the case in high dimensions, under which an unbiased initial estimator, such as the MLE, is not available. In this paper, we show that starting from a possibly arbitrary bad initial value (such as 0), the contraction stage can produce a sparse coarse estimator. Each tightening step then refines the estimator from previous step to the optimal region of convergence by r s (`) ∗ e (3.1) β −β 2 . + δ · βe(`−1) − β ∗ 2 , for 2 ≤ ` ≤ T, n where δ ∈ (0, 1) is a prefixed contraction parameter. Unlike the one-step method in [12], the role of iteration is clearly evidenced in (3.1). An important aspect of our algorithm (2.2) is that we use the solvable approximate solutions, βe(`) ’s, rather than the exact ones, βb(`) ’s. In order to practically implement (2.2) for a general convex loss function, [34] propose to locally approximate L(β) by a quadratic function: (3.2)  T  1 L βb(0) + ∇L(βb(0) ), β− βb(0) + β− βb(0) ∇2 L(βb(0) ) β− βb(0) , 2 where βb(0) is a ‘good’ initial estimator of β ∗ and ∇2 L(βb(0) ) is the Hessian evaluated at βb(0) . However, in high dimensions, evaluating the d × d Hessian is not only computationally intensive but also requires a large storage cost. In addition, the optimization problem (2.2) can not be solved analytically with approximation (3.2). We resolve these issues by proposing the isotropic quadratic approximation, see Section 2. 3.2. New Insight into Folded-concave Regularization and Adaptive Lasso. The adaptive local linear approximation (2.2) provides new insight into folded-concave regularization and adaptive Lasso. To correct the Lasso’s estimation bias, folded-concave regularization [9] and its one-step implementation, adaptive Lasso [33, 34, 12], have drawn much research interest due to their attractive statistical properties. For a general loss function L(β), the adaptive Lasso solves   d X b βadapt = argmin L(β) + λ w(βinit,j )|βj | , β j=1 where βinit,j is an initial estimator of βj . We see that the adaptive lasso is a special case of (2.2) with ` = 2. Two important open questions for adaptive LOCAL ADAPTIVE MAJORIZE-MINIMIZATION 13 Lasso are to obtain a good enough initial estimator in high dimensions and to select a suitable tuning parameter λ which achieves the optimal statistical performance. Our solution to the first question is to use the approximate solution to Lasso with controlled computational complexity, which corresponds to ` = 1 in (2.2). For the choice of λ, [7] suggested sequential tuning: in the first stage, they use cross validation to select the initial tuning pabinit,cv and the corresponding estimator βbinit ; in rameter, denoted here by λ the second stage, they again adopt cross validation to select the adaptive tuning parameter λ in the adaptive Lasso. Despite the popularity of such tuning procedure, there are no theoretical guarantees to support it. As will be shown later in Theorem 4.2 and Corollary 4.3, our framework produces optimal solution by only tuning λ(0) = λ1 in the contraction stage, indicating that sequential tuning may not be necessary for the adaptive Lasso if w(·) is chosen from the tightening function class T . It is worth noting that a classical weight w(βj ) ≡ 1/|βj | for the adaptive Lasso does not belong to the tightening function class T . As pointed out by [10], zero is an absorbing state of the adaptive Lasso with this choice of weight function. Hence, when the Lasso estimator in the first stage misses any true positives, it will be missed forever in later stages as well. In contrast, the proposed tightening function class T overcomes such shortcomings by restricting the weight function w(·) to be bounded. This phenomenon is further elaborated via our numerical experiments in Section 6. The mean square error for the adaptive Lasso can be even worse than the Lasso estimator because the adaptive Lasso may miss true positives in the strongly correlated design case. Our framework also reveals interesting connections between the adaptive Lasso and folded-concave regularization. Specifically, consider the following folded-concave penalized regression n o (3.3) min L(β) + Rλ (|β|) , where Rλ (|β|) is a folded concave penalty. β∈Rd We assume that Rλ (·) is elementwisely decomposable, that is Rλ (|β|) = P d k=1 pλ (|βk |). Under this assumption, using the concave duality, we can rewrite Rλ (|β|) as n o (3.4) Rλ (|β|) = inf |β|T v − R?λ (v) , v where R?λ (·) is the dual of Rλ (·). By the duality theory, we know that the b = ∇Rλ (|µ|)|µ=β . We can employ (3.4) minimum of (3.4) is achieved at v 14 FAN ET AL. to reformulate (3.3) as n o b v b ) = argmin L(β) + vT |β| − R?λ (v) . (β, β,v The optimization above can then be solved by exploiting the alternating minimization scheme. In particular, we repeatedly apply the following two steps: n o (1) Optimize over β with v fixed: βb(`) = argminβ L(β) + (b v(`−1) )T |β| . (2) Optimize over v with β fixed. We can obtain closed form solution: v(`) = ∇Rλ (|µ|)|µ=βb(`) . This is a special case of (1.2) if we take w(β) = λ−1 ∇Rλ (|µ|)|µ=β and let ` grow until convergence. Therefore, with a properly chosen weight function w(·), our proposed algorithm bridges the adaptive Lasso and folded-concave penalized regression together under different choices of `. In Corollary 4.3, √ the proposed we will prove that, when ` is in the order of log(λ n), then p estimator enjoys the optimal statistical rate kβb(`) − β ∗ k2 ∝ s/n, under mild conditions. 4. Theoretical Results. We establish the optimal statistical rate of convergence and the computational complexity of the proposed algorithm. To establish these results in a general framework, we first introduce the localized versions of the sparse eigenvalue and restricted eigenvalue conditions. 4.1. Localized Eigenvalues and Assumptions. The sparse eigenvalue condition [30] is commonly used in the analysis of sparse learning problems. However, it is only valid for the least square loss. For a general loss function, the Hessian matrix depends on the parameter β and can become nearly singular in certain regions. For example, the Hessian matrix of the logistic loss is n ∇2 L(β) = 1X 1 1 xi x T · , i · T n 1 + exp (−xi β) 1 + exp (xT i β) i=1 which tends to zero as kβk2 → ∞, no matter what the data are. One of our key theoretical observations is that: what we really need are the localized conditions around the true parameters β ∗ , which we now introduce. 4.1.1. Localized Sparse Eigenvalue. LOCAL ADAPTIVE MAJORIZE-MINIMIZATION 15 Definition 4.1 (Localized Sparse Eigenvalue, LSE). The localized sparse eigenvalues are defined as n o 2 2 ∗ ρ+ (m, r) = sup uT J ∇ L(β)uJ : kuJ k2 = 1, |J| ≤ m, kβ − β k2 ≤ r ; u,β n o 2 2 ∗ ρ− (m, r) = inf uT ∇ L(β)u : ku k = 1, |J| ≤ m, kβ − β k ≤ r . 2 J J J 2 u,β Both ρ+ (m, r) and ρ− (m, r) depend on the Hessian matrix ∇2 L(β), the true coefficient β ∗ , the sparsity level m, and an extra locality parameter r. They reduce to the commonly-used sparse eigenvalues when ∇2 L(β) does not change with β as in the quadratic loss. The following assumption specifies the LSE condition in detail. Recall that s = kβ ∗ k0 . Assumption 4.1. We say the LSE condition holds if there exist an integer se ≥ cs for some constant c, r and a constant C such that 0 < ρ∗ ≤ ρ− (2s + 2e s, r) < ρ+ (2s + 2e s, r) ≤ ρ∗ < +∞ and  ρ+ (e s, r) ρ− (2s + 2e s, r) ≤ 1 + Ce s/s. Assumption 4.1 is standard for linear regression problems and is commonly referred to as the sparse eigenvalue condition when r = ∞. Such conditions have been employed by [4, 24, 22, 20, 28]. The newly proposd LSE condition, to the best of our knowledge, is the weakest one in the literature. 4.1.2. Localized Restricted Eigenvalue. In this section, we introduce the localized version of the restricted eigenvalue condition [4]. This is an alternative condition to Assumption 4.1 that allows us to handle general Hessian matrices that depend on β, under which the theoretical properties can be carried out parallelly. Definition 4.2 (Localized Restricted Eigenvalue, LRE). The localized restricted eigenvalue is defined as n o κ+ (m, γ, r) = sup uT ∇2 L(β)u : (u, β) ∈ C(m, γ, r) ; u,β n o κ− (m, γ, r) = inf uT ∇2 L(β)u : (u, β) ∈ C(m, γ, r) , u,β  where C(m, γ, r) ≡ u, β : S ⊆ J, |J| ≤ m, kuJ c k1 ≤ γkuJ k1 , kβ − β ∗ k2 ≤ r is a local `1 cone. 16 FAN ET AL. Similarly, the localized restricted eigenvalue reduces to the restricted eigenvalue when ∇2 L(β) does not depend on β. We say the localized restricted eigenvalue condition holds if there exists m, γ, r such that 0 < κ− (m, γ, r) ≤ κ+ (m, γ, r) < ∞. In Appendix B, we give a geometric explanation of the local `1 cone, C(m, γ, r), and the coresponding localized analysis. 4.2. Statistical Theory. In this section, we provide theoretical analysis of the proposed estimator under the LSE condition. For completeness, in Appendix B, we also establish similar results under localized restricted eigenvalue condition. We begin with the contraction stage. Recall that the initial value βe(0) is taken as 0 for simplicity. We need the following assumption on the tightening function. −1 Assumption 4.2. Assume that w(·) ∈ T and w(u) ≥ 1/2 for u = 18ρ−1 ∗ δ λ. Here T is the tightening function class defined in (2.1). Our first result characterizes the statistical convergence rate of the estimator in the contraction stage. The key ideas of the proofs are outlined in Section 5. Other technical lemmas and details can be found in the online supplement. Proposition 4.1 (Statistical Rate in the Contraction Stage). Suppose that Assumption 4.1 holds. If λ, ε and r satisfy √  4(k∇L(β ∗ )k∞ + ε) ≤ λ ≤ rρ∗ / 18 s , (4.1) then any εc -optimal solution βe(1) satisfies βe(1) − β ∗ 2 √ √ ≤ 18ρ−1 ∗ λ s . λ s. The result above is a deterministic statement. Its proof is omitted as it directly follows from Lemma 5.1 with ` = 1 and E1 there to be S, the support of the true parameter β ∗ . The proof of Lemma 5.1 can be found in Appendix B. In Proposition 4.1, the approximation error εc , can be taken to p be the order of λ  log d/n in the sub-Gaussian noise case. The contraction √ stage ensures that the `2 estimation error is proportional to λ s, which is identical to the optimal rate of convergence for the Lasso estimator [4, 31]. Our result can be regarded as a generalization of the usual Lasso analysis to more general losses which satisfy the localized sparse eigenvalue condition. We are ready to present the main theorem, which demonstrates the effects of optimization error, shrinkage bias and tightening steps on the statistical rate. 17 LOCAL ADAPTIVE MAJORIZE-MINIMIZATION Theorem 4.2 (Optimal Statistical Rate). Suppose Assumptions 4.1 and 4.2 √ hold. If 4(k∇L(β ∗ )k∞ + (εt ∨ εc )) ≤ λ . r/ s, then any εt -optimal solution βe(`) , ` ≥ 2, satisfies the following δ-contraction property  √ kβe(`) − β ∗ k2 ≤ C k∇L(β ∗ )S k2 + εt s + λkw(|βS∗ | − u)k2 + δkβe(`−1) − β ∗ k2 , −1 where C is a constant and u = 18ρ−1 ∗ δ λ. Consequently, there exists a 0 constant C such that tightening effect opt err βe(`) −β ∗ }| √{ z }|  z 0 `−1 √{ 0 ∗ ∗ ≤ C k∇L(β ) k ε 2C δ λ s. + s +λkw(|β |−u)k + 2 t 2 S S 2 | {z } | {z } oracle rate coefficient effect The effect of the tightening stage can be clearly seen from the theorem above: each tightening step induces a δ-contraction property, which reduces the influence of the estimation error from thepprevious step by a δ-fraction. Therefore, in order to achieve the oracle rate s/n, we shall carefully choose √ the optimization error such that εt . k∇L(β ∗ )k2 / s and make the tightening iterations ` large enough. As a corollary, we give the explicit statistical rate under the quadratic loss L(β) = (2n)−1 ky −Xβk22 . In this case, we take p −1 λ  n log d so that the scaling condition (4.1) holds with high probability. We use sub-Gaussian(0, σ 2 ) to denote a sub-Gaussian distribution random variable with mean 0 and variance proxy σ 2 . ∗ Corollary 4.3. Let yi = xT i β +i , 1 ≤ i ≤ n, be independently and identically distributed sub-Gaussian random variables with i ∼ sub-Gaussian(0, σ 2 ). √ The columns of X are normalized such that maxj kX∗j k2 ≤ n. Assume ∗ there exists an γ > 0 such that kβ pS kmin ≥ u + γλpand w(γλ) = 0. Under Assumptions 4.1 and 4.2, if λ  n−1 log d, εt ≤ 1/n and T & log log d, then with probability at least 1−2d−η1 −2 exp{−η2 s}, βe(T ) must satisfy p kβe(T ) − β ∗ k2 . s/n, where η1 and η2 are positive constants. p Corollary 4.3 indicates that I-LAMM can achieve the oracle statistical rate s/n as if the support for the true known in advance. To p coefficients werep achieve such rate, we require εc . log d/n and εt . 1/n. In other words, we need only a more accurate estimator in the tightening stage rather than in both stages. This will help us to relax the computational burden, which will be discussed in detail in Theorem 4.7. Our last result concerns the oracle property of the obtained estimator βe(`) for ` large enough, with the 18 FAN ET AL. proof postponed to Appendix B in the online supplement. We first define the oracle estimator βb◦ as βb◦ = argmin L(β). supp(β)=S Theorem 4.4 (Strong Oracle Property). Suppose Assumptions 4.1 and 4.2 hold. Assume kβS∗ kmin ≥ u + γλ and w(γλ) = 0 for some constant γ. Let √ √ 4(k∇L(βb◦ )k∞ +εc ∨ εt ) ≤ λ . r/ s and εt≤ λ/ s. If kβb◦ −β ∗ kmax ≤ ηn . λ, √ then for ` large enough such that ` & log (1+εc /λ) s}, we have βe(`) = βb◦ . The theorem above is again a deterministic result. Large probability bound can be obtained by bounding the probability of the event 4(k∇L(βb◦ )k∞ + (εc ∨εt )) ≤ λ . The assumption that kβb◦ −β ∗ kmax . λ is very mild, because the oracle estimator only depends on the intrinsic dimension s rather than d. For instance, under linear model with sub-Gaussian errors, it can be shown p that kβb◦ − βkmax ≤ log s/n with high probability. Theorem 4.4 implies that the oracle estimator βb◦ is a fixed point of the ILAMM algorithm, namely, once the initial estimator is βb◦ , the next iteration produces the same estimator. This is in the same spirit as that proved in [12]. 4.3. Computational Theory. In this section, we analyze the computational rate for all of our approximate solutions. We start with the following assumption. Assumption 4.3. ∇L(β) is locally ρc -Lipschitz continuous, i.e. (4.2) k∇L(β1 ) − ∇L(β2 )k2 ≤ ρc kβ1 − β2 k2 , for β1 , β2 ∈ B2 (R/2, β ∗ ), √ where ρc is the Lipschitz constant and R . kβ ∗ k2 +λ s. We then give the explicit iteration complexity of the contraction stage in the following proposition. Recall the definition of φ0 and γu in Algorithm 2.1, and ρ∗ in Assumption 4.1. Proposition 4.5 (Sublinear Rate in the Contraction Stage). Assume that As√ sumption 4.1 and 4.3 hold. Let 4(k∇L(β ∗ )k∞ +εc ) ≤ λ . r/ s. To achieve an approximate local solution βe(1) such that ωλ(0) (βe(1) ) ≤ εc in the contraction stage, we need no more than ((1 + γu )Rρc /εc )2 LAMM iterations, where ρc is a constant defined in (4.2). LOCAL ADAPTIVE MAJORIZE-MINIMIZATION 19 The sublinear rate is due to the lack of strong convexity of the loss function in the contraction stage, because we allow starting with arbitrary bad initial value, say 0. Once it enters the contracting region (aka, the tightening stage), the problem becomes sparse strongly convex (see Proposition B.3 in Appendix B), which endows the algorithm a linear rate of convergence. This is empirically demonstrated in Figure 2. Our next proposition gives a formal statement on the geometric convergence rate for each subproblem in the tightening stage. Proposition 4.6 (Geometric Rate in the Tightening Stage). Suppose that the same conditions for Theorem 4.2 hold. To obtain an approximate solution  βe(`) satisfying ωλ(`−1) βe(`) ≤ ε in each step of the `-th tightening stage √ (` ≥ 2), we need at most C 0 log(C 00 λ s/ε) LAMM iterations, where C 0 and C 00 are two positive constants. Proposition 4.6 suggests that we only need to conduct a logarithmic number of LAMM iterations in each tightening step. Simply combining the computational rate in both the contraction and the tightening stages, we manage to obtain the global computational complexity. √ Theorem 4.7. Assume that λ s = o(1). Suppose that the same conditions for Theorem 4.2 hold. To achieve an approximate solution βe(`) such that p (1) (k) ωλ(0) (βe ) ≤ εc . λ and ωλ(k−1) (βe ) ≤ εt . 1/n for 2 ≤ k ≤ T , the total number of LAMM iterations we need is at most 1 1 C 0 2 + C 00 (T − 1) log , εc εt √  where C 0 and C 00 are two positive constants, and T  log λ n . Remark 4.8. We complete this section with a remark on the sublinear rate in the contraction stage. Without further structures, the sublinear rate in the first stage is the best possible one for the proposed optimization procedure when λ is held fixed. Linear rate can be achieved when we start from a sufficiently good initial value. Another strategy is to use the path-following algorithm which is developed in [28], where they gradually reduce the size of λ to ensure the solution sequence to be sparse. 5. Proof Strategy for Main Results. In this section, we present the proof strategies for the main statistical and computational theorems, with technical lemmas and other details left in the supplementary material. 5.1. Proof Strategy for Statistical Recovery Result in Section 4.2. Proposition 4.1 indicates that the contraction estimator suffers from a suboptimal 20 FAN ET AL. √ rate of convergence λ s. The tightening stage helps refine the statistical rate adaptively. To suppress the noise in the `th subproblem, it is necessary to  (`−1) control minj |βej | : j ∈ S c in high dimensions. For this, we construct an entropy set E` of S in each tightening subproblem to bound the magnitude (`−1) . The entropy set at the `th step is defined as of λE c min ` n o (`−1) (5.1) E` = S ∪ j : λj < λw(u), u = 18δ −1 ρ−1 ∗ λ∝λ . (`) Under mild conditions, we will show that |E` | ≤ 2s and kλE c kmin ≥ λw(u) ≥ ` λ/2, which is more precisely stated in the following lemma. Lemma 5.1. Suppose that Assumption 4.1 and 4.2 hold. If 4(k∇L(β ∗ )k∞ + √ εt ∨ εc ) ≤ λ . r/ s, we must have |E` | ≤ 2s, and the ε-optimal solution βe(`) satisfies  p  (`−1) ∗ λ ∇L(β ) |E` | βe(`) − β ∗ 2 ≤ 12ρ−1 + + ε E` 2 ∗ S 2 √ √ ≤ 18ρ−1 ∗ λ s . λ s. (`−1) , which is further Lemma 5.1 bounds βe(`) − β ∗ 2 in terms of λS 2 √ √ upper bounded by the order of λ s. The rate λ s coincides with the convergence rate of the contraction estimator. Later, we will exploit this result  (`)in our localized analysis to secure that all ∗the approximate solutions √ βe fall in a local `2 -ball centered at β with radius r & λ s. `=1,...,T (`−1) The next lemma further bounds λ using functionals of βe(`−1) , S 2 which connects the adaptive regularization parameter to the estimator from previous steps. (`−1) (`−1)  Lemma 5.2. Assume w ∈ T . Let λj = λw |βej | for βe(`−1) , then for any norm k · k∗ , we have (`−1) ≤ λ w(|βS∗ | − u)  where w(|βS∗ | − u) ≡ w(|βj∗ | − u) j∈S . λS ∗ ∗ (`−1) + λu−1 βS∗ − βeS ∗ , Lemma 5.2 bounds the tightening weight λ(`−1) in the `th subproblem by two terms. The first term describes the coefficient effects: when the coefficients are large enough (in absolute value) such that kβ ∗ kmin ≥ u + γλ and w(γλ) = 0, it becomes 0. The second term concerns the estimation error of the estimator from previous step. Combing the above two lemmas, we prove that βe(`) benefits from the tightening stage and possesses a refined statistical rate of convergence. The proof of Corollary 4.3 is left in Appendix B in the online supplement. 21 LOCAL ADAPTIVE MAJORIZE-MINIMIZATION Proof of Theorem 4.2. Applying Lemma 5.1, we obtain the size of the entropy set E` (see definition in (5.1) ) is bounded by 2s and  p  √ (`−1) ∗ +ε (5.2) βe(`) −β ∗ 2 ≤ C1 λS + ∇L(β ) |E` | . λ s, t E ` 2 2 where C1 = 12ρ−1 ∗ . Using Lemma 5.2 yields that (`−1) λS 2 ≤ λ w(|βS∗ | − u) 2 + λu−1 (βe(`−1) − β ∗ )S 2 . Plugging the inequality above into (5.2) obtains us that   p (5.3) βe(`) − β ∗ 2 ≤ C1 ∇L(β ∗ )E` 2 +εt |E` |+λ w(|βS∗ |−u) 2 | {z } I +C1 λu −1 (βe(`−1) −β ∗ )S 2 . We now simplify the inequality above by providing an upper bound for term I. Decomposing the support set E` into S and E` \S and applying the triangle inequality along with the Hölder inequality, we have p √ I ≤ k∇L(β ∗ )S k2 + εt s + k∇L(β ∗ )k∞ + εt (5.4) E` /S. Following the proof of Lemma 5.1 in Appendix B, by (`−1) βeE` \S  u ≤ βe(`−1) − β ∗ 2 p |E` \ S| can be bounded  u, where u = 18ρ∗ −1 δ −1 λ ∝ λ. 2 Therefore, (5.4) can be simplified to I ≤ ∇L(β ∗ )S √ λ e(`−1) + ε s+ β − β∗ t 2 4u 2 , which, combining with (5.3), yields the contraction property with δ. Consequently, we obtain  √ βe(`) −β ∗ 2 ≤ C ∇L(β ∗ )E` 2 +εt s+λ wS (|βS∗ | − u) 2 +δ `−1 βe(1) − β ∗  √ √ ≤ C ∇L(β ∗ )E` 2 + εt s + λ wS (|βS∗ | − u) 2 + Cδ `−1 λ s, where C = C1 /(1−δ) and the last inequality follows from Proposition 4.1. The proof is completed. 2 , 22 FAN ET AL. 5.2. Proof Strategy for Computational Result in Section 4.3. In this section, we present the sketch for the proofs of the results in Section 4.3. We start with the contraction stage. The next lemma shows that the contraction stage enjoys a sublinear rate of convergence. The proof can be found in Appendix C. P Lemma 5.3. Recall that F (β, λ) = L(β) + dj=1 λj |βj |. We have   φc (1,0) F β (1,k) , λ(0) − F βb(1) , λ(0) ≤ β − βb(1) 2k 2 . 2 The result above suggests that the optimization error decreases to zero at the rate of 1/k, while Proposition 4.1 indicates that the best statistical √ rate for the contraction stage is only in the order of λ s. Therefore, one can early stop the LAMM iterations in the contraction stage as soon as it  √ enters the contraction region β : kβ − β ∗ k2 . Cλ s, β is sparse . It is this lemma that helps characterize the iteration complexity in terms of the total number of LAMM updates needed in the contraction stage, see Proposition 4.5. To utilize the localized sparse eigenvalue condition in the tightening stage, we need the following proposition which characterizes the sparsity of all the approximate solutions produced by the contraction stage. Lemma 5.4. Assume that Assumption 4.1 holds. If 4(k∇L(β ∗ )k∞ +εc ) ≤ √ λ . r/ s, then βe(1) in the contraction stage is s + se sparse. In particular, we have (βe(1) )S c 0 ≤ se. Together with Proposition 4.1, it ensures that the contraction estimator √ βe(1) falls in the contraction region β : kβ−β ∗ k2 ≤ Cλ s and β is sparse . This makes the localized sparse eigenvalue condition useful and thus makes the geometric rate of convergence possible. Lemma 5.5 (Geometric Rate in the Tightening Stage). Under the same conditions for Theorem 4.2, for any ` ≥ 2, {β (`,k) } converges geometrically,   F β (`,k) , λ(`−1) −F βb(`) , λ(`−1)  o 1 k n ≤ 1− F (β (`,0) , λ(`−1) )−F (βb(`) , λ(`−1) ) . 4γu κ The above result suggests that each subproblem in the tightening stage enjoys a geometric rate of convergence, which is the fastest possible rate among all first-order optimization methods under the blackbox model. Lemma 5.5 can be used to obtain the computational complexity analysis of each single step of the tightening stage, i.e., Proposition 4.6. LOCAL ADAPTIVE MAJORIZE-MINIMIZATION 23 6. Numerical Examples. In this section, we evaluate the statistical performance of the proposed framework through several numerical experiments. We consider the following three examples. Example 6.1 (Linear Regression). In the first example, continuous responses were generated according to the model (6.1) ∗ ∗ yi = xT . . . , 0)T , i β + i , where β = (5, 3, 0, 0, −2, 0, | {z } d−5 and n = 100. Moreover, in model (6.1), {xi }i∈[n] are generated from N (0, Σ) distribution with covariance matrix Σ, which is independent of i ∼ N (0, 1). We take Σ as a correlation matrix Σ = (ρij ) as follows. • Case 1: independent correlation design with (ρij ) = diag(1, · · · , 1); • Case 2: constant correlation design with ρij = 0.75 if i 6= j; ρij = 1, otherwise; • Case 3: autoregressive correlation design with ρij = 0.95|i−j| . Example 6.2 (Logistic Regression). In the second example, independent observations with binary responses are generated according to the model P(yi = 1|xi ) = ∗ exp{xT i β } T 1 + exp{xi β ∗ } i = 1, . . . , n, where β ∗ and {xi }i∈[n] are generated in the same manner as in the case 1 of Example 6.1. Example 6.3 (Varying Dimensions and Sample Sizes). In this example, we continue Example 6.1 with varying dimensions and sample sizes. Specifically, we consider linear regression under autoregressive correlation design with ρij = 0.90|i−j| with d varying from 1000 to 3500 and n varying from 100 to 500. In the first two cases, we fix the sample size n at 100 and consider d = 1000. We investigate the sparsity recovery and estimation properties of the I-LAMM (or TAC) estimator via numerical simulations. We compared the I-LAMM estimator with the following methods: the oracle estimator which assumes the availability of the active set S; the refitted Lasso (Refit) which uses a post least square refit on the selected set from Lasso; the adaptive Lasso (ALasso) estimator with weight function w(βj ) = 1/|βj | proposed by [33]; the smoothly clipped absolute deviation (SCAD) estimator [9] with a = 3.7; and the minimax concave penalty (MCP) estimator with a = 3 [29]. For I-LAMM, we used the 3-fold cross-validation to select the constant c ∈ 24 FAN ET AL. Table 1 The median of MSE, TP, FP, Time in seconds under the Case 1, Case 2 and Case 3 for linear regression in Example 6.1 and logistic regression in Example 6.2. MSE TP FP Time MSE TP FP Time I-LAMM Lasso Refit ALasso SCAD MCP Oralcle 0.0285 0.3114 0.5585 0.4616 0.0397 0.0344 0.0258 Linear\Case 1 3.00 0.00 3.00 17.00 3.00 17.00 3.00 15.00 3.00 0.00 3.00 0.00 3.00 0.00 0.17 0.02 0.02 0.06 0.21 0.17 - 0.0659 1.3709 2.1573 1.6077 0.0695 0.0706 0.0565 Linear\Case 2 3.00 0.00 3.00 16.00 3.00 16.00 3.00 13.00 3.00 0.00 3.00 0.00 3.00 0.00 0.19 0.04 0.04 0.08 0.23 0.22 - I-LAMM Lasso Refit ALasso SCAD MCP Oralcle 0.2819 5.8061 2.6354 4.4242 14.8680 14.9381 0.1661 Linear\Case 3 3.00 3.00 2.00 20.00 2.00 20.00 2.00 12.00 2.00 5.00 1.00 1.00 3.00 0.00 0.22 0.03 0.03 0.06 0.25 0.18 - 8.94 26.92 26.85 8.28 9.48 11.84 3.32 Logistic 3.00 0.00 3.00 20.00 3.00 20.00 3.00 7.00 3.00 12.00 3.00 3.00 3.00 0.00 0.20 0.03 0.03 0.05 0.21 0.22 - p 0.5 × {1, 2, . . . , 20} in the tuning parameter λ = c log d/n in the contraction stage, with regularization parameters updated automatically at later steps. p p We further took γu = 2, εc = log d/n and εt = 1/n. For Lasso, we used the I-LAMM algorithm; for ALasso, sequential tuning in [7] was used: we employed 3-fold cross validation in each step with I-LAMM algorithm used; and the SCAD and MCP estimators were computed using the R package ncvreg and 3-fold cross-validation was used for tuning parameter selection. For each simulation setting, we generated 100 simulated datasets and applied different estimators to each dataset. We report different statistics for each estimator in Table 1. To measure the sparsity recovery performance, we calculated the median of the number of zero coefficients incorrectly estimated to be nonzero (i.e. false positive, denoted as FP), the median of the number of nonzero coefficients correctly estimated to be nonzero (i.e. true positive, denoted by TP). To measure the estimation accuracy, we calculated the median of mean squared error (MSE). To evaluate the computational efficiency, we gave the median of time (in seconds) used to produce the final estimator for different methods. Note that the computational time provided here is merely for a reference. They depend on optimization errors and implementation. We have several important observations. First, it is not surprising that 25 LOCAL ADAPTIVE MAJORIZE-MINIMIZATION MSE with d = 1000 2.0 ● I-LAMM Lasso Refit 1.5 ALasso SCAD 4 5 MSE with n = 100 1.0 MSE ● ● ● ● ● ● 1000 1500 2000 2500 3000 3500 d 0.0 0 1 0.5 2 MSE 3 MCP ● 100 ● ● ● ● ● 200 300 400 500 600 n Fig 4. The median of MSE with varying dimensions and sample sizes in Example 6.3. Lasso tends to overfit. Other procedures improve the performance of Lasso by reducing the estimation bias and the false positive rate. The best overall performance is achieved by the I-LAMM estimator with small MSE and FP in all cases. The MCP and SCAD estimators also have overall good performance in the logistic regression model, case 1 and case 2 of the linear regression model. However, all of MCP, SCAD and ALasso breaks down by missing true positives in case 3, where the design matrix exhibits a strong correlation between features, while I-LAMM remains the best followed by the Lasso estimator. This suggests the superiority of I-LAMM over other nonconvex penalized regression methods under strongly correlated designs. The MSE of the I-LAMM estimator p keeps flat when the dimension d varies, which justifies the oracle rate s/n. SCAD and MCP have competitive performance when the dimension is relatively small, but they quickly break down when the dimension gets larger. This is possibly due to the numerical instability for directly solving nonconvex systems. This phenomenon is also observed in [28]. When the sample size is increasing, the performances of I-LAMM, SCAD and MCP are almost identical to each other while other convex methods suffer from slightly worse performance. In addition, to demonstrate the phase transition phenomenon, in Figure 2, we plot the log estimation error verses the number of iterations for each tightening step for case 2 in Example 6.1. Indeed, the contraction stage suffers a sublinear rate of convergence before getting into the contracting 26 FAN ET AL. region and enjoys a geometric rate afterwards, while the tightening stage has a geometric rate of convergence. These are in line with our asymptotic theory. 7. Conclusions and Discussions. We propose a computational framework, I-LAMM (or TAC), for simultaneous control of algorithmic complexity and statistical error when fitting high dimensional models. Even though I-LAMM only solves a sequence of convex programs approximately, the solution enjoys the same optimal statistical property of the unobtainable global optimum for the folded-concave penalized regression. Our theoretical treatment relies on a novel localized analysis which avoids the parameter bound contraint, such as kβk1 ≤ R, used in all other recent works. Statistically, a δ-contraction property is established: each convex program contracts the previous estimator by a δ-fraction until the optimal statistical error is reached. Computationally, a phase transition in algorithmic convergence is established. The contraction stage enjoys only a sublinear rate of convergence while the tightening stage converges geometrically fast. Recently, [22] proposed the restricted eigenvalue condition for unified Mestimators. [18] leveraged this condition, which is more related to our localized conditions. However, there are two major differences. First, their local parameter r is fixed atp a constant independent of n, d, s, while we allow it to go to 0 as long as r & s log d/n. Second, their high dimensional regression problem relies on the `1 ball constraint kβk1 ≤ R, while our newly developed localized analysis, together with the localized conditions, removes such type of constraint. In [21], the authors only consider the solutions in a local cone, which makes their analysis much simpler than ours. In this paper, we provide a stronger result: with high probability, all local solutions must fall in a local sparse (or `1 ) cone and thus makes the localized eigenvalue conditions applicable. More recently, [27] proposed a two-step approach named calibrated CCCP which achieve strong oracle properties when using the Lasso estimator as initialization. Our work differs from theirs in two aspects. First, their work aims at analyzing the least square loss while our analysis handles much broader families of loss functions. Second, their procedure attains anp oracle rate but requires the minimum signal strength to be in the order of s log p d/n. Such a requirement is suboptimal. In contrast, our results requires only log d/n. This weakened assumption on minimum signal strength also distinguishes ILAMM from other convex procedures, such as least squares refit after model selection [3]. In [27], the authors also proposed a high dimensional BIC criterion for variable selection and finding the oracle estimator along the solution LOCAL ADAPTIVE MAJORIZE-MINIMIZATION 27 path. We believe such a criterion can also be applied to our framework under general conditions. In further studies, [20], [19] and [28] study the theoretical properties of nonconvex penalized M-estimators. Specifically, [20] and [19] provide conditions under which all the local optima obtained by an `1 ball constrained optimization enjoys desired statistical rates. [28] propose a path-following strategy to obtain optimal computational and statistical rates of convergence, which also relies an extra ball constraint. Our work differs from the aforementioned literature at least in three aspects: (1) Our theory exploits new notion of localized analysis, which is not available in [20], [19] and [28]. Such analysis allows us to eliminate the extra ball constraints in previous work, which introduce more tuning effort and are intuitively redundant given the penalty function. (2) Our statistical results tolerate explicit computational precisions and are valid for all obtained approximate solutions, while the analysis in [20] only targets on the exact local solutions. Moreover, our computational result does not rely on the path-following type strategy as in [28] and is valid for any algorithm with desired statistical properties as basic building blocks within each of the p tightening steps. (3) We provide a refined oracle statistical rate s/n for the obtained approximation solution, while [20] and [28] do not provide such a result. [20] provide a statistical rate which is also achievable using the convex Lasso penalty. [28] only prove the oracle rate for exact local solutions. Our work can be applied to many different topics: low rank matrix completion problems, high dimensional graphical models, quantile regression and many others. We conjecture that in all of the aforementioned topics, I-LAMM can give faster rate by approximately solving a sequence of convex programs, with controlled computing resources. It is also interesting to see how our algorithm works in large-scale distributed systems. Is there any fundamental tradeoffs between statistical efficiency, communication and time complexity? We leave these as future research projects. Supplementary Material. The supplementary material contains proofs for Corollary 4.3, Theorem 4.4, Proposition 4.5, Proposition 4.6 and Theorem 4.7 in Section 4. It collects proofs of the lemmas presented in Section 5. An application to robust linear regression is given in Appendix D. Other technical lemmas are collected in Appendices E and F. 28 FAN ET AL. References. [1] Agarwal, A., Negahban, S. and Wainwright, M. J. (2012). Fast global convergence rates of gradient methods for high-dimensional statistical recovery. The Annals of Statistics 40 2452–2482. [2] Beck, A. and Teboulle, M. (2009). A fast iterative shrinkage-thresholding algorithm for linear inverse problems. SIAM journal on imaging sciences 2 183–202. [3] Belloni, A. and Chernozhukov, V. (2013). Least squares after model selection in high-dimensional sparse models. Bernoulli 19 521–547. [4] Bickel, P. J., Ritov, Y. and Tsybakov, A. B. (2009). Simultaneous analysis of lasso and dantzig selector. The Annals of Statistics 37 1705–1732. [5] Boyd, S. and Vandenberghe, L. (2009). Convex optimization. Cambridge university press. [6] Breheny, P. and Huang, J. (2011). Coordinate descent algorithms for nonconvex penalized regression, with applications to biological feature selection. The Annals of Applied Statistics 5 232–253. [7] Bühlmann, P. and van de Geer, S. (2011). Statistics for high-dimensional data: methods, theory and applications. Springer Science & Business Media. [8] Bunea, F., Tsybakov, A., Wegkamp, M. et al. (2007). Sparsity oracle inequalities for the lasso. Electronic Journal of Statistics 1 169–194. [9] Fan, J. and Li, R. (2001). Variable selection via nonconcave penalized likelihood and its oracle properties. Journal of the American Statistical Association 96 1348–1360. [10] Fan, J. and Lv, J. (2008). Sure independence screening for ultrahigh dimensional feature space (with discussion). Journal of Royal Statistical Society, Series B 70 849–911. [11] Fan, J. and Lv, J. (2011). Nonconcave Penalized Likelihood With NPDimensionality. Information Theory, IEEE Transactions on 57 5467–5484. [12] Fan, J., Xue, L. and Zou, H. (2014). Strong oracle optimality of folded concave penalized estimation. The Annals of Statistics 42 819–849. [13] Friedman, J., Hastie, T., Höfling, H. and Tibshirani, R. (2007). Pathwise coordinate optimization. Annals of Applied Statistics 1 302–332. [14] Hunter, D. R. and Lange, K. (2004). A tutorial on mm algorithms. The American Statistician 58 30–37. [15] Kim, Y., Choi, H. and Oh, H.-S. (2008). Smoothly clipped absolute deviation on high dimensions. Journal of the American Statistical Association 103 1665–1673. [16] Kim, Y. and Kwon, S. (2012). Global optimality of nonconvex penalized estimators. Biometrika 99 315–325. [17] Lange, K., Hunter, D. R. and Yang, I. (2000). Optimization transfer using surrogate objective functions. Journal of computational and graphical statistics 9 1–20. [18] Loh, P.-L. (2015). Statistical consistency and asymptotic normality for highdimensional robust m-estimators. arXiv preprint arXiv:1501.00312. [19] Loh, P.-L. and Wainwright, M. J. (2014). Support recovery without incoherence: A case for nonconvex regularization. arXiv preprint arXiv:1412.5632. [20] Loh, P.-L. and Wainwright, M. J. (2015). Regularized m-estimators with nonconvexity: statistical and algorithmic theory for local optima. Journal of Machine Learning Research 16 559–616. [21] Lozano, A. C. and Meinshausen, N. (2013). Minimum distance estimation for robust high-dimensional regression. arXiv preprint arXiv:1307.3227. [22] Negahban, S. N., Ravikumar, P., Wainwright, M. J. and Yu, B. (2012). A unified framework for high-dimensional analysis of m-estimators with decomposable LOCAL ADAPTIVE MAJORIZE-MINIMIZATION 29 regularizers. Statistical Science 27 538–557. [23] Nesterov, Y. (2013). Gradient methods for minimizing composite functions. Mathematical Programming 140 125–161. [24] Raskutti, G., Wainwright, M. J. and Yu, B. (2010). Restricted eigenvalue properties for correlated gaussian designs. The Journal of Machine Learning Research 11 2241–2259. [25] Tibshirani, R. (1996). Regression shrinkage and selection via the lasso. Journal of the Royal Statistical Society, Series B 58 267–288. [26] van de Geer, S. A., Bühlmann, P. et al. (2009). On the conditions used to prove oracle results for the lasso. Electronic Journal of Statistics 3 1360–1392. [27] Wang, L., Kim, Y. and Li, R. (2013). Calibrating non-convex penalized regression in ultra-high dimension. The Annals of Statistics 41 2505–2682. [28] Wang, Z., Liu, H. and Zhang, T. (2014). Optimal computational and statistical rates of convergence for sparse nonconvex learning problems. The Annals of statistics 42 2164. [29] Zhang, C.-H. (2010). Nearly unbiased variable selection under minimax concave penalty. The Annals of Statistics 38 894–942. [30] Zhang, C.-H. and Zhang, T. (2012). A general theory of concave regularization for high-dimensional sparse estimation problems. Statistical Science 27 576–593. [31] Zhang, T. (2009). Some sharp performance bounds for least squares regression with l1 regularization. The Annals of Statistics 37 2109–2144. [32] Zhang, T. (2010). Analysis of multi-stage convex relaxation for sparse regularization. The Journal of Machine Learning Research 11 1081–1107. [33] Zou, H. (2006). The adaptive lasso and its oracle properties. Journal of the American Statistical Association 101 1418–1429. [34] Zou, H. and Li, R. (2008). One-step sparse estimates in nonconcave penalized likelihood models. The Annals of statistics 36 1509. LOCAL ADAPTIVE MAJORIZE-MINIMIZATION 1 Supplementary Material to “I-LAMM: Simultaneous Control of Algorithmic Complexity and Statistical Error” BY Jianqing Fan Han Liu Qiang Sun Tong Zhang The supplementary material contains proofs for Corollary 4.3, Theorem 4.4, Proposition 4.5, Proposition 4.6 and Theorem 4.7 in Section 4. It collects the proofs of the key lemmas presented in Section 5. An application to robust linear regression is given in Appendix D. Other technical lemmas are collected in Appendices E and F. APPENDIX A: GENERAL CONVEX LOSS FUNCTIONS We request the convex loss L to have continuous first order derivative. In addition, we request it to be locally twice differentiable almost everywhere. Specifically, we consider the following family of loss functions n o FL = L : L is convex, ∇L is continuous and differentiable in B2 (r, β ∗ ) , √ where β is any vector in Rd and r & λ s. This family includes many interesting loss functions. Some examples are given as below: • Logistic Loss: Let {(xi , yi )}i∈[n] be n observed data points of (X, y), where X is a d-dimensional covariate and yi ∈ {−1, +1}. The logistic loss is given in the form L(β) = n−1 n n X i=1 o log 1 + exp(−yi xT β) , i where n is the sample size. • Huber Loss: In the robust linear regression, the Huber loss takes the form n n o X L(β) = n−1 `α (yi − xT β) , i i=1 2α−1 |x| α−2 where `α (x) = − when |x| > α−1 and `α (x) = x2 otherwise. • Gaussian Graphical Model Loss: Let Θ = Σ−1 be the precision mab be the sample covariance matrix. The negative log-likelihood trix and Σ loss of Gaussian graphical model is b L(Θ) = tr(ΣΘ) − log det(Θ). 2 FAN ET AL. We note that the Huber loss is convex and has continuous first-order derivative. In addition, its second derivative exists in a neighborhood of β ∗ . Therefore it belongs to the family of loss functions defined above. Other loss functions include the least square loss and locally twice differentiable convex composite likelihood loss. We remark here that, the loss functions analyzed in our paper can be e nonconvex. If L(β) is nonconvex, we can decompose it as L(β) = L(β) + e H(β) such that L(β) is the convex part and H(β) is the concave part. We e e λ (β) such that R(β) e then write the objective function as F(β) = L(β)+ R = e H(β) + R(β) and treat R(β) as our new regularizer. If the corresponding weight function w e (·) satisfies Assumption 4.1, our theory shall go through without any problems. A similar technique is exploited in [28]. APPENDIX B: PROOFS OF STATISTICAL THEORY B.1. Statistical Theory under LSE Condition. In this section, we collect the proofs for Corollary 4.3 and Theorem 4.4. We give proofs for the key technical lemmas in Section 5.1, which are used to prove theorem 4.2. Other technical lemmas are postponed to later sections. We then establish parallel results under the localized restricted eigenvalue condition. B.1.1. Proofs of Main Results. In this section, we first prove Corollary 4.3 and then give the proof of Theorem 4.4. ∗ Proof of Corollary 4.3. We start by pbounding P(k∇L(β )k∞ ≥ λ/8), ∗ −1 T ∗ where ∇L(β ) = n X (y−Xβ ). For λ ≥ c log d/n, using the union bound, we obtain     p P k∇L(β ∗ )k∞ ≥ λ/8 ≤ P n−1 kXT (y − Xβ ∗ )k∞ ≥ 8−1 c log d/n (B.1) ≤ d   X p P 1/n|XjT | ≥ 8−1 c log d/n . j=1 Let vj = XjT . Since i is sub-Gaussian(0, σ 2 ) for i = 1, . . . , n, we obtain     −2 2 2 2 E exp{t0 vj } + exp{−t0 vj } ≤ 2 exp n kX∗j k σ t0 /2 ,  which implies P(|vj | ≥ t) exp{t0 t} ≤ 2 exp n−2 kX∗j k2 σ 2 t20 /2 . Taking t0 = t(n−2 kX∗j k22 σ 2 )−1 yields that   t2 P(|vj | ≥ t) ≤ 2 exp − 2 . 2σ kX∗j k22 /n2 3 LOCAL ADAPTIVE MAJORIZE-MINIMIZATION Further taking t = λ/8 in the bound above and plugging it into (B.1) results     (c/8)2 log d 2 2 ∗ ≤ 2d−c /(128σ ) . P k∇L(β )k∞ ≥ λ/8 ≤ 2d exp − 2 2 2σ maxj {kX∗j k2 /n} n o Define the event J1 = k∇L(β ∗ )k∞ ≤ λ/8 . Then with probability at least  1 − 2d−η1 where η1 = c2 (128σ 2 ), we have k∇2 L(β ∗ )k∞ ≤ λ/8. It remains to show the oracle rate holds. Applying Theorem 4.2, we have   √ √ (B.2) kβe(`) −β ∗ k2 ≤ C k∇L(β ∗ )S k2 +εt s+λkw(|βS∗ |−u)k2 +Cδ `−1 λ s . | {z } | | {z } {z } I For I, εt √ II III p p s ≤ s/n since εt ≤ 1/n. Because kβ ∗ kmin ≥ u + γλ, we have w(|βS∗ | − u) ≤ w(kβS∗ kmin 1S − u) ≤ (w(γλ), . . . , w(γλ))T = 0. √ √ This implies II = 0. For III, because ` ≥ blog λ n(log 1/δ)−1 c + 2 & log λ n, we obtain √ p √ √ −1 III = Cδ `−1 λ s ≤ Cδ (log 1/δ) log λ n λ s = C s/n. Plugging the bounds of I, II and III back into (B.2), we have p kβe(`) − β ∗ k2 ≤ Ck∇L(β ∗ )S k2 + C s/n. It remains to bound k∇L(β ∗ )S k2 . For the quadratic loss, ∗ −1 T ∇L(β ∗ )S = n−1 XT ∗S (y − Xβ ) = n X∗S . T Taking v = , A = n−1 X∗S XT ∗S and t = E A in the Hanson-Wright inequality (Lemma F.3) yields that   T   E A (ET A)2 T T T P | A−E A| > E A ≤ 2 exp −Ch min , σ 2 kAk2 σ 4 kAk2F    s2 σ 4 sσ 2 (B.3) ≤ 2 exp −Ch min , , σ 2 λmax (A) sσ 4 λ2max (A) where Ch is a universal constant that does not depend on n, d, s; and ET A = sσ 2 using the expectation of a quadratic form. Note that the non-zero sinT gular values of XT ∗S X∗S and X∗S X∗S are the same and ρ− (s, r) is bounded above by ρ∗ , we have kAk2 = 1 X∗S XT ∗S n = 2 1 T X X∗S n ∗S 2 = ρ+ (s, r) ≤ ρ∗ , 4 FAN ET AL. which, together with (B.3), results that   P |T A−ET A| > ET A ≤ 2 exp{−Ch0 s}, where Ch0 = Ch min{1/ρ∗ , 1/(ρ∗ )2 }. Define PS to be the projection matrix into the column space of X∗S . Since PS X∗S = X∗S , we obtain that T A = (PS )T A(PS ). Thus we have ET A ≤ λmax (A)kPS k22 . Further define the event set J2 = |T A− ET A| ≤ ET A . Then with probability at least P(J2 ) ≥ 1−2 exp{−Ch0 s}, r r r  1 T 2 T 2 ∗  ∗ k∇L(β )S k2 =  A ≤ E A ≤ ρ E kPS k22 n n n p p p p ∗ ∗ = 2ρ σ s/n ≤ 2ρ σ s/n. Define J = J1 ∩ J2 . Then, in the event J , we have p p p kβe(`) − β ∗ k2 ≤ C 2ρ∗ σ + 1 s/n ∝ s/n, where P(J ) ≥ 1 − P(J1 ) − P(J2 ). In other words, the above bound holds with probability at least 1 − 2d−η1 − 2 exp{−η2 s}, in which η1 = c2 /(128σ 2 ) and η2 = Ch0 . We then give the proof for the oracle property under the LSE condition. Similar result holds under the LRE condition.  Proof of Theorem 4.4. Let us define S (`) = j : |βe(`) − βj∗ | > u , where u is defined in Assumption 4.2. We have S (0) = {(i, j) : |βj∗ | ≥ u} = S. We need several lemmas. Our first lemma bounds the discrepancy between βe(`) and βb◦ . The proof is similar to that of Lemma B.7. Lemma B.1. Suppose Assumption 4.1 and 4.2 hold. Let C = 12/ρ∗ . If √ 4(k∇L(βb◦ )k∞ + εc ∨ εt ) ≤ λ . r/ s, we must have |E` | ≤ 2s, and for ` ≥ 2, the ε-optimal solution βe(`) must satisfy  p  (`−1) kβe(`) − βb◦ k2 ≤ C kλE` k2 + εt |E` | . Our second lemma connects λ(`−1) to βe(`−1) . The proof follows a similar argument used in the proof of Lemma 5.2 and thus is omitted. Lemma B.2. We have (`−1) λE` 2 ≤ λ w(|βS∗ |−u)  (`−1) +λ j ∈ S : |βej −βj∗ | ≥ u 2 1/2 q +λ E` \ S . LOCAL ADAPTIVE MAJORIZE-MINIMIZATION 5 Combining the two above lemmas together and using the definition of S (`) , we obtain q q n p o βe(`) − βb◦ 2 ≤ C λ w(|βS∗ |−u) 2 +λ S (`−1) ∩ S +λ E` \ S +ε |E` | . | {z } | {z } I II Since kβS kmin ≥ u + αλ and w(αλ) = 0, we have I = λkw(|βS∗ | − u)k2 = 0. (`−1) (`−1) For any j ∈ E` \ S, we must have λj < λw(u), and thus βej = (`−1) ∗ ∗ c (`−1) e βj − βij ≥ u since βj = 0 for j ∈ S . This implies E` \ S ∈ S \ S, p (`−1) \ S|. Therefore, for ` ≥ 2, we have or equivalently II ≤ λ |S q n q p o (B.4) βe(`) − βb◦ 2 ≤ C λ S (`−1) ∩ S +λ S (`−1) \ S + εt |E` | n q p o (`−1) ≤C λ 2 S + εt |E` | (`) implies On the other hand, since kβb◦ − β ∗ kmax ≤ ηn ≤ δ −1 ρ−1 ∗ λ, j ∈ S that √ −1 −1 (`) (`) |βej − βbj◦ | ≥ |βej −βj∗ |−|βbj◦ −βj∗ | ≥ u−δ −1 ρ−1 ∗ λ ≥ 12 2δ ρ∗ λ. We then bound p |S (`) | in terms of kβe(`) − βb◦ k2 : q |S (`) | βe(`) − βb◦ ≤ u − ηn 2 ≤δ q S (`−1) √ εt s +δ . λ Doing induction on ` and using the fact that S (0) = S, we obtain √ √ q √ εc s δ εt s |S (`) | ≤ δ ` s + δ ` + λ 1−δ λ  √ Thus, for ` large enough such that ` & log (1 + εc /λ) s and εt small √ enough such that εt . λ/ s, we must have the right hand side of the above inequality is small than 1, which implies that S (`) = ∅ and thus βe(`) = βb◦ . Therefore, the estimator enjoys the strong oracle property. 6 FAN ET AL. B.2. Key Lemmas. In this section, we collect proofs for Lemma 5.1 and Lemma 5.2. We start with a proposition that connects the LSE condition to the localized versions of the sparse strong convexity/sparse strong smoothness (SSC/SSM) in [1], which will be frequently used in our theoretical analysis. Let DL (β1 , β2 ) ≡ L(β1 )−L(β2 )− ∇L(β2 ), β1 −β2 , s (β , β ) ≡ D (β , β )+D (β , β ). and DL 1 2 2 1 L 1 L 2 Proposition B.3. For any β1 , β2 ∈ B2 (r, β ∗ ) ≡ {β : kβ − β ∗ k2 ≤ r} such that kβ1 − β2 k0 ≤ m, we have 1 1 ρ− (m, r)kβ1 − β2 k22 ≤ DL (β1 , β2 ) ≤ ρ+ (m, r)kβ1 − β2 k22 , 2 2 s ρ− (m, r)kβ1 − β2 k22 ≤ DL (β1 , β2 ) ≤ ρ+ (m, r)kβ1 − β2 k22 . Proof of Proposition B.3. We prove the second inequality. By the mean value theorem, there exists a γ ∈ [0, 1] such that βe = γβ1 +(1−γ)β2 ∈ e 0 ≤ m and B2 (r, β ∗ ), kβk  e (β1 − β2 ). ∇L(β1 ) − ∇L(β2 ), β1 − β2 = (β1 − β2 )T ∇2 L(β) By the definition of the localized sparse eigenvalue, we obtain the desired result. The other inequality can be proved similarly. We then present the proof for Lemma 5.1 below. Proof of Lemma 5.1. If we assume that, for all ` ≥ 1, the following two inequalities hold (B.5) |E` | = k ≤ 2s, where E` is defined in (5.1), and (B.6) (`−1) kλE c ` kmin ≥ λ/2 ≥ k∇L(β ∗ )k∞ + ε. Applying Lemma E.2 in the online supplement, we obtain the desired bound: kβe(`) − β ∗ k2 ≤ p  18 √ 12 (`−1) kλS k2 + k∇L(β ∗ )E` k2 + ε |E` | < λ s ≤ r. ρ∗ ρ∗ Therefore, it remains to show (B.5) and (B.6) hold for all ` ≥ 1. We prove these by induction. For ` = 1, λ ≥ λw(u) and thus E1 = S, which implies (B.5) and (B.6). Assume these two statements hold at ` − 1. Since j ∈ E` \S (`−1)  (`) implies j 6∈ S and λw |βej | = λj < λw(u) by definition, and since LOCAL ADAPTIVE MAJORIZE-MINIMIZATION 7 w(x) is non-increasing, we obtain that |βej`−1 | ≥ u. Therefore by induction hypothesis, we have (`−1) kβeE` \S k p √ kβe(`−1) − β ∗ k2 18λ √ |E` \ S| ≤ ≤ ≤ s ≤ s, u u ρ∗ u where the last inequality uses the definition of u in (5.1). The inequality above implies that |E` | ≤ 2s. For such E` , we have kλE`c kmin ≥ λw(u) ≥ λ/2 ≥ k∇L(β ∗ )k∞ + ε, which completes the induction step. This completes the proof.  Proof of Lemma 5.2. If |βj∗ − βej | ≥ u, then w |βej | ≤ 1 ≤ u−1 |βej −βj∗ |;   otherwise, w |βej | ≤ w |βj∗ | − u . Therefore,the following inequality always hold   e w |βej | ≤ w |βj∗ | − u + u−1 |βj∗ − β|. Applying the triangle inequality completes the proof. B.3. Statistical Theory under LRE Condition. In this section, we present the main theorem and its proof, with some technical lemmas postponed to later sections. We formally introduce the LRE condition below. √ Assumption B.1. There exist k ≤ 2s, γ and r & λ s such that 0 < κ∗ ≤ κ− (k, γ, r) ≤ κ+ (k, γ, r) ≤ κ∗ < ∞. B.3.1. Proofs of Main Theorems. We begin with a proposition, which establishes the relationship between localized restricted eigenvalue and the localized version of the restricted strong convexity/smoothness. The proof is similar to that of Proposition B.3, and thus is omitted. Proposition B.4. For any β1 , β2 ∈ C(k, γ, r) ∩ B2 (r/2, β ∗ ), we have 1 1 κ− (k, γ, r)kβ1 − β2 k22 ≤ DL (β1 , β2 ) ≤ κ+ (k, γ, r)kβ1 − β2 k22 , and 2 2 s κ− (k, γ, r)kβ1 − β2 k22 ≤ DL (β1 , β2 ) ≤ κ+ (k, γ, r)kβ1 − β2 k22 . Next, we bound the `2 error using the regularization parameter. The proof is similar to that of Lemma 5.1 and depends on Lemma B.7, where we introduce the localized analysis such that the localized restricted eigenvalue condition can be applied. 8 FAN ET AL. Lemma B.5. Suppose that Assumption 4.2 holds with u = 18λ/κ∗ , and Assumption B.1 holds with a k ≤ 2s, γ = 5. If λ, ε and r satisfy √ 4(k∇L(β ∗ )k∞ + ε) ≤ λ ≤ rκ∗ /(2 s), then |E` | ≤ 2s and any ε-optimal solution βe(`) (` ≥ 1) must satisfy p  √ (`−1) kβe(`) − β ∗ k2 ≤ κ−1 kλS k2 +k∇L(β ∗ )E` k2 +ε |E` | . λ s. ∗ Recall Lemma 5.2, which bounds the regularization parameter using the functional of the estimator from previous step. Combining these two lemmas together, we obtain the following main theorem. Theorem B.6 (Optimal Statistical Rate under Localized Restricted Eigenvalue Condition). Suppose the same conditions of Lemma B.5 hold, but with ε replaced by εc ∨ εt . Then, for ` ≥ 2 and some constant C, any εt -optimal solution must satisfy opt err βe(`) − β ∗ 2 z }| √{ . k∇L(β ∗ )S k2 + εt s + λkwS (|βS∗ | − u)k2 + | {z } | {z } oracel rate tightening effect coefficient effect z }| √{ δ `−1 λ s . Proof of Theorem B.6. Under the conditions of the theorem, Lemma B.5 directly implies |E` | ≤ 2s and (`−1) kλE c ` kmin ≥ k∇L(β ∗ )k∞ + ε, for all ` ≥ 1, where ε = εc ∨ εt . Using Lemma B.7 then obtains us that (B.7) (`−1) kβe(`) − β ∗ k2 ≤ κ−1 kλS ∗ k2 + k∇L(β ∗ )E` k2 + ε p  |E` | . To bound the first term in the inequality above, we apply Lemma 5.2 and obtain p  1 (B.8) k∇L(β ∗ )E` k2 + εt |E` | +λkwS (|βS∗ | − u)k2 kβe(`) −β ∗ k2 ≤ {z } κ∗ | I λ e(`−1) + kβ −β ∗ k2 . uκ∗ Following a similar argument in the proof of Theorem 4.2, the term I can be bounded by √ λ e(`−1) k∇L(β ∗ )S k2 + εt s + β − β∗ 4u 2 , LOCAL ADAPTIVE MAJORIZE-MINIMIZATION 9 s = local cone r contraction rate Fig 5. The localized analysis under localized restricted eigenvalue condition: an intermee? , is constructed such that kβ e? − β ∗ k2 = r if kβ e − β ∗ k2 > r, β e? = β, e diate solution, β else. Employing the localized eigenvalue condition, p this intermediate solution converges at √ the rate of λ s in the contraction stage and s/n in the tightening stage. Under mild e=β e? and thus has same convergence rate as the conditions, the approximate solution β intermediate solution. The shaded area is a local `1 -cone where the restricted eigenvalue condition holds. which, combining with (B.8), yields that √ kβe(`) −β ∗ k2 . k∇L(β ∗ )S k2 +εt s+λkwS (|βS∗ | − u)k2 +δ βe(`−1) −β ∗ , 2 where δ = 2λ/(uκ∗ ) ≤ 1/2. The proof is completed by applying the above inequality recursively. B.3.2. Localized Analysis. In this section, we carry out the localized analysis. A geometric explanation of the localized analysis is given in Figure 5. The following lemma shows that the approximate solution always falls in the neighborhood of β ∗ by a novel localized analysis and thus the localized restricted eigenvalue condition can be exploited. Recall the definitions of s (·, ·) and C(k, γ, r) in Section B.2. DL (·, ·), DL Lemma B.7. Suppose Assumption B.1 holds. Take E such that S ∩ E c = ∅ , |E| ≤ k ≤ 2s. Further assume that kλE c kmin ≥ k∇L(β ∗ )k∞ + ε and √ e 2κ−1 ∗ λ s ≤ r. Then any ε-optimal solution β must satisfy p  √ ∗ kβe − β ∗ k2 ≤ κ−1 kλ k + k∇L(β ) k + ε |E| . λ s. 2 2 S E ∗ 10 FAN ET AL. Proof of Lemma B.7. Let βe? = β ∗ + t(βe − β ∗ ), where t = 1, if kβe − t ∈ (0, 1) such that kβe∗ − β ∗ k2 = r, otherwise. By the definition know that kβe∗ − β ∗ k2 ≤ r. Using the `1 -cone lemma, we know β ∗ k2 ≤ r; of βe∗ , we that the approximate solution falls in the `1 -cone, i.e. k(βe − β ∗ )E k1 ≤ 5k(βe − β ∗ )E c k1 , (B.9) From the construction of βe∗ , we know βe∗ − β ∗ = t(βe − β ∗ ). Thus, we have k(βe∗ − β ∗ )E k1 ≤ 5k(βe∗ − β ∗ )E c k1 . Combining the inequality above with the assumption |E| ≤ k results that βe∗ falls in the local `1 -cone, i.e. βe∗ ∈ C(k, c0 , r). Then Proposition B.4 implies the localized restricted strong convexity, i.e. s e∗ κ− (k, 5, r)kβe∗ − β ∗ k22 ≤ DL (β , β ∗ ). (B.10) To bound the right hand side of the above inequality, we use Lemma F.2 in Appendix F: (B.11) s e∗ s e e − ∇L(β ∗ ), βe − β ∗ i. DL (β , β ◦ ) ≤ tDL (β, β ∗ ) = th∇L(β) It suffices to bound the right hand side of (B.11). Plugging (B.11) back into (B.10) and adding hλ ξ, βe − β ∗ i to both sides, we obtain (B.12) ∗ e κ− (k, 5, r)kβe∗ −β ∗ k2 +t h∇L(β ∗ ), β−β i+t hλ {z } | | I ∗ e ξ, β−β i {z } II ∗ e e ≤ t h∇L(β)+λ ξ, β−β i. | {z } III It remains to bound terms I, II and III respectively. For I, separating the support of ∇L(β ∗ ) and βe − β ∗ to E and E c and using the Hölder inequality, we obtain   I = ∇L(β ∗ ) E , βe − β ∗ )E + ∇L(β ∗ ) E c , (βe − β ∗ )E c   (B.13) ≥ − ∇L(β ∗ ) (βe − β ∗ )E − ∇L(β ∗ ) c (βe − β ∗ )E c . E 2 For II, separating the support of λ 2 E ∞ ξ and βe − β ∗ to S, E \ S and E c results ∗ ∗ e e ξ)S , (β−β )S i+h(λ ξ)E\S , (β−β )E\S i + h(λ ξ)E c , (βe − β ∗ )E c i. II = h(λ 1 LOCAL ADAPTIVE MAJORIZE-MINIMIZATION 11 To bound the last term in the above equality, note that E c ∩ S = ∅ and thus ξ)E c , (βe − β ∗ )E c i = hλE c , |βeE c |i = hλE c , |(βe − β ∗ )E c |i, h(λ which yields that ξ)S , (βe − β ∗ )S i + h(λ + hλE c , |(βe − β ∗ )E c |i ξ)E\S , (βe − β ∗ )E\S i II = h(λ ≥ −kλS k2 k(βe − β ∗ )S k2 + hλE c , |(βe − β ∗ )E c |i ≥ −kλS k2 k(βe − β ∗ )S k2 + kλE c kmin k(βe − β ∗ )E c k1 , (B.14) where the first inequality is due to the fact that h(λ ξ)E\S , (βe −β ∗ )E\S i = 0 and we use Hölder inequality in the last inequality. For III, we first write e + λ ξ. Using similar arguments, we obtain u = ∇L(β) e +λ h∇L(β) (B.15) ξ, βe − β ∗ i = huE , (βe − β ∗ )E i + huE c , (βe − β ∗ )E c i ≤ kuE k2 k(βe − β ∗ )E k2 + kuE c k∞ k(βe − β ∗ )E c k1 . e 1, Plugging (B.13), (B.14), (B.15) into (B.12) and taking inf over ξ ∈ ∂kβk we obtain ∗ c e κ− (k, 5, r)kβe∗ −β ∗ k2 +t(kλE c kmin −k∇L(β ∗ )k∞ )k(β−β )E k1 ∗ e −t(k∇L(β ∗ )k2 +kλE k2 )k(β−β )E k2 ≤t inf e 1 ξ∈∂kβk p kuE k2 k(βe − β ∗ )E k2 + t inf e 1 ξ∈∂kβk kuE c k∞ k(βe − β ∗ )E c k1 |E| × tk(βe − β ∗ )E k2 + ε × tk(βe − β ∗ )E c k1 , p p where we use the fact inf ξ∈∂kβk |E|kuE k∞ ≤ ε |E| in e 1 kuE k2 ≤ inf ξ∈∂kβk e 1 the last inequality. After some algebra, we obtain ≤ε κ− (k, 5, r)kβe∗ − β ∗ k22 + t(kλE c kmin − (k∇L(β ∗ )k∞ + ε))k(βe − β ∗ )E c k1 p ≤ (kλS k2 + k∇L(β ∗ )E k2 + ε |E|) × tk(βe − β ∗ )E k2 . Using the assumption that kλE c kmin ≥ k∇L(β ∗ )k∞ +ε, the inequality above can be simplified to p κ− (k, 5, r)kβe∗ − β ∗ k22 ≤ (kλS k2 + k∇L(β ∗ )E k2 + ε |E|) (B.16) | {z } (i) × tk(βe − β ∗ )E k2 . | {z } (ii) 12 FAN ET AL. For (i), using the fact that kλS k2 ≤ kλS k∞ (i) ≤ λ p √ |S| ≤ λ s, we have p p √ 1 √ |S| + (k∇L(β ∗ )E k∞ + ε) |E| ≤ λ s + λ k, 4 where, in the first inequality, we have used k∇L(β ∗ )E k2 + ε p p 1 p |E| ≤ (k∇L(β ∗ )E k∞ + ε) |E| ≤ λ |E|. 4 For (ii), we have tk(βe − β ∗ )E k2 = k(βe∗ − β ∗ )E k2 . Plugging the bounds for √ (i) and (ii) into (B.16) and using the assumption 2κ−1 ∗ λ s ≤ r, we obtain √ 2/2 √ 1 + ∗ ∗ λ s < r, kβe − β k2 ≤ κ∗ which is a contraction with the construction of βe∗ . This indicates that βe∗ = e Therefore, the desired bound hold for β. e β. APPENDIX C: COMPUTATIONAL THEORY In this section, we collect proofs for Proposition 4.5, Proposition 4.6 and Theorem 4.7. We then give the proofs for Lemma 5.3, Lemma 5.4 and Lemma 5.5. The proofs of technical lemmas are postponed to later sections. We denote the quadratic coefficient φ by φc in the contraction stage, and by φt in the tightening stage. C.1. Proofs of Main Results. We start with the contraction stage and give the proof of Proposition 4.5, followed by that of Proposition 4.6. Proof of Proposition 4.5. We omit the super script ` in β (`,k) , 1 in βb(1) , and 0 in λ(0) for simplicity. Applying Lemma E.5 results that   ωλ β (k+1) ≤ φc + ρc β (k+1) − β (k) 2 . (C.1) On the other hand, taking β = β (k) in Lemma E.4, we obtain   φc (k+1) β − β (k) F β (k) , λ(0) − F β (k+1) , λ(0) ≥ 2 2 . 2 Plugging the inequality back into (C.1), we obtain a bound for the suboptimality measure (C.2) ωλ (β (k+1) ) ≤ φc + ρc n 2 h  io1/2 F β (k) , λ − F β (k+1) , λ . φc LOCAL ADAPTIVE MAJORIZE-MINIMIZATION 13 Since {F (β (k) , λ(0) )}∞ k=0 is a monotone decreasing sequence, we have (C.3) F (βb(1) , λ) ≤ . . . ≤ F (β (k) , λ) ≤ . . . ≤ F (β (0) , λ). Plugging (C.3) back into (C.2) and using Lemma 5.3, we obtain n2 o1/2 φ +ρ c c b b λ)] ≤ √ kβk (C.4) ωλ (β (k+1) ) ≤ (φc +ρc ) [F (β (k) , λ)−F (β, 2, φc k where we have the used the fact that βe(0) = 0. To further simplify the above bound, we observe that φc ≤ γu ρc . Using triangle inequality, we have  (1+γu )ρc  (1+γu )ρc ∗ b √ √ ωλ β (k+1) ≤ βb 2 ≤ kβ ∗ k2 +kβ−β k2 . k k ∗ k ≤ 18λ√s. Plugging b Taking ` = 1 and ε = 0 in Lemma 5.1, we have kβ−β 2 this back into (C.4) yields that √ (1 + γu )Rρc (1 + γu )ρc  ∗ √ √ kβ k2 + 18λ s ≤ , k 2 k √ √ where R = 2(kβ ∗ k2 + 18λ s) . kβ ∗ k2 + λ s. Therefore, in the contraction stage, to ensure that ωλ(0) (β (k+1) ) ≤ ε, it suffices to make k satisfies that  (1 + γ )Rρ 2 (1 + γu )Rρc u c √ ≤ εc , which implies k ≥ . ε 2 k c ωλ (β (k+1) ) ≤ Proof of Proposition 4.6. Write εt as ε and assume ` ≥ 2. Apply Lemma E.8 in the supplement, we obtain  ωλ(`−1) (β (`,k+1) ) ≤ ρ+ (2s + 2e s, r) + φt kβ (`,k+1) − β (`,k) k2 , which, combining with Lemma E.9, yields r 2 (`,k+1) ) ≤ (φt + ρ+ ) ωλ(`−1) (β (F (β (`,k) , λ(`−1) ) − F (β (`,k+1) , λ(`−1) )) φt q ≤ (1 + κ) 2γu ρ+ (F (β (`,k) , λ(`−1) ) − F (β (`,k+1) , λ(`−1) )), where we use ρ− ≤ φt ≤ γu φt in the last inequality. Since the sequence {F (β (`,k) ; λ(`−1) )}∞ k=0 decrease monotonically, we obtain q ωλ(`−1) (β (`,k+1) ) ≤ (1+κ) 2γu ρ+ (F (β (`,k) , λ(`−1) )−F (βb(`) , λ(`−1) )) s  1 k ≤ (1+κ) 2γu ρ+ 1− (F (β (`,k) , λ(`−1) )−F (βb(`) , λ(`−1) )) 4γu κ s  1 k 2 ≤ (1 + κ) Cγu ρ+ 1 − λ s, 4γu κ 14 FAN ET AL. where the second inequality is due to Lemma 5.5, and the last one due to Lemma E.14. Here C is some positive constant. Therefore, for ` ≥ 2, to ensure that β (`,k+1) satisfies ωλ(`−1) (β (`,k+1) ) ≤ ε, it suffices to choose k such that s  1 k 2 (1 + κ) Cγu ρ+ 1 − λ s ≤ ε. 4γu κ Equivalently, we obtain 0  k ≥ C log C 00 λ √  s , ε √ where C 0 = 2/ log(4γu κ/{4γu κ − 1)}, C 00 = 2(1 + κ) Cγu ρ+ . C.2. Key Lemmas. In this section, we give the proofs of the key lemmas in Section 5.2. We start with the proof of Lemma 5.3, followed by the proofs of Lemma 5.4 and Lemma 5.5. Proof of Lemma 5.3. For simplicity, we omit the super-script ` in (`, k) and denote β (`,k) , λ(0) as β (k) and λ respectively. Taking β = βb in Lemma E.4 and simplifying the inequality, we have n o b λ) − F (β (j) , λ) ≥ φc kβ (j) − β (j−1) k2 − 2hβ − β (j−1) , β (j) − β (j−1) i F (β, 2 2 n o φc b (C.5) = kβ − β (j) k22 − kβb − β (j−1) k22 . 2 Multiplying both sides of (C.5) by 2/φc and summing over j results k n k o o X 2 Xn b b 2 −kβ (j−1) − βk b 2 , kβ (j) − βk F (β, λ)−F (β (j) , λ) ≥ 2 2 φc j=1 j=1 or equivalently (C.6)   k X 2 b λ) − b 2 − kβ (0) − βk b 2. kF (β, F (β (j) , λ) ≥ kβ (k) − βk 2 2 φc j=1 On the other hand, taking β = β (k−1) in Lemma E.4 and replacing k with j yields F (β (j−1) , λ) − F (β (j) , λ) ≥ φc (j) kβ − β (j−1) k22 . 2 15 LOCAL ADAPTIVE MAJORIZE-MINIMIZATION Multiplying both sides of the inequality above by j − 1 and summing over j, we obtain k o 2 Xn (j −1)F (β (j−1) , λ)−jF (β (j) , λ)+F (β (j) , λ) φc j=1 ≥ k X j=1 (j −1)kβ (j) −β (j−1) k22 , or equivalently, (C.7) k k o X X 2n − kF (β (k) , λ) + F (β (j) , λ) ≥ (j − 1)kβ (j) − β (j−1) k22 . φc j=1 j=1 Adding (C.6) and (C.7) together and canceling the term 2/φc we obtain that Pk j=1 F (β (j) , λ), k o X 2k n b b 2 + (j −1)kβ (j) −β (j−1) k2 −kβ (0) − βk b 2, F (β, λ)−F (β (k) , λ) ≥ kβ (k) − βk 2 2 2 φc j=1 which, multiply both sides by −1, yields that 2k  b λ) ≤ kβ (0) − βk b 2. F (β (k) , λ) − F (β, 2 φc Therefore, the proof is completed. Proof of Lemma 5.4. For simplicity, we omit the super-script in βe(1) . e j | = λ . Then we must have {j : βej 6= Define the active set Sn as j : |∇L(β) 0} ⊆ Sn . It suffices to show |Sn | ≤ s + se. To achieve this goal, we decompose Sn into two parts and bound the size of them separately. Specifically, let  ∗ e Sn ⊆ S ∪ j ∈ / S c : |(∇L(β)−∇L(β ))j | ≥ λ/2} ∪ {j ∈ / S c : |∇L(β ∗ )j | > λ/2 . | {z } | {z } 1 Sn 2 Sn For Sn2 , the assumption that k∇L(β ∗ )k∞ + ε ≤ λ/4, implies Sn2 = ∅ and thus |Sn2 | = 0. For Sn1 , consider S 0 with maximum size s0 = |S 0 | ≤ se such that S 0 ⊆ Sn1 . Then there exists a d-dimensional sign vector u satisfying kuk∞ = 1 and kuk0 = s0 , such that  e − ∇L(β ∗ ) . λs0 /2 ≤ uT ∇L(β) 16 FAN ET AL. Then, by the Mean Value theorem, there exist some γ ∈ [0, 1] such that  e − ∇L(β ∗ ) = ∇L2 γ βe + (1 − γ)β ∗ (βe − β ∗ ) ≡ H(βe − β ∗ ). ∇L(β)  Here H = ∇L2 γ βe + (1 − γ)β ∗ . Writing uT H(βe − β ∗ ) as H1/2 u, H1/2 (βe − β ∗ ) and applying the Cauchy-Schwartz inequality, we have (C.8) λs0 /2 ≤ H1/2 u, H1/2 (βe − β ∗ ) ≤ kH1/2 uk2 kH1/2 (βe − β ∗ )k2 . {z } | {z } | I II e β ∗ ∈ B2 (r, β ∗ ), any conNow we bound terms I and II respectively. Since β, ∗ ∗ e β also falls in B2 (r, β ).The localized sparse eigenvex combination of β, value condition be used on H.For I, it follows from Definition 4.1 that p p p √ kH1/2 uk2 ≤ ρ+ (s0 , r)kuk2 ≤ ρ+ (s0 , r){kuk1 kuk∞ }1/2 ≤ ρ+ (s0 , r) s0 . −1/2 For II, write C = ρ∗ . It follows from Lemma E.6 in the supplement that the following inequality holds e − ∇L(β ∗ ), βe − β ∗ ≤ Cλ2 s. kH1/2 (βe − β ∗ )k22 = ∇L(β) Thus by plugging the bounds for I and II back into (C.8), we obtain p √ √ λs0 /2 ≤ ρ+ (s0 , r) s0 × Cλ s. Multiplying both sides of the above inequality by (λ/2)1/2 and taking squares results (C.9) s0 ≤ 4Cρ+ (s0 , r)s ≤ 4Cρ+ (e s, r)s < se. where the last inequality is due to the assumption. Because s0 = |S 0 | achieves the maximum possible value such that s0 ≤ se for any subset S 0 of Sn1 and (C.9) shows that s0 < se, we must have S 0 = Sn1 , and thus |Sn1 | = s0 ≤ b4Cρ+ (e s, r)sc < se. This proves the desired result. Proof of Lemma 5.5. For notational simplicity, we omit the tightening step index ` in β (`,k) , λ(`) , E`c ; and write β (`,k) , λ(`) , E`c as β (k) , λ and E`c respectively. Define β(α) = αβb +(1−α)β (k−1) . Since F (β (k) , λ) is majorized at Ψ(β (k) , β (k−1) ), we have n o φt F (β (k) , λ) ≤ min L(β (k−1) )+h∇L, β−β (k−1) i+ kβ−β (k−1) k22 +kλ βk1 2 β(α) n o φt ≤ min F (β, λ) + kβ − β (k−1) k22 , 2 β(α) LOCAL ADAPTIVE MAJORIZE-MINIMIZATION 17 where we restrict β on the line segment αβb + (1 − α)β (k−1) in the first inequality and the last inequality  follows from the convexity of L(β). Let βb(`) be a solution to argminβ∈Rd L(β)+kλ(`−1) βk1 . Using the convexity of F (β, λ), we obtain that o n φt F (β (k) , λ) ≤ min F (β, λ) + kβ − β (k−1) k22 2 β(α) o n 2 b 2 b λ) + (1 − α)F (β (k−1) , λ) + α φt kβ (k−1) − βk ≤ min αF (β, 2 α 2 n o 2   b λ) + α φt kβ (k−1) − βk b 2 . ≤ min F (β (k−1) , λ)−α F (β (k−1) , λ)−F (β, 2 α 2 Next, we bound the last term in the inequality above. Applying Lemma E.14 in the supplementary material, we obtain √ k(β (k−1) )E c k0 ≤ se, kβ (k−1) − β ∗ k2 ≤ C 0 λ s ≤ r, kβb − β ∗ k2 ≤ r, and kβbE k0 ≤ se. b 1 . Using the convexity of L(·) and the Recall ξb is some subgradient of kβk b λ) can be bounded in the following way `1 -norm, F (β (k−1) , λ)−F (β,  b λ) ≥ ∇L(β)+λ b b β (k−1) − βb +DL β (k−1) , βb F (β (k−1) , λ)−F (β, ξ, ρ− b 2, ≥ kβ (k−1) − βk 2 2 where the last inequality is due to the first order optimality condition and Proposition B.3. Thus we conclude that n   b λ) F (β (k) , λ) ≤ min F (β (k−1) , λ)−α F (β (k−1) , λ)−F (β, o α 2 φt  b λ) + F (β (k−1) , λ)−F (β, ρ−  ρ−  b λ) . ≤ F (β (k−1) , λ) − F (β (k−1) , λ) − F (β, 4φt which, combining with the fact φt ≤ γu ρ+ , yields F β (k)   b , λ − F β, λ ≤ 1 −  in which κ = ρ+ /ρ− . o 1 k n e(0) b F (β , λ) − F (β, λ) , 4γu κ 18 FAN ET AL. APPENDIX D: AN APPLICATION TO ROBUST LINEAR REGRESSION In this section, we give an application of Theorem 4.2 to robust linear regression. The Huber loss, defined in Section A, is used to robustify the heavy tailed error. We allow the cutoff parameter α to scale with (n, d, s) for bias-robustness tradeoff. Let yi = x> i β + i , 1 ≤ i ≤ n, be independently and identically distributed random variables, with mean µ = x> i β and finite second moment M . Then, the following corollary suggests that, under only finite second moments, the sparse Huber estimator with an adaptive α can perform as good as the sparse ordinary least square estimator as if subGaussian errors were assumed. Corollary D.1. Suppose the same conditions in Theorem 4.2 hold. Assume √ the columns of X are normalized such that maxj kX∗j k2 ≤ n. Assume therepexists an α > 0 such that kβS∗ kmin ≥ u + γλ and w(γλ) = 0. If α ∝ p λ ∝ n−1 log d, εt ≤ 1/n and T & log log d, then with probability at least 1−2d−η1 −2 exp(−η2 s), βe(T ) must satisfy p kβe(T ) − β ∗ k2 . s/n, where η1 and η2 are positive constants. Proof of Corollary D.1. The proof follows from that of Corollary 4.3 by bounding k∇L(β ∗ )S k∞ and the probability of the event k∇L(β ∗ )k∞ & λ . The derivative ∇L(β ∗ ) can be written as n 1X 1 ∇L(β ) = ∇`α (i )xi = XT α , n n ∗ i=1 where α = (1,α , . . . , n,α )T . Therefore, it suffices to show that α has subGaussian tail. Let ψ(αx) = 2−1 α∇`α (x). Then ψ(x) satisfies that − log(1 − x + x2 ) ≤ ψ(x) ≤ log(1 + x + x2 ), which yields that     E exp{ψ(α)} ≤ 1 + α2 M and E exp{−ψ(α)} ≤ 1 + α2 M. Using Markov inequality, we obtain,    E exp{ψ(α)} 2 P ψ(α) ≥ M t ≤ ≤ (1 + α2 M ) exp{−M t2 }, exp(M t2 ) LOCAL ADAPTIVE MAJORIZE-MINIMIZATION 19 or equivalently   E exp{ψ(α)} ≤ (1 + α2 M ) exp{−M t2 }. P ∇`α () ≥ 2M t /α ≤ exp(M t2 ) 2  Taking α = t/2, we obtain   E exp{ψ(t/2)} P ∇`α () ≥ M t ≤ ≤ (1 + M t2 /4) exp{−M t2 } exp(M t2 )  ≤ exp − M t2 /2 ,  where the last inequality follows from the fact that 1+M t2 /4 ≤ exp{M t2 /2}. The rest of the proof follows from that of Corollary 4.3. APPENDIX E: TECHNICAL LEMMAS E.1. Statistical Theory. We collect the technical lemmas that are used to prove Theorem 4.2. We start by defining the following localized sparse relative covariance. Definition E.1 (Localized Sparse Relative Covariance). The localized sparse relative covariance with parameter r is defined as  T 2  vI ∇ L(β)uJ /kuJ k2 ∗ π(i, j; β , r) = sup : I ∩ J = ∅, |I| ≤ i, |J| ≤ j . T 2 v,u,kβ−β ∗ k2 ≤r vI ∇ L(β)vI /kvI k2 This is different from restricted correlation defined in [4]. We measure the relative covariance between set I and set J with respect to that of set I. In the sequel, we omit the arguments β ∗ , r in π(i, j; β ∗ , r) for simplicity. Our next result bounds the localized sparse relative covariance in terms of sparse eigenvalues. Lemma E.1. It holds that 1 π(i, j; β , r) ≤ 2 ∗ s ρ+ (j, r) − 1. ρ− (i + j, r) Then we are ready to bound the estimation error by functionals of the regularization parameter under localized sparse eigenvalue condition, which is proved in the following lemma. Lemma E.2. Take E such that S ⊆ E and |E| = k ≤ 2s. Let J be the index set of the largest m coefficients (in absolute value) in E c . Assume Assumption 20 FAN ET AL. ∗ 4.1 holds, ≤ λ/4, kλE c kmin ≥ λ/2 and rρ− (k + m, r) > p k∇L(β p )k∞ + ε √ 2(1+5 k/m)( k/s/4+1)λ s. Then any ε-optimal solution βe must satisfy p  √ √ 2 1 + 5 k/m ∗ e kβ − β k2 ≤ (kλS k2 + k∇L(β ∗ )E k2 + kε) . λ s. ρ− (k + m, r) We now present the proofs for the two lemmas above by starting with proof of Lemma E.1. Proof of Lemma E.1. For simplicity, we omit the arguments β ∗ , r in π(i, j; β ∗ , r), ρ+ (i, , r), and ρ− (i, r). Let I = E ∪ J and L = I ∪ J. For any α ∈ R, let w = vI + αuJ . Without loss of generality, we assume that kuJ k2 = 1, kvI k2 = 1 and β ∈ B2 (r, β ∗ ). Using the definition of π(i, j) and w, we have ρ− (i + j)kwk22 ≤ vIT ∇2 L(β)vI +2α vI ∇2 L(β)uJ +α2 uJ ∇2 L(β)uJ , | {z } {z } | {z } | c1 b c2 which simplifies to (E.1) (c2 − ρ− (i + j))α2 + 2bα + (c1 − ρ− (i + j)) ≥ 0. Since the left hand side of (E.1) is positive semidefinite for all α, we must have (c2 − ρ− (i + j))(c1 − ρ− (i + j)) ≥ b2 . Multiplying by 4/c21 on both sides of the inequality above, we obtain 4b2 ≤ 4c−1 1 (1 − ρ− (i + j)/c1 )(c2 − ρ− (i + j)) c21 c2 − ρ− (i + j) ≤ 4c−1 1 ρ− (i + j)(1 − ρ− (i + j)/c1 ) × ρ− (i + j) c2 − ρ− (i + j) ρ+ (j) ≤ ≤ − 1, ρ− (i + j) ρ− (i + j) where ,in the last second inequality, we use 4c−1 1 ρ− (i + j)(1 − ρ− (i + j)/c1 ) ≤ 2 1; and the last inequality is due to c2 = uJ ∇ L(β)uJ ≤ ρ+ (j). This yields s vIT ∇2 L(β)uJ /kuJ k2 |vIT ∇2 L(β)uJ | 1 ρ+ (j) ≤ ≤ − 1. T T 2 ρ− (i + j) vI ∇L(β)vI /kvI k2 vI ∇L(β)vI The proof is completed by taking sup of the left hand side with respect to β, u, v. LOCAL ADAPTIVE MAJORIZE-MINIMIZATION 21 Proof of Lemma E.2. For simplicity, we write ∇2 L(β) as ∇2 L, whenever we have β ∈ B2 (r, β ∗ ) ≡ {β : kβ − β ∗ k2 ≤ r}. Since we do not know whether βe belongs to Br2 (β ∗ ) in advance. we need to construct an intermediate estimator βe∗ such that kβe∗ − β ∗ k2 ≤ r. Let βe? = β ∗ + t(βe − β ∗ ) where t = 1 if kβe − β ∗ k ≤ r; t ∈ (0, 1) such that kβe∗ − β ∗ k2 = r otherwise. Using the Cauchy Schwartz inequality, we obtain (E.2) k(βe − β ∗ )I c k2 ≤ (k(βe − β ∗ )I c k1 k(βe − β ∗ )I c k∞ )1/2 . | {z }| {z } I II We bound I and II respectively . For I, since I c ⊆ E c , we apply Lemma F.1 and obtain (E.3) k(βe − β ∗ )I c k1 ≤ k(βe − β ∗ )E c k1 ≤ 5k(βe − β ∗ )E k1 . For II, note that I = E ∪ J and using the definition of J, we obtain (E.4) 5 k(βe − β ∗ )I c k∞ ≤ k(βe − β ∗ )E c k1 /m ≤ k(βe − β ∗ )E k1 . m Plugging (E.3) and (E.4) into (E.2) results r r 1 e k e ∗ c ∗ e k(β − β )I k2 ≤ 5 k(β − β )E k1 ≤ 5 k(β − β ∗ )I k2 . m m Using triangle inequality along with the result above yields p kβe − β ∗ k2 ≤ k(βe − β ∗ )I k2 + k(βe − β ∗ )I c k2 ≤ (1 + c0 k/m)k(βe − β ∗ )I k2 . Since βe∗ − β ∗ = t(βe − β ∗ ), we have (E.5) kβe∗ − β ∗ k2 = tkβe − β ∗ k2 ≤ (1 + 5 p k/m)k(βe∗ − β ∗ )I k2 . Thus to bound kβe∗ − β ∗ k2 , it suffices to bound k(βe∗ − β ∗ )I k2 . s (β, e β ∗ ): Bounding k(βe∗ − β ∗ )I k2 by DL For notational simplicity, we write u = βe∗ − β ∗ sometimes. Let u = (u1 , u2 , . . . , up )T . Without loss of generality, we assume the first k elements of β ∗ contains the true support S. When j > k, uj is arranged such that |uk+1 | ≥ |uk+2 | · · · ≥ |up |. Let J0 = E = {1, . . . , k}, and Ji = {k +(i−1)m+ 1, . . . , k +im}, for i = 1, 2, . . . , with the size of last block smaller or equal than m. In this manner, we have J1 = J and I = J0 ∪ J1 . Moreover, we 22 FAN ET AL. √ √ have P kuJi k2 ≤ kuJi k∞ √m ≤ kuJi−1 k1 / m when i > 1, which implies that i>1 kuJi k2 ≤ kuE c k1 / m. Now if (E.6) 1 − 2π(|I|, m)m−1/2 kuE c k1 ≥ 0, kuI k2 2 separating the support of u into I, I c and using uT I c ∇ L(β)uI c ≥ 0, we obtain X 2 2 uT ∇2 L(β)u ≥ uT ∇ L(β)u + 2 uT I I I ∇ L(β)uJi i>1  X kuJ k2  T 2 i ≥ uI ∇ L(β)uI 1−2π(|I|, m) kuI k2 i>1 r   1 kuE c k1 ≥ ρ− (|I|) 1−2π(|I|, m) kuI k22 , m kuI k2 where we use the definition of π(|I|, √ m) and ∗ρ− (|I|) in the last two inequali∗ e ties. Notice that k(β − β )E k1 ≤ kk(βe − β )E k2 and applying Lemma F.1, we obtain √ ∗ c ∗ e e k(βe∗ −β ∗ )E c k1 = tk(β−β )E k1 ≤ 5 × tk(β−β )E k1 ≤ 5 k × k(βe∗ −β ∗ )E k2 . Further note that E ⊆ I, we obtain r r 1 k(βe∗ − β ∗ )E c k1 k 1 − 2π(k + m, m) ≥ 1 − 10π(k + m, m) × . m k(βe∗ − β ∗ )I k2 m  1/2 Using π(k + m, m) ≤ 2−1 ρ+ (m) ρ− (k + 2m) − 1 and Assumption 4.1 with c = 100 results r s e∗ − β ∗ )E c k1 k( β k ρ+ (m) 1 − 2π(k + m, m)m−1 ≥1−5 − 1 ≥ 1/2 m ρ− (k + 2m) k(βe∗ − β ∗ )I k2   Therefore for any β ∈ B2 (r, β ∗ ), we have that (βe∗ − β ∗ )T ∇2 L(β) (βe∗ − β ∗ ) ≥ 1/2ρ− (k + m)k(βe∗ − β ∗ )I k22 . By the Mean Value theorem, there exists a γ ∈ [0, 1] such that   ∇L(βe∗ )−∇L(β ∗ ), βe∗ −β ∗ = (βe∗ −β ∗ )T ∇2 L(γβ ∗ +(1−γ)βe∗ ) (βe∗ −β ∗ ) ≥ 2−1 ρ− (k + m)k(βe∗ − β ∗ )I k2 . 2 s (β e∗ , β ∗ ) in the following. We further bound the left hand side DL 23 LOCAL ADAPTIVE MAJORIZE-MINIMIZATION s (β e∗ , β ∗ ): Bounding DL e + λ ξ, where ξ ∈ ∂kβk e 1 . Then by Lemma F.2 and the Define u = ∇L(β) s ∗ e definition of DL (β, β ), we obtain (E.7) s e∗ s e e − ∇L(β ∗ ), βe − β ∗ i DL (β , β ∗ ) ≤ tDL (β, β ∗ ) = th∇L(β) Adding and subtracting the term thλ ξ, βe − β ∗ i, we have e − ∇L(β ∗ ), βe − β ∗ i = th∇L(β) e +λ th∇L(β) ξ, βe − β ∗ i − th∇L(β ∗ ), βe − β ∗ i − thλ ξ, βe − β ∗ i. Using a similar argument in the proof of Lemma B.7, we obtain p  s e∗ DL (β , β ∗ ) ≤ kλS k2 + k∇L(β ∗ )E k2 + ε |E| k(βe∗ − β ∗ )I k2 . Bounding kβe∗ − β ∗ k2 and kβe − β ∗ k2 : s (β e∗ , β ∗ ), we have Combing the upper and lower bound for DL k(βe∗ − β ∗ )I k2 ≤ p  2 kλS k2 + k∇L(β ∗ )E k2 + ε |E| . ρ− (k + m, r) Plugging the above bound into (E.5) yields p  √ 2 1 + 5 k/m ∗ ∗ kβe − β k2 ≤ (kλS k2 + k∇L(β ∗ )E k2 + kε) < r. ρ− (k + m, r) If t 6= 1, by the construction of βe∗ , we must have kβe∗ − β ∗ k2 = r, which e contradicts our the above inequality. Thus t must be 1, which implies βe∗ = β. This completes the proof. E.2. Computational Theory. In this section, we prove technical lemmas used in Appendix C. E.2.1. Contraction Stage. We start with a lemma that characterizes the locality of the solution sequence. It also provides the lower and upper bounds of φc , which will be exploited in our final localized iteration complexity analysis. Lemma E.3. Under Assumption 4.3 and the same conditions of Theorem 4.2, we have kβ (1,k) − β ∗ k2 ≤ R/2 and φ0 ≤ φc ≤ γu ρc . 24 FAN ET AL. The next two lemmas are critical for the analysis of computational complexity in the contraction stage. Lemma E.4. Recall that F (β, λ) = L(β) + kλ βk1 . We have F (β; λ(0) )−F (β (1,k) ; λ(0) ) ≥ 2−1 φc kβ (1,k) −β (1,k−1) k22 −φc hβ−β (1,k−1) , β (1,k) −β (1,k−1) i. Our next lemma describes the relationship between suboptimality measure ωλ (β (1,k) ) and kβ (1,k) − β (1,k−1) k, which is critical to establish the iteration complexity of the contraction stage. Lemma E.5. ωλ (β (1,k) ) ≤ (φc + ρc )kβ (1,k) − β (1,k−1) k2 . Proof of Lemma E.3. We first prove the second statement. If we assume for ∀ k ≥ 1, it holds that kβ (k−1) − β ∗ k2 ≤ R/2. (E.8) Then for any β such that kβ − β ∗ k2 ≤ R/2, we have kβ (k−1) − βk2 ≤ kβ (k−1) − β ∗ k2 + kβ ∗ − βk2 ≤ R, by triangle inequality. Let v = β − β (k−1) . Using taylor expansion, we have ∇L(β) = ∇L(β (k−1) ) + h∇L(β (k−1) ), vi Z 1 + h∇L(β (k−1) + tv) − ∇L(β (k−1) ), vidt. 0 Applying Cauchy-Schwartz inequality and using Assumption 4.3, we obtain Z 1 (k−1) (k−1) ∇L(β) ≤ ∇L(β )+h∇L(β ), vi+ ρc tkvk22 dt 0 ≤ ∇L(β (k−1) ) + ∇L(β (k−1) ), β − β (k−1) + ρc kβ − β (k−1) k22 . 2 The iterative LAMM algorithm implies that φ0 ≤ φc ≤ (1+γu )ρc . Otherwise, if φc > (1 + γu )ρc > ρc , then φ0c ≡ φc /γu = γu−1 (1 + γu )ρc is the quadratic parameter in the previous LAMM iteration. Let Ψ0 (β; β (1,k−1) ) t be the corresponding local quadratic approximation. Then for any β ∈ B2 (R/2, β ∗ ), it holds that Ψ0 (β; β (1,k−1) ) = L(β (1,k−1) )+h∇L(β (1,k−1) ), β − β (1,k−1) i + φ0c kβ−β (1,k−1) k+kλ(0) βk1 ≥ F (β, λ(0) ). 2 LOCAL ADAPTIVE MAJORIZE-MINIMIZATION 25 However by the stopping rule of the I-LAMM algorithm, we must have Ψ0 (β; β (1,k−1) ) < F (β, λ(0) ). This contradiction shows that φc ≤ (1 + γu )ρc , and φ0 < φc can be ensured by taking φ0 small enough. Therefore, it remains to show (E.8) holds by induction. For k = 1, it obviously holds. Now suppose that kβ (k−1) − β ∗ k2 ≤ R/2. Taking β = βb in Lemma E.4, we obtain n o b λ) − F (β (j−1) , λ) ≥ φc kβb − β (j−1) k2 − kβb − β (0) k2 , 0 ≥ F (β, 2 2 2 which implies b 2 ≤ kβ (j−1) − βk b 2. kβ (j) − βk (E.9) Taking j = 1, . . . , k, repeating (E.9) yields that b 2 ≤ kβ (k−1) − βk b 2 ≤ . . . ≤ kβ (0) − βk b 2 ≤ kβ (0) − βk b 2. kβ (k) − βk Therefore, applying Lemma 5.1, we obtain √ kβ (k) − β ∗ k2 ≤ kβ (0) − β ∗ k2 + 2kβb − β ∗ k2 ≤ kβ (0) − β ∗ k2 + 18ρ∗ λ s ≤ R/2. This completes the induction step and thus finishes the proof. We now give the proofs of Lemma E.4 and E.5. Proof of Lemma E.4. We omit the subscript in Ψλ(`−1) ,φc (β, β (`,k) ), the super-script ` in (`, k) and denote β (`,k) as β (k) , where ` = 1. Lemma E.3 makes us able to use the localized Lipschitz condition. First, we have (E.10) F (β, λ(0) ) − F (β (k) , λ(0) ) ≥ F (β, λ(0) ) − Ψ(β (k) , β (k−1) ). The convexity of both L(β) and kλ (E.11) (E.12) kλ(0) βk1 implies L(β) ≥ L(β (k−1) ) + ∇L(β (k−1) ), β − β (k−1) ; βk1 ≥ kλ(0) β (k) k1 + λ(0) ξ (k) , β − β (k) . Adding (E.11) and (E.12) together, we obtain (E.13) F (β, λ(0) ) ≥ L(β (k−1) )+ ∇L(β (k−1) ), β−β (k−1) +kλ(0) β (k) k1 +hλ(0) ξ (k) , β−β (k) i. 26 FAN ET AL. On the other side, Ψ(β (k) , β (k−1) ) can be written as L(β (k−1) )+ ∇L(β (k−1) ), β (k) −β (k−1) φc + kβ (k) −β (k−1) k22 +kλ(0) β (k) k1 . 2 (E.14) Plugging (E.13) and (E.14) back into (E.10), we obtain (E.15) F (β, λ(0) )−F (β (k) , λ(0) ) = − φc (k) kβ −β (k−1) k22 2 +h∇L(β (k−1) )+λ(0) ξ (k) , β−β (k) i. By the first order optimality condition, there exists some ξ (k) such that ∇L(β (k−1) ) + φc (β (k) − β (k−1) ) + λ(0) ξ (k) = 0. Plugging the equality above to (E.15), we complete the proof. Lemma E.5 bounds the suboptimality measure ωλ (β (1,k) ) by kβ (1,k) −β (1,k−1) k2 , which is critical to establish the iteration complexity of the contraction stage. Proof of Lemma E.5. We omit the super script 1 in β (1,k) for simplicity. Since β (k) is the exact solution to the kth iteration at ` = 1, the first order optimality condition holds: there exists a ξ (k) ∈ ∂kβ (k) k1 such that ∇L(β (k−1) ) + φc (β (k) − β (k−1) ) + λ ξ (k) = 0. Then for any u such that kuk1 = 1, we have h∇L(β (k) )+λ ξ (k) , ui = ∇L(β (k) ), ui−h∇L(β (k−1) )+φc (β (k) −β (k−1) ), u = ∇L(β (k) )−∇L(β (k−1) ), u − φc (β (k) −β (k−1) ), ui ≤ k∇L(β (k) )−∇L(β (k−1) )k∞ +φc kβ (k) −β (k−1) k∞ ≤ (φc +ρc )kβ (k) −β (k−1) k2 , where the last inequality is due the the localized Lipchitz continuity, since kβ (k) − β ∗ k2 ≤ R/2, ∀ k ≥ 1 by Lemma E.3 in the supplement. The proof is completed by taking sup over kuk1 ≤ 1 in the inequality above. We then prove a technical lemma that is critical for the proof of Lemma 5.4. LOCAL ADAPTIVE MAJORIZE-MINIMIZATION 27 Lemma E.6 (Basic Inequality). Suppose the same conditions of Theorem 4.2 hold. Let C = 225/(2ρ∗ ) and βe(1) be the ε-optimal solution. Then we have the following basic inequality ∇L(βe(1) ) − ∇L(β ∗ ), βe(1) − β ∗ ≤ Cλ2 s. Proof. We omit the superscript in βe(1) , and write βe(1) as βe for simplicity. Proposition 4.1 implies that (E.16) kβe − β ∗ k22 ≤ p  √ 12 (0) kλS k2 + k∇L(β ∗ )S k2 + ε |S| ≤ 15λ s/ρ∗ . ρ∗ On the other side, applying Lemma F.1 yields that kβe − β ∗ k1 ≤ k(βe − β ∗ )E1c k1 + k(βe − β ∗ )E1 k1 ≤ 6k(βe − β ∗ )E1 k1 , where E1 can be taken as S. This, combined with (E.16), results √ k(βe − β)S k1 ≤ skβe − βk2 ≤ 15λs/ρ∗ . (E.17) Therefore, we obtain kβe − β ∗ k1 ≤ 6k(βe − β ∗ )S k1 ≤ 90λs/ρ∗ . Because βe is a ε-optimal solution, we have ∗ e ∗ ∗ e e e e e ∇L(β)−∇L(β ), β−β ∗ ≤ k∇L(β)+λ ξ−λ ξ−∇L(β )k∞ kβ−β k1  ≤ 1 + 1/4 λkβe − βk1 ≤ 225λs2 /(2ρ∗ ). Therefore, the proof is completed. E.2.2. Tightening Stage. We collect technical lemmas that are needed to prove Lemma 5.5 and Proposition 4.6 in this section. We start by giving a lemma that ensures the sparsity along the approximate solution sequence {β (`,k) }∞ k=0 for the tightening stage (` ≥ 2). We first need several technical lemmas. We remind the reader that the quadratic isotropic parameter in the tightening stage is denoted by φt . Lemma E.7. Suppose the same conditions in Theorem 4.2 hold. Assume (k+1) (k) β (k+1) , β (k) ∈ B2 (r, β ∗ ) such that max{kβS c k0 , kβS c k0 } ≤ se. For the LAMM algorithm, we have ρ− (2s + 2e s, r) ≤ φt ≤ γu ρ+ (2s + 2e s, r). Proof. The proof follows a similar argument as that of Lemma E.3 and thus is omitted here for simplicity. 28 FAN ET AL. The next two lemmas connects the suboptimality measure ωλ (β (`,k) ) to `2 parameter bound and the objective functions. They are similar to the ones proved in the contraction stage but with different constants and we omit the proofs here. Lemma E.8. If β (k−1) , β (k) ∈ B2 (r/2, β ∗ ), k(β (`,k) )S c k0 ≤ se and k(β (`,k−1) )S c k0 ≤ se, then for any ` ≥ 2 and k ≥ 1, we have ωλ (β (`,k) ) ≤ (1 + γu )ρ+ (2s + 2e s, r)kβ (`,k) − β (`,k−1) k2 . Lemma E.9. We have F(β (`,k) , λ(`−1) ) − F (β (`,k−1) , λ(`−1) ) ≤ − φt (`,k) kβ − β (`,k−1) k2 . 2 Next we give a lemma that characterizes the parameter estimation and objective function bound for sparse approximate solutions. Lemma E.10. Assume Assumption 4.1 holds. Let kλE c kmin ≥ λ/2, S ⊂ E and |E| ≤ 2s. If k(β − β ∗ )S c k0 ≤ se, ωλ (β) ≤ ε and β ∈ B2 (r, β ∗ ), then we must have √ kβ − β ∗ k2 ≤ 3ρ−1 ∗ λ s/2, F (β, λ) − Fλ (β ∗ , λ) ≤ 15ερ−1 ∗ λs. Proof of Lemma E.10. For simplicity, we omit arguments k, r in ρ− (k, r) and ρ+ (k, r) when k and r are clear from the context. Since the sparse localized condition implies the localized sparse strong convexity, the following inequality follows from Proposition B.3: ∇L(β) − ∇L(β ∗ ), β − β ∗ ≥ ρ− kβ − β ∗ k22 . Following a similar argument in the proof of Lemma B.7, we have √ 3λ s (E.18) kβ − β ∗ k2 ≤ . 2ρ∗ Next, we prove the desired bound for F (β, λ) − F (β ∗ , λ). Using the convexity of F (·, λ), we obtain F (β ∗ , λ) ≥ F (β, λ) + ∇L(β) + λ ξ, β ∗ − β , which yields that (E.19) F (β, λ) − F (β ∗ , λ) ≤ − ∇L(β) + λ ξ, β ∗ − β ≤ εkβ ∗ − βk1 . 29 LOCAL ADAPTIVE MAJORIZE-MINIMIZATION On the other hand, we know from Lemma F.1 that the approximate solution β falls in the `1 cone: k(β − β ∗ )E c k1 ≤ 5k(β − β ∗ )E k1 , which, together with (E.18), implies (E.20) √ kβ − β ∗ k1 ≤ 6k(β − β ∗ )E k1 ≤ 6 2sk(β − β ∗ )E k2 ≤ 15ρ−1 ∗ λs. Plugging (E.20) into (E.19) completes the proof. Lemma E.11 (Basic Inequality II). Assume Assumption 4.1 holds. Take E such that S ⊆ E and |E| ≤ 2s. Let λ ≥ 4(k∇L(β ∗ )k∞+ε) and kλE c kmin ≥ λ/2. If kβE c k0 ≤ se, β ∈ B2 (r, β ∗ ) and F (β, λ) − F (β ∗ , λ) ≤ Cλ2 s, then ρ− (s + se, r) λ 5λ kβ − β ∗ k22 + k(β − β ∗ )E c k1 ≤ k(β − β ∗ )E k1 + Cλ2 s. 2 4 4 Proof. Since kβS c k0 ≤ se and kβS∗ c k0 = 0, we have k(β − β ∗ )S c k0 ≤ se. Proposition B.3 implies the localized sparse strong convexity: (E.21) L(β ∗ ) + ∇L(β ∗ ), β − β ∗ + Recall that F (β) = L(β) + kλ equivalently, (E.22) ρ− kβ − β ∗ k22 ≤ L(β). 2 βk1 . We have F (β) − F (β ∗ ) ≤ Cλ2 s, or L(β) − L(β ∗ ) + (kλ βk1 − kλ β ∗ k1 ) ≤ Cλ2 s. Plugging (E.21) into the left-hand side of (E.22), we immediately obtain ρ− kβ−β ∗ k22 ≤ Cλ2 s − ∇L(β ∗ ), β−β ∗ +(kλ 2 | {z } | I β ∗ k1 −kλ {z II βk1 ) . } Following a similar argument in the proof of Lemma B.7 in the appendix, we have I ≤ k(β − β ∗ )E c k1 k∇L(β ∗ )k∞ + k(β − β ∗ )E k1 k∇L(β ∗ )k∞ , II ≤ λk(β − β ∗ )E k1 − λ/2k(β − β ∗ )E c k1 . Therefore, we have ρ− kβ − β ∗ k22 + (λ/2 − k∇L(β ∗ )k∞ )k(β − β ∗ )E c k1 2 ≤ (λ + k∇L(β ∗ )k∞ )k(β − β ∗ )E k1 + Cλ2 s. The proof is finished by noticing that k∇L(β ∗ )k∞ ≤ λ/4. 30 FAN ET AL. Lemma E.12. Assume Assumption 4.1 holds. Take E such that S ⊆ E and |E| ≤ 2s. Let k∇L(β ∗ )k∞ + ε ≤ λ/4 and kλE c kmin ≥ λ/2. If β ∈ B2 (r, β ∗ ) satisfies kβS c k0 ≤ se and F (β, λ) − F (β ∗ , λ) ≤ Cλ2 s, then we must have √ kβ − β ∗ k2 ≤ C 0 λ s, ∇L(β) − ∇L(β ∗ ), β − β ∗ ≤ C 02 ρ+ (2s + se, r)λ2 s, where C 0 = max{2 p √ C/ρ− (2s+e s, r), 5 2/ρ− (2s+e s, r)}. Proof. We omit the arguments in ρ− (k, r) and ρ+ (k, r) when they are clear form the context. Directly applying Lemma E.11, it follows that ρ− 5λ kβ − β ∗ k22 ≤ k(β − β ∗ )E k1 + Cλ2 s. 2 4 To further bound the right-hand side of the inequality above, we discuss two cases regarding the magnitude of k(β − β ∗ )E k1 with respect to λs: • If 5λk(β − β ∗ )E k1 /4 ≤ Cλ2 s, we have (E.23) ρ− kβ − β ∗ k22 ≤ 2Cλ2 s, and thus kβ − β ∗ k2 ≤ 2 2 s C √ λ s. ρ− • If 5λk(β − β ∗ )E k1 /4 > Cλ2 s, we have √ ρ− kβ − β ∗ k22 ≤ 5λk(β − β ∗ )E k1 /2 ≤ 5λ 2skβ − β ∗ k2 /2, 2 which further yields √ 5 2 √ kβ − β k2 ≤ λ s. ρ− ∗ (E.24) Combining (E.23) and (E.24), we obtain √   s √ C 5 2 √ ∗ 2 kβ − β k2 ≤ max 2 , λ s = C 0 λ s, ρ− ρ− where C 0 = max{2 p √ C/ρ− , 5 2/ρ− }. Using Proposition B.3, we obtain s (β, β ∗ ) = L(β) − L(β ∗ ), β − β ∗ ≤ ρ+ kβ − β ∗ k22 ≤ C 02 ρ+ λ2 s. DL This completes the proof. LOCAL ADAPTIVE MAJORIZE-MINIMIZATION 31 Lemma E.13. Assume Assumption 4.1 holds. Take E such that S ⊆ E with |E| ≤ 2s. Let Let k∇L(β ∗ )k∞ + ε ≤ λ/4 and kλE c kmin ≥ λ/2. Let β ∈ B2 (r, β ∗ ) satisfy√ kβE c k0 ≤ se and F (β, λ) − F (β ∗ , λ) ≤ Cλ2 s. Let C0 = 80γu ρ∗ /ρ∗ max 2Cρ∗ , 5 + 64(ρ∗ /ρ∗ )2 max 4Cρ∗ , 50 . If se ≥ C0 s, then the one-step LAMM algorithm produces a (2s + se)-sparse solution: k(Tλ,φt (β))E c k0 ≤ se. Proof. For simplicity, we write β̄ = β − φt −1 ∇L(β). To show that k S(β̄, φt −1 λ) E c k0 ≤ se, it suffices to prove that, for any j ∈ E c , the total number of βj ’s such that β̄j > λj /φt is no more than se. We first write β̄ as β̄ = β − 1 1 1 1 ∇L(β) = β − ∇L(β ∗ ) + ∇L(β ∗ ) − ∇L(β). φt φt φt φt Define Sn = {j ∈ E c : (β − φt −1 ∇L(β))j = λj /φt }, and notice that {j : (Tλ,φt (β))j 6= 0} ⊆ Sn , thus it suffices to show |Sn | ≤ se. We further define Sn1 , Sn2 and Sn3 as: n 1 λj o Sn1 ≡ j ∈ E c : |βj | ≥ · (E.25) , 4 φt n 1 λj o (E.26) , Sn2 ≡ j ∈ E c : |∇L(β ∗ )j /φt | > · 2 φt n  ∇L(β) − ∇L(β ∗ )  1 λj o Sn3 ≡ j ∈ E c : (E.27) . > · φt 4 φt j We immediately have Sn ⊆ Sn1 ∪ Sn2 ∪ Sn3 . It suffices to prove that |Sn1 | + |Sn2 | + |Sn3 | ≤ se. The assumption that k∇L(β ∗ )k∞ +ε ≤ λ/4 implies Sn2 = ∅ and thus |Sn2 | = 0. In what follows, we bound |Sn1 | and |Sn3 |, respectively. Bound for |Sn1 |: For ∀j ∈ E c , we have βj◦ = 0. Using Markov inequality, we obtain n X 4φt 1 λj o |Sn1 | = j ∈ E c : |βj | ≥ · ≤ |βj − βj∗ |. 4 φt λ j c j∈E Because kλE c kmin ≥ λ/2, we have X 8φt 8φt |Sn1 | ≤ |βj − βj◦ | ≤ k(β − β ∗ )E c k1 . λ λ c j∈E It remains to bound k(β − β ∗ )E c k1 . A similar argument in Lemma E.11 implies 1 5λ k(β − β ∗ )E c k1 ≤ k(β − β ∗ )E k1 + Cλ2 s. 4 4 32 FAN ET AL. Therefore, β − β ∗ falls in the approximate `1 cone: √ k(β − β ∗ )E c k1 ≤ 5λk(β − β ∗ )E k1 + 4Cλs ≤ 5 2C 0 λs + 4Cλs, p √ where C 0 = max{2 C/ρp − , 5 2/ρ− } and the last inequality is due to Lemma E.12. Let C 00 = max{10 2C/ρ− , 50/ρ− } + 4C, then we have |Sn1 | ≤ 8φt C 00 s ≤ 8C 00 γu ρ+ s, where we use the fact φt ≤ γu ρ+ in the last inequality. Bound for |Sn3 |: Consider an arbitrary subset S 0 ⊆ Sn3 with size s0 = |S 0 | ≤ se. Let us further consider a d-dimensional sign vector u such that kuk∞ = 1 and kuk0 = s0 . There exists some u such that X 1  1 0 λs ≤ λj |uj | ≤ uT ∇L(β) − ∇L(β ∗ ) . 8 4 c j∈E By the Mean theorem, there −  Value  exists∗ some γ ∈ [0,  1]2 such that ∇L(β)  ∗ 2 ∗ ∗ ∇L(β ) = ∇ L γβ + (1 − γ)β (β − β ). Let H ≡ ∇ L(γβ + (1 − γ)β ) . Writing uT (∇L(β) − ∇L(β ∗ )) as hH1/2 u, H1/2 (β − β ∗ )i and applying the Hölder inequality, we obtain p (E.28) λs0 /8 ≤ kH1/2 uk2 kH1/2 (β−β ∗ )k2 ≤ ρ+ (s0 , r)s0 kH1/2 (β−β ∗ )k2 . | {z } I To bound term I, we apply Lemma E.12 and obtain that p √ I = kH1/2 (β − β ∗ )k2 ≤ C 0 ρ+ (2s + se, r)λ s, p √ where C 0 = max{2 C/ρ− , 5 2/ρ− }. Plugging the above inequality into (E.28), we obtain q p √ √ 0 0 0 0 λs /8 ≤ ρ+ (s , r) s × C ρ+ (2s + e 2, r)λ s. Taking squares of both sides yields s0 ≤ 64ρ+ (s0 , r)C 02 ρ+ (2s + se, r)s ≤ 64ρ+ (e s, r)C 02 ρ+ (2s + se, r)s < se where the last inequality is due to the assumption. Since s0 = |S 0 | achieves the maximum possible value such that s0 ≤ se for any subset S 0 of Sn3 and the above inequality shows that s0 < se, we must have  S 0 = j : |(∇L(β) − ∇L(β ∗ ))j | ≥ λj /4 . 33 LOCAL ADAPTIVE MAJORIZE-MINIMIZATION Finally, combining bounds for |Sn1 |, |Sn2 | and |Sn3 |, we obtain k(Tλ,φt (β))E c k0 ≤ 8C 00 γu ρ+ s + 64ρ+ (e s, r)C 02 ρ+ (2s + se, r)s ≤ se. Lemma E.14. Assume the same conditions in Theorem 4.7 hold. The solution sequence {β (`,k) }∞ k=0 always satisfies that F (β (`,k) , λ(`−1) ) − F (β ∗ , λ(`−1) ) ≤ Cλ2 s, √ k(β (`,k) )E`c k0 ≤ se, and kβ (`,k) − β ∗ k2 ≤ C 0 λ s. √ for ` ≥ 2, k ≥ 0, where C = 15/(4ρ∗ ) and C 0 = 5 2/ρ∗ . Proof. We omit the argument λ in F (β, λ), for notation simplicity. We prove the theorem by mathematical induction on (`, k). Base case: For the `th tightening step, the stopping criterion implies that ωλ(`−2) (β (`,0) ) ≤ εt . On the other hand, the suboptimality condition for the 1st iteration in the `th step can be written as n o min ωλ(`−1) (β (`,0) ) = k∇L(β (`,0) ) + λ(`−1) ξk∞ ξ∈∂kβ (`,0) k1 which, together with the triangle inequality, yields o n ωλ(`−1) (β (`,0) ) ≤ min k∇L(β (`,0) )+λ(`−2) ξk∞ +k(λ(`−1) −λ(`−2) ) ξk∞ . {z } | ξ I For the second term I in the right hand side, we have k(λ(`−1) − λ(`−2) ) ξk∞ ≤ kλ(`−1) − λ(`−2) k∞ ≤ λ/8. Using the fact that ε ≤ λ/8, we obtain n ωλ(`−1) (β (`,0) ) ≤ min k∇L(β (`,0) )+λ(`−2) ξ Thus the initialization satisfies that o ξk∞ +λ/8 ≤ λ/4, k(β (`,0) )E`c k0 ≤ se, ωλ(`−1) (β (`,0) ) ≤ λ/4, and φt ≤ γu ρ+ (2s + 2e s, r). Therefore, using Lemma E.10, we obtain F (β (`,0) ) − F (β ∗ ) ≤ Cλ2 s, where C = 15/(4ρ∗ ). 34 FAN ET AL. Therefore, directly applying Lemma E.12 results √ kβ (`,0) − β ∗ k2 ≤ C 0 λ s, √ where C 0 = 5 2ρ∗ . Induction step: Suppose that, at the (k − 1)-th iteration of the LAMM method in the `-th step, we have k(β (`,k−1) )E`c k0 ≤ se, φ ≤ γu ρ+ , and F (β (`,k−1) ) − F (β ∗ ) ≤ Cλ2 s. Then according to Lemma E.13, we have that the solution to the LAMM method at the kth iteration is (2s + se)-sparse: β (`,k) = Tλ(`−1) ,φt (β (`,k−1) ) satisfies k(β (`,k) )E`c k0 ≤ se. Thus Lemma E.9 implies F (β (`,k) ) ≤ F (β (`,k−1) ) − φt (`,k) kβ − β (`,k−1) k. 2 which implies that F (β (`,k) ) − F (β ∗ ) ≤ F (β (`,k−1) ) − F (β ∗ ) − φt (`,k) kβ − β (`,k−1) k22 ≤ Cλ2 s. 2 Therefore we have the induction holds at the kth iteration: k(β (`,k) )E`c k0 ≤ se, φt ≤ γu ρ+ (2s + 2e s), and F (β (`,k) ) − F (β ∗ ) ≤ Cλ2 s. Using Lemma E.12, for C 0 defined as before, we obtain √ kβ (`,k) − β ∗ k2 ≤ C 0 λ s. We complete induction on k. For `, the proof is similar. APPENDIX F: PRELIMINARY LEMMAS In this section, we collect several preliminary lemmas. Lemma F.1 (`1 Cone Property For Approximate Solution). Let E such that S ⊆ E. If k∇L(β ∗ )k∞ + ε ≤ kλE kmin , we must have k(βe − β ∗ )E c k1 ≤ kλk∞ + k∇L(β ∗ )k∞ + ε k(βe − β ∗ )E k1 . kλE kmin − (k∇L(β ∗ )k∞ + ε) LOCAL ADAPTIVE MAJORIZE-MINIMIZATION 35 e 1 , let u = ∇L(β) e + λ ξ. By Proof of Lemma F.1. For any ξ ∈ ∂kβk ∗ e the that ∇L(β)−∇L(β  2Mean ∗Value theory,there exists  a γ ∈ [0, 1], such  )= ∗ 2 ∗ ∇ L γβ + (1 − γ)βe βe − β . Write H = ∇ L γβ + (1 − γ)βe . Then we have e ∇L(β)+λ (F.1) ∗ ∗ e e ξ, β−β = ∇L(β ∗ )+H(βe − β ∗ ), β−β e ≤ kuk∞ kβ−βk 1. Using the fact (βe − β ∗ )T H(βe − β ∗ ) ≥ 0, we have 0 ≤ kuk∞ kβe − β ∗ k1 − ∇L(β ∗ ), βe − β ∗ − λ | {z } | I ξ, βe − β ∗ . {z } II e Using a similar argument in the proof of Lemma B.7, we have I ≥ −k∇L(β ∗ )k∞ kβ− βk1 , and II = λ ξ, βe − β ∗ = (λ ξ)E c , (βe − β ∗ )E c + (λ ξ)E , (βe − β ∗ )E ≥ kλE c kmin k(βe − β ∗ )E c k1 − kλE k∞ k(βe − β ∗ )E k1 . Plugging the above bounds into (F.1) and taking inf with respect to ξ ∈ e 1 yields ∂kβk e 0 ≤ −(kλE c kmin − (k∇L(β ∗ )k∞ + ωλ (β)))k( βe − β ∗ )E c k1 e + (kλE c kmin + k∇L(β ∗ )k∞ + ωλ (β))k( βe − β ∗ )E k1 , or equivalently k(βe − β ∗ )E c k1 ≤ e λ + k∇L(β ∗ )k∞ + ωλ (β) e kλE c kmin − (k∇L(β ∗ )k∞ + ωλ (β)) k(βe − β ∗ )E k1 e ≤ ε, we have that Using the stopping criterion, i.e. ωλ (β) k(βe − β ∗ )E c k1 ≤ λ + k∇L(β ∗ )k∞ + ε k(βe − β ∗ )E k1 kλE c kmin − (k∇L(β ∗ )k∞ + ε) Therefore we proved the desired result. Lemma F.2. Let DL (β1 , β2 ) = L(β1 ) − L(β2 ) − L(β2 ), β1 − β2 and s (β , β ) = D (β , β ) + D (β , β ). For β(t) = β ∗ + t(β − β ∗ ) with DL 1 2 2 1 L 1 L 2 t ∈ (0, 1], we have that s s DL (β(t), β ∗ ) ≤ tDL (β, β ∗ ). 36 FAN ET AL. Proof of Lemma F.2. Let Q(t) = DL (β(t), β ∗ ) = L(β(t)) − L(β ∗ ) − ∇L(β ∗ ), β(t) − β ∗ . Since the derivative of L(β(t)) with respect to t is h∇L(β(t)), β − β ∗ i, it follows that Q0 (t) = ∇L(β(t)) − ∇L(β ∗ ), β − β ∗ . s (β(t)−β ∗ ) can be written Therefore, the symmetric Bregman divergence DL as s e e DL (β(t) − β ∗ ) = ∇L(β(t)) − ∇L(β ∗ ), t(β − β ∗ ) = tQ0 (t) for 0 < t ≤ 1. s (β, β ∗ ) as a Plugging t = 1 in the equation above, we have Q0 (1) = DL special case. If we assume that Q(t) is convex, then Q0 (t) is non-decreasing and thus s s DL (β(t), β ∗ ) = tQ0 (t) ≤ tQ0 (1) = tDL (β, β ∗ ). It remains to show the with respect to t; or equivalently, the  convexity of∗ Q(t) ∗ convexity of L β(t) and h∇L(β ), β − β(t)i, respectively. First, we have the fact that β(t) is linear in t, that is, β(α1 t1 + α2 t2 ) = α1 β(t1 ) + α2 β(t2 ), for t1 , t2 ∈ [0, 1] and α1 , α2 ≥ 0 such that α1 + α2 = 1. Then the convexity of L(β(t)) follows from this linearity property of β(t) and the convexity of the Huber loss. For the second term, the convexity directly follows from the bi-linearity of the inner product function. This finishes the proof. The following lemma is taken from [2] and describes a general concentration for quadratic forms in sub-Gaussian random variables. Lemma F.3. (Hanson-Wright Inequality, [2]). Let v = (v1 , . . . , vd ) ∈ Rd be a random vector with independent components vi such that vi ∼ sub-Gaussian(0, σ 2 ). Let A be an n × n matrix. Then, for every t ≥ 0,    n t2 o t T T , , P |v Av − Ev Av| > t ≤ 2 exp − Ch min σ 4 kAk2F σ 2 kAk2 where Ch is a universal constant, not depending on A, v and n. REFERENCES [1] Agarwal, A., Negahban, S. and Wainwright, M. J. (2012). Fast global convergence rates of gradient methods for high-dimensional statistical recovery. The Annals of Statistics 40 2452–2482. LOCAL ADAPTIVE MAJORIZE-MINIMIZATION 37 [2] Rudelson, M. and Vershynin, R. (2013). Hanson-wright inequality and subgaussian concentration. arXiv preprint arXiv:1306.2872 . Department of Operations Research and Financial Engineering Princeton University Princeton, NJ 08544; School of Data Science Fudan University Shanghai, China E-mail: [email protected] Department of Operations Research and Financial Engineering Princeton University Princeton, NJ 08544 E-mail: [email protected] [email protected] Tencent AI Lab Shennan Ave, Nanshan District Shen Zhen, Guangdong, China; School of Data Science Fudan University Shanghai, China E-mail: [email protected]
10math.ST
arXiv:1701.02989v1 [math.OC] 11 Jan 2017 A General Approximation Method for Bicriteria Minimization Problems Pascal Halffmanna , Stefan Ruzikaa , Clemens Thielenb,∗, David Willemsa a Mathematical Institute, University of Koblenz-Landau, Campus Koblenz, D-56070 Koblenz, Germany b Department of Mathematics, University of Kaiserslautern, Paul-Ehrlich-Str. 14, D-67663 Kaiserslautern, Germany Abstract We present a general technique for approximating bicriteria minimization problems with positive-valued, polynomially computable objective functions. Given 0 < ǫ ≤ 1 and a polynomial-time α-approximation algorithm for the corresponding weighted sum problem, we show how to obtain a bicriteria (α · (1 + 2ǫ), α · (1 + 2ǫ ))-approximation algorithm for the budget-constrained problem whose running time is polynomial in the encoding length of the input and linear in 1ǫ . Moreover, we show that our method can be extended to compute an (α · (1 + 2ǫ), α · (1 + 2ǫ ))-approximate Pareto curve under the same assumptions. Our technique applies to many minimization problems to which most previous algorithms for computing approximate Pareto curves cannot be applied because the corresponding gap problem is NP-hard to solve. For maximization problems, however, we show that approximation results similar to the ones presented here for minimization problems are impossible to obtain in polynomial time unless P = NP. Keywords: multicriteria optimization, bicriteria approximation algorithm, approximate Pareto curve Corresponding author. Fax: +49 (631) 205-4737. Phone: +49 (631) 205-4590 Email addresses: [email protected] (Pascal Halffmann), [email protected] (Stefan Ruzika), [email protected] (Clemens Thielen), [email protected] (David Willems) ∗ 1 1. Introduction Multicriteria optimization is one of the fastest growing fields of research in optimization and operations research. It provides methods and techniques for solving optimization problems with multiple, equally important but opposing objectives. In the last decades, a variety of theoretical results and algorithms have been developed to improve solvability of multicriteria optimization problems. An important class of problems that has recently received much attention from researchers are combinatorial multicriteria optimization problems. Many of these problems, however, are already NP-hard to solve when only a single objective function is considered, so computing exact (Pareto or nondominated) solutions or even the complete Pareto curve for the multicriteria versions is often intractable. Even for problems where the unicriterion version is efficiently solvable, computing the complete Pareto curve may turn out to be intractable due to the possibly exponential number of nondominated solutions. This motivates to study approximations of the Pareto curve that can be computed in polynomial time. For a bicriteria optimization problem, a common alternative approach to considering Pareto solutions is to optimize one of the two objective functions subject to a bound (often called budget constraint) on the value of the other objective function. Unfortunately, the budget-constrained problem often turns out to be NP-hard to solve or even approximate even if the corresponding unicriterion problem without the budget constraint is solvable in polynomial time. This motivates to study polynomial-time bicriteria approximation algorithms for the budget-constrained problem. Such algorithms compute solutions that violate the budget constraint by at most a given factor and at the same time obtain a bounded approximation factor with respect to the objective function that has to be optimized. There are specialized bicriteria approximation algorithms for the budgetconstrained versions of many particular bicriteria optimization problems and also many dedicated algorithms that compute approximations of the Pareto curve of particular bicriteria problems. However, besides the seminal work of Papadimitriou and Yannakakis [1] (and the extensions due to Vassilvitskii and Yannakakis [2] and Diakonikolas and Yannakakis [3]) and the results of Glaßer et al. [4, 5], there is no general approximation algorithm for the Pareto curve that applies to a broad class of bicriteria problems. Moreover, the 2 algorithms based on the method of Papadimitriou and Yannakakis compute approximate Pareto curves in polynomial time only for those problems whose corresponding gap problem can be solved in polynomial time, which is not possible for many important problems. In this article, we present a general bicriteria approximation algorithm that applies to the budget-constrained version of a broad class of bicriteria minimization problems. Moreover, we show that our technique also yields a polynomial-time algorithm for computing an approximate Pareto curve even for problems for which the gap problem is NP-hard to solve. 1.1. Previous Work Papadimitriou and Yannakakis [1] present a method for generating an approximate Pareto curve obtaining an approximation factor of 1 + ǫ in every objective function (called an ǫ-Pareto curve) for general multicriteria minimization and maximization problems with positive-valued, polynomially computable objective functions. They show that an ǫ-Pareto curve with size polynomial in the encoding length of the input and 1ǫ always exist; but the construction of such a curve is only possible in (fully) polynomial time if the following gap problem (which we state for minimization problems here) can also be solved in (fully) polynomial time: Problem 1 (Gap Problem). Given an instance I of a k-criteria minimization problem, a vector b ∈ Rk , and ǫ > 0, either return a feasible solution s whose objective value f (s) satisfies fi (s) ≤ bi for all i or answer that bi there is no feasible solution s′ with fi (s′ ) ≤ 1+ǫ for all i. Here, as usual in the context of approximation, polynomial time refers to a running time that is polynomial in the encoding length of the input and fully polynomial time refers to a running time that is additionally polynomial in 1ǫ . Hence, if the gap problem is solvable in (fully) polynomial time, the result of Papadimitriou and Yannakakis [1] shows that an ǫ-Pareto curve can be constructed in (fully) polynomial time (i. e., the problem admits a multicriteria (fully) polynomial-time approximation scheme abbreviated by MPTAS (MFPTAS )). In a succeeding paper, Vassilvitskii and Yannakakis [2] show that, for bicriteria problems whose gap problem can be solved in (fully) polynomial time, an ǫ-Pareto curve that has cardinality at most three times the cardinality of the smallest ǫ-Pareto curve Pǫ∗ can be constructed in (fully) polynomial 3 time. Moreover, they showed that the factor of three is best possible in the sense that, for some problems, it is NP-hard to do better. In a more recent paper, Bazgan et al. [6] present an algorithm that also works for bicriteria problems whose gap problem can be solved in (fully) polynomial time. This algorithm also computes an ǫ-Pareto curve that has cardinality at most three times |Pǫ∗| in (fully) polynomial time, but uses a subroutine SoftRestrict for a different subproblem that is polynomially equivalent to the gap problem. Diakonikolas and Yannakakis [3] show that, for bicriteria problems for which the budget-constrained problem (for some choice of the budgeted objective function) admits a (fully) polynomial-time approximation scheme, an ǫ-Pareto curve that has at most twice as many elements as the smallest ǫPareto curve Pǫ∗ can be constructed in (fully) polynomial time. Again, this factor of two is shown to be best possible. Besides the seminal work of Papadimitriou and Yannakakis and the extensions mentioned above, there is another general approximation method for bicriteria optimization problems under the assumption of positive-valued, polynomially computable objective functions. This can be obtained when combining two results of Glaßer et al. [4, 5]. They introduce the following problem similar to the gap problem above: Problem 2 (Approximate Domination Problem). Given an instance I of a k-criteria minimization problem, a vector b ∈ Rk , and α ≥ 1, either return a feasible solution s whose objective value f (s) satisfies fi (s) ≤ α · bi for all i or answer that there is no feasible solution s′ with fi (s′ ) ≤ bi for all i. Glaßer et al. show that, if this problem is solvable in polynomial time for some α ≥ 1, then an approximate Pareto curve obtaining an approximation factor of α · (1 + ǫ) in every objective function can be computed in fully polynomial time. Moreover, they show that the approximate domination problem with α := k·δ can be solved by using a δ-approximation algorithm for the weighted sum problem of the k-criteria problem (i.e., for the unicriterion problem obtained by minimizing the sum of the k objective functions, where each objective function is assigned a positive coefficient / weight). Together, this implies that an approximate Pareto curve obtaining an approximation factor of k ·δ ·(1+ǫ) in every objective function can be computed in fully polynomial time for k-criteria minimization problems provided that the objective functions are positive-valued and polynomially computable and a δ-approximation algorithm for the weighted sum problem exists. As this 4 result is not explicitly stated in [4, 5], no bounds on the running time are provided. 1.2. Our Contribution We consider general bicriteria minimization problems under the usual assumption that the objective functions are polynomially computable and take on only strictly positive values. Given 0 < ǫ ≤ 1 and a polynomial-time α-approximation algorithm for the corresponding weighted sum problem, we propose a general bicriteria (α · (1 + 2ǫ), α · (1 + 2ǫ ))-approximation algorithm for the budget-constrained problem whose running time is polynomial in the encoding length of the input and linear in 1ǫ . In the case that an exact polynomial-time algorithm is given for the weighted sum problem, we show how the running time of our algorithm can be further improved by using binary search. If this exact algorithm for the weighted sum problem additionally satisfies the necessary assumptions for applying Megiddo’s parametric search technique [7, 8], we show that the approximation guarantee can be improved to (1 + ǫ, 1 + 1ǫ ) and the running time becomes strongly polynomial (provided that the weighted sum algorithm runs in strongly polynomial time). Moreover, we show that our algorithm is fit to compute an (α · (1 + 2ǫ), α · (1 + 2ǫ ))-approximate Pareto curve in time polynomial in the encoding length of the input and linear in 1ǫ under the same assumptions that are needed for the basic version of the bicriteria approximation algorithm.1 Furthermore, if a parametric α-approximation algorithm for the weighted sum problem exists (which computes a sequence of α-approximate solutions for the weighted sum problem for all combinations of positive weights simultaneously in polynomial time), we show that our method yields an (α · (1 + ǫ), α · (1 + 1ǫ ))-approximate Pareto curve and the running time becomes strongly polynomial (again provided that the parametric approximation algorithm for the weighted sum problem runs in strongly polynomial time). Our method applies to a large number of bicriteria minimization problems. In particular, it can be employed on problems whose unicriterion ver1 In Appendix 1, we show that the assumption of strictly positive objective values can be relaxed slightly by only assuming nonnegativity of the objective values in the case that we can compute positive upper and lower bounds on all strictly positive objective values of feasible solutions in polynomial time. 5 sion is APX-complete and coincides with the weighted sum problem. For these problems, the gap problem is not solvable in polynomial time unless P = NP, so the results of Papadimitriou and Yannakakis [1] and the succeeding papers [2, 3, 6] cannot be used. We demonstrate examples of such problems and a comparison of our results for the specific problems to previous results in Section 6. Of course, a natural question is whether analogous approximation results can also be obtained for bicriteria maximization problems. We show, however, that similar approximation results are impossible to obtain in polynomial time for general maximization problems unless P = NP. We remark that, in all versions of our method, every choice of 0 < ǫ ≤ 1 yields a different trade-off in the approximation guarantees obtained with respect to the two objective functions. While the approximation guarantee obtained with respect to the first objective function decreases as ǫ is decreased, the approximation guarantee with respect to the second objective function increases for smaller values of ǫ. However, by exchanging the role of the two objective functions, all our results also hold with the approximation guarantees reversed, so the basic version of our method can also be used for obtaining an approximation guarantee of (α · (1 + 2ǫ ), α · (1 + 2ǫ)). Still, the behavior of the approximation guarantees in our method is different from many other bicriteria approximation techniques, where a decrease in the error parameter usually yields an improved approximation guarantee with respect to both objectives. The technique we use for proving the approximation guarantee of our algorithm is similar to the technique utilized by Eubank et al. [9], who present a bicriteria (1 + 2ǫ, 1 + 2ǫ )-approximation algorithm for the quarantining problem. In this problem, one is given an undirected graph G = (V, E), an initial infected set I ⊆ V , a budget B, and a cost c(e) for each edge e ∈ E and the task consists of computing a cut (S, V \ S) in G such that I ⊆ S, |S| ≤ B, and the cost of the edges crossing the cut is minimized. In their bicriteria approximation algorithm, Eubank et al. [9] extend the graph G by adding a source s and a sink t in a suitable way with the cost of some new edges given by a positive parameter β. Then they show that, for a minimum s-tcut (S, S̄) in the extended graph, the sum of β · |S \ I| and the cost of the ǫ·B , original edges in the cut is at most B + β · opt. When choosing β := opt bounding each of the two summands by B + β · opt yields an approximation guarantee of (1+ǫ, 1+ 1ǫ ) and approximating the correct value of β by search6 ing in multiplicative steps of (1 + ǫ) still yields an approximation guarantee of (1 + 2ǫ, 1 + 2ǫ ). It should be noted that this argumentation is a special case of our arguments used to prove Propositions 3 and 4. However, our results are much more general since, by using the weighted sum problem instead of the graph extension argument, it applies to arbitrary bicriteria minimization problems with positive objective function values (in which no graph structure is needed and the set of solutions need not even be discrete). Moreover, we generalize the argumentation to the case that the auxiliary problem (in our case the weighted sum problem) can be solved only approximately, whereas an exact solution of the auxiliary minimum cut problem is needed in the argumentation in [9]. In the case that an exact algorithm is available for the auxiliary problem, we improve the running time of the procedure drastically by using binary search and parametric search (and even obtain a strongly polynomial running time in some cases). Moreover, we show how an extension of our method can be used to compute approximate Pareto curves by applying the algorithm for the auxiliary problem to a suitably chosen range of parameters. We remark that, in a previous article [10] by partially the same authors as [9], a technique different from the one used in [9] has already been utilized in order to design a bicriteria (α · (1 + ǫ), α · (1 + 1ǫ ))-approximation algorithm for the budget-constrained version of bicriteria network design problems from an α-approximation algorithm for the corresponding weighted sum problem. However, one can show that the algorithm presented in [10] is in general not applicable unless an exact algorithm is used for the weighted sum problem. Moreover, even if an exact algorithm is used for the weighted sum problem, the algorithm might fail to output a solution due to an ill-defined search interval even though the considered problem instance is feasible (we provide explicit examples for both phenomena in Appendix 2). The remainder of the paper is organized as follows: In Section 2, we formally introduce the class of bicriteria minimization problems we consider and provide the necessary definitions concerning bicriteria approximation algorithms and (approximate) Pareto curves. Section 3 presents our general bicriteria approximation algorithm for the budget-constrained problem. In Section 4, we show how the running time of the algorithm can be improved by using binary search or parametric search for problems for which the weighted sum problem can be solved exactly in polynomial time. Section 5 presents the modification for computing an approximate Pareto curve 7 and Section 6 provides applications of our technique to specific bicriteria minimization problems as well as a comparison of our results to previous results for these problems. In Section 7, we show that approximation results similar to the ones we obtain for minimization problems are not possible for general maximization problems unless P = NP. Section 8 summarizes our results and lists directions for future work. 2. Problem Definition We start by defining general bicriteria optimization problems and the different solution concepts considered within the paper. We denote by Π a general bicriteria optimization problem. For a given instance I of Π, we let S(I) denote the set of feasible solutions of instance I. The two objective functions of the problem that should be minimized are given by polynomial-time algorithms f1 , f2 that, given an instance I of Π and a feasible solution x ∈ S(I), compute the values f1 (I, x), f2 (I, x), which are assumed to be positive rational numbers. We assume that, for i = 1, 2 and each fixed instance I, there exist positive rational numbers LB(I, i), UB(I, i) with encoding length polynomial in the encoding length |I| of I such that LB(I, i) ≤ fi (I, x) ≤ UB(I, i) for every feasible solution x ∈ S(I) (this is a consequence of the polynomialtime computability of the objective functions). We let Y (I) := {f (I, x) = (f1 (I, x), f2 (I, x)) : x ∈ S(I)} denote the set of vectors of objective values (or images) of feasible solutions of instance I. Usually, the considered instance I will be clear from context and we use the abbreviations S := S(I), Y := Y (I), fi (x) := fi (I, x), LB(i) := LB(I, i), and UB(i) := UB(I, i) for i = 1, 2. We also refer to the objective value fi (x) of a feasible solution x ∈ S with respect to the objective function fi as the fi -cost of x. Definition 1. For an instance I of Π, we say that an image y = f (I, x) ∈ Y (I) is dominated by another image y ′ = f (I, x′ ) ∈ Y (I) if yi′ = fi (I, x′ ) ≤ fi (I, x) = yi for i = 1, 2, but y ′ 6= y. If the image y = f (I, x) is not dominated by any other image y ′, we call y nondominated and the feasible solution x ∈ S(I) efficient. The set P (I) of all efficient solutions for instance I is called the Pareto curve for instance I. Note that the notion of the Pareto curve is somewhat blurred in the literature as it is sometimes used to describe the set of efficient solutions and 8 sometimes to describe the set of nondominated images. We exclusively use the term Pareto curve to refer to the set of efficient solutions of a problem instance here in order to be consistent with the usual definition of approximate Pareto curves (see Definition 6). One possibility to compute efficient solutions for a bicriteria optimization problem Π is to solve the weighted sum problem associated with Π (introduced by Zadeh [11]): Definition 2. For a given instance I of Π and a positive weight γ > 0, the weighted sum problem ΠWS (γ) = ΠWS (I, γ) asks for a feasible solution x ∈ S(I) that minimizes the weighted sum f1 (I, x) + γ · f2 (I, x) over all feasible solutions in S(I). Note that, in the above definition, we have normalized the weight assigned to the first objective function f1 to 1, which is without loss of generality as long as strictly positive weights for both objective functions are considered. This is motivated by the well-known fact that, for strictly positive weights for both objective functions, every optimal solution of the weighted sum problem is an efficient solution for the corresponding instance of the bicriteria problem (efficient solutions that can be obtained in this way are called supported efficient solutions; all other efficient solutions are called nonsupported efficient solutions, cf. [12]). Another possible way to look at a bicriteria optimization problem is to turn it into a unicriterion problem by imposing a bound on one of the two objectives and optimize the other: Definition 3. For a bicriteria optimization problem Π, the budget-constrained problem ΠBudget is the problem that, given an instance I of Π and an upper bound B > 0 on the value of the first objective function f1 , asks for a feasible solution x ∈ S(I) that minimizes the second objective function f2 over the set of all feasible solutions x ∈ S(I) for which f1 (I, x) ≤ B. Note that the budget-constrained problem is also often referred to as the ǫ-constraint scalarization, which was first considered by Haimes et al. [13]. However, since the letter ǫ is used with a different meaning here, we exclusively refer to the problem as the budget-constrained problem throughout the rest of the paper. 9 If a unicriterion problem such as the weighted sum problem ΠWS (γ) or the budget-constrained problem ΠBudget turns out to be NP-hard to solve, one is often interested in algorithms that compute approximate solutions in polynomial time: Definition 4. A (polynomial-time) α-approximation algorithm (with α ≥ 1) for a minimization problem is an algorithm that, for any given instance I of encoding length |I|, finds a feasible solution with objective value at most α times the optimal objective value in time bounded by a polynomial in |I| if the instance I admits a feasible solution, and outputs infeasibility of the instance after a number of steps bounded by a polynomial in |I| if no feasible solution for instance I exists. A more general approximation approach for approximating problems such as the budget-constrained problem ΠBudget is to study bicriteria approximation algorithms that compute solutions that violate the budget constraint on the first objective function by at most a given factor and at the same time obtain a bounded approximation factor with respect to the second objective function:2 Definition 5. A (polynomial-time) (α, β)-approximation algorithm (with α, β ≥ 1) for ΠBudget is an algorithm that, for any given instance I of Π and any given budget B > 0, requires time polynomial in the encoding length of I, B to find a solution x ∈ S(I) such that the following holds: If there exists at least one feasible solution x′ ∈ S(I) with f1 (I, x′ ) ≤ B, then the solution x returned by the algorithm satisfies f1 (I, x) ≤ α · B and f2 (I, x) ≤ β · opt(B), where opt(B) := inf{f2 (I, x̃) : x̃ ∈ S(I), f1 (I, x̃) ≤ B} ≥ LB(I, 2) denotes the minimum f2 -cost among the feasible solutions with f1 -cost at most B. Using a similar concept of approximation, one can study approximating the whole Pareto curve. Informally, an approximate Pareto curve for an instance I of Π is a set of feasible solutions for instance I that approximately dominate all other solutions, which means that, for every feasible solution x ∈ S(I), the set contains a solution that has value at most a given factor larger in each objective function. 2 Algorithms violating a specific (budget) constraint of an optimization problem by a given factor are also often referred to as using resource augmentation. 10 Definition 6. For an instance I of Π and α, β ≥ 1, an (α, β)-approximate Pareto curve is a set Pα,β (I) of feasible solutions such that, for every feasible solution x ∈ S(I), there exists a solution x′ ∈ Pα,β (I) with f1 (I, x′ ) ≤ α · f1 (I, x) and f2 (I, x′ ) ≤ β · f2 (I, x). Moreover, for ǫ > 0, a (1 + ǫ, 1 + ǫ)approximate Pareto curve is called an ǫ-Pareto curve. 3. A General Bicriteria Approximation Algorithm Given 0 < ǫ ≤ 1 and a polynomial-time α-approximation algorithm alg for the weighted sum problem ΠWS , we construct a bicriteria (α·(1+2ǫ), α·(1+ 2 ))-approximation algorithm for ΠBudget whose running time is polynomial ǫ in the encoding length of I, B and in 1ǫ . In the rest of this section, we consider a fixed instance I of Π and omit the explicit reference to the instance. We assume that we are given a budget B > 0 such that the instance of ΠBudget defined by I and B admits at least one feasible solution and let opt(B) := inf{f2 (x) : x ∈ S, f1 (x) ≤ B} ≥ LB(2) > 0 denote the minimum f2 -cost among the feasible solutions for this instance. Moreover, we let xalg = xalg (γ) denote the solution returned by alg when applied to the instance of ΠWS defined by a weight γ > 0. The following two propositions provide the foundation of our algorithm: ǫ·B , then xalg = xalg (γ) satisfies f1 (xalg ) ≤ Proposition 3. If γ = γ̄ := opt(B)  α · (1 + ǫ) · B and f2 (xalg ) ≤ α · 1 + 1ǫ · opt(B). Proof. By definition of opt(B), we know that, for every µ > 0, there exists a feasible solution xµ ∈ S with f1 (xµ ) ≤ B and f2 (xµ ) ≤ opt(B) + µ. The objective value of such a solution xµ in the weighted sum problem ΠWS with weight γ then satisfies f1 (xµ ) + γ · f2 (xµ ) ≤ B + γ · (opt(B) + µ). Since alg is an α-approximation algorithm for ΠWS , this implies that f1 (xalg ) + γ · f2 (xalg ) ≤ α · (f1 (xµ ) + γ · f2 (xµ )) ≤ α · (B + γ · (opt(B) + µ)). As this holds for every µ > 0, we obtain that actually f1 (xalg ) + γ · f2 (xalg ) ≤ α · (B + γ · opt(B)). 11 ǫ·B Moreover, as γ = γ̄ = opt(B) ≥ 0 and f2 (xalg ) ≥ 0, we can upper bound the first term on the left hand side by the right hand side to obtain that f1 (xalg ) ≤ α · (B + γ̄ · opt(B)) = α · (B + ǫB) = α · (1 + ǫ) · B. ǫ·B > 0 due to our Similarly, using that f1 (xalg ) ≥ 0 and γ = γ̄ = opt(B) assumptions on ǫ, B, and opt(B), we obtain that     B opt(B) alg f2 (x ) ≤ α · + opt(B) = α · + opt(B) γ̄ ǫ   1 =α· 1+ · opt(B), ǫ which proves the claim. ǫ·B Proposition 3 shows that, if we choose the “correct” weight γ = γ̄ = opt(B) for the weighted sum problem, then the solution returned by alg obtains a bicriteria approximation guarantee of (α · (1 + ǫ), α · (1 + 1ǫ )). Since we do not know the value γ̄ (as we do not know opt(B)), we now consider the approximation guarantee we can still obtain when using a weight slightly different from γ̄: γ̄ ǫ·B as in Proposition 3. If γ ∈ [ 1+ǫ , (1 + ǫ)γ̄], Proposition 4. Let γ̄ = opt(B) alg alg then the solution x = x (γ) returned by alg  for weight γ satisfies f1 (xalg ) ≤ α · (1 + 2ǫ) · B and f2 (xalg ) ≤ α · 1 + 2ǫ · opt(B). Proof. As in the proof of Proposition 3, the solution xalg satisfies f1 (xalg ) + γ · f2 (xalg ) ≤ α · (B + γ · opt(B)). ǫ·B Since γ ≤ (1 + ǫ)γ̄ = (1 + ǫ) · opt(B) and the second summand γ · f2 (xalg ) is nonnegative, this implies that   ǫ·B alg f1 (x ) ≤ |{z} α ·(B + γ · opt(B)) ≤ α · B + (1 + ǫ) · · opt(B) | {z } opt(B) ≥0 ≥0 = α · (B + (1 + ǫ) ·ǫ · B) ≤ α · (1 + 2ǫ) · B, | {z } ≤2 where we have used that 1 + ǫ ≤ 2 due to the assumption that ǫ ≤ 1. 12 γ̄ ǫ·B Similarly, since γ ≥ 1+ǫ = (1+ǫ)·opt(B) > 0 and the first summand f1 (xalg ) is nonnegative, we obtain     (1 + ǫ) · opt(B) · B B alg + opt(B) ≤ α · + opt(B) f2 (x ) ≤ |{z} α · γ ǫ·B ≥0     1+ǫ 2 =α· 1+ · opt(B) ≤ α · 1 + · opt(B), ǫ ǫ where we have again used that 1 + ǫ ≤ 2. Proposition 4 shows that we achieve the desired approximation guarantee γ̄ if we apply alg to the weighted sum problem for a weight γ ∈ [ 1+ǫ , (1 + ǫ)γ̄], i. e., a weight that differs from γ̄ by at most a factor (1 + ǫ). Since we have LB(2) ≤ opt(B) ≤ UB(2) due to our assumptions on the objective ǫ·B ǫ·B ǫ·B functions, we have γ̄ = opt(B) ∈ [ UB(2) , LB(2) ]. Thus, we obtain the desired 2 i (α · (1 + 2ǫ), α · (1 +jǫ ))-approximation   to the k if we lapply alg m values (1 + ǫ) ǫ·B ǫ·B for all integers i = log(1+ǫ) UB(2) up to log(1+ǫ) LB(2) . This yields a running time of       1 UB(2) UB(2) = O Talg · · log2 , O Talg · log(1+ǫ) LB(2) ǫ LB(2) where Talg denotes the running time of alg. This proves the following theorem: Theorem 5. Given 0 < ǫ ≤ 1 and a polynomial-time α-approximation algorithm alg for the weighted sum problem ΠWS , it is possible to obtain a bicri2 teria (α·(1+2ǫ), α·(1+ algorithm for ΠBudget with running  ǫ ))-approximation   time O Talg · 1ǫ · log2 UB(2) LB(2) , where Talg denotes the running time of alg. By setting ǫ := 1, we obtain an algorithm yielding a fixed approximation guarantee in both objective functions: Corollary 6. Given a polynomial-time α-approximation algorithm alg for the weighted sum problem ΠWS , it is possible to obtain abicriteria (3α,  3α) Budget approximation algorithm for Π with running time O Talg · log2 UB(2) , LB(2) where Talg denotes the running time of alg. 13 4. Improvements In this section, we present two methods for improving our bicriteria approximation algorithm in the case that we are given an exact polynomialtime algorithm alg for the weighted sum problem (i. e., a 1-approximation 2 algorithm). In this case, we are able to obtain )ǫ  (1 + 2ǫ,  a bicriteria  1 + approximation algorithm with running time O Talg · log2 1ǫ · log2 UB(2) LB(2) by using binary search (whose combination with the usage of repeated powers of (1 + ǫ) has already turned out to be useful within several other techniques for approximating bicriteria problems, cf. [1, 2]). Moreover, if alg additionally satisfies the necessary assumptions for using Megiddo’s parametric search [7, 8], we show in Subsection 4.2 that we can improve the approximation guarantee of the algorithm to (1 + ǫ, 1 + 1ǫ ) while at the same time achieving an improved running time. 4.1. Binary Search Assume that we are given an exact polynomial-time algorithm alg for the weighted sum problem. The idea for improving the  timekis to j running ǫ·B up perform a binary search on the integer values imin := log(1+ǫ) UB(2) m  l ǫ·B instead of applying alg to each value in this to imax := log(1+ǫ) LB(2) range. The following lemma forms the basis for the correctness of the binary search approach: Lemma 7. For i ∈ {imin , . . . , imax }, let γ(i) := (1 + ǫ)i . If imin ≤ i < j ≤ imax , the solutions xi := xalg (γ(i)) and xj := xalg (γ(j)) returned by alg for the weights γ(i) and γ(j), respectively, satisfy f1 (xi ) ≤ f1 (xj ) and f2 (xi ) ≥ f2 (xj ). Proof. Since we assume that alg is an exact algorithm for the weighted sum problem, xi is an optimal solution for the weighted sum problem with weight γ(i). Thus, f1 (xi ) + γ(i) · f2 (xi ) ≤ f1 (xj ) + γ(i) · f2 (xj ). (1) Similarly, since xj is an optimal solution for the weighted sum problem with weight γ(j), we have f1 (xj ) + γ(j) · f2 (xj ) ≤ f1 (xi ) + γ(j) · f2 (xi ). 14 (2) Hence, we obtain that (1) f1 (xi ) ≤ f1 (xj ) + γ(i) · f2 (xj ) − γ(i) · f2 (xi )  = f1 (xj ) + γ(j) · f2 (xj ) + γ(i) − γ(j) · f2 (xj ) − γ(i) · f2 (xi ) (2)  ≤ f1 (xi ) + γ(j) · f2 (xi ) + γ(i) − γ(j) · f2 (xj ) − γ(i) · f2 (xi )   = f1 (xi ) + γ(j) − γ(i) · f2 (xi ) − f2 (xj ) . Subtracting f1 (xi ) on both sides and using that (γ(j) − γ(i)) = (1 + ǫ)j − (1 + ǫ)i > 0 since j > i shows that f2 (xi ) ≥ f2 (xj ), which proves the claimed relation of the f2 -costs. To show the claimed relation of the f1 -cost, we use that (1) f1 (xi ) + γ(i) · f2 (xi ) ≤ f1 (xj ) + γ(i) · f2 (xj ) ≤ f1 (xj ) + γ(i) · f2 (xi ), |{z} | {z } ≥0 ≤f2 (xi ) so subtracting γ(i) · f2 (xi ) from both sides shows that f1 (xi ) ≤ f1 (xj ) as claimed. Lemma 7 shows that we can perform a binary search on the values in {imin , . . . , imax } as follows: If we run alg with weight γ(i) for some i ∈ {imin , . . . , imax } and the resulting solution xi satisfies f1 (xi ) > (1 + 2ǫ) · B, then Lemma 7 shows that f1 (xj ) ≥ f1 (xi ) > (1 + 2ǫ) · B for all j > i. Hence, no value j > i yields a solution that obtains the desired approximation guarantee in the first objective function and we only need to consider the values smaller than i. If, on the other hand, the resulting solution xi satisfies f1 (xi ) ≤ (1 + 2ǫ) · B, then Lemma 7 (with the roles of i and j exchanged) shows that f2 (xj ) ≥ f2 (xi ) for all j < i. Hence, the solution xi obtains the desired approximation guarantee in the first objective function and no value j < i can yield a solution with a better value in the second objective function. Consequently, we only need to consider the values larger than i. When using binary search asdescribed   above on the values in {imin , . . . , imax }, UB(2) calls of alg, which leads to a total we only need O log2 log(1+ǫ) LB(2) 15 running time of         UB(2) 1 UB(2) O Talg · log2 log(1+ǫ) = O Talg · log2 , · log2 LB(2) ǫ LB(2) where Talg denotes the running time of alg. This proves the following theorem: Theorem 8. Given 0 < ǫ ≤ 1 and a polynomial-time exact algorithm alg for the weighted sum problem ΠWS , it is possible to obtain a bicriteria (1 + 2ǫ, 1 + 2ǫ )-approximation algorithm for ΠBudget with running time    O Talg · log2 1 ǫ · log2 UB(2) LB(2) , where Talg denotes the running time of alg. Note that, if we are only given an α-approximation algorithm for the weighted sum problem with α > 1, we cannot perform a binary search as above. The reason is that the solutions returned by the approximation algorithm need not fulfill inequalities (1) and (2), so Lemma 7 does not hold in this more general case. 4.2. Parametric Search We now show how our algorithm can be improved to yield a better approximation guarantee of (1 + ǫ, 1 + 1ǫ ) as well as an improved running time by using Megiddo’s parametric search technique [7, 8] if the polynomial-time exact algorithm alg for the weighted sum problem ΠWS satisfies certain additional assumptions. Specifically, we need to assume that, when alg is applied to the weighted sum problem ΠWS (γ), the value γ is only involved in additions, comparisons, and multiplications by constants during the execution of alg. Additionally, we assume that the solution returned by alg depends on the value of γ only via the outcomes of the comparisons involving γ that are made during the execution of alg, so the returned solution is independent of γ as long as the outcomes of these comparisons do not change. Recall that, by Proposition 3, alg returns a solution obtaining an approximation guarantee of (1+ǫ, 1+ 1ǫ ) if we choose the “correct” weight γ = γ̄. The idea is now to search for a value γ̂ (which need not necessarily be equal to γ̄) for which the corresponding solution returned by alg yields this approximation guarantee parametrically as described by Megiddo’s general method: We run a master copy of the algorithm alg with weight γ (i. e., objective 16 function f1 + γ · f2 ) and keep the value γ as a parameter. The execution of this algorithm will proceed in the same way for all possible values of γ except for points in time where a comparison is made that involves γ. In this case, the outcome of the comparison (and, thus, the path of computation taken by the algorithm) may depend on γ. However, in the input data given to alg, the value γ appears only in the objective function f1 + γ · f2 , whose value at any point depends linearly on γ, and the only operations (besides comparisons) performed during the execution of alg that involve γ are additions and multiplications by constants, which maintain linearity in γ. Hence, any comparison during the execution of alg that involves γ will be between two linear functions of γ. Thus, there will be at most one critical value (say γ ′ ) such that, for γ ≤ γ ′ , one of the functions is greater than or equal to the other and, for γ ≥ γ ′ , this relation is reversed. Hence, the comparison may partition the real line into two subintervals to the left and to the right of γ ′ such that the outcome of the comparison is identical on each subinterval. The central observation is now that, using the monotonicity of the values of f1 and f2 when applied to the optimal solutions of the weighted sum problem for different values of γ shown in Lemma 7, we can resolve the comparison (i. e., decide for either the subinterval to the left or the right of the critical value γ ′ ) by one application of alg with weight γ ′ : If x′ denotes the solution returned by alg for γ ′ and f1 (x′ ) > (1 + ǫ) · B, then the monotonicity observed in Lemma 7 shows that any solution x obtained from alg for a value γ > γ ′ satisfies f1 (x) ≥ f1 (x′ ) > (1 + ǫ) · B. Thus, no value γ > γ ′ yields a solution that obtains the desired approximation guarantee in the first objective function and we can conclude that γ̄ ≤ γ ′ . In particular, we know that the subinterval of the real line to the left of γ ′ still contains a value γ̂ as desired. Thus, we can choose this subinterval and continue with the execution of the master copy of alg by resolving the comparison as in this subinterval. Similarly, if f1 (x′ ) ≤ (1 + ǫ) · B, then the monotonicity observed in Lemma 7 shows that any solution x obtained from alg for a value γ < γ ′ satisfies f2 (x) ≥ f2 (x′ ). Hence, x′ obtains the desired approximation guarantee in the first objective function and no value γ < γ ′ yields a solution with a better value in the second objective function. Thus, we can conclude that there exists some value γ̂ with γ̂ ≥ γ ′ that yields a solution obtaining the desired approximation guarantees in both objective functions, so we can continue the execution of the master copy of alg by resolving the compari17 son as in the subinterval to the right of γ ′ (note that, in this case, we cannot be sure that γ̄ ≥ γ ′ , so the value γ̂ we obtain at the end might be different from γ̄). When the execution of the master algorithm ends, we obtain an interval [a, b] and a solution x of the problem instance such that alg returns the solution x for all γ ∈ [a, b] (since all comparisons involving γ have the same outcome for all γ ∈ [a, b], the solution is independent of the choice of γ ∈ [a, b] by assumption). Moreover, an inductive application of the above arguments shows that [a, b] still contains a value γ̂ whose corresponding solution of the weighted sum problem returned by alg (which must be x) yields the desired approximation guarantee of (1 + ǫ, 1 + 1ǫ ). Consequently, the solution x is as desired. Since we need to call alg once for every comparison made during the execution of the master copy of alg, the running time of the procedure is determined by the number of comparisons in the master copy of alg multiplied with the running time of alg. This proves the following theorem: Theorem 9. Suppose that we are given 0 < ǫ ≤ 1 and a polynomial-time exact algorithm alg for the weighted sum problem ΠWS such that, when alg is applied to the weighted sum problem ΠWS (γ), the value γ is only involved in additions, comparisons, and multiplications by constants and the solution returned by alg depends on the value of γ only via the outcomes of the comparisons involving γ that are made during the execution of the algorithm. Then it is possible to obtain a bicriteria (1+ǫ, 1+ 1ǫ )-approximation algorithm for ΠBudget with running time O (c · Talg ), where Talg denotes the running time of alg and c denotes the number of comparisons performed during one execution of alg. We remark that, in the case that alg is a strongly polynomial-time algorithm, the running time we obtain will also be strongly polynomial (it is at most O ((Talg )2 )). We also remark that, in many cases, it is possible to improve the running time further by exploiting parallelism within alg and resolving several independent comparisons at once by using binary search on the corresponding critical values. We refer to [7, 8] for the details. 5. Obtaining an Approximate Pareto Curve We now show how the method used for obtaining our bicriteria approximation algorithm for ΠBudget can be adjusted in order to compute an ap18 proximate Pareto curve for Π. As in Section 3, we again assume that we are given 0 < ǫ ≤ 1 and a polynomial-time α-approximation algorithm alg for the weighted sum problem ΠWS . Suppose that x̃ is any feasible solution and let B̃ := f1 (x̃), γ̄(B̃) := ǫ·B̃ , opt(B̃) where, as before, opt(B̃) = inf{f2 (x) : x ∈ S, f1 (x) ≤ B̃} denotes the minimum f2 -cost among the feasible solutions with f1 -cost at most B̃. By Proposition 4, we obtain a solution x with f1 (x) ≤ α · (1 + 2ǫ) · f1 (x̃) and f2 (x) ≤ α · (1 + 2ǫ )h· f2 (x̃) if we apply i alg to the weighted sum problem for γ̄(B̃) , (1 1+ǫ + ǫ)γ̄(B̃) . Moreover, since LB(2) ≤ opt(B̃) ≤ h i ǫ·B̃ ǫ·B̃ UB(2), we have γ̄(B̃) ∈ UB(2) . As LB(1) ≤ B̃ = f1 (x̃) ≤ UB(1) , LB(2) for all feasible solutions x̃, this shows that, by applying algto the k weighted j ǫ·LB(1) sum problem with weight γ = (1 + ǫ)i for i = log(1+ǫ) UB(2) up to m  l and forming the union of all returned solutions, we obtain log(1+ǫ) ǫ·UB(1) LB(2) some weight γ ∈ an (α · (1 + 2ǫ), α · (1 + 2ǫ ))-approximate Pareto curve. The total running time obtained is       UB(1) · UB(2) 1 UB(1) · UB(2) O Talg · log(1+ǫ) = O Talg · · log2 , LB(1) · LB(2) ǫ LB(1) · LB(2) where Talg denotes the running time of alg. This proves the following theorem: Theorem 10. Given 0 < ǫ ≤ 1 and a polynomial-time α-approximation algorithm alg for the weighted sum problem ΠWS , it is possible to compute Pareto curve in time an(α · (1 + 2ǫ), α· (1 + 2ǫ ))-approximate  O Talg · 1ǫ · log2 UB(1)·UB(2) LB(1)·LB(2) , where Talg denotes the running time of alg. Analogously to Corollary 6, setting ǫ := 1 shows that we can obtain a (3α, 3α)-approximate Pareto curve in polynomial time whenever a polynomialtime α-approximation algorithm alg for the weighted sum problem is available. We remark that we can obtain a better approximation to the Pareto curve in case that there exists a polynomial-time parametric (α-approximation) algorithm for the weighted sum problem ΠWS . Such an algorithm computes a sequence of (α-approximate) solutions for the weighted sum problem ΠWS (γ) 19 for all γ > 0 simultaneously in polynomial time (the output usually consists of a sequence of polynomially many intervals for γ and a corresponding (αapproximate) solution for each interval). Since Proposition 3 shows that, for any feasible solution x̃, an α-approximate solution x of ΠWS (γ̄(B̃)) satisfies f1 (x) ≤ α · (1 + ǫ) · f1(x̃) and f2 (x) ≤ α · (1 + 1ǫ ) · f2 (x̃), it follows immediately that the set of solutions returned by a parametric α-approximation algorithm is an (α · (1 + ǫ), α · (1 + 1ǫ ))-approximate Pareto curve. The running time for obtaining this set is equal to the running time of the parametric algorithm. 6. Applications Our results are applicable to a vast variety of minimization problems, especially combinatorial problems. In this section, we provide some examples of such problems and examine the specific results obtained from our general method. Here, we focus on the results concerning the computation of approximate Pareto curves. The running time of our method for the corresponding budget-constrained problems can easily be calculated from our general theorems by using the stated running times of the approximation algorithms used for the weighted sum problems. The presented method applies to all bicriteria minimization problems with positive-valued, polynomially computable objective functions for which an α-approximation algorithm for the weighted sum problem exists. For problems in which the two objective functions are of the same type, such an approximation for the weighted sum problem can usually be obtained by using an approximation algorithm for the corresponding unicriterion problem. In many graph problems, e.g., the vertices or arcs of the graph are weighted by positive rational numbers and the feasible solutions correspond to subsets of the vertices or arcs, whose objective function values are given by the sums of the corresponding weights of these vertices/arcs. The weighted sum problem then simply corresponds to the unicriterion problem in which the single weight of each vertex/arc is given by the weighted sum of its two weights from the bicriteria problem. The assumptions needed to apply our method are rather weak and the method can be employed on a large class of bicriteria minimization problems. In particular, our method is applicable to the bicriteria versions of APX-complete problems, which do not admit multicriteria polynomial-time approximation schemes unless P = NP since the corresponding gap problems 20 cannot be solved in polynomial time.3 Hence, the results of Papadimitriou and Yannakakis [1] and the succeeding papers [2, 3, 6] cannot be used for these problems. Thus, the only general method known for computing approximate Pareto curves for these problems is by combining the results of Glaser et al. [4, 5] as mentioned in the introduction, for which no running time analysis is available. Table 1 provides an exemplary list of problems for which our method can be used in order to compute approximate Pareto curves and compares the obtained running times and approximation guarantees to the previously best known methods for computing approximate Pareto curves for these problems. For precise definitions of the specific problems, we refer to the references provided in the table. For most of the mentioned problems, our method provides the first approximation result with an explicit analysis of the running time while at the same time obtaining approximation guarantees that are comparable to the best previously known methods. For other problems, for which an MFPTAS exists, our method yields larger approximation ratios but significantly faster running times than the fastest known MFPTAS. 7. Maximization Problems An obvious question is whether our method can be adapted for bicriteria maximization problems with positive-valued, polynomially computable objective functions.4 In this section, we show that a bicriteria approximation algorithm providing the same approximation guarantees as our method cannot exist for the budget-constrained version of general bicriteria maximization problems unless P = NP.5 To do so, we use a slight modification 3 An NP-optimization problem is in the class APX if it admits a polynomial-time constant-factor approximation algorithm, and it is called APX-complete if it is contained in APX and every problem in APX can be reduced to it via a PTAS reduction. It is known that APX-complete problems do not admit a PTAS unless P = NP. 4 Note that, due to the assumption that the values of the objective functions must be positive, our method cannot be applied to such problems by simply reversing the sign of the objective functions and replacing the maximization by a minimization of all objective functions. 5 Note that, in the case of a maximization problem, the budget constraint imposes a lower bound on the value of the first objective function instead of an upper bound. We still refer to this constraint as a budget constraint here in order keep the terminology consistent with the one used for minimization problems. 21 Prev. Approx. Our Approx. Running Time Alg. for ΠWS Guarantees Guarantee APX-complete problems 3 -approximation [16] 2 Bicrit. metric ( 32 + 3ǫ, 23 + 3ǫ ) with running time (2, 2) [14, 15] not specified [Thm. 10] TSP O(n3 ) Bicrit. min. 2-approximation [17] (4 + 4ǫ, 4 + 4ǫ) (2 + 4ǫ, 2 + 4ǫ ) weight vertex not specified with running time [Thm. 10] using [4, 5] cover O(m) Bicrit. min. 2-approximation [18] (4 + 4ǫ, 4 + 4ǫ) (2 + 4ǫ, 2 + 4ǫ ) not specified k-spanning with running time using [4, 5] [Thm. 10] tree O(m · n4 · log2 n) Problem Bicrit. min. weight edge dom. set (4 + 4ǫ, 4 + 4ǫ) using [4, 5] 22 ((ln(4) + δ)(2 + 2ǫ), Bicrit. min. (ln(4) + δ)(2 + 2ǫ)) weight for any δ > 0 Steiner tree using [4, 5] (2 + ǫ, 2 + ǫ) Bicrit. min. using [4, 5] and no s-t-cut MFPTAS unless P = NP [1] Bicrit. shortest s-t-path not specified not specified not specified 2 MFPTAS [23] m · 1ǫ · max O(n · log2 (n · C 1 ǫ  1ǫ )) ·n3 ·|Pǫ∗ |) Bicrit. min or MFPTAS [2, 3, 6] spanning tree O (m · n5 · |Pǫ∗ |· ⌋, ⌊ n−1 ⌋) τ (⌊ n−1 ǫ ǫ O( Our Running Time    O n3 · 1ǫ · log2 UB(1)·UB(2) LB(1)·LB(2)    O m · 1ǫ · log2 UB(1)·UB(2) LB(1)·LB(2)  O m · n4 · log2 n · 1ǫ ·   log2 UB(1)·UB(2) LB(1)·LB(2)    UB(1)·UB(2) 1 2-approximation [19] O Talg · ǫ · log2 LB(1)·LB(2) , (2 + 4ǫ, 2 + 4ǫ ) (running time not where Talg is the running time [Thm. 10] specified) of the alg. from [19].    ((ln(4) + δ)(1 + 2ǫ), UB(1)·UB(2) 1 (ln(4) + δ)-approxi, · log O T · alg ǫ 2 LB(1)·LB(2) (ln(4) + δ)(1 + 2ǫ )) mation [20] (running where Talg is the running time for any δ > 0 time not specified) of the alg. from [20]. [Thm. 10] Other problems (1 + 2ǫ, 1 + 2ǫ ) [Thm. 10] max. flow algs.    from [21, 22] with O n · m · 1ǫ · log2 UB(1)·UB(2) LB(1)·LB(2) running time O(nm) (1 + ǫ, 1 + 1ǫ ) parametric shortest O(m · n + n2 log2 n) [Thm. 10] and use path alg. from [24] (strongly polynomial, equal to of parametric alg. with running time parametric alg. used) for solving ΠWS O(m · n + n2 · log2 n) (1 + ǫ, 1 + 1ǫ ) parametric min. O(m · n · log2 n) [Thm. 10] and use spanning tree alg. (strongly polynomial, equal to of parametric alg. from [25] that runs in parametric alg. used) for solving ΠWS O(m · n · log2 n) time Table 1: Comparison of our results on the computation of approximate Pareto curves to previous results. |Pǫ∗ | denotes the cardinality of the smallest ǫ-Pareto curve and τ (a, b) denotes the time to multiply two polynomials of maximum degrees a and b. of a construction utilized by Glaßer et. al [5]. They considered a restricted version of the bicriteria maximum weight clique problem to show that certain translations of approximability results from the weighted sum version of an optimization problem to the multicriteria version that work for minimization problems are not possible in general for maximization problems. The bicriteria maximum weight clique problem (2-CLIQUE) is defined as follows: Problem 11 (2-CLIQUE). Given an undirected graph G = (V, E) and a pair of positive rational weights (w1 (v), w2 (v)) ∈ Q2>0 for each vertex v ∈ V , compute a clique (i. e., a subset V ′ ⊆ V of the vertex setP such that every two vertices in V ′ are connected by an edge) maximizing v∈V ′ (w1 (v), w2 (v)) among all cliques in G. Similar to [5], we consider a restricted version of 2-CLIQUE (which we denote by 2-CLIQUErest ) in which an instance consists of an arbitrary graph G with weights (1, 1) for all vertices and two additional isolated vertices x, y that have weights (2n + 1, n1 ) and ( n1 , 2n + 1), respectively, where n = |V |. Note that (when excluding the empty clique that yields objective value zero in both objective functions from the set of feasible solutions) the problem 2-CLIQUErest satisfies all our assumptions (we can choose LB(i) := n1 and UB(i) := 2n+1 for i = 1, 2) except that the objective functions are to be maximized instead of minimized. Moreover, the weighted sum problem corresponding to 2-CLIQUErest can be solved optimally in polynomial time for any γ > 0 as follows: The algorithm simply outputs {x} if γ ≤ 1 and {y} otherwise. We now show, however, that no polynomial-time (α, β)-approximation algorithm can exist for the budget-constrained version of 2-CLIQUErest unless P = NP: Theorem 12. The budget-constrained version of 2-CLIQUErest cannot be approximated in polynomial time with an approximation guarantee (α, β) for any two constants α, β ≥ 1 unless P = NP. Proof. We show that the existence of a polynomial-time (α, β)-approximation algorithm alg for the budget-constrained version of 2-CLIQUErest implies the existence of a β-approximation algorithm for the (unweighted) unicriterion maximum clique problem (which we denote by CLIQUE in the following). Since approximating CLIQUE within any constant factor is NP-hard, this will show the claim. 23 So assume that an (α, β)-approximation algorithm alg for the budgetconstrained version of 2-CLIQUErest exists and consider an arbitrary instance of CLIQUE consisting of an undirected graph G = (V, E) with n vertices. We consider the instance of the budget-constrained version of 2-CLIQUErest defined by the graph G (with weights (1, 1) for all vertices) together with the two isolated vertices x, y with weight (2n + 1, n1 ) and ( n1 , 2n + 1), respectively, and a lower bound of B := 1 on the value of the first objective function. Without loss of generality, we assume that n1 < min{ α1 , βk }, where k denotes the maximum size of a clique within G (this can be achieved by adding additional isolated vertices with weights (1, 1) to G, which increases n, but does not change k). Let W denote the clique returned by alg when applied to this instance of the budget-constrained problem. Since all vertices in V have weight (1, 1), we know that a feasible solution with objective function value k exists for the instance. Hence, the clique W returned by alg must have total weight at least α1 with respect to the first objective function and at least βk with respect to the second objective function. In particular, since y has weight n1 < α1 in the first objective function and x has weight n1 < βk in the second objective function, we have and W 6= {y} and W 6= {x}. Hence, we must have W ⊆ V and, since all vertices in V have weight 1 in the second objective function, we obtain that W is a clique of size at least βk in G. 8. Conclusion This paper provides a novel algorithm for approximating bicriteria minimization problems. It relies on the exact or approximate solution of the weighted sum problem corresponding to the bicriteria problem. Interestingly, in two variants, it is either possible to approximate the budget-constrained problem (also known as the ǫ-constraint scalarization) or the whole Pareto curve. Our algorithm extends the state of the art in several ways: (a) it is generally applicable to a large variety of bicriteria minimization problems, (b) it illuminates the relationship between bicriteria and scalarized unicriterion minimization problems, (c) it provides first ever approximations with an explicit running time analysis for some minimization problems or (d), for other problems, it provides alternative approximations or approximations with an improved running time when compared to the state of the art, and (e) it highlights some principle differences between bicriteria maximization and minimization problems. 24 The work at hand focuses exclusively on bicriteria minimization problems. Three directions of research immediately suggest themselves: First, the question about generalizations to more than two objective functions is certainly interesting. Second, the interplay of other scalarizations of bicriteria problems with respect to approximability should be deeper studied in the future. Third, in view of our result for maximization problems, the possibility of approximating general or a particular class of maximization problems is still an open research question. 9. Acknowledgement The research of Pascal Halffmann was supported by DFG grant RU 1524/4-1, Stefan Ruzika acknowledges support by DAAD project 57128839, and David Willems’ activities were funded by BMBF project 13N12825. References [1] C. Papadimitriou, M. Yannakakis, On the approximability of trade-offs and optimal access of web sources, in: Proceedings of the 41st Annual IEEE Symposium on the Foundations of Computer Science (FOCS), 2000, pp. 86–92. [2] S. Vassilvitskii, M. Yannakakis, Efficiently computing succinct trade-off curves, Theoretical Computer Science 348 (2-3) (2005) 334–356. [3] I. Diakonikolas, M. Yannakakis, Small approximate pareto sets for biobjective shortest paths and other problems, SIAM Journal on Computing 39 (4) (2009) 1340–1371. [4] C. Glaßer, C. Reitwießner, H. Schmitz, M. Witek, Approximability and hardness in multi-objective optimization, in: Proceedings of the 6th Conference on Computability in Europe (CiE), Vol. 6158 of LNCS, 2010, pp. 180–189. [5] C. Glaßer, C. Reitwießner, H. Schmitz, M. Witek, Hardness and approximability in multi-objective optimization, Technical Report TR10-031, Electronic Colloquium on Computational Complexity (ECCC) (2010). [6] C. Bazgan, F. Jamain, D. Vanderpooten, Approximate pareto sets of minimal size for multi-objective optimization problems, Operations Research Letters 43 (1) (2015) 1–6. 25 [7] N. Megiddo, Combinatorial optimization with rational objective functions, Mathematics of Operations Research 4 (4) (1979) 414–424. [8] N. Megiddo, Applying parallel computation algorithms in the design of serial algorithms, Journal of the ACM 30 (4) (1983) 852–865. [9] S. Eubank, V. Kumar, M. V. Marathe, A. Srinivasan, N. Wang, Structure of social contact networks and their impact on epidemics, DIMACS Series in Discrete Mathematics and Theoretical Computer Science 70 (2006) 181–213. [10] M. V. Marathe, R. Ravi, R. Sundaram, S. S. Ravi, D. J. Rosenkrantz, H. B. Hunt, III, Bicriteria network design problems, Journal of Algorithms 28 (1) (1998) 142–171. [11] L. Zadeh, Optimality and non-scalar-valued performance criteria, IEEE Transactions on Automatic Control 8 (1) (1963) 59–60. [12] M. Ehrgott, Multicriteria Optimization, Springer, 2005. [13] Y. Y. Haimes, L. S. Lasdon, D. A. Wismer, On a bicriterion formulation of the problems of integrated system identification and system optimization, IEEE Transactions on Systems Man and Cybernetics 1 (1) (1971) 296–297. [14] C. Glaßer, C. Reitwießner, M. Witek, Improved and derandomized approximations for two-criteria metric traveling salesman, Technical Report TR09-076, Electronic Colloquium on Computational Complexity (ECCC) (2009). [15] C. Glaßer, C. Reitwießner, M. Witek, Improved and generalized approximations for two-objective traveling salesman, Technical Report TR09076 Revision 1, Electronic Colloquium on Computational Complexity (ECCC) (2009). [16] N. Christofides, Worst-case analysis of a new heuristic for the travelling salesman problem, Technical Report 388, Graduate School of Industrial Administration, Carnegie-Mellon University, Pittsburgh (1976). [17] R. Bar-Yehuda, S. Even, A linear-time approximation algorithm for the weighted vertex cover problem, Journal of Algorithms 2 (2) (1981) 198– 203. 26 [18] N. Garg, Saving an epsilon: A 2-approximation for the k-MST problem in graphs, in: Proceedings of the 37th ACM Symposium on the Theory of Computing (STOC), 2005, pp. 396–402. [19] T. Fujito, H. Nagamochi, A 2-approximation algorithm for the minimum weight edge dominating set problem, Discrete Applied Mathematics 118 (3) (2002) 199–207. [20] J. Byrka, F. Grandoni, T. Rothvoß, L. Sanità, An improved LP-based approximation for steiner tree, in: Proceedings of the 42nd ACM Symposium on the Theory of Computing (STOC), 2010, pp. 583–592. [21] J. B. Orlin, Max flows in O(nm) time, or better, in: Proceedings of the 45th ACM Symposium on the Theory of Computing (STOC), 2013, pp. 765–774. [22] V. King, S. Rao, R. E. Tarjan, A faster deterministic maximum flow algorithm, Journal of Algorithms 23 (1994) 447–474. [23] G. Tsaggouris, C. Zaroliagis, Multiobjective optimization: Improved FPTAS for shortest paths and non-linear objectives with applications, Theory of Computing Systems 45 (1) (2009) 162–186. [24] N. E. Young, R. E. Tarjan, J. B. Orlin, Faster parametric shortest path and minimum-balance algorithms, Networks 21 (2) (2006) 205–221. [25] D. Fernández-Baca, G. Slutzki, D. Eppstein, Using sparsification for parametric minimum spanning tree problems, in: Proceedings of the 5th Scandinavian Workshop on Algorithm Theory (SWAT), Vol. 1097 of LNCS, 1996, pp. 149–160. Appendix 1 We show that we can relax the assumption of strictly positive objective values by only assuming nonnegativity of the objective values in the case that we can compute positive rational numbers LB(I, i), UB(I, i) for i = 1, 2 such that LB(I, i) ≤ fi (I, x) ≤ UB(I, i) for every feasible solution x ∈ S(I) with fi (I, x) > 0 in polynomial time. 27 To this end, note that the image of the Pareto curve for a given instance I of Π can contain at most one point (a, 0) with second component zero and at most one point (0, b) with first component zero. We show that, by applying the α-approximation algorithm alg to the corresponding instance of the weighted sum problem ΠWS (γ) for two suitably chosen values of γ, we can compute solutions whose images approximate these points (a, 0) and (0, b) within the desired approximation guarantees in polynomial time. For the rest of the Pareto curve, we can then apply our method using the assumption that the objective values are strictly positive. So first assume that a point with image (a, 0) exists on the Pareto curve for a given instance I. We apply alg to the corresponding instance of the weighted sum problem ΠWS (γ) for some γ > α · UB(I,1) . Since alg is an LB(I,2) α-approximation algorithm for the weighted sum problem, the resulting solution xalg = xalg (γ) satisfies f1 (I, xalg ) + γ · f2 (I, xalg ) ≤ α · (a + γ · 0) = α · a. As γ·f2 (I, xalg ) ≥ 0, this implies that f1 (I, xalg ) ≤ α·a ≤ α·(1+2ǫ)·a. Hence, f (I, xalg ) approximates (a, 0) with the desired approximation guarantee in the first component. Moreover, since also f1 (I, xalg ) ≥ 0, we also obtain that γ · f2 (I, xalg ) ≤ α · a, so by our choice of γ and since a ≤ UB(I, 1): f2 (I, xalg ) ≤ α·a a · LB(I, 2) < ≤ LB(I, 2). γ UB(I, 1) Hence, using the definition of LB(I, 2), we obtain that f2 (I, xalg ) = 0. In particular, f (I, xalg ) approximates (a, 0) with the desired approximation guarantee in the second component. Now assume that a point with image (0, b) exists on the Pareto curve for a given instance I. We apply alg to the corresponding instance of the LB(I,1) weighted sum problem ΠWS (γ) for some 0 < γ < α·UB(I,2) . Since alg is an α-approximation algorithm for the weighted sum problem, the resulting solution xalg = xalg (γ) now satisfies f1 (I, xalg ) + γ · f2 (I, xalg ) ≤ α · (0 + γ · b) = α · γ · b. Using the choice of γ and that γ · f2 (I, xalg ) ≥ 0 and b ≤ UB(I, 2), this implies that f1 (I, xalg ) ≤ α · γ · b < b · LB(I, 1) ≤ LB(I, 1). UB(I, 2) 28 Hence, using the definition of LB(I, 1), we obtain that f1 (I, xalg ) = 0. In particular, f (I, xalg ) approximates (0, b) with the desired approximation guarantee in the first component. Moreover, since f1 (I, xalg ) ≥ 0 and γ > 0, we also obtain that f2 (I, xalg ) ≤ α · b ≤ α · (1 + 2ǫ ) · b. Thus, f (I, xalg ) also approximates (0, b) with the desired approximation guarantee in the second component. Appendix 2 We identify two problems in the parametric search algorithm presented in Section 6 of [10]. Marathe et al. [10] consider general bicriteria network design problems. In a generic bicirteria network design problem, one is given an undirected graph G = (V, E), two positive-valued objective functions f1 and f2 , and a budget B > 0 on the value of the first objective function and the task is to find a subgraph from a given subgraph-class that minimizes the second objective function subject to the budget (upper bound) on the first objective function. For example, if the considered subgraph-class consists of all the spanning trees of G and the two objective values assigned to a spanning tree are the total costs of the edges in the tree with respect to two different sets of edge costs, one obtains the budget-constrained version of the bicriteria minimum spanning tree problem. In Section 6 of [10], the authors present a bicriteria approximation algorithm that applies whenever the two objectives in the considered bicriteria network design problem are of the same type (e.g., both are total costs of edges computed using two different sets of edge costs as in the bicriteria minimum spanning tree problem). They claim that, when given ǫ > 0 and a polynomial-time α-approximation algorithm alg for the weighted sum problem (which corresponds to the unicriterion problem of minimizing the first objective function f1 due to the assumption that both objective functions are of the same type), their method yields is a bicriteria (α · (1 + ǫ), α · (1 + 1ǫ ))approximation algorithm. Parametric Search Algorithm (Marathe et al. [10]) 1. Input: Graph G, budget B > 0, accuracy parameter ǫ > 0, α-approximation algorithm alg for the weighted sum problem. 29 2. Compute an upper bound UB(2) on the second objective function value f2 (x) of all feasible subgraphs x with f1 (x) ≤ B. 3. For any D > 0, let h(D) denote the objective function value of the subgraph returned by alg when applied with the weighted sum objective function D · f1 + f2 . B 4. Perform a binary search over the interval [0, ǫ · UB(2)] to find a D ′ ∈ [0, ǫ · UB(2)] such that • • h(D ′ ) >α D′ ′ h(D +1) ≤ D ′ +1 · (1 + ǫ), α · (1 + ǫ). 5. If the binary search fails to find a valid D ′ , return “No Solution”, else return the solution computed by alg when applied with the weighted ′ sum objective function DB+1 · f1 + f2 . The correctness and approximation guarantee of the algorithm are shown in [10] by establishing two claims. The first one (Claim 6.1 in [10]) states that the binary search performed in the algorithm is well-defined. To estabis monotone lish this claim, the authors try to show that the fraction h(D) D nonincreasing in D. However, the following example shows that this function is not monotone in general, which implies that the binary search performed in the algorithm is not well-defined: Example 1. Consider the instance of the budget-constrained version of the bicriteria minimum spanning tree problem given by the budget B = 2 and the graph shown in Figure 1. (1 ,1) 2 (3 ,3) 1 (1,1) 3 Figure 1: Graph with two positive costs on each edge used in Example 1. Obviously, there are three possible spanning trees x1 , x2 , and x3 with objective function values (f1 (x1 ), f2 (x1 )) = (4, 2), (f1 (x2 ), f2 (x2 )) = (2, 4) 30 and (f1 (x3 ), f2 (x3 )) = (4, 4). Since we consider a budget of B = 2, we can use the upper bound UB(2) = 4 within the algorithm. The the accuracy parameter is set to ǫ = 1. Although there are exact algorithms that solve the weighted sum problem in polynomial time in this case, suppose that a 5 -approximation algorithm alg is used. 4 at two points of the interval [0, 4] = We now evaluate the fraction h(D) D D [0, ǫ · UB(2)]. To do so, let ĥ(x, D) := B · f1 (x) + f2 (x) denote the objective function value of spanning tree x in the weighted sum problem for parameter D. • For D1 := 3, we get ĥ(x1 , 3) = 8, ĥ(x2 , 3) = 7, and ĥ(x3 , 3) = 10. Here, x2 is the optimal solution. If alg returns this solution, we get h(3) = 73 . 3 • For D2 := 4, we get ĥ(x1 , 4) = 10, ĥ(x2 , 4) = 8, and ĥ(x3 , 4) = 12. Although x2 is again the optimal solution, it might happen that alg returns x1 (which does not contradict the approximation guarantee of = 25 . alg since 10 ≤ 45 · 8). Then we obtain h(4) 4 Consequently if alg returns the solutions as stated above, we obtain that h(3) = 37 < 52 = h(4) and h(D) is not monotone nonincreasing in D on the 3 4 D considered interval [0, ǫ · UB(2)] = [0, 4]. The reason that the claimed monotonicity of the fraction h(D) fails is that D an approximation algorithm is used for the weighted sum problem. If an exact algorithm is used for the weighted sum problem, the monotonicity follows from the proof of Claim 6.1 given in [10]. In the general case where alg is only an approximation algorithm, however, the algorithm cannot be used due to the ill-defined binary search (this problem cannot be circumvented by replacing the binary search by a linear search since this would not yield a polynomial-time algorithm anymore). We now provide a second example showing that, even if an exact algorithm is used to solve the weighted sum problem, Claim 6.2 in [10] (which states that the algorithm always outputs a solution obtaining the desired approximation guarantee) does not always hold: Example 2. Consider the instance of the budget-constrained version of the bicriteria minimum spanning tree problem given by the budget B = 3 and the 31 (2 ,1 ) 2 (2 ,1 ) 1 (1,2) 3 Figure 2: Graph with two positive costs on each edge used in Example 2. graph shown in Figure 2. Again, there are three possible spanning trees x1 , x2 , and x3 . The corresponding objective function values are (f1 (x1 ), f2 (x1 )) = (4, 2), and (f1 (x2 ), f2 (x2 )) = (f1 (x3 ), f2 (x3 )) = (3, 3). Since we consider a budget of B = 3, we can use the upper bound UB(2) = 3 within the algorithm. The accuracy parameter is set to ǫ = 23 , so we obtain [0, ǫ · UB(2)] = [0, 2]. In order to solve the weighted sum problem (which is a unicriterion minimum spanning tree problem), we use an exact algorithm alg (so α = 1). Now consider the values h(D) for 0 ≤ D ≤ 3. For those values of D, we have (using the notation introduced in Example 1) ĥ(x1 , D) = 4 · D + 2 ≤ D + 3 = ĥ(x2 , D) = ĥ(x3 , D), 3 so h(D) = 34 · D + 2. Hence, for all values of D in the considered interval [0, ǫ · UB(2)] = [0, 2], we obtain 4 2 D≤2 4 2 2 h(D + 1) ≥ = + + > 1 + = α · (1 + ǫ). D+1 3 D+1 3 3 3 Consequently, there is no D ∈ [0, 2] = [0, ǫ · UB(2)] that fulfills both inequalities in step 4 of the algorithm and the algorithm returns “No Solution”. However, with x2 and x3 , there exist two feasible solutions that satisfy the given budget of B = 3 on the first objective function. 32
8cs.DS
arXiv:1610.00653v2 [cond-mat.stat-mech] 29 Aug 2017 Phase transitions in distributed control systems with multiplicative noise Nicolas Allegra1,2 , Bassam Bamieh1 , Partha Mitra3 and Clément Sire4 1 3 4 Department of Mechanical Engineering, University of California, Santa Barbara, USA Cold Spring Harbor Laboratory, Cold Spring Harbor, NY, USA Laboratoire de Physique Théorique, Université de Toulouse, UPS, CNRS, F-31062 Toulouse, France Abstract. Contemporary technological challenges often involve many degrees of freedom in a distributed or networked setting. Three aspects are notable: the variables are usually associated with the nodes of a graph with limited communication resources, hindering centralized control; the communication is subjected to noise; and the number of variables can be very large. These three aspects make tools and techniques from statistical physics particularly suitable for the performance analysis of such networked systems in the limit of many variables (analogous to the thermodynamic limit in statistical physics). Perhaps not surprisingly, phase-transition like phenomena appear in these systems, where a sharp change in performance can be observed with a smooth parameter variation, with the change becoming discontinuous or singular in the limit of infinite system size. In this paper we analyze the so called network consensus problem, prototypical of the above considerations, that has been previously analyzed mostly in the context of additive noise. We show that qualitatively new phase-transition like phenomena appear for this problem in the presence of multiplicative noise. Depending on dimensions and on the presence or absence of a conservation law, the system performance shows a discontinuous change at a threshold value of the multiplicative noise strength. In the absence of the conservation law, and for graph spectral dimension less than two, the multiplicative noise threshold (the stability margin of the control problem) is zero. This is reminiscent of the absence of robust controllers for certain classes of centralized control problems. Although our study involves a ”toy” model we believe that the qualitative features are generic, with implication for the robust stability of distributed control systems, as well as the effect of roundoff errors and communication noise on distributed algorithms. PACS numbers: 05.10.-a, 02.30.Yy , 89.75.Fb Submitted to: JSM Contents 1 Introduction 1.1 Example of a simple Laplacian consensus algorithm . . . . . . . . . . . . . . . . . . . . . . . . 1.2 Plan of the article . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 Consensus algorithms in a random environment 2.1 Definition of the system and conservation laws . 2.2 Correlations induced by exact conservation . . . 2.2.1 Asymmetric links . . . . . . . . . . . . . . 2.2.2 Symmetric links . . . . . . . . . . . . . . 2.2.3 Isotropic links . . . . . . . . . . . . . . . . 2.2.4 Gain noise . . . . . . . . . . . . . . . . . . 2.3 Average conservation law . . . . . . . . . . . . . 3 3 5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 6 7 7 8 9 9 10 3 Threshold behavior of the network coherence 3.1 Phase diagram of the exactly conserved model . . . . . . . . . . 3.1.1 Noise threshold in any dimension . . . . . . . . . . . . . 3.1.2 Finite size dependence of the coherence . . . . . . . . . 3.1.3 Exponential regime above the noise threshold . . . . . 3.2 Phase diagram of the average conserved model . . . . . . . . . 3.2.1 Noise threshold in high dimensions . . . . . . . . . . . . 3.2.2 Robustness of the coherence and finite-size dependance 3.3 A word on the other forms of symmetry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 10 11 12 13 14 14 16 17 4 Summary and conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 2 1. Introduction Phase transition phenomena have played a central role in twentieth century theoretical physics, ranging from condensed matter physics to particle physics and cosmology. In recent decades, phase transition phenomena, corresponding to non-analytic behavior arising from large system-size limit in systems of many interacting variables, have increasingly appeared in the engineering disciplines, in communications and computation [1], robotics [2, 3], control theory [4, 5] and machine learning. Related phenomena have also been noted in behavioral biology [6], social sciences [7] and economics [8, 9]. It is not as widely appreciated that phase transition-like behavior may also be observed in distributed control systems (or distributed algorithms) with many variables, for similar mathematical reasons that they appear in statistical physics, namely the presence of many interacting degrees of freedom. Problems in a variety of engineering areas that involve interconnections of dynamic systems are closely related to consensus problems for multi-agent systems [10]. The problem of synchronization of coupled oscillators [11] has attracted numerous scientists from diverse fields ([12] for a review). Flocks of mobile agents equipped with sensing and communication devices can serve as mobile sensor networks for massive distributed sensing [13, 2, 4]. In recent years, network design problems for achieving faster consensus algorithms has attracted considerable attention from a number of researchers [14]. Another common form of consensus problems is rendezvous in space [15, 16]. This is equivalent to reaching a consensus in position by a number of agents with an interaction topology that is position induced. Multi-vehicle systems are also an important category of networked systems due to their technological applications [17]. Recently, consensus algorithms had been generalized to quantum systems [18] and opening new research directions towards distributed quantum information applications [19]. In contrast to the above mentioned work, a relatively less studied problem is that of robustness or resilience of the algorithms to uncertainties in models, environments or interaction signals. This is the central question in the area of Robust Control, but it has been relatively less studied in the context distributed control systems. This issue is quite significant since algorithms that work well for a small number of interacting subsystems may become arbitrarily fragile in the large-scale limit. Thus, of particular interest to us in this paper is how large-scale distributed control algorithms behave in various uncertainty scenarios. Additive noise models have been studied in the context of networked consensus algorithms [20, 21], including scaling limits for large networks [22, 23]. More relevant to the present work are uncertainty models where link or node failures, message distortions, or randomized algorithms [24, 25, 26, 27, 28] are modeled by multiplicative noise. In this latter case, the phenomenology is much richer than the case of only additive noise. The basic building block of multi-agent and distributed control systems is the so-called consensus algorithm. In this paper we develop a rather general model of consensus algorithms in random environments that covers the above mentioned uncertainty scenarios, and we study its large-size scaling limits for d-dimensional lattices. We now motivate the problem formulation of this paper using a simple version of the consensus algorithm. 1.1. Example of a simple Laplacian consensus algorithm We consider a local, linear first-order consensus algorithms over an undirected, connected network modeled by an undirected graph G with N nodes and M edges. We denote the adjacency matrix of G by A, and D is the degree matrix. The Laplacian matrix of the graph G is denoted by L and is defined as L = D − A. In the first-order consensus problem, each node i has a single state ui (t). The state of the entire system at time t is given by the vector u(t) ∈ RN . Each node state is subject to stochastic disturbances, and the objective is for the nodes to maintain consensus at the average of their current states. The dynamics of this system in continuous time is given by u̇(t) = −αLu(t) + n(t), (1) where α is the gain on the communication links, and n(t) ∈ R number of systems. A few examples are N is a white noise. This model covers a large • In flocking problems ui (t) is the current heading angle of a vehicle or agent [6]. L is the Laplacian of the agents’ connectivity network determined by e.g. a distance criterion. The disturbance ni (t) models random forcing on the i’th agent. 3 • In load balancing algorithms for a distributed computation network ui (t) is the current load on a computing node. L is the Laplacian of the connectivity graph [29, 30] . The disturbance ni (t) models arriving (when positive) or completed (when negative) jobs. • In distributed sensing networks [13, 2, 4], the i’th sensor makes a local measurement ui (0) of a global quantity. The aim is for the sensors to communicate and agree on the value of the sensed quantity without having a central authority, thus they communicate locally based on a connectivity graph with L as its Laplacian. The dynamics (3) represents averaging of each sensor with their neighbors, while the disturbances ni (t) can represent the effective noise in communicating with neighbors. The aim is for all sensors to reach the samePestimate (which would be the initial network mean) asymptotically, i.e. for each i, limt→∞ ui (t) = N1 i ui (0). We should note that in much of the literature, the algorithm Eq. (3) has been studied for finite systems and in the absence of disturbances n(t). In the large-scale limit however, there are significant differences in phenomenology between the disturbance-free versus the uncertain scenarios. In the absence of disturbances and for a connected graph, the system Eq. (3) converges asymptotically to the average of the initial states. With the additive noise term, the nodes do not converge to consensus, but instead, node values fluctuate around the average of the current node states. Let us denote the spatial average across the network (”network mean”) of the sites by m(t), m(t) = N 1 X uk (t). N (2) k=1 In the absence of noise, m(t) = m(0) for a finite graph. Although m(t) shows a diffusive behavior for finite sized networks in the presence of additive noise, the diffusion coefficient is proportional to 1/N so that in the infinite lattice size limit one still obtains m(t) = m(0). This can be seen by spatially averaging the consensus equation. The noise-free dynamics preserves the spatial average (equivalently, the Graph Laplacian is chosen to be left stochastic), so in the absence of noise ṁ(t) = 0. In the presence of the additive noise, 1 X m˙N (t) = ni (t), (3) N i Assuming the noise is uncorrelated between sites, this means that var(mN (t)) ∝ Nt , so that limN →∞ var(mN (t)) = 0. Thus, in the infinite lattice size limit, m(t) = m(0). Note that this continues to be the case for the multiplicative noise model discussed in the paper when there is a conservation law that preserves the network mean in the absence of the additive noise component. The spatial variance across the lattice sites has been called the ”network coherence” in previous work [23]. N   1 X var ui (t) − m(t) , t→∞ N i=1 ∞ CN := lim (4) Note that in the infinite size limit for the consensus problem with additive noise m(t) = m(0) so the spatial variance (”network coherence”) also characterizes the variance of the individual site variables from the desired mean m(0) at the initial time. If this variance is finite in the limit of large N, then under the consensus dynamics the individual lattice sites settle down to stationary fluctuations around the desired initial spatial mean, and this quantity can be recovered from a single site at long times, by taking a time average. ∞ It has been shown that CN is completely determined by the spectrum of the matrix L (see [10] for a review). Let the eigenvalues of L denoted by 0 = λ1 < ... < λN . The network coherence is then equal to ∞ CN := N 1 X 1 . 2αN i=2 λi (5) 4 A classical result [23] shows that, if one considers the network to be Zd , then the large-scale (N → ∞) properties of the coherence show the following behavior  in d = 1  N ∞ log N in d = 2 CN ∼ (6)  1 in d > 2. Compared to a perfect Laplacian algorithm (without additive noise), the addition of disturbances makes the system unable to reach the global average in low dimensions. In higher dimensions, the network coherence becomes finite and the algorithm performs a statistical consensus at large time. This result shows that there are fundamental limitations to the efficiency of the algorithm for a large-scale system in presence of additive noise in low dimensions. Let us mention that this algorithm can be extended to a second-order dynamic where each nodes has two state variables u(t) and v(t). These system dynamics arise in the problem of autonomous vehicle formation control (the state of a node is given by the position and velocity of the vehicle). The vehicles attempt to maintain a specified formation traveling at a fixed velocity while subject to stochastic external perturbations and a similar coherence definition can be introduced, and the scaling of the coherence with N has been computed [23] and similar dimensional limitations has been unraveled. Robustness and Multiplicative Noise In engineering systems, N may be large but perhaps not as large as might be considered in condensed matter problems. In the distributed control setting, one can give a robustness interpretation of asymptotic limits like Eq. (6). For example, in the d = 1 case (which is relevant to the so-called automated vehicular platoons problem [23]) one can say that as the formation size increases, it becomes susceptible to arbitrarily small forcing disturbances. A more proper robustness interpretation however requires considering scenarios with multiplicative noise as a model for uncertain system dynamics, and not just uncertain forcing or measurement noise (which is typically modeled with additive noise). Consider the following more general version of Eq. (3) u̇(t) = −αL(t) u(t) + n(t), (7) where the Laplacian L(t) is now a time-varying matrix with some “structured” randomness. This is now a multiplicative noise model since the randomness multiplies the state u(t). This is used to model effects of random environments such as networked algorithms in which links or nodes may fail randomly, randomly varying system parameters, round-off error in floating-point arithmetic, or more generally any random errors that are proportional to the current state [24, 25, 26, 27, 28]. If arbitrarily small probabilities of error in L(t) can produce large effects in the dynamics of Eq. (7) then the algorithms are fragile and lack robustness. The main question in this paper is to study a fairly general model of networked algorithms in random environments like Eq. (7). In particular, we study scaling limits in d-dimensional lattices, and characterize how the system responds to multiplicative noise and whether (or not) the algorithm can remain stable and perform its task once some arbitrary small multiplicative noise in incorporated. It is highly unlikely that taking account of multiplicative noise (with variance σ 2 ) is going to improve the scaling in low dimensions, but the challenge is to characterize the robustness of the algorithm in high dimensions. This measure of robustness can be quantified by the amount of noise variance σ 2 that the system can sustain before hitting a threshold σc2 above which the algorithm becomes unstable and the coherence grows unboundedly. The range of noise 0 6 σ 2 < σc2 , (8) in which the coherence is bounded is often called margin of stability in the control literature [31]. The main goal of this article is to quantify this margin, and to explicitly give its behavior in a wide range of models. 1.2. Plan of the article The plan of the article is the following, after the introduction of the general system and its main properties, we shall discuss the several conservation laws that one might consider and the effects on the correlations 5 in the system. Furthermore, different cases of the form of the random environment, which is modeled by multiplicative random variables will be analyzed, leading to various types of correlations between the different degrees of freedom of our model. The main part of the article will be the study of the time-behavior of the network coherence Eq. (14) via the 2-point correlation function. We shall see that, depending on the conservation law that we are imposing in our system, different behaviors of the coherence is found. The stability margin Eq. (8), introduced in the previous section, shall be fully characterized and its explicit value will be given for each considered cases. The complete phase diagram of the network-coherence will be explored in any dimension, with an emphasis on the presence of a noise- threshold between various large-scale behaviors. The phase diagrams shall be explained in a more general point of view by analyzing the various universality classes of the system and making contact with the well-known phenomenology of disordered systems. Although our results are derived for first-order consensus algorithms Eq. (3), we expect qualitatively similar behaviors to occur in higher-order consensus algorithms such as those used in vehicular formation control [23]. 2. Consensus algorithms in a random environment 2.1. Definition of the system and conservation laws In this section, one introduces a class of algorithms generalizing the noisy Laplacian algorithm Eq. (3). The generalized algorithm is a discrete-time stochastic evolution for the quantity ui (t) ∈ R with both additive and multiplicative noises. Let us define the system with a general coupling kernel K on a square-lattice of size L and dimension d X ui (t + 1) = ξij (t)K(ri , rj )uj (t) + Vi (t)ui (t) + ni (t), (9) j where ξij (t), Vi (t) are random variables with mean hξi and hV i, and Vi being the neighborhood of the site i. Here we choose the convention that ξii (t) = 0 such that the off-diagonal randomness is only in Vi . The link ξij (t) and onsite Vi (t) variables are Gaussian variables with correlations that will be detailed in the next sections. The additive noise is centered and uncorrelated in space and time with variance σn2 hni (t)i = 0, 0 hni (t)nj (t )i = (10) σn2 δij δtt0 , (11) where δab is the Kronecker symbol. The system is translationally invariant so that K(ri , rj ) = K(ri − rj ). In the following, we shall use the convenient notation Ki−j := K(ri − rj ). We assume also that the distributions do not vary with time. As a consequence, all the moments of the different variables do not depend of the space-time coordinates ( e.g. hξij (t)p i = hξ p i ∀i, j). Let us define the variances σξ2 = hξ 2 i − hξi2 and σV2 = hV 2 i − hV i2 . In the spirit of Eq. (3), the system can be written in a matrix form u(t + 1) = M(t)u(t) + n(t), (12) where the matrix M(t) is a time-dependent random matrix with matrix elements Mij (t) = Ki−j ξij (t)+δij Vj (t) and n(t) is the additive noise vector. This algorithm is a generalization of Eq. (3) in which the Laplacian matrix is replaced by a time-dependent random matrix. The problem is then related to the asymptotic properties of product of random matrices (see [32] or [33, 34] for example in the context of consensus and wireless communications). The exponential growth rate of the matrix powers Mt as t → ∞ is controlled by the eigenvalue of M with the largest absolute value. While the stationary distribution was guaranteed in the additive model Eq. (3), the multiplicative model Eq. (9) may or may not have a stationary solution depending on the parameters and the dimension d. The mean value can be written  hui (t + 1)i = kKk1 hξi + hV i hui (t)i, (13) P where kKk1 = i Ki . Then obviously hui (t)i = 0 when hV i = −kKk1 hξi and hu(t + 1)i = hui (t)i when hV i = 1 − kKk1 hξi. In general, the sequence converges if |(kKk1 hξi + hV i| 6 1 and diverges otherwise for a 6 positive initial condition hu(0)i > 0. One way of studying the margin will be to compute the time-behavior of the coherence d CL (t) = d L L 1 X 1 X h(u (t) − m(t))(u (t) − m(t)))i = Gr (t) − hm(t)i2 , r 0 Ld r=1 Ld r=1 (14) where Gr (t) is the local 2-point correlation function hur (t)u0 (t)i that captures correlations between an P arbitrary node 0 and a node r and m(t) = L−d i ui (t) being the space average of the value ui (t). The term hm(t)i2 is stationary if |(kKk1 hξi + hV i| 6 1. Therefore the time-evolution of CL (t) is simply governed by the time-evolution of Gr (t). This function will be the main quantity that one will be interested in to characterize the scaling behavior of the performance of the algorithm. In the following, we shall impose the time conservation of the average m(t) either exactly or in average at the thermodynamic limit L → ∞. 2.2. Correlations induced by exact conservation In this section, P we summarize all the particular cases of Eq. (12), while preserving conservation of m(t) exactly (i.e i Mij = 1) at the thermodynamic limit. The randomness is fully defined by specifying the form of the correlations hMij (t)Mpq (t)i. The exact conservation is defined by m(t + 1) = m(t) . As a P consequence the matrix M satisfies column-stochasticity i Mij = 1. Hence, it is straitforward to show that we need to impose X Vj (t) = 1 − ξij (t)Ki−j , (15) i for that conservation law to be satisfied Let us notice that the summation is over the first index, while it is on the second in the evolution equation Eq. (9). In this case, the multiplicative quantities are linearly dependent and one can write everything in terms of the variance of one or the other. Additionally one can assume many different form for the link variables ξij (t). The simplest case is to assume that ξij (t) and ξji (t) are independent, this assumption does not add any new correlation between the onsite variables Vi (t). The opposite scenario is to consider ξij (t) = ξji (t) which enforces correlations between onsite variables as we shall see in the following. We will also consider both cases where the link variables ξij (t), depend only on one index, i.e. ξij (t) = Jj (t) and ξij (t) = gi (t) which we call respectively isotropic and gain noise cases. For each considered possibilities, we shall explicitly compute the relevant correlations that we will need later on for the calculation of the coherence and in particular for the calculation of Gr (t). 2.2.1. Asymmetric links Now let us consider the model with asymmetric links ξij (t) 6= ξji (t). (16) The model can be seen as acting on a directed graph where the incoming and outgoing links are two different independent random variables. As we saw in the previous section, exact conservation enforces X Vi (t) = 1 − ξki (t)Kk−i then hV i = 1 − hξikKk1 . (17) k Let us write down an explicit example (ignoring the additive noise) for a line with three sites with closed boundary conditions and nearest-neighbors interactions. The evolution equation Eq. (9), written in the matrix form Eq. (12), reads    ui−1 (t + 1) Vi−1  ui (t + 1)  =  ξi,i−1 ui+1 (t + 1) 0 ξi−1,i Vi ξi+1,i 0 ξi,i+1 Vi+1   ui−1 (t)   ui (t)  , ui+1 (t) (18) where the column-stochastic condition is Vi−1 (t) = 1 − ξi,i−1 (t), (19) Vi (t)) = 1 − ξi−1,i − ξi+1,i (t), Vi+1 (t) = 1 − ξi,i+1 . 7 ξi,i−1 Vi−1 ξi+1,i Vi+1 Vi ξi−1,i ξi,i+1 Figure 1. Diagram corresponding to the asymmetric case. It describes the simplest example defined by Eq. (18) and Eq. (19). The link variables are four different uncorrelated random variables (represented by different colors). The rules are the following, the arrows exiting site i correspond to the quantity which is distributed to the neighbors. And the arrows coming in i represent the quantity that is given from the neighbors. ξi,i−1 Vi−1 ξi,i+1 Vi+1 Vi ξi,i−1 ξi,i+1 Figure 2. Diagram corresponding to the symmetric case for the example Eq. (18). The link variables are now the same ξij (t) = ξji (t) between two neighbors. We can check that ui−1 (t + 1) + ui+1 (t + 1) + ui (t + 1) = ui−1 (t) + ui (t) + ui+1 (t) ‡. In that case, the matrix M is not correlated, all the entries are independent. It can be useful to write Eq. (18) and Eq. (19) as a diagram (see Fig .(1) ). The rules are the following, the arrows exiting site i correspond to the quantity which is distributed to the neighbors. And the arrows coming in i represent the quantity that is given from the neighbors. With exact conservation law, the variances of the link and on-site noises are related by pP 2 σV2 = kKk2 σξ2 , where kKk = i Ki . Consequently, the correlations between the link variables and the on-site variables take the form hξrp (t)V0 (t)i − hξihV i = −σξ2 Kr δp,0 . (20) The exact conservation law spatially correlates the link and on-site variables together. Because of Eq. (17), there is no cross-correlation between onsite variables at different sites hVr (t)V0 (t)i − hV i2 = σV2 kKk2 δr,0 . (21) That shows that the onsite variables are simply uncorrelated in space. This asymmetric link assumption will be fully detailed in the next sections, but it will be useful to explore the other cases for a better understanding of the differences. The asymmetric case is the only one which does not create correlations inside the matrix M , as we shall see next. 2.2.2. Symmetric links Now let us consider the same model but with symmetric links ξij (t) = ξji (t), (22) and where one still have the deterministic relation Eq. (15) between the variables. The example of the past section can be written as well and the diagram becomes the following. In that situation, the matrix M is now doubly-stochastic because of the symmetry, but not uncorrelated anymore. The corresponding diagram ‡ Let us remark that hV i = 1 − hξikKk1 is not satisfied here because our example is not invariant by translation. 8 can be seen on (see Fig .2 ) Indeed the symmetry induced some counter-diagonal correlations in the matrix M. Here we still have the relation σV2 = kKk2 σξ2 and hξrp (t)V0 (t)i − hξihV i = σξ2 Kr δp,0 , (23) like in the previous model. The main difference comes from the fact that the V ’s are now spatially correlated, and using Eq. (15) one finds  hVr (t)V0 (t)i − hV i2 = σξ2 kKk2 δr,0 + K2r . (24) We can observe, that the onsite variables are not delta-correlated anymore but are short-range correlated with a correlation kernel K2r . The symmetry between links induces correlations between the onsite variables at different positions. § 2.2.3. Isotropic links Let us consider the case where, the link variable does not depend on the first index ξij (t) := Jj (t), (25) σJ2 , of variance then all the out-going links have the same value, but the incoming links are independent. The diagram of Eq. (9) in that case is Fig .3. In that case, one has X Vi (t) = 1 − Ji (t) Kk−i = 1 − Ji kKk1 . (26) k σV2 σJ2 2 P (kKk1 ) where kKk1 = i Ki . The exact conservation condition implies row-stochasticity of = and the matrix M. In that case, the correlations between the link variables and the on-site variables are Ji−1 Ji Vi−1 Vi+1 Vi Ji+1 Ji Figure 3. Diagram corresponding to the isotropic case ξij (t) = Jj (t) for the example Eq. (18). The outgoing links are equal (red) and the incoming are different uncorrelated random variables (blue and green). hJr (t)V0 (t)i − hJihV i = −σJ2 kKk1 δr,0 . (27) Because of Eq. (26), there is no correlations between Vr (t) and V0 (t) at different sites 2 hVr (t)V0 (t)i − hV i2 = σJ2 (kKk1 ) δr,0 . (28) Contrary to previous symmetric case, the isotropic assumption does not couple the on-site variables. This case is actually very interesting because of the form of the matrix M, although it will not be discussed in this article. 2.2.4. Gain noise The last case that one might be interested in here is ξij (t) := gi (t), of variance have σg2 . (29) This assumption can be seen as the opposite of the previous isotropic situation. Here we Vi (t) = 1 − X gk (t)Kk−i . (30) k The diagram is now Fig .4 (notice that the diagram is reversed compared to the previous isotropic case). The relation between the variances is now σV2 = kKk2 σg2 . Here the exact conservation condition implies 9 gi+1 gi Vi−1 Vi+1 Vi gi−1 gi Figure 4. Diagram corresponding to the gain noise case ξij (t) = gi (t) for the example Eq. (18). The incoming links are equal (red) and the outgoing are different independent random variables (blue and green). column-stochasticity of the matrix M. The correlations between link variables and on-site variables take the form hgr (t)V0 (t)i − hgihV i = −σg2 Kr . (31) The correlations between the onsite variables are also different, one can show that hVr (t)V0 (t)i − hV i2 = σg2 kKk1 Kr . (32) 0 In this case, the V s are spatially correlated by the kernel Kr du to the form of the links and are also correlated with the links with the same kernel. In a sense, this specific form is closer to the symmetric case, but the expressions of the correlations are different. 2.3. Average conservation law The other scenario is to impose conservation in average at the thermodynamic limit hm(t+1)i = hm(t)i. This condition is a less restrictive constraint on the time-evolution of the system. This condition only imposes a relation in average between the onsite and link variables hV i = 1 − hξikKk1 , (33) P where kKk1 = i K(i). The diagonal and off-diagonal noises are now independent random quantities while there were linearly dependent when exact conservation was enforced. We are not repeating the analysis of correlations between noises in every cases here, let us just focus on the asymmetric model that one will be interested in in the rest of the article. Of course, when only average conservation is enforced, no relation between the variances σV2 and σξ2 exists, and there is no cross-correlation between onsite and link variables hξrp (t)V0 (t)i − hξihV i = 0. (34) Furthermore, the onsite variables V are simply delta-correlated hVr (t)V0 (t)i − hV i2 = σV2 δr,0 . (35) P In P the formulation Eq. (12), the matrix M is not stochastic anymore i Mij 6= 1 but is average-stochastic i hMij i = 1. We shall see that those two different conservation conditions (exact or average) lead to different results for the behavior of the coherence, that can be understood in terms of their corresponding continuum space-time evolution equation. 3. Threshold behavior of the network coherence 3.1. Phase diagram of the exactly conserved model As explained earlier, the behavior of the coherence of the system can be analyzed by computing the 2-point correlation function Gr (t) = hur (t)u0 (t)i between ur (t) and u0 (t) at same time t. The calculation is shown here for the asymmetric case with exact conservation law, but the steps are the same for all the different § If now we impose average conservation and Mij ’s are Gaussian distributed, then M belongs to the Gaussian Orthonormal Ensemble (GOE) [35]. 10 particular cases. In the asymmetric case with exact conservation, we have Eq. (20) and Eq. (21), therefore, it is straitforward to write down the time-evolution of the correlator Gr (t) as X X Gr (t + 1) = hξi2 Kr−k Kl Gk−l (t) + 2hV ihξi Kr−k Gk (t) k,l k + hV i2 Gr (t) + δr,0 G0 (t) σξ2 kKk2 + σV2 − 2σξ2 K2r  + σn2 δr,0 . (36) From now on, we will focus on the analysis of this evolution equation for a short-range kernel but let us mention that this equation can be easily solved on the complete graph where the kernel takes the form Kr = 1 − δr,0 , the details of this calculation will be presented elsewhere. 3.1.1. Noise threshold in any dimension One could notice that Eq. (36) can be written down as a convolution, then in Fourier space the result is a simple product plus a term that contains Gr (t) in r = 0   2  c2 + σ 2 , b b b G(q, t + 1) = hξiK(q) + hV i G(q, t) + G0 (t) σξ2 kKk2 + σV2 − 2σξ2 K (37) r n P with the following definition of the Fourier transform ûq (t) = ri ∈Zd uri (t)eiqri . As we saw earlier, the exact conservation law implies σV2 = σξ2 kKk2 then Eq. (37) reads   c2 + σ 2 b b G(q, t + 1) = λ(q)2 G(q, t) + 2G0 (t)σξ2 kKk2 − K r n c2 (0) − K c2 (q)) + σ 2 , b = λ(q)2 G(q, t) + 2G0 (t)σξ2 (K n (38) where we have b λ(q) = hξiK(q) + hV i   b = 1 − hξi kKk1 − K(q)   b b = 1 − hξi K(0) − K(q) . (39) Now let us consider the continuum space limit of this problem, ur∈Zd (t) → u(r ∈ Rd , t). Let us notice that the case hξi = 0 is therefore rather particular, indeed it implies hV i = 1 → λ(q) = 1, and the evolution equation is trivial to solve k, hence the correlator is always exponential for any value of the variances. For b st (q) is given by solving G(q, b b hξi = 6 0, the stationary solution G t + 1) − G(q, t) = 0, it follows   c2 (0) − K c2 (q) + σ 2 2Gst (0)σξ2 K n b st (q) = , (40) G 2 1 − λ(q) where we used the notation Gst (0) := Gst (r = 0). The self-consistent equation for Gst (0) gives Gst (0) = 2 cd σn where, in the continuum-lattice limit, we have 1−2σξ2 fd Z ∞ 1 dd q cd = , (41) (2π)d −∞ 1 − λ(q)2 and fd = 1 (2π)d Z ∞ −∞ dd q c2 (0) − K c2 (q) K . 1 − λ(q)2 (42) Until now, the calculation holds for any integrable kernel, and we shall now focus on a local kernel which b scales as a power-law in Fourier space K(q) ∼ q2θ , the simplest being the Laplacian corresponding to θ = 1. 2 2θ For a local kernel, one has λ(q) ∼ 1 + phξiq where p is a constant. The integral cd converges in d > 2θ and k For symmetric links, this case is not trivial anymore. 11 fd is convergent in any dimension. The integrals cd and fd can be defined, by dimensional regularization, for any real d ¶. The stationary solution exists if and only if 1 − 2fd σξ2 > 0. The critical value σc2 = 1 , 2fd (43) where fd is given by Eq. (42), is the maximum value of the variance σξ2 such that the stationary state is reachable and such that the system is stable. The constant fd depends only on the explicit form of the kernel, the mean of the link variables hξi and the dimension d of the space. The value of this threshold can be tuned by changing the value of hξi. So a first result shows that, in that situation, the stability margin Eq. (8) is always positive in any dimension, therefore the system can support some amount of multiplicative noise and reach its stationary state. The full explicit form of the stationary correlator can be computed. For σξ2 < σc2 and for d > 2θ the stationary solution can be written Z c2 (0) − K c2 (q) 2σξ2 cd σn2 K dd q e−iqr . (44) Gst (r) = 2 d (2π) 1 − 2σξ fd 1 − λ(q)2 The stationary solution converges to a finite value in d > 2θ. As usual, the divergence is logarithmic at dc . The behavior can be easily understood in a renormalization group (RG) language. In the phase σξ2 < σc2 , we can define the quantity Aex σ2 Aex σ2 = 1 . 1 − 2σξ2 fd (45) This quantity, which goes to 1 when σξ2 → 0 and goes to ∞ when σξ2 → σc2 , can be seen as a coefficient ex 2 which renormalizes the additive noise. Indeed we have Gst (0) = Aex σ 2 σn fd , which is, up to the constant Aσ 2 , 2 the stationary solution of a pure additive system (σξ = 0), as we shall see in the next paragraph. What it means, is that below the noise threshold, the randomness of the link and onsite variables are irrelevant in a RGpsense and the system renormalizes to a pure additive model with a renormalized additive noise ñi (t) = Aex σ 2 ni (t) where ni (t) is the original additive noise. The correlator equation becomes 2 b b G(q, t + 1) = λ(q)2 G(q, t) + Aex σ 2 σn . (46) σξ2 Since is the only relevant parameter dictating the large-scale behavior of the system, the effective description Eq. (46) of the system below σc2 is still valid in the non-stationary regime d 6 2θ. The full b space-time-dependent solution of Eq. (46), for a kernel of the form K(q) ∼ q2θ verifies the following scaling form   t ex 2 2θ−d (47) G(r, t) = Aσ2 σn r Ψ 2θ . r The form of the correlator is valid for any dimension below the threshold. Here Ψ(y) is a scaling function with properties that Ψ(y) → const as y → ∞ and Ψ(y) → y (2θ−d)/2θ as y → 0. This scaling form Eq. (47) is the so-called Family-Viczek (FV) scaling [36], well-known in statistical physics of interfaces. The case θ = 1 and θ = 2 are respectively the Edwards-Wilkinson (EW) and Mullins-Herring (MH) universality classes [37]. The upper-critical dimension of this system is dc = 2θ, above that dimension, the correlator converges to a finite value. For σξ2 < σc2 and for d 6 2θ the behavior is a power-law following Eq. (47). The correlator grows as t(2θ−d)/2θ and the stationary solution is never reached for an infinite system. This exponent is named 2β in the context of growing interfaces and is equal to β = 1/4 (resp β = 3/8) for the EW class (resp. MH). The exponent increases with θ. 3.1.2. Finite size dependence of the coherence Now we can extend the result on the large-time coherence scaling for the Laplacian algorithm (θ = 1) sketched in the introduction. From the result on the calculation of G(r, t) below the noise threshold, one can translate the informations in terms of the time-dependance ∞ of CN (t) and the stationary value CN of the network coherence defined (see Eq. (4) and Eq. (14)) in the introduction for a system of N agents. The finite-size behavior of the coherence can be extracted by ¶ then the calculation also holds for a fractal graph of non-integer dimension d 12 introducing a cut-off in Fourier space in Eq. (41) and Eq. (42). For a system of size L with N = Ld nodes, the coherence is behaving for short times (t  L2 ) Z 1 dd rG(r, t) ∼ t(2−d)/2 . (48) CN (t) ∝ N So for short times, the coherence grows as a power-law, independently of system-size. The coherence reaches then a stationary value which scales with system-size as Z 2−d 1 ∞ CN ∝ dd rGst (r) ∼ N d , (49) N ∞ for any d. This value is reached within a time-scale tc ∼ L2 = N 2/d . The value of the infinite coherence CN grows unboundedly in d < 3 and converges to a finite value in d > 2, in agreement with Eq. (6). In terms of performance, in d > 2 the algorithm is still capable to perform its averaging task even with the presence of multiplicative noise, as long as the variance is below the threshold σc2 . 3.1.3. Exponential regime above the noise threshold Now that we have understood the behavior of the correlator below the threshold, where the large-scale behavior was dictated by the additive noise, one can study the behavior in the other regime, where the behavior will be controlled by the parameter σξ2 . For σξ2 > σc2 , the additive noise is irrelevant since we expect an exponential growth of the correlator, and the equation Eq. (38) can be written as b b G(q, t + 1) = D(G(q, t)). (50) The large-time behavior of this equation is dominated by the largest eigenvalue λmax of the operator D. If λmax = 1, the FV scaling Eq. 47 holds. If λmax > 1 then the correlator behaves exponentially as b G(q, t) ∼ λtmax gb(q), (51) where gb(q) has to determined self-consistently. Inserting Eq. (51) inside Eq. (37), one ends up with gb(q) = c2 (0) − K c2 (q) 2σξ2 (K . λmax − λ(q)2 (52) Now let us write a condition on the form of the largest eigenvalue λmax of the operator D. We have c2 (0) − K c2 (q) K b G(q, t) = 2σξ2 G(0, t) = gb(q)G(0, t). λmax − λ(q)2 R b Now using (2π)−d dd qG(q, t) = G(0, t) we end up with a condition on the largest eigenvalue λmax Z d d q gb(q) = 1, (2π)d (53) (54) where gb(q) = c2 (0) − K c2 (q) dd q K , d (2π) λmax − λ(q)2 (55) and λ(q)2 ≈ 1 + phξiq2 . The integral Eq. (54) when λmax → 1, converges in any d by dimensional regularization, meaning that the FV scaling holds in any d below the threshold. The behavior of the coherence C(t) in the regime σξ2 > σc2 is always exponential in any dimension and for any system-size. Those different regimes can be understood by looking at the corresponding continuum equation describing the large-scale fluctuations of Eq. (9). Without loss of generalities, let us focus on the Laplacian kernel from now on. We showed previously that, when exact conservation is enforced, it exists a deterministic relation between the onsite and link noises Eq. (17). Therefore the asymptotic behavior of our model is governed by a continuum space-time equation with only one multiplicative source of randomness and additive noise ∂t u(x, t) = ∂x [ξ(x, t)∂x u(x, t)] + n(x, t). 13 (56) d Exponential CN (t) ∼ λtmax Finite 2 cd σ n ∞ CN = 2 1−2σ fd ξ dc = 2 Algebraic and stationary CN (t  tc ) ∼ t2β 2−d CN (t  tc ) ∼ N d 0 σc2 = Exponential CN (t) ∼ λtmax σξ2 1 2fd Figure 5. Phase diagram in the exact conservation case on a d-dimensional lattice for the Laplacian kernel θ = 1 with N sites. On the left of the critical line (red line) σξ2 < σc2 , the behavior of the coherence follows the FV scaling Eq. (47), i.e. algebraic (with exponent β = (2 − d)/4) for short time then stationary at large time, in low d (below the blue dashed line) and finite for higher d. On the other side of the line, the coherence grows exponentially for any d. In that situation, the algorithm remains resilient to multiplicative noise below the noise threshold, showing that the stability margin is positive in any dimension. From our analysis, one shows that there are physically two different regimes. The first regime, is when ξ(x, t) is irrelevant at large distance and one ends up with the large-scale behavior of the Edwards-Wilkinson equation ∂t u(x, t) = ∂x2 u(x, t) + ñ(x, t), (57) σξ2 where the additive noise ñ(x, t) is renormalized by the value of the variance of the multiplicative noise p ex as ñ(x, t) = Aσ2 n(x, t), where n(x, t) is the original additive noise. The other regime is exponential (see Eq. (51)), where the large-scale behavior is dominated by the multiplicative noise ξ(x, t) and where the additive noise does not change the asymptotic behavior. This two regimes are separated by a threshold σc2 that is finite in any dimension and equal to σc2 = 2f1d where fd is the integral given by Eq. (42). 3.2. Phase diagram of the average conserved model Now let us look at the our system when the time-evolution of m(t) is conserved in average. We will see that the behavior changes drastically when one imposes average conservation, especially in high dimensions. In the aymmetric case with average conservation we have no correlation between the onsite and link variables, therefore the evolution of the correlator Gr (t) takes the following form X X Gr (t + 1) = hξi2 Kr−k Kl Gk−l (t) + 2hV ihξi Kr−k Gk (t) k,l 2 + hV i Gr (t) + δr,0 G0 (t) k σξ2 kKk2 + σV2  + σn2 δr,0 . (58) Let us focus on the analysis of the evolution equation in the next section. The steps of calculation are very similar to the exactly conserved system, therefore one jumps immediately to the analysis of the solution. 3.2.1. Noise threshold in high dimensions Let us again focus on the Laplacian kernel without loss of generality. The self-consistent equation for Gst (0) gives Gst (0) = cd σn2 , 1 − cd σ 2 (59) where cd is given by the same integral Eq. (41) as in the previous section and σ 2 = σV2 + σξ2 kKk2 . The stationary solution exists if and only if 1 − cd σ 2 > 0. The critical value of the variance being 1 σc2 = . (60) cd 14 σξ2 Exponential Phase Finite Phase Finite Phase σV2 2 , σ 2 ) in the plane (σ 2 , σ 2 ) which is parametrized by the ellipse Figure 6. There is a critical line f (σV V ξ ξ equation 2 σV σc2 σ2 2 , σ 2 ) > 1, the algorithm becomes unstable + σξ2 kKk2 = 1. In the white domain defined by f (σV ξ c 2 , σ 2 ) < 1, it is finite and the algorithm and the coherence is exponential. In the blue domain defined by f (σV ξ reaches a global consensus. Let us mention that the critical line exists only in high dimensions d > 2, the size of the ellipse decreases (the dashed ellipses) as d → dc and eventually shrinks down to a single point at dc . The system is then completely unstable for any non-zero variances. There is a critical line f (σV2 , σξ2 ) in the plane (σV2 , σξ2 ) which is parametrized by the ellipse (see Fig .(6)) equation σξ2 σV2 + kKk2 = 1. σc2 σc2 (61) The constant cd depends only of the explicit form of the kernel, the mean of the link variables hξi and the dimension d of the space. Because of the divergence of cd in d 6 2, there is no threshold in low dimensions and the system is always controlled by the variables ξ’s and V ’s as we will see later on. In d 6 2, the stability margin Eq. (8) becomes infinitesimal and any non-zero amount of multiplicative noise makes the algorithm unstable. The full space-dependance of the stationary solution below σc2 and in d > 2 takes the following form  Z ∞ σn2 1 e−iqr d Gst (r) = . (62) d q (2π)d 1 − cd σ 2 1 − λ(q)2 −∞ The picture is almost the same as in the exactly conserved system where below the threshold, the system behaves as a pure additive model Eq. (46). In this regime, the renormalization factor becomes 1 Aav . (63) σ2 = 1 − cd σ 2 p Below σc2 , the system is also described by the pure additive model Eq. (46) with ñi (t) = Aav σ 2 ni (t) and the FV scaling Eq. (47)) holds with the same set of exponents. The main difference is the FV scaling holds only in d > 2, where the exponent β goes to zero, and where the stationary solution Eq. (62) converges to a finite value Eq. (59). We have actually a critical line (see Fig .(6)) in the plane (σV2 , σξ2 ). The behavior is the same anywhere below the line where the large-scale dynamic is described by Eq. (46). Because there is no relation between the variances σV2 and σξ2 , we can send independently σV2 or σξ2 to zero. The large-scale dynamic above the threshold can then be described by X ui (t + 1) = hξi Ki−j uj (t) + Ṽi (t)ui (t), (64) j with Ṽi (t) has a renormalized variance σV2 + σξ2 kKk2 . The behavior of our system when average conservation is imposed, varies greatly from the exactly conserved algorithm, where the system could not be described by 15 σc2 = d Finite ∞ CN = 1 cd Exponential CN (t) ∼ λtmax 2 cd σ n 1−2σ 2 cd dc = 2 Exponential CN (t) ∼ λtmax 0 σ2 Figure 7. Phase diagram in the average conservation case for the Laplacian kernel θ = 1. Here the scenario is rather different than the exact conserved case in dimension d. In low d, the behavior of the coherence is always exponential for any system-size. In higher d there is a transition between a finite phase and an exponential regime at the critical value σc2 . Eq. (64) due to the relation between the variances σV2 and σξ2 . The eigenvalue equation for this model can b also be written as Eq. (50). If λmax > 1 then the correlator behaves as G(q, t) ∼ λtmax gb(q), where gb(q) = σV2 + σξ2 kKk2 . λmax − λ(q)2 (65) The condition on λmax is now Z dd q gb(q) = 1. (2π)d (66) The convergence properties of this integral are fairly different than the one found in the previous section. The integral Eq. (66) when λmax → 1 converges in d > 2. Thus in d 6 2 there is no stationary state and the correlator grows exponentially. In d > 2 there is a noise threshold σc2 , below this value the behavior is algebraic, and above it is exponential for any σ 2 . In that case, the phase transition occurs at d > 2, indeed in d 6 2 the system remains exponential for any value of σ 2 . The low d phase is the strong coupling regime and in higher d, there is two phases depending on the value of σ 2 . Let us finally notice that, contrary to the exact conservation case, here the phase transition may happen at an infinitesimal value of σ, just above the critical dimension dc . The complete phase diagram is shown in Fig .(7). Two regimes are present, just as before, the EW limit where the variance σ 2 is smaller than the critical value and where the multiplicative noise is irrelevant. This happens in low dimensions. The other regime can be shown to be described by the stochastic heat equation (SHE) ∂t u(x, t) = ∂x2 u(x, t) + Ṽ (x, t)u(x, t). (67) This equation is known to describe the partition function u(x, t) of a directed polymer in a quenched random potential Ṽ (x, t) and the height h(x, t) ∝ log u(x, t) of a random interface verifying the Kardar-Parisi-Zhang equation (see [38] for details or [39] for even more details). 3.2.2. Robustness of the coherence and finite-size dependance The analysis of the correlator G(r, t) tells us that in low dimensions, the consensus algorithm is extremely sensitive to multiplicative noise. The network coherence becomes essentially exponential as soon as a finite value of multiplicative noise is introduced in the system, making the algorithm unstable and unable to perform its task. The stability margin, is essentially zero in d < 3. In higher dimensions d > 2, the stability margin becomes is non-zero, and the system remains stable as long as the noise variance remains below the threshold. The higher the dimension and the bigger the stability margin is. From that result on the calculation of G(r, t) below the noise threshold, one can translate ∞ the information in terms of the stationary value CN of the network coherence defined (see Eq. (4)). The 16 finite-size behavior of the coherence can be extracted by introducing a cut-off in Fourier space in Eq. (41). For a system of size L with N = Ld nodes, the coherence is reaching a stationary value which scales as system-size as Z 2−d 1 ∞ dd rGst (r) ∼ N d . (68) CN ∝ N In that context, in d > 2 the algorithm is still capable to perform its task, even with the presence of multiplicative noise, as long as the variance is below the threshold σc2 . In lower dimensions, the stability margin is inexistent and there is no stationary state. An infinitesimal amount of multiplicative noise makes the system exponentially unstable, the system is thus infinitely fragile. 3.3. A word on the other forms of symmetry As we said earlier in the article, the asymmetric link case, is the simplest case where the link and onsite variables are uncorrelated in space, see Eq. (21)), regardless the type of conservation condition that we consider. Therefore, this case leads to a rather simple equation for the time-evolution of the correlator, and the calculation can be done for any kernel. The other cases might be more or less involved depending on the form of the links and the conservation condition, indeed when one enforces symmetry between link variables for example, the onsite random variables Vi (t) become spatially correlated (see Eq. (24)) leading to different asymptotic behaviors. Nevertheless, the method that we have proposed here can be applied directly to those situations, leading to the explicit form of the noise threshold. The details of those models will be detailed elsewhere although let us finally mention, that the crucial ingredient in the different universal behaviors that we have observed is the presence of some form of a conservation law, and we believe that the specific details of the system will not change the dimensional behaviors and phase diagrams Fig .(5) and Fig .(7), but could have some relevance for more specific applications to real consensus algorithms and communication networks. 4. Summary and conclusions In this paper, we have quantified the performance of a consensus algorithm or a distributed system by studying the network coherence Eq. (4) of a system of N agents Z  1 dd r G(r, t) − hm(t)i2 , (69) CN (t) = N in the large-scale limit N → ∞ and where G(r, t) is the local 2-point correlation hu(r, t)u(0, t)i. We were interested in the behavior of this quantity for a system with diverse sources of uncorrelated multiplicative and additive noise (see Eq. (9)) in a lattice of dimension d in the continuum-space limit. We showed how the quantity G(r, t) behaves in both cases where one imposes conservation of m(t) either exactly or in average. Let us summarize the results of the continuum-space calculation of the time-behavior of the network coherence CN (t), for a system of N nodes, when varying the strength of the link and onsite random variables. The general behavior in the exact conservation case, is that in any dimension, below a critical value σc2 , the network coherence grows algebraically then reaches the stationary state at large time, and above σc2 , the network coherence grows exponentially, see Fig .(5). The stability margin is always non-zero in any dimension, and the system can remain stable as long as the variance of the noise is below the threshold. The other case is when average conservation of m(t) is enforced. In that case, the link and onsite variables are independent, making the phenomenology richer than the exact conservation case. In low dimensions, the network coherence grows exponentially, for any value of the variances σV2 and σξ2 . The system is then highly sensitive to multiplicative noise and there is no stability margin. Obviously in that case, no stationary solution is reachable and the network coherence becomes infinite at large time. In higher d > 2, a stability margin appears, the system is then capable to perform the average for small noise. The network coherence is then finite below the noise threshold and for σ 2 > σc2 the network coherence grows exponentially again, see 17 Fig .(7). Another quantity that might be extremely insightful in the context of network consensus algorithms is the variance with respect to random initial conditions ui (t0 ) at time t0 CN (t, t0 ) := N N   1 X 1 X var ui (t) − uk (t0 ) . N i=1 N (70) k=1 This quantity tells us how the system forgets (or not) about the initial state values on the network and how time correlations grow in the system. In our formalism, the calculation boils down to compute G(r, t, t0 ) = hu(r, t)u(0, t0 )i. Those correlations have not been studied in details in the control literature but are well known in the ageing literature [40]. A problem not addressed in this work is the case of a static (quench) disorder, which may have also a lot of interesting applications in averaging systems and consensus algorithms. A similar threshold, known in the context of Anderson localization [41], appears in those systems as well, and it will be interesting to see how localization emerges in distributed systems with quench disorder. The SHE equation with this type of disorder is often called the parabolic Anderson problem, see for example [42]. One of the most ambitious perspective would be to show that the noise threshold that we have observed in those classical systems, would also appear in quantum systems. Indeed it is well known in the field of quantum computation [19] that noise is the main obstacle to efficient computation, and that above a certain value, computation is no longer possible. This well-known result is called the ”quantum threshold theorem” [43] and it has later been shown that this phenomenon is actually a phase transition [44]. It would of great interest if our results could be extended to quantum systems, and prove that a similar threshold theorem would hold for quantum distributed systems and quantum consensus [18]. This work is partially supported by NSF Awards PHY-1344069 and EECS-1408442. NA is grateful to Thimothée Thiery for discussions during the KPZ program at KITP. CS is grateful to the Labex NEXT, the CSHL, and the MUSE IDEX Toulouse contract for funding his visit to NY. 18 [1] M. Mezard and A. Montanari, Information, physics, and computation. Oxford University Press, 2009. [2] R. Olfati-Saber, “Flocking for multi-agent dynamic systems: Algorithms and theory,” IEEE Transactions on automatic control, vol. 51, no. 3, pp. 401–420, 2006. [3] D. Chowdhury, L. Santen, and A. Schadschneider, “Statistical physics of vehicular traffic and some related systems,” Physics Reports, vol. 329, no. 4, pp. 199–329, 2000. [4] R. Olfati-Saber, J. A. Fax, and R. M. Murray, “Consensus and cooperation in networked multi-agent systems,” Proceedings of the IEEE, vol. 95, no. 1, pp. 215–233, 2007. [5] Y.-Y. Liu, J.-J. Slotine, and A.-L. Barabási, “Controllability of complex networks,” Nature, vol. 473, no. 7346, pp. 167–173, 2011. [6] T. Vicsek and A. Zafeiris, “Collective motion,” Physics Reports, vol. 517, no. 3, pp. 71–140, 2012. [7] C. Castellano, S. Fortunato, and V. Loreto, “Statistical physics of social dynamics,” Reviews of modern physics, vol. 81, no. 2, p. 591, 2009. [8] J.-P. Bouchaud and M. Potters, Theory of financial risk and derivative pricing: from statistical physics to risk management. Cambridge university press, 2003. [9] R. N. Mantegna and H. E. Stanley, Introduction to econophysics: correlations and complexity in finance. Cambridge university press, 1999. [10] F. Bullo, Lectures on Network Systems. Version 0.85, 2016. With contributions by J. Cortes, F. Dorfler, and S. Martinez. [11] Y. Kuramoto, Chemical oscillations, waves, and turbulence, vol. 19. Springer Science & Business Media, 2012. [12] J. A. Acebrón, L. L. Bonilla, C. J. P. Vicente, F. Ritort, and R. Spigler, “The kuramoto model: A simple paradigm for synchronization phenomena,” Reviews of modern physics, vol. 77, no. 1, p. 137, 2005. [13] J. Cortes, S. Martinez, T. Karatas, and F. Bullo, “Coverage control for mobile sensing networks,” in Robotics and Automation, 2002. Proceedings. ICRA’02. IEEE International Conference on, vol. 2, pp. 1327–1332, IEEE, 2002. [14] L. Xiao and S. Boyd, “Fast linear iterations for distributed averaging,” Systems & Control Letters, vol. 53, no. 1, pp. 65–78, 2004. [15] J. Lin, A. S. Morse, and B. D. Anderson, “The multi-agent rendezvous problem-the asynchronous case,” in Decision and Control, 2004. CDC. 43rd IEEE Conference on, vol. 2, pp. 1926–1931, IEEE, 2004. [16] J. Lin, A. S. Morse, and B. D. Anderson, “The multi-agent rendezvous problem. part 2: The asynchronous case,” SIAM Journal on Control and Optimization, vol. 46, no. 6, pp. 2120–2147, 2007. [17] W. Ren and R. W. Beard, Distributed consensus in multi-vehicle cooperative control. Springer, 2008. [18] L. Mazzarella, A. Sarlette, and F. Ticozzi, “Consensus for quantum networks: Symmetry from gossip interactions,” IEEE Transactions on Automatic Control, vol. 60, no. 1, pp. 158–172, 2015. [19] M. A. Nielsen and I. L. Chuang, Quantum computation and quantum information. Cambridge university press, 2010. [20] L. Xiao, S. Boyd, and S.-J. Kim, “Distributed average consensus with least-mean-square deviation,” Journal of Parallel and Distributed Computing, vol. 67, no. 1, pp. 33–46, 2007. [21] M. Huang and J. H. Manton, “Coordination and consensus of networked agents with noisy measurements: stochastic algorithms and asymptotic behavior,” SIAM Journal on Control and Optimization, vol. 48, no. 1, pp. 134–161, 2009. [22] S. Patterson and B. Bamieh, “Consensus and coherence in fractal networks,” IEEE Transactions on Control of Network Systems, vol. 1, no. 4, pp. 338–348, 2014. [23] B. Bamieh, M. R. Jovanovic, P. Mitra, and S. Patterson, “Coherence in large-scale networks: Dimension-dependent limitations of local feedback,” IEEE Transactions on Automatic Control, vol. 57, no. 9, pp. 2235–2249, 2012. [24] F. Fagnani and S. Zampieri, “Randomized consensus algorithms over large scale networks,” IEEE Journal on Selected Areas in Communications, vol. 26, no. 4, pp. 634–649, 2008. [25] R. Carli, F. Fagnani, P. Frasca, and S. Zampieri, “Gossip consensus algorithms via quantized communication,” Automatica, vol. 46, no. 1, pp. 70–80, 2010. [26] S. Patterson, B. Bamieh, and A. El Abbadi, “Convergence rates of distributed average consensus with stochastic link failures,” IEEE Transactions on Automatic Control, vol. 55, no. 4, pp. 880–892, 2010. [27] J. Wang and N. Elia, “Distributed averaging under constraints on information exchange: emergence of lévy flights,” IEEE Transactions on Automatic Control, vol. 57, no. 10, pp. 2435–2449, 2012. [28] J. Wang and N. Elia, “Consensus over networks with dynamic channels,” International Journal of Systems, Control and Communications, vol. 2, no. 1-3, pp. 275–297, 2010. [29] G. Cybenko, “Dynamic load balancing for distributed memory multiprocessors,” Journal of parallel and distributed computing, vol. 7, no. 2, pp. 279–301, 1989. [30] J. E. Boillat, “Load balancing and poisson equation in a graph,” Concurrency and Computation: Practice and Experience, vol. 2, no. 4, pp. 289–313, 1990. [31] J. C. Doyle, B. A. Francis, and A. R. Tannenbaum, Feedback control theory. Courier Corporation, 2013. [32] A. Crisanti, G. Paladin, and A. Vulpiani, Products of Random Matrices: in Statistical Physics, vol. 104. Springer Science & Business Media, 2012. [33] B. Touri, Product of random stochastic matrices and distributed averaging. Springer Science & Business Media, 2012. [34] R. R. Muller, “On the asymptotic eigenvalue distribution of concatenated vector-valued fading channels,” IEEE Transactions on Information Theory, vol. 48, no. 7, pp. 2086–2091, 2002. [35] M. L. Mehta, Random matrices, vol. 142. Academic press, 2004. [36] F. Family and T. Vicsek, “Scaling of the active zone in the eden process on percolation networks and the ballistic deposition model,” Journal of Physics A: Mathematical and General, vol. 18, no. 2, p. L75, 1985. [37] A.-L. Barabási and H. E. Stanley, Fractal concepts in surface growth. Cambridge university press, 1995. [38] J. Krug and H. Spohn, “Kinetic roughening of growing surfaces,” Cambridge University Press, Cambridge, vol. 1, no. 99, p. 1, 1991. 19 [39] T. Halpin-Healy and Y.-C. Zhang, “Kinetic roughening phenomena, stochastic growth, directed polymers and all that. aspects of multidisciplinary statistical mechanics,” Physics reports, vol. 254, no. 4, pp. 215–414, 1995. [40] M. Henkel, H. Hinrichsen, S. Lübeck, and M. Pleimling, Non-equilibrium phase transitions, vol. 1. Springer, 2008. [41] P. W. Anderson, “Absence of diffusion in certain random lattices,” Physical review, vol. 109, no. 5, p. 1492, 1958. [42] Y. B. Zel’Dovich, S. Molchanov, A. Ruzmaikin, and D. D. Sokolov, “Intermittency in random media,” Physics-Uspekhi, vol. 30, no. 5, pp. 353–369, 1987. [43] D. Aharonov and M. Ben-Or, “Fault-tolerant quantum computation with constant error,” in Proceedings of the twentyninth annual ACM symposium on Theory of computing, pp. 176–188, ACM, 1997. [44] D. Aharonov, “Quantum to classical phase transition in noisy quantum computers,” Physical Review A, vol. 62, no. 6, p. 062311, 2000. 20
3cs.SY
A Spatial Calculus of Wrapped Compartments∗ Livio Bioglio1 , Cristina Calcagno1,2 , Mario Coppo1 , Ferruccio Damiani1 , Eva Sciacca1 , Salvatore Spinella1 , Angelo Troina1 1 Dipartimento arXiv:1108.3426v1 [cs.LO] 17 Aug 2011 2 Dipartimento di Informatica, Università di Torino di Biologia Vegetale, Università di Torino The Calculus of Wrapped Compartments (CWC) is a recently proposed modelling language for the representation and simulation of biological systems behaviour. Although CWC has no explicit structure modelling a spatial geometry, its compartment labelling feature can be exploited to model various examples of spatial interactions in a natural way. However, specifying large networks of compartments may require a long modelling phase. In this work we present a surface language for CWC that provides basic constructs for modelling spatial interactions. These constructs can be compiled away to obtain a standard CWC model, thus exploiting the existing CWC simulation tool. A case study concerning the modelling of Arbuscular Mychorrizal fungi growth is discussed. 1 Introduction Several complex biological phenomena include aspects in which space plays an essential role, key examples are the growth of tissues and organisms, embryogenesis and morphogenesis processes or cell proliferation. This has encouraged, in recent years, the development of formal models for the description of biological systems in which spatial properties can be taken into account [9, 4, 19], as required by the emerging field of spatial systems biology [26] which aims at integrating the analysis of biological systems with spatial properties The Calculus of Wrapped Compartments (CWC) [12, 11, 10] is a calculus for the description of biochemical systems which is based on the notion of a compartment which represents, in some sense, the abstraction of a region with specific properties (characterized by a label, a wrap and a content). Biochemical transformations are described via a set of stochastic reduction rules which characterize the behaviour of the represented system. In a recent work [7] we have have shown how CWC can be used to model spatial properties of biological systems. The idea is to exploit the notion of compartment to represent spatial regions (with a fixed, two-dimensional topology) in which the labels plays a key role in defining the spatial properties. In this framework, the movement and growth of system elements are described, via specific rules (involving adjacent compartments) and the functionalities of biological components are affected by the spatial constraints given by the sector in which they interact with other elements. CWC allows to model several spatial interactions in a very natural way. However, when the complexity of simulation scenarios increases, the specification of large networks of compartments each one having its own peculiar behaviour and initial state may require a long and error prone modelling phase. In this paper we introduce a surface language for CWC that defines a framework in which the notion of space is included as an essential component of the system. The space is structured as a square grid, whose dimension must be declared as part of the system specification. The surface language provides ∗ This research is funded by the BioBITs Project (Converging Technologies 2007, area: Biotechnology-ICT), Regione Piemonte. Proceedings of 5th Workshop on Membrane Computing and Biologically Inspired Process Calculi (MeCBIC 2011) Pages 25–39, 2011. c L. Bioglio, C. Calcagno, M. Coppo, F. Damiani, E. Sciacca, S. Spinella and A. Troina All the rights to the paper remain with the authors. basic constructs for modelling spatial interactions on the grid. These constructs can be compiled away to obtain a standard CWC model, thus exploiting the existing CWC simulation tool. A similar approach can be found in [19] where the topological structure of the components is expressed via explicit links which require ad-hoc rules to represent movements of biological entities and a logic-oriented language to flexibly specify complex simulation scenarios is provided. In order to deal with larger biological systems, we are planning to extend the CWC to the spatial domain incrementally. At this early stage we neglected to consider problems related to the increase of the spatial rules with the increasing dimension of the grid1 . A partial solution to this problem is the use of appropriate data structures to represent entities scattered on a grid. A further step in this direction should be that of allowing the definition of different topological representations for spatial distributions of the biological entities, like in [7]. This requires, obviously, that also the surface language be enriched with primitives suitable to express different spatial topology and related concepts (like the notion of proximity of locations and that of movement in space). The right spatial topology could also help to minimize the number of spatial rules needed for modeling phenomena. A more ambitious goal will be that of providing a basis for computational geometry to our simulator, in order to identify spatially significant events for the simulation. This will requires however a much bigger implementation effort. Organisation of the Paper Section 2 recalls the CWC framework. Section 3 presents the surface language needed to describe spatial terms and rules. Section 4 presents a case study concerning some spatial aspects in the modelling of Arbuscular Mychorrizal fungi. Section 5 concludes the paper by briefly discussing related work and possible directions for further work. The Appendix presents the software module implementing the surface language. 2 The Calculus of Wrapped Compartments The Calculus of Wrapped Compartments (CWC) (see [12, 10, 11]) is based on a nested structure of ambients delimited by membranes with specific proprieties. Biological entities like cells, bacteria and their interactions can be easily described in CWC. 2.1 Term Syntax Let A be a set of atomic elements (atoms for short), ranged over by a, b, ..., and L a set of compartment types represented as labels ranged over by `, `0 , `1 , . . . A term of CWC is a multiset t of simple terms where a simple term is either an atom a or a compartment (a ct 0 )` consisting of a wrap (represented by the multiset of atoms a), a content (represented by the term t 0 ) and a type (represented by the label `). As usual, the notation n ∗ t denotes n occurrences of the simple term t. We denote an empty term with •. An example of CWC term is 2∗a b (c d c e f )` representing a multiset (multisets are denoted by listing the elements separated by a space) consisting of two occurrences of a, one occurrence of b (e.g. three molecules) and an `-type compartment (c d c e f )` which, in turn, consists of a wrap (a membrane) with two atoms c and d (e.g. two proteins) on its surface, and containing the atoms e (e.g. a molecule) and f (e.g. a DNA strand). See Figure 1 for some other examples with a simple graphical representation. 1 note that in a 2D model the space-related rules grow according to the square of the grid dimension 26 (a) Figure 1: (a) represents (a b c c •)` ; 0 (a b c c (d e c •)` f g)` 2.2 (b) (c) 0 (b) represents (a b c c (d e c •)` )` ; (c) represents Rewriting Rules System transformations are defined by rewriting rules, defined by resorting to CWC terms that may contain variables. We call pattern the l.h.s. component p of a rewrite rule and open term the r.h.s. component o of a rewrite rule, defined as multiset of simple patterns p and simple open terms o given by the following syntax: (a x c p X)` p ::= a (q c o)` X o ::= a q ::= a x where a is a multiset of atoms, p is a pattern (a, possibly empty, multiset of simple patterns), x is a wrap variable (can be instantiated by a multiset of atoms), X is a content variable (can be instantiated by a CWC term), q is a multiset of atoms and wrap variables and o is an open term (a, possibly empty, multiset of simple open terms). Patterns are intended to match, via substitution of variables with ground terms (containing no variables), with compartments occurring as subterms of the term representing the whole system. Note that we force exactly one variable to occur in each compartment content and wrap of our patterns and simple patterns. This prevents ambiguities in the instantiations needed to match a given compartment.2 A rewrite rule is a triple (`, p, o), denoted by ` : p 7−→ o, where p and o are such that the variables occurring in o are a subset of the variables occurring in p. The application of a rule ` : p 7−→ o to a term t is performed in the following way: 1) Find in t (if it exists) a compartment of type ` with content u and a substitution σ of variables by ground terms such that u = σ (p X)3 and 2) Replace in t the subterm u with σ (o X). We write t 7−→ t 0 if t 0 is obtained by applying a rewrite rule to t. The rewrite rule ` : p 7−→ o can be applied to any compartment of type ` with p in its content (that will be rewritten with o). For instance, the rewrite rule ` : a b 7−→ c means that in all compartments of type ` an occurrence of a b can be replaced by c While the rule does not change the label ` of the compartment where the rule is applied, it may change all the labels of the compartments occurring in its content. For instance, the rewrite rule ` : (a x c X)`1 7−→ (a x c X)`2 means that, if contained in a compartment of type `, all compartments of type `1 and containing an a in their wrap can change their type to `2 . For uniformity reasons we assume that the whole system is always represented by a term consisting of a single compartment with distinguished label > and empty wrap, i.e., any system is represented by a 2 The linearity condition, in biological terms, corresponds to excluding that a transformation can depend on the presence of two (or more) identical (and generic) components in different compartments (see also [20]). 3 The implicit (distinguished) variable X matches with all the remaining part of the compartment content. 27 term of the shape (• ct)> , which will be also written as t, for simplicity. 2.3 Stochastic Simulation A stochastic simulation model for biological systems can be defined along the lines of the one presented by Gillespie in [14], which is, de facto, the standard way to model quantitative aspects of biological systems. The basic idea of Gillespie’s algorithm is that a rate function is associated with each considered chemical reaction which is used as the parameter of an exponential distribution modelling the probability that he reaction takes place. In the standard approach this reaction rate is obtained by multiplying the kinetic constant of the reaction by the number of possible combinations of reactants that may occur in the region in which the reaction takes place, thus modelling the law of mass action. For rules defining spatial movement the kinetic constant can be interpreted as the speed of the movement. In [12], the reaction rate is defined in a more general way by associating to each reduction rule a function which can also define rates based on different principles as, for instance, the Michaelis-Menten nonlinear kinetics. For simplicity, in this paper, we will follow the standard approach in defining reaction rates. Each reduction rule is then enriched by the kinetic constant k of the reaction that it represents (notation ` : k k p 7−→ o). For instance in evaluating the application rate of the stochastic rewrite rule R = ` : a b 7−→ c (written in the simplified form) to the term t = a a b b in a compartment of type ` we must consider the number of the possible combinations of reactants of the form a b in t. Since each occurrence of a can react with each occurrence of b, this number is 4. So the application rate of R is k · 4. 2.4 The CWC simulator The CWC simulator [1] is a tool under development at the Computer Science Department of the Turin University, based on Gillespie’s direct method algorithm [14]. It treats CWC models with different rating semantics (law of mass action, Michaelis-Menten kinetics, Hill equation) and it can run independent stochastic simulations over CWC models, featuring deep parallel optimizations for multi-core platforms on the top of FastFlow [2]. It also performs online analysis by a modular statistical framework. 3 A Surface Language In this section we embed CWC into a surface language able to express, in a synthetic form, both spatial (in a two-dimensional grid) and biochemical CWC transformations. The semantics of a surface language model is defined by translation into a standard CWC model. We distinguish between two kind of compartments: 1. Standard compartments (corresponding to the usual CWC compartments), used to represent entities (like bacteria or cells) that can move through space. 2. Spatial compartments, used to represent portions of space. Each spatial compartment defines a location in a two dimensional grid through a special atom, called coordinate, that occurs on its wrap. A coordinate is denoted by row.column, where row and column are intergers. Spatial compartments have distinguished labels, called spatial labels, that can be used to provide a specific characterisation of a portion of space. 28 For simplicity we assume that the wraps of each spatial compartment contains only the coordinate. Therefore, spatial compartment differentiations can be expressed only in terms of labels.4 For example, the spatial compartment (1.2 c 2 ∗ b)soil represents the cell of the grid located in the first row and the second column, and has type soil, the spatial compartment (2.3 c 3 ∗ b c)water represents a water-type spatial compartment in position 2.3. In our grid we assume that molecules can float only through neighbor cells: all the rules of interaction between spatial compartments must obviously k contain the indexes of their location. For example, the rule > : (1.2 x c a X)water (2.2 y cY )soil 7−→ (1.2 x c X)water (2.2 y c a Y )soil moves the molecule a from the water compartment in position 1.2 to the soil compartment in position 2.2 with a rate k representing in this case, the speed of the movement of a in downwards direction from a cell of water-type to a cell of soil-type. Let R and C denote the dimensions of our R × C grid defined by R rows and C columns. To increase the expressivity of the language we define a few structures to denote portions (i.e. sets of cells) of the grid. With Θ we denote a set of coordinates of the grid and we use the notion r.c ∈ Θ when the coordinate r.c is contained in the set Θ. We define rectangles by rect[r.c,r’.c’] where r.c,r’.c’ represent the edges of the rectangle. We project rows and columns of our grid with the constructions row[i] and col[ j] respectively. Example 3.1 The set Θ = {6.6} ∪ rect[1.1, 3.2] ∪ col[5] represents the set of coordinates Θ = {6.6} ∪ {1.1, 2.1, 3.1, 1.2, 2.2, 3.2} ∪ {i.5 | ∀i ∈ [1, R]}. Note that row[i] is just a shorthand for rect[i.1,i.C]. Similarly for columns. We use [*] as shorthand to indicate the whole grid (i.e. rect[1.1,R.C]). We also define four direction operators, N, W, S, E that applied to a range of cells shift them, respectively, up, left, down and right. For instance E(1.1) = 1.2. In the intuitive way, we also define the four diagonal movements (namely, NW, SW, NE, SE). With ∆ we denote a set of directions and we use the special symbol  to denote the set containing all eight possible directions. We convene that when a coordinate, for effect of a shit, goes out of the range of the grid the corresponding point is eliminated from the set. 3.1 Surface Terms We define the initial state of the system under analysis as a set of compartments modelling the twodimensional grid containing the biological entities of interest. Let Θ denote a set of coordinates and `s a spatial label. We use the notation: Θ, `s  t to define a set of cells of the grid. Namely Θ, `s  t denotes the top level CWC term: (• c (r1 .c1 ct)`s . . . (rn .cn ct)`s )> where ri .cj range over all elements of Θ. A spatial CWC term is thus defined by the set of grid cells covering the entire grid. 4 Allowing the wrap of spatial compartments to contain other atoms, thus providing an additional mean to express spatial compartment differentiations, should not pose particular technical problems (extend the rules of the surface language to deal with a general wrap content also for spatial compartments should be straightforward). 29 (a) Initial state (b) Spatial events Figure 2: Graphical representations of the grid described in the Example 3.2. Example 3.2 The CWC term obtained by the three grid cell constructions: rect[1.1, 10.3], soil  nitr (receptors c cytoplasm nucleus)PlantCell rect[1.4, 10.7], water  • rect[1.8, 10.10], soil  10 ∗ nitr 2 ∗ (receptors c cytoplasm nucleus)PlantCell builds a 10 × 10 grid composed by two portions of soil (the right-most one reacher of nitrates and plant cells) divided by a river of water (see Figure 2(a)). 3.2 Surface Rewrite Rules We consider rules for modelling three kind of events. Non-Spatial Events: are described by standard CWC rules, i.e. by rules of the shape: k ` : p 7−→ o Non-spatial rules can be applied to any compartment of type ` occurring in any portion of the grid and do not depend on a particular location. Example 3.3 A plant cell might perform its activity in any location of the grid. The following rules, describing some usual activities within a cell, might happen in any spatial compartment containing the plant cells under considerations: k1 PlantCell : nucleus 7−→ nucleus mRNA k2 PlantCell : mRNA cytoplasm 7−→ mRNA cytoplasm protein. Spatial Events: are described by rules that can be applied to specific spatial compartments. These rules allow to change the spatial label of the considered compartment. Spatial events are described by rules of 30 the following shape: k Θ . `s : p 7−→ `0s : o Spatial rules can be applied only within the spatial compartments with coordinates contained in the set Θ and with the spatial label `s . The application of the rule may also change the label of the spatial compartments `s to `0s . This rule is translated into the CWC set of rules: k 0 > : (ri .ci x c p X)`s 7−→ (ri .ci x c o X)`s ∀ri .ci ∈ Θ. Note that spatial rules are analogous to non spatial ones. The only difference is the explicit indication of the set Θ which allows to write a single rule instead of a set of rule (one for each element of Θ). Example 3.4 If we suppose that the river of water in the middle of the grid defined in Example 3.2 has a downward streaming, we might consider the initial part of the river (framed by the first row rect[1.4,1.7]) to be a source of nitrates (as they are coming from a region which is not modelled in the actual considered grid). The spatial rule: k 3 rect[1.4, 1.7] . water : • 7−→ water : nitr models the arrival of nitrates at the first modeled portion of the river (in this case it does not change the label of the spatial compartment involved by the rule). Spatial Movement Events: are described by rules considering the content of two adjacent spatial compartments and are described by rules of the following shape: k Θ / ∆ . `s1 , `s2 : p1 , p2 7−→ `0s1 , `0s2 : o1 , o2 This rule changes the content of two adjacent (according to the possible directions contained in ∆) spatial compartments and thus allows to define the movement of objects. The pattern matching is performed by checking the content of a spatial compartment of type `s1 located in a portion of the grid defined by Θ and the content of the adjacent spatial compartment of type `s2 . Such a rule could also change the labels of the spatial compartments. This rule is translated into the CWC set of rules: k 0 0 > : (ri .ci x c p1 X)`s1 (dir(ri .ci ) y c p2 Y )`s2 7−→ (ri .ci x c o1 X)`s1 (dir(ri .ci ) y c o2 Y )`s2 for all ri .ci ∈ Θ and for all dir ∈ ∆. Example 3.5 We assume that the flux of the river moves the nitrates in the water according to a downward direction in our grid and with a constant speed in any portion of the river with the following rule: k4 rect[1.4, 9.7] / {S} . water, water : nitr, • 7−→ water, water : •, nitr when nitrates reach the down-most row in our grid they just disappear (non moving event): k 4 rect[10.4, 10.7] . water : nitr 7−→ water : •. Moreover, nitrates streaming in the river may be absorbed by the soil on the riverside with the rule: k 5 rect[1.4, 10.7] / {W, E} . water, soil : nitr, • 7−→ water, soil : •, nitr. A graphical representation of these events is shown in Figure 2(b). Other rules can be defined to move the nitrates within the soil etc. 4 Case Study: A Growth Model for AM Fungi In this section we illustrate a case study concerning the modelling of Arbuscular Mychorrizal fungi growth. 31 Figure 3: Extraradical mycelia of an arbuscular mycorrhizal fungus. 4.1 Biological Model The arbuscular mycorrhizal (AM) symbiosis is an example of association with high compatibility formed between fungi belonging to the Glomeromycota phylum and the roots of most land plants[15]. AM fungi are obligate symbionts, in the absence of a host plant, spores of AM fungi germinate and produce a limited amount of mycelium. The recognition between the two symbionts is driven by the perception of diffusible signals and once reached the root surface the AM fungus enters in the root, overcomes the epidermal layer and it grows inter-and intracellularly all along the root in order to spread fungal structures. Once inside the inner layers of the cortical cells the differentiation of specialized, highly branched intracellular hyphae called arbuscules occur. Arbuscules are considered the major site for nutrients exchange between the two organisms. The fungus supply the host with essential nutrients such as phosphate, nitrate and other minerals from the soil. In return, AM fungi receive carbohydrates derived from photosynthesis in the host. Simultaneously to intraradical colonization, the fungus develops an extensive network of hyphae which explores and exploits soil microhabitats for nutrient acquisition. AM fungi have different hyphal growth patterns, anastomosis and branching frequencies which result in the occupation of different niche in the soil and probably reflect a functional diversity [18] (see Figure 3). The mycelial network that develops outside the roots is considered as the most functionally diverse component of this symbiosis. Extraradical mycelia (ERM) not only provide extensive pathways for nutrient fluxes through the soil, but also have strong influences upon biogeochemical cycling and agro-ecosystem functioning [22]. The mechanisms by which fungal networks extend and function remain poorly characterized. The functioning of ERM presumably relies on the existence of a complex regulation of fungal gene expression with regard 32 to nutrient sensing and acquisition. The fungal life cycle is then completed by the formation, from the external mycelium, of a new generation of spores able to survive under unfavourable conditions. Investigations on carbon (C) metabolism in AM fungi have proved useful to offer some explanation for their obligate biotrophism. As mentioned above, an AM fungus relies almost entirely on the host plant for its carbon supply. Intraradical fungal structures (presumably the arbuscules) are known to take up photosynthetically fixed plant C as hexoses. Unfortunately, no fungal hexose transporter-coding gene has been characterized yet in AM fungi. In order to quantify the contribution of arbuscular mycorrhizal (AM) fungi to plant nutrition, the development and extent of the external fungal mycelium and its nutrient uptake capacity are of particular importance. Shnepf and collegues [25] developed and analysed a model of the extraradical growth of AM fungi associated with plant roots considering the growth of fungal hyphae from a cylindrical root in radial polar coordinates. Measurements of fungal growth can only be made in the presence of plant. Due to this practical difficulty experimental data for calibrating the spatial and temporal explicit models are scarce. Jakobsen and collegues [16] presented measurements of hyphal length densities of three AM fungi: Scutellospora calospora (Nicol.& Gerd.) Walker & Sanders; Glomus sp. associated with clover (Trifolium subterraneum L.);these data appeared suitable for comparison with modelled hyphal length densities. The model in [25] describes, by means of a system of Partial Differential Equations (PDE), the development and distribution of the fungal mycelium in soil in terms of the creation and death of hyphae, tip-tip and tip-hypha anastomosis, and the nature of the root-fungus interface. It is calibrated and corroborated using published experimental data for hyphal length densities at different distances away from root surfaces. A good agreement between measured and simulated values was found for the three fungal species with different morphologies associated with Trifolium subterraneum L. The model and findings are expected to contribute to the quantification of the role of AM fungi in plant mineral nutrition and the interpretation of different foraging strategies among fungal species. 4.2 Surface CWC Model In this Section we describe how to model the growth of arbuscular mycorrhyzal fungi using the surface spatial CWC. We model the growth of AM fungal hyphae in a soil environment partitioned into 13 different layers (spatial compartments with label soil) to account for the distance in centimetres between the plant root and the fungal hyphae where the soil layer at the interface with the plant root is at position 1.1. We describe the mycelium by two atoms: the hyphae (atom Hyp) related to the length densities (number of hyphae in a given compartment) and the hyphal tips (atom Tip). The plant root (atom Root) is contained in the soil compartment at position 1.1. The tips and hyphae at the root-fungus interface proliferate according to the following spatial events: ã {1.1} . soil : Root 7−→ soil : Root Hyp a {1.1} . soil : Root 7−→ soil : Root Tip where ã and a is the root proliferation factor for the hyphae and tips respectively. Hyphal tips are important, because growth occurs due to the elongation of the region just behind the tips. Therefore, the spatial movement event describing the hyphal segment created during a tip shift to a nearby compartment is: 33 v [∗] / {E, W} . soil, soil : Tip, • 7−→ soil, soil : Hyp, Tip where v is the rate of tip movement. The hyphal length is related to tips movement, i.e. an hyphal trail is left behind as tips move through the compartments. We consider hyphal death to be linearly proportional to the hyphal density, so that the rule describing this spatial event is: d H [∗] . soil : Hyp 7−→ soil : • where dH is the rate of hyphal death. Mycorrhizal fungi are known to branch mainly apically where one tip splits into two. In the simplest case, branching and tip death are linearly proportional to the existing tips in that location modelled with the following spatial events: b T [∗] . soil : Tip 7−→ soil : 2 ∗ Tip d T [∗] . soil : Tip 7−→ soil : • where bT is the tip branching rate and dT is the tip death rate. Alternatively, if we assume that branching decreases with increasing tip density and ceases at a given maximal tip density, we employ the spatial event: c T [∗] . soil : 2 ∗ Tip 7−→ soil : • T where cT = Tbmax . From a biological point of view, this behaviour take into account the volume saturation when the tip density achieves the maximal number of tips Tmax . The fusion of two hyphal tips or a tip with a hypha can create interconnected networks by means of anastomosis: a 1 soil : Tip [∗] . soil : 2 ∗ Tip 7−→ a 2 [∗] . soil : Tip Hyp 7−→ soil : Tip where a1 and a2 are the tip-tip and tip-hypha anastomosis rate constants, respectively. The initial state of the system is given by the following grid cell definition: {1.1}, soil  Root T0 ∗ Tip H0 ∗ Hyp rect[1.2, 1.13], soil  • where T0 and H0 are the initial number of tips and hyphae respectively at the interface with the plant root. 4.3 Results We run 60 simulations on the model for the fungal species Scutellospora calospora and Glomus sp. Figure 4 show the mean values of hyphae (atoms Hyp) of the resulting stochastic simulations in function of the elapsed time in days and of the distance from the root surface. The rate parameters of the model are taken from [25]. The results for S. calospora are in accordance with the linear PDE model of [25] which is characterized by linear branching with a relatively small net branching rate and both kinds of anastomosis are 34 0 5 number of hyphae number of hyphae 120 100 80 60 40 20 0 120 100 80 60 40 20 0 35 30 25 20 15 10 5 0 35 30 25 20 15 10 5 0 0 10 15 20 time (days) 25 30 4 35 40 45 50 12 10 2 0 6 8 distance from root (cm) 5 10 15 20 time (days) 25 30 4 35 40 45 50 12 10 2 0 6 8 distance from root (cm) Figure 4: Mean values of 60 stochastic simulations of hyphal growth (atoms Hyp) results for S. calospora and Glomus sp. fungi. negligible when compared with the other species. This model imply that the fungus is mainly growing and allocating resources for getting a wider catchment area rather than local expoloitation of mineral resources via hyphal branching. The model for Glomus sp. considers the effect of nonlinear branching due to the competition between tips for space. The results obtained for Glomus sp. are in accordance with the non–linear PDE model of [25] which imply that local exploitation for resources via hyphal branching is important for this fungus as long as the hyphal tip density is small. Reaching near the maximum tip density, branching decreases. Symbioses between a given host plant and different AM fungi have been shown to differ functionally [23]. 5 Conclusions and Related Works For the well-mixed chemical systems (even divided into nested compartments) often found in cellular biology, interaction and distribution analysis are sufficient to study the system’s behaviour. However, there are many other situations, like in cell growth and developmental biology where dynamic spatial arrangements of cells determines fundamental functionalities, where a spatial analysis becomes essential. Thus, a realistic modelling of biological processes requires space to be taken into account [17]. This has brought to the extension of many formalisms developed for the analysis of biological systems with (even continuous) spatial features. In [9], Cardelli and Gardner develop a calculus of processes located in a three-dimensional geometric space. The calculus, introduces a single new geometric construct, called frame shift, which applies a three-dimensional space transformation to an evolving process. In such a work, standard notions of process equivalence give rise to geometric invariants. In [5], a variant of P-systems embodying concepts of space and position inside a membrane is presented. The objects inside a membrane are associated with a specific position. Rules can alter the position of the objects. The authors also define exclusive objects (only one exclusive object can be contained inside a membrane). In [3], an spatial extension of CLS is given in a 2D/3D space. The spatial terms of the calculus may move autonomously during the passage of time, and may interact when the constraints on their positions are satisfied. The authors consider a hard-sphere based notion of space: two objects, represented as spheres, cannot occupy the same space, thus conflicts may arise by moving objects. Such 35 conflicts are resolved by specific algorithms considering the forces involved and appropriate pushing among the objects. BioShape [6] is a spatial, particle-based and multi-scale 3D simulator. It treats biological entities of different size as geometric 3D shapes. A shape is either basic (polyhedron, sphere, cone or cylinder) or composed (aggregation of shapes glued on common surfaces of contact). Every element involved in the simulation is a 3D process and has associated its physical motion law. Adding too many features to the model (e.g., coordinates, position, extension, motion direction and speed, rotation, collision and overlap detection, communication range, etc.) could heavily rise the complexity of the analysis. To overcome this risk, a detailed study of the possible subsets of these features, chosen to meet the requirements of particular classes of biological phenomena, might be considered. In this paper we pursued this direction by extending CWC with a surface language providing a framework for incorporating basic spatial features (namely, coordinates, position and movement). In future work we plan to extend the surface language to deal with three dimensional spaces and to investigate the possibility to incorporate other spatial features to the CWC simulation framework. Notably, the framework presented in this paper could also be applied to other calculi which are able to express compartmentalisation (see, e.g., BioAmbients [24], Brane Calculi [8], Beta-Binders [13], etc.). References [1] M. Aldinucci, M. Coppo, F. Damiani, M. Drocco, E. Giovannetti, E. Grassi, E. Sciacca, S. Spinella & A. Troina (2010): CWC Simulator. Dipartimento di Informatica, Università di Torino. http:// cwcsimulator.sourceforge.net/. [2] M. Aldinucci & M. Torquati (2009): FastFlow website. FastFlow. http://mc-fastflow.sourceforge. net/. [3] R. Barbuti, A. Maggiolo-Schettini, P. Milazzo & G. Pardini (2009): Spatial Calculus of Looping Sequences. Electr. Notes Theor. Comput. Sci. 229(1), pp. 21–39. Available at http://dx.doi.org/10.1016/j. entcs.2009.02.003. [4] R. Barbuti, A. Maggiolo-Schettini, P. Milazzo & G. Pardini (2011): Spatial Calculus of Looping Sequences. Theoretical Computer Science . [5] R. Barbuti, A. Maggiolo-Schettini, P. Milazzo, G. Pardini & L. Tesei (2011): Spatial P systems. Natural Computing 10(1), pp. 3–16. Available at http://dx.doi.org/10.1007/s11047-010-9187-z. [6] F. Buti, D. Cacciagrano, F. Corradini, E. Merelli & L. Tesei (2010): BioShape: A Spatial Shape-based Scaleindependent Simulation Environment for Biological Systems. Procedia CS 1(1), pp. 827–835. Available at http://dx.doi.org/10.1016/j.procs.2010.04.090. [7] C. Calcagno, M. Coppo, F. Damiani, M. Drocco, E. Sciacca, S. Spinella & A. Troina (To Appear): Modelling Spatial Interactions in the AM Symbiosis using CWC. In: CompMod 2011. [8] L. Cardelli (2004): Brane Calculi. In: Proc. of CMSB’04, LNCS 3082, Springer, pp. 257–278. [9] L. Cardelli & P. Gardner (2010): Processes in Space. In: Proc. of the 6th international conference on Computability in Europe, CiE’10, Springer-Verlag, pp. 78–87. [10] M. Coppo, F. Damiani, M. Drocco, E. Grassi, M. Guether & A. Troina (2011): Modelling Ammonium Transporters in Arbuscular Mycorrhiza Symbiosis. Transactions on Computational Systems Biology XIII, pp. 85–109. [11] M. Coppo, F. Damiani, M. Drocco, E. Grassi, E. Sciacca, S. Spinella & A. Troina (2010): Hybrid Calculus of Wrapped Compartments. In: Proceedings Compendium of the Fourth Workshop on Membrane Computing and Biologically Inspired Process Calculi (MeCBIC’10), 40, EPTCS, pp. 103–121. 36 [12] M. Coppo, Damiani. F., M. Drocco, Grassi. E. & A. Troina (2010): Stochastic Calculus of Wrapped Compartments. In: 8th Workshop on Quantitative Aspects of Programming Languages (QAPL’10), 28, EPTCS, pp. 82–98. [13] P. Degano, D. Prandi, C. Priami & P. Quaglia (2006): Beta-binders for Biological Quantitative Experiments. Electr. Notes Theor. Comput. Sci. 164(3), pp. 101–117. Available at http://dx.doi.org/10.1016/j. entcs.2006.07.014. [14] D. Gillespie (1977): Exact Stochastic Simulation of Coupled Chemical Reactions. J. Phys. Chem. 81, pp. 2340–2361. [15] M.J. Harrison (2005): Signaling in the Arbuscular Mycorrhizal Symbiosis. Annu. Rev. Microbiol. 59, pp. 19–42. [16] I. Jakobsen, LK Abbott & AD Robson (1992): External Hyphae of Vesicular-arbuscular Mycorrhizal Fungi Associated with Trifolium Subterraneum L. 1. Spread of Hyphae and Phosphorus Inflow into Roots. New Phytologist 120(3), pp. 371–379. [17] B. Kholodenko (2006): Cell-signalling Dynamics in Time and Space. Nature Reviews Molecular Cell Biology 7, pp. 165–176. [18] H. Maherali & J.N. Klironomos (2007): Influence of Phylogeny on Fungal Community Assembly and Ecosystem Functioning. Science 316(5832), p. 1746. [19] S. Montagna & M. Viroli (2010): A Framework for Modelling and Simulating Networks of Cells. Electr. Notes Theor. Comput. Sci. 268, pp. 115–129. Available at http://dx.doi.org/10.1016/j.entcs.2010.12. 009. [20] N. Oury & G. Plotkin (2011): Multi-Level Modelling via Stochastic Multi-Level Multiset Rewriting. Draft submitted to MSCS. [21] T. Parr et al.: ANTLR website. http://www.antlr.org/. [22] S. Purin & M.C. Rillig (2008): Parasitism of Arbuscular Mycorrhizal Fungi: Reviewing the Evidence. FEMS Microbiology Letters 279(1), pp. 8–14. [23] S. Ravnskov & I. Jakobsen (1995): Functional Compatibility in Arbuscular Mycorrhizas Measured as Hyphal P transport to the Plant. New Phytologist 129(4), pp. 611–618. [24] A. Regev, E. M. Panina, W. Silverman, L. Cardelli & E. Y. Shapiro (2004): BioAmbients: An Abstraction for Biological Compartments. Theor. Comput. Sci. 325(1), pp. 141–167. [25] A. Schnepf, T. Roose & P. Schweiger (2008): Growth Model for Arbuscular Mycorrhizal Fungi. Journal of The Royal Society Interface 5(24), p. 773. [26] A. Spicher, O. Michel & J.-L. Giavitto (2011): Interaction-Based Simulations for Integrative Spatial Systems Biology. In: Understanding the Dynamics of Biological Systems, Springer New York, pp. 195–231. Appendix: Implementation of the Surface Language This Section presents a software module implementing the translation of a surface language model into the corresponding standard CWC model that can be executed by the CWC simulator (cf. Sec. 2.4). The module is written in Java by means of the ANTLR parser generator [21]. The input syntax of the software is defined as following. Patterns, Terms and Open Terms: pattern, terms and open terms follow the syntax of CWC. In the definition of a compartment, its label is written in braces, as the first element in the round brackets. The symbol c is translated into |, and the empty sequence • into \e. If a pattern, term or open term is repeated several times, we write the number of repetitions before it. Grid Coordinates: the row and the column of a grid coordinate are divided by a comma. All the constructions of the surface language are implemented. The components of a set of coordinates are divided by a blank space. 37 Directions: for the directions we use the same keywords of the surface language, plus the special identifiers +, x, * to identify all the orthogonal directions (N,S,W,E), all the diagonal directions (NW,SW,NE,SE) and all the directions, respectively. Model Name: the name of the model is defined following the syntax model string ; where string is the name of the model. Grid Dimensions: the dimensions of the grid are expressed with the syntax grid r , c ; where r and c are the number of rows and columns of the grid, respectively. Grid Cell Construction: the notation of a grid cell Θ, `s  t is translated into the code line cell < Θ > { `s } t ; the module writes as many CWC compartments as the number of coordinates in Θ: each of these copies has the same label `s and the same content t, but a different coordinate in the wrap. k Non Spatial Events: the notation of a non spatial event ` : p 7−→ o is translated into the code line nse { ` } p [ k ] o ; the module translates this line in a unique CWC rule. k Spatial Events: the notation of a spatial event Θ . `s : p 7−→ `0s : o is translated into the code line se < Θ > { `s } p [ k ] { `0s } o ; As shortcuts, the absence of < Θ > indicates the whole grid, and the absence of { `0s } indicates that the label of the spatial compartment does not change. The module writes a CWC rule for each coordinate in Θ: a rule differs from the others only in the coordinate written in its wrap. k Spatial Movement Events: the notation of a spatial movement event Θ / ∆ . `s1 , `s2 : p1 , p2 7−→ `0s1 , `0s2 : o1 , o2 is translated into the code line sme < Θ > [ ∆ ] { `s1 } p1 { `s2 } p2 [ k ] { `0s1 } o1 { `0s2 } o2 ; As shortcuts, the absence of < Θ > indicates the whole grid, and the absence of { `0s1 } or { `0s2 } indicates that the label of the spatial compartment does not change. In case of absence of { `0s2 }, an underscore is used to separate o1 and o2 . For each coordinate in Θ, the module writes as many CWC rules as the number of directions in ∆; in case of a coordinate on the edge of the grid, the module writes a CWC rule for a direction only if this one identifies an adjacent spatial compartment on the grid. The number of CWC rules is therefore less or equal to |Θ| × |∆|. Monitors: a monitor permits to expose what pattern we need to monitor: at the end of simulation, all the states of this pattern are written in a log file. The syntax to design a monitor is the following: monitor string < Θ > { `s } p ; where string is a string describing the monitor and p is the pattern, contained into a spatial compartment labelled by `s and the coordinates Θ, to monitor. As shortcut, the absence of < Θ > indicates the average of the monitors in the whole grid, and the absence of { `s } indicates to write a monitor for each label defined in the model. The module writes a monitor for each coordinate in Θ; in case of the absence of {`s }, the module writes a monitor for each combination of coordinates in Θ and spatial labels defined in the model. The construction of a model follows the order used to describe the translator syntax: first the model name and the grid dimensions, then the rules of the model. After the rules, we define the grid cell, and finally the monitors. Listings 1 and 2 show the input file for the CWC Surface Language software to model the S. calospora and Glomus sp. fungi growth. 38 Listing 1: Input file for the Surface Language parser to model the S. calospora fungus growth model " AM Fungi Growth Model S . Calospora "; grid 1 ,13; // Tips and hyphae proliferation at the root - fungus interface se <0 ,0 > { grid } Root [2.52] Root Tip ; se <0 ,0 > { grid } Root [3.5] Root Hyp ; // Tips branching and death se { grid } Tip [0.02] 2 Tip ; se { grid } Tip [0.0052] \ e ; // Hyphae death se { grid } Hyp [0.18] \ e ; // Hyphal creation during a tip shift to a nearby compartment sme [ E W ] { grid } Tip { grid } \ e [0.125] Hyp _ Tip ; // Initial state cell <0 ,0 > { grid } Root 97 Tip 115 Hyp ; cell < rect [0 ,1 0 ,12] > { grid } \ e ; monitor " Hyp " < rect [0 ,0 0 ,12] > { grid } Hyp ; Listing 2: Input file for the Surface Language parser to model the Glomus sp. fungus growth model " AM Fungi Growth Model Glomus sp ."; grid 1 ,13; // Tips and hyphae proliferation at the root - fungus interface se <0 ,0 > { grid } Root [2.24] Root Tip ; se <0 ,0 > { grid } Root [1.04] Root Hyp ; // Tips branching and death se { grid } Tip [1.91] 2 Tip ; se { grid } Tip [0.15] \ e ; // Tips saturation se { grid } 2 Tip [0.15] \ e ; // Hyphae death se { grid } Hyp [0.28] \ e ; // Hyphal creation during a tip shift to a nearby compartment sme [ E W ] { grid } Tip { grid } \ e [0.065] Hyp _ Tip ; // Initial state cell <0 ,0 > { grid } Root 84 Tip 35 Hyp ; cell < rect [0 ,1 0 ,12] > { grid } \ e ; monitor " Hyp " < rect [0 ,0 0 ,12] > { grid } Hyp ; 39
5cs.CE
The Alma Project, or How First-Order Logic Can Help Us in Imperative Programming Krzysztof R. Apt1,2 and Andrea Schaerf3 arXiv:cs/9907027v1 [cs.LO] 19 Jul 1999 1 2 CWI P.O. Box 94079, 1090 GB Amsterdam, The Netherlands [email protected] Dept. of Mathematics, Computer Science, Physics & Astronomy University of Amsterdam, The Netherlands 3 Dipartimento di Ingegneria Elettrica, Gestionale e Meccanica Università di Udine via delle Scienze 208, I-33100 Udine, Italy [email protected] Abstract. The aim of the Alma project is the design of a strongly typed constraint programming language that combines the advantages of logic and imperative programming. The first stage of the project was the design and implementation of Alma0, a small programming language that provides a support for declarative programming within the imperative programming framework. It is obtained by extending a subset of Modula-2 by a small number of features inspired by the logic programming paradigm. In this paper we discuss the rationale for the design of Alma-0, the benefits of the resulting hybrid programming framework, and the current work on adding constraint processing capabilities to the language. In particular, we discuss the role of the logical and customary variables, the interaction between the constraint store and the program, and the need for lists. 1 1.1 Introduction Background on Designing Programming Languages The design of programming languages is one of the most hotly debated topics in computer science. Such debates are often pretty chaotic because of the lack of universally approved criteria for evaluating programming languages. In fact, the success or failure of a language proposal often does not say much about the language itself but rather about such accompanying factors as: the quality and portability of the implementation, the possibility of linking the language with the currently reigning programming language standard (for instance, C), the existing support within the industry, presence of an attractive development environment, the availability on the most popular platforms, etc. The presence of these factors often blurs the situation because in evaluating a language proposal one often employs, usually implicitly, an argument that the “market” will eventually pick up the best product. Such a reasoning would be correct if the market forces in computing were driven by the desire to improve the quality of programming. But from an economic point of view such aspects as compatibility and universal availability are far more important than quality. Having this in mind we would like to put the above factors in a proper perspective and instead concentrate on the criteria that have been used in academia and which appeal directly to one of the primary purposes for which a programming language is created, namely, to support an implementation of the algorithms. In what follows we concentrate on the subject of “general purpose” programming languages, so the ones that are supposed to be used for developing software, and for teaching programming. Ever since Algol-60 it became clear that such programming languages should be “high-level” in that they should have a sufficiently rich repertoire of control structures. Ever since C and Pascal it became clear that such programming languages should also have a sufficiently rich repertoire of data structures. But even these seemingly obvious opinions are not universally accepted as can be witnessed by the continuing debate between the followers of imperative programming and of declarative programming. In fact, in logic programming languages, such as Prolog, a support for just one data type, the lists, is provided and the essence of declarative programming as embodied in logic and functional programming lies in not using assignment. Another two criteria often advanced in the academia are that the programming language should have a “simple” semantics and that the programs should be “easy” to write, read and verify. What is “simple” and what is “easy” is in the eyes of the beholder, but both criteria can be used to compare simplicity of various programming constructs and can be used for example to argue against the goto statement or pointers. In this paper we argue that these last two criteria can be realized by basing a programming language on first-order logic. The point is that first-order logic is a simple and elegant formalism with a clear semantics. From all introduced formalisms (apart from the propositional logic that is too simplistic for programming purposes) it is the one that we understand best, both in terms of its syntax and its semantics. Consequently, its use should facilitate program development, verification and understanding. One could argue that logic programming has realized this approach to computing as it is based on Horn clauses that are special types of first-order formulas. However, in logic programming in its original setting computing (implicitly) takes place over the domain of terms. This domain is not sufficient for programming purposes. Therefore in Prolog, the most widely used logic programming language, programs are augmented with some support for arithmetic. This leads to a framework in which the logical basis is partly lost due to the possibility of errors. For instance, Prolog’s assignment statement X is t yields a run-time error if t is not a ground arithmetic expression. This and other deficiencies of Prolog led to the rise of constraint logic programming languages that overcome some of Prolog’s shortcomings. These pro- gramming languages depend in essential way on some features as the presence of constraint solvers (for example a package for linear programming) and constraint propagation. So this extension of logic programming goes beyond firstorder logic. It is also useful to reflect on other limitations of these two formalisms. Both logic programming and constraint logic programming languages rely heavily on recursion and the more elementary and easier to understand concept of iteration is not available as a primitive. Further, types are absent. They can be added to the logic programming paradigm and in fact a number of successful proposals have been made, see, e.g., [15]. But to our knowledge no successful proposal dealing with addition of types to constraint logic programs is available. Another, admittedly debatable, issue is assignment, shunned in logic programming and constraint logic programming because its use destroys the declarative interpretation of a program as a formula. However, we find that assignment is a useful construct. Some uses of it, such as recording the initial value of a variable or counting the number of bounded iterations, can be replaced by conceptually simpler constructs but some other uses of it such as for counting or for recording purposes are much less natural when simulated using logic formulas. 1.2 Design Decisions These considerations have led us to a design of a programming language Alma-0. The initial work on the design of this language was reported in [3]; the final description of the language, its implementation and semantics is presented in [2]. In a nutshell, Alma-0 has the following characteristics: – it is an extension of a subset of Modula-2 that includes assignment, so it is a strongly typed imperative language; – to record the initial value of a variable the equality can be used; – it supports so-called “don’t know” nondeterminism by providing a possibility of a creation of choice points and automatic backtracking; – it provides two forms of bounded iterations. The last two features allow us to dispense with many uses of recursion that are in our opinion difficult to understand and to reason about. As we shall see, the resulting language proposal makes programming in an imperative style easier and it facilitates (possibly automated) program verification. Additionally, for several algorithmic problems the solutions offered by Alma-0 is substantially simpler than the one offered by the logic programming paradigm. The following simple example can help to understand what we mean by saying that Alma-0 is based on first-order logic and that some Alma-0 programs are simpler than their imperative and logic programming counterparts. Consider the procedure that tests whether an array a[1..n] is ordered. The customary way to write it in Modula-2 is: i:= 1; ordered := TRUE; WHILE i < n AND ordered DO ordered := ordered AND (a[i] <= a[i+1]); i := i+1 END; In Alma-0 we can just write: ordered := FOR i:= 1 TO n-1 DO a[i] <= a[i+1] END This is much simpler and as efficient. In fact, this use of the FOR statement corresponds to the bounded universal quantification and the above one line program equals the problem specification. In the logic programming framework there are no arrays. But the related problem of finding whether a list L is ordered is solved by the following program which is certainly more involved than the above one line of Alma-0 code: ordered([]). ordered([X]). ordered([X, Y | Xs]) :- X =< Y, ordered([Y| Xs]). 1.3 Towards an Imperative Constraint Programming Language In Alma-0 each variable is originally uninitialized and needs to be initialized before being used. Otherwise a run-time error arises. The use of uninitialized variables makes it possible to use a single program for a number of purposes, such as computing a solution, completing a partial solution, and testing a candidate solution. On the other hand, it also provides a limitation on the resulting programming style as several first-order formulas, when translated to Alma-0 syntax, yield programs that terminate in a run-time error. With the addition of constraints this complication would be overcome. The idea is that the constraints encountered during the program execution are moved to the constraint store and evaluated later, when more information is available. Then the above restriction that each variable has to be initialized before being used can be lifted, at least for the variables that are manipulated by means of constraints. Additionally, more programs can be written in a declarative way. In fact, as we shall see, an addition of constraints to Alma-0 leads to a very natural style of programming in which the constraint generation part of the program is often almost identical to the problem specification. Constraint programming in a nutshell consists of generating constraints (requirements) and solving them by general and domain specific methods. This approach to programming was successfully realized in a number of programming languages, notably constraint logic programming languages. Up to now, the most successful approach to imperative constraint programming is the object-oriented approach taken by ILOG Solver (see [16], [9]). In this system constraints and variables are treated as objects and are defined within a C++ class library. Thanks to the class encapsulation mechanism and the operator overloading capability of C++, the user can see constraints almost as if they were a part of the language. A similar approach was independently taken in the NeMo+ programming environment of [18]. In our approach constraints are integrated into the imperative programming paradigm, as “first class citizens” of the language. The interaction between the constraint store and the program becomes then more transparent and conceptually simpler and the resulting constraint programs are in our opinion more natural than their counterparts written in the constraint logic programming style or in the imperative languages augmented with constraint libraries. The reason for this in the case of constraint logic programming is that many uses of recursion and lists can be replaced by the more basic concepts of bounded iteration and arrays. In the case of the imperative languages with constraint libraries, due to the absence of non-determinism in the language, failure situations (arising due to inconsistent constraints) must be dealt with explicitly by the programmer, whereas in Alma-0 they are managed implicitly by the backtracking mechanism. When adding constraints to a strongly typed imperative programming language one needs to resolve a number of issues. First, constraints employ variables in the mathematical sense of the word (so unknowns) while the imperative programming paradigm is based on the computer science concept of a variable, so a known, but varying entity. We wish to separate between these two uses of variables because we want to manipulate unknowns only by means of constraints imposed on them. This precludes the modelling of unknowns by means of uninitialized variables since the latter can be modified by means of an assignment. Second, one needs to integrate the constraints in such a way that various features of the underlying language such as use of local and global declarations and of various parameter passing mechanisms retain their coherence. Additionally, one has to maintain the strong typing discipline according to which each variable has a type associated with it in such a way that throughout the program execution only values from its type can be assigned to the variable. Finally, one needs to provide an adequate support for search, one of the main aspects of constraint programming. So the situation is quite different than in the case of the logic programming framework. Namely, the logic programming paradigm is based on the notion of a variable in the mathematical sense (usually called in this context a logical variable). This greatly facilitates the addition of constraints and partly explains why the integration of constraints into logic programming such as in the case of CHIP (see [19]), Prolog III (see [4]) and CLP(R) (see [11]), to name just three examples, has been so smooth and elegant. Further, logic programming languages provide support for automatic backtracking. However, as already mentioned, in constraint logic programming languages types are not available. Moreover, there is a very limited support for scoping and only one parameter mechanism is available. Let us return now to Alma-0. The language already provides a support for search by means of automatic backtracking. This support is further enhanced in our proposal by providing a built-in constraint propagation. In [2] we stated that our language proposal should be viewed as “an instance of a generic method for extending (essentially) any imperative programming language with facilities that encourage declarative programming.” That is why we think that the proposal here discussed should be viewed not only as a suggestion how to integrate constraints into Alma-0, but more generally how to integrate constraints into any strongly typed imperative language. In fact, Alma-0 can be viewed as an intermediate stage in such an integration. The remainder of the paper is organized as follows. In Section 2 we summarize the new features of Alma-0 and in Section 3 we illustrate the resulting programming style by two examples. Then, in Section 4 we discuss the basics of our proposal for adding constraints to Alma-0 and in Section 5 we explain how constraints interact with procedures. In turn in Section 6 we discuss language extensions for expressing complex constraints and for facilitating search in presence of constraints. Finally, in Section 7 we discuss related work and in Section 8 we draw some conclusions and discuss the future work. 2 A Short Overview of Alma-0 Alma-0 is an extension of a subset of Modula-2 by nine new features inspired by the logic programming paradigm. We briefly recall most of them here and refer to [2] for a detailed presentation. – Boolean expressions can be used as statements and vice versa. This feature of Alma-0 is illustrated by the above one line program of Subsection 1.2. A boolean expression that is used as a statement and evaluates to FALSE is identified with a failure. – Choice points can be created by the non-deterministic statements ORELSE and SOME. The former is a dual of the statement composition and the latter is a dual of the FOR statement. Upon failure the control returns to the most recent choice point, possibly within a procedure body, and the computation resumes with the next branch in the state in which the previous branch was entered. – The created choice points can be erased or iterated over by means of the COMMIT and FORALL statements. COMMIT S END removes the choice points created during the first successful execution of S. FORALL S DO T END iterates over all choice points created by S. Each time S succeeds, T is executed. – The notion of initialized variable is introduced: A variable is uninitialized until the first time a value is assigned to it; from that point on, it is initialized. The KNOWN relation tests whether a variable of a simple type is initialized. – The equality test is generalized to an assignment statement in case one side is an uninitialized variable and the other side an expression with known value. – In Alma-0 three types of parameter mechanisms are allowed: call by value, call by variable and call by mixed form. The first two are those of Pascal and Modula-2; the third one is an amalgamation of the first two (see [2]). Parameters passed by mixed form can be used both for testing and for computing. Let us summarize these features of Alma-0 by clarifying which of them are based on first-order logic. In the logical reading of the programming language constructs the program composition S; T is viewed as the conjunction S ∧ T. A dual of “;”, the EITHER S ORELSE T END statement, corresponds then to the disjunction S ∨ T. Further, the FOR i:= s TO t DO S END statement is viewed as the bounded universal quantification, ∀i ∈ [s..t] S, and its dual, the SOME i:= s TO t DO S END statement is viewed as the bounded existential quantification, ∃i ∈ [s..t] S. In turn, the FORALL S DO T END statement can be viewed as the restricted quantification ∀x̄(S → T), where x̄ are all the variables of S. Because the boolean expressions are identified with the statements, we can apply the negation connective, NOT, to the statements. Finally, the equality can be interpreted both as a test and as an one-time assignment, depending on whether the variable in question is initialized or not. 3 Programming in Alma-0 To illustrate the above features of Alma-0 and the resulting programming style we now consider two examples. 3.1 The Frequency Assignment Problem The first problem we discuss is a combinatorial problem from telecommunication. Problem 1. Frequency Assignment ([7]). Given is a set of n cells, C := {c1 , c2 , . . . , cn } and a set of m frequencies (or channels) F := {f1 , f2 , . . . , fm }. An assignment is a function which associates with each cell ci a frequency xi ∈ F . The problem consists in finding an assignment that satisfies the following constraints. Separations: Given h and k we call the value d(fh , fk ) = | h − k | the distance between two channels fh and fk . (The assumption is that consecutive frequencies lie one unit apart.) Given is an n × n non-negative integer symmetric matrix S, called a separation matrix, such that each sij represents the minimum distance between the frequencies assigned to the cells ci and cj . That is, for all i ∈ [1..n] and j ∈ [1..n] it holds that d(xi , xj ) ≥ sij . Illegal channels: Given is an n × m boolean matrix F such that if Fij = true, then the frequency fj cannot be assigned to the cell i, i.e., xi 6= fj . Separation constraints prevent interference between cells which are located geographically close and which broadcast in each other’s area of service. Illegal channels account for channels reserved for external uses (e.g., for military bases). The Alma-0 solution to this problem does not use an assignment and has a dual interpretation as a formula. We tested this program on various data. We assume here for simplicity that each ci equals i and each fi equals i, so C = {1, . . ., n} and F = {1, . . ., m}. MODULE FrequencyAssignment; CONST N = 30; (* number of cells *) M = 27; (* number of frequencies *) TYPE SeparationMatrix = ARRAY [1..N],[1..N] OF INTEGER; IllegalFrequencies = ARRAY [1..N],[1..M] OF BOOLEAN; Assignment = ARRAY [1..N] OF [1..M]; (* solution vector *) VAR S: SeparationMatrix; F: IllegalFrequencies; A: Assignment; noSol: INTEGER; PROCEDURE AssignFrequencies(S: SeparationMatrix; F: IllegalFrequencies; VAR A: Assignment); VAR i, j, k: INTEGER; BEGIN FOR i := 1 TO N DO SOME j := 1 TO M DO (* j is a candidate frequency for cell i *) NOT F[i,j]; FOR k := 1 TO i-1 DO abs(A[k] - j) >= S[k,i] END; A[i] = j END END END AssignFrequencies; BEGIN InitializeData(S,F); AssignFrequencies(S,F,A); PrintSolution(A) END FrequencyAssignment. The simple code of the procedures InitializeData and PrintSolution is omitted. The generalized equality A[i] = j serves here as an assignment and the SOME statement takes care of automatic backtracking in the search for the right frequency j. In the second part of the paper we shall discuss an alternative solution to this problem using constraints. 3.2 Job Shop Scheduling The second problem we discuss is a classical scheduling problem, namely the job shop scheduling problem. We refer to [5, page 242] for its precise description. Roughly speaking, the problem consists of scheduling over time a set of jobs, each consisting of a set of consecutive tasks, on a set of processors. The input data is represented by an array of jobs, each element of which is a record that stores the number of the tasks and the array of tasks. In turn, each task is represented by the machine it uses and by its length. The output is delivered as an integer matrix that (like a so-called Gantt chart) for each time point k and each processor p stores the job number that p is serving at the time point k. The constraint that each processor can perform only one job at a time is enforced by using generalized equality on the elements of the output matrix. More precisely, whenever job i requires processor j for a given time window [d1 , d2 ], the program attempts for some k to initialize the elements of the matrix (j, k + d1 ), (j, k + d1 + 1), . . . , (j, k + d2 ) to the value i. If this initialization succeeds, the program continues with the next task. Otherwise some element in this segment is already initialized, i.e., in this segment processor j is already used by another job. In this case the execution fails and through backtracking the next value for k is chosen. The constraint that the tasks of the same job must be executed in the provided order and cannot overlap in time is enforced by the use of the variable min start time which, for each job, initially equals 1 and then is set to the end time of the last considered task of the job. To perform this update we exploit the fact that when the SOME statement is exited its index variable k equals the smallest value in the considered range for which the computation does not fail (as explained in [2]). We provide here the procedure that performs the scheduling. For the sake of brevity the rest of the program is omitted. TYPE TaskType = RECORD machine : INTEGER; length : INTEGER; END; JobType = RECORD tasks : INTEGER; task : ARRAY [1..MAX_TASKS] OF TaskType END; JobVectorType = ARRAY [1..MAX_JOBS] OF JobType; GanttType = ARRAY [1..MAX_MACHINES],[1..MAX_DEADLINE] OF INTEGER; PROCEDURE JobShopScheduling(VAR job: JobVectorType; deadline:INTEGER; jobs :INTEGER; VAR gantt: GanttType); VAR i, j, k, h : INTEGER; min_start_time : INTEGER; BEGIN FOR i := 1 TO jobs DO min_start_time := 1; FOR j := 1 TO job[i].tasks DO SOME k := min_start_time TO deadline - job[i].task[j].length + 1 DO (* job i engages the processor needed for task j from time k to k + (length of task j) - 1. If the processor is already engaged, the program backtracks. *) FOR h := k TO k + job[i].task[j].length - 1 DO gantt[job[i].task[j].processor,h] = i; END END; min_start_time := k + job[i].task[j].length; (* set the minimum start time for the next task to the end of the current task *) END; END END JobShopScheduling; In this program the “don’t know” nondeterminism provided by the use of the SOME statement is combined with the use of assignment. Furthermore, as already mentioned, for each value of i and j the equality gantt[job[i].task[j].processor,h] = i acts both as an assignment and as a test. The array gantt should be uninitialized when the procedure is called. At the end of the execution the variable gantt contains the first feasible schedule it finds. Preinitialized values can be used to enforce some preassignments of jobs to processors, or to impose a constraint that a processor is not available during some periods of time. For example, if processor 2 is not available at time 5, we just use the assignment gantt[2,5] := 0 (where 0 is a dummy value) before invoking the procedure JobShopSchedule. As an example, suppose we have 3 jobs, 3 processors (p1 , p2 , and p3 ), the deadline is 20, and the jobs are composed as follows: task 1 job tasks proc len 1 4 p1 5 2 3 p2 6 3 4 p3 6 task 2 proc len p2 5 p1 6 p2 4 task 3 proc len p3 5 p3 4 p1 4 task 4 proc len p2 3 1 p2 The first solution (out of the existing 48) for the array gantt that the program finds is the following one, where the symbol ’-’ means that the value is uninitialized, i.e., the processor is idle in the corresponding time point. 1 2 3 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 1 - 2 1 - 2 1 - 2 1 - 2 1 - 2 3 1 3 1 3 1 3 1 3 1 3 1 2 3 1 2 3 1 2 3 2 For some applications, it is necessary to make the schedule as short as possible. To this aim, we can use the following program fragment. COMMIT SOME deadline := 1 TO max_deadline DO JobShopScheduling(JobVector,deadline,jobs,Gantt) END END It computes the shortest schedule by guessing, in ascending order, the first deadline that can be met by a feasible assignment. The use of the COMMIT statement ensures that once a solution is found, the alternatives, with larger deadline values, are discarded. 4 Introducing Constraints In what follows we discuss a proposal for adding constraints to Alma-0. This Section is organized as follows. In Subsection 4.1 we discuss the addition of constrained types and unknowns to the language and in Subsections 4.2 and 4.3 we define the constraint store and illustrate its interaction with the program execution. To illustrate how the proposed addition of constraints to Alma-0 provides a better support for declarative programming we illustrate in Subsection 4.4 their use by means of three example programs. To simplify our considerations we ignore in this section the presence of procedures. In particular, we assume for a while that all declarations are at one level. 4.1 Adding Constrained Types, Unknowns and Constraints We start by adding a new kind of variables of simple types, called unknowns. This is done by using the qualifier CONSTRAINED in declarations of simple types, that is INTEGER, BOOLEAN, REAL, enumeration and subrange types. Definition 1. – A type qualified with the keyword CONSTRAINED is called a constrained type. – A variable whose type is a constrained type is called an unknown. We shall see in Section 5 that this way of defining unknowns simplifies the treatment of parameter passing in presence of unknowns. From now on we distinguish between variables and unknowns. In the discussion below we assume the following declarations. CONST N = 8; TYPE Board = ARRAY [1..N] OF CONSTRAINED [1..N]; Colour = (blue, green, red, yellow); Info = RECORD co: Colour; No: CONSTRAINED INTEGER; END; VAR i, j: INTEGER; a: ARRAY [1..N] of INTEGER; C: CONSTRAINED [1..N]; X, Y: Board; Z: Info; So a, i and j are variables while C is an unknown. In turn, X and Y are arrays of unknowns and Z is a record the first component of which is a variable and the second an unknown. Because of the syntax of Alma-0, boolean expressions can appear both in the position of a statement and inside a condition. Definition 2. A constraint is a boolean expression that involves some unknowns. We postulate that the unknowns can appear only within constraints or within the right hand side of an assignment. The values of unknowns are determined only by means of constraints that are placed on them. In particular, by the just introduced syntactic restriction, one cannot use assignment to assign a value to an unknown. So in presence of the above declarations the statements X[1] := 0 and C := 1 are illegal. In contrast, the constraints X[1] = 0 and C = 1 are legal. Further, the assignments i := X[1] + X[2] and i := Y[X[2]] are also legal statements. Initially each unknown has an undetermined value that belongs to the domain associated with the type. By placing constraints on an unknown its domain can shrink. The unknown continues to have an undetermined value until the domain gets reduced to a singleton. If the program control reaches an occurrence of an unknown outside of a constraint, so within the right hand side of an assignment, this unknown is evaluated. If its value is at this moment undetermined, this evaluation yields a run-time error. If the value is determined (that is, the domain is a singleton), then it is substituted for the occurrence of the unknown. So the occurrences of an unknown outside of a constraint are treated as usual variables. Note that during the program execution the domain of an unknown monotonically decreases with respect to the subset ordering. This is in stark contrast with the case of variables. Initially, the value of a variable of a simple type is not known but after the first assignment to it its value is determined though can non-monotonically change to any other value from its type. Intuitively, a program is viewed as an “engine” that generates constraints. These constraints are gradually solved by means of the constraint solving process that we shall explain now. 4.2 Adding the Constraint Store We now introduce the central notion of a constraint store. This is done in a similar way as in the constraint logic programming systems, though we need to take into account here the presence of variables and constants. Definition 3. We call a constraint C evaluated if each constant that occurs in it is replaced by its value and each variable (not unknown) that occurs in it is replaced by its current value. If some variable that occurs in C is uninitialized, we say that the evaluation of C yields an error. Otherwise we call the resulting boolean expression the evaluated form of C. So no variables occur in the evaluated form of a constraint. For technical reasons we also consider a false constraint, denoted by ⊥, that can be generated only by a constraint solver to indicate contradiction. Definition 4. A constraint store, in short a store, is a set of evaluated forms of constraints. We say that an unknown is present in the store if it occurs in a constraint that belongs to the store. We call a store failed if ⊥ is present in it or if the domain of one of the unknowns present in it is empty. By a solution to the store we mean an assignment of values from the current domains to all unknowns present in it. Further, we say that a constraint is solved if its evaluated form is satisfied by all combinations of values from the current domains of its unknowns. For example, in the program fragment i := 1; j := 2; X[i] <= j; Y[X[i+2]] <> Y[N]; we have two constraints, X[i] <= j and Y[X[i+2]] <> Y[N]. Here X[1] <= 2 is the evaluated form of the first one, while Y[X[3]] <> Y[8] is the evaluated form of the second one. If we deleted the assignment i := 1 the evaluations of both constraints would yield an error. The notion of a failed store is a computationally tractable approximation of that of an inconsistent store, i.e., a store that has no solutions. Indeed, a failed store is inconsistent but an inconsistent store does not have to be failed: just consider X[1] = X[2], X[1] < X[2]. 4.3 Interaction between the Program and the Constraint Store The program interacts with the store in the following two ways: – By adding to it the evaluated forms of the encountered constraints. If the evaluation of such a constraint yields an error, a run-time error arises. – By generating possible values for unknowns that are present in the store by means of some built-in primitives to be introduced in Subsection 6.2. The store is equipped with a number of procedures called constraint solvers. Their form depends on the applications. One or more of them can become activated upon addition of (an evaluated form of) a constraint to the store. An activation of constraint solvers, in the sequel called constraint solving, can reduce the domains of the unknowns, determine the values of some unknowns by reducing the corresponding domains to singletons, delete some constraints that are solved, or discover that the store is failed, either by generating the false constraint ⊥ or by reducing the domain of an unknown to the empty set. We assume that constraint solving is a further unspecified process that depending of application may be some form of constraint propagation or a decision procedure. We require that the result of constraint solving maintains equivalence, which means that the set of all solutions to the store does not change by applying to it constraint solvers. The store interacts with the program as follows. Definition 5. Upon addition of a constraint to the store, constraint solving takes place. – If as a result of the constraint solving the store remains non-failed, the control returns to the program and the execution proceeds in the usual way. – Otherwise the store becomes failed and a failure arises. This means that the control returns to the last choice point created in the program. Upon backtracking all the constraints added after the last choice point are retracted and the values of the variables and the domains of the unknowns are restored to their values at the moment that the last choice point was created. This means that we extend the notion of failure, originally introduced in Section 2, to deal with the presence of the store. Note that constraints are interpreted in the same way independently of the fact whether they appear as a statement or inside a condition. For example, the following program fragment IF X[1] > 0 THEN S ELSE T END is executed as follows: The constraint X[1] > 0 is added to the store. If the store does not fail S is executed, otherwise T is executed. So we do not check whether X[1] > 0 is entailed by the store and execute S or T accordingly, as one might intuitively expect. This means that constraints are always interpreted as so-called tell operations in the store, and never as so-called ask operations, which check for entailment (see Section 8 for a discussion on this point). 4.4 Examples To illustrate use of the introduced concepts we now consider three examples. We begin with the following classical problem. Problem 2. Eight Queens. Place 8 queens on the chess board so that they do not attack each other. We present here a solution that uses constraints. We only write the part of the program that generates constraints. The code that actually solves the generated constraints would make use of the built-in INDOMAIN as explained in Subsection 6.2. CONST N = 8; TYPE Board = ARRAY [1..N] OF CONSTRAINED [1..N]; VAR i, j: [1..N]; X: Board; BEGIN FOR i := 1 TO N-1 DO FOR j := i+1 TO N DO X[i] <> X[j]; X[i] <> X[j]+j-i; X[i] <> X[j]+i-j END END END; Each generated constraint is thus of the form X[i] <> X[j] or X[i] <> X[j] + k for some values i,j ∈ [1..N] such that i < j and k being either the value of j-i or of i-j. Note that the above program text coincides with the problem formulation. Next, consider the following problem that deals with the equations arising when studying the flow of heat. Problem 3. Laplace Equations. Given is a two dimensional grid with given values for all the exterior points. The value of each interior points equals the average of the values of its four neighbours. Compute the value of all interior points. The solution using constraints again truly coincides with the problem specification. It is conceptually much simpler than the solution based on constraint logic programming and given in [10]. TYPE Board = ARRAY [1..M], [1..N] OF CONSTRAINED REAL; VAR i:[1..M]; j:[1..N]; X: Board; BEGIN FOR i := 2 TO M-1 DO FOR j := 2 TO N-1 DO X[i,j] = (X[i+1,j] + X[i-1,j] + X[i,j+1] + X[i,j-1])/4 END END END; We assume here that the constraint solver that deals with linear equations over reals is sufficiently powerful to solve the generated equations. Finally, we present a solution to the Frequency Assignment problem (Problem 1) that uses constraints. Again, we only write the part of the program that generates constraints. We assume here that the variables S and F are properly initialized. TYPE SeparationMatrix = ARRAY [1..N],[1..N] OF INTEGER; IllegalFrequencies = ARRAY [1..N],[1..M] OF BOOLEAN; Assignment = ARRAY [1..N] OF CONSTRAINED [1..M]; VAR S: SeparationMatrix; F: IllegalFrequencies; X: Assignment; i, j: INTEGER; BEGIN FOR i := 1 TO N DO FOR j := 1 TO M DO IF F[i,j] THEN X[i] <> j END END END; FOR i := 1 TO N DO FOR j := 1 TO i-1 DO EITHER X[i] - X[j] >= S[i,j] ORELSE X[j] - X[i] >= S[i,j] END END END END; The use of the ORELSE statement creates here choice points to which the control can return if in the part of the program that deals with constraints solving a failed store is produced. Alternatively, one could use here a disjunction and replace the ORELSE statement by (X[i] - X[j] >= S[j,i]) OR (X[j] - X[i] >= S[j,i]). In this case no choice points are created but the problem of solving (disjunctive) constraints is now “relegated” to the store. The latter solution is preferred if the constraint solver in use is able to perform some form of preprocessing on disjunctive constraints, such as the constructive disjunction of [8]. On the other hand, the former solution allows the programmer to retain control upon the choice generated by the system. For example, she/he can associate different actions to the two branches of the ORELSE statement. It is important to realize that the integration of constraints to Alma-0 as outlined in this section is possible only because the unknowns are initially uninitialized. 5 Constraints and Procedures So far we explained how the program interacts with the store in absence of procedures. In Alma-0 one level (i.e., not nested) procedures are allowed. In presence of procedures we need to explain a number of issues. First, to keep matters simple, we disallow local unknowns. This means that the constrained types can be only introduced at the outer level. However, unknowns can be used within the procedure bodies provided the restrictions introduced in Definition 2 are respected. Next, we need to explain how unknowns can be passed as parameters. Formal parameters of constrained types are considered as unknowns. This means that in the procedure body such formal parameters can occur only within the constraints or within the right hand side of an assignment. We discuss first call by variable. An unknown (or a compound variable containing an unknown) passed as an actual variable parameter is handled in the same way as the customary variables, by means of the usual reference mechanism. For example consider the following problem. Problem 4. Given is an array which assigns to each pixel on an M × N board a colour. A region is a maximal set of adjacent pixels that have the same colour. Determine the number of regions. To solve it we represent each pixel as a record, one field of which holds the colour of the pixel and the other is an unknown integer. Then we assign to each pixel a number in such a way that pixels in the same region get the same number. These assignments are performed by means of constraint solving. For instance, in the case of Figure 1 the constraint solving takes care that the value 1 is assigned to all but two pixels once it is assigned to the leftmost uppermost pixel. Fig. 1. Constraint Solving and Pixels To achieve this effect in the program below we assume that the constraint solving process is able to reduce the domain of y to {a} given the constraint x = y and the fact that the domain of x equals {a}. The program uses both constraints and an assignment. In addition, the program uses the built-in KNOWN that, when used on unknowns, checks whether the domain of the argument is a singleton. TYPE Colour = (blue, green, red, yellow); Info = RECORD co: Colour; No: CONSTRAINED INTEGER; END; Board = ARRAY [1..M],[1..N] OF Info; PROCEDURE Region(VAR X: Board; VAR number: INTEGER); VAR i, j, k: INTEGER; BEGIN FOR i := 1 TO M DO FOR j := 1 TO N DO IF i < M AND X[i,j].co = X[i+1,j].co THEN X[i,j].No = X[i+1,j].No END; IF j < N AND X[i,j].co = X[i,j+1].co THEN X[i,j].No = X[i,j+1].No END END END; k := 0; FOR i := 1 TO M DO FOR j := 1 TO N DO IF NOT KNOWN(X[i,j].No) THEN k := k+1; X[i,j].No = k END END END; number = k END Region; Note that for any i in [1..M] and j in [1..N], the record component X[i,j].No is of a constrained type. Here the first double FOR statement generates the constraints while the second double FOR statement solves them by assigning to the pixels that belong to the same region the same number. Due to the call by variable mechanism, the actual parameter corresponding the formal one, X, is modified by the procedure. In particular, the second component, No, of each array element is instantiated after the procedure call. Next, we explain the call by value mechanism in presence of unknowns. An unknown passed as an actual value parameter is treated as a customary variable: it is evaluated and its value is assigned to a local variable associated with the formal parameter. If the value of this unknown is at this moment undetermined, this evaluation yields a run-time error. This evaluation process also applies if a field or an element of a compound actual value parameter is an unknown. 6 Language Extensions In this section we discuss some built-in procedures of the proposed language that make it easier for the user to program with constraints. In particular, in Subsection 6.1 we discuss built-ins for stating constraints, and in Subsection 6.2 we present built-ins for assigning values to unknowns. 6.1 Built-ins for Expressing Constraints The practice of constraint programming requires inclusion in the programming language of a certain number of language built-ins that facilitate constraint formulation. For example, if we wish to state that the unknowns of the array X must have pairwise different values, we write ALL_DIFFERENT(X); This call results in a constraint which is equivalent to the set of all the corresponding constraints of the form X[i] <> X[j], for i ∈[1..N-1] and j ∈[i+1..N]. 1 Similarly, if we wish to state that at most k among the unknowns belonging to the array X can have the value v, we write AT_MOST(k,X,v); This sort of built-ins on arrays are present in other imperative constraint languages. We do not list all of them here, but we envision their presence in the language. Such built-ins on arrays are the counterparts in imperative languages of the corresponding built-ins on lists provided by constraint logic programming systems such as CHIP. These languages also support symbolic manipulation of terms which makes it easy to generate arithmetic constraints. The traditional imperative programming languages lack this power and exclusive reliance on arrays can lead to artificial and inefficient solutions. For example, suppose we are given an n × n matrix A of integer unknowns and we wish to state the constraint that the sum of the elements of the main diagonal must be equal to a given value b. A customary solution would involve resorting to an auxiliary array of unknowns in the following way: VAR A: ARRAY [1..N], [1..N] OF CONSTRAINED INTEGER; V: ARRAY [1..N] OF CONSTRAINED INTEGER; b: INTEGER; V[1] = A[1,1]; 1 In some systems, such a constraint is kept in its original form in order to exploit constraint propagation techniques that deal specifically with constraints of this kind, see [17]. FOR i := 2 to N DO V[i] = A[i,i] + V[i-1]; END; V[N] = b; This solution, which one would write for example in ILOG Solver, has the obvious drawback of creating N new unknowns for stating one single constraint. Therefore we propose the use of lists of unknowns (as done for example in the ICON programming language of [6] for the case of variables), identified by the keyword LIST, upon which constraints of various forms can be stated by means of built-ins. The above program fragment would then be replaced by VAR A: ARRAY [1..N], [1..N] OF CONSTRAINED INTEGER; L: LIST OF CONSTRAINED INTEGER; b: INTEGER; Empty(L); FOR i := 1 to N DO Insert(L, A[i,i]) END; Sum(L,’=’,b); where Sum is a built-in with the expected meaning of constraining the sum of the unknowns in L to be equal to b. Once the constraint Sum(L,’=’,b) has been added to the store, the variable L can be used again for a different purpose. Note that in this solution no additional unknowns are created. In order to obtain a similar behaviour in ILOG Solver one needs either to add a similar built-in to it or to make explicit use of pointers to objects representing unknowns. Consider now again the Frequency Assignment problem. We discuss here the formulation of an additional constraint for this problem which requires the use of lists. Suppose that we wish to state that in a particular region (i.e., a set of cells) a given frequency is used no more than a given number of times. This type of constraint is useful in real cases. In fact, in some situations even though the pairwise interference among cells is below a given threshold and no separation is required, the simultaneous use of a given frequency in many cells can create a interference phenomenon, called cumulative interference. The following procedure states the constraints for preventing cumulative interference in region R (where the type Region is an array of booleans representing a subset of the set of cells). Here max is the maximum number of cells in the region that can use the same frequency. PROCEDURE RegionConstraint(R: Region; max: INTEGER; VAR X: Assignment); VAR i, k: INTEGER; L: LIST OF CONSTRAINED [1..M]; BEGIN FOR k := 1 TO M DO Empty(L); FOR i := 1 TO N DO IF R[i] THEN Insert(L,X[i]) END END; AT_MOST(max,L,k) END END RegionConstraint; 6.2 Built-ins for Assigning Values In order to search for a solution of a set of constraints, values must be assigned to unknowns. We define the built-in procedure INDOMAIN which gets an unknown of a finite type (so BOOLEAN, enumeration or a subrange type) as a parameter, and assigns to it one among the elements of its domain. The procedure also creates a choice point and all other elements of the domain are successively assigned to the unknown upon backtracking. The choice of the value to assign to the unknown is taken by the system depending on the current state of the store, based on predefined value selection strategies. We do not discuss the issue of which are the best value selection strategies. We only assume that all consistent values are eventually generated, and that the choice point is erased after the last value has been generated. The procedure INDOMAIN can be also used on arrays and on lists. For example, the call INDOMAIN(A), where A is a matrix of integer unknowns, generates (upon backtracking) all possible assignments for all elements of A. The order of instantiation of the elements of A is taken care of by the store, which applies built-in strategies to optimize the retrieval of the first instantiation of the unknowns. As in the case of value selection, we do not discuss here the issue of the variable ordering. 7 Related Work We concentrate here on the related work involving addition of constraints to imperative languages. For an overview of related work pertaining to the Alma-0 language we refer the reader to [2]. As already mentioned in the introduction, the most successful imperative constraint language is the C++ library ILOG Solver [9]. The main difference between our proposal and ILOG Solver is that the latter is based on the conventional imperative language C++ and consequently it does not support automatic backtracking. Therefore the interaction with the store cannot be based on failures issued by the store constraint solvers while evaluating the statements. In ILOG Solver such an interaction is always explicit, whereas in our proposal we aim at making it transparent to the user. We are aware of two other language proposals in which constraints are integrated into an imperative language — the commercial language CHARME of [14] and 2LP of [13]. In each language some of the issues here discussed have been addressed, but not all of them. More specifically, in CHARME unknowns (called logical variables) and linear constraints on them are allowed. The language supports use of Prolog-like terms, arrays and sequences of logical variables and a number of features (like demons and the element primitive, an equivalent of INDOMAIN) adopted from the CHIP language. Also, it provides a nondeterministic or statement and iterations over finite domains, arrays and sequences of logical variables. The C like syntax creates an impression that CHARME supports imperative programming. However, from the paper it is not clear whether it is actually the case. If it is, then it is not clear how the logical variables, constraints and nondeterministic statements interact with the usual features of the underlying imperative language. In particular, the use of logical variables outside of constraints, the impact of backtracking on the assignment statements and the status of choice points created within procedure bodies is not explained (probably due to space limitations). CHARME does provide bidirectional connection with C. 2LP was designed for linear programming applications. In 2LP unknowns (called continuous variables) are global. They vary over the real interval [0, +∞) and can be either simple ones or arrays. The only way these variables can be modified is by imposing linear constraints on them. Constraints can also appear in conditions. This leads to a conditional way of adding them to the store. Whenever a constraint is added to the store, its feasibility w.r.t. the old constraints is tested by means of an internal simplex-based algorithm. This algorithm maintains the current feasible region, which is a polyhedron, together with a witness point which is a distinguished vertex. The continuous variables can appear outside of the constraints as arguments of any procedure whose signature has a continuous variable, and as arguments to some predeclared functions like wp that returns the value of a witness point. In the latter case when a continuous variable is passed as a parameter, the witness point value is used. 2LP provides the nondeterministic statements analogous to the ORELSE and SOME statements of Alma-0 and a limited form for the FORALL statement. Automatic backtracking over assignment and combination of continuous and customary variables in compound variables is not supported. 8 Conclusions and Future Work In this paper we discussed the programming language Alma-0 that integrates the imperative and logic programming paradigm and illustrated the resulting programming style by a number of examples. Alma-0 is based on first-order logic in the sense that it provides a computational interpretation for the standard connectives, so negation, disjunction and conjunction, and for various forms of quantification. In fact, many first-order formulas and their extensions by bounded quantifiers, sorts (i.e., types), and arrays, can be interpreted and executed as Alma-0 programs. The precise logical nature of this computational interpretation of first-order logic was worked out in [1]. Then we discussed a proposal how to integrate constraint programming features into the language. In this regard we believe that the use of an underlying language based on first-order logic, such as Alma-0, rather than a conventional imperative language, makes the integration of constraints more natural and conceptually simpler. We analyzed here a number of issues related to the proposed integration, such as the use of constrained types and the unknowns, interaction between the program and the constraint store, and the parameter passing mechanisms. Finally, we presented some examples that illustrate the resulting style of programming. In our future work we plan to extend the work carried out in [2] to the language proposal here outlined. More specifically, we envisage to – extend the executable, operational semantics based on the ASF+SDF MetaEnvironment of [12]; – extend both the Alma-0 compiler and its underlying abstract machine AAA; – implement a set of constraint solvers or provide an interface between the language and existing constraint solvers. The first item can be dealt with by adding to the executable semantics of Alma-0 given in [2] a few rules that formalize the interaction between the program and the store stipulated in Subsection 4.3. These rules are parameterized by the constraint solvers attached to the store. Regarding the last item, we plan to develop a simple solver for constraints over finite domains to be used for prototyping and testing purposes. We also plan to exploit more powerful external solvers already available for subsequent releases of the system. As already mentioned in Section 4.3, we do not allow so-called ask operations in the store. This is a deliberate design decision which allows us to keep the language design simple and the underlying execution model easy to implement. Nevertheless, in future versions of the language, we plan to investigate the possibility of equipping the store with an entailment procedure. This procedure should check whether an evaluated form of a constraint is logically implied (or entailed) by the store. Upon encounter of an ask constraint, the entailment procedure would check whether the evaluated form is entailed by the store. If it is the case, the constraint evaluates to TRUE. Otherwise the constraint evaluates to FALSE. We would require that the entailment procedure returns correct results but would not assume that it is complete. We did not deal here with some of the issues related to the design of the language. Specifically, we omitted discussion of – a full set of built-ins, in particular the ones appropriate for constraint optimization, – primitives for selecting variable and value selection strategies, – the language support for the dynamic creation of unknowns. These can be taken care of in a systematic way and lead to a complete and rigorous definition of an imperative constraint programming language. Acknowledgements We would like to thank Jan Holleman, Eric Monfroy and Vincent Partington for useful discussions on the subject of this paper. Helpful comments by Tony Hoare and other two, anonymous, referees allowed us to improve the presentation. References 1. K. R. Apt and M. A. Bezem. Formulas as programs. In K.R. Apt, V.W. Marek, M. Truszczyński, and D.S. Warren, editors, The Logic Programming Paradigm: A 25 Year Perspective, pages 75–107, 1999. 2. K. R. Apt, J. Brunekreef, V. Partington, and A. Schaerf. Alma-0: An imperative language that supports declarative programming. ACM Toplas, 20(5):1014–1066, 1998. 3. K. R. Apt and A. Schaerf. Search and imperative programming. In Proc. 24th Annual SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL ’97), pages 67–79. ACM Press, 1997. 4. A. Colmerauer. An introduction to Prolog III. Communications of ACM, 33(7):69– 90, 1990. 5. M. R. Garey and D. S. Johnson. Computers and Intractability—A guide to NPcompleteness. W.H. Freeman and Company, San Francisco, 1979. 6. R. E. Griswold and M. T. Griswold. The Icon Programming Language. PrenticeHall, Englewood Cliffs, New Jersey, USA, 1983. 7. W. K. Hale. Frequency assignment: Theory and applications. In Proc. of IEEE, pages 1497–1514, 1980. 8. P. Van Hentenryck, Vijay Saraswat, and Y. Deville. Design, implementation, and evaluation of the constraint language cc(FD). In Andreas Podelski, editor, Constraint Programming: Basics and Trends, LNCS 910. Springer-Verlag, 1995. (Châtillon-sur-Seine Spring School, France, May 1994). 9. ILOG. ILOG optimization suite — white paper. Available via http://www.ilog.com, 1998. 10. J. Jaffar and J.-L. Lassez. Constraint Logic Programming. In 14th ACM Principles of Programming Languages Conference, pages 111–119, Munich, F.R.G., 1987. ACM, New York. 11. Joxan Jaffar, Spiro Michaylov, Peter J. Stuckey, and Roland H. C. Yap. The CLP(R) language and system. ACM Transactions on Programming Languages and Systems (TOPLAS), 14(3):339–395, July 1992. 12. P. Klint. A meta–environment for generating programming environments. ACM Transactions on Software Engineering and Methodology, 2(2):176–201, 1993. 13. K. McAloon and C. Tretkoff. 2LP: Linear programming and logic programming. In P. Van Hentenryck and V. Saraswat, editors, Principles and Practice of Constraint Programming, pages 101–116. MIT Press, 1995. 14. A. Oplobedu, J. Marcovitch, and Y. Tourbier. CHARME: Un langage industriel de programmation par contraintes, illustré par une application chez Renault. In Ninth International Workshop on Expert Systems and their Applications: General Conference, Volume 1, pages 55–70, Avignon, France, 1989. EC2. 15. F. Pfenning, editor. Types in Logic Programming. MIT Press, Cambridge, Massachusetts, 1992. 16. J.-F. Puget and M. Leconte. Beyond the glass box: Constraints as objects. In Proc. of the 1995 International Symposium on Logic Programming, pages 513–527, 1995. 17. J.-C. Regin. A filtering algorithm for constraints of difference in CSPs. In AAAI94: Proceedings of the 12th National Conference on Artificial Intelligence, pages 362–367, 1994. 18. I. Shvetsov, V. Telerman, and D. Ushakov. NeMo+ : Object-oriented constraint programming environment based on subdefinite models. In G. Smolka, editor, Artificial Intelligence and Symbolic Mathematical Computations, Lecture Notes in Computer Science, vol. 1330, pages 534–548, Berlin, 1997. Springer-Verlag. 19. P. Van Hentenryck, Helmut Simonis, and Mehmet Dincbas. Constraint satisfaction using constraint logic programming. Artificial Intelligence, 58:113–159, 1992.
6cs.PL
1 A Hybrid Optimization Approach to Demand Response Management for the Smart Grid arXiv:1510.08271v1 [cs.SY] 28 Oct 2015 Fan-Lin Meng, Student Member, IEEE, and Xiao-Jun Zeng, Member, IEEE Abstract—This paper proposes a hybrid approach to optimal day-ahead pricing for demand response management. At the customer-side, compared with the existing work, a detailed, comprehensive and complete energy management system, which includes all possible types of appliances, all possible applications, and an effective waiting time cost model is proposed to manage the energy usages in households (lower level problem). At the retailer-side, the best retail prices are determined to maximize the retailer’s profit (upper level problem). The interactions between the electricity retailer and its customers can be cast as a bilevel optimization problem. To overcome the weakness and infeasibility of conventional Karush–Kuhn–Tucker (KKT) approach for this particular type of bilevel problem, a hybrid pricing optimization approach, which adopts the multi-population genetic algorithms for the upper level problem and distributed individual optimization algorithms for the lower level problem, is proposed. Numerical results show the applicability and effectiveness of the proposed approach and its benefit to the retailer and its customers by improving the retailer’s profit and reducing the customers’ bills. Index Terms—Smart grid, demand response management, day-ahead pricing, bilevel optimization, multi-population genetic algorithms I. I NTRODUCTION With the large-scale deployment of smart meters and twoway communication infrastructures, the benefits of demand response will be greatly enhanced. Among various demand response programs, time-differentiated pricing models are regarded as promising strategies to balance the load and supply, reduce the peak demands and increase the grid reliability [1]. One typical type of pricing among the time-differentiated pricing models is day-ahead pricing [2], in which customers receive the hourly prices for the next 24 hours. The existing research on demand response and timedifferentiated pricing can be categorized into the following three directions. Firstly, [3]–[6] deal with how customers respond to the time-differentiated prices. Secondly, the work of [7]–[9] are concerned with how the retailers set the electricity prices, where they model the customers’ energy consumption preferences in the form of utility functions. Thirdly, [10]–[16] deal with how the retailers determine the electricity prices based on the expected responses of customers where they model the interactions between a retailer and its customers as a Stackelberg game or bilevel problem. All of the above work and more unreferenced work have provided valuable findings in the demand response management area. Despite Fan-Lin Meng and Xiao-Jun Zeng are with the School of Computer Science, University of Manchester, Manchester, United Kingdom (email: [email protected], [email protected]). these contributions, there are still notable gaps or weaknesses in the existing approaches: From the customer modelling point of view, firstly the existing research has failed to model certain important type of appliances commonly used in most households. For example, all works given in [3]–[6] have not addressed the usage optimization modelling problem for curtailable appliances (such as air conditioning); secondly for interruptible appliances and non-interruptible appliances, the existing waiting cost model [3] [11] is a pure theoretic one, which is impossible for most ordinary customers to set up and use and therefore inapplicable; thirdly theoretic household utility functions rather than utility functions based on real home appliances are often used like in [7]–[9]. Although these theoretic models provide valuable insight for demand response management and pricing, this type of abstract model cannot be used by customers to find the best usage and scheduling scheme to minimize their bills or maximize their benefits. Noticing these shortcomings, the first motivation of our research is to propose a home appliances based utility function model that includes all possible applications and to develop an applicable and implementable optimal solution usable by ordinary customers to find the best usage and scheduling scheme. From the retailer modelling point of view, the pricing optimization problems and models by the existing research are either oversimplified or unrealistic from an application point of view. For example, the pricing optimization problems and models only model one or two types of appliances in the customers’ level problem [11] [13] [15] or fail to give the realistic and explicit form of customers’ utility functions [10] [12] [14] [16]. In other words, such problem formulations and models are only partially or unrealistically modelling of a retailer’s pricing optimization problem and therefore are insufficient. For this reason, the second motivation of our research is to develop a complete and comprehensive pricing optimization model that accurately and realistically represents the real pricing problem faced by retailers to enable the usability and applicability of the resulting models. From the day-ahead pricing computation point of view, finding the best day-ahead pricing scheme often requires solving a bi-level optimization problem. In current bi-level optimization theory, the common solution is to cast bi-level optimization problems into equivalent single-level optimization problems by replacing the lower level problems with their KKT optimality conditions. Such a KKT approach has been used by the existing research such as [15] and [17] to solve the optimization problems faced by retailers. Unfortunately, this approach is infeasible in the large-scale applications when a retailer has 2 thousands to millions of customers, where each customer may have several constraints at the lower-level optimization problems. When using KKT approach, it will result in far too many constraints for the resulting single-level problem which is infeasible to be solved by existing optimization software. Another important issue worth mentioning is the customers’ privacy concerns. By replacing the lower level problem with its KKT conditions, the lower-level problem will be exposed to the retailer and may cause privacy problems for customers. For the above reasons, the third motivation of our research is to develop a hybrid optimization approach to solve the proposed bilevel problem in a distributed manner to overcome the above weaknesses. By recognising the weaknesses in the existing methods and following the above three motivations, in this paper, we propose a hybrid approach to maximize customers’ benefits and optimize retailers’ day-ahead prices for demand response management within the smart grid. The rest of this paper is organized as follows. The system model is proposed in Section II and the bilevel problem formulation is presented in Section III. In Section IV, the optimal bilevel solution is given. Numerical results are provided and discussed in Section V. The paper is concluded in Section VI. II. S YSTEM M ODELLING In this section, how the optimal day-ahead pricing for demand response management can be modelled as a bilevel optimization problem is described. It is assumed that each customer is equipped with a smart meter. The interactions between the retailer and its customers are enabled through a two way communication infrastructure. The decision processes of the retailer and its customers are: the retailer acting as the upper level decision agent firstly announces the selling price to its customers with the aim to maximize its profit. To solve this profit maximization problem, it is assumed that each customer (lower level decision agent) optimally reacts to the announced retail price, i.e. each customer (smart meter) determines the optimal energy consumption with the aim to maximize its benefits such as minimizing its bills. Note that each customer’s decision about electricity usage is independent from other customers’ decisions. As a result, our considered optimization problem faced by the retailer can be seen as a bilevel optimization problem with independent customers. The general formulation of a bi-level optimization problem with one upper level decision agent and N independent lower level decision agents can be represented as follows: max x,y1 ,...,yN F (x, y1 , ..., yN ) subject to yi ∈ argmin{ fi (x, yi ) : gi (x, yi ) ≤ 0, (1) i = 1, . . . , N } G(x, y1 , ..., yN ) ≤ 0 x ∈ X, yi ∈ Yi In the above formulation, F represents the upper-level objective function and fi (i = 1, 2, ..., N ) represent the lowerlevel objective functions. Similarly, x is the decision vector of yi the upper level agent and yi is the decision vector of the i-th lower level agent. G represents the constraint functions at the upper level and gi represents the constraint functions of the i-th lower level agent. X are the bound constraints for the upper level decision vector and Yi are the bound constraints for the decision vector of the i-th lower level agent. ∗ A solution (x∗ , y1∗ , ..., yN ) which maximizes the above objective function F (x, y1 , ..., yN ) subject to all the constraints is said to be a bilevel optimal solution. III. B ILEVEL P ROBLEM F ORMULATION In this section, the mathematical representation of the considered two level decision making problems is provided. Firstly, our focus is to formulate the energy management problem in response to the day-ahead pricing in each household at the lower level. Secondly, we model the profit maximization problem for the retailer at the upper level who will offer the 24 hours prices to its customers. Throughout this paper, let N , {1, 2, ..., N } denote the considered set of customers with N , |N |, and H , {1, 2, ..., H} where H = 24 denotes the scheduling horizon. We define the prices offered by the retailer as a price vector: P = [p1 , ..., ph , ..., pH ], where ph represents the electricity price at hour h. A. Customer-side Problem at the Lower Level We categorize the home appliances into non-shiftable appliances (e.g. lights), interruptible appliances (e.g. PHEVs), noninterruptible appliances (e.g. washing machines, dish washers) and curtailable appliances (e.g. air conditioning, heating) according to their load types [18]. In the following, we will firstly give the mathematical models for the different types of appliances. Furthermore, we propose a financial-incentive based waiting cost model for interruptible and non-interruptible appliances. For each customer n ∈ N , we denote the set of all appliances in the household as An , non-shiftable appliances as N Sn , interruptible appliances as In , non-interruptible appliances as N In and curtailable appliances as Cn . 1) Interruptible Appliances: For each interruptible appliance a ∈ In , a scheduling vector of energy consumption over the scheduling window H = {1, 2, ..., H} is defined as h xn,a = [x1n,a , ..., xhn,a , ..., xH n,a ] where xn,a ≥ 0 represents the n-th customer’s electricity consumption of appliance a at time h. Furthermore, the scheduling window for each appliance a can be set by each customer according to his/her preference and is defined as Hn,a , {αn,a , αn,a + 1, ..., βn,a } [3]. Since the window Hn,a is consecutive, one only needs to specify the beginning scheduling time αn,a ∈ H and end time βn,a ∈ H. 3 The model of the payment minimization problem for each interruptible appliance is given as follows: βn,a min JIn (a) (αn,a : βn,a ) = min xh n,a X ph × xhn,a (2) h=αn,a s.t. βn,a X xhn,a = En,a , (3) TABLE I: Energy bills saved by different waiting length h=αn,a max min , ∀h ∈ Hn,a . ≤ xhn,a ≤ γn,a γn,a (4) Constraint (3) represents that, for each appliance a, the total energy consumption to accomplish the operations within the scheduling window is fixed, which is denoted as En,a . Constraint (4) represents that there is a minimum power level and a maximum power level for each appliance a within the scheduling window. 2) Non-interruptible Appliances: As the operations of each non-interruptible appliance a ∈ N In are consecutive, we define the length of the operations Ln,a . The customers can set the scheduling window Hn,a , {αn,a , αn,a + 1, ..., βn,a } by specifying the beginning scheduling time and end time. The optimization problem is to find each appliance’s optimal start time s∗n,a to minimize the customer’s payment. As a result, the model of the payment minimization problem for a non-interruptible appliance is given as follows: sn,a +Ln,a min JN In (a) (αn,a : βn,a ) = min{min sn,a xh n,a X ph × xhn,a } h=sn,a (5) s.t. sn,a +Ln,a X xhn,a = En,a , (6) h=sn,a αn,a ≤ sn,a ≤ βn,a − Ln,a , (7) min γn,a (8) ≤ xhn,a waiting length for each appliance. Example 1 is used to help describe the proposed waiting time scheme. Example 1. We assume that the original scheduling window for PHEV is [7PM - 11PM] and the maximum waiting time length is 3 hours. Furthermore, the financial thresholds to trigger the waiting are 10 pence for 1 hour, 25 pence for 2 hours and 45 pence for 3 hours. Assume that the energy bills saved by different waiting hours are given in Table I. ≤ max γn,a , ∀h ∈ Hn,a . Constraint (6) represents that the total energy consumption to accomplish the consecutive operations is fixed at En,a . Constraint (7) indicates that the start time is bounded within the interval [αn,a , βn,a −Ln,a ]. Constraint (8) shows that there is a minimum power level and a maximum power level for each appliance a within the scheduling window. 3) Waiting Time Cost Model: We propose a financialincentive based waiting cost model that is straightforward and easy to use for interruptible and non-interruptible appliances. In real applications, firstly the customers need to set the financial thresholds that trigger different waiting lengths. For example, customers can input their financial thresholds via the interface between a laptop or mobile phone and the home energy management software integrated in a smart meter. Additionally such home energy management software can provide guidance and support in helping customers determine their financial thresholds by providing a questionnaire to customers. With the relevant information available, the customers can set the financial thresholds themselves easily. Secondly, by using our proposed waiting cost model, it will determine the optimal Waiting Length Scheduling Window 0 1 2 3 [7PM [7PM [7PM [7PM hour hour hours hours - Financial Threshold 10 pence 25 pence 45 pence 11PM] 12AM] 1AM] 2AM] Saved Bill 12 pence 30 pence 40 pence From the Table I, we can see that by waiting for 1 hour, it can save the bill by 12 pence, which is higher than the financial threshold (10 pence). As a result, the waiting time cost model will treat the current waiting length (1 hour) as a potential solution and then check the next waiting length (2 hours). Due to the same reason as before, the waiting length of 2 hours can also be treated as a potential solution. However, by waiting for 3 hours, it can only save the customer by 40 pence on the bill that is lower than the financial threshold (45 pence). As a result, the waiting length of 3 hours cannot be regarded as a potential solution. The above process is repeated until all the waiting lengths are checked. The optimal waiting time is one potential solution that achieves the maximal bill saving for the customer. In the above example, the optimal waiting time for the PHEV is 2 hours. Based on the above analysis and illustration, the mathematical representations of the waiting time cost model are given below. To avoid repetition, we only deal with the waiting time cost model for interruptible appliances. However, the model also applies to non-interruptible appliances. For each interruptible appliance a ∈ In , we assume that the maximum waiting time is denoted as Kn,a ≥ 1, which can be set by customers according to their preferences in advance. Without any waiting time, the minimized energy bill model for each interruptible appliance is denoted as follows: βn,a min JIn (a) (αn,a : βn,a ) = min xh n,a X ph × xhn,a (9) h=αn,a With the waiting time of kn,a ∈ {0, ..., Kn,a}, the minimized energy bill model is defined as: βn,a +kn,a min JIn (a) (αn,a : βn,a + kn,a ) = min xh n,a X ph × xhn,a , h=αn,a (10) where Hn,a = {αn,a , αn,a + 1, ..., βn,a } is extended to {αn,a , αn,a + 1, ..., βn,a + kn,a }. We define the Waiting Time Benefit Function, i.e., the energy bill saved by waiting kn,a hours, as follows: △JIn (a) (kn,a ) = min JIn (a) (αn,a : βn,a )− min JIn (a) (αn,a : βn,a + kn,a ), kn,a = 0, 1, ..., Kn,a (11) 4 Furthermore, we define the Benefit Threshold Function as follows:   if △JIn (a) (1) ≥ C1n,a △JIn (a) (1)    △JIn (a) (2) if △JIn (a) (2) ≥ C2n,a  △JˆIn (a) = .. ..    △JIn (a) (Kn,a ) if △JIn (a) (Kn,a ) ≥ CKn,a    0 if none of above satisfies (12) where the financial thresholds {C1n,a , C2n,a , ..., CKn,a } are set by the customers as described above. As a result, the optimal waiting time of interruptible appliance a for customer n can be obtained by solving the following optimization problem: (13) max △JˆIn (a) kn,a Similarly, the waiting time cost model for non-interruptible appliances can be represented as the following optimization problem: max △JˆN In (a) (14) kn,a 4) Curtailable Appliances: Similarly to the interruptible and non-interruptible appliances, the customers can set the valid scheduling window Hn,a , {αn,a , αn,a + 1, ..., βn,a }. However, compared with interruptible and non-interruptible appliances, the scheduling window of curtailable appliances should be more strict and accurate because the appliances will be ‘on’ for the whole window. By the customers’ behaviour analysis (i.e. some customers are price sensitive and some others are less price sensitive), there are two types of optimization models for curtailable appliances and a customer can choose one of them dependent on his/her preference. a) Minimize Bill Subject to an Acceptable Energy Consumption: This optimization scheme targets price sensitive customers. The proposed optimization model is given below: βn,a X ph × xhn,a (15) minJ1Cn (a) (αn,a : βn,a ) = min xh n,a βn,a X min xhn,a ≥ Un,a . xh n,a βn,a X xhn,a (18) h=αn,a s.t. uhn,a ≤ xhn,a ≤ uhn,a , βn,a X (19) max ph × xhn,a ≤ Cn,a . (20) h=αn,a Constraint (19) is same as constraint (16). Constraint (20) indicates that for each curtailable appliance, the money spent during the operation period should not exceed the given budget, i.e. there exists a financial cap for each curtailable appliance. Since there are two types of optimization models for curtailable appliances, the optimization problem for customer n including all types of appliances has two different optimization objectives shown as Eqs.(21) and (22). The customers can choose one of them depending on their preferences. P (JIn (a) − △JˆIn (a) )+ minJ1n = min{ a∈In P P J1Cn (a) } (JN In (a) − △JˆN In (a) ) + a∈Cn a∈N In subject to constraints (3)–(4), (6)–(8), and (16)–(17). (21) P (JIn (a) − △JˆIn (a) )+ minJ2n = min{ a∈In P P J2Cn (a) } (JN In (a) − △JˆN In (a) ) − a∈Cn a∈N In subject to constraints (3)–(4), (6)–(8), and (19)–(20). (22) B. Retailer-side Problem at the Upper Level (16) In this subsection, we model the profit of the retailer by using the revenue subtracting the energy cost imposed on the retailer. We define a cost function Ch (Lh ) indicating the cost of the retailer providing electricity at each hour h ∈ H, where Lh represents the amount of power provided to all customers at each hour of the day. We assume that the cost function Ch (Lh ) is convex increasing in Lh for each h [4] [8]. In view of this, the cost function is designed as follows [4]. (17) Ch (Lh ) = ah L2h + bh Lh + ch h=αn,a s.t. uhn,a ≤ xhn,a ≤ uhn,a , maxJ2Cn (a) (αn,a : βn,a ) = max h=αn,a Constraint (16) shows that the energy consumption at each hour is within the minimum acceptable consumption level uhn,a and maximum affordable consumption level uhn,a , which can be set according to each individual customer’s preferences. Constraint (17) indicates that the electricity consumed during the operation period should not be less than a minimum acceptable consumption level, i.e. there exists an energy consumption constraint for each curtailable appliance. b) Maximize Energy Consumption Subject to an Affordable Financial Constraint: This optimization scheme aims at the less price sensitive customers who prefer a budget based energy consumption maximization model. The proposed optimization model is given as follows: (23) where ah > 0 and bh ≥ 0, ch ≥ 0 at each hour h ∈ H. As a result, the profit maximization model is given as follows: X X X X X X max{ ph × xhn,a − Ch ( xhn,a )} ph h∈H n∈N a∈An h∈H n∈N a∈An (24) s.t. pmin ≤ ph ≤ pmax , h h X X xhn,a ≤ Ehmax , ∀h ∈ H, (25) X (27) (26) n∈N a∈An h∈H ph × X X n∈N a∈An xhn,a ≤ Rmax . 5 Constraint (25) represents that the prices the retailer can offer are greater than a minimum price, for example, the wholesale price at each hour, and less than a maximum price, for example, the price cap of the retail price due to retail market competition and regulation. Constraint (26) indicates that there usually exists a maximum supply capacity by the retailer or a maximum load capacity of power networks. Due to the in-elasticity of energy use, we add the revenue constraint (27) to improve the acceptability of the retailer’s pricing strategies, i.e. there exists a total revenue cap, denoted as Rmax , for the retailer. Without such a constraint, the retail prices will keep going up to a level which is politically against the government, political parties, and energy regulators and financially unacceptable by customers. IV. B ILEVEL M ODEL S OLUTIONS In this paper, we propose a hybrid optimization approach to solve the bilevel optimization problem. Our approach determines the energy prices by interacting with the customers (smart meters) within the framework of a genetic algorithm for the upper level problem and individual optimization algorithm for the lower level problem. In this section we will firstly prove the existence of an optimal solution to our bi-level model, secondly show the solution algorithm to the lower-level problem, and finally present the solution algorithm to the upper-level problem. A. Existence of Optimal Solutions to the Bilevel Model First, we consider the following bilevel model with one upper level agent and one lower level agent. F (x, y1 , ..., yN ) max x,y1 ,...,yN subject to (y1 , ...yN ) ∈ argmin{ y1 ,...yN PN i=1 fi (x, yi ) : gi (x, yi ) ≤ 0, i = 1, . . . , N } G(x, y1 , ..., yN ) ≤ 0 x ∈ X, (y1 , ..., yN ) ∈ Y1 × ... × YN (28) Note that each fi (x, yi ) (i = 1, ..., N ) in the objective function of the above lower level problem is independent from each other. Each constraint function gi (x, yi ) (i = 1, ..., N ) of the lower level problem is also independent from each other. Further it is always assumed that the above considered bilevel optimization problem has at least one feasible solution. Lemma 1. The bilevel model with one upper level agent and N independent lower level agents (Eq.(1)) is equivalent to the bilevel model with one upper level agent and one lower level agent (Eq.(28)). The proof of Lemma 1 is given in Appendix A. Lemma 2. Consider the bilevel model shown as Eq.(28), if X is a finite space, then the optimal solutions to the bilevel model exist. The detailed proof of Lemma 2 is given in Appendix B. Theorem 1. Consider the bilevel model with one upperlevel decision agent (retailer) shown as Eqs.(24 - 27) and N independent lower-level decision agents (customers) shown as Eq.(21) or Eq.(22). Then an optimal solution to the bilevel model exists. The proof of Theorem 1 is given in Appendix C. B. Solutions to the Lower-level Problem As the lower-level optimization problem is the sum of three separable sub-optimization problems corresponding to interruptible, non-interruptible, and curtailable appliances respectively, the lower-level problem can be solved by solving each sub-optimization problem separately. 1) Interruptible Appliances: The mathematical model of interruptible appliances is shown as Eqs.(2 - 4) which is a typical linear programming problem and can be solved using the optimization software. 2) Non-interruptible Appliances: We firstly define the subproblem of the original model Eqs.(5 - 8) for non-interruptible appliances as follows by fixing the start time at s′n,a ∈ [αn,a , βn,a − Ln,a ]. Ps′n,a +Ln,a h p × xhn,a min h=s ′ xh n,a n,a s.t. Ps′n,a +Ln,a xhn,a = En,a , h=s′n,a min h max γn,a ≤ xn,a ≤ γn,a , ∀h (29) ∈ [s′n,a , s′n,a + Ln,a ]. Eq.(29) is a linear programming problem and can be solved by the optimization software. As a result, the original problem Eqs.(5 - 8) can be solved in an iterative manner. 3) Curtailable Appliances: The optimization problems Eqs.(15 -17) and Eqs.(18 - 20) for curtailable appliances are linear programming problems and can be solved by the optimization software. C. Distributed Algorithms to the Upper Level Problem Due to the existence of the starting time and waiting time in the lower-level problem, which makes the lower-level problem non-differential and discontinuous, in this subsection, we adopt GA based distributed optimization algorithms to solve the profit maximization problem at the retailer’s side and show how the retailer finds the optimal electricity day-ahead prices by taking into account the customers’ responses. To avoid too much data passing between the retailer and the smart meters and reduce the number of generations for the GA (each generation needs to pass a new group of prices distributedly to all customers/agents to re-compute their optimal reactions which is very costly), we propose two strategies that improve the algorithms’ performance : 1) use a larger population for the GA. This strategy is based on the observations that the local optimization problems (customers side) are simple and easy to compute, even with a very large population; 2) reduce corresponding GA generations to improve the algorithm efficiency as such a large population size can ensure the GA’s convergence. Instead of simply increasing the population size, we propose a multi-population GA method [20] to tackle the problem, i.e. a single population is divided into multiple sub-populations 6 Algorithm 1 Multi-population GA based pricing algorithm to Eqs.(24 - 27) executed by the retailer 1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: Population Initialization, i.e. generating a population of N chromosomes randomly. Produce C sub-populations, i.e. each sub-population has N/C individuals. Each sub-population evolves in a traditional GA way shown as steps (4 – 9). for i=1 to N/C do The utility company announces strategy i, i.e. it announces a set of 24-hour prices by decoding the ith chromosome to the smart meters (customers) via two way communication infrastructure. Receive the optimal response of each customer n (smart meter) including the optimal energy consumption information to strategy i. Check the feasibility of strategy i to see if it satisfies all the constraints Eqs.(25 - 27). If not, handle the invalid individuals by the approach proposed in [19]. Then, obtain the fitness value of strategy i. end for A new generation of chromosomes is created by using the selection, crossover and mutation operations. Migrations between sub-populations. Steps (3 - 10) are repeated until the stopping condition is reached. The retailer announces the final price vector to the smart meters (customers) via LAN at the beginning of the scheduling horizon. Algorithm 2 Energy management system executed by each smart meter (customer) 1: Receive the price information from the retailer. 2: The smart meter calculates the energy consumption in response to prices by solving the lower-level problem Eq.(21) or Eq.(22). 3: The smart meter sends back the total energy consumption at each hour to the retailer via two way communication infrastructure. and each sub-population evolves in a traditional GA way. In addition, the individuals migrate from one sub-population to another from time to time, known as the island model [21] and we use the ring migration type topology where individuals are transferred between directionally adjacent subpopulations [22]. In the GA setting for each sub-population, binary encoding and deterministic tournament selection without replacement is adopted. For the crossover and mutation operations, we employ uniform crossover and bit flip mutation respectively. The constraints for the upper level problem are handled by the approach proposed in [19]. Finally, the multi-population GA based distributed algorithms are shown in Algorithm 1 and 2, which are implemented at the retailer-side and customer-side respectively. At the end, the most profitable prices for the retailer and the best usage patterns and schedules with the maximized benefits for each customer are found. V. N UMERICAL R ESULTS We simulate a neighbourhood consisting of 100 customers served by one energy retailer. It is assumed that each customer has 4 appliances: PHEV, dishwasher, washing machine and airconditioning. The scheduling horizon is set from 8AM to 8AM (the next day). We consider heterogeneous customers, i.e. the customers are different in terms of energy use and appliance settings. In the following, we give the parameter settings for both the lower-level model and the upper-level model. Note that, in the following, αn,a and βn,a are uniformly distributed integers for all appliances settings. For PHEV, recall from Eqs.(2 – 4), En,a is chosen from the min uniform distribution on [9, 11] kWh. Each γn,a is 0 kWh, max and each γn,a is chosen from the uniform distribution on [2.5, 3.3] kWh. αn,a is chosen from the uniform distribution on [6, 9] PM, and βn,a is chosen from the uniform distribution on [5, 8] AM (the next day). For dishwasher, En,a is chosen from the uniform distribumin max tion on [2.3, 2.9] kWh. Each γn,a is 0 kWh, and each γn,a is chosen from the uniform distribution on [1.2, 1.7] kWh. αn,a is chosen from the uniform distribution on [8, 11] AM, and βn,a is chosen from the uniform distribution on [6, 9] PM. For washing machine, En,a is chosen from the uniform min distribution on [1.8, 2.3] kWh. Each γn,a is 0 kWh, and each max γn,a is chosen from the uniform distribution on [1.0, 1.5] kWh. αn,a is chosen from the uniform distribution on [6, 9] PM, and βn,a is chosen from the uniform distribution on [5, 8] AM (the next day). For the air-conditioning, for the purpose of simulations, we assume that all the customers choose the second optimization model, i.e. maximize energy consumption subject to an acceptable financial constraint. As a result, uhn,a is chosen from the uniform distribution on [0.5, 0.8] kWh, and uhn,a is chosen from the uniform distribution on [1.8, 2.2] kWh. αn,a is chosen from the uniform distribution on [4, 6] PM, and βn,a is chosen from the uniform distribution on [9, 11] PM (the next day). max Cn,a is chosen from the uniform distribution on [70, 90] pence. Furthermore, the upper bound of hourly energy consumption for each household Enmax is chosen from the uniform distribution on [3.5, 4.5] kWh. For the cost of the energy provided to customers by the utility company, we model this as a cost function shown as Eq.(23). We assume that bh = 0, ch = 0 for all h ∈ H. Also, we have ah = 5.5×10−4 pence during the day, i.e. from 8AM to 12AM and ah = 4.0 × 10−4 pence at night hours, i.e. from 12AM to 8AM (the next day). In this section, firstly the convergence analysis of our proposed algorithms is given. Secondly, we show the benefits to the retailer by employing our proposed day-ahead pricing scheme, which is compared with a flat pricing scheme. Thirdly, we present the benefits to customers by adopting our proposed energy management scheme. 7 TABLE II: Parameter settings of the multi-population GA 200 Multi−population GA Simple GA Convergence speed (generations) 180 160 140 120 100 Parameter Name Symbol Values Number of Sub-population Sub-population Size Migration Rate Chromosome Length Mutation Probability Terminate Generation Sp N Mr L Pm T 15 40 0.2 10 0.01 100 80 60 14 40 12 20 200 300 400 500 600 700 Customer number 800 900 10 1000 Fig. 1: Convergence of the multi-population GA and the simple GA under different customer numbers Price (pence/kwh) 0 100 8 6 Optimal Day−ahead Prices Optimal Flat Prices 4 A. Convergence Analysis In this subsection, we test the aforementioned two strategies (i.e. increasing the population and reducing the generation) in terms of convergence for the GA. We conduct simulations to show the convergence speed of our proposed multi-population GA and the simple GA under different customer numbers (from 100 to 1000) as shown in Figure 1. It is worth mentioning that the convergence speed does not change much when customer numbers increase, which indicates our proposed distributed optimization algorithm is rather scalable with the number of customers and can significantly reduce the data communication between the retailer and the smart meters. B. Benefits to the Retailer In this subsection, we compare our proposed optimal dayahead pricing scheme with optimal flat pricing scheme. The parameter settings of our proposed multi-population GA are shown in Table II. Since the customers have no incentives to change their energy consumption pattern when responding to flat pricing, we assume that, under the flat pricing, the customers start the operations of appliances right at the beginning of the scheduling window Ha and the appliances work at their typical power levels. We assume that, for each hour h, 8.0 pence ≤ ph ≤ 14.0 pence holds. When calculating the optimal flat pricing, we use the same parameters and model as those of optimal day-ahead pricing. The obtained optimal day-ahead prices and flat prices are given in Figure 2. Finally, the details of revenue, cost and profit under optimal day-ahead prices and flat prices can be found in Table III. From Table III, we can see that, to make the same revenue (i.e. the total bills for all customers are the same), the cost of the retailer under optimal day-ahead pricing is 120.08 pounds and the cost under optimal flat pricing is higher (139.35 pounds). This is due to the increase of peak demand and thus the increase of peak-time cost. Furthermore, the profit under 2 0 8AM 11AM 2PM 5PM 8PM 11PM Hour ending 2AM 5AM Fig. 2: Obtained optimal day-ahead prices and flat prices TABLE III: Revenue, cost and profit under different price Price setting Revenue (pounds) Cost (pounds) Profit (pounds) Optimal Day-ahead Pricing Optimal Flat Pricing 255.00 120.08 134.92 255.00 139.35 115.65 optimal day-ahead pricing (134.92 pounds) is higher than the profit under optimal flat pricing (115.65 pounds). The example shows a very important potential for the day-ahead pricing and our proposed approach: the day-ahead pricing enables to increase the retailer’s profit without increasing customers’ expenses. C. Benefits to Customers In this subsection, we show the effectiveness of the proposed energy management scheme based on public day-ahead price data. We use the actual electricity prices data adopted by ISO New England from January 1, 2012 to January 31, 2012, which is available to the public on-line at [23]. Due to the space limitation, we only show the result of the first customer. The simulation result is shown as Figure 3 where we can find that, after adopting the energy management scheme, the daily bill payment is significantly reduced. Furthermore, we show that by adopting our proposed financial incentive based waiting time scheme, the customers may get further benefits in terms of reducing their payments subject to acceptable life comforts. VI. C ONCLUSION In this paper, we model the interactions between the retailer and its customers as a bilevel optimization problem. Firstly, 8 A PPENDIX B P ROOF OF L EMMA 2 120 Proof. Firstly, for a given x ∈ X, denote PN { i=1 fi (x, yi ) : Ω(x) = argmin Daily Electricity Payment (pence) 100 80 y1 ,...,yN ∈Y1 ×...×YN 60 (30) gi (x, yi ) ≤ 0, i = 1, . . . , N }, 40 and choose ∗ (y1∗ , ..., yN )= 20 0 G(x, y1 , ..., yN ) ≤ 0}. with energy management and waiting cost with energy management but no waiting cost none −20 −40 1/01/2012 16/01/2012 Day 31/01/2012 according to the load types, we categorize home appliances into interruptible, non-interruptible and curtailable appliances. For different categories of appliances, different appliance-level optimization models are given, which forms the lower level problem. As the common solutions to the bilevel optimization problem such as KKT transformations are not usable in our application setting, a hybrid optimization approach based on genetic algorithms and individual optimization solutions has been proposed to solve the bilevel problem. Since the numerical results show that both the retailer and its customers can benefit from the proposed model, it has great potential to improve the implementations of current energy pricing programs, help customers to reduce their increasing energy bills, and change their energy usage patterns. A PPENDIX A P ROOF OF L EMMA 1 Proof. For any fixed x, as min (y1 ,...,yN )∈Y1 ×...×YN i = 1, ..., N } = N X i=1 { fi (x, yi ) : gi (x, yi ) ≤ 0, i=1 min { fi (x, yi ) : gi (x, yi ) ≤ 0} yi ∈Yi which implies immediately that ∗ (y1∗ , ..., yN )∈ argmin (y1 ,...,yN )∈Y1 ×...×YN { N X fi (x, yi ) : i=1 gi (x, yi ) ≤ 0, i = 1, . . . , N } if and only if yi∗ ∈ argmin{ fi (x, yi ) : gi (x, yi ) ≤ 0} (31) ∗ Now denote (y1∗ , ..., yN ) = R(x). As X is a finite set, there exists an optimal solution as follows x∗ = argmax {F [x, R(x)] : G[x, R(x)] ≤ 0} . Fig. 3: Daily electricity payment of one customer over one month N X argmax {F (x, y1 , ..., yN ) : y1 ,...,yN ∈Ω(x) x∈X (32) Now we are going to prove [x∗ , R(x∗ )] is the optimal solution to the bilevel problem (28). For any feasible solution (x, y1 , ..., yN ) to the bilevel problem (28), from (30), (31), (32), we have F (x, y1 , ..., yN ) ≤ F [x, R(x)] ≤ F [x∗ , R(x∗ )]. (33) As [x∗ , R(x∗ )] is a feasible solution to (28) based on (30), (31), (32), the inequality (33) implies that the objective function of the bilevel problem (28) takes its maximal value at [x∗ , R(x∗ )]. Therefore, [x∗ , R(x∗ )] is the optimal solution to (28). A PPENDIX C P ROOF OF T HEOREM 1 Proof. Firstly, according to Lemma 1, our considered bilevel pricing optimization problem given in (21), (22) and (24)-(27) with one upper-level decision agent (retailer) and N independent lower-level decision agents (customers) is equivalent to the bilevel model with one upper-level decision agent and one lower-level decision agent. Therefore we only need to prove the existence of the optimal solution in the formation of the optimization problem as (28). For each decision variable ph (h = 1, ..., 24) in decision variable vector P = p1 , ..., p24 at the upper level problem, it only takes finite values (in practice it is often one decimal after the small unit in a given currency), i.e., the price at each hour h can only take Dh values, where Dh is the number of min max possible Q24price values within interval [ph , ph ]. As a result, D = h=1 Dh is a finite integer. We denote the space of all prices across 24 hours (i.e., P ) at the upper-level problem as UP . Noting the total number of elements of set UP is D, which is a finite integer, it is implied immediately that UP is a finite space. Therefore, based on Lemma 2, it is implied that the optimal solution to the considered bilevel pricing problem exists. i = 1, 2..., N. yi ∈Yi Based on the formulations of Eq.(1) and Eq.(28), this implies that they have the exact same objective functions and constraints and therefore these two bilevel optimization problems are equivalent and have the same optimal solutions. ACKNOWLEDGMENT This work is partly supported by the National Nature Science Foundation of China (Grant No. 71301133) and Humanity and Social Science Youth Foundation of Ministry of Education, China (Grant No. 13YJC630033). 9 R EFERENCES [1] P. Palensky and D. Dietrich, “Demand side management: Demand response, intelligent energy systems, and smart loads,” Industrial Informatics, IEEE Transactions on, vol. 7, no. 3, pp. 381–388, 2011. [2] P. Siano, “Demand response and smart grids – a survey,” Renewable and Sustainable Energy Reviews, vol. 30, pp. 461–478, 2014. [3] A.-H. Mohsenian-Rad and A. Leon-garcia, “Optimal Residential Load Control With Price Prediction in Real-Time Electricity Pricing Environments,” Smart Grid, IEEE Transactions on, vol. 1, no. 2, pp. 120–133, 2010. [4] A.-H. Mohsenian-Rad and V. Wong, “Autonomous demand-side management based on game-theoretic energy consumption scheduling for the future smart grid,” Smart Grid, IEEE Transactions on, vol. 1, no. 3, pp. 320–331, 2010. [5] C. O. Adika and L. Wang, “Autonomous appliance scheduling for household energy management,” Smart Grid, IEEE Transactions on, vol. 5, no. 2, pp. 673–682, 2014. [6] Y. Liu, C. Yuen, S. Huang, N. UL Hassan, X. Wang, and S. Xie, “Peakto-average ratio constrained demand-side management with consumers preference in residential smart grid,” Selected Topics in Signal Processing, IEEE Journal of, vol. 8, no. 6, pp. 1084–1097, 2014. [7] P. Samadi, A.-H. Mohsenian-Rad, R. Schober, V. W. Wong, and J. Jatskevich, “Optimal real-time pricing algorithm based on utility maximization for smart grid,” in Smart Grid Communications (SmartGridComm), 2010 First IEEE International Conference on. IEEE, 2010, pp. 415–420. [8] N. Li, L. Chen, and S. H. Low, “Optimal demand response based on utility maximization in power networks,” in 2011 IEEE Power and Energy Society General Meeting, 2011, pp. 1–8. [9] P. Yang, G. Tang, and A. Nehorai, “A game-theoretic approach for optimal time-of-use electricity pricing,” Power Systems, IEEE Transactions on, vol. 28, no. 2, pp. 884–892, 2013. [10] S. Bu, F. R. Yu, and P. X. Liu, “A game-theoretical decision-making scheme for electricity retailers in the smart grid with demand-side management,” in Smart Grid Communications (SmartGridComm), 2011 IEEE International Conference on. IEEE, 2011, pp. 387–391. [11] C. Chen, S. Kishore, and L. Snyder, “An innovative rtp-based residential power scheduling scheme for smart grids,” in Acoustics, Speech and Signal Processing (ICASSP), 2011 IEEE International Conference on. IEEE, 2011, pp. 5956–5959. [12] J. Chen, B. Yang, and X. Guan, “Optimal demand response scheduling with stackelberg game approach under load uncertainty for smart grid,” in Smart Grid Communications (SmartGridComm), 2012 IEEE Third International Conference on. IEEE, 2012, pp. 546–551. [13] L. P. Qian, Y. J. A. Zhang, J. Huang, and Y. Wu, “Demand response management via real-time electricity price control in smart grids,” Selected Areas in Communications, IEEE Journal on, vol. 31, no. 7, pp. 1268–1280, 2013. [14] S. Maharjan, Q. Zhu, Y. Zhang, S. Gjessing, and T. Basar, “Dependable demand response management in the smart grid: A stackelberg game approach.” Smart Grid, IEEE Transactions on, vol. 4, no. 1, pp. 120– 132, 2013. [15] M. Zugno, J. M. Morales, P. Pinson, and H. Madsen, “A bilevel model for electricity retailers’ participation in a demand response market environment,” Energy Economics, vol. 36, pp. 182–197, 2013. [16] B. Chai, J. Chen, Z. Yang, and Y. Zhang, “Demand response management with multiple utility companies: A two-level game approach,” Smart Grid, IEEE Transactions on, vol. 5, no. 2, pp. 722–731, 2014. [17] I. Momber, S. Wogrin, and T. Gomez San Roman, “Retail pricing: A bilevel program for pev aggregator decisions using indirect load control,” Power Systems, IEEE Transactions on. [Online]. Available: http://dx.doi.org/10.1109/35.267438 [18] F.-L. Meng and X.-J. Zeng, “An optimal real-time pricing for demandside management: A stackelberg game and genetic algorithm approach,” in Neural Networks (IJCNN), 2014 International Joint Conference on. IEEE, 2014, pp. 1703–1710. [19] K. Deb, “An efficient constraint handling method for genetic algorithms,” Computer methods in applied mechanics and engineering, vol. 186, no. 2, pp. 311–338, 2000. [20] H. Mühlenbein, M. Schomisch, and J. Born, “The parallel genetic algorithm as function optimizer,” Parallel computing, vol. 17, no. 6, pp. 619–632, 1991. [21] D. Whitley, S. Rana, and R. B. Heckendorn, “The island model genetic algorithm: On separability, population size and convergence,” Journal of Computing and Information Technology, vol. 7, pp. 33–48, 1999. [22] K.-S. Tang, K. Man, S. Kwong, and Q. He, “Genetic algorithms and their applications,” Signal Processing Magazine, IEEE, vol. 13, no. 6, pp. 22–37, 1996. [23] ISONewEngland, “Hourly zonal information,” http://isone.com/markets/hstdata/znl info/hourly/index.html, December 2012, accessed 1 March 2013.
3cs.SY
DCN+: M IXED OBJECTIVE AND DEEP RESIDUAL COATTENTION FOR QUESTION ANSWERING arXiv:1711.00106v2 [cs.CL] 10 Nov 2017 Caiming Xiong∗, Victor Zhong∗, Richard Socher Salesforce Research Palo Alto, CA 94301, USA {cxiong, vzhong, rsocher}@salesforce.com A BSTRACT Traditional models for question answering optimize using cross entropy loss, which encourages exact answers at the cost of penalizing nearby or overlapping answers that are sometimes equally accurate. We propose a mixed objective that combines cross entropy loss with self-critical policy learning. The objective uses rewards derived from word overlap to solve the misalignment between evaluation metric and optimization objective. In addition to the mixed objective, we improve dynamic coattention networks (DCN) with a deep residual coattention encoder that is inspired by recent work in deep self-attention and residual networks. Our proposals improve model performance across question types and input lengths, especially for long questions that requires the ability to capture long-term dependencies. On the Stanford Question Answering Dataset, our model achieves state-of-the-art results with 75.1% exact match accuracy and 83.1% F1, while the ensemble obtains 78.9% exact match accuracy and 86.0% F1. 1 I NTRODUCTION Existing state-of-the-art question answering models are trained to produce exact answer spans for a question and a document. In this setting, a ground truth answer used to supervise the model is defined as a start and an end position within the document. Existing training approaches optimize using cross entropy loss over the two positions. However, this suffers from a fundamental disconnect between the optimization, which is tied to the position of a particular ground truth answer span, and the evaluation, which is based on the textual content of the answer. This disconnect is especially harmful in cases where answers that are textually similar to, but distinct in positions from, the ground truth are penalized in the same fashion as answers that are textually dissimilar. For example, suppose we are given the sentence “Some believe that the Golden State Warriors team of 2017 is one of the greatest teams in NBA history”, the question “which team is considered to be one of the greatest teams in NBA history”, and a ground truth answer of “the Golden State Warriors team of 2017”. The span “Warriors” is also a correct answer, but from the perspective of traditional cross entropy based training it is no better than the span “history”. To address this problem, we propose a mixed objective that combines traditional cross entropy loss over positions with a measure of word overlap trained with reinforcement learning. We obtain the latter objective using self-critical policy learning in which the reward is based on word overlap between the proposed answer and the ground truth answer. Our mixed objective brings two benefits: (i) the reinforcement learning objective encourages answers that are textually similar to the ground truth answer and discourages those that are not; (ii) the cross entropy objective significantly facilitates policy learning by encouraging trajectories that are known to be correct. The resulting objective is one that is both faithful to the evaluation metric and converges quickly in practice. In addition to our mixed training objective, we extend the Dynamic Coattention Network (DCN) by Xiong et al. (2017) with a deep residual coattention encoder. This allows the network to build richer representations of the input by enabling each input sequence to attend to previous attention contexts. Vaswani et al. (2017) show that the stacking of attention layers helps model long-range ∗ Equal contribution 1 Document BiLSTM1 LD 1 E1D Output BiLSTM C1D S1D BiLSTM2 E2D C2D S2D Question LQ 1 BiLSTM1 E1Q Coattention1 S1Q BiLSTM2 E2Q Coattention2 Figure 1: Deep residual coattention encoder. dependencies. We merge coattention outputs from each layer by means of residual connections to reduce the length of signal paths. He et al. (2016) show that skip layer connections facilitate signal propagation and alleviate gradient degradation. The combination of the deep residual coattention encoder and the mixed objective leads to higher performance across question types, question lengths, and answer lengths on the Stanford Question Answering Dataset (SQuAD) (Rajpurkar et al., 2016) compared to our DCN baseline. The improvement is especially apparent on long questions, which require the model to capture long-range dependencies between the document and the question. Our model, which we call DCN+, achieves state-of-the-art results on SQuAD, with 75.1% exact match accuracy and 83.1% F1. When ensembled, the DCN+ obtains 78.9% exact match accuracy and 86.0% F1. 2 DCN+ We consider the question answering task in which we are given a document and a question, and are asked to find the answer in the document. Our model is based on the DCN by Xiong et al. (2017), which consists of a coattention encoder and a dynamic decoder. The encoder first encodes the question and the document separately, then builds a codependent representation through coattention. The decoder then produces a start and end point estimate given the coattention. The DCN decoder is dynamic in the sense that it iteratively estimates the start and end positions, stopping when estimates between iterations converge to the same positions or when a predefined maximum number of iterations is reached. We make two significant changes to the DCN by introducing a deep residual coattention encoder and a mixed training objective that combines cross entropy loss from maximum likelihood estimation and reinforcement learning rewards from self-critical policy learning. 2.1 D EEP RESIDUAL COATTENTION ENCODER Because it only has a single-layer coattention encoder, the DCN is limited in its ability to compose complex input representations. Vaswani et al. (2017) proposed stacked self-attention modules to facilitate signal traversal. They also showed that the network’s ability to model long-range dependencies can be improved by reducing the length of signal paths. We propose two modifications to the coattention encoder to leverage these findings. First, we extend the coattention encoder with self-attention by stacking coattention layers. This allows the network to build richer representations over the input. Second, we merge coattention outputs from each layer with residual connections. This reduces the length of signal paths. Our encoder is shown in Figure 1. Suppose we are given a document of m words and a question of n words. Let LD ∈ Re×m and LQ ∈ Re×n respectively denote the word embeddings for the document and the question, where e is the dimension of the word embeddings. We obtain document encodings E1D and question 2 encodings E1Q through a bidirectional Long Short-Term Memory Network (LSTM) (Hochreiter & Schmidhuber, 1997), where we use integer subscripts to denote the coattention layer number. E1D = E1Q =  biLSTM1 LD ∈ Rh×(m+1)   tanh W biLSTM1 LQ + b ∈ Rh×(n+1) (1) (2) Here, h denotes the hidden state size and the +1 indicates the presence of an additional sentinel word which allows the coattention to not focus on any part of the input. Like the original DCN, we add a non-linear transform to the question encoding.  | We compute the affinity matrix between the document and the question as A = E1Q E1D ∈ R(m+1)×(n+1) . Let softmax (X) denote the softmax operation over the matrix X that normalizes X column-wise. The document summary vectors and question summary vectors are computed as S1D S1Q = E1Q softmax (A| ) ∈ Rh×(m+1) = E1D softmax (A) ∈ R (3) h×(n+1) (4) We define the document coattention context as follows. Note that we drop the dimension corresponding to the sentinel vector – it has already been used during the summary computation and is not a potential position candidate for the decoder. C1D = S1Q softmax (A| ) ∈ Rh×m (5) We further encode the summaries using another bidirectional LSTM. E2D = E2Q =  biLSTM2 S1D ∈ R2h×m   biLSTM2 S1Q ∈ R2h×n (6) (7) Equation 3 to equation 5 describe a single coattention layer. We compute the second coattention layer in a similar fashion. Namely, let coattn denote a multi-valued mapping whose inputs are the two input sequences E1D and E1Q . We have   coattn1 E1D , E1Q   coattn2 E2D , E2Q → S1D , S1Q , C1D (8) → S2D , S2Q , C2D (9) The output of our encoder is then obtained as U = biLSTM concat E1D ; E2D ; S1D ; S2D ; C1D ; C2D  ∈ R2h×m (10) where concat (A, B) denotes the concatenation between the matrices A and B along the first dimension. This encoder is different than the original DCN in its depth and its use of residual connections. We use not only the output of the deep coattention network C2D as input to the final bidirectional LSTM, but add skip connections to initial encodings E1D , E2D , summary vectors S1D , S2D , and coattention context C1D . This is akin to transformer networks (Vaswani et al., 2017), which achieved stateof-the-art results on machine translation using deep self-attention layers to help model long-range dependencies, and residual networks (He et al., 2016), which achieved state-of-the-art results in image classification through the addition of skip layer connections to facilitate signal propagation and alleviate gradient degradation. 3 2.2 M IXED OBJECTIVE USING SELF - CRITICAL POLICY LEARNING The DCN produces a distribution over the start position of the answer and a distribution over the end position of the answer. Let s and e denote the respective start and end points of the ground truth answer. Because the decoder of the DCN is dynamic, we denote the start and end distributions produced at the tth decoding step by pstart ∈ Rm and pend ∈ Rm . For convenience, we denote the t t greedy estimate of the start and end positions by the model at the tth decoding step by st and et . Moreover, let Θ denote the parameters of the model. Similar to other question answering models, the DCN is supervised using the cross entropy loss on the start position distribution and the end position distribution: X  lce (Θ) = − log pstart (s | st−1 , et−1 ; Θ) + log pend (e | st−1 , et−1 ; Θ) (11) t t t Equation 11 states that the model accumulates a cross entropy loss over each position during each decoding step given previous estimates of the start and end positions. The question answering task consists of two evaluation metrics. The first, exact match, is a binary score that denotes whether the answer span produced by the model has exact string match with the ground truth answer span. The second, F1, computes the degree of word overlap between the answer span produced by the model and the ground truth answer span. We note that there is a disconnect between the cross entropy optimization objective and the evaluation metrics. For example, suppose we are given the answer estimates A and B, neither of which match the ground truth positions. However, A has an exact string match with the ground truth answer whereas B does not. The cross entropy objective penalizes A and B equally, despite the former being correct under both evaluation metrics. In the less extreme case where A does not have exact match but has some degree of word overlap with the ground truth, the F1 metric still prefers A over B despite its wrongly predicted positions. We encode this preference using reinforcement learning, using the F1 score as the reward function. denote the sampled start and end positions from the estimated and eˆt ∼ pstart Let sˆt ∼ pstart t t distributions at decoding step t. We define a trajectory τ̂ as a sequence of sampled start and end points sˆt and eˆt through all T decoder time steps. The reinforcement learning objective is then the negative expected rewards R over trajectories. lrl (Θ) = −Eτ̂ ∼pτ [R (s, e, ŝT , êT ; Θ)] ≈ −Eτ̂ ∼pτ [F1 (ans (ŝT , êT ) , ans (s, e)) − F1 (ans (sT , eT ) , ans (s, e))] (12) (13) We use F1 to denote the F1 scoring function and ans (s, e) to denote the answer span retrieved using the start point s and end point e. In equation 13, instead of using only the F1 word overlap as the reward, we subtract from it a baseline. Greensmith et al. (2001) show that a good baseline reduces the variance of gradient estimates and facilitates convergence. In our case, we employ a self-critic (Konda & Tsitsiklis, 1999) that uses the F1 score produced by the current model during greedy inference without teacher forcing. For ease of notation, we abbreviate R (s, e, ŝT , êT ; Θ) as R. As per Sutton et al. (1999) and Schulman et al. (2015), the expected gradient of a non-differentiable reward function can be computed as ∇Θ lrl (Θ) = −∇Θ (Eτ̂ ∼pτ [R]) (14) = −Eτ̂ ∼pτ [R∇Θ log pτ (τ ; Θ)] (15) " !# T X  start end = −Eτ̂ ∼pτ R∇Θ log pt (ŝt |ŝt−1 , êt−1 ; Θ) + log pt (êt |ŝt−1 , êt−1 ; Θ) t ≈ −R∇Θ T X ! log pstart t (ŝt |ŝt−1 , êt−1 ; Θ) + t 4 log pend t  (êt |ŝt−1 , êt−1 ; Θ) (16) Maximum likelihood estimation lossce Task combination loss lossrl Greedy prediction DCN+ s T , eT Evaluator Baseline F1 Self critic Sampled policy prediction sˆT , eˆT Evaluator Policy F1 Figure 2: Computation of the mixed objective. In equation 16, we approximate the expected gradient using a single Monte-Carlo sample τ drawn from pτ . This sample trajectory τ contains the start and end positions ŝt and êt sampled during all decoding steps. One of the key problems in applying RL to natural language processing is the discontinuous and discrete space the agent must explore in order to find a good policy. For problems with large exploration space, RL approaches tend to be applied as fine-tuning steps after a maximum likelihood model has already been trained (Paulus et al., 2017; Wu et al., 2016). The resulting model is constrained in its exploration during fine-tuning because it is biased by heavy pretraining. We instead treat the optimization problem as a multi-task learning problem. The first task is to optimize for positional match with the ground truth answer using the the cross entropy objective. The second task is to optimize for word overlap with the ground truth answer with the self-critical reinforcement learning objective. In a similar fashion to Kendall et al. (2017), we combine the two losses using homoscedastic uncertainty as task-dependent weightings. l= 1 1 2 2 l (Θ) + 2 lrl (Θ) + log σce + log σrl 2 ce 2σce 2σrl (17) Here, σce and σrl are learned parameters. The gradient of the cross entropy objective can be derived using straight-forward backpropagation. The gradient of the self-critical reinforcement learning objective is shown in equation 16. Figure 2 illustrates how the mixed objective is computed. In practice, we find that adding the cross entropy task significantly facilitates policy learning by pruning the space of candidate trajectories - without the former, it is very difficult for policy learning to converge due to the large space of potential answers, documents, and questions. 3 E XPERIMENTS We train and evaluate our model on the Stanford Question Answering Dataset (SQuAD). We show our test performance of our model against other published models, and demonstrate the importance of our proposals via ablation studies on the development set. To preprocess the corpus, we use the reversible tokenizer from Stanford CoreNLP (Manning et al., 2014). For word embeddings, we use GloVe embeddings pretrained on the 840B Common Crawl corpus (Pennington et al., 2014) as well as character ngram embeddings by Hashimoto et al. (2017). In addition, we concatenate these embeddings with context vectors (CoVe) trained on WMT (McCann et al., 2017). For out of vocabulary words, we set the embeddings and context vectors to zero. We perform word dropout on the document which zeros a word embedding with probability 0.075. In addition, we swap the first maxout layer of the highway maxout network in the DCN decoder with a sparse mixture of experts layer (Shazeer et al., 2017). This layer is similar to the maxout layer, except instead of taking the top scoring expert, we take the top k = 2 expert. The model is trained using ADAM (Kingma & Ba, 5 2014) with default hyperparameters. Hyperparameters of our model are identical to the DCN. We implement our model using PyTorch. 3.1 R ESULTS Single Model Dev Model DCN+ (ours) rnet DCN w/ CoVe (baseline) Mnemonic Reader Document Reader FastQA ReasoNet SEDT BiDAF DCN Single Model Test Ensemble Test EM F1 EM F1 EM F1 74.5% 72.3% 71.3% 70.1% 69.5% 70.3% – 67.9% 67.7% 65.4% 83.1% 80.6% 79.9% 79.6% 78.8% 78.5% – 77.4% 77.3% 75.6% 75.1% 72.3% – 69.9% 70.0% 70.8% 69.1% 68.5% 68.0% 66.2% 83.1% 80.7% – 79.2% 79.0% 78.9% 78.9% 78.0% 77.3% 75.9% 78.9% 76.9% – 73.7% – – 73.4% 73.0% 73.7% 71.6% 86.0% 84.0% – 81.7% – – 81.8% 80.8% 81.5% 80.4% Table 1: Test performance on SQuAD. The papers are as follows: rnet (Microsoft Asia Natural Language Computing Group, 2017), SEDT (Liu et al., 2017), BiDAF (Seo et al., 2017), DCN w/ CoVe (McCann et al., 2017), ReasoNet (Shen et al., 2017), Document Reader (Chen et al., 2017), FastQA (Weissenborn et al., 2017), DCN (Xiong et al., 2017). The CoVe authors did not submit their model, which we use as our baseline, for SQuAD test evaluation. The performance of our model is shown in Table 1. Our model achieves state-of-the-art results on SQuAD dataset with 75.1% exact match accuracy and 83.1% F1. When ensembled, our model obtains 78.9% exact match accuracy and 86.0% F1. To illustrate the effectiveness of our proposals, we use the DCN with context vectors as a baseline (McCann et al., 2017). This model is identical to the DCN by Xiong et al. (2017), except that it augments the word representations with context vectors trained on WMT16. Comparison to baseline DCN with CoVe. DCN+ outperforms the baseline by 3.2% exact match accuracy and 3.2% F1 on the SQuAD development set. Figure 3 shows the consistent performance gain of DCN+ over the baseline across question types, question lengths, and answer lengths. In particular, DCN+ provides a significant advantage for long questions. 1.0 0.6 0.4 er wh at wh en wh ere wh ich wh o wh y ho w baseline DCN w/ CoVe DCN+ oth F1 0.8 baseline DCN w/ CoVe DCN+ 0 5 10 15 20 25 # words in question baseline DCN w/ CoVe DCN+ 30 0 4 8 12 16 20 # words in answer 25 Figure 3: Performance comparison between DCN+ and the baseline DCN with CoVe on the SQuAD development set. Ablation study. The contributions of each part of our model are shown in Table 2. We note that the deep residual coattention yielded the highest contribution to model performance, followed by the mixed objective. The sparse mixture of experts layer in the decoder added minor improvements to the model performance. 6 Model DCN+ (ours) - Deep residual coattention - Mixed objective - Mixture of experts DCN w/ CoVe (baseline) EM ∆EM F1 ∆F1 74.5% 73.1% 73.8% 74.0% 71.3% – -1.4% -0.7% -0.5% -3.2% 83.1% 81.5% 82.1% 82.4% 79.9% – -1.6% -1.0% -0.7% -3.2% Table 2: Ablation study on the development set of SQuAD. 0.8 0.6 F1 F1 0.6 0.4 RL train RL dev No RL train No RL dev 0.2 0 0.4 RL train RL dev No RL train No RL dev 0.2 20000 40000 60000 80000 100000120000140000 0 iterations (a) Entirety of the training curve. 2000 4000 iterations 6000 8000 (b) A closeup of the early stages of training. Figure 4: Training curve of DCN+ with and without reinforcement learning. In the latter case, only the cross entropy objective is used. The mixed objective initially performs worse as it begins policy learning from scratch, but quickly outperforms the cross entropy model. Mixed objective convergence. The training curves for DCN+ with reinforcement learning and DCN+ without reinforcement learning are shown in Figure 4 to illustrate the effectiveness of our proposed mixed objective. In particular, we note that without mixing in the cross entropy loss, it is extremely difficult to learn the policy. When we combine the cross entropy loss with the reinforcement learning objective, we find that the model initially performs worse early on as it begins policy learning from scratch (shown in Figure 4b). However, with the addition of cross entropy loss, the model quickly learns a reasonable policy and subsequently outperforms the purely cross entropy model (shown in Figure 4a). Sample predictions. Figure 5 compares predictions by DCN+ and by the baseline on the development set. Both models retrieve answers that have sensible entity types. For example, the second example asks for “what game” and both models retrieve an American football game; the third example asks for “type of Turing machine” and both models retrieve a type of turing machine. We find, however, that DCN+ consistently make less mistakes on finding the correct entity. This is especially apparent in the examples we show, which contain several entities or candidate answers of the correct type. In the first example, Gasquet wrote about the plague and called it “Great Pestilence”. While he likely did think of the plague as a “great pestilence”, the phrase “suggested that it would appear to be some form of ordinary Eastern or bubonic plague” provides evidence for the correct answer – “some form of ordinary Eastern or bubonic plague”. Similarly, the second example states that Thomas Davis was injured in the “NFC Championship Game”, but the game he insisted on playing in is the “Super Bowl”. Finally, “multi-tape” and “single-tape” both appear in the sentence that provides provenance for the answer to the question. However, it is the “single-tape” Turing machine that implies quadratic time. In these examples, DCN+ finds the correct entity out of ones that have the right type whereas the baseline does not. 4 R ELATED WORK Neural models for question answering. Current state-of-the-art approaches for question answering over unstructured text tend to be neural approaches. Wang & Jiang (2017) proposed one of the first conditional attention mechanisms in the Match-LSTM encoder. Coattention (Xiong et al., 2017), bidirectional attention flow (Seo et al., 2017), and self-matching attention (Microsoft Asia Natural Language Computing Group, 2017) all build codependent representations of the question and the document. These approaches of conditionally encoding two sequences are widely used in 7 What did Gasquet think the plague was? The historian Francis Aidan Gasquet wrote about the 'Great Pestilence' in 1893 and suggested that "it would appear to be some form of the ordinary Eastern or bubonic plague". He was able to adopt the epidemiology of the bubonic plague for the Black Death for the second edition in 1908, implicating rats and fleas in the process, and his interpretation was widely accepted for other ancient and medieval epidemics, such as the Justinian plague that was prevalent in the Eastern Roman Empire from 541 to 700 CE. What game did Thomas Davis say he would play in, despite breaking a bone earlier on? Carolina suffered a major setback when Thomas Davis, an 11-year veteran who had already overcome three ACL tears in his career, went down with a broken arm in the NFC Championship Game. Despite this, he insisted he would still find a way to play in the Super Bowl. His prediction turned out to be accurate. A language solved in quadratic time implies the use of what type of Turing machine? But bounding the computation time above by some concrete function f(n) often yields complexity classes that depend on the chosen machine model. For instance, the language {xx | x is any binary string} can be solved in linear time on a multi-tape Turing machine, but necessarily requires quadratic time in the model of single-tape Turing machines. If we allow polynomial variations in running time, Cobham-Edmonds thesis states that "the time complexities in any two reasonable and general models of computation are polynomially related" (Goldreich 2008, Chapter 1.2). This forms the basis for the complexity class P, which is the set of decision problems solvable by a deterministic Turing machine within polynomial time. The corresponding set of function problems is FP. Figure 5: Predictions by DCN+ (red) and DCN with CoVe (blue) on the SQuAD development set. question answering. After building codependent encodings, most models predict the answer by generating the start position and the end position corresponding to the estimated answer span. The generation process utilizes a pointer network (Vinyals et al., 2015) over the positions in the document. Xiong et al. (2017) also introduced the dynamic decoder, which iteratively proposes answers by alternating between start position and end position estimates, and in some cases is able to recover from initially erroneous predictions. Neural attention models. Neural attention models saw early adoption in machine translation (Bahdanau et al., 2015) and has since become to de-facto architecture for neural machine translation models. Self-attention, or intra-attention, has been applied to language modeling, sentiment analysis, natural language inference, and abstractive text summarization (Chen et al., 2017; Paulus et al., 2017). Vaswani et al. (2017) extended this idea to a deep self-attentional network which obtained state-of-the-art results in machine translation. Coattention, which builds codependent representations of multiple inputs, has been applied to visual question answering (Lu et al., 2016). Xiong et al. (2017) introduced coattention for question answering. Bidirectional attention flow (Seo et al., 2017) and self-matching attention (Microsoft Asia Natural Language Computing Group, 2017) also build codependent representations between the question and the document. Reinforcement learning in NLP. Many tasks in natural language processing have evaluation metrics that are not differentiable. Dethlefs & Cuayáhuitl (2011) proposed a hierarchical reinforcement learning technique for generating text in a simulated way-finding domain. Narasimhan et al. (2015) applied deep Q-networks to learn policies for text-based games using game rewards as feedback. Li et al. (2016) introduced a neural conversational model trained using policy gradient methods, whose reward function consisted of heuristics for ease of answering, information flow, and semantic coherence. Bahdanau et al. (2017) proposed a general actor-critic temporal-difference method for sequence prediction, performing metric optimization on language modeling and machine translation. Direct word overlap metric optimization has also been applied to summarization (Paulus et al., 2017), and machine translation (Wu et al., 2016). 5 C ONCLUSION We introduced DCN+, an state-of-the-art question answering model with deep residual coattention trained using a mixed objective that combines cross entropy supervision with self-critical policy learning. We showed that our proposals improve model performance across question types, question lengths, and answer lengths on the Stanford Question Answering Dataset ( SQuAD). On SQuAD, the DCN+ achieves 75.1% exact match accuracy and 83.1% F1. When ensembled, the DCN+ obtains 78.9% exact match accuracy and 86.0% F1. 8 R EFERENCES Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. Neural machine translation by jointly learning to align and translate. In ICLR, 2015. Dzmitry Bahdanau, Philemon Brakel, Kelvin Xu, Anirudh Goyal, Ryan Lowe, Joelle Pineau, Aaron C. Courville, and Yoshua Bengio. An actor-critic algorithm for sequence prediction. In ICLR, 2017. Danqi Chen, Adam Fisch, Jason Weston, and Antoine Bordes. Reading wikipedia to answer opendomain questions. In ACL, 2017. Nina Dethlefs and Heriberto Cuayáhuitl. Combining hierarchical reinforcement learning and bayesian networks for natural language generation in situated dialogue. In Proceedings of the 13th European Workshop on Natural Language Generation, pp. 110–120. Association for Computational Linguistics, 2011. Evan Greensmith, Peter L. Bartlett, and Jonathan Baxter. Variance reduction techniques for gradient estimates in reinforcement learning. Journal of Machine Learning Research, 5:1471–1530, 2001. Kazuma Hashimoto, Caiming Xiong, Yoshimasa Tsuruoka, and Richard Socher. A joint many-task model: Growing a neural network for multiple NLP tasks. In EMNLP, 2017. Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pp. 770– 778, 2016. Sepp Hochreiter and Jurgen Schmidhuber. Long short-term memory. Neural computation, 9 8: 1735–80, 1997. Alex Kendall, Yarin Gal, and Roberto Cipolla. Multi-task learning using uncertainty to weigh losses for scene geometry and semantics. CoRR, abs/1705.07115, 2017. Diederik P. Kingma and Jimmy Ba. abs/1412.6980, 2014. Adam: A method for stochastic optimization. CoRR, Vijay R. Konda and John N. Tsitsiklis. Actor-critic algorithms. In NIPS, 1999. Jiwei Li, Will Monroe, Alan Ritter, Michel Galley, Jianfeng Gao, and Dan Jurafsky. Deep reinforcement learning for dialogue generation. In EMNLP, 2016. Rui Liu, Junjie Hu, Wei Wei, Zi Yang, and Eric Nyberg. Structural embedding of syntactic trees for machine comprehension. In ACL, 2017. Jiasen Lu, Jianwei Yang, Dhruv Batra, and Devi Parikh. Hierarchical question-image co-attention for visual question answering. In NIPS, 2016. Christopher D. Manning, Mihai Surdeanu, John Bauer, Jenny Rose Finkel, Steven Bethard, and David McClosky. The stanford corenlp natural language processing toolkit. In ACL, 2014. Bryan McCann, James Bradbury, Caiming Xiong, and Richard Socher. Learned in translation: Contextualized word vectors. In NIPS, 2017. Microsoft Asia Natural Language Computing Group. R-net: Machine reading comprehension with self-matching networks. 2017. Karthik Narasimhan, Tejas D. Kulkarni, and Regina Barzilay. Language understanding for textbased games using deep reinforcement learning. In EMNLP, 2015. Romain Paulus, Caiming Xiong, and Richard Socher. A deep reinforced model for abstractive summarization. CoRR, abs/1705.04304, 2017. Jeffrey Pennington, Richard Socher, and Christopher D. Manning. Glove: Global vectors for word representation. In EMNLP, 2014. 9 Pranav Rajpurkar, Jian Zhang, Konstantin Lopyrev, and Percy Liang. Squad: 100, 000+ questions for machine comprehension of text. In EMNLP, 2016. John Schulman, Nicolas Heess, Theophane Weber, and Pieter Abbeel. Gradient estimation using stochastic computation graphs. In NIPS, 2015. Min Joon Seo, Aniruddha Kembhavi, Ali Farhadi, and Hannaneh Hajishirzi. Bidirectional attention flow for machine comprehension. In ICLR, 2017. Noam Shazeer, Azalia Mirhoseini, Krzysztof Maziarz, Andy Davis, Quoc Le, Geoffrey Hinton, and Jeff Dean. Outrageously large neural networks: The sparsely-gated mixture-of-experts layer. In ICLR, 2017. Yelong Shen, Po-Sen Huang, Jianfeng Gao, and Weizhu Chen. Reasonet: Learning to stop reading in machine comprehension. In Proceedings of the 23rd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, pp. 1047–1055. ACM, 2017. Richard S. Sutton, David A. McAllester, Satinder P. Singh, and Yishay Mansour. Policy gradient methods for reinforcement learning with function approximation. In NIPS, 1999. Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Lukasz Kaiser, and Illia Polosukhin. Attention is all you need. In NIPS, 2017. Oriol Vinyals, Meire Fortunato, and Navdeep Jaitly. Pointer networks. In NIPS, 2015. Shuohang Wang and Jing Jiang. Machine comprehension using match-lstm and answer pointer. In ICLR, 2017. Dirk Weissenborn, Georg Wiese, and Laura Seiffe. Making neural qa as simple as possible but not simpler. In CoNLL, 2017. Yonghui Wu, Mike Schuster, Zhifeng Chen, Quoc V Le, Mohammad Norouzi, Wolfgang Macherey, Maxim Krikun, Yuan Cao, Qin Gao, Klaus Macherey, et al. Google’s neural machine translation system: Bridging the gap between human and machine translation. arXiv preprint arXiv:1609.08144, 2016. Caiming Xiong, Victor Zhong, and Richard Socher. Dynamic coattention networks for question answering. In ICLR, 2017. 10
2cs.AI
arXiv:1709.05702v2 [math.AT] 9 Oct 2017 On directed homotopy equivalences and a notion of directed topological complexity Eric Goubault∗ October 10, 2017 Abstract This short note introduces a notion of directed homotopy equivalence (or dihomotopy equivalence) and of “directed” topological complexity (which elaborates on the notion that can be found in e.g. [9]) which have a number of desirable joint properties. In particular, being dihomotopically equivalent implies having bisimilar natural homologies (defined in [5]). Also, under mild conditions, directed topological complexity is an invariant of our directed homotopy equivalence and having a directed topological complexity equal to one is (under these conditions) equivalent to being dihomotopy equivalent to a point (i.e., to being “dicontractible”, as in the undirected case). It still remains to compare this notion with the notion introduced in [8], which has lots of good properties as well. For now, it seems that for reasonable spaces, this new proposal of directed homotopy equivalence identifies more spaces than the one of [8]. Contents 1 Introduction 2 2 Some useful directed topological constructs 3 3 Dihomotopy equivalences 3.1 Dihomotopy equivalence and dicontractibility . . . . . . . . . . . . . . . . . . . . . 3.2 Strong dihomotopy equivalence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.3 Simple properties and examples of directed homotopy equivalences . . . . . . . . . 4 4 5 6 4 Dicontractibility and the dipath space map 10 5 Directed topological complexity 11 6 Conclusion 12 ∗ LIX, Ecole Polytechnique, CNRS, Université Paris-Saclay, 91128 Palaiseau, France [email protected]. Work presented during the Hausdorff Institute “Applied Computational Algebraic Topology” semester, on the 14th September 2017 for which the author gratefully acknowledges the organizers. 1 1 Introduction The aim of this note is to introduce another notion of directed homotopy equivalence than the one of [8], hoping to get other insights on directed topological spaces. The view we are taking here is that of topological complexity, as defined in [9], adapted to directed topological spaces. Let us briefly motivate the interest of this “directed” topological complexity notion. In the very nice work of M. Farber, it is observed that the very important planification problem in robotics boils down to, mathematically speaking, finding a section to the path space fibration χ : P X = X I → X × X with χ(p) = (p(0), p(1)). If this section is continuous, then the complexity is the lowest possible (equal to one), otherwise, the minimal number of discontinuities that would encode such a section would be what is called the topological complexity of X. This topological complexity is both understandable algorithmically, and topologically, e.g. as s having a continuous section is equivalent to X being contractible. More generally speaking, the topological complexity is defined as the Schwartz genus of the path space fibration, i.e. is the minimal cardinal of partitions of X × X into “nice” subspaces Fi such that sFi : Fi → P X is continuous. This definition perfectly fits the planification problem in robotics where there are no constraints on the actual control that can be applied to the physical apparatus that is supposed to be moved from point a to point b. In many applications, a physical apparatus may have dynamics that can be described as an ordinary differential equation in the state variables x ∈ Rn and in time t, parameterized by control parameters u ∈ Rp , ẋ(t) = f (t, x(t)). These parameters are generally bounded within some set U , and, not knowing the precise control law (i.e. parameters u as a function of time t) to be applied, the way the controlled system can evolve is as one of the solutions of the differential inclusion ẋ(t) ∈ F (t, x(t)) where F (t, x(t)) is the set of all f (t, x(t), u) with u ∈ U . Under some classical conditions, this differential inclusion can be proven to have solutions on at least a small interval of time, but we will not discuss this further here. Under the same conditions, the set of solutions of this differential inclusion naturally generates a dspace (a very general structure of directed space, where a preferred subset of paths is singled out, called directed paths, see e.g. [13]). Now, the planification problem in the presence of control constraints equates to finding sections to the analogues to the path space fibration1 taking a dipath to its end points. This is developed in next section, and we introduce a notion of directed homotopy equivalence that has precisely, and in a certain non technical sense, minimally, the right properties with respect to this directed version of topological complexity. The development of the notion of directed topological complexity and of its properties, together with applications to optimal control is joint work with coauthors, and will be published separately. Mathematical context : The context is that of d-spaces [13]. Definition 1 ([13]). A directed topological space, or d-space X = (X, dX) is a topological space equipped with a set dX of continuous maps p : I → X (where I = [0, 1] is the unit segment with the usual topology inherited from R), called directed paths or d-paths, satisfying three axioms : • every constant map I → X is directed • dX is closed under composition with non-decreasing maps from I to I • dX is closed under concatenation For X a d-space, let us note by P X (resp. T X) the topological space, with compact open topology, of dipaths (resp. the trace space, ie. P X modulo increasing homeomorphisms of the unit directed interval) in X. P X(a, b) (resp. T X(a, b)) is the sub-space of P X (resp. of T X) containing only dipaths (resp. traces) from point a ∈ X to point b ∈ X. We write * for the concatenation map from P X(a, b) × P X(b, c) to P X(a, c) (resp. on trace spaces), which is continuous. A dmap f from d-space X to d-space Y is a continuous map from X to Y that also maps elements from dX to elements of dY (i.e. they preserve directed paths). In what follows, we will be particularly concerned with the following map : 1 That would most probably not qualify for being called a fibration in the directed setting. 2 Definition 2. We define the dipath space map2 χ : P X → X × X of X by χ(p) = (p(0), p(1)) for p ∈ P X. Because P X only contains directed paths, the image of χ is just a subset of X × X, called ΓX = {(x, y) | ∃p ∈ P X, p(0) = x, p(1) = y }. On the classical case, we do not need to force the restriction to the image of the path space fibration, since the notions of contractibility and pathconnectedness are simple enough to be defined separately. In the directed setting, dicontractibility, and “directed connectedness” are not simple notions and will be defined here through the study of the dipath space map. In order to study this map, in particular when looking at conditions under which there exists “nice” sections to it, we need a few concepts from directed topology. 2 Some useful directed topological constructs Let X be a d-space. We define as in [6],  the preorder on X, x  y iff there exists a dipath from x to y. We define the category PX whose: • objects are pairs of points (x, y) of X such that x  y (i.e. objects are elements of ΓX ) • morphisms (called extensions) from (x, y) to (x0 , y 0 ) are pairs (α, β) of dipaths of X with α going from x0 to x and β going from y to y 0 We now define, for each X d-space, the functor P X from PX to T op with : • P X(x, y) = P X(x, y) • P X(α, β)(a) = α ∗ a ∗ β, where (α, β) is a morphism from (x, y) to (x0 , y 0 ) and a is a trace from x to y (i.e. and element of T X(x, y)). Remark : There is an obvious link to profunctors and to enriched category theory that we will not be contemplating here. Similar ideas from enriched category theory in directed algebraic topology have already been used in [15, 16] and [8]. A homotopy is a continuous function H : I × X → Y . We say that two maps f, g : X → Y are homotopic if there is a homotopy H such that H(0, ) = f and H(1, ) = g. This is an equivalence relation, compatible with composition. A d-homotopy equivalence is a dmap f : X → Y which is invertible up to homotopy, i.e., such that there is a dmap g : Y → X with f ◦ g and g ◦ f homotopic to identities. We say that two dspaces are d-homotopy equivalent if there is a d-homotopy equivalence between them. In such a case, f and g being dmaps induce Pf : PX → PY resp. Pg : PY → PX which are continuously bigraded maps in the sense that P fa,b : P X(a, b) → P Y (f (a), f (b)) and this bigrading is continuous in a, b (resp. P gc,d : P Y (c, d) → P X(g(c), g(d)), continuous in c, d). We write P Y f for the sub topological space of P Y of dipaths from f (a) to f (b) in Y for some (a, b) ∈ ΓX (resp. P X g for the sub topological space of P X of dipaths in X from g(c) to g(d) for some (c, d) ∈ ΓY ). 2 By analogy with the classical path space fibration - but fibration may be a bad term in that case in directed algebraic topology. 3 3 Dihomotopy equivalences 3.1 Dihomotopy equivalence and dicontractibility Definition 3. Let X and Y be two d-spaces. A dihomotopy equivalence between X and Y is given by : • A d-homotopy equivalence between X and Y , f : X → Y and g : Y → X. • A map F : P Y f → P X continuously bigraded as Fa,b : P Y (f (a), f (b)) → P X(a, b) such that (P fa,b , Fa,b ) is a homotopy equivalence between P X(a, b) and P Y (f (a), f (b)) • A map G : P X g → P Y , continuously bigraded as Gc,d : P X(g(c), g(d)) → P Y (c, d) such that (P gc,d , Gc,d ) is a homotopy equivalence between P Y (c, d) and P X(g(c), g(d)) • These homotopy equivalences are natural in the following sense – For the two diagrams below (separately), for all (α, β) ∈ PX, there exists (γ, δ) ∈ PY (with domains and codomains induced by the diagrams below) such that they commute3 up to homotopy P fa,b P X(a,b) Gc,d P Y (f (a),f (b)) P X(g(c),g(d)) P gc,d Fa,b P X(α,β) P Y (γ,δ) P X(α,β) P Y (γ,δ) P fa0 ,b0 P X(a0 ,b0 ) P Y (c,d) Gc0 ,d0 P Y (f (a0 ),f (b0 )) P X g (u0 ,v 0 ) P Y (c0 ,d0 ) P gc0 ,d0 Fa0 ,b0 with g(c0 ) = u0 and g(d0 ) = v 0 . – For the two diagrams below (separately), for all (γ, δ) ∈ PY there exists (α, β) ∈ PX such that they commute up to homotopy Gc,d P fa,b P X(a,b) P Y (f (a),f (b)) P X(g(c),g(d)) Fa,b P Y (c,d) P gc,d P X(γ,δ) P X(α,β) P X(α,β) P X(γ,δ) Gc0 ,d0 P fa0 ,b0 P X(a0 ,b0 ) P Y f (u0 ,v 0 ) P X(g(c0 ),g(d0 )) P Y (c0 ,d0 ) P gc0 ,d0 Fa0 ,b0 with f (a0 ) = u0 and f (b0 ) = v 0 . We sometimes write (f, g, F, G) for the full data associated to the dihomotopy equivalence f : X → Y . Note that in the definition above, we always have the following diagrams that commute on the nose, so that the conditions above only consists of 6 commutative diagrams up to homotopy : P gc,d P fa,b P X(a,b) P X(g(c),g(d)) P Y (f (a),f (b)) P X(α,β) P X(g(γ),g(δ)) P Y (f (α),f (β)) P X(a0 ,b0 ) P Y (c,d) P Y (γ,δ) P X(g(c0 ),g(d0 )) P Y (f (a0 ),f (b0 )) P Y (c0 ,d0 ) P g0 0 0 c ,d Pf 0 0 a ,b 3 Meaning both squares, one with P f a,b and P fa0 ,b0 and the other with Fa,b and Fa0 ,b0 ; and similarly for the diagram on the right hand side. 4 Remark : This definition clearly bears a lot of similarities with Dwyer-Kan weak equivalences in simplicial categories (see e.g. [2]). The main ingredient of Dwyer-Kan weak equivalences being exactly that P f induces a homotopy equivalence. But our definition adds continuity and “extension” or “bisimulation-like” conditions to it, which are instrumental to our theorems and to the classification of the underlying directed geometry. Remark : There is an obvious notion of deformation diretract of X ⊆ Y , which is a dihomotopy equivalence r : Y → X such that the inclusion map from X to Y is the left homotopy inverse of r and r ◦ i = Id. But there seems to be no reason that in general, two dihomotopically equivalent spaces are diretracts of a third one (the mapping cylinder in the classical case). It may be true with a zigzag of diretracts though, as in [8]. A dicontractible directed space is a space for which there exists a directed deformation retract onto one of its points. Particularizing once again the definition above, we get : Definition 4. Let X be a d-space. X is dicontractible if there is a continuous map R : {∗} → P X, continuously bigraded, such that Rc,d are homotopy equivalences (hence in particular, all path spaces of X are contractible). 3.2 Strong dihomotopy equivalence Algebraically speaking, there is a simple condition that enforces the bisimulation condition above (Lemma 1), that we call strong dihomotopy equivalence (see below Definition 5). We do not know if it is equivalent to dihomotopy equivalence for a large class of directed spaces. Definition 5. Let X and Y be two d-spaces. A strong dihomotopy equivalence between X and Y is given by : • A d-homotopy equivalence between X and Y , f : X → Y and g : Y → X. • A map F : P Y f → P X continuously bigraded as Fa,b : P Y (f (a), f (b)) → P X(a, b) such that (P fa,b , Fa,b ) is a homotopy equivalence between P X(a, b) and P Y (f (a), f (b)) • A map G : P X g → P Y , continuously bigraded as Gc,d : P X(g(c), g(d)) → P Y (c, d) such that (P gc,d , Gc,d ) is a homotopy equivalence between P Y (c, d) and P X(g(c), g(d)) • (a) For all α ∈ P X(a0 , a), v ∈ P Y (f (a), f (b)) and β ∈ P X(b, b0 ), Fa0 ,b0 (P fa0 ,a (α) ∗ v ∗ P fb,b0 (β)) ∼ α ∗ Fa,b (v) ∗ β • (b) For all γ ∈ P Y (c0 , c), v ∈ P X(g(c), g(d)) and δ ∈ P Y (d, d0 ), Gc0 ,d0 (P gc0 ,c (γ) ∗ v ∗ P gd,d0 (δ)) ∼ γ ∗ Gg(c),g(d) (v) ∗ δ • (c) For all γ ∈ P Y f (u0 , f (a)), p ∈ P Y (f (a), f (b)) and δ ∈ P Y f (f (b), v 0 ), there exists (a0 , b0 ) ∈ PX such that f (a0 ) = u0 , f (b0 ) = v 0 and Fa0 ,b0 (γ ∗ p ∗ δ) ∼ Fa0 ,a (γ) ∗ Fa,b (p) ∗ Fb,b0 (δ) • (d) For all α ∈ P X g (u0 , g(c)), q ∈ P X(g(c), g(d)) and β ∈ P X g (g(d), v 0 ), there exists (c0 , d0 ) ∈ PY such that g(c0 ) = u0 , g(d0 ) = v 0 and Gc0 ,d0 (α∗q ∗β) ∼ Gc0 ,c (γ)∗Gc,d (q)∗Gd,d0 (δ) Lemma 1. Strong dihomotopy equivalences are dihomotopy equivalences Proof. Let f : X → Y be a strong dihomotopy equivalence ; it comes with g : Y → X, G : P X → P Y and F : P Y → P X. Let (α, β) ∈ PX, with α ∈ P X(a0 , a) and β ∈ P X(b, b0 ). In order to prove that f is a dihomotopy equivalence, we must find (γ, δ) such that the diagram below involving Fa,b and Fa0 ,b0 commutes up to homotopy (the other diagram is commutative, for free) 5 P fa,b P X(a,b) P Y (f (a),f (b)) Fa,b P X(α,β) P X(γ,δ) P fa0 ,b0 P X(a0 ,b0 ) P Y (f (a0 ),f (b0 )) Fa0 ,b0 This commutes indeed with γ = P fa0 ,a (α) and δ = P fb,b0 (β) because of property (a) of strong dihomotopy equivalence f . Now, consider the diagram below, involving Gc,d and Gc0 ,d0 Gc,d P X(g(c),g(d)) P Y (c,d) P gc,d P X(α,β) P X(γ,δ) Gc0 ,d0 P X g (u0 ,v 0 ) P Y (c0 ,d0 ) P gc0 ,d0 with g(c0 ) = u0 and g(d0 ) = v 0 . Let γ = Gc0 ,d0 (α) and δ = Gd,d0 (β). Property (d) implies that the diagram above commutes up to homotopy. Similarly, let (γ, δ) ∈ PY , property (c) of f implies that the following diagram commutes up to homotopy by taking α = Fa0 ,a (γ) and β = Fb,b0 (δ) P fa,b P X(a,b) P Y (f (a),f (b)) Fa,b P X(γ,δ) P X(α,β) P fa0 ,b0 P X(a0 ,b0 ) P Y f (u0 ,v 0 ) Fa0 ,b0 with f (a0 ) = u0 and f (b0 ) = v 0 . And finally, property (b) implies that the following diagram commutes up to homotopy, by taking α = P gc0 ,d0 (γ) and β = P gd,d0 (δ) Gc,d P X(g(c),g(d)) P Y (c,d) P gc,d P X(α,β) P X(γ,δ) Gc0 ,d0 P X(g(c0 ),g(d0 )) P Y (c0 ,d0 ) P gc0 ,d0 3.3 Simple properties and examples of directed homotopy equivalences The first obvious (but important) observation is that directed homotopy equivalence refines ordinary homotopy equivalence. Also, directed homotopy equivalence is an invariant of dihomeomorphic dspaces : Lemma 2. Let X, Y be two directed spaces. Suppose there exists f : X → Y a dmap, which has an inverse, also a dmap. Then X and Y are directed homotopy equivalent. 6 Proof. Take g = f −1 , F = P g and G = P f . This data forms a directed homotopy equivalence. Now, natural homology [5] is going to be an invariant of dihomotopy equivalence, as it should be : Lemma 3. Let X, Y be two directed spaces. Suppose X and Y are directed homotopy equivalent. Then X and Y have bisimilar natural homotopy and homology (in the sense of [8]). Proof. Call f : X → Y and g : Y → X the underlying dmaps, forming the homotopy equivalence which is a directed homotopy equivalence. The bisimulation relation we are looking for is the relation : {((a, b), P fa,b , (f (a), f (b))) | (a, b) ∈ ΓX } ∪ {((g(c), g(d)), P gc,d , (c, d)) | (c, d) ∈ ΓY } The diagrams defining the directed homotopy equivalence imply that R is hereditary with respect to extension maps. Unfortunately, unlike Dwyer-Kan equivalences, or classical homotopy equivalences, our dihomotopy equivalences do not have the 2-out-of-3 property. We only have preservation by composition, as shown in next Lemma, but also, for surjective dihomotopy equivalences, two thirds of the 2-out-of-3 property, as shown in Proposition 1. Lemma 4. Compositions of dihomotopy equivalences are dihomotopy equivalences. Proof. Suppose f1 : X → Y and f2 : Y → Z are dihomotopy equivalences. We have quadruples (f1 , g1 , F1 , G1 ), (f2 , g2 , F2 , G2 ) as in Definition 3. Now, it is obvious to see that its composite (f2 ◦ f1 , g1 ◦ g2 , F1 ◦ F2 , G2 ◦ G1 ) is a dihomotopy equivalence from X to Z. The problem for getting a general 2-out-of-3 property on dihomotopy equivalences can be exemplified as follows. Suppose that f 1 is a dihomotopy equivalence and that f 2 ◦f 1 is a dihomotopy equivalence. In particular, by 2-out-of-3 on classical homotopy equivalence, we know that f 1 is a homotopy equivalence, with homotopy inverse g 1 . Consider now the following composites, for all (a, b) ∈ PX P f 1 a,b P X(a,b) P Y (f 1 (a),f 1 (b)) P ff21 (a),f 1 (b) P Z(f 2 ◦f 1 (a),f 2 ◦f 1 (b)) 1 P f 2 ◦fa,b Because of 2-out-of-3 for classical homotopy equivalences, and as P f 2 ◦ f 1 and P f 1 in the diagram above are homotopy equivalences, P ff21 (a),f 1 (b) is a homotopy equivalence. But we need it to be a homotopy equivalence for all (c, d) ∈ PY , not only the ones in the image of f 1 . Similarly to Dwyer-Kan equivalences (see e.g. [2]), it is reasonable to add in the definition of dihomotopy equivalences the assumption that f is surjective on points. Then we have Proposition 1. If f 1 : X → Y and f 2 : Y → Z are such that f 1 and f 2 ◦ f 1 are surjective dihomotopy equivalences, then f 2 is a surjective dihomotopy equivalence. Proof. In that case, we get that P f 2 induces homotopy equivalences from all P Y (c, d) (call the 21 1 homotopy inverse F 2 ). Now, notice that, denoting by Fa,b the homotopy inverse of P f 2 ◦ fa,b = 2 1 1 1 2r 1 21 P f ◦ P fa,b , and by Fa,b the homotopy inverse of P fa,b , F = P fa,b ◦ Fa,b is a right homotopy inverse to P ff21 (a),f 1 (b) , because 1 21 P ff21 (a),f 1 (b) ◦ (P fa,b ◦ Fa,b ) 1 21 = (P ff21 (a),f 1 (b) ◦ P fa,b ) ◦ Fa,b 2 1 21 = (P (f ◦ f )a,b ) ◦ Fa,b ∼ IdP Zf 2 ◦f 1 (a),f 2 ◦f 1 (b) 7 2r 2 2 We therefore have a right homotopy inverse Fc,d and a homotopy inverse Fc,d of P fc,d . So, 2r Fc,d and ∼ = ∼ 2 2 2r (Fc,d ◦ P fc,d ) ◦ Fc,d 2 2 2r Fc,d ◦ (P fc,d ◦ Fc,d ) 2 Fc,d 2r 2 Fc,d ◦ P fc,d 2 2 ∼ Fc,d ◦ P fc,d ∼ IdP Y (c,d) 2r 2 1 21 . Moreover, as a composition of maps P fc,d with Fc,d therefore Fc,d is a homotopy inverse of P fc,d which are continuous in (c, d) ∈ PY , it is a continuously bigraded map on (c, d). We also have to look at the map induced by g 2 . In the following diagram P g 1 g2 (e),g2 (f ) P X(g 1 ◦g 2 (e),g 1 ◦g 2 (f )) P Y (g 2 (e),g 2 (f )) 2 P ge,f P Z(e,f ) 2 P g 1 ◦ge,f by 2-out-of-3 for classical homotopy equivalences, without any other assumptions, we get that 2 P ge,f is a homotopy equivalence (with homotopy inverse G2e,f ) for all path spaces P Z(e, f ). We 1 2 2l 12 1 note as above that, denoting by G12 e,f the homotopy inverse of P g ◦ge,f , Ge,f = Ge,f ◦P gg 2 (e),g 2 (f ) is 2 2l 2 2l a left homotopy inverse of P ge,f . As before, we easily get that Ge,f ∼ Ge,f and Ge,f is a homotopy 2 inverse of P ge,f which forms a continuously bigraded map. Now we have to check the extension diagrams of Definition 3. Let (α, β) ∈ PY with α ∈ P Y (c0 , c), β ∈ P Y (d, d0 ). As f 1 is surjective, c = f (a) and d = f (b) for some (a, b) ∈ PX. As f 1 is a dihomotopy equivalence, we have the existence of (α0 , β 0 ) ∈ PX as in the diagram below. Now, we use the fact that f 2 ◦ f 1 is a dihomotopy equivalence, and we get a map (α, β) ∈ PZ such that the following diagram commutes up to homotopy 21 Fc,d 2 Fc,d 1 P fa,b P X(a,b) P Y (c,d) P X(α0 ,β 0 ) P X(a0 ,b0 ) P Y (γ,δ) P fa10 ,b0 P Y (c0 ,d0 ) Fc20 ,d0 P Z(f 2 (c),f 2 (d)) P Z(α,β) P Z(f 2 (c0 ),f 2 (d0 )) 21 Fc,d 2 1 21 In the diagram above, Fc,d (represented as a dashed arrow) is actually the composite P fa,b ◦Fc,d 2 1 21 as shown before ; similarly, Fc0 ,d0 is the composite P fa0 ,b0 ◦ Fc0 ,d0 . Therefore we have the extension 2 property needed for Fc,d . The five other diagrams can be proven in a similar manner, by pulling back or pushing forward the existence of maps using the diagrams for P f 1 , P g 1 , F 1 , G1 (resp. P f 2 ◦ f 1 , P g 1 ◦ g 2 , F 21 and G12 ). Remark : Similarly, if we have a surjective f 2 : Y → Z that is a dihomotopy equivalence, 1 and f : X → Y such that f 2 ◦ f 1 is a surjective dihomotopy equivalence, first, there is no 1 reason why f 1 should be surjective. Similarly as with g 2 before, we can prove that P fa,b forms a continuous bigraded family of homotopy equivalences with a continuous bigraded family of homotopy inverses. The problem is with P g 1 which we can only prove to have a continuous family of homotopy inverses on spaces P Y (g 2 (e), g 2 (f )). The only result we can have in general is dual 8 to the one of Proposition 1. If f 2 : X → Y and f 2 : Y → Z are such that f 2 and f 2 ◦ f 1 are dihomotopy equivalences with surjective homotopy inverses, then f 2 is a dihomotopy equivalence with surjective homotopy inverse. Example 1. The unit segment is dicontractible. The wedge of two segments is dicontractible (which makes shows the version of dicontractibility discussed here to be notably different from that used in the framework of [8]). Note that in view of applications to directed topological complexity, this is coherent with the fact that directed topological complexity should be invariant under directed homotopy equivalence. For any two pair of points in Γ of directed segment or of a wedge of two segments, there is indeed a continuous map depending on this pair of points to the unique dipath going from one to the other. Example 2. The Swiss flag is not directed homotopy equivalent to the hollow square. This can be seen already using natural homology, that distinguishs the two, see e.g. [5]. More precisely, we consider the following d-spaces (SF on the left, HS on the right), coming from PV processes, which are subspaces of R2 and whose points are within the white part in the square (the grey part represents the forbidden states of the program) and whose dipaths are non decreasing paths for the componentwise ordering on R2 . They are homotopy equivalent using the two maps (and even dmaps), f from SF to HS and g from HS to SF , depicted below (f is the map on the left) : The points in light grey are the points which do not belong to the image of those maps. The problem is that those two programs are quite different: SF has a dead-lock in α and inaccessible states, while HC does not. Topologically, they do not have the same (directed) components in the sense of [11]. It is easy to see that although P f and P g are homotopy equivalences as well, (f, g) does not induce a dihomotopy equivalence in our sense. Take a point α in the lower convexity of the Swiss flag, and consider the constant dipath on f (α) in HS. P f maps the constant path on α onto the constant path on f (α) but we can extend in P (HS)f this constant path to paths v from f (α) to the image by f of the upper right point, which is again the upper right point in HS. This extension makes the corresponding path space within HS homotopy equivalent to two points, whereas there are no path from α to the right upper point in SF . In natural homology, SF and HS do not have bisimilar natural homologies since, considering the pair of points (α, α) in SF × SF , all extensions of this pair of points will give 0th homology of there corresponding path space equal to Z, whereas there are extensions of any pair of points (β, β) in HS which give 0th homology of there corresponding path space equivalent to Z2 . 1 1 1 γ α 0 0 0 Figure 1: Naive equivalence between the Fahrenberg’s matchbox M and its upper face T 9 Example 3. Consider Figure 1 : this depicts a naive dihomotopy equivalence between M and to its upper face (so to a point). More precisely, the dmap f , which maps any point of M to the point of T just above of it, is a naive dihomotopy equivalence, whose inverse modulo dihomotopy is the embedding g of T into M . Hence, f ◦ g = idT and a dihomotopy from idM to g ◦ f is depicted in Figure 1. Note that this naive dihomotopy equivalence, (f, g), does not induce a dihomotopy equivalence in our sense. As a matter of fact, consider points 0 and α : P X(0, α) is homotopy equivalent to two points whereas P X(f (0), f (α)) is homotopy equivalent to a point. 4 Dicontractibility and the dipath space map Definition 6. Let X be a d-space. X is said to be weakly dicontractible if its natural homotopy (equivalently, natural homology [5], by directed Hurewicz, all up to bisimulation) is the natural system - which we will denote by 11 - on 1 (the final object in Cat) with value Z on the object, in dimension 0 and 0 in higher dimensions. The following is a direct consequence of Lemma 3 but we give below a simple and direct proof of it : Lemma 5. Let X be a dicontractible d-space. Then X is weakly dicontractible in the sense of Definition 6. Proof. Suppose X is dicontractible. Therefore, by Definition 4, we have a continuous map R : {∗} → P X, continuously bigraded, which are are homotopy equivalences. All extension maps (γ, δ) induce identities modulo homotopy, trivially. Now, these diagrams of spaces induce, in homology, a diagram which has Z as value on objects for dimension 0, and 0 for higher dimensions. It is a simple exercise to see that such diagrams are bisimilar to the one point diagram which has only Z as value in dimension 0, and 0 in higher dimension. This shows weak dicontractibility. Theorem 1. Suppose X is a contractible d-space. Then, the dipath space map has a continuous section if and only if X is dicontractible. Proof. As X is contractible, we have f : X → {a0 } (the constant map) and g : {a0 } → X (the inclusion) which form a (classical) homotopy equivalence. Trivially, f and g are dmaps. Suppose that we have a continuous section s of χ. There is an obvious inclusion map i : {s(a, b)} → P X(a, b), which is continuously bigraded in a and b. Define R to be that map. Now the constant map r : P X(a, b) → {s(a, b)} is a retraction map for i. We define H : P X × [0, 1] (u, t) →    v(x) = → v s.t. v(x) =   v(x) = PX if 0 ≤ x ≤ u(x) s u u(x)  t 2 ,u 1 −   x− 2t  t 2 1−t t 2 if 2t ≤ x ≤ 1 − 2t if 1 − 2t ≤ x ≤ 1 (H(u, t) is extended by continuity for t = 1 as being equal to u) As concatenation and evaluation are continuous and as s is continuous in both arguments H is continuous in u ∈ P X and in t. H induces families Ha,b : P X(a, b) × [0, 1] → P X(a, b), and because H is continuous in u in the compact-open topology, this family Ha,b is continuous in a and b in X. Finally, we note that H(u, 1) = u and H(u, 0) = s(u(0), u(1)) = i ◦ r(u). Hence r is a deformation retraction and P X(a, b) is homotopy equivalent to {s(a, b)} and has the homotopy type we expect (is contractible for all a and b), meaning that R is a continously bigraded homotopy equivalence. The homotopy Ha,b shows also that any extension map from P X(a0 , b0 ) to P X(a, b) is homotopic to the identity4 . Therefore, X is dicontractible. Conversely, suppose X is dicontractible. We have in particular a continuous family (in a, b in X) of maps Ra,b : {∗} → P X(a, b). Define s(a, b) = Ra,b (∗), this is a continuous section of χ. 4 Note the link with the fact that s(a, a0 ) and s(b0 , b) are Yoneda invertible. 10 Remark : Sometimes, we do not know right away, in the theorem above, that X is contractible. But instead, there is an initial state in X, i.e. a state a0 from which every point of X is reachable. Suppose then that, as in the Theorem above, χ has a continuous section s : ΓX → P X. Consider s0 (a, b) = s−1 (a0 , a) ∗ s(a0 , b) the concatenation of the inverse dipath, going from a to a0 , with the dipath going from a0 to b : this is a continuous path from a to b for all a, b in X. Now, s0 is obviously continuous since concatenation, and s, are. By a classical theorem [9], this implies that X is contractible and the rest of the theorem holds. 5 Directed topological complexity −→ Definition 7. The directed topological complexity T C(X) of a d-space X (which is also an Euclidean Neighborhood retracts, or ENR) is the minimum number n (or ∞ if no such n exists) such that ΓX can be partitioned into n ENRs 5 F1 , . . . , Fn such that there exists a map s : ΓX → P X (not necessarily continuous, of course!) with : • χ ◦ s = Id (s is a, non-necessarily continuous, section of χ) • s|Fi : Fi → P X is continuous Example 4. Consider the PV program P aV a | P aV a (a is a mutex), the component category (see e.g. [11]) has 4 regions C1 , C2 , C3 and C4 , with a unique morphism from C1 to C2 , C1 to −→ C3 , C2 to C4 and C3 to C4 (but two from C1 to C4 ). We have T C(X) = 2 since ΓX can be partitioned into {(x, y) | x ∈ Ci , y ∈ Cj , (i, j) 6= (1, 4)} and C1 × C4 . More generally speaking, the lifting property of components, Proposition 7 of [10], in the case when we have spaces X with components categories (such as with the cubical complexes of [8]) implies that we can examine the dihomotopy type of X through the dihomotopy equivalent space, quotient of X by its components. Example 5. Consider now X to be a cube minus an inner cube, seen as a partially ordered space with componentwise ordering, and as such, as a d-space. Note that it is dihomotopy equivalent to a hollow cube, hence we will examine its directed topological complexity through this diretract. Up to homotopy, this is S 2 (seen as a sphere with unit radius centered in 0, in R3 ), for which we know (e.g. [9]) that T C(X) = 3. A simple partition which shows that it is at most 3 is • F1 = {(x, y) | x 6= −y} • F2 = {(x, −x) | x 6= x0 } • F3 = {(x0 , −x0 )} where x0 is some point of S 2 that we can choose, for which we have a smooth vector field v on S 2 , which is non zero everywhere except at x0 (such a point must exist by general theorems, and we can find a vector field which will only be zero at one point). On F1 , we take as section to the classical path space fibration, the Euclidean geodesic path from x to y. On F2 , we take the path from x to −x which follows the vector field v. Finally, we take any path from x0 to −x0 . This partition can be used to find a upper bound for the directed topological complexity of the hollow cube (or equivalently, the cube minus an inner cube). Note that in general, the two notions are incomparable. Because if X × X = ∪ki=1 Fi (k is T C(X)) with s|Fi continuous section of the path space fibration, then we do not know if on each Fi we can find a continuous section −→ of the dipath space map. Conversely, if ΓX = ∪li=1 Fi (l is T C(X)), each s|Fi provides us with a continuous section, locally to Fi , of the dipath space map and of the path space fibration, but unfortunately, we can only cover that way ΓX ⊆ X × X. These two notions are only trivially comparable when the set of directed paths is equal to the set of all continuous paths, in which case the directed topological complexity is equal to the classical topological complexity. 5 This could be replaced as in the classical case, by asking for a covering by open sets, or by a covering by closed sets. 11 Still, in some cases, such as in the case of the hollow cube, we can carefully examine the partition given by the classical topological complexity, to, in general, find an upper bound to the directed topological complexity. Here, we can choose x0 to be the final point of X (the hollow cube), and strip down F1 , F2 and F3 to be the part of the previous partition, intersected with ΓX . On −→ each of these three sets we have a trivial section to the dipath space map. Hence T C(X) ≤ 3. − → Martin Raussen observed6 that in fact, T C(X) = 2 which shows an essential difference to the classical case. Remark : Consider the universal covering of an NPC cubical complex (as in [1, 12]). It is −→ CAT(0). We conjecture that T C(X) is the number of maximal configurations of the corresponding prime event structure (see [4, 3, 17, 1], or equivalently, the number of levels in the universal dicovering (see e.g. [7]), or the number of maximal dipaths starting in the initial point, up to dihomotopy). −→ −→ Lemma 6. Let X and Y be two dihomotopy equivalent spaces. Then T C(X) = T C(Y ). Proof. As X and Y are dihomotopy equivalent, we have f : X → Y and g : Y → X dmaps, which form a homotopy equivalence between X and Y . We also get Gc,d : P X(g(c), g(d)) → P Y (c, d) which is inverse modulo homotopy to P gc,d , and varies continuously according to c, d ; and Fa,b : P X(a, b) → P Y (f (a), f (b)) which is inverse modulo homotopy to P fa,b , varying continuously according to a and b. We note that f and g induce continuous maps f ∗ : ΓX → ΓY and g ∗ : ΓY → ΓX (ΓX and ΓY inherit the product topology of X, resp. Y ). −→ Suppose first k = T C(X). Thus we can write ΓX = F1X ∪ . . . ∪ FkX such that we have a map s : ΓX → P X with χ ◦ s = Id and s|FiX is continuous. Define FiY = {u ∈ ΓY | g ∗ (u) ∈ FiX } (which is an ENR - or open if we choose the alternate definition - as FiX is ENR and g ∗ is continuous) and define t|FiY (u) = Gu ◦ s|FiX ◦ g ∗ (u) ∈ P Y (u) for all u ∈ FiY ⊆ ΓY . This is a continuous map in u since s|FiX is continuous, g ∗ is continuous, −→ −→ and G is continuously bigraded. Therefore T C(Y ) ≤ T C(X). −→ Conversely, suppose l : T C(Y ), ΓY = F1Y ∪ . . . ∪ FlY such that we have a map t : ΓY → P Y with χ ◦ t = Id and t|FiY is continuous. Now define FiX = {u ∈ ΓX | f ∗ (u) ∈ FiY } (which is an ENR - or an open set if we choose the alternate definition - as FiY is ENR and f ∗ is continous) and define s|FiX (u) = Fu ◦ t|FiY ◦ f ∗ (u) ∈ P X(u) for all u ∈ FiX ⊆ ΓX . This is a continuous map in u since t|FiY is continuous, f ∗ is continuous, and F is continuously bigraded. Therefore −→ −→ −→ −→ T C(X) ≤ T C(Y ). Hence we conclude that T C(X) = T C(Y ) and directed topological complexity is an invariant of dihomotopy equivalence. Remark : The proof above is enlightening in that it uses all homotopy equivalences generated by the data that f is a dihomotopy equivalence. We would have had only a Dwyer-Kan type of equivalence, we would not have had that directed topological equivalence is a dihomotopy invariant. 6 Conclusion There are numerous developments to this, in studying directed topological complexity with a view to control theory, but also on the more fundamental level of the structure of dihomotopy equivalences. There is for instance an interesting notion of weak-equivalence, coming out of our dihomotopy equivalence (same conditions, but inducing isomorphisms of the fundamental groups of the different path spaces, with similar extension conditions). This weak-equivalence should have good properties 6 Private communication during the Hausdorff Institute “Applied Computational Algebraic Topology” semester, on the 14th September 2017. 12 with respect to our dihomotopy equivalence, have the 2-out-of-6 property, and a refined form of natural homology should come out as a derived functor in that framework. This is left for another venue. Acknowledgments We thank the participants of the Hausdorff Institute Seminar Institute “Applied Computational Algebraic Topology” for useful comments on this work, and most particularly Martin Raussen, Lisbeth Fajstrup and Samuel Mimram. We thank Tim Porter for his careful reading of a previous version of this report, and his comments and ideas. References [1] Federico Ardila, Megan Owen, and Seth Sullivant. Geodesics in CAT(0) cubical complexes. CoRR, abs/1101.2428, 2011. [2] J. Bergner. A model category structure on the category of simplicial categories. Trans. Amer. Math. Soc., 2004. [3] Victor Chepoi. Graphs of some cat(0) complexes. 24(2):125–179, 2000. Advances in Applied Mathematics, [4] Victor Chepoi. Nice labeling problem for event structures: A counterexample. SIAM J. Comput., 41(4):715–727, 2012. [5] Jérémy Dubut, Eric Goubault, and Jean Goubault-Larrecq. Natural homology. In Automata, Languages, and Programming - 42nd International Colloquium, ICALP 2015, Kyoto, Japan, July 6-10, 2015, Proceedings, Part II, pages 171–183, 2015. [6] Jérémy Dubut, Éric Goubault, and Jean Goubault-Larrecq. Directed homology theories and Eilenberg-Steenrod axioms. Applied Categorical Structures, pages 1–33, 2016. [7] Lisbeth Fajstrup. Dicovering spaces. Algebraic topological methods in computer science (Stanford, CA, 2001). Homology Homotopy Appl. 5 (2003), no. 2, 1-17. [8] Jérémy Dubut, Eric Goubault, and Jean Goubault-Larrecq. The directed homotopy hypothesis. In 25th EACSL Annual Conference on Computer Science Logic, CSL 2016, August 29 September 1, 2016, Marseille, France, pages 9:1–9:16, 2016. [9] M. Farber. Invitation to Topological Robotics. Zurich lectures in advanced mathematics. European Mathematical Society, 2008. [10] Lisbeth Fajstrup, Eric Goubault, Emmanuel Haucourt, Martin Raussen. Components of the Fundamental Category. Applied Categorical Structures, 2004. [11] Eric Goubault and Emmanuel Haucourt. Components of the Fundamental Category II. Applied Categorical Structures, 15(4):387–414, 2007. [12] Eric Goubault and Samuel Mimram. Directed homotopy in non-positively curved spaces, 2016. [13] Marco Grandis. Directed Algebraic Topology, Models of non-reversible worlds. Cambridge University Press, 2009. [14] Marian Mrozek. Conley-morse-forman theory for combinatorial multivector fields on lefschetz complexes. arXiv preprint arXiv:1506.00018, 2015. [15] T. Porter. Enriched categories and models for spaces of evolving states. TCS, 405:88–100, 2008. 13 [16] T. Porter. Steps towards a ’directed homotopy hypothesis’. (∞, 1)-categories, directed spaces and perhaps rewriting. In HCR, 2015. URL: www.lix.polytechnique.fr/Labo/Samuel. Mimram/docs/hcr/porter.pdf. [17] Vladimiro Sassone, Mogens Nielsen, and Glynn Winskel. Models for concurrency: Towards a classification. Theor. Comput. Sci., 170(1-2):297–348, 1996. 14
3cs.SY
A Moving Target Approach for Identifying Malicious Sensors in Control Systems arXiv:1609.09043v3 [cs.SY] 13 Mar 2017 Sean Weerakkody Abstract— In this paper, we consider the problem of attack identification in cyber-physical systems (CPS). Attack identification is often critical for the recovery and performance of a CPS that is targeted by malicious entities, allowing defenders to construct algorithms which bypass harmful nodes. Previous work has characterized limitations in the perfect identification of adversarial attacks on deterministic LTI systems. For instance, a system must remain observable after removing any 2q sensors to only identify q attacks. However, the ability for an attacker to create an unidentifiable attack requires knowledge of the system model. In this paper, we aim to limit the adversary’s knowledge of the system model with the goal of accurately identifying all sensor attacks. Such a scheme will allow systems to withstand larger attacks or system operators to allocate fewer sensing devices to a control system while maintaining security. We explore how changing the dynamics of the system as a function of time allows us to actively identify malicious/faulty sensors in a control system. We discuss the design of time varying system matrices to meet this goal and evaluate performance in deterministic and stochastic systems. I. I NTRODUCTION Cyber-physical system (CPS) security has become a widely studied topic, both within industry and the research community. Indeed, current and next generation cyberphysical systems will pervade our critical infrastructures including the electricity grid, water distribution systems, waste management, smart buildings, and health care, providing ample motivation for attackers to target CPS. Moreover, CPS will consist of many heterogeneous systems and components, thus providing adversaries an opportunity for attacks [1]. There have been several powerful attacks against CPS including Stuxnet [2] and the Maroochy Shire incident [3]. Consequently, significant research effort has been geared towards responding to attacks on CPS, with a focus on integrity attacks where an adversary alters a subset of control inputs and sensor measurements. Previous research has characterized stealthy attack scenarios including zero dynamic attacks [4], [5], false data injection attacks [6], [7], covert attacks [8], and replay attacks [9], where an adversary adversely affects a system without being detected. Moreover, countermeasures have been developed to detect stealthy attacks [10]–[14]. S Weerakkody, and B. Sinopoli are with the Department of Electrical and Computer Engineering, Carnegie Mellon University, Pittsburgh, PA, USA 15213. Email: [email protected], [email protected]. S. Weerakkody is supported in part by the Department of Defense (DoD) through the National Defense Science & Engineering Graduate Fellowship (NDSEG) Program. The work by S. Weerakkody and B. Sinopoli is supported in part by the Department of Energy under Award Number de-oe0000779 and by the National Science Foundation under Award Number 1646526. Bruno Sinopoli While detection allows a defender to determine the presence of an adversary, it does not prescribe a solution to maintain system performance. Thus, we aim to identify malicious entities in the network so specialized and optimal solutions can be developed to counter their presence. Previous work has considered the problem of identification in CPS. For instance, Pasqualetti et al. [5] define the notion attack identifiability, provide algebraic conditions to characterize when a system can identify q attacks on sensors and actuators, and propose identification filters to carry out this process. Also, Sundaram et al. [15] design an intrusion detection system in a wireless control network to identify malicious behavior at sensor nodes and provide graphical conditions to determine when identification is possible. Attack identification is closely tied to robust estimation in the presence of sensor attacks [16]–[22]. Qualitatively, by identifying sensor attacks, a defender can perform state estimation by disregarding malicious sensors and carrying out estimation schemes on trusted sensors. In fact, in deterministic systems, the ability to perform perfect state estimation in the presence of sensor attacks is equivalent to being able to perform perfect identification [16]. The problem of robust state estimation in deterministic systems is considered in [16]–[19]. For instance, in [16] (and [17]) the authors characterize the number of attacked sensors (and inputs) which can be tolerated while performing state estimation and propose a decoding algorithm to recover the state. Next, Shoukry et al. [19] propose event based algorithms to improve the efficiency of robust state estimation. Additionally, Chong et al. [18] develop schemes for robust estimation in deterministic continuous LTI systems while formulating a notion of observability under attack. The problem of robust estimation has also been considered in stochastic and uncertain systems [20]–[22]. For instance, Mishra et al. [20] propose robust estimation schemes in the presence of Gaussian noise and characterize limitations in estimation performance in the presence of attacks. Nakahira et al. [21] consider robust estimation with bounded noise, proposing a stable estimator in the presence of q attacks provided that the system remains detectable after removing any 2q sensors. Finally, Pajic et al. [22] demonstrate the robustness of estimation schemes in the presence of attacks even when there is uncertainty in the system model. From previous work [5], [17]–[19] it can be shown that there are fundamental limitations in the defender’s ability to perform identification. For instance, given the presence of an intelligent adversary, perfect identification of q attacks can only be performed if the system is observable after removing any 2q sensors. However, such intelligent adversaries require knowledge of the system model. By limiting the attacker’s knowledge of the model, we hope to identify all sensor attacks. This will allow us to perform perfect estimation in a deterministic system under q attacks if the system is observable after removing any q sensors. To meet this objective, we propose changing the dynamics of the system model in a time varying fashion, unknown to the adversary. A similar scheme is considered for the detection of integrity attacks in [23]. The time varying dynamics act like a moving target, preventing an information constrained adversary from developing stealthy unidentifiable attacks. In this paper, • We propose design considerations for the moving target, which allow us to perfectly identify a class of nonzero sensor attacks in deterministic systems. • We show the moving target allows us to detect destabilizing sensor attacks in stochastic systems. • We construct an observer which allows us to identify sensor attacks that cause unbounded estimation error. The rest of the paper is summarized as follows. In section II, we introduce the problem and results on identification. In section III, we propose a moving target based formulation to prevent unidentifiable attacks. Next, in section IV, we consider deterministic identification and propose design considerations for the moving target. After, in section V, we consider the moving target approach for detecting false data injection attacks. In section VI, we construct a robust estimator which can only be destabilized by identifiable sensor attacks. Section VIII concludes the paper. Notation: Unless otherwise specified, the following notation is used. xt1 :t2 refers to the set {xt1 , xt1 +1 , · · · , xt2 }. Xuv is the entry at row u and column v of matrix X. X i is the ith row of X. If V is a set of indices, X V are the rows of X indexed by V . 1 is the indicator function. P(·) refers to the power set. k · k is the l2 norm. {ak } defines a sequence. II. P ROBLEM S ETUP AND P REVIOUS R ESULTS In this section we introduce our system model. To begin we model our system as a discrete time deterministic control system under sensor attacks. Though this initial approach is simple, we consider the stochastic case later in the paper. The dynamics are given by xk+1 = Axk + B(uk (y0:k )), yk = Cxk + Ddak . (1) where xk ∈ Rn is the state at time k, uk (y0:k ) ∈ Rp is the control input, and yk ∈ Rm are the sensor outputs. The sensor outputs, yk , consist of m scalar sensor outputs, defined by the set S = {1, 2, · · · , m}. The adversary performs sensor integrity attack on an ordered set K = {s1 , s2 , · · · , s|K| } ⊆ S using additive inputs dak ∈ R|K| , starting at time k = 0. Consequently, we define D entrywise as Duv = 1u=si ,v=i . (2) Note that D is fully determined by the set K. Implicitly, we assume that the set of sensors which the adversary targets is constant due to (ideally) the inherent difficulty in the task of hijacking sensors. When performing an integrity attack, the adversary’s goal is to adversely affect the physical system by preventing proper feedback. In particular, a defender with incorrect sensor measurements may not be able to perform adequate state estimation and thus will not be able to apply appropriate corrective measures to the system. We assume that the defender knows the system dynamics M = {A, B, C} as well as the input and output histories given by u0:k and y0:k , but is unaware of the set K. Furthermore, we assume that in the deterministic setup, the defender is unaware of the initial state x0 . Thus, the defender’s information Ik at time k is given by Ik = {M, u0:k−1 , y0:k }. (3) Remark 1: In the deterministic case, we explore attacks where the defender has no knowledge of the initial state. While this is certainly not realistic, the attack vectors developed in this scenario can still remain stealthy in a practical stochastic setting if the adversary carefully ensures that his initial attack inputs remain hidden by the noise of the system. From a defender’s perspective it is important to identify trusted sensor nodes. Estimation and control algorithms can then be tuned to ignore attacked nodes. We note that the problem of identifying malicious nodes is independent of the control input, since the defender is aware of the model and input history. Thus, in the ensuing discussions we will disregard the control input so that xk+1 = Axk , yk = Cxk + Ddak . (4) A. Previous Results in Identification Previous work in CPS security has attempted to address the problem of identifiability. We now revisit major results when trying to identify malicious adversaries. To begin, let y(x0 , D(K)dak , k) be the output signal associated with (4) at time k with initial state x0 and attack input Ddak on sensors K. We define an attack monitor Ψ : y0:∞ → P({1, · · · , m}) with the property that Ψ = K if and only if K is the smallest set such that for all k ≥ 0 we have yk = y(x∗0 , D(K)dak , k) for some initial state x∗0 . Definition 2: Consider an attack {D(K)dak } on the sensors in K, where we assume each sensor in K is attacked at least once. Then {D(K)dak } is unidentifiable if Ψ(y0:∞ ) 6= K. Moreover, the set K is unidentifiable if there exists an unidentifiable attack [5]. Based on this definition we state an attack is unidentifiable if there exists an attack on a different subset of sensors with size less than or equal to |K|, which yields the same sensor outputs. As a result, we have the following [5]. Theorem 3: An attack on sensors K1 is unidentifiable if and only if there exists x10 and x20 and set K2 such that y(x10 , D(K1 )dak , k) = y(x20 , D(K2 )d¯ak , k), ∀ k. (5) where |K2 | ≤ |K1 | and K2 6= K1 . In this setup, it is important to include the condition that |K2 | ≤ |K1 |. Without this restriction, an attacker can generate an unidentifiable attack regardless of the set K. In particular, suppose D(K)dak = C K Ak ∆x0 . Then, y(x0 , D(K)dak , k) = y(x0 + ∆x0 , D(K c )d¯ak , k), ∀ k. (6) where D(K c )d¯ak = −C K Ak ∆x0 . We observe that there exists an attack on sensors K equivalent to an alternative attack on the complement set K c . In such a scenario, it is easy to see a defender can identify attacks on no more than half the sensors. In fact, we have the following result [5]. Theorem 4: Attack set K1 is unidentifiable if and only if     x   λI − A 0 0 d1  = 0 , (7) C D(K1 ) D(K2 ) 0 d2 c where K2 satisfies |K2 | ≤ |K1 | and K2 6= K1 , λ ∈ C, x 6= 0 ∈ Cn and d1 ∈ C|K1 | and d2 ∈ C|K2 | . Corollary 5: [16] A system can identify attacks on up to q arbitrary sensors if and only if (A, C) is 2q sparse observable. That is, (A, C) remains observable if we remove any 2q sensors. As a consequence of the previous results, the defender must allocate a large number of sensors to withstand a large number of attacks or alternatively design systems, which are only robust to a fewer attacks. III. M OVING TARGET A PPROACH FOR I DENTIFICATION In the previous section we demonstrated that there exist limitations on the number of attacks a defender can potentially identify. Specifically, we saw that to identify all attacks of size q, the system must be 2q sparse observable. This can result in expenditures to add more sensing in order to withstand more attacks or sacrificing security in order to use fewer components. However, in this section we argue that generating unidentifiable attacks requires knowledge of the model. By limiting this knowledge, we hope to prevent such attacks. To begin we define the following. Definition 6: A nonzero attack on sensor s is unambiguously identifiable at time t if there is no x∗0 ∈ Rn satisfying yks = y s (x∗0 , 0, k) for 0 ≤ k ≤ t. An attack on sensor s is unambiguously identifiable if it is unambiguously identifiable for all t. The notion of unambiguous identifiability characterizes when the defender can be certain that sensor s is faulty or under attack. This scenario occurs only if there exists no initial state which produces the output sequence at y s . We envision designing a system that forces the attacker to generate unambiguously identifiable attacks on all sensors which he targets. Consequently, we can identify misbehaving sensors. Thus, instead of requiring our system to be 2q sparse observable to perform perfect estimation with q attacks or 2q detectable to perform stable estimation [21], forcing an attacker to generate unambiguously identifiable attacks will allow the defender to perform stable estimation when the system is only q detectable (detectable after removing any q sensors). This allows the system to withstand more powerful attacks or use fewer sensing devices while maintaining the same level of security. We now characterize attacks which are not unambiguously identifiable. Theorem 7: An attack on sensor s is not unambiguously identifiable at time t if and only if there exists an x∗0 such that Ds dak = C s Ak x∗0 for all 0 ≤ k ≤ t and C s Ak x∗0 6= 0 for some time 0 ≤ k ≤ t. Proof: Suppose Ds dak = C s Ak x∗0 for time 0 ≤ k ≤ t. Assume this attack is nonzero. Then, yks = y s (x0 + x∗0 , 0, k). Suppose instead that there is no x∗0 such that Ds dak 6= C s Ak x∗0 for 0 ≤ k ≤ t . Then there is no x̄0 such that yki + Ds dak = C s Ak x̄0 . Since y s (x0 , 0, k) = C s Ak x0 , the result immediately follows. As a result, to prevent attacks on sensor i from being unambiguously identifiable at time k, an adversary must s insert attacks which lie in the image of Ok+1 given by   T s (8) Ok+1 = C s T (C s A)T · · · (C s Ak )T . To insert such attacks, the adversary likely has to be aware of both the matrix A and the matrix C s . In the sequel, we aim to minimize this knowledge to prevent an attacker from generating unidentifiable attacks. A. A moving target approach Ideally, we would like to simply assume the adversary has no knowledge of (A, C) and consequently will likely always be unambiguously identifiable. However, in practice, the processes associated with the physical plant may be well known or previously public so that the attacker is aware of (A, C). Alternatively, the defender can change parameters of the system to ensure a knowledgeable adversary is still thwarted. Specifically, we propose changing the system matrix A and C in a time varying and unpredictable fashion from the adversary’s point of view so that xk+1 = Ak xk , yk = Ck xk + Ddak . (9) We assume that (Ak , Ck ) ∈ Γ = {(A(1), C(1)), · · · , (A(l), C(l))}. Theorem 8: An attack on sensor s in (9) is not unambiguously identifiable at time t if and only if there exists an x∗0 Qk−1 s a s such that D dk = Ck ( j=0 Aj )x∗0 for all time 0 ≤ k ≤ t Qk−1 and Cks ( j=0 Aj )x∗0 6= 0 for some time 0 ≤ k ≤ t. Proof: The proof is similar to that of Theorem 7. Changing the system matrices as a function of time allows the system to act like a moving target. In particular, even if an attacker is aware of the existing configurations of the system, defined by Γ, he will likely be forced to generate unambiguously identifiable attacks since he is not aware of the sequence of system matrices. Moreover, since the system matrices keep changing, it is unlikely the attacker can remain unidentifiable by pure chance. Remark 9: The matrices (Ak , Ck ) can be changed randomly using a cryptographically secure pseudo random number generator where the random seed is known both by the defender and the plant, but is unavailable to the adversary. From a security perspective, the seed would form the root of trust. The set Γ can be obtained by leveraging or introducing degrees of freedom in the dynamics and sensing in our control system. While the defender likely would have to change his control strategy to account for the time varying dynamics, in this work, we will ignore such changes. Given the proposed setup, we are now ready to define the attacker’s information and an admissible attacker strategy. Attacker Information 1) The adversary has no knowledge of either the input sequence u0:k or the true output sequence. 2) Ika = {Γ, Dda0:k−1 , f ({(Ak , Ck )})}. If the adversary can observe the output sequence in a zero input deterministic setting, he can multiply the true outputs by some constant factor to avoid generating unambiguously identifiable inputs. A realistic adversary may use physical attacks to bias sensors without reading their outputs. Future work will examine relaxing this assumption. The control inputs are also secret so that the attacker will be unable to leverage the input process to gain information about the system model. However, we assume Γ is known as well as the sequence of attack inputs. Also, the probability distribution of the sequence of system matrices, f ({(Ak , Ck )}), is public. Definition 10: An admissible attack policy is a sequence of deterministic mappings Ωk : Ika → Im(D(K)) such that Ddak = Ωk (Ika ). Here, we assume the attacker can only leverage his information to construct a stealthy attack input. Consequently, while there may exist attacks that bypass identification, in order to be admissible, they must leverage the attacker’s knowledge and can not be a function of unknown and unobserved stochastic processes (namely the sequence of {Ak } and {Ck }). A real adversarial strategy may be to bias sensors with the goal of affecting state estimation, without being identified by the defender. Thus, the adversary can impact the system without corrective measures being put in place. IV. S YSTEM D ESIGN FOR D ETERMINISTIC I DENTIFICATION In this section, we consider criteria the defender can use to design the set Γ, which can allow him to identify malicious inputs on a subset of sensors. Given the attacker’s knowledge of Γ, an adversary can guess the sequence of system matrices chosen by the defender. If the adversary guesses correctly, he can generate attacks which are not unambiguously identifiable. We would now like to characterize the scenario where an attacker can guess the sequence of matrices incorrectly yet still generate an unambiguously identifiable attack. Theorem 11: Suppose an adversary generates an attack on sensor s by guessing a sequence {lk } where li ∈ {1, · · · , l} and creating inputs by applying Theorem Q 8. Specifically, k−1 there exists an x10 such that Ds dak = C s (lk )( j=0 A(lj ))x10 for all time 0 ≤ k ≤ t and Ds daη 6= 0 for some time 0 ≤ η ≤ t. Such a strategy may avoid generating an unambiguously identifiable attack on sensor s at time t if and only if null O(ls , t)    O(s, t) > null O(ls , t) + null O(s, t) , (10) h iT Q T O(ls , t) = (C s (l0 ))T · · · (C i (lt ) t−1 , j=0 A(lj )) h i T Q T O(i, t) = (C0s )T (C1s A0 )T · · · (Cts t−1 , j=0 Aj ) where null refers to the dimension of the null space. Proof: From Theorem 8, an attack is not unambiguously identifiable at time t ifQand only if there exists some k−1 Aj )x20 for 0 ≤ k ≤ t x20 such that Ds dak = Cks ( j=0 and this sequence is nonzero. Thus, the proposed strategy can generate a nonzero unambiguously identifiable attack on sensor i at time t if and only if  C s (lk )  k−1 Y j=0   A(lj ) x10 = Cks  k−1 Y j=0  Aj  x20 , for all 0 ≤ k ≤ t and moreover for some 0 ≤ k ≤ t this expression is nonzero. The result immediately follows. In practice, it is unlikely that the defender can change the parameters of the system at each time step due to the system’s inertia. Consequently, we would like to consider systems where (Ak , Ck ) remains constant for longer periods of time. For now, we assume (Ak , Ck ) ⊂ {Γ}, but is constant. An adversary, can use his knowledge of Γ to guess a pair (Ak , Ck ) ∈ Γ and generate unidentifiable attack inputs. Define the matrix iT h S Ot,j = C S (j)T (C S (j)A(j))T · · · (C S (j)A(j)t−1 )T . (11) If the attacker guesses the matrices (A(j), C(j)) and chooses  s a Tto attack sensor Ts, he would need to s ensure (D d0 ) · · · (Ds dat )T lies in the image of Ot+1,j to avoid deterministic identification. We next determine when an attacker is able to guess an incorrect pair and avoid generating an unambiguously identifiable attack. Theorem 12: Suppose (A, C) = (A(1), C(1)) and an adversary generates a nonzero attack input on sensor s using s (A(2), C(2)) by inserting attacks along the image of Ot,2 . 1 1 1 Let Λ = {λ1 , · · · , λq1 } be the set of distinct eivenvalues associated with A(1) and Λ2 = {λ21 , · · · , λ2q2 } be the set of distinct eigenvalues of A(2). Let λ,j λ,j λ,j {v1,1 , · · · vrλ,j , v1,2 , · · · vrλ,j , · · · , v1,l , · · · vri,j 1 ,1 2 ,2 λ,j l λ,j ,lλ,j } be a maximal set of linearly independent (generalized) eigenvectors associated with eigenvalue λ of A(j) satisfying λ,j λ,j A(j)v1,l = λv1,l , λ,j λ,j λ,j A(j)vk+1,l = λvk+1,l + vk,l . (12) Noting that each ri is in general fully determined by λ and λ,j j, let r(λ) = maxi,j ri (λ, j). Define Vs,k ∈ Cr(λ)×rk as  s  λ,j λ,j C (j)v1,k C s (j)v2,k ··· ··· C s (j)vrλ,j k ,k   .. .. .. λ,j   . . 0 C s (j)v1,k .     .. .. ..   . . 0 0 .  .  λ,j λ,j  s s  0 0 · · · C (j)v1,k C (j)v2,k    λ,j   0 0 0 0 C s (j)v1,k 0 0 0 0 0 There exists an attack on sensor s, which is not unambiguously identifiable for all time if and only if Λ1 ∩ Λ2 6= ∅ and there exist some λ ∈ Λ1 ∩ Λ2 such that    null Vsλ,1 Vsλ,2 > null Vsλ,1 + null Vsλ,2 , where  λ,j Vsλ,j = Vs,1 ···  λ,j Vs,l . λ,j Otherwise the attack can be detected in time t ≤ 2n − 1. Proof: The proof is lengthy and found in [?] along with numerical simulations. The previous theorem gives the defender an efficient way to determine if the attacker can guess Γ incorrectly yet still remain undetected in the case that system matrices are kept constant for at least a period of 2n time steps. It also prescribes a means to perform perfect identification. Design Recommendations 1) For all pairs i 6= j ∈ {1, · · · l}, Λi ∩ Λj = ∅. 2) The system matrices (Ak , Ck ) are periodically changed after every N ≥ 2n time steps. 3) Let {lk } be a sequence where lk ∈ {1, · · · , l}. Let qk denote the indices of a subsequence. Pr((Aqk , Cqk ) = (A(lk ), C(lk )), ∀k) = 0. 4) The pair (A(i), C(i)) is observable all i ∈ {1, · · · , l}. 5) For all i ∈ {1, · · · l}, 0 ∈ / Λi . Corollary 13: Assume a defender follows the design recommendations. Suppose sensor s is attacked and there is no t∗ such that Ds dak = 0 for all k ≥ t∗ . Then, the sensor attack will be unambiguously identifiable with probability 1. Proof: Since the attack is persistently nonzero, the adversary must guess a correct subsequence of system matrices infinitely many times due to recommendations 1 and 2. From recommendation 3, this occurs with probability 0. As a result, an attacker who persistently biases a sensor will be perfectly identified. Note that recommendation 3 can be achieved with an IID assumption or an aperiodic and irreducible Markov chain. The last 2 recommendations are justified next when we consider stochastic systems. V. FALSE DATA I NJECTION D ETECTION In this section, we examine the effectiveness of the moving target defense for detection in the case of a stochastic system. Here, we assume that xk+1 = Ak xk + wk , yk = Ck xk + Ddak + vk . (13) wk and vk are IID Gaussian process and sensor noise where wk ∼ N (0, Q) and vk ∼ N (0, R). For notational simplicity we assume that the covariances Q ≥ 0 and R > 0 are constant. However, we can obtain the ensuing results even in the case that Q and R are dependent on Ak and Ck . The adversary’s and defender’s information and strategy is unchanged except we assume the defender has knowledge of the distribution of the initial state. Specifically, f (x0 |I−1 ) = N (x̂− 0 , P0|−1 ). Moreover, both the defender and attacker are aware of the noise statistics. We first would like to show that a moving target defense leveraging the design recommendations listed above can almost surely detect harmful false data injection attacks. To characterize detection performance, we consider the additive bias the adversary injects on the normalized residues ∆zk due to his sensor attacks. The residues, zk , are the normalized difference between the observed measurements and their expected values. The bias on the residues is given by ∆ek = (Ak−1 − Kk Ck Ak−1 )∆ek−1 − Kk Ddak , − 12 ∆zk = Pk (Ck Ak−1 ∆ek−1 + Ddak ) , ∆e0 = 0, Pk = (Ck Pk|k−1 CkT + R), Kk = Pk|k−1 CkT Pk−1 , Pk+1|k = Ak (Pk|k−1 − Kk Ck Pk|k−1 )ATk + Q, (14) where ∆ek is the bias injected on the a posteriori state estimation error obtained by an optimal Kalman filter, and Pk|k−1 is the a priori error covariance. In [24], the authors show through their study of information flows in control systems that the residue bias in additive attacks is related to the optimal decay rate for the probability of false alarm. Theorem 14: Let 0 < δ < 1. Define αk and βk as the probability of false alarm PT and detection respectively. Suppose lim supk→∞ 2(T1+1) k=0 ∆zkT ∆zk ≥ ǫ. Then there exists a detector such that 1 log(αk ) ≥ ǫ. βk ≥ 1 − δ, ∀k, lim supk→∞ − k+1 Alternatively suppose y0:k is ergodic under P attack and normal operation and that limk→∞ 2(T1+1) Tk=0 ∆zkT ∆zk ≤ ǫ. Then for all detectors 1 log(αk ) ≤ ǫ βk ≥ 1 − δ, ∀k =⇒ lim supk→∞ − k+1 We now show that an admissible adversary is restricted in the bias he can inject on the state estimation error without significantly biasing the residues and incurring detection. In particular, we have the following result. Theorem 15: Suppose a defender uses a moving target defense leveraging the design recommendations listed above. Then for all admissible attack strategies lim supk→∞ k∆ek k = ∞ =⇒ lim supk→∞ k∆zk k = ∞. Proof: Assume to the contrary that the residues are bounded k∆zk k ≤ M . Define the indices of a peak subsequence as follows. i0 = 0, ik = min κ such that κ > ik−1 , k∆eκ k > k∆et k ∀t ≤ κ. Such a sequence exists since the estimation bias is unbounded. Also define the indices jk such that jk = min κ such that jk ≥ ik , jk mod N = N − 1 Observe that 1 ∆ek = Ak−1 ∆ek−1 − Kk Pk2 ∆zk . (15) As a result, we have Ajk ∆ejk = Ajikk −ik +1 ∆eik − jk X 1 Aijkk +1−t Kt Pt2 ∆zt . t=ik +1 Define am > 0 and aM > 0 as am , min j∈{1,··· ,l} σmin (A(j)q ), aM , q∈{0,··· ,N } max j∈{1,··· ,l} kA(j)q k. q∈{0,··· ,N −1} where σmin (·) denotes the smallest singular value. Moreover let pM and cM be given by pM = sup kPk|k−1 k, k cM = max j∈{1,··· ,l} kC(j)k. Observe that am is nonzero since each A(i) is invertible from recommendation 5. aM and cM are bounded above since we are taking the maximum over a finite set of bounded elements. Moreover, pM is bounded above since the error covariance is bounded above. A complete argument is omitted due to space considerations. However, since all pairs (A(i), C(i)) ∈ Γ are observable from recommendation 4 it can be shown that xN k+n , k ∈ N is a linear combination of yN k:N k+n−1 and 2n random variables, where the linear combination is dependent only on (A(N k), C(N k)). Thus, the covariance of xN k+n given y0:N k+n−1 is bounded. It can be shown that the covariance of xN k+n+j , j ∈ {1, · · · , N − 1} is bounded given y0:N k+n+j−1 simply by computing predictive covariances given y0:N k+n−1 . As a result, we have M . kAjk ∆ejk k ≥ am k∆eik k − (N − 1)aM pM cM p λmin (R) where λmin (R) is the smallest eigenvalue of R. Therefore, since k∆eik k → ∞, we have that kAjk ∆ejk k → ∞. Now, with some abuse of notation T  (Ddat1 )T · · · (Ddat2 )T . Suppose = let Ddat1 :t2 (Ajk+1 , Cjk+1 ) = (A(q1 ), C(q1 )). Then, (q ) S Ajk ∆ejk + Fjk +1 (q1 )∆zjk1+1:jk +N . Ddjk +1:jk +N = ON,q 1 Through a similar analysis as done above, it can shown that kFjk +1 (q1 )k is bounded above. Alternatively, if q1 6= q2 , is chosen then (q ) S Ajk ∆ejk + Fjk +1 (q2 )∆zjk2+1:jk +N . Ddjk +1:jk +N = ON,q 2 Thus, to insert valid inputs for system states q1 and q2 , we require (q ) S S )Ajk ∆ejk = Fjk +1 (q2 )∆zjk2+1:jk +N − ON,q (ON,q 2 1 (q ) − Fjk +1 (q1 )∆zjk1+1:jk +N . The right hand side is bounded since ∆zjk +1:jk +N and Fjk +1 (q1 ) are bounded. Due to design recommendations 1 S and 2 and Theorem 12, there is no solution to 0 6= ON,q v = 1 1 S ON,q1 v2 . As a result, since Aik ∆ejk is unbounded and S S each (Ak , Ck ) pair is observable, (ON,q − ON,q ) has no 1 2 nontrivial null space and the left hand side is unbounded. Thus, there is no way for the attacker to guess incorrectly and insert bounded residues. From, recommendation 3, there is a nonzero probability the attacker guesses (Ajk +1 , Cjk +1 ) incorrectly and the result holds. Remark 16: From the proof of Theorem 15, it can be seen that the error covariance associated with the moving target remains bounded since each system state is observable. Thus, some estimation performance is guaranteed. Moreover, since the system matrices are kept constant for a period of time, the worst case error covariance, will practically be close to the worst case LTI steady state covariance associated with the pairs (A(j), C(j)) ∈ Γ and Q and R. Remark 17: Design recommendation 1 can be relaxed in the stochastic case for purposes of detecting false data injection attacks. In particular for all non-equal pairs i, j ∈ S S {1, · · · , l} we only require 0 6= ON,i v 6= ON,j v for all v S S instead of 0 6= ON,i vi 6= ON,j vj for all vi , vj . Here, a big difference is that in the stochastic case we give the defender some knowledge of the distribution of the initial state. VI. ROBUST E STIMATION AND I DENTIFICATION While the moving target approach guarantees we can detect unbounded false data injection attacks, we wish to also identify specific malicious sensors as in the deterministic case. In the remainder of this section, we construct a robust estimator. We will fuse state estimates generated by individual sensors since previous results [25], [26] suggest such an estimator has better fault tolerance. This is desirable in our work since we are attempting to force a normally stealthy adversary to generate faults. We will show that an attacker can destabilize this estimator only if the culprit sensors can be identified. In particular, we will show that the estimation error will become unbounded only if the bias on a sensor residue is also unbounded. To begin, we assume that for each sensor s, s s s N S(On,1 ) = N S(On,2 ) = · · · = N S(On,l ), (16) where N S(A) denotes the null space of A. Such a condition is realistic since it implies that changing the system dynamics does not affect what portion of the state the sensor itself can observe. As a result, using the Kalman decomposition, for each sensor s, there exists a state transformation  uo T T T ζk,s = xk and Ts = [Tsuo Tso ] such that [Tsuo Tso ] ζk,s   1 T T T ωk,s = wk . Here, the columns of Tsuo are [Tsuo Tso ] ωk,s s a basis for N S(On,1 ). Moreover, using the same transform Ts , there exists a Γs = {(Cs (1), As (1)), · · · (Cs (l), As (l))} corresponding to Γ such that ζk+1,s = Ak,s ζk,s + ωk,s , yks = Ck,s ζk,s + vks , (17) where each pair (Ak,s , Ck,s ) is observable and belongs to Γs . By performing a change of variables on x̂− 0 , a Kalman filter with bounded covariance (see remark 16) can be constructed i to estimate ζk,i given y0:k . Specifically, define     − − − −1 − T , Ts x̂0 , (18) QTs−1 , Ts−1 − 2 1 − Qs1 ,s2 ζ̂0,s  − − − s1 ,s2 P0|−1  P0|−1 Ts−1 , Ts−1 2 1 T (19) Then we have − ζ̂k,s = (I − Kk,s Ck,s )ζ̂k,s + Kk,s yks , − s s Here ζ̂k,s = E[ζk |y0:k ], ζ̂k,s = E[ζk |y0:k−1 ] are optimal estimates of the reduced state for sensor s. Moreover, s1 ,s2 are a posteriori and a priori error covariances Pks1 ,s2 , Pk+1|k − − given by , ζ̂k,s associated with ζ̂k,s1 , ζ̂k,s2 and ζ̂k,s 2 1 s1 s2 , y0:k Pks1 ,s2 = E[ek,s1 eTk,s2 |y0:k ], s1 ,s2 s1 s2 −T = E[e− Pk|k−1 k,s1 ek,s2 |y0:k−1 , y0:k−1 ], − where ek,s = ζk,s − ζ̂k,s and e− k,s = ζk,s − ζ̂k,s . We would like to use the individual state estimates ζ̂k,s associated with each sensor s to obtain an overall state estimate of xk . To do this, first define xok,s as xok,s = Tso ζ̂k,s + ηk,s (21) where ηk,s is an IID sequence of Gaussian random variables with ηk,s ∼ N (0, ǫI) for some small ǫ > 0. Moreover {ηk,s1 } and {ηk,s2 } are independent sequences. ηk,s is a mathematical artifact introduced so the subsequent estimator has a simplified closed form and can be easily removed or mitigated by letting ǫ tend to 0. Now, we observe that uo xk = Tsuo ζk,s + xok,s + Tso ek,s − ηk,s . (22) From here we obtain ŷk = W xk + ηk , uo ζk,1 uo  ζk,2    xok,1    xok,2   .  , xk =  .  ŷk =  , .  ···    ζ uo  o xk,m k,m xk  −T1uo 0 ··· uo  0 −T ··· 2  W = . . .. ..  .. .  0 ··· 0 (23)  −T1o ek,1 + ηk,1  −T2o ek,2 + ηk,2  ηk =  ..  .  o −Tm ek,1 + ηk,m 0 0 .. . uo −Tm   ,     ζ uo I  k,1 uo   ζk,2  I   ..  ..   .  .  . ζ uo  k,m I xk x̂k = (W Q −1 −1 W) T W Q −1 ŷk (25) The proposed estimator is well defined since N S(W ) = 0. If, W had a nontrivial null space, this would imply there exists x 6= 0 and ζ1 , · · · , ζm such that Tiuo ζi = x, ∀ i ∈ {1, · · · , m}. (26) i This would imply that ∩m i=1 N S(On,1 ) 6= 0, which contradicts the observability of each pair (Ak , Ck ). We next show that the proposed estimator of xk has bounded covariance. Theorem 18: Consider the estimator of xk defined by (20),(21),(23),(24). The estimator has bounded covariance. Proof: We first prove that Q > 0 is bounded above. The ith diagonal block of Q has covariance (Tio Pki,i TioT + ǫI). Using the same argument as in the proof of Theorem 15, we see that Pki,i is bounded. Consequently (Tio Pki,i TioT + ǫI) and Q are bounded. Next consider x̂uw = (W T W )−1 W T ŷk . Since xk − k uw T −1 x̂k = −(W W ) W T ηk , x̂uw is an unbiased estimak tor of xk with covariance (W T W )−1 W T QW (W T W )−1 . Since W is fixed and Q > 0 is bounded above, (W T W )−1 W T QW (W T W )−1 is also bounded above. Finally, since the proposed estimator is MVUB, we see   tr (W T Q−1 W )−1 ≤ tr (W T W )−1 W T QW (W T W )−1 . Thus, cov(xk − x̂k ) and the covariance of xk defined by the last n × n block of cov(xk − x̂k ) are bounded. To close this section, we demonstrate that the proposed estimator is sensitive to biases in individual residues ∆zk,s , specifically showing that an infinite bias introduced into the estimator implies that the residues are also infinite. Define ek , xk − x̂k and ∆ek as the bias inserted on ek due to the adversary’s inputs. Moreover, let e∗k = xk − x̂∗k and let ∆e∗k and ∆ek,i be the bias inserted on e∗k and ek,i respectively due to the adversary’s inputs. We have the following result. Theorem 19: Consider the estimator of xk defined by (20),(21),(23),(24). Then lim supk→∞ k∆e∗k k = ∞ =⇒ lim supk→∞ k∆zki k = ∞ for some i ∈ {1, · · · , m}. Proof: First, we observe that ek = −(W T Q−1 W )−1 W T Q−1 ηk . As a result, ∆ek = (W T Q−1 W )−1 W T Q−1 Tdiag ∆ek,S . (27) where It can be seen that ηk is normally distributed so that ηk ∼ N (0, Q), where Q > 0 consists of m × m blocks where the (i, j) block is given by (Tio Pki,j TjoT + δij ǫI). Here, δij is the Kronecker delta. The minimum variance unbiased estimate (MVUB) [27] of xk given ŷk is given by T cov(xk − x̂k ) = (W T Q−1 W )−1 . (20) s,s s,s T T + Rss )−1 Kk,s = Pk|k−1 Ck,s (Ck,s Pk|k−1 Ck,s s1 ,s2 (I − Kk,s2 Ck,s2 )T Pks1 ,s2 = (I − Kk,s1 Ck,s1 )Pk|k−1 T , + Kk,s1 Rs1 s2 Kk,s 2 s1 ,s2 T s1 ,s2 − = Ak,s ζ̂k,s , Ak,s2 + Qs1 ,s2 , ζ̂k+1,s Pk+1|k = Ak,s1 Pk 1 s,s − T zk,s = (Ck,s Pk|k−1 Ck,s + Rss )− 2 (yks − Ck,s ζ̂k,s ),  The last n entries of x̂k , denoted as x̂∗k , constitute a (MVUB) estimate of xk given the set of sensor estimates ŷk . The covariance of this estimate is given by (24) Tdiag  o T1 0  = .  .. 0 0 T2o .. . ··· ··· .. . 0 0 .. . 0 ··· o Tm     , ∆ek,S    ∆ek,1  ∆ek,2    =  . .  ..  ∆ek,m Next, we will show that K∗ T −1 −1 T −1 (W Q W ) W Q Tdiag has bounded norm. = In particular observe that Expected Mean Squared Error vs Time 45 Q−1 Q−1 W )−1 W T Tdiag k −1 kQ k kQ−1 k −1 Q−1 −1 T Q ≤ k(W T W ) kkW Tdiag k. kQ−1 k kQ−1 k kK ∗ k = k(W T j=k−T ∗ +1 H1s 2 zj,s ≷ γ. (28) H0s In this scenario, H1s is the hypothesis that sensor s is malfunctioning and H0s is the hypothesis that sensor s is working normally. In practice a sensor s who repeatedly fails detection can be removed from consideration when obtaining a state estimate and the proposed fusion based estimation scheme can be adjusted accordingly. VII. N UMERICAL E XAMPLE We consider a numerical example where l = and C(j) are given by  A11 (j) A12 (j) 0 0  0 A22 (j) 0 A24 (j)  0 A33 (j) 0 A(k) =   0  0 0 0 A44 (j) 0 0 0 0   C1 (j) C(j) = , C2 (j)  C1,i (j) 0 0 0  0 C (j) 0 0 2,i  0 0 C (j) 0 Ci (j) =  3,i   0 0 0 C4,i (j) 0 0 0 0 7 and A(j)  0 0   A35 (j) , A45 (j) A55 (j)  0 0   0  . 0  C5,i (j) where Aij (j) ∈ R3×3 and Ci,j (j) ∈ R1×3 are scaled uniformly random matrices with Aii (j) unstable. Moreover Q and R are appropriately sized matrices generated by multiplying a uniform random matrix by its transpose. The system matrices are changed independently and randomly Mean sqmuared estimation error −1 Q Clearly, kW T kQ −1 k Tdiag k has bounded norm. Moreover, using a similar argument as in the proof of Theorem 18, Q−1 −1 k has bounded norm. Thus, kK ∗ k is k(W T kQ −1 k W ) bounded. Consequently, from (27), lim supk→∞ k∆e∗k k = ∞ =⇒ lim supk→∞ k∆ek,i k = ∞ for some i ∈ {1, · · · , m}. However, from Theorem 15, this implies lim supk→∞ k∆zki k = ∞ and the result holds. While the proposed estimator does not guarantee each malicious sensor will be identified, it does guarantee that the defender will be able to identify and remove sensors whose attacks cause unbounded bias in the estimation error simply by analyzing each sensor’s measurements individually. This is due to the fact that the bias on residues of such sensors will grow unbounded, which can be easily detected by some χ2 detector. As a result, for each individual sensor s, we propose the following detector at time k, which can be used to identify malicious behavior, k X Estimation Error Kalman Estimation Error 40 35 30 25 20 15 0 50 100 150 200 250 300 350 time k Fig. 1. Expected mean squared error vs time under normal operation for proposed fusion based estimator and the centralized Kalman filter. every 2n time steps where n = 15 and each (A(j), C(j)) pair has equal likelihood. We assume that the adversary biases the last 5 sensors (measured by C2 (j)) by performing the attack formulated in Theorem 8. Here, the attacker guesses the system matrices randomly every 2n time steps and x∗0 is chosen identically for each sensor. A χ2 detector (28) with window 5 and false alarm probability αik = 6.9 × 10−8 is implemented for each sensor based on their local Kalman filters. A centralized χ2 detector with window 3 derived from the optimal centralized Kalman filter performs detection with false alarm probability αk = 4.2 × 10−4 . In Fig. 1, we compared the optimal Kalman filter and the proposed fusion based estimator under normal operation by plotting their expected mean squared error as a function of time. The estimators achieve similar performance, with the average mean squared of the optimal Kalman filter at 22.9 and the average mean squared error of the proposed estimator at 23.4. In Fig. 2 and 3, we consider the system with the moving target under attack. However, we assume the attacker is aware of the exact sequence of time varying matrices. As such the attacker is able to destabilize the estimation error in Fig. 2 while the sensor residues appear normal in Fig. 3. Finally, in Fig. 4, we plot the norm of the estimation error for both the proposed estimator and optimal Kalman filter as a function of time when the attacker is forced to randomly guess the system model. Here the attacker is detected in 2 time steps and perfectly identified in 10 time steps. When a sensor is identified, it is removed from consideration when performing fusion or optimal Kalman filtering. It can be seen that while under attack, the proposed fusion based estimator is better able to recover from the adversary’s actions. VIII. C ONCLUSION In this paper, we consider a moving target approach for identifying sensor attacks in control systems. We first consid- 7 ×10 16 Estimation Error vs Time: Model Knowledgeable Attacker 0 5 6 estimation error (norm) 5 4 3 2 1 0 10 15 20 25 30 ered the deterministic case and examined design considerations which ensure perfect identification. We then considered the stochastic scenario and showed that the proposed solution can effectively prevent infinite false data injection attacks. Finally, we constructed a robust estimator, which allows us to identify sensors which cause unbounded estimation error. Future work consists in examining and evaluating a larger class of estimators in the stochastic case including the traditional Kalman filter. Furthermore, we wish to investigate the amount of bias the attacker can introduce into the estimation error while avoiding identification with tests on real systems. Finally, we wish to consider more powerful adaptive adversaries who observe a subset of sensor measurements and perform system identification. time k R EFERENCES Fig. 2. Estimation error vs time under attack when the adversary knows the system dynamics. Sensor Residues vs Time: Model Knowledgeable Attacker 4 3 2 sensor residues 1 0 -1 -2 -3 0 5 10 15 20 25 30 time k Fig. 3. Residue vs time under attack when the adversary knows the system dynamics. 7 ×10 5 Estimation Error vs Time: Moving Target estimation error Kalman estimation error detection sensor(s) identified 6 estimation error (norm) 5 4 3 2 1 0 0 5 10 15 time k Fig. 4. Estimation error vs time under attack when the adversary does not know the true dynamics. All sensor attacks are identified. The proposed fusion based estimator and the centralized Kalman filter are illustrated. [1] A. A. Cárdenas, S. Amin, and S. S. Sastry, “Secure Control: Towards Survivable Cyber-Physical Systems,” in Distributed Computing Systems Workshops, 2008. ICDCS ’08. 28th International Conference on DOI - 10.1109/ICDCS.Workshops.2008.40. IEEE, 2008, pp. 495–500. [2] R. Langner, “To kill a centrifuge: A technical analysis of what Stuxnet’s creators tried to achieve,” Langner Communications, Tech. Rep., November 2013. [Online]. Available: www.langner.com/en/wp-content/uploads/2013/11/To-kill-a-centrifuge.pdf [3] J. Slay and M. Miller, “Lessons learned from the Maroochy water breach,” in Critical Infrastructure Protection. Springer US, 2008, pp. 73–82. [4] A. Teixeira, D. Perez, H. Sandberg, and K. H. Johannson, “Attack models and scenarios for networked control systems,” in Proceedings of the 1st international conference on High Confidence Networked Systems, Beijing, China, 2012, pp. 55–64. [5] F. Pasqualetti, F. Dorfler, and F. Bullo, “Attack detection and identification in cyber-physical systems,” IEEE Transactions on Automatic Control, vol. 58, no. 11, pp. 2715–2729, 2013. [6] Y. Liu, M. Reiter, and P. Ning, “False data injection attacks against state estimation in electric power grids,” in Proceedings of the 16th ACM conference on computer and communications security, Chicago, IL, 2009. [7] Y. Mo and B. Sinopoli, “False data injection attacks in cyber physical systems,” in First Workshop on Secure Control Systems, Stockholm, Sweden, April 2010. [8] R. Smith, “A decoupled feedback structure for covertly appropriating network control systems,” in IFAC World Congress, Milan, Italy, 2011, pp. 90–95. [9] Y. Mo and B. Sinopoli, “Secure control against replay attacks,” in 47th Annual Allerton Conference on Communication, Control, and Computing, Sept 2009, pp. 911–918. [10] A. Teixeira, I. Shames, H. Sandberg, and K. H. Johansson, “Revealing stealthy attacks in control systems,” in 50th Annual Allerton Conference on Communication, Control, and Computing, Monticello, Illinois, 2012, pp. 1806–1813. [11] Y. Mo, S. Weerakkody, and B. Sinopoli, “Physical authentication of control systems: designing watermarked control inputs to detect counterfeit sensor outputs,” IEEE Control Systems Magazine, vol. 35, no. 1, pp. 93 – 109, 2015. [12] S. Weerakkody, Y. Mo, and B. Sinopoli, “Detecting integrity attacks on control systems using robust physical watermarking,” in 53rd IEEE Conference on Decision and Control, Los Angeles, California, 2014, pp. 3757–3764. [13] F. Miao, Q. Zhu, M. Pajic, and G. J. Pappas, “Coding sensor outputs for injection attacks detection,” in 53rd IEEE Conference on Decision and Control, Los Angeles, California, 2014, pp. 5776–5781. [14] Y. Yuan and Y. Mo, “Security in cyber-physical systems: Controller design against known-plaintext attack,” in 54th IEEE Conference on Decision and Control. IEEE, 2015, pp. 5814–5819. [15] S. Sundaram, M. Pajic, C. N. Hadjicostis, R. Mangharam, and G. J. Pappas, “The wireless control network: monitoring for malicious behavior,” in 49th IEEE Conference on Decision and Control. IEEE, 2010, pp. 5979–5984. [16] H. Fawzi, P. Tabuada, and S. Diggavi, “Secure state-estimation for dynamical systems under active adversaries,” in 49th Annual Allerton Conference on Communication, Control, and Computing. IEEE, 2011, pp. 337–344. [17] ——, “Secure estimation and control for cyber-physical systems under adversarial attacks,” IEEE Transactions on Automatic Control, vol. 59, no. 6, pp. 1454–1467, 2014. [18] M. S. Chong, M. Wakaiki, and J. P. Hespanha, “Observability of linear systems under adversarial attacks,” in 2015 American Control Conference. IEEE, 2015, pp. 2439–2444. [19] Y. Shoukry and P. Tabuada, “Event-triggered state observers for sparse sensor noise/attacks,” IEEE Transactions on Automatic Control, vol. 16, no. 8, pp. 2079–2091, 2016. [20] S. Mishra, Y. Shoukry, N. Karamchandani, S. Diggavi, and P. Tabuada, “Secure state estimation: optimal guarantees against sensor attacks in the presence of noise,” in 2015 IEEE International Symposium on Information Theory (ISIT). IEEE, 2015, pp. 2929–2933. [21] Y. Nakahira and Y. Mo, “Dynamic state estimation in the presence of compromised sensory data,” in 54th IEEE Conference on Decision and Control. IEEE, 2015, pp. 5808–5813. [22] M. Pajic, J. Weimer, N. Bezzo, P. Tabuada, O. Sokolsky, I. Lee, and G. J. Pappas, “Robustness of attack-resilient state estimators,” in 5th ACM/IEEE International Conference on Cyber-Physical Systems (with CPS Week 2014). IEEE Computer Society, 2014, pp. 163–174. [23] S. Weerakkody and B. Sinopoli, “Detecting integrity attacks on control systems using a moving target approach,” in 54th IEEE Conference on Decision and Control. IEEE, 2015, pp. 5820–5826. [24] S. Weerakkody, B. Sinopoli, S. Kar, and A. Datta, “Information flow for security in control systems,” in To appear, 55th IEEE Conference on Decision and Control. IEEE, 2016. [25] S.-L. Sun and Z.-L. Deng, “Multi-sensor optimal information fusion kalman filter,” Automatica, vol. 40, no. 6, pp. 1017–1023, 2004. [26] Q. Gan and C. J. Harris, “Comparison of two measurement fusion methods for kalman-filter-based multisensor data fusion,” IEEE Transactions on Aerospace and Electronic systems, vol. 37, no. 1, pp. 273– 279, 2001. [27] L. L. Scharf, Statistical signal processing. Addison-Wesley Reading, MA, 1991, vol. 98. IX. A PPENDIX : P ROOF OF T HEOREM 12 We first Suppose ∃λ ∈ Λ1 ∩ Λ2 and P P proof sufficiency. r (λ,2) r (λ,1) i i such that , α2 ∈ C i α1 ∈ C i Vsλ,1 α1 = Vsλ,2 α2 6= 0. Let V̄ λ,j be given by h λ,j · · · vrλ,j v1,1 1 ,1 ··· λ,j v1,l λ,j ··· (29) vri,j l ,l λ,j λ,j i and let xa0 (j) = V̄ λ,j αj . Suppose Ds dak (j) = C s (j)A(j)k xa0 (j) 1 dk−1 k λ,j (λ )Vs,k αj , k ≤ r(λ) (k − 1)! dλk−1 dr(λ)−1 k λ,j 1 λ,j (λ )Vs,r(λ) αj , = λk Vs,1 αj + · · · + (r(λ) − 1)! dλr(λ)−1 k > r(λ), (30) λ,j = λk Vs,1 αj + · · · + λ,j where Vs,k is the kth row of Vsλ,j . From (29), Ds dak (1) = s a D dk (2). Note that if Ds dak (j) is not real, then an attack can be constructed by adding the conjugate so that Ds dak (j) = C s (j)A(j)k xa0 (j) + C s (j)A(j)k xa0 (j) = C s (j)A(j)k (xa0 (j) + xa0 (j)) Therefore, C s (1)A(1)k (xa0 (1) + xa0 (1)) = C s (2)A(2)k (xa0 (2) + xa0 (2)). The attack can be scaled so it is nonzero for some time k from (30) and (29). Thus, the result holds. We now prove the necessary assumption. Without loss of generality, suppose the first z eigenvalues of Λ1 and Λ2 are the same so that λ1k = λ2k for k ≤ z. Assume the rest of the eigenvalues are different. In particular let Λ1 = {λ1 , · · · , λq1 } and Λ2 = {λ1 , · · · , λz , λq1 +1 , · · · , λq1 +q2 −z }. Let r∗ (λ, j) = maxi ri (λ, j), characterize the maximum block size of eigenvalue λ for A(j) and let τ + 1 ≥ 2n. ∗ Define G(λi , j) ∈ Cτ +1×r (λi ,j) as   1 0 ··· 0   λi 1 ··· 0    λ2 2λ · · · 0 i  . (31)  i   . . . . ..   .. . ···   r∗ (λi ,j)−1 d τ λτi τ λτi −1 · · · (r∗ (λi1,j)−1)! dr ∗ (λ ,j)−1 (λi ) i where the kth column is obtained by taking entrywise, the corresponding (k − 1) derivative of the associated entry in the first column and dividing by (k − 1)!. Let Ga , Gb , Gc be given by   Ga = G(λ1 , 1) G(λ1 , 2) · · · G(λz , 1) G(λz , 2) ,   Gb = G(λz+1 , 1) · · · G(λq1 , 1) ,   Gc = G(λq1 +1 , 2) · · · G(λq1 +q2 −z , 2) .   Finally, let G∗ = Ga Gb Gc . Note that G∗ ∈ Cτ +1×κ where κ ≤ 2n by construction. P Consider vectors η i,j ∈ C k rk (λi ,j) and define Ṽsλi ,j , Ṽsa , Ṽsb , Ṽsc , Ṽs as h iT λ ,j λ ,j Ṽsλi ,j = Vs,1i η i,j · · · Vs,ri ∗ (λi ,j) η i,j ,  T Ṽsa = (Ṽsλ1 ,1 )T (Ṽsλ1 ,2 )T · · · (Ṽsλz ,1 )T (Ṽsλz ,2 )T , iT h Ṽsb = (Ṽsλz+1 ,1 )T · · · (Ṽsλq1 ,1 )T , iT h Ṽsc = (Ṽsλq1 +1 ,2 )T · · · (Ṽsλq1 +q2 −z ,2 )T ,   Ṽs = (Ṽsa )T (Ṽsb )T (Ṽsc )T . It can be shown (Theorem 11) that an attack exists only if there exists some nontrivial Ṽs in the null space of ∗ G by construction that G∗ has rmin = Pz. We observe ∗ i=1 minj r (λi , j) pairs of identical columns. Thus, null(G∗ ) ≥ rmin . Let G̃∗ ∈ Cτ +1×rmax be obtained by deleting duplicate columns of G∗ where rmax ≤ 2n ≤ τ + 1 is given by z X i=1 max r∗ (λi , j) + j q1 X i=z+1 r∗ (λi , 1) + q2 +q 1 −1 X r∗ (λi , 2). i=q1 +1 Let G̃∗ trunc be a square matrix obtained by removing the last τ + 1 − rmax rows of G̃∗ . T We first show that the null space G̃∗ trunc is empty. Suppose it was not. This would imply the existence of a complex nonzero polynomial p∗ (x) of degree rmax with the property p∗ (λk ) = 0, · · · , d(maxj r ∗ (λk ,j)−1) ∗ p dx (λk ) = 0, for 1 ≤ k ≤ z, dp∗ dr (λk ) = 0, · · · , dx for z + 1 ≤ k ≤ q1 , and ∗ p∗ (λk ) = 0, (λi ,1)−1 ∗ p dx (λk ) = 0, ∗ dr (λi ,2)−1 p∗ dp∗ (λk ) = 0, · · · , (λk ) = 0, dx dx for q1 + 1 ≤ k ≤ q1 + q2 − z. But this contradicts the fundamental theorem of algebra since it would imply a polynomial of degree τ has τ + 1 T zeros. Thus, the null space G̃∗ trunc is empty. Therefore, by the rank nullity theorem G̃∗ trunc is full rank and therefore G̃∗ is full rank. Consequently, rank(G∗ ) ≥ rmax . However, null(G∗ ) ≥ rmin and the number of columns in G∗ is rmax + rmin . Therefore, strict equality holds and rank(G∗ ) = rmax and null(G∗ ) = rmin . As a result, one excites the null space of G∗ only by exciting pairs of identical columns in G∗ . Therefore, Ṽs is in the null space of G∗ only if for 1 ≤ k≤z Ṽsλk ,1 = −Ṽsλk ,2 . p∗ (λk ) = 0, However, there exists a nonzero attack only if for some k there exists a solution Ṽsλk ,1 = −Ṽsλk ,2 6= 0. The result directly follows.
3cs.SY
A computational formulation for constrained solid and liquid membranes considering isogeometric finite elements Roger A. Sauer 1 , Thang X. Duong, Callum J. Corbett Aachen Institute for Advanced Study in Computational Engineering Science (AICES), RWTH Aachen University, Templergaben 55, 52056 Aachen, Germany arXiv:1210.4791v1 [cs.CE] 17 Oct 2012 Submitted on October 17th 2012 for publication in Computer Methods in Applied Mechanics and Engineering Abstract A geometrically exact membrane formulation is presented that is based on curvilinear coordinates and isogeometric finite elements, and is suitable for both solid and liquid membranes. The curvilinear coordinate system is used to describe both the theory and the finite element equations of the membrane. In the latter case this avoids the use of local cartesian coordinates at the element level. Consequently, no transformation of derivatives is required. The formulation considers a split of the in-plane and out-of-plane membrane contributions, which allows the construction of a stable formulation for liquid membranes with constant surface tension. The proposed membrane formulation is general, and accounts for dead and live loading, as well as enclosed volume, area, and contact constraints. The new formulation is illustrated by several challenging examples, considering linear and quadratic Lagrange elements, as well as isogeometric elements based on quadratic NURBS and cubic T-splines. It is seen that the isogeometric elements are much more accurate than standard Lagrange elements. The gain is especially large for the liquid membrane formulation since it depends explicitly on the surface curvature. Keywords: contact constraints, curvilinear coordinates, isogeometric analysis, nonlinear finite element methods, follower loads, volume constraints. 1 Introduction Membranes are computationally challenging structures. Their geometry can be complex, they may undergo large deformations, large rotations and large strains - and thereby behave highly nonlinear - and they are characterized by several physical instabilities: They are unstable in compression, unstable for out-of-plane loading (in the case of zero in-plane tension), unstable for pressure loading (in the case of rubber membranes) and unstable w.r.t. in-plane loading (in the case of liquid membranes). The aim of this paper is to formulate a general, 3D, geometrically exact and fully nonlinear membrane model that accounts for pressure loading as well as volume, area, and contact constraints and is suitable for both solid and liquid membranes. Our focus is on pure membranes, i.e. curved, surface structures that do not support in-plane compression, out-of-plane bending, and shear.2 Such a restricted focus is useful due to the large range of membrane applications: they appear as inflatable and pressurized structures, like balloons, tubes and airbags; as fabrics, tents, canopies, parachutes, foils and sails; as water-filled membrane 1 corresponding author, email: [email protected] We note that in the literature, the term membrane is often also used for the special case of 2D plane-stress structures. 2 1 structures, like inflatable dams; as biological membranes, like blood vessels, cell, diaphragms, aneurysms and lung alveoli; as liquid droplets, menisci, bubbles, foams and sprays; as thin sheets and films - both liquid and solid - as atomistic membranes, like graphene sheets; as interacting membranes, e.g. adhering cells; and in the topic of form-finding and minimal surfaces. Computational formulations for 3D, nonlinear membrane go back to the seminal work of Oden (Oden and Sato (1967), see also Oden (2006)). Since then, the field has been continuously advanced, among others by Fried (1982); Tang (1982); Roddeman et al. (1987); Contri and Schrefler (1988); Wriggers and Taylor (1990); Ibrahimbegovic and Gruttmann (1993); Haseganu and Steigmann (1994); Gosling and Lewis (1996); Muttin (1996); Wu et al. (1996); Bonet et al. (2000); Rumpel and Schweizerhof (2003); Stanuszek (2003); Weinberg and Neff (2008). Many of these works are concerned with the topic of wrinkling due to in-plane compression. More recently, computational formulations based on curvilinear coordinates have been considered rigorously, both for membranes (Ambroziak and Klosowski, 2006) and shells (Arciniega and Reddy, 2007). Another recent development are rotation-free shell formulations, as they have been considered by Flores and Estrada (2007); Linhard et al. (2007); Dung and Wells (2008) and recently Benson et al. (2011); Nguyen-Thanh et al. (2011) for isogeometric analysis. Isogeometric formulations allow the formulation of C 1 -continuous surface formulations that are advantageous for flow simulations (Kiendl et al., 2010) and sliding contact (De Lorenzis et al., 2011; Temizer et al., 2012), see also Sauer (2011, 2012) for Hermite-based, C 1 -continuous contact surfaces. Relevant to membranes is also the topic of live pressure loading (Bufler, 1984; Schweizerhof and Ramm, 1984). Membranes are also an interesting subject in shape optimization (Bletzinger et al., 2005; Manh et al., 2011). The presented formulation contains several merits and novelties: It allows a split between inplane and out-of-plane contributions, which is used to construct a new formulation for liquid membranes. It admits arbitrary elastic material models for solid and liquid membranes. It is based purely on displacement-based finite elements and can be used with any kind of such elements. It includes, in particular, isogeometric NURBS elements to capture the deforming surface geometry to high-accuracy, even for comparably coarse discretizations. It is straight forward to implement in an existing FE framework. It avoids the need to transform derivatives between configurations and avoids the use of local cartesian coordinate systems. Shells models are often formulated using local cartesian coordinate systems, as this allows using classical constitutive relations formulated in this manner (Wriggers, 2008). To our mind, there is no need for such a detour: The balance laws, kinematics, constitutive relations as well as the FE weak forms and corresponding FE arrays can all be formulated efficiently in the curvilinear coordinate system. The capabilities of the presented formulation are demonstrated by several challenging computational examples, considering pressure loading, inflation and contact. The following section presents the theory of nonlinear membranes in the framework of curvilinear coordinates, considering pressure loading, volume, area and contact constraints. Sec. 3 proposes a straight-forward finite element implementation of the theory, and Sec. 4 presents several examples of solid and liquid membranes to illustrate the capabilities of the present formulation. 2 Nonlinear membranes In this section, we summarize the theory of nonlinear membranes in the framework of curvilinear coordinates. The membrane kinematics, constitution and balance laws in strong and weak form are discussed, and various kinds of constraints are considered. 2 2.1 Surface description in curvilinear coordinates The membrane surface, denoted S, is fully characterized by the parametric description  x = x ξ1, ξ2 . (1) This corresponds to a mapping of the point (ξ 1 , ξ 2 ) in the parameter domain P to the material point x ∈ S. In the following, Greek letters are used to denote the two indices 1 and 2. Summation is then implied on repeated indices. The tangent vectors to coordinate ξ α at point x ∈ S are given by ∂x aα = α , α = 1, 2 (2) ∂ξ The two vectors form a basis for the tangent plane of S. In general, they are not orthonormal. This apparent drawback of the description is actually an advantage when it comes to the kinematical description. This turns out to be very straightforward, e.g. see Eq. (16). The basis at x is characterized by the metric tensor, that has the co-variant components aαβ := aα · aβ . (3) [aαβ ] := [aαβ ]−1 (4) From the inversion we obtain the contra-variant components of the metric tensor. Explicitly, we have a11 = a11 / det aαβ , a12 = −a12 / det aαβ and a22 = a22 / det aαβ . With these a dual basis can be constructed: From the co-variant base vectors aα the contra-variant counterparts aα := aαβ aβ (5) can be determined. We note that summation is implied on repeated indices. Note that aα ·aβ = aαβ and aα · aβ = δαβ , where δαβ is the Kronecker symbol. The unit normal of S at x is given by n= a1 × a2 . ka1 × a2 k (6) It can be shown that ka1 × a2 k = p det aαβ . (7) The bases {a1 , a2 , n} and {a1 , a2 , n} can then be used to decompose any vector v on S, i.e. v = v α aα + vn n = vα aα + vn n , (8) where vα denote the co-variant, and v α the contra-variant components of v. The derivative of the tangent vectors is given by ∂aα aα,β = . (9) ∂ξ β Further, we require the so-called co-variant derivative of aα , which is defined by aα;β := aα,β − Γγαβ aγ (10) where Γγαβ are the Christoffel symbols of the second kind given by Γγαβ = aα,β · aγ . Introducing the identity tensor on S 1 = aα ⊗ aα = aα ⊗ aα = 1̃ − n ⊗ n , 3 (11) where 1̃ is the usual identity tensor in R3 , 3 we can write aα;β = (n ⊗ n) aα,β . (12) n · aα;β = n · aα,β = bαβ (13) Contracting with n then yields which are the co-variant components of the curvature tensor b = bαβ aα ⊗ aβ . The eigenvalues of this tensor are the principal curvatures of surface S. 2.2 Membrane kinematics Next, we consider the deformation of the membrane surface. We therefore distinguish between the deformed, current configuration S and the undeformed, initial configuration S0 , see Fig. 1. Both surfaces are described by the relations of Sec. 2.1. For surface S we use the lower case Figure 1: Mapping between parameter domain P, reference surface S0 and current surface S symbols x, aα , aαβ , aα , n and bαβ . For surface S0 we use the corresponding upper case symbols X, Aα , Aαβ , Aα and N .4 In order to characterize the deformation between surfaces S0 and S consider the line element ∂x dx = α dξ α = aα dξ α (14) ∂ξ and likewise dX = Aα dξ α . Contracting with Aβ yields dξ α = Aα · dX, so that dx = (aα ⊗ Aα ) dX . (15) F = aα ⊗ Aα (16) Here the tensor 3 4 A tilde is used here to indicate standard tensors in R3 Here, the curvature tensor [bαβ ] is only needed on S. 4 is the surface deformation gradient of the mapping X → x. Likewise we find F −1 = Aα ⊗ aα . Through F we thus have the following transformations aα = F Aα , Aα = F −1 aα , aα = F −T Aα , Aα = F T aα . (17) Given F , we can introduce the right and left Cauchy-Green surface tensors and their inverses, i.e. C = F T F = aαβ Aα ⊗ Aβ , C −1 = aαβ Aα ⊗ Aβ , (18) B = F F T = Aαβ aα ⊗ aβ , B −1 = Aαβ aα ⊗ aβ . Next we discuss the surface stretch between surfaces S0 and S. The area element da ⊂ S is defined by da := k(a1 dξ 1 ) × (a2 dξ 2 )k = ka1 × a2 k d , (19) where d := dξ 1 dξ 2 . A corresponding statement follows for dA ⊂ S0 . In view of Eq. (7) we thus have the relations p dA = JA d , JA := det Aαβ , p (20) da = Ja d , Ja := det aαβ , da = J dA , 2.3 J := Ja /JA . Momentum balance for membranes From the balance of linear momentum the strong form equilibrium equation tα;α + f = 0 , (21) at x ∈ S can be obtained (Steigmann, 1999). Here f is a distributed surface force, that can be decomposed as f = fα aα + p n = f α aα + p n (22) where fα and f α are the co-variant and contra-variant in-plane components of f and p is the out-of-plane pressure acting on S. Further, tα denotes the internal traction acting on the internal surface ⊥ aα . According to Cauchy’s formula tα = σ aα , (23) where σ denotes the Cauchy stress tensor at x ∈ S, which we consider to be symmetric. We emphasize that tα is not a physical traction since aα is usually not normalized. In general, the stress tensor takes the form σ = σ αβ aα ⊗ aβ + σ 3α (n ⊗ aα + aα ⊗ n) + σ 33 n ⊗ n . (24) For membranes it is typically assumed that σ 3α = σ 33 = 0, so that σ = σ αβ aα ⊗ aβ . In this case we find that tα = σ βα aβ such that the co-variant derivative of tα becomes tα;α = σ αβ;α aβ + σ βα bαβ n (25) according to Eq. (13). Equilibrium equation (21) thus decomposes into σ αβ;α + f β = 0, σ αβ bαβ + p = 0 , (in-plane equilibrium), (out-of-plane equilibrium). 5 (26) To close the problem, the usual Dirichlet and Neumann boundary conditions u = ū on ∂u S on ∂t S t = t̄ (27) are considered on the membrane boundary ∂S = ∂u S ∪ ∂t S. Here, we suppose that the prescribed traction t̄ = t̄α aα is tangent to S, since out-of-plane boundary forces, as well as out-of-plane line and point loads within the surface, lead to singularities in the membrane deformation and are therefore not considered in the present formulation. The traction on boundary ∂t S, according to Cauchy’s formula, is given by t = σm , (28) where m = mα aα is the outward unit normal of ∂t S. It follows that t = mα tα . 2.4 Membrane constitution The known 3D constitutive models can be adapted to the membrane. We therefore suppose a general elastic material relation of the form σ̃ = σ̃(B̃). For membranes it is useful to consider the decomposition B̃ = B + λ23 (n ⊗ n), where λ3 is the out-of-plane stretch, and σ̃ = σ/t + σ33 (n ⊗ n), where σ is defined as the in-plane stress tensor (with units force per length) and t = λ3 T denotes the current membrane thickness, for a given reference thickness T . Out of these considerations, a relation between the membrane quantities B and σ can be obtained. As an example we consider an incompressible Neo-Hooke material, given by σ̃ = µ̃B̃ + q 1̃ , (29) where µ̃ is the shear modulus and q denotes the Lagrange multiplier associated with the incompressibility constraint. For membranes, the model decomposes into σ = (µ̃B + q1) T /λ3 , σ33 = µ̃λ23 + q . (30) For incompressibility det B̃ = (Jλ3 )2 = 1. Under the plane stress assumption σ33 = 0, we then find q = −µ̃/J 2 and consequently  σ = µ/J B − 1/J 2 , (31) with µ := µ̃T . Componentwise, in the aα basis, this becomes  σ αβ = µ/J Aαβ − aαβ /J 2 . (32) Contracting with aβγ , the components σβα and σαβ can be obtained.5 Another example are liquid, e.g. water, membranes governed by constant isotropic surface tension γ. In that case a constant stress tensor of the form σβα = γ δβα (33) is obtained. It can be seen that the in-plane equilibrium equation (26.1) is only satisfied for f α = 0. This implies that static water membranes cannot equilibrate in-plane loads, and are therefore unstable in-plane; a property that needs to be addressed in a computational formulation (see Sec. 3). The out-of-plane equation (26.2) now yields 2Hγ + p = 0 , 2H := bαα , (34) which is the well known Young-Laplace equation. A prominent feature of liquid membranes is that they form distinct contact angles. This property is not addressed here. 5 Due to the symmetry of σ αβ the ordering of indices does not matter in σβα , i.e. σ αβ = σβα . 6 2.5 Membrane weak form Next, we derive the weak form corresponding to equilibrium equation (21). Consider a kinematically admissible variation of S, denoted w ∈ W, where W denotes a suitable space for w. Contracting Eq. (21) with w and integrating over S yields Z  w · tα;α + f da = 0 ∀w ∈ W . (35) S Considering w = wα aα + w n, this expands into Z Z   αβ α w σ αβ bαβ + p da = 0 ∀w ∈ W , wα σ ;β + f da + (36) S S i.e. it splits into the in-plane and out-of-plane parts identified in Eq. (26). Such a split is useful if different approximation techniques are chosen for the in-plane and out-of-plane response. Using the divergence theorem for curved surfaces (Gurtin and Murdoch, 1975), the first in-plane term is rewritten into Z Z Z  wα;β σ αβ da wα σ αβ ;β da − wα σ αβ;β da = S S S (37) Z Z αβ αβ = wα σ mβ ds − wα;β σ da , S ∂S where mα = m · aα are the co-variant components of the unit normal m on the line ∂S. Since wα = 0 on ∂u S and since wα σ αβ mβ = wα t̄α on ∂t S expression (36) thus becomes Gint − Gext = 0 ∀w ∈ W , where Z Z αβ da − Z Z := wα f α da + Gint := wα;β σ S Gext S (38) w σ αβ bαβ da , Z wα t̄α ds + w p da , S ∂t S (39) S are the internal and external virtual work contribution due to variation w. Considering wα = 0 and w = 0 subsequently, the weak form can be decomposed into the weak forms Z Z Z wα;β σ αβ da − wα f α da − wα t̄α ds = 0 ∀ wα ∈ Wα (in-plane), S S ∂t S (40) Z Z αβ w σ bαβ da + w p da = 0 ∀ w ∈ Wn (out-of plane). S S Such a split is advantageous for the description of liquid membranes. Since liquid membranes are inherently unstable in-plane, they can be stabilized by providing additional stiffness via Eq. (40.1) without affecting the out-of-plane response. This is demonstrated in the examples of Sec. 4.4 and 4.5. Otherwise, considering wα;β = (w · aα );β = w;β · aα + w bαβ , the two terms of Gint can be combined into Z Gint = w;α · σ αβ aβ da . S 7 (41) (42) It is noted that for this expression only single derivatives of variation w and configuration x are required, while in the decomposed formulation of Eq. (40) second derivatives of x appear. Introducing the surface Kirchhoff stress tensor τ = Jσ, which eliminates one J from expression (32), the last equation can be rewritten into Z w;α · τ αβ aβ dA . Gint = (43) S0 Within framework (38), both dead and live loading can be considered. This is discussed further in Sec. 3.2. Beforehand, we discuss several useful membrane constraints. 2.6 Volume constraints The volume of the domain D enclosed by the membrane may be constrained. An example is a cell containing incompressible fluid. Formally, the volume constraint is written as gv := V − V0 = 0 , (44) where V0 and V denote the initial and current volumes enclosed by the initial and current membrane configurations. Since dv = x · n da/3 and dV = X · N dA/3, these can be computed by the surface integration Z Z 1 1 V = x · n da , V0 = X · N dA (45) 3 S 3 S0 These expressions are valid for closed surfaces, and care has to be taken when modeling open membranes. In this case one must account for the volume contribution associated with the missing surface. Eq. (44) can be included in the formulation by the Lagrange multiplier method. The Lagrange multiplier associated with the volume constraint is the internal membrane pressure p. Remark: We note that the governing equations (38) and (44) can be derived from a variational principle for conservative systems. This is the case for the constitutive models discussed in Sec. 2.4 and for pressure loading of closed membranes surfaces. 2.7 Area constraints Another useful constraint is a constraint on the membrane surface area. For example, red blood cells are known to conserve the surface area during deformation (Kloeppel and Wall, 2011). Formally this is expressed as ga := A − A0 = 0 , (46) with Z Z A= da , A0 = S dA . (47) S0 The area constraint is not considered further in this paper. In principle, they can be treated in an equivalent manner to volume constraints. 2.8 Contact constraints Contact is characterized by the impenetrability constraint gn ≤ 0 , 8 (48) where gn := (x − xp ) · np (49) denotes the normal gap between the membrane point x ∈ S and the surface Γ of a neighboring obstacle. Here, the unit vector np denotes the surface normal of Γ at the point xp , which is the solution of the minimum distance problem  xp (x) = y min (x − y) for x ∈ S . (50) ∀y∈Γ We note that this minimization can cause difficulties for complex surface geometries (Wriggers, 2006). Constraint (48) can be included in the membrane formulation by various methods. The simplest of these is the penalty formulation. In this case the contact traction tc acting at x ∈ S is given by  −n gn np , gn < 0 , tc = (51) 0, gn ≥ 0 , where n is the penalty parameter. The contact forces contribute to virtual work balance (38). This can be expressed by including Z Gc = − w · tc da (52) S on the right hand side of Eq. (38). For two deformable membranes in contact, weak form (38) must be satisfied for each membrane, and contribution Gc is added correspondingly to each weak form. To avoid a surface bias it is advantageous to treat both contact pairs equivalently as is done in the two-half-pass algorithm of Sauer and De Lorenzis (2012) . For some problems, like adhesion, the contact constraint is replaced by suitable constitutive contact laws of the form tc = tc (gn ), see Sauer and Li (2007). 3 Finite element discretization The governing equations (38) and (44) are solved by the finite element (FE) method. The initial surface S0 is therefore discretized into a set of finite elements Ωe0 that are defined by nodal points X I or control points in the case of isogeometric FE. The deforming membrane is then described by the motion of the nodal points X I → xI , which corresponds to a Lagrangian FE description. The deformed configuration of element Ωe0 is denoted Ωe . Here we consider quadrilateral elements since these can be conveniently related to a master element in the parameter domain ξ α ∈ [−1, 1]. 3.1 Finite element interpolation Within elements Ωe0 and Ωe , the geometry is approximated by the nodal interpolations X X ≈ Xh = NI X I , (53) I and x ≈ xh = X NI xI , (54) I where NI = NI (ξ 1 , ξ 2 ) denotes the nodal shape function defined on the master element in parameter space. The summation is carried out over the nne nodes of the element. Here, the 9 following quadrilateral elements are considered: 4-noded linear Lagrange elements, 9-noded quadratic Lagrange elements, quadratic NURBS elements, and T-spline elements. In principle, any other element type can also be considered. For isogeometric elements the shape functions are constructed via the Bézier extraction operation (Borden et al., 2011; Scott et al., 2011). According to Eq. (2), the tangent vectors are thus approximated by X aα ≈ NI,α xI , (55) I where NI,α = ∂NI /∂ξ α . Considering a Bubnov-Galerkin formulation the variation w is approximated in the same way as the deformation, i.e. X w≈ NI wI . (56) I For shorthand notation, we rewrite Eqs. (53), (54) and (56) X ≈ NXe , x ≈ Nxe , w ≈ Nwe , (57) where N := [N1 1̃, ..., NI 1̃, ...] is a (3 × 3nne ) array with the usual identity tensor 1̃ and Xe , xe , and we are vectors containing the stacked nodal values for the element.6 In order to discretize the weak form we need to discretize wα , w and w;α . We find wα ≈ w · aα = weT NT aα = weT NT N,α xe w ≈ w · n = weT NT n (58) w;α ≈ N,α we where N,α := [N1,α 1̃, ... NI,α 1̃, ...]. Note that for a vector like w, the co-variant derivative w;α coincides with the regular partial derivative w,α . The surface normal n is given through definition (6) and approximation (55). According to (13), the components of the curvature tensor become bαβ ≈ n · N,αβ xe . (59) With the above expressions, we further find   wα;β ≈ weT NT,β N,α + NT (n ⊗ n) N,αβ xe (60) according to eq. (41). 3.2 Discretized weak form The above expressions are now used to discretize the membrane weak form of Sec. 2.5. The surface integration is carried out over the element domains Ωe and then summed over all nel FE as nel nel X X Gint = Geint , Gext = Geext . (61) e=1 e=1 For the internal virtual work of eq. (43) we now have Z Z αβ T e w;α · τ aβ dA ≈ we Gint = Ωe 6 Ωe NT,α τ αβ N,β dA xe (62) Non-italic discrete arrays X, x, w and N should not be confused with italic field variables X, x, w and N . 10 e , we identify the internal FE according to approximations (55) and (58). Writing Geint = weT fint force vector Z e fint = NT,α τ αβ N,β dA xe . (63) Ωe As noted in Eq. (39.1), the internal virtual work can be split into in-plane and out-of plane contributions. At the element level these are Z Z αβ e e Ginti = wα;β τ dA , Ginto = − w τ αβ bαβ dA , (64) Ωe0 Ωe0 such that Geint = Geinti + Geinto . In view of Eqs. (58), (59) and (60), the corresponding force vectors become Z   e finti = τ αβ NT,α N,β + NT (n ⊗ n) N,αβ dA xe , Ωe0 Z (65) αβ T e finto = − τ N (n ⊗ n) N,αβ dA xe . Ωe0 For Gext we consider external loading of the form f = f 0 /J + p n, where f 0 and p are given loading parameters. The first corresponds to a dead force per reference area, the second to a live pressure. According to Eq. (39.2) we then have Z Z Z e w · f 0 dA + w · t̄ ds + w p da , Gext = (66) Ωe0 ∂t Ωe which yields the external force vector Z Z T e N f 0 dA + fext = Ωe0 Ωe T Z N t̄ ds + ∂t Ωe Ωe The original weak form (38) now yields the descretized version   wT fint − fext = 0 , NT p n da . (67) (68) where fint and fext are obtained from the assembly of the corresponding elemental force vectors, and w is the kinematically admissible set of all nodal variations. These are zero for the nodes on the Dirichlet boundary ∂u S. For the remaining nodes, Eq. (68) implies f := fint − fext = 0 , (69) which is the discretized equilibrium equation that needs to be solved for the unknown nodal positions x; see Sec. 3.5. We note, that in this formulation no mapping of derivatives between master and current configuration is required. Also no introduction of local, cartesian bases are needed. The formulation thus is straight forward and efficient to implement. 3.3 Contact contributions The proposed membrane model can be easily extended to include contact, provided a 3D contact algorithm is available. The contact contribution (52) simply yields the force vector Z e fc = − NT tc da , (70) Ωek that needs to be included in Eq. (69). For details on the the FE implementation of Eq. (70) we refer to Sauer and De Lorenzis (2012). 11 3.4 Discretized volume constraint The volume, enclosed by the discretized membrane surface, is obtained as n V = el 1X 3 e=1 Z nT N da xe (71) Ωe according to Eq. (45). For the volume constraint, gv = V − V0 = 0, V0 can be considered as an externally prescribed volume, e.g. during inflation, or as the initial value of V . 3.5 Solution method The volume constraint is included in the formulation by the Lagrange multiplier method. The Lagrange multiplier associated with the constraint is the pressure, p, acting on membrane. Combining (44) with (69) leads to the system f (x, p) = 0 , gv (x) = 0 , (72) that needs to be solved for the unknown nodal position x and pressure p. Due to the nonlinearities of the model, this is solved with Newton’s method. Therefore, the linearization of f and gv w.r.t. x and p are needed. This is discussed in Appendix B. 3.6 Hydrostatic pressure In some applications, the pressure p may vary locally. In static examples this is typically due to gravity. An example is the hydrostatic pressure distribution in a water-filled membrane. In this case, we have p = pv + ph , (73) where ph is the hydrostatic, height dependent, pressure and pv is the pressure associated with the volume constraint. The former is simply written as ph = −ρ g · x (74) where ρ is the density of the pressure causing medium, and g is the gravity vector.7 The value of pv is then the (constant) datum pressure at the origin. 3.7 Numerical quadrature In parameter space, each element is defined on the master domain ξ α ∈ [−1, 1], α = 1, 2. The integrals from above are mapped to the master domain using transformations (20). Integration is then carried out with standard Gaussian quadrature on the master domain. 7 typically g = −[0, 0, g]T , where g is the gravity constant 12 3.8 Monitoring compression Membranes do not support in-plane compression. The absence of physical bending stiffness leads to buckling of the structure, known as wrinkling in the case of membranes. To avoid membrane compression in our formulation during computations, we simply monitor the minimum principal stress r I1 I12 (75) σmin = − − I2 , 2 4 where I1 = tr σ = σαα and I2 = det σ = det σβα are the two invariants of the surface stress tensor. We note that σmin does not imply the automatic failure of the discretize membrane structure as some numerical bending stiffness may be present. More involved wrinkling criteria can be found in the literature, see Lu et al. (2001) and Youn and Lee (2006). 4 Numerical examples The proposed membrane model is illustrated by several examples, considering both solid and liquid membranes under dead, pressure, and volume loading. Standard linear and quadratic Lagrange finite elements as well as quadratic NURBS and cubic T-spline finite elements, providing C 1 - and C 2 -continuous surface descriptions, respectively, are used. 4.1 Inflation of a spherical balloon We first consider the inflation of a spherical rubber balloon and use it for validation, since an analytical solution exists for this problem. The rubber behavior is described by the incompressible Neo-Hookean material model (29). The finite element model of the balloon, modeled as 1/8th of a sphere, is shown in Fig. 2a. Appropriate boundary conditions are provided to main- a. b. Figure 2: Inflated balloon: (a) initial and current configuration (for V = 10 V0 ); (b) pressurevolume relation for V ∈ [1 10]V0 (FE result for 3 quadratic FE). tain the symmetry of the inflating structure. The relation between current and initial radius is denoted r = λR. The circumference of the balloon, proportional to r, is thus stretched by λ such that the surface deformation gradient is F = λ1 and the area change is given by J = λ2 . 13 Due to incompressibility this results in the thickness change t = T /J. According to Eq. (31), the in-plane normal stress within the balloon thus is σ̃ = σ/t = µT (1 − λ6 )/t, which is equal to the well-known formula σ̃ = pr/2/t. We thus obtain the pressure-stretch relation   pR 1 1 , (76) =2 − µT λ λ7 or, equivalently, the pressure-volume relation   1   7  pR V0 3 V0 3 =2 − , µT V V (77) where V0 = 4π/3 R3 is the initial balloon volume. The p − V relation is shown in Fig. 2b. The pressure increases quickly, peaks and then decreases gradually. This behavior is typical for the inflation of rubber membranes. The FE computation of such problems should therefore be carried out by prescribed volume loading instead of prescribed pressure loading. The proposed FE formulation can capture the analytical behavior very nicely. This is shown by the convergence plot of Fig. 3a. Here, the number of Gaussian quadrature points per elements are a. b. Figure 3: Inflated balloon: convergence of the pressure at V = 10 V0 : (a) convergence with mesh size; (b) NURBS convergence with quadrature accuracy. 2×2 for linear Lagrange and 3×3 for quadratic Lagrange and NURBS elements. Since NURBS elements describe the spherical geometry exactly, they can solve the problem exactly with only one element - provided sufficiently many quadrature points are used. This is shown in Fig. 3b. The results shown here validate the proposed membrane formulation. Fig 4 shows the deformed FE meshes and the error in the membrane stress σ for the three different element types considered here. As is seen, the error is smallest for NURBS FE. 4.2 Inflation of a square sheet As a second example we consider a square membrane sheet with dimension 4 L0 × 4 L0 , apply an isotropic pre-stretch of λ0 = 1.05 to provide initial out-of-plane stiffness, and then inflate the structure by a prescribed volume, as is shown in Fig. 5. Fig. 6a shows the pressure-volume relation for the three considered elements. The accuracy is highest for NURBS elements and lowest for linear elements. This is seen by the convergence behavior of the different element types, shown in Fig. 6b. 14 a. b. c. Figure 4: Inflated balloon: Error in the in-plane stress σ = pr/2 for: (a) 12×8 linear FE, (b) 3×8 quadratic FE, (c) 1×8 NURBS FE. Figure 5: Inflated square sheet: configurations for V = {0, 1, 2, 3, 4, 6, 8, 10}V0 , where V0 = 4L30 . The coloring shows the area stretch J (which is identical to the thickness decrease). Fig. 7 shows the deformed sheet for a prescribed volume of V = 5000 V0 for the three element types. As seen, all element types can accommodate enormous deformations, even for relatively coarse meshes. The comparison with the fine NURBS mesh in Fig. 8a shows that there are still considerable inaccuracies present in all three formulations. The NURBS result is fully C 1 -continuous. In the example, particularly large deformation occur at the bottom and in the corners of the sheet, as is seen in the close-up of Fig. 8b. The deformation in the corner shown a tendency towards wrinkling. We observed that a further mesh refinement led to non-convergent Newton behavior, indicating instabilities. A computational scheme for wrinkling is required to handle this case. 4.3 Contact between balloon and cushion The third example considers a spherical, water-filled balloon in contact with a cushion. The balloon is loaded by hydrostatic pressure loading. The cushion is modeled by a square sheet that is fixed along the boundary and supported by internal pressure arising from constraining the volume beneath the sheet. The initial size of the sheet is 2R × 2R, where R is the undeformed radius of the balloon. Both, balloon and sheet are modeled by material law (29) considering equal µ. They are both pre-stretched isotropically by λ0 = 1.1, i.e. the constrained balloon volume is V0 = 3π (λR)3 /4. The problem is computed by gradually increasing the gravity level, g, pulling on the water inside the balloon. Quadratic finite elements are used. Contact is modeled by the two-half-pass contact algorithm (Sauer and De Lorenzis, 2012) considering the 15 a. b. Figure 6: Inflated square sheet: (a) pressure-volume relation; (b) pressure convergence at V = 5000V0 (compared to a quadratic NURBS mesh with 23233 dofs). a. b. c. Figure 7: Inflated square sheet: deformation at V = 5000 V0 for (a) 8 × 8 linear elements, (b) 4 × 4 quadratic elements, and (c) 8 × 8 NURBS elements. The color shows the area stretch J displayed as log10 J. augmented Lagrange multiplier method. In principle, any 3D contact algorithm can be applied straight forwardly to the proposed membrane formulation. Fig. 9 shows the deformation of balloon and cushion for various gravity levels. As shown, the deformation becomes very large, which makes the problem very challenging. The example is interesting as it involves large deformations, contact, pressure loading, hydrostatic loading and two volume constraints. 4.4 Growth of a hemispherical water droplet As a validation of the formulation for liquid membranes, we consider the growth of a hemispherical droplet resting on a rigid substrate and maintaining a contact angle of 90◦ . The problem is similar to the balloon inflation example (Sec. 4.1), and the same FE meshes are used. For a liquid water membrane the membrane stress is given by Eq. (33), i.e. the stress is deformation independent. This implies that only the out-of-plane but not the in-plane forces provide stiffness and the formulation is unstable in itself. The formulation can be stabilized by adding deformation dependent in-plane forces through Eq. (65.1). These forces should not influence the out-of-plane behavior such that the original liquid membrane formulation remains 16 a. b. Figure 8: Inflated square sheet: deformation at V = 5000 V0 for 88 × 88 NURBS elements: (a) overall deformation, (b) deformation at the corner. unaffected. We simply use the incompressible Neo-Hookean model to provide the additional in-plane stability. The Neo-Hookean material parameter µ then becomes a numerical stability parameter that should not affect the physical results. The internal forces acting on the finite element nodes are then simply given by  αβ  e = f e σ αβ e (78) fint int liquid + finti σsolid . For this example, like in Sec. 4.1, the pressure-volume relation is also know analytically. Setting σ = pr/2 = γ, with r = λR and V = λ3 V0 , we find V 1 pR 0 3 . =2 γ V (79) Since the pressure remains positive (and is thus stabilizing the structure) the volume can also be decreased. The computed pressure and the convergence of the proposed finite element formulation to the analytical result are shown in Fig. 10. Several values for the numerical stability parameter µ are considered. They all converge to the desired analytical result. Quadratic Lagrange and NURBS elements are considered, and it is seen that the NURBS formulation e converges much faster. This is attributed to the higher surface continuity that appears in finti according to Eq. (65.1). Decreasing µ improves the accuracy. A more detailed analysis of the model proposed in Eq (78) along with the effect of parameter µ is required and will be considered in the future. 4.5 Liquid droplet on a rigid substrate The last example examines a static water droplet in contact with a rigid substrate. A distinct feature of liquid membranes is that they can form sharp contact angles at the contact boundary. In this case, the membrane surface forms a kink at the contact boundary. These surface discontinuities are associated with out-of-plane line forces. Such forces are not considered in the present framework. We thus consider a contact angle of 180◦ . Initially, prior to loading and contact, the droplet is spherical. We denote the initial radius R, and the initial volume V0 := 4πR3 /3. The water inside the droplet is considered incompressible such that the volume remains constant during deformation. The weight of the water causes hydrostatic pressure loading of the membrane leading to contact with the substrate. Fig. 11 shows the computed droplet deformation for various gravity values considering different FE formulations. As the 17 Figure 9: Cushion contact: configurations at ρg = {0, 0.2, 0.4, 0.8}µ/R. The coloring shows the stress invariant I1 = tr σ = σαα . gravity level increases the droplet spreads out on the substrate. Formulation (78) is used for the computations. Stability parameter µ is set to 0.005 γ. For this µ, the errors in the surface tension are less than 2.5% in the case of quadratic Lagrange elements (Fig 11, top.) and less than 1% in the case of cubic T-splines (Fig 11, bottom). In both cases the errors increase along with ρg. In the case of Lagrange elements the largest errors are found at the element boundaries, where the formulation is only C 0 -continous. For the T-spline case, which is C 2 continous over the entire surface (appart from two degenerate points at the top and bottom), the error is uniformly spread over the surface. It is remarked that the presented droplet model is much more general than the classical FE droplet formulation of Brown et al. (1980). This is discussed in detail in a forthcoming publication. 5 Conclusion A novel computational formulation that is suitable for both solid and liquid, i.e. surface-tensiondriven, membranes is presented. The theory, outlined in Sec. 2, is based on the differential geometry of curved surfaces, allowing for a very general formulation that accounts for large deformations and general material laws. Curvilinear coordinates are used to formulate the surface geometry, kinematics, constitution, and balance laws. The governing strong and weak forms are split into the in-plane and out-of-plane parts, allowing the use of different approximation techniques for both parts and an elegant treatment of liquid membranes. Also, the consideration of deformation-dependent pressure loading comes naturally within the proposed formulation. Various constraints imposed upon the membranes can be handled by the theory, including volume, area, and contact constraints. The membrane formulation is discretized using nonlinear finite elements. This results in a very efficient formulation that only uses three degrees of freedom per surface node and avoids the use of local cartesian coordinate systems and the transformation of derivatives. This is discussed in Sec. 3. 18 a. b. Figure 10: Growing liquid droplet: (a) pressure-volume relation for V ∈ [1/8 4]V0 (FE result for 12 quadratic FE with µ = 0.01γ); (b) convergence behavior for V = 4 V0 and various µ, considering 3 × 3 Gaussian quadrature points. The capabilities of the formulation are demonstrated by several challenging examples in Sec. 4. Linear Lagrange, quadratic Lagrange, quadratic NURBS, and cubic T-spline finite elements are considered for the discretization. Constraints are imposed using the Lagrange multiplier method in the case of volume constraints and the penalty method for contact constraints. The inflation of a balloon and the growth of a droplet are used to validate the solid and liquid membrane formulations and they both yield excellent results. Comparing the different finite element types, the examples show that large accuracy gains lie between linear and quadratic Lagrange, and between quadratic Lagrange and isogeometric finite elements. The presented membrane formulation has been successfully applied to liquid droplets in this paper, but a rigorous analysis is still needed to assess the approach proposed in Eq. (78). Another important extension to the present formulation is the inclusion of bending stiffness, which can be present in both fluid and solid films. In the latter case this should lead naturally to a rotation-free shell formulation, which can be suitably handled by isogeometric finite elements. A further interesting extension is the consideration and development of different membrane material laws. Such a development is especially important for the case of biological membranes, which are often characterized by complex material behavior. A Consistent linearization of various quantities For Newton’s method we need to linearize the kinematical quantities of the discrete system at x in the direction ∆x. This is done at the FE level. A.1 Linearization of aα According to Eq. (55) we have ∆aα = N,α ∆xe . 19 (80) a. b. Figure 11: Liquid droplet contact: droplet deformation for ρg = {1, 2, 4, 8, 20}γ/R2 , each with identical volume and µ = 0.005 γ: (a) quadratic Lagrange elements, (b) cubic T-spline elements. The color shows the membrane stress I1 /2 normalized by the surface tension γ. In theory I1 /(2γ) = 1. A.2 Linearization of aαβ With definition (3) follows  ∆aαβ = aα · N,β + aβ · N,α ∆xe . A.3 (81) Linearization of J The change ∆J can be written as ∆J = where ∂J · ∆aα , ∂aα (82) ∂J = Jaα . ∂aα (83) ∆J = Jaα · N,α ∆xe . (84) 1 αγ e aγδ eδβ , a (85) Thus A.4 Linearization of aαβ From Eq. (5) and the formula aαβ = 20 a := det aαβ , where   eαβ =  0 1 −1 0  (86) is the unit alternator, we find ∆aαβ = mαβγδ aγ · N,δ ∆xe , with mαβγδ = A.5  1 αγ βδ e e + eαδ eβγ − 2aαβ aγδ . a (87) (88) Linearization of n da The surface normal n appears together with the area element da and it is convenient to linearize them together. According to Eqs. (6) and (20) we have n da = a1 × a2 d . Hence ∆(n da) = X  N,1 ∆xI × a2 + a1 × N,2 ∆xI d . (89) (90) I Expanding ∆xI into ∆xI = ∆xαI aα + ∆xnI n we find   ∆xI × a2 = Ja n ∆x1I − a1 ∆xnI = Ja n ⊗ a1 − a1 ⊗ n ∆xI ,   a1 × ∆xI = Ja n ∆x2I − a2 ∆xnI = Ja n ⊗ a2 − a2 ⊗ n ∆xI , where Ja = p det aαβ = da/d. Thus  ∆(n da) = n ⊗ aα − aα ⊗ n N,α ∆xe da . A.6 (91) (92) Linearization of τ αβ For the solid model according to Eq. (32) we have  ∆τ αβ = µT 2J −3 ∆J aαβ − J −2 ∆aαβ , (93) which can be rewritten into with ∆τ αβ = cαβγδ aγ · N,δ ∆xe , (94)   1 cαβγδ = µT J −2 4aαβ aγδ − eαγ eβδ + eαδ eβγ . a (95) Note that the tensor [cαβγβ ], like [mαβγβ ], posses both major and minor symmetries. For the liquid model according to Eq. (33) we have  ∆τ αβ = γ ∆J aαβ + J ∆aαβ , (96) which can also be written in the form (94), where now cαβγδ = γJ 1 a   eαγ eβδ + eαδ eβγ − aαβ aγδ . 21 (97) B B.1 Finite element tangent matrices Tangent matrix associated with Geint e , given in Eq. (63), yields The internal force vector fint Z Z e = NT,α τ αβ N,β dA ∆xe . ∆fint NT,α ∆τ αβ N,β dA xe + (98) Ωe0 Ωe0 In view of Eq. (94), we can write  e = ke e ∆fint mat + kgeo ∆xe where we have introduced the material stiffness matrix Z e cαβγδ NT,α (aβ ⊗ aγ ) N,δ dA kmat = Ωe0 (99) (100) and the geometric stiffness matrix kegeo Z = Ωe0 NT,α τ αβ N,β dA (101) Both these matrices are symmetric for the two constitutive models considered here. For those models, the terms in kemat should be multiplied-out a-priory to obtain an efficient implemene into f e e tation. If we consider splitting fint inti and finto additional stiffness terms are picked up. These are reported in a forthcoming publication. B.2 Tangent matrix associated with Geext From Eq. (67), for dead f 0 and t̄, we have Z Z T e N n ∆p da + ∆fext = Ωe NT p ∆(n da) . (102) Ωe The first term is only required for hydrostatic loading according to Eq. (74). Here we find ∆p = −ρ g N ∆xe . Contribution ∆(n da) is given by Eq. (92). As a result, Z Z  keext = − ρ NT n ⊗ g N da + p NT n ⊗ aα − aα ⊗ n N,α da . Ωe B.3 (103) (104) Ωe Tangent contributions associated with the volume constraint If the volume constraint gv = 0 is active, we need to account for the unknown Lagrange multiplier pv in the linearization. For the external forces we now have e = ke ∆x + le ∆p , ∆fext e v ext ext with leext ∂f e = ext = ∂pv Z 22 Ωe NT n da . (105) (106) Further, at the element level, ∆gve = hev ∆xe , with hev ∂g e 1 = v = ∂xe 3 Z 1 n · N da + 3 e Ω Z  x · n ⊗ aα − aα ⊗ n N,α da . (107) (108) Ωe The preceding contributions can be arranged into the elemental tangent matrix   keint − keext −leext   ke :=  , e hv 0 (109) which describes the change in fint − fext and gv due to changes in position xe and pressure pv . Acknowledgements The authors are grateful to the German Research Foundation (DFG) for supporting this research under projects SA1822/3-2, SA1822/5-1 and GSC 111. References Ambroziak, A. and Klosowski, P. (2006). A four-node 3D isoparametric membrane element. Task Quarterly, 10(1):35–47. Arciniega, R. A. and Reddy, J. N. (2007). Tensor-based finite element formulation for geometrically nonlinear analysis of shell structures. Comput. Methods Appl. Mech. Engrg., 196(4-6):1048–1073. Benson, D. J., Bazilevs, Y., Hsu, M.-C., and Hughes, T. J. R. (2011). A large deformation, rotation-free, isogeometric shell. Comp. Methods Appl. Mech. Engrg., 200(13-16):1367–1378. Bletzinger, K.-U., Wüchner, R., Daoud, F., and Camprubi, N. (2005). Computational methods for form finding and optimization of shells and membranes. Comput. Meth. Appl. Mech. Engrg., 194(30-33):3438–3452. Bonet, J., Wood, R. D., and Mahaney, J. (2000). Aspects of the analysis of membrane structures. In Computational civil and structural engineering, pages 105–113. Civil-Comp. Press. Borden, M. J., Scott, M. A., Evans, J. A., and Hughes, T. J. R. (2011). Isogeometric finite element data structures based on bezier extraction of NURBS. Int. J. Numer. Meth. Engng., 87:15–47. Brown, R. A., Orr, F. M., and Scriven, L. E. (1980). Static drop on an inclined plate: Analysis by the finite element method. J. Colloid Interface Sci., 73(1):76–87. Bufler, H. (1984). Pressure loaded structures under large deformations. J. Appl. Math. Mech., 64(7):287–295. Contri, P. and Schrefler, B. (1988). A geometrically nonlinear finite element analysis of wrinkled membrane surfaces by a no-compression material model. Commun. Appl. Numer. M., 1(4):5– 15. 23 De Lorenzis, L., Temizer, I., Wriggers, P., and Zavarise, G. (2011). A large deformation frictional contact formulation using NURBS-based isogeometric analysis. Int. J. Numer. Meth. Engng., 87:1278–1300. Dung, N. T. and Wells, G. N. (2008). Geometrically nonlinear formulation for thin shells without rotation degrees of freedom. Comput. Methods Appl. Mech. Engrg., 197:2778–2788. Flores, F. G. and Estrada, C. F. (2007). A rotation-free thin shell quadrilateral. Comput. Methods Appl. Mech. Engrg., 196(25-28):2631–2646. Fried, I. (1982). Finite element computation of large rubber membrane deformations. Int. J. Numer. Mech. Engng., 18:653–660. Gosling, P. and Lewis, W. (1996). Optimal structural membranesi. formulation of a curved quadrilateral element for surface definition. Comput. Struct., 61(5):885–895. Gurtin, M. E. and Murdoch, I. (1975). A continuum theory of elastic material surfaces. Arch. Rat. Mech. Anal., 57(4):291–323. Haseganu, E. M. and Steigmann, D. J. (1994). Analysis of partly wrinkled membranes by the method of dynamic relaxation. Comput. Mech., 14(6):596–614. Ibrahimbegovic, A. and Gruttmann, F. (1993). A consistent finite element formulation of nonlinear membrane shell theory with particular reference to elastic rubberlike material. Finite Elem. Anal. Des., 13(1):75–86. Kiendl, J., Bazilevs, Y., Hsu, M.-C., Wüchner, R., and Bletzinger, K.-U. (2010). The bending strip method for isogeometric analysis of kirchhoff-love shell structures comprised of multiple patches. Comput. Methods Appl. Mech. Engrg., 199(37-40):2403–2416. Kloeppel, T. and Wall, W. A. (2011). A novel two-layer, coupled finite element approach for modeling the nonlinear elastic and viscoelastic behavior of human erythrocytes. Biomech. Model. Mechanobiol., 10(4):445–459. Linhard, J., Wüchner, R., and Bletzinger, K.-U. (2007). ”Upgrading” membranes to shells The CEG rotation free element and its application in structural anaylsis. Finite Elem. Anal. Des., 44(1-2):63–74. Lu, K., Accorsi, M., and Leonard, J. (2001). Finite element analysis of membrane wrinkling. Int. J. Numer. Meth. Engng., 50(5):1017–1038. Manh, N. D., Evgrafov, A., Gersborg, A. R., and Gravesen, J. (2011). Isogeometric shape optimization of vibrating membranes. Comp. Meth. Appl. Mech. Engrg., 200(13-16):1343– 1353. Muttin, F. (1996). A finite element for wrinkled curved elastic membranes, and its application to sails. Comm. Numer. Meth. Engng., 12:775–785. Nguyen-Thanh, N., Kiendl, J., Nguyen-Xuan, H., Wüchner, R., Bletzinger, K.-U., Bazilevs, Y., and Rabczuk, T. (2011). Rotation free isogeometric thin shell analysis using pht-splines. Comput. Methods Appl. Mech. Engrg., 200(47-48):3410–3424. Oden, J. T. (2006). Finite Elements of Nonlinear Continua. Dover Edition. Oden, J. T. and Sato, T. (1967). Finite strains and displacements of elastic membranes by the finite element method. Int. J. Solids Struct., 3(4):471–488. 24 Roddeman, D., Drukker, J., Oomens, C., and Janssen, J. (1987). The wrinkling of thin membranes: Part II. Nnumerical analysis. J. Appl. Mech., 54(4):888. Rumpel, T. and Schweizerhof, K. (2003). Volume dependent pressure loading and its influence on the stability of structures. Int. J. Numer. Meth. Engng., 56:211–238. Sauer, R. A. (2011). Enriched contact finite elements for stable peeling computations. Int. J. Numer. Meth. Engrg., 87:593–616. Sauer, R. A. (2012). Local finite element enrichment strategies for 2D contact computations and a corresponding postprocessing scheme. submitted to Comput. Mech. Sauer, R. A. and De Lorenzis, L. (2012). A computational contact formulation based on surface potentials. Comput. Methods Appl. Mech. Engrg., in press. Sauer, R. A. and Li, S. (2007). An atomic interaction-based continuum model for adhesive contact mechanics. Finite Elem. Anal. Des., 43(5):384–396. Schweizerhof, K. and Ramm, E. (1984). Displacement dependent pressure loads in nonlinear finite element analyses. Comput. Struct., 18(6):1099–1114. Scott, M. A., Borden, M. J., Verhoosel, C. V., Sederberg, T. W., and Hughes, T. J. R. (2011). Isogeometric finite element data structures based on Bézier extraction of T-splines. Int. J. Numer. Meth. Engng., 88(2):126–156. Stanuszek, M. (2003). FE analysis of large deformations of membranes with wrinkling. Finite. Elem. Anal. Des., 39(7):599–618. Steigmann, D. J. (1999). On the relationship between the Cosserat and Kirchhoff-Love theories of elastic shells. Math. Mech. Solids, 4:275–288. Tang, S. C. (1982). Large strain analysis of an inflating membrane. Comput. Struct., 15(1):71– 78. Temizer, I., Wriggers, P., and Hughes, T. J. R. (2012). Three-dimensional mortar-based frictional contact treatment in isogeometric analysis with NURBS. Comput. Methods Appl. Mech. Engrg., 209-212:115–128. Weinberg, K. and Neff, P. (2008). A geometrically exact thin membrane model - investigation of large deformation and wrinkling. Int. J. Numer. Meth. Engng., 74:871–893. Wriggers, P. (2006). Computational Contact Mechanics. Springer, 2nd edition. Wriggers, P. (2008). Nonlinear Finite Element Methods. Springer. Wriggers, P. and Taylor, R. L. (1990). A fully non-linear axisymmetrical membrane element for rubber-like materials. Engrg. Comput., 7(1):303–310. Wu, B., Du, X., and Tan, H. (1996). A three-dimensional FE nonlinear analysis of membranes. Comput Struct., 59(4):1–5. Youn, S.-K. and Lee, E.-S. (2006). Finite element analysis of wrinkling membrane structures with large deformations. Finite Elem. Anal. Des., 42(8-9):780–791. 25
5cs.CE
Spatial Resource Allocation for Spectrum Reuse in Unlicensed LTE Systems arXiv:1708.09155v1 [cs.IT] 30 Aug 2017 Rui Yin1,2 , Amine Maaref3 , and Geoffrey Ye Li4 1. School of Information and Electrical Engineering, Zhejiang University City College, Hangzhou, China 2. School of Electrical, Electronic and Computer Engineering, University of KwaZulu-Natal, Durban, South Africa 3. Canada Research Centre, Huawei Technologies Canada Co., Ltd, Ottawa, Ontario, Canada 4. School of Electrical and Computer Engineering, Georgia Institute of Technology, United States Email: [email protected], [email protected], [email protected] Abstract—In this paper, we study how to reuse the unlicensed spectrum in LTE-U systems while guaranteeing harmonious coexistence between the LTE-U and Wi-Fi systems. For a small cell with multiple antennas at the base station (SBS), some spatial degrees of freedom (DoFs) are used to serve small cell users (SUEs) while the rest are employed to mitigate the interference to the Wi-Fi users by applying zero-forcing beamforming (ZFBF). As a result, the LTE-U and Wi-Fi throughput can be balanced by carefully allocating the spatial DoFs. Due to the channel state information (CSI) estimation and feedback errors, ZFBF cannot eliminate the interference completely. We first analyze the residual interference among SUEs, called intra-RAT interference, and the interference to the Wi-Fi users, called inter-RAT interference after ZFBF, due to imperfect CSI. Based on the analysis, we derive the throughputs of the small cell and the Wi-Fi systems, respectively. Accordingly, a spatial DoF allocation scheme is proposed to balance the throughput between the small cell and the Wi-Fi systems. Our theoretical analysis and the proposed scheme are verified by simulation results. I. I NTRODUCTION The scarce licensed spectrum is the main bottleneck to further improve the data rates in the fifth generation (5G) wireless communications. To alleviate this spectrum gridlock, spectrum efficiency (SE) on the licensed bands has been improved at the greatest extent. On the other hand, extra spectrum resource on the unlicensed bands has been also considered for LTE, which is called LTE-U [1]. Most current works focus on how to improve the SE on the licensed bands in LTE systems. By exploiting the spatial freedom, multiple-input multiple-output (MIMO) can boost the SE by the scale of the number of antennas [2], especially in the ultra-dense small cell base station (SBS) on the unlicensed spectrum with both small cell users (SUEs) and Wi-Fi users. Conventionally, unlicensed bands are shared by different radio access technologies (RATs) and mainly occupied by the Wi-Fi systems. In order to share the unlicensed bands harmoniously, distributed channel access is used in Wi-Fi [3]. In contrast, LTE is with centralized-scheduling structure due to its exclusive usage of the licensed bands [4] and has higher SE. How to exploit highly efficient spectrum management techniques of LTE in the unlicensed bands and how to guarantee the harmonious coexistence with Wi-Fi systems are the most important issues to realize an LTE-U system. With little modification on the current LTE protocol, a duty cycle method has been proposed for LTE-U in [5], where LTE periodically turns the signal on and off by using almost blank subframe (ABSs) on the unlicensed bands and the WiFi users access the unlicensed bands when the LTE signal is off. To further reduce the impact to the Wi-Fi system, listen-before-talk (LBT) mechanism has been proposed for the LTE-U systems in [6], where LTE senses the unlicensed bands before using them. In [7], we have proposed an adaptive channel access scheme based on LBT mechanism for LTE-U systems. When a SBS shares unlicensed channels with the WiFi system and reuses the licensed channels with the macro cell, the tradeoff between the collision probability experienced by the Wi-Fi users and the co-channel interference to the macro cell users has been analysed in [8]. In the paper, we study how to use MIMO in the LTEU systems to reuse the unlicensed spectrum. To guarantee a fair coexistence between the LTE-U and the Wi-Fi systems, zero-forcing beamforming (ZFBF) is employed at the SBS to mitigate the interference among SUEs, called intra-RAT interference, and the interference to the Wi-Fi system, called inter-RAT interference. First, a general framework to realize the unlicensed spectrum reuse by applying ZFBF technique is formulated for the LTE-U system. Since the channel state information (CSI) available at the SBS is imperfect, the residual intra-RAT and inter-RAT interference are analyzed first. Then, the achievable throughputs for the small cell and the Wi-Fi are derived. Since throughputs of the small cell and the Wi-Fi depend on the assigned spatial degree of freedom (DoF), we will develop a DoF allocation scheme to balance the small cell and Wi-Fi throughput. II. S YSTEM M ODEL In the paper, we assume that an LTE-U SBS coexists with one Wi-Fi access point (AP) to share one unlicensed band simultaneously in the system. The SBS serves downlink transmission to SUE set, U, with |U| = U , and the Wi-Fi AP serves user set, M, with |M| = M . We assume that the Wi-Fi users have the same type of data traffic. Therefore, the number of the Wi-Fi users can represent the Wi-Fi traffic load. The SUE and the Wi-Fi users have one antenna. The SBS has NT antennas. ZFBF is employed at the SBS to mitigate the intra- RAT interference among SUEs, and the inter-RAT interference to the Wi-Fi users during the downlink transmission. It also mitigates the inter-RAT interference to the Wi-Fi AP during the Wi-Fi uplink transmission. If N spatial DoFs are used to serve K SUEs, denoted as a set Us (K = |Us |), in the small cell system and one DoF is used to mitigate interference for the Wi-Fi AP, then the left over spatial DoFs are used to mitigate the interference to NT − N − 1 Wi-Fi users, denoted as a set Ms (NT − N − 1 = |Ms |). On the Wi-Fi side, WiFi users compete for the unlicensed band based on the DCF mechanism where an exponential backoff scheme with the minimum backoff window size, W , and maximum contention stage, L, are employed to avoid the collision. Denote hk as the channel vector between the SBS and the SUE k. The elements in the channel vector are assumed to be independent and identical distributed (i.i.d.) complex Gaussian random variables with zero mean and unit variance, which can be obtained at the SBS via the feedback from the SUEs. To mitigate the interference to the Wi-Fi users, the SBS also needs to know the CSI to the Wi-Fi users and to the Wi-Fi AP. We assume that the Wi-Fi AP interface is integrated into the SBS [9]. Therefore the SBS can monitor the Wi-Fi signals on the unlicensed spectrum. After receiving the preambles from the Wi-Fi users and the AP, the SBS can estimate CSI from the Wi-Fi users and the Wi-Fi AP to the SBS. The CSI from the Wi-Fi users or the Wi-Fi AP to the SBS can be obtained by exploiting channel reciprocity A. SINR of small cell users Denote Am as the path-loss factor of the interference channel from the SBS to the Wi-Fi user m, f m as the corresponding small-scale channel fading vector from the SBS to the Wi-Fi user m, and D as the channel fading vector from the SBS to the Wi-Fi AP. All elements in the above defined vectors are i.i.d. complex Gaussian random variables with zero mean and unit variance. Then, with the overall CSI, for SUE k ∈ U, its complementary channel matrix is given by H k = [f1 , · · · , fNT −N−1 , D, h1 , · · · , hk−1 , hk+1 , · · · , hK ]. (1) For ZFBF, the precoder, vk , for SUE k can be derived based on the singular value decomposition (SVD) to its complementary channel matrix H k . Denote Uk⊥ as the null space of H k , which is spanned by the right singular vectors with zero singular value. The precoder, vk , can be calculated as the normalized projection vector from hk to Uk⊥ . With ZFBF, the received signal at SUE k is given by r r K PT H PT X yk = hk vk sk + hH k vi si + nk , (2) K K However, in practice, the SBS obtains the CSI from the quantization codeword index feedback from the SUEs [10]. According to the random vector quantization theory [11], the normalized CSI, h̃k = hk / khk k, for SUE k can be decomposed into ek = h bk + 1 − bh √ bc, (3) where b indicates the quantization error, scaling from 0 to 1, b k is the estimated channel vector obtained by feedback and c h is a unit norm vector isotropically distributed in the null space b k and is independent of b. If b = 0, then the SBS has the of h perfect CSI. b is related to the codebook size 2B and is upper B bounded by 2− Nt −1 [12]. Based on (3), (2) can be rewritten as yk = r PT H h v k sk + K k q r PT K K X √ i=1,i6=k bkhk k2 cH vi si + nk , (4) √ 2 PT where bkhk k cH vi si is the residual interi=1,i6=k K ference due to the error in available channel vector since b H vi = 0 for ∀i 6= k. Based on equation (4), the achievable h k signal-to-interference-plus-noise power ratio (SINR) at SUE k is given by PK hH k vk SIN Rk = K PT 2 N0 + bkhk k 2 K P i=1,i6=k , (5) |cH vi |2 where N0 is the addition of noise and interference power. Notice that the interference from the Wi-Fi users to the SUEs is treated as the noise in the paper. From (5), we can observe that the achievable SINR in SUE k is restricted by the residual interference due to the CSI error. B. Wi-Fi throughput Based on [13], the Wi-Fi user transmission probability on the unlicensed band can be written as τ = 2 × (1 − 2pF ) , (1 − 2pF )(W + 1) + pF W (1 − (2pF )L ) where pF = 1 − (1 − τ )M −1 (6) (7) is the collision probability and PS = M τ (1 − τ )M −1 1 − (1 − τ )M (8) is the conditional successful transmission probability for the Wi-Fi users. Based on (8), the Wi-Fi throughput can be written as [13] Rw = i=1,i6=k where PT is the transmit power, sk is the transmitted signal to SUE k, nk is sum of the noise and interference received at SUE k. If accurate CSI is known at the SBS, then the intraand inter-RAT interference can be eliminated completely, e.g., H hH i vk = 0, ∀i 6= k, i ∈ Us , fm vk = 0, ∀m ∈ H Ms , D vk = 0. √ where PT PS E{P ackage} , (1 − PT )δ + PT PS Qs + PT (1 − PS )Qc PT = 1 − (1 − τ )M , (9) (10) is the probability that there is at least one transmission on the unlicensed channel, E{P ackage} is the average packet payload size for Wi-Fi transmission, δ is the duration of an empty time slot, Qs is the average channel occupied time due to a successful transmission, and Qc is the average channel busy time sensed by the Wi-Fi users due to collision [13]. From (7), (8), (9) and (10), the Wi-Fi throughput is directly related to the number of the Wi-Fi users, M , competing for the unlicensed bands. When the SBS reuses the unlicensed band, the Wi-Fi users will suffer inter-RAT interference, including those Wi-Fi users selected for interference cancellation by ZFBF at the SBS due to imperfect CSI available at the SBS. We use the common channel uncertain model [11] to express the channel vector between the SBS and the Wi-Fi user m fm = √ εfm,0 + √ 1 − εφ, (11) where fm,0 is the estimated CSI between the SBS and the WiFi user m, φ is the estimation error vector with zero mean and unit variance complex Gaussian distributed entries. ε is the correlation factor. Since the locations of the Wi-Fi AP and the SBS are always static, we assume that the SBS can obtain the perfect CSI from the SBS to the Wi-Fi AP. Therefore, we have DH v k = 0, ∀k ∈ Us . where E1 (·) is the exponential integral function of the first order. According to (13), the small cell throughput is related to the number of served SUEs, K, the feedback bits, B, and the total transmission power, PT . As we have indicated after (5), intra-RAT interference increases with the number of served SUEs. As a result, the system throughput may not increase with K. Therefore, there exists an optimal value K to maximize the small cell throughput for given feedback bits, B, and total transmission power, PT . B. Wi-Fi throughput Inter-RAT interference to the Wi-Fi users can be divided into two categories according to whether they are selected for interference cancellation. If the Wi-Fi users are selected for the interference cancellation at the SBS, then there exists residual interference due to imperfect CSI. According to (11), the residual interference from the SBS to Wi-Fi user m is given by K Im = Based on (5), the cumulative distribution probability (CDF) of x ∼ SIN Rk can be expressed in the following lemma. Lemma 1: The CDF of SIN Rk for each SUE k is given by F (x) = 1 − exp(− PKT N0 x) (1 + σx)K−1 . (12) ′ Denote f (x) = F (x) as the corresponding probability density function (pdf). Then, we can derive the throughput of the small cell as Z ∞ log(1 + x)f (x)dx (13) Rs = K 0 K log2 (e) KN0 −1 ψ(− , σ , K − 1), σ K−1 PT where ψ(x, y, z) = Z 0 = z X i−1 (−1) i=1 −z +(y − 1) and    z−1 P k=1 = = PT Am (1 − ε) K Then, the pdf of variable lemma. K X K X √ PT Am 1 − εφH vk K ∞ exp(−xt) dt (t + 1)(t + y)z −i (1 − y) I2 (x, y, z − i + 1) I2 (x, 1, 1), exp(xy)E1 (xy), z = 1, z−k−1 (k−1)! (−x) (z−1)! yk + (−x)z−1 (z−1)! exp(xy)E1 (xy), z > 2, 2 k=1 2 φH vk , (14) k=1 PK k=1 φH vk Lemma 2: The variable x ∼ A. SBS throguhput = 2 k=1 III. P ERFORMANCE A NALYSIS In this section we first analyze the intra-RAT residual interference among SUEs and derive the throughput of the small cell on the unlicensed band. Then, inter-RAT interference to the Wi-Fi users are analyzed and the Wi-Fi system throughput is derived accordingly. X PT H Am fm vk K distributed, whose PDF is given by 2 K P is as in the following φH vk 2 is Gamma k=1 x f (x; 2K, K) = x2K−1 e− K , for x > 0, K 2K Γ(2K) (15) where Γ(2K) is the Gamma function evaluated at K. Proof: Since elements in φ are complex Gaussian dis2 tributed with zero mean and unit variance in (11), φH vk is exponential distributed with mean 1 [10]. Then x = PK 2 H k=1 φ vk , the sum of exponential distributed variables, is wtih Gamma distribution of parameters 2K and K, as expressed in (15). On the other hand, if the Wi-Fi user is not selected for interference cancellation, inter-RAT interference from the SBS will be high, which is given by K X 2 PT Ibn = An fnH vk , ∀n ∈ / Ms , n ∈ M. K k=1 From Lemma 2, the variable K P k=1 fnH vk 2 (16) is also Gamma distributed with the same pdf as (15). If the interference power experienced by a Wi-Fi user is ¯ i.e. Im > I¯ or Ibn > I, ¯ the Wigreater than a threshold I, Fi user is unable to access the unlicensed band. Therefore, the access probability for selected Wi-Fi user m and the non¯ selected Wi-Fi user n is written as Pr (m) = Pr (Im ≤ I) ¯ respectively. With the access and Pr (n) = Pr (Ibn ≤ I), probability, the average number of Wi-Fi users competing for P P (i). the access to the unlicensed channel is M = r i∈M Then, substituting M into (6), (7), and (8), we can achieve the Wi-Fi system throughput from (9). Based on [13], the WiFi throughput increases with the number of the active Wi-Fi users if the Wi-Fi system is with light load. On the other hand, it decreases with the number of the active Wi-Fi users if the Wi-Fi system is overloaded. Therefore, the Wi-Fi system throughput is convex with respect to the number of the Wi-Fi users. In this paper, we focus on the scenario that the Wi-Fi system is not overloaded. IV. D O F A LLOCATION The tradeoff between the SBS and the Wi-Fi system throughput can be achieved via spatial DoF allocation based on the performance analysis in the last section. Obviously, more spatial DoFs used for the inter-RAT interference mitigation, less SUEs can be served by the SBS. As a result, more WiFi throughput can be achieved. On the other hand, if fewer spatial DoFs are applied to mitigate the inter-RAT interference to the Wi-Fi users, more spatial DoFs are available at the SBS and higher SBS throughput is expected. Therefore, there is a fundamental tradeoff between the small cell and the Wi-Fi throughput via spatial DoF allocation. To analyze this tradeoff while guaranteeing the fair coexistence, We formulate the problem as max min{es Rs , ew Rw } Us ,Ms ,N TABLE I D O F ALLOCATION A LGORITHM Algorithm 1 1: Initialize a counter, j=0, the number of spatial DoF allocated to Wi-Fi users(D(j) = 0), temp = big value, Dmax = NT , Dmin = 0, ∆(j) = big value, ∆pm (j) = 0(the increase on the access probability if W i − F i user m is selected), ∀m ∈ M, es Rs (j)=0, ew Rw (j)=0; 2: while |es Rs (j) − ew Rw (j)| ≤ temp do min 3: temp = ∆(j), D(j) = ⌊ Dmax +D ⌋, where ⌊·⌋ is the least integer 2 Dmax +Dmin , N = Nt − D(j) − 1; less than 2 4: for m ∈ M do 5: Calculate the increase on access probability, ∆pm (j), based on (14), Lemma 2, and (16), when SUE m is selected for the interference mitigation; 6: end for 7: Sort Wi-Fi users by the value of ∆pm (j) from big to small; 8: Select the first D(j) Wi-Fi users to formulate a selected Wi-Fi user set, Ms (j), calculate the average number of active Wi-Fi users; 9: Using the exhaustive search method to find the optimal number of SUEs, K, to maximize the small cell throughput based on (13) with the available spatial DoF, N ; 10: Calculate SBS throughput, Rs , based on (13), and Wi-Fi throughput, Rw based on (9); 11: if es Rs (j) − ew Rw (j) > 0 then 12: j = j + 1, Dmax = D(j); 13: else 14: j = j + 1, Dmin = D(j); 15: end if 16: ∆(j) = |es Rs (j) − ew Rw (j)|; 17: end while 18: Output the DoF allocated to the Wi-Fi users, D(j), selected Wi-Fi user set Ms (j), and the SBS throughput, Rs (j), and the Wi-Fi throughput, Rw (j); (17) subject to |Us | = K, Rs ≥ r̄s , K Rw ≥ r̄w , M 2 ≤ K ≤ N, , N + |Ms | = Nt − 1, (17b) (17c) (17d) (17e) where es and ew are weight factors associated to the SBS and Wi-Fi throughput, respectively, and are used to tradeoff their throughput and guarantee the fair coexistence. |Us | and |Ms | represent the number of SUEs and the selected Wi-Fi users, respectively. N is the number of spatial DoFs allocated to SUEs. r̄s and r̄w are the average data rate requirements for SUEs and the Wi-Fi users, respectively. The objective function in (17) is to maximize the minimum weighted throughput of the small cell and the Wi-Fi systems. Constraints (17b) and (17c) represent the average data rate requirements for the SUEs and the Wi-Fi users, respectively. Constraint (17d) means that the number of the selected SUEs should be less than or equal to the number of the DoFs allocated to the SUEs. Constraint (17e) denotes the total available DoF constraint. To solve problem (17), we set a new variable z to replace the objective function in (17). Then the problem is transformed into max z Us ,Ms ,N (18) subject to (17b), (17c), (17d), and z ≥ es Rs , z ≥ ew Rw . (18a) Since the number of spatial DoFs is an integer, problem (18) is a mixed integer program problem. To find the solution for problem (18), we first need to decide the number of spatial DoFs allocated to the serve the SUEs and mitigate the interference to the Wi-Fi users, respectively. After that, the number of the served SUEs and the Wi-Fi user selection for interference mitigation need to be decided. Therefore, two loops are required to find the solution for (17). In the outer loop, a bisection method is applied to decide the spatial DoF allocation. In the inner loop, the SBS selects the Wi-Fi users to maximize the average number of the active WiFi users since the Wi-Fi throughput increases with the number of the served Wi-Fi users when it is not overloaded. Based on [14], the optimal solution for (18) should satisfy the condition that es Rs is equal or close to ew Rw , which is used to judge whether the solution is reached. The corresponding algorithm is summarized in Table I. When selecting the Wi-Fi users in step 4 in Table I for interference mitigation, the increase on the channel access probability, ∆pm (j), for each Wi-Fi user m is first calculated based on (14), (15), and (16) if Wi-Fi m is selected. Then, the Wi-Fi users are sorted by the value of ∆pm in decreasing V. S IMULATION R ESULTS 130 125 Rs (Mbits) order. The first D(j) Wi-Fi users for the interference cancelation at the SBS are selected to maximize the number of the active Wi-Fi users. The exhaustive search method is applied to find the optimal number of the served SUEs to maximize the small cell throughput when the available spatial DoFs are N = Nt − D(j) − 1 for the SUEs. Numerical simulation results are presented in this section to verify the above analysis and the effectiveness of the proposed schemes. We assume that there is one SBS with 200 m coverage with one Wi-Fi AP in its coverage. The rest major simulation parameters are listed in Table II, where SIFS and DIFS are the short interframe space and the distributed interframe space in the DCF protocol, respectively. B=8: Simulation B=8: Analysis B=4: Analysis B=4: Simulation 120 115 110 2 3 4 5 6 7 8 K Fig. 1. Achievable small cell throughput when the number of served SUEs changes TABLE II S IMULATION PARAMETERS Value 8 200 12000bits 180 192bits 160 224bits 16µs 34µs Rw (Mbits) Parameters Number of antennas at the SBS Wi-Fi packet payload MAC header of Wi-Fi packet PHY header of Wi-Fi packet SIFS DIFS Channel bit rate for Wi-Fi Wi-Fi backoff window size W Wi-Fi maximum backoff stage L Wi-Fi slot time size, σ Unlicensed bandwidth Transmission power limit on unlicensed channel AWGN noise power Average data rate requirement of SUEs Average data rate requirement of Wi-Fi users 140 120 300Mbps 100 16µs 80 Package length=12000 Package legnth=24000 6 60 20µs 20MHz 23mw 0 2 4 6 8 10 M Fig. 2. Wi-Fi throughput when the number of served Wi-Fi users changes −174dBm/Hz 10Mbps 10Mbps A. Verification on the performance analysis First, we validate the theoretical claims in Section III through numerical simulation. In Fig. 2, we demonstrate the change on the small cell throughput with different numbers of SUEs served by the SBS. When the CSI feedback bits are 8, the small cell system throughput will increase with the number of served SUEs. On the other hand, if the number of feedback bits are 4, the maximum throughput is achieved when the number of served SUEs is 2. As we have explained after equation (13) in Section III, when the number of CSI feedback bits is not enough, the small cell throughput may decrease with the increase on the number of the served SUEs due to the CSI quantization error. In this case, serving more SUEs is not helpful to the small cell throughput due to the limited CSI feedback bits. In the following simulation, we use 8 feedback bits to quantize the CSI between the SBS and SUEs. From the figure, the theoretical and simulation results are quite close. Fig. 3 shows that the Wi-Fi system throughput varies with the number of the active Wi-Fi users. We assume the Wi-Fi users have the same type of traffic. Therefore, the number of the Wi-Fi users can be used to evaluate the Wi-Fi traffic load in our work. We can observe that the Wi-Fi throughput is convex with respect to the number of the active Wi-Fi users. When the number of the Wi-Fi users is fewer than 5, the Wi-Fi throughput will increase with the number of the Wi-Fi users. On the other hand, if the number of the Wi-Fi users is larger than 5, the Wi-Fi throughput will decrease with the number of Wi-Fi users. B. Performance of Algorithm 1 In this section, we assume that the number of the Wi-Fi users is fewer than 5. To verify the performance of Algorithm 1, we demonstrate the achievable throughput of the SBS and 140 130 120 Rs/Rw (Mbits) the Wi-Fi system in Table III when different weight factors are assigned to them. As we can observe, when the weight factor for the Wi-Fi throughput is bigger than that for the small cell throughput, most spatial DoFs will be allocated to the Wi-Fi users via the algorithm. On the other hand, as the the weight factor for the SBS throughput increases, the achievable throughput at the SBS also increases since more spatial DoFs will be available to the SUEs. Therefore, the tradeoff between the small cell throughput and Wi-Fi throughput can be obtained via Algorithm 1 when the WiFi system is not overloaded. Notice that the LTE utilizes the resource more sufficient than the Wi-Fi system. Therefore, more spatial DoFs have to be allocated to the Wi-Fi users. To explain this point more clearly, we use one snapshot to show the change on SBS and Wi-F throughput with the spatial DoF allocation in Fig. 4. From the figure, the small cell throughput increases when its allocated spatial DoF increases while the achievable throughput at Wi-Fi decreases. Moreover, the achievable throughput at the SBS is always higher than the Wi-Fi throughput since the efficient utilization on the unlicensed spectrum by LTE-U. 110 100 90 80 Small cell throughput Wi-Fi throughput 70 60 2 3 4 5 6 N Fig. 3. Small cell and Wi-Fi throughput v.s. spatial DoF allocation TABLE III S IMULATION PARAMETERS Weight factor (0.1, 0.9) (0.15, 0.85) (0.2, 0.8) (0.25, 0.75) (0.3, 0.7) (0.35, 0.65) (0.4, 0.6) (0.45, 0.55) (0.5, 0.5) Small cell throughput (Mbits) 130.57 130.57 130.57 130.57 130.57 129.6 129.6 125 125 Wi-Fi throughput (Mbits) 61.71 61.71 61.71 61.71 61.71 86 86 98 98 Spatial DoF allocation (6, 1) (6, 1) (6, 1) (6, 1) (6, 1) (5, 2) (5, 2) (2, 5) (2, 5) VI. C ONCLUSIONS In the paper, we have applied the ZFBF technique to the SBS in the LTE-U system to realize the spectrum reuse on the unlicensed band with Wi-Fi system. The spatial DoF allocation scheme is developed to tradeoff the small cell and the Wi-Fi throughput after the analysis on small cell and Wi-Fi throughput. Through the simulation, the theoretical analysis and the effectiveness of the proposed scheme have been verified. VII. ACKNOWLEDGEMENT This work was supported in part by National Natural Science Foundation Program of China under Grant No. 61771429 No. 61301143, and No. 61771428, and Natural Science Foundation Program of Zhejiang Province under Grant No. LY14F010002. R EFERENCES [1] 3GPP, Study on licensed-assisted access to unlicensed spectrum, 3GPP TR 36.889 V13.0.0(2015-6), T.S.G.R.A Network, 2015. [2] V. Jungnickel, K. Manolakis, W. Zirwas, B. Panzner, V. Braun, M. Lossow, M. Sternad, R. Apelfrojd, and T. Sevensson, “The role of small cells, coordinated multipoint, and massive MIMO in 5G,” IEEE Commun. Mag., vol. 52, no. 5, pp. 44-51, May 2014. [3] E. Perahia, and R. Stacey, Next generation wireless LANs: 802.11n and 802.11ac, Cambridge University Press, 2013. [4] Release 13-3GPP, http://www.3gpp.org/release-12. [5] E. Almedia, A. Cavalante, R. Paiva, F. Chaves, F. Abinader, R. Vieira, S. Choudhury, E. Tuomaala, and K. Dopper, “Enabling LTE/Wi-Fi coexistence by LTE blank in unlicensed bands” in Proc. IEEE ICC, Budapest, Jun. 2013, 5083-5088. [6] EN 301 893 v1.7.1, European Telecommuni. Standards Institute, June, 2012. [7] R. Yin, G. Yu, M. Amine, and Y. Li, “LBT based adaptive channel access for LTE-U systems,” IEEE Trans. Wireless Commun., vol. 15, no. 10, pp. 6585-6597, Jun. 2016. [8] R. Yin, G. Yu, M. Amine, and Y. Li, “A framework for co-channel interference and collision probability tradeoff in LTE licensed-assisted access networks,”, IEEE Trans. Wireless Commun., vol. 15, no. 9, pp. 6078-6090, Jun. 2016. [9] Q. Chen, G. Yu, H. Elmaghraby, J. Hamalainen, and Z. Ding, “Embedding LTE-U within Wi-Fi bands for spectrum efficiency improvemnt,” IEEE Network Mag., Accepted. [10] J. Zhang, R. W. Health, Jr. M. Kountouris, and J. G. Andrews, “Mode switching for the multi-antenna broadcast channel based on delay and channel quantization,” EURASIP J. on Advances Signal Processing, vol. 2009, Feb. 2009. [11] Y. Isukapalli and B. Rao, “Finite rate feedback for spatially and temporally correlated MISO channels in the presence of estimation errors and feedback delay,” in Proc. IEEE Globecom, Washington DC, Nov. 2007, pp. 2791-2795. [12] N. Jindal, “MIMO broadcast channels with finite-rate feedback,” IEEE Trans. on Info. Theory, vol. 52, no. 11, pp. 5045-5060, Nov. 2006. [13] G. Bianchi, “Performance analysis of the IEEE 802.11 distributed coordination function,” IEEE J. Sel. Areas Commun., vol. 18, no. 3, pp. 535–547, Mar. 2000. [14] S. Boyd and L. Vandenberghe, Convex Optimization, Cambridge University Press, 2004.
7cs.IT
1 A closed equation in time domain for band-limited extensions of one-sided sequences arXiv:1504.02298v6 [cs.IT] 25 Sep 2017 Nikolai Dokuchaev Abstract—The paper suggests a method of optimal extension of one-sided semi-infinite sequences of a general type by traces of band-limited sequences in deterministic setting, i.e. without probabilistic assumptions. The method requires to solve a closed linear equation in the time domain connecting the past observations of the underlying process with the future values of the band-limited process. Robustness of the solution with respect to the input errors and data truncation is established in the framework of Tikhonov regularization. Key words: band-limited extension, discrete time, low-pass filter, Tikhonov regularization, predicting, Z-transform. I. I NTRODUCTION We study extrapolation of one-sided semi-infinite sequences in pathwise deterministic setting. Extrapolation of sequences can be used for forecasting and was studied intensively, for example, in the framework of system identification methods; see e.g. [24]. In signal processing, there is a different approach oriented on the frequency analysis and exploring special features of the band-limited processes such as a uniqueness of extrapolation. The present paper extends this approach on processes that are not necessarily band-limited; we consider extrapolations of the optimal band-limited approximations of the observed parts of underlying processes. The motivation for that approach is based on the premise that a band-limited approximation of a process can be interpreted as its regular part purified from a noise represented by the high-frequency component. This leads to a problem of causal band-limited approximations for non-bandlimited underlying processes. In theory, a process can be converted into a band-limited process with a low-pass filter, and the resulting process will be an optimal band-limited approximation. However, a ideal low-pass filter is non-causal; therefore, it cannot be applied for a process that is observable dynamically such that its future values are unavailable which is crucial for predicting and extrapolation problems. It is known that the distance of an ideal low-pass filter from the set of all causal filters is positive [3]. Respectively, causal smoothing cannot convert a process into a band-limited one. There are many works devoted to causal smoothing and sampling, oriented on estimation and minimization of errors in L2 -norms or similar norms, especially in stochastic setting; see e.g. [1, 5, 6, 10, 11, 13, 16, 18, 28, 30, 31]. The present paper considers the problem of causal bandlimited extrapolation for one-sided semi-infinite sequences that Accepted to IEEE Transactions on Signal Processing. This work was supported by ARC grant of Australia DP120100928 to the author. The author is with the Department of Mathematics & Statistics, Curtin University, GPO Box U1987, Perth, 6845 Western Australia, and also with National Research University ITMO, 197101 Russia (email [email protected]) are not are not necessarily traces of band-limited processes. We consider purely discrete time processes rather than samples of continuous time processes. This setting imposes certain restrictions. In particular, it does not allow to consider continuously variable locations of the sampling points, as is common in sampling analysis of continuous time processes; see e.g. [4, 13, 15, 19]. In our setting, the values between fixed discrete times are not included into consideration. For continuous time processes, the predicting horizon can be selected to be arbitrarily small, such as in the model considered in [4]; this possibility is absent for discrete time processes considered below. Further, we consider the extrapolation problem in the pathwise deterministic setting, without probabilistic assumptions. This means that the method has to rely on the intrinsic properties of a sole underlying sequence without appealing to statistical properties of an ensemble of sequences. In particular, we use a pathwise optimality criterion rather than criterions calculated via the expectation on a probability space such as mean variance criterions. In addition, we consider an approximation that does not target the match of the values at any set of selected points; the error is not expected to be small. This is different from a more common setting where the goal is to match an approximating curve with the underlying process at certain sampling points; see e.g. [6, 15, 16, 19, 23, 17]. Our setting is closer to the setting from [13, 14, 27, 30, 31]. In [13, 14], the point-wise matching error was estimated for a sampling series and for a band-limited process representing smoothed underlying continuous time process; the estimate featured a given vanishing error. In [27], the problem of minimization of the total energy of the approximating bandlimited process was considered; this causal approximation was constructed within a given distance from the original process smoothed by an ideal low-pass filter. Another related result was obtained in [12], where an interpolation problem for absent sampling points was considered in a setting with vanishing error, for a finite number of sampling points. In [23, 30, 31, 17], extrapolation of a trace of a band-limited process was investigated using some special Slepian’s type basis [22, 23] in the frequency domain. In [23], the idea of this extrapolation was suggested as an example of applications of this basis. In [30], extrapolation of a trace of a band-limited process from a finite number of points was considered in a frequency setting for a general linear transform and some special Slepian’s type basis [22, 23] in the frequency domain. In [31], a setting similar to [30] was considered for extrapolation of a trace of continuous time process from a finite interval using a special basis from eigenfunctions in the frequency domain. In [17], extrapolation of a trace of a band- 2 limited process was considered as an example of applications for a numerically efficient version of the Slepian basis. Our setting is different: we consider extrapolation in time domain. The paper offers a new method of calculating the future values of the optimal band-limited approximation, i.e. the extrapolation of the approximating trace of an optimal bandlimited process on the future times. The underlying process does not have to be a trace of a band-limited process; therefore, there is a non-vanishing approximation error being minimized. The problem is reduced to solution of a convenient closed linear equation connecting directly the set of past observations of the underlying process with the set of future values of the band-limited process (equation (III.2) in Theorem 1 and equation (III.4) in Theorem 2 below). This allows to bypass analysis in the frequency domain and skip calculation of the past values for the approximating band-limited process; respectively, a non-trivial procedure of extrapolation of a bandlimited process from its part is also bypassed. This streamlines the calculations. We study this equation in the time domain, without transition to the frequency domain; therefore, the selection of the basis in the frequency domain is not required. We established solvability and uniqueness of the solution of the suggested equation for the band-limited extension. Furthermore, we established numerical stability and robustness of the method with respect to the input errors and data truncation in a version of the problem where there is a penalty on the norm of the approximating band-limited process, i.e. under Tikhonov regularization (Theorem 2). We found that this regularization can be achieved with an arbitrarily small modification of the optimization problem. We illustrated the sustainability of the method with some numerical experiments where we compare the band-limited extrapolation with some classical spline based interpolations (Section VI). II. S OME DEFINITIONS AND BACKGROUND Let Z be the set of all integers, let Z+ = {1, 2, 3, ...}, and let Z− = {..., −3, −2, −1, 0}. We denote by ℓ2 (θ, τ ) a Hilbert space of real valued sequences {x(t)}τt=θ such that kxkℓ2 (θ,τ ) =  Pτ 2 1/2 < +∞. t=θ |x(t)| Let ℓ2 = ℓ2 (−∞, +∞), and let ℓ+ 2 be the subspace in ℓ2 consisting of all x ∈ ℓ2 such that x(t) = 0 for t < 0. For x ∈ ℓ2 , we denote by X = Zx the Z-transform X(z) = ∞ X x(t)z −t , z ∈ C. t=−∞ Respectively, the inverse x = Z −1 X of the Z-transform is defined as Z π  1 X eiω eiωt dω, t = 0, ±1, ±2, .... x(t) = 2π −π We assume that we are given Ω ∈ (0, π). Let T = {z ∈ C : |z| = 1}. Let LBL X : T → C such 2 (T)  be the set of all mappings  that X eiω ∈ L2 (−π, π) and X eiω = 0 for |ω| > Ω, ω ∈ (−π, π]. We will call the corresponding processes x = Z −1 X band-limited. Let ℓBL be the set of all band-limited processes from ℓ2 , 2 and let ℓBL 2 (−∞, 0) be the subset of ℓ2 (−∞, 0) formed by the traces {b x(t)}t≤0 for all sequences x b ∈ ℓBL 2 . We will use the notation sinc (x) = sin(x)/x, and we will use the notation “◦” for the convolution in ℓ2 . Let H(z) be the  transfer function for an ideal low-pass filter such that H eiω = I[−Ω,Ω] (ω), where I denotes the indicator function, ω ∈ (−π, π]. Let h = Z −1 H; it is known that h(t) = Ω sinc (Ωt)/π. The definitions imply that h ◦ x ∈ ℓBL 2 for any x ∈ ℓ2 . Proposition 1. For any x ∈ ℓBL 2 (−∞, 0), there exists a unique b(t) = x(t) for t ≤ 0. x b ∈ ℓBL 2 such that x Proposition 1 implies that the future {b x(t)}t>0 of a bandlimited process is uniquely defined by its past {b x(t), t ≤ 0}. This can be considered as reformulation in the deterministic setting of a sufficient condition of predictability implied by the classical Szegö-Kolmogorov Theorem for stationary Gaussian processes [18, 25, 26]; more recent review can be found in [2, 21]. III. T HE MAIN RESULTS We consider below input processes x ∈ ℓ2 (−∞, 0) and their band-limited approximations and extensions. The sequences {x(t)}t≤0 represent the historical data available at the current time t = 0; the future values for t > 0 are unavailable. A. Existence and uniqueness of the band-limited extension Clearly, it is impossible to apply the ideal low-pass filter directly to the underlying processes x ∈ ℓ2 (−∞, 0) since the convolution with h requires the future values that are unavailable. We will be using approximation described in the following lemma. Lemma 1. There exists a unique optimal solution x b ∈ ℓBL 2 of the minimization problem X Minimize |xBL (t) − x(t)|2 t≤0 over xBL ∈ ℓBL 2 . (III.1) Under the assumptions of Lemma 1, there exists a unique band-limited process x b such that its trace x b|t≤0 provides an optimal approximation of the observable past path {x(t)}t≤0 . The corresponding future path {b x(t)}t>0 can be interpreted as an optimal forecast of x (optimal in the sense of problem (III.1) given Ω). We will suggest below a method of calculation of this future path {b x(t)}t>0 only; the calculation of the past path {b x(t)}t≤0 will not be required and will be excluded. + Let A : ℓ+ 2 → ℓ2 be an operator defined as Ay = IZ+ (h ◦ y). Consider a mapping ν : ℓ2 (−∞, 0) → ℓ2 such that ν(x)(t) = x(t) for t ≤ 0 and ν(x)(t) = 0 for t > 0. Let a mapping a : ℓ2 (−∞, 0) → ℓ+ 2 be defined as a(x) = IZ+ (h ◦ (ν(x))) . 3 Since h(t) = Ω sinc (Ωt)/π, the operator A can be represented as a matrix with the components At,m = I{t>0,m>0} Ω sinc [Ω(t − m)], π t, m ∈ Z, and a process a(x) = {a(x, t)}t∈Z can be represented as a vector Ω X a(x, t) = I{t>0} xm sinc [Ω(t − m)], t ∈ Z. π m≤0 Theorem 1. For any x ∈ ℓ2 (−∞, 0), the equation y = Ay + a(x) (III.2) ℓ+ 2. has a unique solution yb(t) = I{t>0} x b(t) ∈ In addition, y =x b|t>0 , where x b ∈ ℓBL is defined in Lemma 1. In other 2 words, yb is the sought extension on Z+ of the optimal bandlimited approximation of the observed sequence {x(t)}t≤0 . −1 + (iv) For any ρ > 0, the operator (I − Aρ ) : ℓ+ 2 → ℓ2 −1 −1 is continuous and (I − Aρ ) ≤ 1+ρ for the corresponding norm. In addition, by the properties of the projections presented in the definition for a(x), we have that kaρ (x)kℓ+ ≤ 2 kxkℓ2 (−∞,0) . Theorem 1 stipulates that equation (III.2) has a unique solution. However, this theorem does not establish the continuity of the dependence of yb on the input x|t≤0 . The following theorem shows that additional regularization can be obtained for solution of problem (III.3) with ρ > 0. Theorem 2. For any ρ ≥ 0 and x ∈ ℓ2 (−∞, 0), the equation (1 + ρ)y = Ay + a(x) (III.4) has a unique solution yρ = IZ+ x bρ = (I − Aρ )−1 aρ (x) in ℓ+ 2. Furthermore, for any ρ > 0, kyρ kℓ+ ≤ (1 + ρ−1 )kxkℓ2 (−∞,0) 2 B. Regularized setting Let us consider a modification of the original problem (III.1) X Minimize |xBL (t) − x(t)|2 + ρkxBL k2ℓ2 t≤0 over xBL ∈ ℓBL 2 . (III.3) Here ρ ≥ 0 is a parameter. The setting with ρ > 0 helps to avoid selection of x b with an excessive norm. It can be noted that it is common to put restrictions on the norm of the optimal process in the data recovery, extrapolation, and interpolation problems in signal processing; see e.g. [1, 5, 27]. Lemma 1 can be generalized as the following. Lemma 2. For any ρ ≥ 0 and x ∈ ℓ2 (−∞, 0), there exists a unique optimal solution x bρ of the minimization problem (III.3). In these notations, x b0 is the optimal process presented in Lemma 1. Under the assumptions of Lemma 2, the trace on Z+ of the band-limited solution x bρ of problem (III.3) can be interpreted as an optimal forecast of x|Z− (optimal in the sense of problem (III.3) given Ω and ρ). Let us derive an equation for this solution. + Let I : ℓ+ 2 → ℓ2 be the identity operator. It can be noted that Theorem 1 does not imply that the + operator (I − A) : ℓ+ 2 → ℓ2 is invertible, since a(·) : + ℓ2 (−∞, 0) → ℓ2 is not a continuous bijection. Let Aρ = (1 + ρ)−1 A and aρ (x) = (1 + ρ)−1 a(x), where A and a(x) are such as defined above. The following lemma shows that the mapping A is not a contraction but it is close to a contraction, and Aρ is a contraction for ρ > 0. Lemma 3. (i) For any y ∈ ℓ+ < 2 such that y 6= 0, kAykℓ+ 2 kykℓ+ . 2 + (ii) The operator A : ℓ+ 2 → ℓ2 has the norm kAk = 1. + (iii) For any ρ ≥ 0, the operator Aρ : ℓ+ 2 → ℓ2 has the norm kAρ k = 1/(1 + ρ) < 1. for any x ∈ ℓ2 (−∞, 0). In addition, yρ = x bρ |t>0 , where x bρ ∈ ℓBL 2 is defined in Lemma 2. In other words, yρ is the sought extension on Z+ of the optimal band-limited approximation of the observed sequence {x(t)}t≤0 (optimal in the sense of problem (III.3) given Ω and ρ). Replacement of the original problem by problem (III.3) with ρ → 0 can be regarded as a Tikhonov regularization of the original problem. By Theorem 2, it leads to solution featuring continuous dependence on x|t≤0 in the corresponding ℓ2 norm. Remark 1. Since the operator Aρ is a contraction, the solution of (III.4) can be approximated by partial sums Pd k k=0 Aρ aρ (x). IV. N UMERICAL STABILITY AND ROBUSTNESS Let us consider a situation where an input process x ∈ ℓ2 (0, +∞) is observed with an error. In other words, assume that we observe a process xη = x + η, where η ∈ ℓ2 (0, +∞) is a noise. Let yη be the corresponding solution of equation (III.4) with xη as an input, and let y be the corresponding solution of equation (III.4) with x as an input. By Theorem 2, it follows immediately that, for all ρ > 0 and η ∈ ℓ2 (−∞, 0), ky − yη kℓ+ ≤ (1 + ρ−1 )kkηkℓ2 (−∞,0) . 2 This demonstrates some robustness of the method with respect to the noise in the observations. In particular, this ensures robustness with respect to truncation of the input processes, such that semi-infinite sequences x ∈ ℓ2 (−∞, 0) are replaced by truncated sequences xη (t) = I{t>q} x(t) for q < 0; in this case η(t) = It≤q x(t) is such that kηkℓ2 (−∞,0) → 0 as q → −∞. This overcomes principal impossibility to access infinite sequences of observations. Furthermore, only finite-dimensional systems of linear equations can be solved numerically. This means that equation (III.4) with an infinite matrix A cannot be solved exactly even for truncated inputs, since it involves a sequence a(x) that has an infinite support even for truncated x. Therefore, we have 4 to apply the method with A replaced by its truncated version. We will consider below the impact of truncation of matrix A. Robustness with respect to the data errors and truncation Let us consider replacement of the matrix A = {At,m }k,m∈Z+ in equation (III.4) by truncated matrices AN = {AN,t,m }t,m∈Z = {I|t|≤N,|m|≤N At,m }t,m∈Z for integers N > 0. This addresses the restrictions on the data size for numerical methods. Again, we consider a situation where an input process is observed with an error. In other words, we assume that we observe a process xη = x + η ∈ ℓ2 (−∞, 0), where η ∈ ℓ2 (−∞, 0) is a noise. As was mentioned above, this allows to take into account truncation of the inputs as well. Let us show that the method is robust with respect to these variations. Let Aρ,N = (1 + ρ)−1 AN . Lemma 4. For any N > 0 , the following holds. (i) If y ∈ ℓ+ < 2 and mint=1,...,N |y(t)| > 0, then kAN ykℓ+ 2 kykℓ+ . 2 ≤ kykℓ+ . (ii) If y ∈ ℓ+ 2 , then kAN ykℓ+ 2 2 −1 (iii) The operator (I − AN ) : ℓ+ → ℓ+ 2 2 is continuous and (I − AN )−1 < +∞, for the corresponding norm. −1 + (iv) For any ρ > 0, the operator (I − Aρ,N ) : ℓ+ 2 → ℓ2 is continuous and −1 (I − Aρ,N ) ≤ 1 + ρ−1 for the corresponding norm. (v) For any ρ ≥ 0 and any x ∈ ℓ2 (−∞, 0), the equation (1 + ρ)y = AN y + a(x) (IV.1) has a unique solution yb ∈ ℓ+ 2. Theorem 3. For any ρ > 0, kyρ,η,N − yρ kℓ+ 2  −1 ≤ (1 + ρ ) k(AN − A)yρ kℓ+ + kηkℓ2 (−∞,0) . 2 Here yρ denote the solution in ℓ+ 2 of equation (III.4), and yρ,η,N denote the solution in ℓ+ 2 of equation (IV.1) with x replaced by xη = x + η, where x ∈ ℓ2 (−∞, 0) and η ∈ ℓ2 (−∞, 0). Theorem 3 implies robustness with respect to truncation of (A, x) and with respect to the presence of the noise in the input, as the following corollary shows. Corollary 1. For ρ > 0, solution of equation (III.4) is robust with respect to data errors and truncation, in the sense that kyρ,η,N − yρ kℓ+ → 0 as N → +∞, 2 kηkℓ2 (−∞,0) → 0. This justifies acceptance of a result for (AN , xη ) as an approximation of the sought result for (A, x). V. P ROOFS Proof of Proposition 1. It suffices to prove that if x(·) ∈ ℓBL is such that x(t) = 0 for t ≤ 0, then x(t) = 0 for 2 ∆ t > 0. Let D = {z ∈ C : |z| < 1}. Let H 2 (D) be the Hardy space of functions that are holomorphic on D with finite norm khkH2 (D) = supρ<1 kh(ρeiω )kL2 (−π,π) ; see e.g. [20], Chapter 17. It suffices to prove that if x(·) ∈ ℓBL is 2 such that x(t) = 0 for t ≤ 0, then x(t) = 0 for t > 0. Let BL X = Zx. Since x ∈ ℓBL 2 , it follows that X ∈ L2 (T). We 2 have that X|D = (Zx)|D ∈ H (D). Hence, by the property of the Hardy space, X ≡ 0; see e.g. Theorem 17.18 from [20]. This completes the proof of Lemma 1.  It can be noted that the statement of Proposition 1 can be also derived from predictability of band-limited processes established in [8] or [9]. Proof of Lemma 1. It suffices to prove that ℓBL 2 (−∞, 0) is a closed linear subspace of ℓ2 (−∞, 0). In this case, there exists a unique projection x b of x|Z− on ℓBL 2 (−∞, 0), and the theorem will be proven. BL Consider the mapping ζ : LBL 2 (T) → ℓ2 (−∞, 0) such that −1 x(t) = (ζ(X))(t) = (Z X)(t) for t ∈ Z− . It is a linear continuous operator. By Proposition 1, it is a bijection. BL Since the mapping ζ : LBL 2 (T) → ℓ2 (−∞, 0) is continuous, it follows that the inverse mapping ζ −1 : ℓBL 2 (−∞, 0) → LBL (T) is also continuous; see e.g. Corollary in Ch.II.5 [29], 2 (T) is a closed linear subspace of p. 77. Since the set LBL 2 (−∞, 0) is a closed linear L2 (−π, π), it follows that ℓBL 2 subspace of ℓ2 (−∞, 0). This completes the proof of Lemma 1.  Proof of Theorem 1. Let x b ∈ ℓBL be the optimal solution 2 described in Lemma 1. Let X = {x ∈ ℓ2 : x|t>0 = x b|t>0 }. , we have that For any x ∈ X and x eBL ∈ ℓBL 2 x − xk2ℓ2 (−∞,0) + kb x − xk2ℓ2 (1,+∞) kb x − xk2ℓ2 = kb xBL − xk2ℓ2 (−∞,0) . = kb x − xk2ℓ2 (−∞,0) ≤ ke The last inequality here holds because x b|t≤0 is optimal for problem (III.1). This implies that, for any x ∈ X , the sequence x b is optimal for the minimization problem Minimize kxBL − xkℓ2 over xBL ∈ ℓBL 2 . By the property of the low-pass filters, x b = h ◦ x. Hence the optimal process x b ∈ ℓBL from Lemma 1 is such that 2 x b = h ◦ (ν(x) + IZ+ x b) . For yb = IZ+ x b, we have that yb = IZ+ (h ◦ (ν(x) + IZ+ x b)) = IZ+ (h ◦ ν(x)) + IZ+ (h ◦ (IZ+ x b)) = a(x) + Ab y. This completes the proof of Theorem 1.  Proof of Lemma 2. As was shown in the proof of Lemma 1, ℓBL 2 (−∞, 0) is a closed linear subspace of ℓ2 (−∞, 0). The quadratic form in (III.3) is positive-definite. Then the existence and the uniqueness of the optimal solution follows.  Proof of Lemma 3. Let us prove statement (i). Let y ∈ ℓ+ 2 . In this case, y ∈ / ℓBL ; it follows, for instance, from Proposition 1. 2 5   Let Y =Zy. Wehave that Z(h◦y) = H eiω Y eiω . Hence kH eiω Y eiω kL2 (−π,π) < kY eiω kL2 (−π,π) . This implies that kh ◦ ykℓ2 < kykℓ2 and that Let x ∈ ℓ2 and x′ρ = IZ− x + IZ+ x bρ . Since x′ρ ∈ Xρ , it follows that x bρ is an unique solution of the minimization problem kAykℓ+ = kIZ+ (h ◦ y)kℓ2 ≤ kh ◦ ykℓ2 < kykℓ2 = kykℓ+ . Minimize kxBL − x′ρ k2ℓ2 + ρkxBL k2ℓ2 This completes the proof of statement (i) of Lemma 3. Let us prove statement (ii). It follows from statement (i) that kAk ≤ 1. Hence it suffices to construct a sequence {yk }+∞ k=1 ⊂ ℓ+ such that 2 over xBL ∈ ℓBL 2 . 2 2 kAyk kℓ+ − kyk kℓ+ → 0 as k → +∞. 2 2 (V.1) Let x ∈ ℓBL 2 be selected such that kxkℓ2 > 0. Then h ◦ x = x. Let xk be defined as xk (t) = x(t − k), k ∈ Z+ , k → +∞. Then xk ∈ ℓBL 2 and hence h ◦ xk = xk . Let yk = IZ+ xk . By the definitions, Ayk = IZ+ (h ◦ (IZ+ xk )) = ξk + ζk , where ξk = IZ+ (h ◦ xk ), ζk = IZ+ (h ◦ (IZ+ xk − xk )). Since h ◦ xk = xk , we have that ξk = I xk = yk , i.e. Ayk = yk +ζk . Further, we have that ζk = −IZ+ (h◦(IZ− xk )). Hence Z+ kζk k2ℓ+ ≤ kh ◦ (IZ− xk )k2ℓ2 ≤ kIZ− xk k2ℓ2 X2 X = |xk (t)|2 = |x(t)|2 → 0 t≤0 t≤−k as k → +∞. Hence (V.1) holds. This completes the proof of statement (ii) and Lemma 3. Statement (iii) follows immediately from statement (ii). Statement (iv) follows from the estimates ∞ X 1 (I − Aρ )−1 ≤ kAρ kk = 1 − [kAk/(1 + ρ)]k k=0 = 1/(1 − 1/(1 + ρ)) = 1 + ρ−1 . (V.2) This completes the proof of statement Lemma 3.  Proof of Theorem 2. This proof represents a generalization of the proof of Theorem 1 which covers a special case where ρ = 0. Let x bρ ∈ ℓBL 2 be the optimal solution described in Lemma 2. Let Xρ = {x ∈ ℓ2 : x|t>0 = x bρ |t>0 }. For any x ∈ Xρ and x eBL ∈ ℓBL , we have that 2 xρ k2ℓ2 kb xρ − xk2ℓ2 + ρkb = kb xρ − xk2ℓ2 (−∞,0) + kb xρ − xk2ℓ2 (1,+∞) + ρkb xρ k2ℓ2 xρ k2ℓ2 = kb xρ − xk2ℓ2 (−∞,0) + ρkb ≤ ke xBL − xk2ℓ2 (−∞,0) + Minimize kxBL − xk2ℓ2 + ρkxBL k2ℓ2 over xBL ∈ ℓBL 2 . Let us show that 1 h ◦ (ν(x) + IZ+ x bρ ) . 1+ρ kxBL − x′ρ k2ℓ2 + ρkxBL k2ℓ2 = (1 + ρ)(xBL , xBL )ℓ2 − 2(xBL , x′ρ )ℓ2 + (x′ρ , x′ρ )ℓ2  h  1 = (1 + ρ) (xBL , xBL )ℓ2 − 2 xBL , x′ρ 1+ρ ℓ2 i 1 ′ ′ (x , x )ℓ + 1+ρ ρ ρ 2 h 2 1 1 (x′ , x′ )ℓ = (1 + ρ) xBL − x′ρ − 1+ρ (1 + ρ)2 ρ ρ 2 ℓ2 i 1 + (x′ρ , x′ρ )ℓ2 . 1+ρ It follows that x bρ = (1 + ρ)−1 x b′ρ , where x b′ρ is an unique solution of the minimization problem Minimize kxBL − x′ρ k2ℓ2 (V.3) over xBL ∈ ℓBL 2 . By the property of the low-pass filters, x b′ρ = h ◦ x′ρ . It follows from the definitions that  (1 + ρ)b xρ = x b′ρ = h ◦ ν(x) + IZ+ x′ρ = h ◦ (ν(x) + IZ+ x bρ ) . This proves (V.3). Further, equation (V.3) is equivalent to equation (III.4) which, on its turn, is equivalent to the equation y = Aρ y + aρ (x). + Since the operator (I − Aρ )−1 : ℓ+ 2 → ℓ2 is continuous, this equation has an unique solution yρ = IZ+ x bρ = (I − holds. Aρ )−1 aρ (x) in ℓ+ 2 , and the required estimate for kyρ kℓ+ 2 This completes the proof of Theorem 2.  Proof of Lemma 4. Let us prove statement (i). The proof follows the approach of the proof of Lemma 3(i). Let DN = {1, 2, ..., N }, and let z = IDN y ∈ ℓ+ 2 . Under the assumptions on y, we have that z 6= 0. In this case, z ∈ / ℓBL 2 ; it follows, for instance, from Proposition 1. Let Z = Zz. We have    that Z(h◦ z) = H eiω Z eiω . Hence kH eiω Z eiω kL2 (−π,π) < kZ eiω kL2 (−π,π) . This implies that kh◦zkℓ2 < kzkℓ2 . Hence kAN ykℓ+ = kIDN (h ◦ z)kℓ2 ≤ kh ◦ zkℓ2 < kzkℓ2 ≤ kykℓ+ . 2 ρke xBL k2ℓ2 . The last inequality here holds because the path x bρ |t≤0 is optimal for problem (III.3). This implies that, for any x ∈ Xρ , the sequence x bρ is optimal for the minimization problem x bρ = Further, the quadratic form here can be represented as 2 This completes the proof of statement (i). The proof of (ii) is similar; in this case, the case where z = 0 is not excluded. Let us prove statements (iii). Consider a matrix ĀN = {At,m }1≤t,m≤N ∈ RN ×N . Let IN be the unit matrix in RN ×N . Suppose that the matrix IN − ĀN is degenerate, i.e. N that there exists a non-zero z = {z(t)}N such that t=1 ∈ R + ĀN z = z. Let y ∈ ℓ2 be such that y(t) = I1≤t≤N z(t). In this case, AN y = y which would contradict the statement (i). Therefore, the matrix IN − ĀN is non-degenerate. Hence the operator (IN − ĀN )−1 : RN → RN is continuous and k(IN − ĀN )−1 k < +∞ for the corresponding norm. 6 N The space ℓ+ × 2 is isomorphic to the space Y = R + ℓ2 (N + 1, +∞), i.e. y ∈ ℓ2 can be represented as (ȳ, ye) ∈ Y, where ȳ = (y(1), ..., y(N ))⊤ ∈ RN and ye = y|t>N ∈ ℓ2 (N + 1, +∞). Respectively, the sequence AN y ∈ ℓ+ 2 can be represented as (ĀN ȳ, 0ℓ2 (N +1,+∞) ) ∈ Y, and the sequence y − AN y ∈ ℓ+ e) ∈ Y. 2 can be represented as (ȳ − ĀN ȳ, y Hence the sequence (IN − AN )−1 y ∈ ℓ+ 2 can be represented as ((IN − ĀN )−1 ȳ, ye|t>N ) ∈ Y. Clearly, k(I − AN )−1 yk2ℓ+ ≤ |(IN − ĀN )−1 ȳ|2 + ke yk2ℓ2 (N +1,+∞) 2 ≤ k(IN − ĀN )−1 k2 |ȳ|2 + ke yk2ℓ2 (N +1,+∞) . This proves statement (iii). The proof of statement (iv) repeats estimates (V.2) if we take into account that kAN k ≤ kAk = 1. To complete the proof of Lemma 4, it suffices to observe that statement (v) for ρ = 0 follows from statement (iii), and statement (v) for ρ > 0 follows from statement (iv).  Proof of Theorem 3. Let eN = yρ,η,N − yρ . We have that (1 + ρ)eN = AN eN + (AN − A)yρ + a(xη ) − a(x). By the properties of the sinc functions presented in (III.2), it follows that A. Simulation of the input processes The setting of Theorems 1-2 does not involve stochastic processes and probability measure; it is oriented on extrapolation of sequences in the pathwise deterministic setting. However, to provide sufficiently large sets of input sequences for statistical estimation, we used processes x generated via Monte-Carlo simulation as a stochastic process evolving as z(t) = A(t)z(t − 1) + η(t), t ∈ Z, ⊤ x(t) = c z(t). (VI.1) ν Here z(t) is a process with the values in R , where ν ≥ 1 is an integer, c ∈ Rν . The process η represents a noise with values in Rν , A(t) is a matrix with the values in Rν×ν with the spectrum inside T. The matrices A(t) are switching values randomly at random times; this replicates a situation where the parameters of a system cannot be recovered from the observations such as described in the review [24]. Since it is impossible to implement Theorem 2 with infinite input sequences, one has to use truncated inputs for calculations. In the experiments described below, we replaced A and x|t≤0 by their truncated analogs AN = {I{|k|≤N,|m|≤N }Ak,m }, xN = I{t≥−N } x(t), where N > 0 is the truncation horizon. In each simulation, we selected random and mutually independent z(−N ), A(·), and η, as vectors and matrices with Hence mutually independent components. The process η was selected keρ,η,N kℓ+ as a stochastic discrete time Gaussian white noise with the 2 i h ν 2 ≤ k(I − Aρ,N )−1 k k(AN − A)yρ + aρ (x) − aρ (xη )kℓ+ values in R such that Eη(t) = 0 and E|η(t)| = 1. 2 The initial vector z(−N ) was selected randomly with the h i components from the uniform distribution on (0, 1). The ≤ k(I − Aρ,N )−1 k k(AN − A)yρ kℓ+ + kηkℓ2 (−∞,0) . 2 components of the matrix A(−N ) was selected from the This completes the proof of Theorem 3.  uniform distribution on (0, 1/ν). Further, to simulate randomly Proof of Corollary 1. We have that AN y = IDN (h◦(IDN y)), changing A(t), a random variable ξ distributed uniformly on where DN = {1, 2, ..., N }. Hence (0, 1) and independent on (A(s)|s<t , η, z(−N )) was simulated for each time t > −N . In the case where ξ < 0.5, we (AN − A)yρ = IDN (h ◦ (IDN yρ )) − IZ+ (h ◦ yρ )) selected A(t) = A(t − 1). In the case where ξ ≥ 0.5, = ζbN,ρ + ζeN,ρ , A(t) was simulated randomly from the same distribution as A(−N ), independently on (A(s)|s<t , η, z(−N )). This setting where with randomly changing A(t) makes impossible to identify the parameters of equation (VI.1) from the current observations. ζbN,ρ = IDN [h ◦ (IDN yρ ) − h ◦ yρ ] = IDN [h ◦ (IDN yρ − yρ )] In our experiments, we calculated the solution x bρ |t>0 of = IDN [h ◦ (IDN yρ − yρ )] = −IDN [h ◦ (I{t: t>N } yρ ) linear system (III.4) for a given x directly using a built-in MATLAB operation for solution of linear algebraic systems. and ka(x) − a(xη )kℓ+ ≤ kηkℓ2 (−∞,0) . 2 ζeN,ρ = [IDN − IZ+ ](h ◦ yρ ) = −I{t: t>N } (h ◦ yρ ). Clearly, kζbN,ρ kℓ+ → 0 and kζeN,ρ kℓ+ → 0 as N → +∞. 2 2 Hence k(AN − A)yρ kℓ+ → 0 as N → +∞. This completes 2 the proof of Corollary 1.  VI. S OME NUMERICAL EXPERIMENTS We did some numerical experiments to compare statistically the performance of our band-limited extrapolations with extrapolations based on splines applied to causally smoothed processes. In addition, we did some numerical experiments to estimate statistically the impact of data truncation. B. Comparison with spline extrapolations We compared the accuracy of the band-limited extrapolations introduced in Theorem 2 with the accuracy of three standard extrapolations built in MATLAB: piecewise cubic spline extrapolation, shape-preserving piecewise cubic extrapolation, and linear extrapolation. We denote by E the sample mean across the Monte Carlo trials. We estimate the values v u L uX e = Et |x(t) − x b (t)|2 , BL BL t=1 7 where x bBL is an extrapolation calculated as suggested in Theorem 2 with some ρ > 0, i.e. x bBL |t>0 = yρ = x bρ |t>0 , in the terms of this theorem, for some integers L > 0. The choice of L defines the extrapolation horizon; in particular, it defines prediction horizon if extrapolation is used for forecasting. We compare these values with similar values obtained for some standard spline extrapolations of the causal h-step moving average process for x. More precisely, to take into the account truncation, we used a modification of the causal moving average x̄(t) = 1 min(h, t + N + 1) t X x(k), t ≥ −N. k=max(t−h,−N ) For three selected standard spline extrapolations, we calculated v u L uX e = Et |x(t) − x e (t)|2 , d = 1, 2, 3, d d t=1 where x e1 is the piecewise cubic extrapolation of the moving average x̄|t≤0 , x e2 is the shape-preserving piecewise cubic extrapolation of x̄|t≤0 , x e3 is the linear extrapolation of x̄|t≤0 . We used these extrapolation applied to the moving average since applications directly to the process x(t) produce quite unsustainable extrapolation with large values ed . We calculated and compared eBS and ed , d = 1, 2, 3. Table I shows the ratios eBL /ed for some combinations of parameters. For these calculations, we used c = (1/ν, 1/ν, ..., 1/ν)⊤, h = 10, and ρ = 0.4. TABLE I C OMPARISON OF PERFORMANCE OF BAND - LIMITED EXTRAPOLATION AND STANDARD EXTRAPOLATIONS . eBL /e1 eBL /e2 eBL /e3 L= L= L= L= 1 3 6 12 Panel (a): ν = 1, Ω = π/2, 0.8818 0.9312 0.4069 0.8407 0.1017 0.3095 0.0197 0.0489 N = 50 0.9205 0.9270 0.8330 0.6751 L= L= L= L= 1 3 6 12 Panel (b): ν = 8, Ω = π/5, 0.9255 0.9801 0.3975 0.8369 0.1020 0.2947 0.0188 0.0451 N = 100 0.9633 0.9348 0.8426 0.6739 For each entry in Table I, we used 10,000 Monte-Carlo trials. The values ed were calculated using Matlab programm interp1. An experiment with 10,000 Monte-Carlo trials would take about one minute of calculation time for a standard personal computer. The experiments demonstrated a good numerical stability of the method; the results were quite robust with respect to truncation of the input processes and deviations of parameters. Increasing the number of Monte-Carlo trials gives very close results. In addition, we found that the choice of the dimension ν does not affect much the result. For example, we obtained eBL /e1 = 0.4069 for L = 3, ν = 1, Ω = π/2, N = 50. When we repeated this experiment with ν = 8, we obtained eBL /e1 = 0.4091 which is not much different. When we repeated the same experiment with ν = 8 and with 30,000 trials, we obtained eBL /e1 = 0.4055 which is not much different again. The ratios eBL /ed are decreasing further as the horizon L is increasing, hence we omitted the results for L > 12. Nevertheless, the results for large L are not particularly meaningful since the noise nullifies for large L the value of information collected from observation of x|t≤0 . We also omitted results with classical extrapolations applied directly to x(t) instead of the moving average x̄(t), since errors eBL and ed are quite large in this case due the presence of the noise. Table I shows that the band-limited extrapolation performs better than the spline extrapolations; some additional experiments with other choices of parameters demonstrated the same trend. However, experiments did not involve more advanced methods beyond the listed above spline methods. Nevertheless, regardless of the results of these experiments, potential importance of band-limited extrapolation is self-evident because its physical meaning: a band-limited part can be considered as a regular part of a process purified from a noise represented by high-frequency component. This is controlled by the choice of the band. On the other hand, the choice of particular splines does not have a physical interpretation. Figures 1 and 2 show examples of paths of processes x(t) plotted against time t, their band-limited extrapolations xBL (t), their moving averages x̄(t), and their spline extrapolations x ek (t), k = 1, 2, with ν = 8, h = 10, L = 10, and c = (1, 1, .., 1)⊤ . Figure 1 shows piecewise cubic extrapolation x e1 (t), with parameters Ω = π/2, N = 50, ρ = 0.2. Figure 2 shows shape-preserving piecewise cubic extrapolation x e2 (t), with parameters Ω = π/5, N = 100, ρ = 0.4. It can be noted that, since our method does not require to calculate x b(t)|t≤0 , these sequences were not calculated and are absent on Figures 1-2; the extension x b(t)|t>0 was derived directly from x(t)|t≤0 . 0.2 0.15 0.1 0.05 0 -0.05 -0.1 underlying process moving average band-limited extrapolation spline extrapolation -0.15 -0.2 -0.25 -20 -15 -10 -5 0 5 10 t Example of a path x(t), its band-limited extrapolation, its moving average, and piecewise cubic extrapolation with Ω = π/2, N = 50, h = 10, ρ = 0.2. Fig. 1. 8 Figure 3 illustrates the results presented in Table II and shows an example of a path x(t) plotted against time t together with the path of its band-limited extrapolations x bBL,N (t) obtained with the same parameters as for the Table II, with the truncation horizons N = 50 and N = 100. The figure shows that the impact of doubling the truncation horizon is quite small, since the paths for extrapolations are quite close. 0.2 0.15 0.1 0.05 0 -0.05 0.15 -0.1 underlying process moving average band-limited extrapolation spline extrapolation -0.15 -0.2 -0.25 -20 underlying process extrapolation with N=50 extrapolation with N=100 0.1 0.05 -15 -10 -5 0 5 10 t 0 Example of a path x(t), its band-limited extrapolation, its moving average, and shape-preserving piecewise cubic extrapolation with ν = 8, Ω = π/5, N = 100, h = 10, and ρ = 0.4. Fig. 2. -0.05 -0.1 C. Estimation of the impact of data truncation In addition, we did experiments to estimate the impact of truncation for the band-limited extrapolations introduced in Theorem 2. We found that impact of truncation is manageable; it decreases if the size of the sample increasing. In these experiments, we calculated and compared the values qP   L 2 2 (t)| (t) − x b |b x BL , N BL , N 2 1 t=1  qP EN1 ,N2 = E qP L L 2 2 (t) + (t) x b x b t=1 BL,N1 t=1 BL,N2 describing the impact of the replacement a truncation horizon N = N1 by another truncation horizon N = N2 . Here x bBL,N is the band-limited extrapolation calculated with truncated data defined by (VI.2) with a truncation horizon N ; E denotes again the average over Monte-Carlo experiments. We used x(t) simulated via (VI.1) with randomly switching A(t), the same as in the experiments described above, with the following adjustment for calculation of EN1 ,N2 . For the case where N2 > N1 , we simulated first a path x|t=−N2 ,...,0 using equation (VI.1) with a randomly selected initial value for z(−N ) selected at N = N2 as was described above, and then used the truncated part x|t=−N1 ,...,0 of this path to calculate x bBL,N1 ; respectively, the path x|t=−N2 ,...,0 was used to calculate x bBL,N2 . Table II shows the results of simulations with 10,000 MonteCarlo trials for each entry and with ν = 8, c = (1, ..., 1)⊤ , Ω = π/2, ρ = 0.4, L = 12. TABLE II I MPACT OF THE TRUNCATION AND THE CHOICE OF THE TRUNCATION HORIZON E25,50 E50,100 E100,250 E250,500 E500,1000 0.0525 0.0383 0.0303 0.0180 0.0128 -0.15 -2 -1 0 1 2 3 4 5 6 7 t Fig. 3. Example of a path x(t) and its band-limited extrapolations xbBL,N (t) calculated with truncation horizons N = 50 and N = 100 in (VI.2). VII. D ISCUSSION AND FUTURE DEVELOPMENT The paper suggests a linear equation in the time domain for calculation of band-limited extensions on the future times of band-limited approximations of one-sided semi-infinite sequences representing past observations (i.e. discrete time processes in deterministic setting). The method allows to exclude analysis of processes in the frequency domain and calculation of band-limited approximation of the observed past. This helps to streamline the calculations. Some numerical stability and robustness with respect to input errors and data truncation are established. It appears that the extrapolation error caused by the truncation is manageable for a short extrapolation horizon and can be significant on a long extrapolation horizon, i.e. for large t > 0. This is because the components ((AN − A)yρ )(t) of the input term in (V.4) are relatively small for small t > 0 and can be large for large t > 0. In particular, this means that long horizon prediction based on this method will not be particularly efficient. There are possible modifications that we leave for the future research. In particular, the suggested method can be extended on the setting where x(t) is approximated by a ”high frequency” b eiω band-limited processes x b(t) such that the process X is supported on [−π, −π + Ω] ∪ [π − Ω, π]. In this case, the solution follows immediately from the solution given 9 above with x(t) replaced by (−1)t x(t). In addition, processes with more general types of the spectrum gaps on T can be considered, given some modification of the algorithm. It could be interesting to see if the estimate in Lemma 4 (iv) can be improved; the statement in Lemma 4 (iii) gives a hint that this is estimate is not sharp for preselected N . It could be interesting to apply an iteration method similar to the one used in [31]; see Lemma 1 [31] and citations therein. Acknowledgment The author would like thank the anonymous reviewers for the detailed suggestions that improved the manuscript. R EFERENCES [1] Alem, Y., Khalid, Z., Kennedy, R.A. (2014). Bandlimited extrapolation on the sphere for signal reconstruction in the presence of noise, Proc. IEEE Int. Conf. ICASSP’2014, pp. 4141-4145. [2] Bingham, N. H. (2012). Szegö’s theorem and its probabilistic descendants. Probability Surveys 9, 287-324. [3] Almira, J.M. and Romero, A.E. (2008). How distant is the ideal filter of being a causal one? Atlantic Electronic Journal of Mathematics 3 (1) 46–55. [4] Butzer, P.L. and Stens R.L. (1993). Linear prediction by samples from the past. In: Advanced Topics in Shannon Sampling and Interpolation Theory (R.J. Marks II, ed.), Springer-Verlag, New York, 1993, pp. 157-183. [5] Candés E., Tao, T. (2006), Near optimal signal recovery from random projections: Universal encoding strategies? IEEE Transactions on Information Theory 52(12) (2006), 5406-5425. [6] Candes, E.J., Romberg, J., Tao, T. (2006). Robust uncertainty principles: Exact signal reconstruction from highly incomplete frequency information. IEEE Transactions on Information Theory 52 (2), 489–509. [7] Dokuchaev, N. (2010). Predictability on finite horizon for processes with exponential decrease of energy on higher frequencies, Signal processing 90 (2) (2010) 696–701. [8] Dokuchaev, N. (2012). On predictors for band-limited and high-frequency time series. Signal Processing 92, iss. 10, 2571-2575. [9] Dokuchaev, N. (2012). Predictors for discrete time processes with energy decay on higher frequencies. IEEE Transactions on Signal Processing 60, No. 11, 60276030. [10] Dokuchaev, N. (2016). Near-ideal causal smoothing filters for the real sequences. Signal Processing 118, iss. 1, pp. 285-293. [11] Dokuchaev, N. (2017). On exact and optimal recovering of missing values for sequences. Signal Processing 135, 81–86. [12] Ferreira P. G. S. G. (1994). Interpolation and the discrete Papoulis-Gerchberg algorithm. IEEE Transactions on Signal Processing 42 (10), 2596–2606. [13] Ferreira P. G. S. G.. (1995a). Nonuniform sampling of nonbandlimited signals. IEEE Signal Processing Letters 2, Iss. 5, 89–91. [14] Ferreira P. G. S. G.. (1995b). Approximating non-bandlimited functions by nonuniform sampling series. In: SampTA’95, 1995 Workshop on Sampling Theory and Applications, 276–281. [15] Ferreira P. J. S. G., Kempf A., and Reis M. J. C. S. (2007). Construction of Aharonov-Berrys superoscillations. J. Phys. A, Math. Gen., vol. 40, pp. 5141–5147. [16] Jerri, A. (1977). The Shannon sampling theorem - its various extensions and applications: A tutorial review. Proc. IEEE 65, 11, 1565–1596. [17] Karnik, S., Zhu, Z., Wakin, M.B., Romberg, J., and Davenport, M.A. (2016) The fast Slepian transform. arXiv:1611.04950. [18] Kolmogorov, A.N. (1941). Interpolation and extrapolation of stationary stochastic series. Izv. Akad. Nauk SSSR Ser. Mat., 5:1, 3–14. [19] Lee, D.G., Ferreira, P.J.S.G. (2014). Direct construction of superoscillations. IEEE Transactions on Signal processing, V. 62, No. 12,3125-3134. [20] Rudin, W. Real and Complex Analysis. 3rd ed. Boston: McGraw-Hill, 1987. [21] Simon, B. (2011). Szegö’s Theorem and its descendants. Spectral Theory for L2 perturbations of orthogonal polynomials. M.B. Porter Lectures. Princeton University Press, Princeton. [22] Slepian, D., Pollak, H.O. (1961). Prolates pheroidal wave functions, Fourier analysis and uncertainty-I. Bell Syst.Tech.J. 40, 43–63. [23] Slepian, D. (1978). Prolate spheroidal wave functions, Fourier analysis, and uncertainty. V. The discrete case. Bell Syst. Tech. J. 57, no. 5, 1371-1430. [24] Smith, D.A., William F. Ford, W.F., Sidi, A. (1987). Extrapolation methods for vector sequences Siam Review, vol. 29, no. 2, 1987. [25] Szegö, G. (1920). Beiträge zur Theorie der Toeplitzschen Formen. Math. Z. 6, 167–202. [26] Szegö, G. (1921). Beiträge zur Theorie der Toeplitzschen Formen, II. Math. Z. 9, 167-190. [27] Tzschoppe, R., Huber, J. B. (2009), Causal discrete-time system approximation of non-bandlimited continuoustime systems by means of discrete prolate spheroidal wave functions. Eur. Trans. Telecomm.20, 604–616. [28] Wiener, N. (1949). Extrapolation, Interpolation, and Smoothing of Stationary Time Series with Engineering Applications, Technology Press MIT and Wiley, New York. [29] Yosida, K. (1965). Functional Analysis. Springer, Berlin Heilderberg New York. [30] Zhao, H., Wang, R., Song, D., Zhang, T., Wu, D. (2014). Extrapolation of discrete bandlimited signals in linear canonical transform domain. Signal Processing 94, 212–218. [31] Zhao, H., Wang, R., Song, D., Zhang, T., Liu, Y. (2014). Unified approach to extrapolation of bandlimited signals in linear canonical transform domain. Signal Processing 101, 65–73.
7cs.IT
MNRAS 000, 1–19 (2017) Preprint 24 August 2017 Compiled using MNRAS LATEX style file v3.0 A geometric approach to non-linear correlations with intrinsic scatter Pauli Pihajoki1? arXiv:1704.05466v2 [astro-ph.IM] 23 Aug 2017 1 University of Helsinki, Department of Physics, Gustaf Hällströmin katu 2a, 00560 Helsinki, Finland Accepted XXX. Received YYY; in original form ZZZ ABSTRACT We propose a new mathematical model for n − k-dimensional non-linear correlations with intrinsic scatter in n-dimensional data. The model is based on Riemannian geometry, and is naturally symmetric with respect to the measured variables and invariant under coordinate transformations. We combine the model with a Bayesian approach for estimating the parameters of the correlation relation and the intrinsic scatter. A side benefit of the approach is that censored and truncated datasets and independent, arbitrary measurement errors can be incorporated. We also derive analytic likelihoods for the typical astrophysical use case of linear relations in n-dimensional Euclidean space. We pay particular attention to the case of linear regression in two dimensions, and compare our results to existing methods. Finally, we apply our methodology to the well-known MBH –σ correlation between the mass of a supermassive black hole in the centre of a galactic bulge and the corresponding bulge velocity dispersion. The main result of our analysis is that the most likely slope of this correlation is ∼ 6 for the datasets used, rather than the values in the range ∼ 4–5 typically quoted in the literature for these data. Key words: methods: statistical, methods: data analysis, galaxies: statistics 1 INTRODUCTION An important question in all the sciences is whether different measured observables seem to be connected by some form of mathematical relation, or whether they seem to be completely independent. If a relation is suspected, it then becomes important to estimate the type of relation connecting the measurements and to estimate its parameters. Historically, these problems have been most often approached by the use of various correlation coefficients and linear and non-linear regression. Linear regression in particular has been the subject of lively debates and much research over the past two centuries or so, ever since first derived in the guise of least-squares regression by Gauss (or possibly Legendre, see Stigler 1981). The discussion has included such points of contention as how to treat the variables symmetrically – that is how to avoid dividing the variables into dependent and independent variables – and whether this is necessary (Pearson 1901; Boggs et al. 1987; Isobe et al. 1990; Feigelson & Babu 1992; Robotham & Obreschkow 2015). This issue is particularly important when investigating the hypothesis that the observables obey some mathematical relation. By definition, such a relation as a geometric struc- ? E-mail: [email protected] © 2017 The Authors ture (e.g. a line, a plane, or some more complicated subset) is unique, even though it may have many equivalent formulations. As such, any method used for estimating such a relation should eventually yield the same structure even if the variables are permuted or a different variable is chosen as the dependent variable. This requires that the method must involve all observed variables in an essentially symmetric way. However, this is not true for least squares regression and many other similar approaches as well (see Section 3.3.1). This fact has been well known for a long time (see e.g. Pearson 1901; Isobe et al. 1990), but it appears somewhat underappreciated. Since the focus of this paper is on formulating and estimating relations between observables, we will pay close attention to this symmetry invariance throughout. Another recurrent theme is the question of how to treat data subject to censoring (i.e. lower and upper limits), truncation (non-detections) and heteroscedastic, independent and correlated errors in general, and finally, how to incorporate intrinsic scatter, or intrinsic uncertainty in the regression hyperplane (see e.g. Kelly 2007, Hogg et al. 2010 and Robotham & Obreschkow 2015 and the references therein). Intrinsic scatter can be intuitively understood to mean that the data probability distribution can be non-zero also in the neighbourhood of the subset defined by the relation, that is we also allow for data that may be somewhat off 2 P. Pihajoki the relation and thus not exactly satisfying the equation(s) defining the relation. For example, in the case of a line in two dimensions, intrinsic scatter would manifest as a data distribution that is not a linear delta function ridge, but a ‘fuzzy’ line instead. Despite this intuitive obviousness, intrinsic scatter has a history of various somewhat non-rigorous definitions, such as through an additional additive component in measurement errors. In this paper, we will present a more rigorous definition of intrinsic scatter which is also usable in non-Euclidean contexts. Specific examples of papers addressing some of the problems above include Pearson (1901), who introduced a least squares method to fit lines and hyperplanes based on minimizing residuals orthogonal to the regression plane (OR, orthogonal regression). Later, algorithms were developed to solve this problem for non-linear relations as well (see e.g. Boggs et al. 1987 and Boggs et al. 1988 and the references therein). In Kelly (2007) and Hogg et al. (2010), problems related to outliers, truncation, censoring and intrinsic scatter are solved with a fully Bayesian approach, with some limitations. Namely, Kelly (2007) requires specifying a single dependent variable, and it is for this variable only that censoring is supported, while Hogg et al. (2010) only consider the two-dimensional case. Finally, Robotham & Obreschkow (2015) extends the results in Hogg et al. (2010) to n dimensions, for arbitrary n, and presents analytic likelihoods for n−1-dimensional hyperplanes with intrinsic scatter (i.e. lines in a plane, planes in three-dimensional space and so on), assuming data with Gaussian errors. However, there still exist some remaining issues related to fitting non-linear relations to data that have been discussed to a much lesser extent. One of these is the notion of pre-existing geometry in the measured quantities, such as for angular quantities, or measurements of points on curved surfaces (however, see e.g. Pennec 2006 and Calin & Udriste 2014). Another is the question of a proper characterisation of intrinsic scatter for non-linear relations, and how to incorporate intrinsic scatter when the n-dimensional data is not well described by an n − 1-dimensional subspace (i.e. of codimension one), but an n − k-dimensional subspace (codimension k), for an arbitrary k > 1. A suitable resolution of these issues is of interest, since it would enable powerful hypothesis testing via finding the most likely value of k and distribution of intrinsic scatter for each proposed linear or non-linear relation simultaneously. In this paper, we propose a solution to these issues by formulating the concept of non-linear relations with intrinsic scatter of general codimension k through Riemannian geometry. The novelty of our approach is in extending the idea of intrinsic scatter to curved spaces and correlations that are non-linear and have codimension greater than one, that is, not restricted to linear hyperplanes of dimension n − 1. The approach also accommodates arbitrary measurement errors, censoring and truncation. Furthermore, we give analytic results for the likelihood and posterior probability for linear n − k-dimensional relations in Euclidean spaces. These are easy to implement in fitting codes, and useful for hypothesis testing by enabling quick determination of the most likely codimension of a potential correlation in n-dimensional data, along with the parameters of the intrinsic scatter. In Section 2, we give definitions of correlation relations and intrinsic scatter distributions through the use of Rie- mannian submanifolds and an intrinsic coordinate system. The definitions allow the concept of intrinsic scatter distributions to be smoothly extended to non-linear relations and correlations of codimension greater than one. We also give a Bayesian solution to the problem of finding the most likely parameters for a given relation and intrinsic scatter, incorporating censoring, truncation and independent, general distributions of measurement errors. In Section 3 we apply our formulation to the special case of linear relations in Euclidean spaces. In particular, we extend the results in Robotham & Obreschkow (2015) to n − k-dimensional subspaces with intrinsic scatter, which correspondingly extends their usefulness to a much wider range of applications. We also extensively discuss the implications of the formalism in the case of linear regression in two dimensions, with comparisons to well-established existing methods. Finally, in Section 4, we apply our methodology to the well-known MBH – σ relation between the mass MBH of a supermassive black hole in a galactic bulge and the bulge velocity dispersion σ. Finally, we present a summary of the paper in Section 5. We note that Section 2 is by nature somewhat technical, and relies heavily on concepts in Riemannian geometry. However, the salient points of the formulation we propose are illustrated in Figures 1 through 3. For the reader with immediate applications in mind, we suggest looking at the likelihood functions derived for the special cases of an n − 1dimensional linear relation, equation (19), n − k-dimensional linear relation, equation (28) and the results for the twodimensional case, equations (33) and (B3)–(B6). 2 2.1 RELATIONS AND INTRINSIC SCATTER Relations as submanifolds The dual aim of this paper is firstly to give a geometric formulation of relations with intrinsic scatter that is intuitive and adapted to the geometry of the relation and the space of measurements. Secondly, to fit these relations to data, we aim to provide a method that is fully Bayesian and places no observable in a privileged position, i.e. there is no division into independent and dependent variables. In addition, we wish to accommodate truncated and censored datasets and independent and general distributions of measurement errors. To this end, we need to carefully define what we mean by a relation and its intrinsic scatter. We also need equal care in defining what we mean by being off the relation to be able to define intrinsic scatter in the first place. In this paper, we will consider relations as submanifolds of the manifold of all possible combinations of measurement values, which we take to have a Riemannian geometry. Being off the relation will be related to the geodesic (shortest path) distance between a point in the measurement manifold, representing a single possible combination of measurements, and the relation submanifold. In this approach, the joint distribution of the measured observables is the primary object of interest. It is this joint distribution that we wish to model with the relation submanifold and the intrinsic scatter. Consequently, the distributions of the individual observables, obtained as marginal distributions, are of secondary interest only. We start by defining a relation as a smooth map MNRAS 000, 1–19 (2017) Non-linear correlations with intrinsic scatter f : M → Rk , where M is an n-dimensional manifold with a Riemannian metric gab and k ≤ n. The relation f is fully specified by the k component functions fi , so that f (m) = ( f1 (m), . . . , fk (m)), for m ∈ M. Furthermore, the relation f may depend on n p parameters θ ∈ Rn p . In the following, we assume that we are always working with some local coordinate chart φ x : M → Rn and at times use a shorthand x for the point m ∈ M for which φ x (m) = (x 1, . . . , x n ) = x. These coordinates represent the observable quantities (e.g. angle, charge, distance, velocity, mass and so on) in the chosen units, or as scale-free logarithmic measurements. The manifold M then represents all possible combinations of measured values for these observables. Given M and f , the level set S = {m ∈ M | f (m) = 0} Ù Ù = Si = {m ∈ M | fi (m) = 0} i=1,...,k (1) i=1,...,k defines an n − k-dimensional (or of codimension k) subset S ⊆ M.1 We further require that S is a regular level set, that is, there are no m ∈ M for which f (m) = 0 and the pushforward d fm fails to be surjective, so that S is additionally an embedded (or regular) submanifold of M, as is each Si (see Lee 2013, for a complete discussion). S then represents the locus of our relation. The most geometrically obvious way to define being off the relation is to relate it to the geodesic distance of a point from the submanifold S. To this end, it is useful to construct a new coordinate system defined with the help of the normal bundle Ø Ø NS = Np S = {z ∈ Tp M |g(z, w) = 0, ∀w ∈ Tp S} (2) p ∈S 3 is closed, it is known that φ−1 f is surjective (Wolf & Zierau 1996). In some pathological cases φ−1 f may fail to be surjective, such as when the relation submanifold S has sharp corners, but in this paper we consider only cases where S is sufficiently smooth. 2.1.1 A concrete example A prototypical astrophysical case is that of a relation between two real-valued observables. In this case, the manifold M is R2 , the local coordinates are the identity map φ x (x, y) = (x, y) and the relation is f (x, y; θ), parameterized by n p parameters θ ∈ Rn p . The normal spaces are Np S = {λ · (∇ f )(p)|λ ∈ R} and we can identify exp p (Np S) with Np S itself. If we can put our relation f in the form y − g(x) = 0, we can find the coordinate transformation φ f ◦ φ−1 x as follows. If m ∈ M is the point under consideration, and p ∈ S is the point on S geodesically closest to m, with φ x (m) = (mx , my ) and φ x (p) = (p x , g(p x )), then we can take for example τ(p x , g(p x )) = p x . With this definition, we can in principle solve ν and τ as a function of mx and my from −g 0 (p x ) mx = px + ν p 1 + g 0 (p x )2 1 my = g(p x ) + ν p . 1 + g 0 (p x )2 (3a) (3b) See Figure 2. Unfortunately, analytic solutions for these equations are not straightforward to derive except in the case where g(x) is linear. p ∈S of S, essentially consisting of all the tangent vectors of M that are orthogonal to S at each point p on S. We now define a coordinate system φ f on M by defining φ f (m) = (τ(p), ν(z)) ∈ Rn−k × Rk where m = exp p (z), (p, z) ∈ N S, and τ is an arbitrary coordinate system on S and ν is an orthonormal coordinate system on Np S. Here exp p : T M → M is the exponential mapping around point p. In these coordinates, the geodesic p distance δ between m and the submanifold S is just δ = g(z, z). Intuitively, the coordinates φ f correspond to covering the original manifold M using normal coordinates around each point p ∈ S, or M ⊆ ∪ p ∈S {p} × E Np , where we have used a shorthand E Np = exp p (Np S). See the explanatory Figure 1. The spaces E Np contain all the points that can be reached from p by geodesics orthogonal to S at p. However, the subspaces E Np do not necessarily fit together neatly. In general, φ−1 f fails to be injective. This happens when two or more geodesics γi (t) = exp pi (tzi ), i ∈ I ⊂ Z+ , intersect each other at some m ∈ M. Usually normal coordinates are only defined up to these points, which define the boundary of the region where exp p is a diffeomorphism. In this case, however, it is advantageous to let E Np contain the points reachable from p by geodesics of unlimited length. In this case, φ f may be multivalued, such that φ f (m) = {(τ(pi ), ν(vi )}, i ∈ I. This is discussed in the Sections 2.2 and 2.3. When M is complete and connected and S A general level set would be f (m) = c, c ∈ R k , but we assume that the constant c has been subsumed in the definition of f . 1 MNRAS 000, 1–19 (2017) 2.2 Intrinsic distributions We now have a coordinate system φ f with which we can define intrinsic scatter in a satisfying way. In fact, we can go beyond simple intrinsic scatter, and define a general unnormalized probability distribution pint (τ, ν) on M, adapted to the relation f through the coordinates φ f . This amounts to setting up a k-dimensional probability distribution on Np S for each point p ∈ S and using the exponential mapping to create an n-dimensional distribution on M. However, as mentioned above, φ f is not injective when the geodesics normal to S intersect each other. In these cases, all the contributing points should be included, with corresponding probabilities added, so that for a point m ∈ M given in the original coordinates, φ x (m) = x, we have Õ pint (x) = pint (τi (x), νi (x)), (4) i ∈I where I ⊂ Z+ indexes all the points on S corresponding to m. This definition is necessary for cases such as the wrapped normal distribution on a circle S 1 . The distribution pint can represent e.g. a physical process producing objects with correlated values of some physical parameters, but with intrinsic scatter given by some probability distribution. An example would be the process producing the correlation between the central black hole mass and velocity dispersion in galaxies (see Section 4). The distributions of the possible physical measurements, as observed in the chart φ x , are implicitly defined as the marginal distributions of the distribution pint . These can be improper, 4 P. Pihajoki S M Points m and p are connected by a geodesic in expp(Np S) m expp(Np S) ν1 p τ1 x3 ν2 x2 expp(Np S) τ1 p Points m and p are connected by a geodesic in expp(Np S) x3 x2 x1 ν1 m τ2 S M x1 Figure 1. A figure demonstrating the relationships between the measurement manifold M (shown in violet), the manifold S defined by the relation (brown), the exponential mapped normal space exp p (N p S) (orange) and the coordinate charts φ x and φ f in a case when dim(M) = 3. Shown are cases where dim(S) = 2 (left) and dim(S) = 1 (right). The coordinates for a point p on S are either φ x (p) = (x 1 (p), x 2 (p), x 3 (p)) or φ f (p) = (τ 1 (p), τ 2 (p), 0) (left) or φ f (p) = (τ 1 (p), 0, 0) (right). For m, φ f (m) = (τ 1 (m), τ 2 (m), ν 1 (m)) (left) or φ f (m) = (τ 1 (m), ν 1 (m), ν 2 (m)) (right). The origin and orientation of the components τ can be set arbitrarily on S, but the origin of the ν is fixed on the point p. as ∫ can the distribution pint itself.p That is, we may have p volφ x = ∞, where volφ x = |g|dx 1 ∧ · · · ∧ dx n is the M int volume form on M in the chart φ x , and g = det(gab ). A concrete example of an improper pint is given below. For applications, a useful distribution is the kdimensional normal distribution, independent of τ, or the position on S, defined by h i exp − 12 νT Σ−1 ν pint (ν; Σ) = p , (2π)k det(Σ) (5) R where Σ is the covariance matrix. Of particular importance is the case where k = 1, in which case we have a onedimensional normal distribution depending only on ν, for which pint (ν; σ) = √   ν2 exp − 2 , 2σ 2πσ 2 1 have (for more details, see Section 3.3)   1 (y − α − βx)2 exp − pint (x, y) = √ , (7) 2σ 2 (1 + β2 ) 2πσ 2 ∫ for which R2 pint (x, y) dxdy diverges. Similarly, in this case the marginal distributions for x and y, ∫ q p x (x) = pint (x, y) dy = 1 + β2 (8) ∫R q py (y) = pint (x, y) dx = 1 + β2 /| β|, (9) (6) where the parameter σ, standard deviation, is now an accurate representation of what is typically called ‘intrinsic scatter’ in astrophysical literature. It should be noted that the intrinsic scatter distributions (5) and (6) can yield a probability distribution that is not proper. An example is a line y = α + βx in flat twodimensional space, for which, in the coordinate chart, we are similarly improper. If necessary, improper distributions pint arising this way can be made proper e.g. with a suitable truncation in the coordinates τ followed by normalization. Figure 3 depicts samples of the distribution (6) for three non-linear relations. From the figure it is easy to appreciate the fact that intrinsic scatter can lead to distinct patterns of amplification and attenuation in the probability density near the regions where the underlying relation is strongly curved. As such, a misleading result would be obtained from a fit to such data, if the intrinsic scatter was not modelled properly, or at all. Finally, we note that intrinsic scatter could also have been defined in two other ways, either along coordinate directions or the scalar geodesic distance to S. This seems to exhaust the possibilities, since in general the only directions MNRAS 000, 1–19 (2017) Non-linear correlations with intrinsic scatter y expp(Np S) = {a (∇f )(p) | a∈R} ~ Np s Length of geodesic = ν τ m = (mx, my) = (τ, ν) (∇f )(p) = (-g'(x), 1) S p = (px, g(px)) = (τ, 0) f(x,y) = y - g(x) = 0 x Figure 2. An example of a one-dimensional relation submanifold S in a 2-dimensional Euclidean manifold M. The coordinate transformation between φ x and φ f can be solved with equations (3). we have available are the coordinate directions, or alternatively directions along the relation and orthogonal to the direction. In addition, only geodesic distance is a sensible natural choice in a Riemannian context. It should be emphasized that the definitions of intrinsic scatter using the intrinsic coordinates φ f or the coordinate chart φ x are in principle completely equivalent, and merely formulated in different coordinates. Both are more general than a definition based only on geodesic distance from the relation S. A definition based on coordinate directions is often used at least in astronomical literature, where in the case of a line in two dimensions (x, y), the intrinsic scatter is typically taken to lie in the direction of the y-coordinate (e.g. Press et al. 1992; Tremaine et al. 2002; Gültekin et al. 2009). This gives a relation that is ‘puffed up’ in the y-direction. This approach has the obvious problem of not being invariant with respect to a change of coordinates. However, it may be reasonable in some cases, where we are certain that whatever processes are producing the intrinsic scatter only operates strictly along a particular measured observable. Nevertheless, considering the often very correlated nature of astronomical observables, establishing this fact seems to be a difficult proposition. Consider for example the MBH –σrelation between the mass of a supermassive black hole and the central velocity dispersion of its host galaxy, where the intrinsic scatter is typically taken to lie entirely along the MBH axis. As galaxies together with their SMBHs evolve, they move on the MBH –σplane, but with different galaxies starting at (nearly) the same point, not necessarily ending up near each other later due to differences in composition, environment, merger history and so on. This produces intrinsic scatter. However, it seems very difficult to justify that these proMNRAS 000, 1–19 (2017) 5 cesses should operate only along the black hole mass axis. Rather, it seems that they might operate in any which direction indeterminately, but of these, the only one evident to us is the direction away from the underlying relation. Indeed, if the processes producing intrinsic scatter would only operate along the relation, the resulting data would have no scatter around the relation at all. Finally, comparing the magnitude of intrinsic scatter between datasets becomes difficult, since the value will end up depending on the orientation of the line (see Section 3.3.1). In this sense, it seems reasonable to formulate intrinsic scatter problems in terms of the intrinsic coordinates φ f , separately considering the directions orthogonal and parallel to the proposed relation. As the last option, the intrinsic scatter could also have been defined as a probability density in the original measurement coordinate system φ x , depending only on the scalar geodesic distance to S. This approach would give relations that are ‘puffed up’ symmetrically in all directions, with density falling off as a given function of the geodesic distance. Probability densities using this approach would not present the enhancements shown in Figure 3. However, this approach is strictly less general than the one outlined above, and does not allow for e.g. wrapped distributions on spheres, toroids and so on, and cannot cope with directionally varying scatter for submanifolds S with codimension higher than one. 2.3 Fitting a relation with intrinsic scatter In a typical case, we have obtained nd measurements D = {(m1, h1 ), . . . , (mnd , hnd )}, where mi ∈ M are the measured values and hi : M → R are the probability distributions p(ηi |mi ) for the true value ηi , given the measurement mi , typically representing the estimated measurement errors. The hi are otherwise unspecified, and arbitrary distributions of measurement errors, including upper or lower limits (left or right censoring, respectively) can be naturally accommodated. For optimal results, the distributions hi should be Bayesian posterior probability densities obtained in the measurement process, fully representing the available information. However, in some cases hi are completely unknown, in which case they must be estimated, typically as Gaussians with unknown covariance matrices, which then must taken as additional nuisance parameters, in addition to the true values η. In addition to the measurements, we have a postulated relation f , parameterized by n p parameters θ ∈ Rn p , from which we derive coordinates φ f (m; θ), also parameterized by θ. We believe the data to fulfil the relation f , up to some intrinsic scatter pint , parameterized by ns parameters ϕ ∈ Rns . We would now like to find the most probable values of θ and ϕ, constrained by the data D. The Bayesian way to proceed is to note that for a single datum (m, h), the conditional probability of the mea∫ surement factors as p(m, h|θ, ϕ) = p(m, h|η)pint (η|θ, ϕ) dη, where η is the true value, drawn from the intrinsic distribution, pint . As such, the true value η is taken as a nuisance parameter, and integrated out. In addition, it may be that the measurement process is not fully sensitive across the range of possible values, leading to truncation, or data points that are not seen in the sample. If the probability that a given value η leads to a detection is given by pdet (η), we have for the measurement probability P. Pihajoki g(x) = 0.2x2 5, int = 2.0, x = y = 0.5, N = 9760 g(x) = 2.7ex5 10, int = 2.0, x = y = 0.5, N = 14140 10.0 10.0 40 7.5 35 5.0 30 25 0.0 20 2.5 30 7.5 5.0 25 5.0 2.5 y y 2.5 0.0 5.0 10 5.0 7.5 5 7.5 0 10.0 10.0 10 5 0 x 5 10 15 5 0 x 5 10 70 60 50 0.0 40 2.5 30 5.0 20 5 7.5 10 0 10.0 10 10 80 2.5 20 2.5 15 g(x) = 5.0 + 1 +10e 3x , int = 1.5, x = y = 0.5, N = 7560 10.0 7.5 y 6 10 5 0 x 5 Figure 3. Samples from a normally distributed pint , equation (6), for non-linear one-dimensional relations f (x) = y − g(x) = 0 in R2 . The chosen relations are an exponential (left), a parabola (middle) and a logistic curve (right). The relations are shown in black, and the sampled points with red dots. The samples are given a two-dimensional zero-correlation Gaussian probability distribution with standard deviations σx and σy . The background heatmaps show the summed sample probability density. The salient feature in the images is the enhancement of the probability density towards the centre of curvature, most prominently seen in the middle and right images. ∫ that p(m, h|θ, ϕ) = p(m, h|η)pdet (η)pint (η|θ, ϕ) dη. See Appendix A for full derivation. Now, taken as a function of the parameters, the probability p(D |θ, ϕ) defines the likelihood L of θ and ϕ. Assuming that the data D are independent, we get L(θ, ϕ|D) = nd ∫ Ö hi (x(τ, ν; θ))pdet (x(τ, ν; θ))pint (τ, ν; ϕ) volφ f = i=1 M nd ∫ Ö i=1 hi (x)pdet (x) M Õ (10) pint (τ j (x; θ), ν j (x; θ); ϕ) volφ x , j ∈I where the integration can be done either in the coordinate chart φ x or the intrinsic chart φ f . The integration in φ f automatically takes care of points m ∈ M that have multiple representations (τ j , ν j ), but if the integration is done over φ x , these have to be explicitly summed over. If θ and ϕ have a joint prior distribution πθ,ϕ (possibly uninformative), we can define the joint posterior probability distribution of θ and ϕ, ppost (θ, ϕ) = ∬ L(θ, ϕ|D)πθ,ϕ (θ, ϕ) L(θ 0, ϕ 0 |D)πθ,ϕ (θ 0, ϕ 0 ) dθ 0 dϕ 0 . (11) The posterior distribution, equation (11), contains all the information of how the data constrains the parameters θ of the relation itself, as well as the parameters ϕ of the intrinsic scatter model, given our prior information πθ,ϕ . In some special cases, the posterior distribution can be computed analytically, but in general it is necessary to employ numerical techniques, such as a suitable Markov Chain Monte Carlo (MCMC) method (see e.g. Gelman et al. 2013). Finally, point estimates such as the Maximum (Log-)Likelihood Estimate (MLE) and Maximum A Posteriori Estimate (MAP) can be obtained using the likelihood via standard procedures. Full derivation of the likelihood (10) and the posterior distribution (11) following the style of Jaynes (2003) is found in Appendix A. 2.4 Some considerations For the formulation presented above to make sense, a reasonable geometry must exist between the measured quantities. This is not a problem e.g. for measurements of a 3D angle, where we have the natural geometry of the sphere S 2 . In other cases, such as for joint measurements of galaxy luminosity and velocity dispersion it is reasonable to question whether a distance measured ‘across’ the measured quantities makes any sense. This observation has been discussed numerous times since Pearson in 1901 originally presented a least squares method using orthogonal distances to the regression line (or plane), typically called Orthogonal Regression (OR) (Pearson 1901). See for example Isobe et al. (1990) for a discussion. The Riemannian approach presented in this paper makes it possible to specify the units and any possible geometry between the measured quantities beforehand. After the geometry is set, the metric character of the approach ensures that results are invariant with respect to all coordinate transformations, which in this case would typically represent scaling of the measured quantities (i.e. a change of units). Another natural possibility is to introduce the measurements in an entirely scale-free manner by using logarithms.2 A practical problem is the fact that the coordinate transformation between φ x and φ f may prove difficult or impossible to derive analytically. Finding the transformation and computing the posterior probabilities numerically necessitates computing numerous geodesic distances in a curved space. In general this is highly computationally demanding, although efficient algorithms exist for some special cases (Crane et al. 2013). Finally, we note that there are to be some consequences from and natural restrictions to the choice of parameteriza- Linear measurements x i with a metric g = diag(1, . . . , 1) are equivalent to logarithmic measurements log10 x i and a metric with an exponential dependence on the measured values, g = 1 n log(10) diag(10 x , . . . , 10 x ). 2 MNRAS 000, 1–19 (2017) 10 0 Non-linear correlations with intrinsic scatter 7 tion and the prior distributions of the parameters. Firstly, it is clear that an arbitrary transformation of parameters θ = g(θ 0 ) will result in the change of the prior probability measure so that π(θ)dθ = π(g(θ 0 )) det(Jg )dθ 0 , where Jg is the Jacobian of the transformation. This can be understood also through the fact that a probability distribution π defined in the parameter space also yields through the relation f and pint a probability distribution on M. This latter distribution, once defined, should naturally be invariant under a change of parameterization, which is guaranteed by the transformation formula above. Secondly, prior distributions are usually considered to be somewhat arbitrary and application-specific, often chosen for convenience to yield analytic results for the posterior probability. However, as noted above, this freedom can be restricted by what we know of how the data is distributed on M combined with the choice of a relation f and pint . An important special case is if we have no prior knowledge of how the data is distributed, but only the possible values that it may take, through the choice of M. In this case the maximum entropy distribution on M is uniform. This distribution places restrictions on the choice of f (x; θ), and after f is chosen, forces a particular choice of π(θ), which can then in this context be called the uninformative prior. The general argument is outside the scope of this paper, but see e.g. George & McCulloch (1993), Broemeling & Broemeling (2003) and Fraser et al. (2010) for historical and modern discussions on vague and uninformative priors from different points of view. However, a special case of an uninformative prior defined in the way described above is considered in detail in Section 3.3 and later used in Sections 3.3.1 and 4. (vii) Compute the likelihood over all data as a product of the likelihood of the individual likelihoods for each data point. Equivalently, choose a suitable prior and compute the posterior distribution, equation (11), over all the data. 3 Converting between these two parameterizations is accomplished through Ín p2 pi a1 = i=1 i , ai = − , i = 2, . . . , n (14) p1 p1 a1 p1 = (15) Ín 2 , pi = −ai p0, i = 2, . . . , n. 1 + i=2 ai We will refer to these steps in the following derivations so that the process can be more easily followed. 3.1 Linear n − 1-dimensional case A highly useful special case is the case of normally distributed intrinsic scatter, equation (6), in a linear relation f : Rn → R between n observables, defining an n − 1dimensional (codimension 1) hyperplane S, with measurements drawn from an Euclidean space M = Rn . For now, we assume that the metric g is given by the n × n identity matrix I. These definitions complete step (i) from above. This special case represents well the typical astrophysical problem of modelling a linear relation between multiple physical variables that have no special geometry, such as mass, luminosity or velocity dispersion. To address step (ii), we fix the parametrization. All the planes S can be parameterized with θ = p ∈ Rn so that f (x; θ) = (x − p)T p = xT p − k pk 2 = 0, (12) Rn . where x ∈ With this parameterization, the vector p corresponds to the point of S where it is closest to the origin, and as such p is also normal to the plane S. A different parameterization, more often used in the astrophysical literature, emphasizes one particular coordinate dimension, written as n Õ x1 = a1 + ai xi . (13) j=2 WORKED OUT EXAMPLES The following sections contain analytical results for particular choices of the measurement manifold M and the relation f . In each case, we show how the framework presented above is used to obtain the likelihood, which can then be used for parameter estimation. The outline of the process, or a ‘practical how-to’, is as follows: (i) Determine the manifold M, along with the metric g. These are typically fixed by the nature of the measured quantities. (ii) Fix the functional form f (x; θ) of the relation to be fit, along with the parameters θ of the relation. (iii) Define the intrinsic coordinates (τ, ν). A wellmotivated choice for the coordinates τ along the relation is using geodesic distances from a given fixed origin. The coordinates ν are then defined up to a rotation of the νcoordinate axes. (iv) Determine the coordinate transformation φ x ◦ φ−1 f from (τ, ν) to x or the inverse transformation φ f ◦ φ−1 x . This may only be possible analytically in one direction only, or may not be possible analytically at all. (v) Choose a suitable intrinsic scatter model pint (ν, τ) as a function of the intrinsic coordinates. (vi) Evaluate the likelihood integral, equation (10). For analytical results, this typically needs to be done only for a single arbitrary datapoint, if all the datapoints have a similar error distribution model. MNRAS 000, 1–19 (2017) We further assume that for each measurement (m, h), where now m ∈ Rn , the measurement error can be modelled with an n-dimensional normal distribution h i exp − 12 (x − m)T Σ−1 (x − m) h(x; m, Σ) = , (16) p (2π)n det(Σ) where Σ is the measurement error covariance matrix. This assumption is necessary to obtain the analytic results below, but it is also well suited to published astrophysical data, for which the complete posterior distributions for each datum are typically not available. Upper limits can be incorporated by substituting one or more degrees of freedom xi in equation (16) with suitable one-dimensional distributions representing the limit distributions. To complete steps (iii) and (iv), we need to specify the intrinsic coordinates and the coordinate transformations. One method to construct the coordinates φ f is to transform the natural coordinate frame of the measurement space M with a translation by p and a rotation R ∈ SO(n), which takes the n’th basis vector ê n to the unit vector p̂ (hereafter, 8 P. Pihajoki we use a hat to signify a unit vector). The new components of a vector x are then φ f (x) = RT (x − p) = (τ, ν) ∈ Rn−1 × R. Defining w = (p0, . . . , pn−1, 0), cos θ = p̂T ê n and sin θ = p̂T ŵ, we can compute R with R( p) = I − ŵ ŵT − ê n êTn + ( ŵ ê n ) R2 (θ) ( ŵ ê n )T , (17) where R2 (θ) =  cos θ − sin θ sin θ cos θ  (18) is the usual 2-dimensional rotation matrix. The origin of the τ coordinates is then at p (in chart φ x ), with the orientation of the coordinate axes τ̂i given by τ̂i = R eˆi , for i = 1, . . . , n−1. The orthogonal intrinsic coordinate axis is ν̂1 = R ê n . Step (v) requires specification of the intrinsic scatter model pint . We assume the normal intrinsic distribution, equation (6). With this definition, combined with the assumed measurement error distribution, and assuming no censoring, that is no upper or lower limits, we can complete step (vi). We evaluate the equation (10) for the likelihood of a single measurement datapoint. The result is " # −m̃n2 1 L( p, σ|m, Σ) = p exp , (19) 2(Σ̃nn + σ 2 ) 2π(Σ̃nn + σ 2 ) defining an n − k-dimensional (codimension k) affine subspace Sn−k . In this case, it is easiest to define the relation through defining the intrinsic coordinates first. As such, we go through steps (iii) and (iv) first. This can be accomplished by starting with the n − 1-dimensional subspace Sn−1 defined by the first relation, through the n parameters p n ∈ Rn , as above. Now, the subspace Sn−k must lie in the intersection of Sn−1 and an n − 2-dimensional subspace Sn−2 , which itself must also lie entirely in Sn−1 . We may parameterize Sn−2 within Sn−1 with the n − 1 parameters p n−1 = (pn−1,1, . . . , pn−1,n−1, 0) ∈ Rn . This process is then continued until we have given pn−k+1 , parameterizing Sn−k in Sn−k+1 . The number of parameters is (2nk − k 2 + k)/2 in total. Each parameter vector pi yields a rotation matrix Ri as in the section above, which together with pi defines the coordinate transformation from the intrinsic coordinates φ f on Si to the intrinsic coordinates on Si−1 , with the understanding that Sn = M. Following this process through, we find that the coordinate transformation from φ x to the intrinsic coordinates on Sn−k is given by T T (φ f ◦ φ−1 x )(x) = Rn−k+1 · · · Rn (x − p n ) − RTn−k+1 · · · RTn−1 p n−1 − · · · − RTn−k+1 p n−k+1 where T (20) = R (x − p) T (21) = (τ, ν) ∈ Rn−k × Rk , m̃ = R (m − p) Σ̃ = R ΣR. We can also write m̃n = p̂T m − k pk and Σ̃nn = p̂T Σ p̂, which transforms equation (19) to the form used in Robotham & Obreschkow (2015). We can also address the case where the measurements are given in coordinates where the metric is represented by a constant matrix G , I. This can be the case when the metric G encodes the choice of units for the variables, or when it has off-diagonal terms. A situation that would lead to a non-diagonal metric is, for example, a case where we are interested in two observables A1 and A2 , but can only measure B1 = A1 and B2 = A1 + A2 . The observables may be e.g. inflows of current or liquid from two independent sources, but we can only measure one source directly, and the sum of the flows somewhere downstream. The flows Ai can by assumption have any values, so the metric in coordinates Ai should be a diagonal product metric, whereas in coordinates Bi off-diagonal terms appear. For the case of a non-identity constant metric G, the equation (19) is still valid, but we have m̃ = RT WPT (m − p) T T Σ̃ = R WP ΣPWR, (22) (23) where W is a diagonal matrix of the square roots of the eigenvalues of G, and P ∈ O(n), so that W−1 PT GPW−1 = I. This is possible, since the metric is assumed to be Riemannian, in which case all the eigenvalues of G must be positive. Note that if the metric is not constant, the shortcut presented above does not work, and all the steps (i)-(vii) have to be followed using the metric explicitly. 3.2 Linear n − k-dimensional case The approach in the previous section can be readily generalized to the case of k > 1 simultaneous linear relations, (24) T where RT = RTn−k+1 · · · RTn (25) and p = p n + Rn p n−1 + · · · + Rn · · · Rn−k+2 p n−k+1 . (26) Again, the origin of the intrinsic coordinate axes is at p. The orientation is similarily given by τ̂i = R êi for i = 1, . . . , n − k and ν̂i = R ê n−k+i for i = 1, . . . , k. This process defines the relation f in a roundabout way as the equation ν = 0, which in the chart φ x is then given by the system of k equations f (x; θ) = [RT (x − p)]n−k+1,...,n = 0, (27) where θ = (p n, . . . , p n−k+1 ). This completes step (ii). We again assume that measurement errors are normally distributed, given by equation (16). For step (v) we now assume that the intrinsic scatter is normally distributed in ν with a covariance matrix Σint , as in equation (5). With this definition, we can complete step (vi) and compute the likelihood given by a single measurement m. The result is h i exp − 12 m̃νT (Σ̃νν + Σint )−1 m̃ν L(θ, Σint |m, Σ) = , (28) q  (2π)k det Σ̃νν + Σint where m̃ = RT (x − p) = ( m̃τ , m̃ν )   Σ̃ Σ̃τν . Σ̃ = RT ΣR = ττ Σ̃ντ Σ̃νν (29) (30) A possible constant non-Euclidean metric can be accommodated as in the previous section. The likelihood, equation (28) is readily generalized for intrinsic distributions other than the multivariate normal MNRAS 000, 1–19 (2017) Non-linear correlations with intrinsic scatter distribution through mixture models (see e.g. the approach in Kelly 2007). In addition, the result in this section is useful for hypothesis testing in the sense of finding the most likely value of k for a given n-dimensional dataset. 3.3 The line in two dimensions It is useful to work out the two-dimensional special case of a line with intrinsic scatter in detail, considering the amount of literature focusing on symmetric fitting of linear relations with and without intrinsic scatter (e.g. Pearson 1901; Boggs et al. 1987; Isobe et al. 1990; Feigelson & Babu 1992; Robotham & Obreschkow 2015, and many others). As such, step (i) consists of setting M = R2 with an Euclidean metric. In step (ii), for ease of comparison with existing methods, instead of the parameterization used above, we define the relation f and the line S with f (x, y; θ) = y − βx − α = 0, (31) where now θ = (α, β) ∈ The measurement error in the case of no censoring can now be represented with a twodimensional normal distribution, given by R2 . h(x, y; x0, y0, σx , σy , ρ) =    (y−y0 )2 2ρ(x−x0 )(y−y0 ) (x−x0 )2 1 exp − 2(1−ρ + − 2) 2 2 σ x σy σx σy , p 2 2πσx σy 1 − ρ (32) where x0 and y0 specify the measured values, σx , σy represent the measurement uncertainties in the x and y directions, and ρ ∈ [−1, 1] specifies the correlation between the measurement errors. Upper and lower limits can be introduced as in Section 3.1. While the parameterization through α and β is convenient and intuitive, it is not manifestly symmetric with respect to the coordinates. This will be investigated further below. Keeping the assumption that the internal scatter is normally distributed, via equation (6), we can use the results for steps (iii) to (vi) from Section 3.1. The likelihood of a single measurement in the case of no censoring is then obtained from equation (19), yielding   ν2 1 L(α, β, σ|x0, y0, σx , σy , ρ) = √ exp − 2 , (33) 2σ̃ 2π σ̃ 2 where now ν2 = σ̃ 2 = (y0 − α − βx0 )2 1 + β2 β2 σx2 + σy2 − 2βρσx σy 1 + β2 (34) + σ 2, (35) so that ν 2 is the squared orthogonal distance from the relation, and σ̃ is an extended uncertainty incorporating both intrinsic scatter and the measurement errors. Analytic results for particular censored error distributions can also be found. See Appendix B. We note that equation (35) has the correct asymptotic behaviour with respect to β, in the sense that when the regression line tends towards the vertical, or β → ∞, we have σ̃ → σx2 + σ 2 , agreeing with intuitive result that all of the uncertainty should in this case be a combination of the horizontal (along x-axis) and intrinsic scatter. Likewise, when MNRAS 000, 1–19 (2017) 9 the regression line tends towards the horizontal, or β → 0, we have σ̃ → σy2 + σ 2 , similarly agreeing with geometric intuition. We now apply the discussion in Section 2.4 and derive a strictly unique uninformative prior probability density for the parameters θ = (α, β). This is appropriate for the case where no data has yet been collected, and we have no information on where on the plane the relation is and in what orientation. Thus, we need to find a prior density for θ which yields a uniform distribution on M when integrated over. That is, the lines must cover the plane evenly. A direct approach seems to necessitate set-based analysis, but in this special case we can apply existing results from the literature, derived via other means. For example, demanding invariance under Euclidean coordinate transformations (simultaneous rotation and translation) yields an invariant prior probability measure π(α, θ)dαdθ = dαd sin θ, where θ = arctan β is the angle between the line and the x-axis. This is equivalent to π(α, β) = (1 + β2 )−3/2 . The same result can be obtained by demanding that the prior density be invariant under a switch of the coordinates, that is under x ↔ y, σx ↔ σy , β ↔ 1/β and α ↔ −α/β. This result was apparently originally derived by E.T. Jaynes in 1976 (reprinted in Jaynes 1983). Finally, for σ there is considerably more leeway in the literature with regards to the choice of an uninformative prior. A typical choice is the Jeffreys prior, π(σ) ∝ 1/σ. The complete uninformative prior for this special case is then πϕ,θ (α, β, σ) = 1 . σ(1 + β2 )3/2 (36) Equation (36) and (33) can now be combined to yield the unnormalized posterior distribution p(α, β, σ|D) = nd Ö 1 L(α, β, σ|xi, yi, σx,i, σy,i, ρi ). σ(1 + β2 )3/2 i=1 (37) This gives a Bayesian solution to the problem of symmetric fitting of a linear relation with intrinsic scatter to twodimensional data with heteroscedastic errors in both measured variables, including possible upper or lower limits and truncation. This result thus extends the earlier Bayesian results in Zellner (1971), Gull (1989), Jaynes (1991, unpublished) and Kelly (2007). It should be noted that while the likelihood, equation (33) is invariant under the switch of coordinates, the posterior distribution in itself is not, if the Jacobian of the transformation of parameters is not included, as discussed in Section 2.4. In practice this means that in the usual case of f = y − α − βx we wish to find the maximum of p(α, β, σ|x, y, σx , σy ) = p(α, β, σ)L(α, β, σ|x, y, σx , σy ). (38) In the inverse case, where f = x − α 0 − β 0 y, and α 0 = −α/β, β 0 = 1/β, we should maximize β 03 p(α 0, β 0, σ)L(α 0, β 0, σ|y, x, σy , σx ) = p(α, β, σ)L(α, β, σ|x, y, σx , σy ), (39) where β 03 is the Jacobian of the transformation (α, β) 7→ (α 0, β 0 ). This works since for the priors we have p(α 0, β 0, σ) = 10 P. Pihajoki β3 p(α, β, σ) and for the likelihood we have L(α 0, β 0, σ|y, x, σy , σx ) = L(α, β, σ|x, y, σx , σy ) bution, as in equation (33), but with (40) ν 2 = νa2 = (y0 − α − βx0 )2 2 as found above. The result in this section can be easily extended to cases where the intrinsic scatter is not normally distributed or the measurement errors are not distributed with a bivariate normal distribution, by approximating the distributions with a weighted sum of Gaussians, as used e.g. in the linmix_errmethod of Kelly (2007). However, the result is not applicable for situations more general than the linear case considered here, such as when the M itself is not trivially Euclidean, but includes e.g. angular or directional measurements or when the relation f is non-linear. In these cases, the likelihood function and consequently the posterior distribution may have to be evaluated numerically. 3.3.1 Comparison to some existing approaches The equations (33), (34) and (35) are a fundamentally symmetric way to describe the likelihood of parameters (α, β, σ) specifying a line with orthogonal intrinsic scatter. Several earlier works have incorporated intrinsic scatter as an error parameter, added in quadrature to the measurement errors along some specific measurement axis, as in e.g. the least likelihood method in Gültekin et al. (2009) and the FITEXY method (Press et al. 1992) as modified in Tremaine et al. (2002). These methods introduce intrinsic scatter into the measurement errors of the dependent variable (for now taken to be y), yielding a total variance of the form 2 , σ̄ 2 = σy2 + β2 σx2 + σint,y (41) in the case of normally distributed intrinsic scatter in the y2 direction, where σint,y is the variance of the intrinsic scatter and ρ = 0 is assumed. This is not equivalent to equation (35), and in particular, the missing normalization factor 1 + β2 leads to σ̄ → ∞ as β → ∞. We will now discuss how this difference arises. Firstly, assume that the underlying distribution of the data is a normal distribution orthogonal to a linepy = α + βx, i.e. given by equation (6) with ν = (y − α − βx)/ 1 + β2 . In this case the conditional distributions of the intrinsic scatter in the x- and y-directions are also normal, with variances 2 σint, x = 1 + β2 2 σ β2 2 σint,y = (1 + β2 )σ 2 . (42) (43) However, the marginal distributions of x and y are not normal. Now, the result in equation (41) can be obtained from the likelihood produced by a single measurement, L(α, β|x0, y0, σx , σy , σ) = ∬ h(x, y; x0, y0, σx , σy , ρ) pint (ν; σ) dx dy (44) R2 where h is the 2-dimensional Gaussian given by equation (32) and pint is the normal distribution, equation (6). The assumptions yielding equation (41) are to take ν = y − α − βx, i.e. distance from the regression line in the ydirection, and to set σ = σint,y . This yields a normal distri- σ̃ = σ̃a2 = β2 σx2 + σy2 (45) 2 − 2βρσx σy + σint,y , (46) where the subscript a refers to asymmetric, which is a point we will discuss below. If we set ρ = 0, we have the likelihood used in Gültekin et al. (2009),   (y0 −α−βx0 )2 exp − 2   ) 2(σy2 +β 2 σx2 +σint, 1 y exp − χ2 = q L= √ , (47) 2 2π σ̄ 2 ) 2π(σy2 + β2 σx2 + σint,y as well as the χ2 value used in Tremainepet al. (2002). Likewise, if we instead use ν = (y − α − βx)/ 1 + β2 , i.e. orthogonal distance from the regression line, in the equation (44), the result is the set of equations (33)-(35). However, at this point we find that making the obvious substitution from equation (43) does not make the set of equations (33)-(35) equivalent to equation (33) combined with the substitutions (45) and (46). Furthermore the χ2 in equation (47) is invariant under the switch of independent and dependent coordinates, together with σint,y ↔ σint,x . However, the variance σ̃a2 and consequently the likelihood are manifestly not invariant. The equation (47) will give smaller likelihoods than equation (33) for β  1 or β ∼ 0, depending on which variable is taken as the dependent one. The fundamental reason for this state of affairs is the fact that if the intrinsic scatter is modelled as a proper probability distribution in any particular coordinate direction, the normalization of the intrinsic scatter as a distribution orthogonal to the relation will change in normalization with change in β. This reflects the breaking of the rotational symmetry of the problem. For example, assume that the intrinsic scatter is modelled as a normal distribution in the y2 direction, with variance σint,y . In this case the distribution of the data, being the intrinsic scatter in a direction orthogonal to the regression line, will need to have a normalization constant that goes down with increasing slope β. Indeed, as β → ∞, the normalization constant will need to tend towards zero, to keep the conditional probability distribution in the y-direction normalized to unity. This leads to a vanishing likelihood for a vertical line β → ∞, which results from the fact that in this case σ̃a → ∞ and consequently the resulting likelihood L(α, β → ∞|D) → 0. In mathematical terms, if we have a distribution of the data depending only on the orthogonal distance, pint (ν), and we have demanded that in y-direction we should have a proper probability density function pint,y (y), that is ∫ ∞ ∫ ∞ pint (ν(x(y), y)) dy = 1, (48) pint,y (y) dy = −∞ −∞ then necessarily ∫ ∞ ∫ ∞ dν 1 pint (ν) dν = pint (ν(x(y), y)) dy = p , dy −∞ −∞ 1 + β2 (49) which goes to zero as β → ∞. This is inconsistent, if we expect the distribution of the data, pint , to have the same normalization no matter which way the regression line might point. Armed with this knowledge, if we now multiply the p 2 right side of equation (47) by 1 + β2 and substitute σint,y from equation (43), we do arrive at the equations (33)-(35). MNRAS 000, 1–19 (2017) Non-linear correlations with intrinsic scatter 3 We used the implementation available in the MPFIT package (Markwardt 2009) through the MPFITEXY wrapper routine (Williams et al. 2010). MNRAS 000, 1–19 (2017) Table 1. Slopes of linear relations fit with the maximum a posteriori estimate of equation (37) (MAP) and the linmix_err and FITEXY methods. Slope of data Method linmix_err fwd linmix_err inv FITEXY fwd FITEXY inv Geo-MAP fwd Geo-MAP inv linmix_err fwd linmix_err inv FITEXY fwd FITEXY inv Geo-MAP fwd Geo-MAP inv 0.1 1 10 Slope of fit ± 1-σ uncertainties α=0 0.09 ± 0.02 0.99 ± 0.04 1.67 ± 0.70 0.42 ± 0.12 1.08 ± 0.05 15.4 ± 5.99 0.09 ± 0.02 0.99 ± 0.04 1.68 ± 0.39 0.41 ± 0.06 1.08 ± 0.04 15.5 ± 6.10 0.10 ± 0.03 1.04 ± 0.05 11.8 ± 2.80 0.10 ± 0.03 1.04 ± 0.04 11.8 ± 2.79 α = 10 0.04 ± 0.02 0.93 ± 0.04 1.79 ± 0.57 0.51 ± 0.27 1.01 ± 0.04 10.9 ± 3.31 0.04 ± 0.02 0.93 ± 0.04 1.80 ± 0.35 0.52 ± 0.13 1.01 ± 0.04 10.9 ± 3.24 0.04 ± 0.02 0.98 ± 0.04 8.66 ± 1.68 0.04 ± 0.02 0.98 ± 0.04 8.66 ± 1.68 1.5 1.0 0.5 y Based on this analysis, the likelihood of equation (33) is recommended for the purpose of fitting a regression line with normally distributed intrinsic scatter to data with normally distributed measurement errors. This point is also raised in Robotham & Obreschkow (2015). To investigate this conclusion numerically, we generated sets of simulated observations from linear relations with intrinsic scatter. The data were then fit using linmix_err, FITEXY,3 and by maximizing the posterior probability, equation (37). This last method is referred to as Geo-MAP (Geometric Maximum A Posteriori) hereafter. The parameter estimates and 1-σ uncertainties for the linmix_err method were taken using the median and standard deviation of the Markov chain outputs. For the FITEXY method the estimate and uncertainty provided by the algorithm were used. For the Geo-MAP method a bootstrapping method was used together with a numerical maximization of the posterior distribution to yield the parameter estimates and 1-σ uncertainties. The simulated datasets were generated assuming a relation y = α + βx, with a normally distributed orthogonal intrinsic scatter σ = 0.1 and normally distributed measurement error with σx = σy = 0.1 and ρ = 0. In total six datasets were generated, with nd = 100 data points each and with α ∈ {0, 10} and β ∈ {0.1, 1, 10}. The datasets represent a situation where the intrinsic scatter and measurement errors contribute equally to the observed scatter, and as such approximations assuming the relative smallness of either are maximally violated. The data were generated with a uniform distribution U(−1, 1) along the relation, and then shifted first according to σ and then according to σx and σy . The data was then fit both in the forward direction, with y = α + βx as well as the inverse direction, with x = α 0 + β 0 y. For the inverse direction, the slope β = 1/β 0 was computed after the fit. The slopes of the resulting fits are listed in Table 1. Figure 4 illustrates the differences between the methods for the α = 0, β = 10 case. The results show that for values of β  1 the inverse fits with the linmix_err and FITEXY methods agree better with the data, albeit with high uncertainties. Similarly, for β  1 the forward fits give a better agreement with the data. This is in line with the observations above, showing that these methods give results tending towards lower values of β for β  1 when used in the forward direction, and correspondingly towards higher values of β for β ∼ 0, when used in the inverse direction. It should be noted that in addition to yielding estimates of β that are much too high or low in these cases, both linmix_err and FITEXY methods give corresponding uncertainty estimates that are small, so that the true value of β ends up as a multiple-σ outlier. Similarly as expected, the Geo-MAP method gives nearly identical results for forward and inverse fits, up to the noise caused by the bootstrapping procedure. In addition, the true value of β is always contained within the 1-σ bounds except for the case of (α, β) = (10, 0.1). Finally, we note that none of the methods appear invariant with respect to a shift with α. We conclude that methods based on likelihood examining distances from the regression line in the direction of a 11 0.0 0.5 1.0 linmix_err fwd linmix_err inv FITEXY fwd FITEXY inv Geo-MAP fwd True relation 1.51.5 1.0 0.5 0.0 0.5 1.0 1.5 x Figure 4. Fits to simulated measurements with measurement errors σx = σy = 0.1, sampled from a linear relation y = 10x with intrinsic scatter σ = 0.1. Solid lines show the fitted relations and dashed lines indicate 1-σ intrinsic scatter estimates. particular coordinate may give estimates of slope that are far from the true value while simultaneously providing tight error bounds. In particular, if the distance is measured along the dependent variable, the resulting method will be biased towards β = 0. For methods, like the maximum-likelihood method in (Gültekin et al. 2009), this effect remains even when the intrinsic scatter σ → 0, in which case the distribution pint becomes a delta-function ridge, and the problem reduces to Ordinary Least Squares (OLS) regression. This tendency towards lower slopes was reported in Park et al. (2012) for all the methods used in the paper, namely OLS, BCES (Akritas & Bershady 1996), FITEXY, linmix_err, and 12 P. Pihajoki the Gültekin et al. (2009) maximum-likelihood method. Our results also agree with Isobe et al. (1990), who studied different regression methods in the limit of vanishing measurement error. with normalization omitted for clarity. For step (iv), we can now construct the coordinate transformation φ x ◦ φ−1 f to find 3.4 x̃(τ, ν1, ν2 ) = g(E(τ)) + ν1 ẽ3 + ν2 Ellipses in Euclidean space Next, we consider a case where the relation f is properly non-linear. With astrophysical applications in mind, we seek analytic results for ellipses embedded in a Euclidean space. A possible application could be, for example, to model the orbit of a stream of low mass particles. As such, for step (i) we consider our measurements to be points in M = R3 with the Euclidean metric. For step (ii), we define the ellipse with x̃ 2 x̃22 f (x; θ) = 12 + − 1 = 0, a (1 − e2 )a2 cos Ω − sin Ω 0 0 0 1 © ª© ª cos Ω 0® ­0 cos i − sin i ® R = ­ sin Ω 0 1¬ «0 sin i cos i ¬ « 0 (51) cos ω − sin ω 0 © ª cos ω 0® . × ­ sin ω 0 0 1¬ « In the ellipse-aligned frame, the ellipse can now be characterized also as the curve p (52) g(E) = a cos E ẽ1 + 1 − e2 a sin E ẽ2, where E ∈ [0, 2π) is typically called the eccentric anomaly. To use this convenient form, we will work in the coordinate frame aligned with ellipse in the following. We can now define the intrinsic coordinates (step (iii)) by defining τ to be the arc length of the ellipse, with τ = 0 in the direction of ẽ1 and increasing towards ẽ2 . We will need the relation between the eccentric anomaly E and the arc length τ, given by p (53) τ(E) = 1 − e2 a E(E, −e2 (1 − e2 )−1 ), where ∫ φp 1 − m sin2 θ dθ (54) 0 is the incomplete elliptic integral of the second kind. The orthogonal coordinate axes can be defined so that ν̂1 is parallel to ẽ3 and ν̂2 points orthogonally away from the ellipse, and thus can be given as 2 x̃1 2 x̃2 ẽ1 + ẽ2 a2 (1 − e2 )a2 2 cos E 2 sin E = ẽ1 + √ ẽ2, a 1 − e2 a  2 cos E 2 sin E ẽ2 . ẽ1 + √ a 1 − e2 a (56) However, the inverse transformation is already very difficult to find analytically, and further problems caused by the nonlinearity will now also manifest. At this point, step (v), we should specify the intrinsic scatter model. To mitigate analytic problems, we would again like to use the simplest normal distribution, so that (50) where θ = (p, a, e, i, ω, Ω). Here the parameters θ constitute p ∈ R3 , which specifies the position of the centre of the ellipse, and a, e, i, ω and Ω, which are the orbital elements, namely semimajor axis, eccentricity, inclination, argument of pericentre and longitude of the ascending node, respectively. The tilde signifies a coordinate transformation to a vector x̃ = RT (x − p), where the matrix R rotates the Euclidean coordinate triad { ê1, ê2, ê3 } into a coordinate triad { ẽ1, ẽ2, ẽ3 } aligned with the ellipse. That is, ẽ1 points along the semimajor and ẽ2 along the semiminor axis. The matrix R can be written explicitly as the product E(φ, m) =  ν̂2 ∝ (55) h i 1 (ν 2 + ν 2 ) exp − 2σ 2 1 2 pint (τ, ν1, ν2 ; σ) = . 2πσ 2 (57) However, we find that even if we consider a similarly simplified measurement error distribution, h( x̃; m̃, σm ) = h i exp − 12 ( x̃ − m̃)T ( x̃ − m̃) 2σm 2 )3/2 (2πσm , (58) it is very difficult to obtain a closed form result for the likelihood integral, equation (10). Neither is it obvious how to compute the form of pint in the measurement coordinates φ x , whether in the original or ellipse-aligned form. To make progress, we have to make some assumptions. The main assumption we need is that the intrinsic scatter σ is small compared to the minimum radius of curvature of the ellipse, or σ  (1 − e2 )b. If this is the case, we can approximate the intrinsic scatter distribution with a convolution of the ellipse and a normal distribution, which in the ellipse-aligned coordinate chart yields ∫ pint ( x̃) ∼ R3 δ ỹ12 ! ỹ22 + − 1 a2 (1 − e2 )a2 h i 1 ( ỹ − x̃)T ( ỹ − x̃) exp − 2σ 2 × d ỹ, (2πσ 2 )3/2 (59) where δ is the Dirac delta distribution. While this integral also resists evaluation in closed form, we can approximate it by a mixture of normal distributions, by distributing individual normal distributions on points equidistantly spaced in arc length. The number N of component distributions required to make the distribution smooth depends on the intrinsic scatter σ. A Euclidean separation of less than σ is sufficient, and we can thus set N=   τ(E = 2π) , σ (60) where the brackets denote the ceiling function. We can now complete step (vi), and evaluate the likelihood for a single MNRAS 000, 1–19 (2017) Non-linear correlations with intrinsic scatter measurement, yielding L(θ, σ| m̃, σm ) = i h ∫ exp − 12 ( x̃ − m̃)T ( x̃ − m̃) 2σm 2 )3/2 (2πσm h i 1 T N 1 Õ exp − 2σ 2 ( x̃ − g(Ei )) ( x̃ − g(Ei )) × d x̃ N (2πσ 2 )3/2 i=1 h i 1 T N 2 +σ 2 ) (g(Ei ) − m̃) (g(Ei ) − m̃) 1 Õ exp − 2(σm = , 2 + σ 2 ])3/2 N (2π[σm R3 (61) i=1 where the eccentric anomalies Ei need to be numerically solved from i τ(Ei ) = τ(2π) . (62) N The equation (61) is then straightforward to evaluate numerically for each datapoint, completing step (vii). 3.5 Circles on a spherical surface This choice is appropriate for positions on the plane of the sky, for example. This definition completes step (i). For step (ii), we choose a relation that defines a circle, by setting (64) where θ = (θ c, φc, αc ). Here the parameters (θ c, φc ) ∈ R2 specify the centre of the circle, and αc is equal to one-half of the angular size of the circle. The tilde denotes a coordinate transformation which takes the centre of the circle to the north pole, or θ̃ c = 0. This transformation is most conveniently realized by first transforming the points (θ, φ) to Cartesian three-vectors, using the rotation matrix constructed in Section 3.1, and then converting back to spherical coordinates. The analytic form of the transformation (θ, φ) 7→ (θ̃, φ̃) can be given directly in terms of (θ, φ) and (θ c, φc ) but the result is unwieldy and omitted. For steps (iii) and (iv) we now define the intrinsic coordinates and the coordinate transformation between them and the tilde-transformed coordinates. A convenient choice is to set φ̃ = τ, so that the τ coordinate increases with longitude as we go along the circle. We likewise set θ̃ = αc + ν. This coordinate transformation is multivalued in the sense that a given point (θ̃, φ̃) corresponds to a infinite number of intrinsic coordinate pairs, which can be written as φ f ◦ φ−1 x (θ̃, φ̃) = {(θ̃ − αc + n 2π, φ̃)|n ∈ Z} ∪ {(θ̃ + αc + k 2π, (φ̃ + π))|k ∈ Z}. (65) The second set of intrinsic coordinate pairs above corresponds to geodesics originating from the point of the circle on the other side of the sphere, at φ̃ + π (modulo 2π). MNRAS 000, 1–19 (2017) For the definition of the intrinsic scatter distribution in step (v) we again use the one-dimensional normal distribution, equation (6). At this point, it is advantageous to express the intrinsic scatter distribution in the original coordinate frame as well. Since the coordinate transformation is now multivalued, we must proceed as explained in Section 2.2, to get pint (θ̃; αc, σ) ∞  ( θ̃ −α c +n 2π)2 2  Õ 1 − − ( θ̃ +α c +n2 2π) 2σ 2 2σ = √ e +e 2πσ 2 n=−∞ "   2 1 π(θ̃ − αc ) − 2π2 − ( θ̃ −α c ) σ e 2σ 2 ϑ i = √ , e σ2 2πσ 2  # 2 π(θ̃ + αc ) − 2π2 − ( θ̃ +α c ) σ , e , + e 2σ 2 ϑ i σ2 (66) where ϑ is a Jacobi theta function corresponding to the definition ∞ Õ 2 ϑ(z, q) = q n e2niz , (67) n=−∞ Finally, we consider an example of a relation defined in a non-Euclidean space. Specifically, we assume the measurements lie on M = S 2 , the two-dimensional spherical shell. We use the standard spherical coordinate chart (θ, φ) ∈ R2 , for which the metric is given by the matrix   1 0 G= . (63) 0 sin2 θ f (θ, φ; θ) = θ̃ − αc = 0, 13 with q, z ∈ C, |q| < 1. Note that there is no dependence on φ̃. From this form of the pint distribution it is easy to appreciate the close relation to the wrapped normal distribution defined on the circle, also defined through a Jacobi theta function. As such, this example shows how the wrapped distributions naturally arise from the intrinsic coordinate formalism. To proceed further, we need to make some assumptions of the error distribution of the measurements, which we denote by pairs (θ̃ m, φ̃m ). An attractive choice would be one of the spherical generalizations of the normal distribution, such as the Kent distribution or the Von Mises–Fisher distribution. However, these combined with the intrinsic scatter distribution (66) and the metric of S 2 do not seem to easily yield closed form results for the likelihood in step (vi). Instead, we have to assume that the measurement error is very small, and approximately given by a uniform distribution within a small cell [θ̃ m ± ∆m /2, φ̃m ± ∆m /(2 sin θ̃ m )] ⊂ S 2 , where ∆m specifies the (small) magnitude of the error. With the help of this admittedly severe assumption, we can proceed to step (vi) and compute the likelihood for a single measurement, finding L(θ, σ| θ̃ m, φ̃m, ∆m ) ∼ pint (θ̃ m ; αc, σ) + 1 2 dp (θ̃; αc, σ) ∆ cot(θ̃ m ) int 12 m dθ̃ θ̃=θ̃m (68) to second order in ∆m . While the likelihood (68) is complicated by the presence of the theta functions and their derivatives, these can be efficiently evaluated numerically, and it is again straightforward to numerically compute the value of the likelihood for each datapoint to complete step (vii). We can compare the result to some existing approaches, such as presented in Jupp & Kent (1987) and Fujiki & Akaho (2009). The former method is based on splines, and the latter is based on Euclidean approximation of small spherical distances and least squares fitting. The method in Jupp & Kent (1987) can in principle cope with arbitrarily large normally distributed measurement errors, but cannot incorporate intrinsic scatter, limits or truncation. In addition, since the result is always a spline, no parameter estimation for 14 P. Pihajoki a predetermined curve is possible. The method in Fujiki & Akaho (2009) is suitable for parameter estimation, but otherwise shares the disadvantages of the Jupp & Kent (1987) method in addition to not incorporating measurement errors at all. In this sense, the geometric approach presented here compares favourably, although it presents mathematical difficulties if curves other than circles are to be fit. 3.6 What is learned from the examples The examples clearly demonstrate that analytic results are only easy to obtain in the case where M is Euclidean and the relation to be fit is linear, or more exactly a geodesic. In the last two examples, simplifying assumptions are necessary to obtain a closed form for the likelihood. As such, while the linear Euclidean case of normally distributed orthogonal scatter is essentially solved here completely, much future work is required in the context on non-linear relations and non-Euclidean spaces. In addition, the choice of parameterization of the relation to be fit has some important consequences. Firstly, the chosen parameterization directly affects the form of the prior probability distribution, as discussed in Section 2.2. In addition, different parameterizations may not be numerically well-behaved everywhere. For example, the pparameterization used in Sections 3.1 and 3.2 will likely exhibit numerical instability if any of the relation hyperplanes passes close to the coordinate origin, in which case k pk → 0 and the orientation of the plane becomes indeterminate. The (α, β)-parameterization in Section 3.3 suffers from similar difficulties for nearly vertical lines, as then the values β → ±∞ become degenerate. 4 THE MBH –σ RELATION As a typical application, the methodology described above can be applied to the MBH –σ relation, typically written in the form     MBH σ log10 = α + β log10 . (69) M 200 km s−1 The MBH –σ relation is an important correlation between the mass MBH of the supermassive black hole in the centre of a galaxy and the velocity dispersion σ of the galactic bulge.4 Since the initial discovery of this correlation (Ferrarese & Merritt 2000; Gebhardt et al. 2000, but see also Magorrian et al. 1998), it has been re-established several times, using both larger datasets and different statistical procedures (e.g. Tremaine et al. 2002; Novak et al. 2006; Gültekin et al. 2009; McConnell et al. 2011; Graham et al. 2011; Beifiori et al. 2012; McConnell & Ma 2013; Saglia et al. 2016; van den Bosch 2016). The existence of the MBH –σ relation and analogous relations, such as the correlation MBH –Mbulge with the galaxy bulge mass, have also been confirmed in numerical simulations, both in galaxy merger simulations (e.g. Di Matteo et al. 2005; Johansson et al. 2009a,b; Choi et al. 2014) and in cosmological simulations (e.g. Sijacki et al. 2007; Di Matteo et al. 2008; Booth & Schaye 2009; Sijacki 4 To avoid confusion, the intrinsic scatter will be denoted with σint in this section. et al. 2015). However, all of these studies have used statistical methods which treat one observable as independent and the other observable as dependent. Redoing the fit with the independent observable as the dependent and vice versa produces a significantly different correlation slope, and in some cases also affects the estimated value of the intrinsic scatter (Park et al. 2012). Consequently, there is some controversy in the astronomical literature as to whether it is more suitable to fit MBH as a function of σ (forward regression, using the definition in Park et al. 2012), or the other way around (inverse regression, respectively) in the presence of intrinsic scatter. For a review of the debate, see Graham (2016) and the references therein. That different slopes are produced by switching dependent and independent variables has been known for a long time (e.g. Pearson 1901), and amounts to asking two different questions: what is the most likely value for MBH given σ or vice versa. However, it is equally well known that if one is interested in the functional relation between the observables, then a symmetric method should be used (see e.g. Isobe et al. 1990). The approach in Section 3.3 presents a symmetric Bayesian solution to fitting a linear relation between two observables, incorporating heteroscedastic errors, upper limits and intrinsic scatter. As such, we would expect it to yield a non-biased estimate of the intrinsic slope β of the relation (69), regardless of which way the relation is fit. To investigate this, the three datasets used in Table 1 of Park et al. (2012) were analysed. The data are originally from Gültekin et al. (2009), McConnell et al. (2011) and Graham et al. (2011). In order to compare with the results in Park et al. (2012), the measurement errors were modelled as uncorrelated bivariate Gaussians in the logarithmic space, leaving out all upper limits. Following Park et al. (2012), the standard deviations were set equal to mean errors, i.e. σlog10 MBH = (log10 MBH,high − log10 MBH,low )/2 and similarly for the velocity dispersions. In addition, for the Graham et al. (2011) sample, which lacks velocity dispersion error data, the velocity dispersion errors were set to 10% and then propagated to averaged logarithmic errors. Finally, a dataset compiled from a multitude of sources used in van den Bosch (2016) was used. For this dataset, the errors were used as given, and upper limits were also incorporated in the fit. For each dataset, the values for the same set of parameters as in Park et al. (2012) were computed: the intercept α, slope β and intrinsic scatter along the MBH -axis σint, MBH . The results were computed for forward regression, equation (69), as well as the inverse regression, converting back to equivalent forward values in the end. The parameter values and uncertainties were estimated using the posterior distribution, equation (37), in two complementary ways. The first set of estimates (Geo-MAP, hereafter), were derived by numerically maximizing the posterior distribution combined with a bootstrap resampling procedure. For each dataset, a total of nd (log nd )2 bootstrap samples were constructed (Babu & Singh 1983; Feigelson & Babu 2012), where nd is the number of data points. The parameters were then estimated using the median parameter values. Parameter uncertainties at 1-σ level were estimated using median absolute deviations scaled to correspond to standard deviations for a normal distribution. For the second set of estimates (Geo-MCMC, hereafter), MNRAS 000, 1–19 (2017) Non-linear correlations with intrinsic scatter the posterior distribution was sampled with the Markov chain Monte Carlo (MCMC) sampler emcee (ForemanMackey et al. 2013). Convergence during sampling was monitored with the potential scale reduction factor R (Gelman et al. 2013), and sampling was continued until R < 1.01 was achieved. The parameter estimates were obtained as the values corresponding to the sample with maximum posterior probability. The parameter uncertainties at 1-σ level were then estimated by constructing credible regions containing 0.6827 of the posterior probability mass. This was done by starting from the maximum posterior probability sample, and descending in posterior probability until the limit was exceeded. The extent of the credible region in each parameter direction was then used to compute the upper and lower 1-σ limits. The results of this analysis are displayed in Table 2. Shown also are the results from Park et al. (2012) containing both forward and inverse regressions with the FITEXY (Press et al. 1992; Tremaine et al. 2002) and ‘Bayesian’ (i.e. linmix_err) methods. In addition, fits for the van den Bosch (2016) dataset without upper limits were computed separately for all methods. A graphical representation of the datasets and the relations obtained with the different methods is shown in Figure 5. Table 2 indicates that the results computed using the geometrical approach presented in this paper are more consistent with the inverse fits done using the linmix_err and FITEXY algorithms. This is not surprising in light of the discussion in the previous section, since the slope of the MBH –σ relation is high and we expect the forward fits to be biased towards low slopes in this situation. The effects of this bias can also be seen from the best-fitting values of the orthogonal intrinsic scatter, σint , for which the forward fits yield consistently higher values than the inverse fits for linmix_err and FITEXY. It seems that in these methods the lower value for the slope is compensated by a higher estimate for the intrinsic scatter. Note that this behaviour cannot be appreciated by looking at the values of the scatter in MBH -direction, σint, MBH , since these are not truly intrinsic, but depend on β and indeed show opposite behaviour. In contrast, the geometric methods yield identical results (up to sampling noise) in forward and inverse directions, so only forward results are shown in Table 2. The geometric methods also give consistently smaller estimates for the orthogonal intrinsic scatter. The 1-σ errors for all parameters are in general comparable between the methods, with the exception of the fully Bayesian MCMC approach, which consistently gives more conservative 1-σ errors. Finally, it seems that if there indeed is a fundamental approximately linear relation between the logarithms of the mass of a supermassive black hole mass and the velocity dispersion of its host galaxy, the slope of the relation is likely to be & 6, at least based on the van den Bosch (2016) data, which is the most comprehensive dataset used here. This is in contrast to the values around 4–5 often obtained in the literature (e.g. 4.8, Ferrarese & Merritt 2000; 3.75, Gebhardt et al. 2000; 4.02, Tremaine et al. 2002; 4.24, Gültekin et al. 2009; 5.64, McConnell & Ma 2013), including the value 5.35 derived in van den Bosch (2016). These values were all derived using a method or a variation of a method described in Section 3.3.1, fitting the MBH –σ relation in the ‘forward’ direction (MBH as a function of σ), in which it has a high MNRAS 000, 1–19 (2017) 15 numerical value for the slope. This then causes the fitted value of the slope to be biased towards lower values. However, as can be seen from Figure 5, the numerically rather different estimates of the slope are not visually at all that obvious, with a change in slope of 5 to 6 corresponding only to a ∼ 1.8° change in angle of the regression line with respect to a fixed direction, such as the x-axis. The obtained slope also crucially depends on the observational and other biases the data may have. Indeed, it is evident from Table 2 that the choice of dataset has an effect that is roughly comparable to the effect of the choice of method. It should also be noted that the fundamental relation, if there is one, may involve more than two physical quantities or their measurable proxies, as suggested in van den Bosch (2016). Fitting relations to a sampled projection of this hyperplane would then in general yield a higher value for the intrinsic scatter and slope that is offset from the ‘true’ value. As such, there is an urgent need for more high-quality data in order to say much with any certainty regarding the slope of the MBH –σ relation (or the possible multi-variable generalizations), its possible evolution with redshift, or whether it truly is linear across the entire range of black hole masses. 5 SUMMARY We have presented a mathematical formalism for representing physical relations as submanifolds S of a Riemannian manifold of observables M. In this geometric approach, intrinsic scatter in the relation can be accommodated with probability distributions defined on the normal spaces of S. Given a probability distribution of data, and parameterizations of the relation and the intrinsic scatter distribution, the formalism then yields a Bayesian posterior probability for the parameters of the relation and the intrinsic scatter distribution, equation (11). The novelty of our formulation is that it fully accommodates arbitrary measurement errors, both left and right censored data (upper and lower limits, respectively), truncation (non-detections) and extends the concept of intrinsic scatter both to non-linear relations and relations that define a submanifold of codimension greater than one. We have derived explicit analytic results for the likelihood and the posterior distribution first in the case where the postulated relation defines a linear n − 1-dimensional hyperplane. We then extended this result to the case where the relation defines an n − k-dimensional affine subspace, for an arbitrary k, a result we believe to be potentially highly useful for seeking out the most likely codimension of a correlation within a set of n-dimensional data. Finally, we have derived the likelihood and posterior distribution in the case of a line in two dimensions, and discussed its implications at length. We also compared the results given by our method with two established methods widely used in astronomical literature, namely FITEXY and linmix_err. We demonstrated that our inherently symmetrical geometrical approach is preferable in situations where the data obeys a relation with a slope much larger or smaller than one, and measurement errors and intrinsic scatter are severe and equally important. Finally, we used our method to fit the MBH –σ relation, between the mass MBH of a supermassive black hole in a 16 P. Pihajoki Table 2. MBH –σ relations log10 (MBH /M ) = α + β log10 (σ/200 km s−1 ) derived using the datasets in Gültekin et al. (2009), McConnell et al. (2011), Graham et al. (2011) and van den Bosch (2016), using methods FITEXY, linmix_err and the Geometric method of this paper. For the Geometric method, results with both bootstrapped (Geo-MAP) and MCMC-sampled (Geo-MCMC) maximum a posteriori estimate are shown. The results for the FITEXY and linmix_err methods for the first three datasets are from Park et al. (2012). Method Intercept α FITEXY fwd FITEXY inv linmix_err fwd linmix_err inv Geo-MAP fwd Geo-MCMC fwd 8.19 ± 0.06 8.21 ± 0.07 8.19 ± 0.07 8.21 ± 0.08 8.22 ± 0.07 8.21+0.14 −0.14 FITEXY fwd FITEXY inv linmix_err fwd linmix_err inv Geo-MAP fwd Geo-MCMC fwd 8.28 ± 0.06 8.32 ± 0.06 8.27 ± 0.06 8.32 ± 0.07 8.32 ± 0.05 8.32+0.13 −0.12 FITEXY fwd FITEXY inv linmix_err fwd linmix_err inv Geo-MAP fwd Geo-MCMC fwd 8.15 ± 0.05 8.16 ± 0.05 8.15 ± 0.05 8.17 ± 0.06 8.17 ± 0.04 8.17+0.11 −0.11 linmix_err fwd b Geo-MAP fwd Geo-MCMC fwd 8.32 ± 0.04 8.42 ± 0.04 8.44+0.09 −0.09 FITEXY fwd FITEXY inv linmix_err fwd linmix_err inv Geo-MAP fwd Geo-MCMC fwd 8.35 ± 0.04 8.42 ± 0.05 8.34 ± 0.04 8.43 ± 0.05 8.43 ± 0.04 8.43+0.10 −0.09 Slope β σint, MBH a Gültekin et al. (2009) data 4.06 ± 0.32 0.39 ± 0.06 5.35 ± 0.66 0.45 ± 0.09 4.04 ± 0.40 0.42 ± 0.05 5.44 ± 0.56 0.49 ± 0.09 5.42 ± 0.72 0.43 ± 0.08 +0.12 5.41+1.10 0.44 −0.79 −0.09 McConnell et al. (2011) data 5.07 ± 0.36 0.43 ± 0.05 6.29 ± 0.49 0.47 ± 0.06 5.06 ± 0.36 0.44 ± 0.05 6.31 ± 0.46 0.49 ± 0.07 6.26 ± 0.51 0.45 ± 0.06 6.31+0.90 0.46+0.11 −0.71 −0.08 Graham et al. (2011) data 5.08 ± 0.34 0.31 ± 0.04 5.84 ± 0.42 0.33 ± 0.05 5.08 ± 0.36 0.31 ± 0.05 5.85 ± 0.42 0.34 ± 0.06 6.00 ± 0.41 0.31 ± 0.05 5.98+0.87 0.32+0.11 −0.10 −0.67 van den Bosch (2016) data 5.30 ± 0.22 0.49 ± 0.03 5.90 ± 0.26 0.55 ± 0.06 6.15+0.42 0.54+0.07 −0.40 −0.06 van den Bosch (2016) data, no upper limits 4.91 ± 0.23 0.48 c 6.51 ± 0.30 0.55 c 4.92 ± 0.25 0.49 ± 0.03 6.57 ± 0.32 0.56 ± 0.05 6.70 ± 0.40 0.54 ± 0.07 6.68+0.67 0.55+0.08 −0.55 −0.06 σint a 0.093 0.083 0.101 0.089 0.076 ± 0.008 0.080+0.022 −0.016 0.083 0.073 0.085 0.077 0.070 ± 0.008 0.071+0.017 −0.013 0.060 0.056 0.060 0.057 0.051 ± 0.006 0.052+0.018 −0.016 0.091 0.091 ± 0.008 0.087+0.011 −0.009 0.096 0.084 0.098 0.084 0.080 ± 0.008 0.082+0.011 −0.010 Notes. a The orthogonal intrinsic scatter σ int has been converted to intrinsic scatter along the MBH coordinate via the equation (43) for both Geo methods. Similarly, the scatter in MBH -direction, σint, MBH , has been converted to equivalent orthogonal intrinsic scatter via the same equation for the linmix_err and FITEXY methods. b The linmix_err method only supports upper limits on the dependent variable. As such, inverse fits cannot be computed. c The FITEXY method does not give error estimates for the intrinsic scatter. galactic bulge, and the stellar velocity dispersion σ of the bulge, using several published datasets. We compared our results to the fits in the literature, and find that our results support a slope of ∼ 6, clearly higher than the slopes ∼ 4–5 derived in the literature. We note that this difference is mainly due to the methods used to derive the literature results. We show that if these methods are used ‘in reverse’, to fit σ as a function of MBH , and then inverting the slope, the results are in much better agreement with ours. This is due to the tendency of standard methods, such as FITEXY or linmix_err, which do not respect the geometric symmetry of the problem, to misestimate steep slopes in the presence of intrinsic scatter (see Section 3.3.1 for the discussion). ACKNOWLEDGEMENTS The author is most grateful to the anonymous referee for comments and ideas that have contributed to a much im- proved manuscript, as well as to Peter H. Johansson for extensive comments on the manuscript drafts. The numerical computations in this work have benefited from the Python libraries NumPy, SciPy and SymPy (van der Walt et al. 2011; Jones et al. 01 ; Meurer et al. 2017). The Figures have been rendered with the help of the Python library Matplotlib (Hunter 2007). This work has made use of NASA’s Astrophysics Data System Bibliographic Services. The research for this publication was supported by the Academy of Finland grant no. 1274931. REFERENCES Akritas M. G., Bershady M. A., 1996, ApJ, 470, 706 Babu G. J., Singh K., 1983, The Annals of Statistics, pp 999–1003 Beifiori A., Courteau S., Corsini E. M., Zhu Y., 2012, MNRAS, 419, 2497 Boggs P. T., Byrd R. H., Schnabel R. B., 1987, SIAM Journal on Scientific and Statistical Computing, 8, 1052 MNRAS 000, 1–19 (2017) Non-linear correlations with intrinsic scatter Gültekin (2009) 9.5 McConnell (2011) 103 Geo-MAP fwd Geo-MCMC fwd FITEXY fwd FITEXY inv linmix_err fwd linmix_err inv 9.0 10.0 8.0 7.5 103 9.0 102 log10(MBH/M ) log10(MBH/M ) Geo-MAP fwd Geo-MCMC fwd FITEXY fwd FITEXY inv linmix_err fwd linmix_err inv 9.5 8.5 102 8.5 8.0 7.5 101 7.0 101 7.0 6.5 6.5 0.4 0.3 0.2 0.1 0.0 log10( /200 km/s) 0.1 100 0.2 0.4 Graham (2011) 9.0 0.3 0.2 0.1 0.0 log10( /200 km/s) 0.1 0.2 100 van den Bosch (2016) Geo-MAP fwd Geo-MCMC fwd FITEXY fwd FITEXY inv linmix_err fwd linmix_err inv 9.5 Geo-MAP fwd Geo-MCMC fwd linmix_err fwd linmix_err inv 10 102 9 8.5 102 8 8.0 101 7.5 log10(MBH/M ) log10(MBH/M ) 17 7 6 7.0 5 6.5 4 0.4 0.3 0.2 0.1 0.0 log10( /200 km/s) 0.1 0.2 100 101 1.2 1.0 0.8 0.6 0.4 0.2 log10( /200 km/s) 0.0 0.2 100 Figure 5. MBH –σ relation log10 (MBH /M ) = α + β log10 (σ/200 km s−1 ) derived using the datasets in Gültekin et al. (2009) (top left), McConnell et al. (2011) (top right), Graham et al. (2011) (bottom left), and van den Bosch (2016) (bottom right). The datasets have been rendered as density maps, assuming two-dimensional Gaussian probability densities derived from the 1-σ errors of the data points. The data points are shown with red dots. The upper limits in van den Bosch (2016) data are rendered as a product of one-dimensional Gaussian and the logarithmic y upper limit density, equation (B6). The fitted relations are overplotted with lines. Intrinsic scatter 1-σ limits are shown with shaded regions for the Geo-MAP and linmix_err forward fits for demonstration. The values of intrinsic scatter produced by the rest of the methods are comparable (see Table 2). Boggs P. T., Spiegelman C. H., Donaldson J. R., Schnabel R. B., 1988, Journal of Econometrics, 38, 169 Booth C. M., Schaye J., 2009, MNRAS, 398, 53 Broemeling L., Broemeling A., 2003, Biometrika, 90, 728 Calin O., Udriste C., 2014, Geometric Modeling in Probability and Statistics. Mathematics and Statistics, Springer International Publishing MNRAS 000, 1–19 (2017) Choi E., Naab T., Ostriker J. P., Johansson P. H., Moster B. P., 2014, MNRAS, 442, 440 Crane K., Weischedel C., Wardetzky M., 2013, ACM Trans. Graph., 32 Di Matteo T., Springel V., Hernquist L., 2005, Nature, 433, 604 Di Matteo T., Colberg J., Springel V., Hernquist L., Sijacki D., 2008, ApJ, 676, 33 18 P. Pihajoki Feigelson E. D., Babu G. J., 1992, ApJ, 397, 55 Feigelson E., Babu G., 2012, Modern Statistical Methods for Astronomy: With R Applications. Cambridge University Press Ferrarese L., Merritt D., 2000, ApJ, 539, L9 Foreman-Mackey D., Hogg D. W., Lang D., Goodman J., 2013, PASP, 125, 306 Fraser D. A. S., Reid N., Marras E., Yi G. Y., 2010, Journal of the Royal Statistical Society: Series B (Statistical Methodology), 72, 631 Fujiki J., Akaho S., 2009, in 2009 IEEE 12th International Conference on Computer Vision Workshops, ICCV Workshops. pp 250–255, doi:10.1109/ICCVW.2009.5457693 Gebhardt K., et al., 2000, ApJ, 539, L13 Gelman A., Carlin J., Stern H., Dunson D., Vehtari A., Rubin D., 2013, Bayesian Data Analysis, Third Edition. Chapman & Hall/CRC Texts in Statistical Science, Taylor & Francis George E. I., McCulloch R., 1993, Journal of Statistical Planning and Inference, 37, 169 Graham A. W., 2016, Galactic Bulges, 418, 263 Graham A. W., Onken C. A., Athanassoula E., Combes F., 2011, MNRAS, 412, 2211 Gull S. F., 1989, in , Maximum Entropy and Bayesian Methods. Springer, pp 511–518 Gültekin K., et al., 2009, ApJ, 698, 198 Hogg D. W., Bovy J., Lang D., 2010, preprint, (arXiv:1008.4686) Hunter J. D., 2007, Computing In Science & Engineering, 9, 90 Isobe T., Feigelson E. D., Akritas M. G., Babu G. J., 1990, ApJ, 364, 104 Jaynes E., 1983, in Rosenkrantz R. D., ed., , Vol. 158, E.T. Jaynes: Papers on probability, statistics and statistical physics. D. Reidel Publishing Company, Dordrecht, Holland, pp 190– 209 Jaynes E. T., 1991, Straight Line Fitting – A Bayesian Solution, Unpublished, available online at http://bayes.wustl. edu/sfg/line.pdf Jaynes E. T., 2003, Probability Theory - The Logic of Science. Cambridge University Press, Cambridge, United Kingdom Johansson P. H., Naab T., Burkert A., 2009a, ApJ, 690, 802 Johansson P. H., Burkert A., Naab T., 2009b, ApJ, 707, L184 Jones E., Oliphant T., Peterson P., et al., 2001–, SciPy: Open source scientific tools for Python, http://www.scipy.org/ Jupp P. E., Kent J. T., 1987, Journal of the Royal Statistical Society. Series C (Applied Statistics), 36, 34 Kelly B. C., 2007, ApJ, 665, 1489 Lee J., 2013, Introduction to Smooth Manifolds. Graduate Texts in Mathematics, Springer New York Magorrian J., et al., 1998, AJ, 115, 2285 Markwardt C. B., 2009, in Bohlender D. A., Durand D., Dowler P., eds, Astronomical Society of the Pacific Conference Series Vol. 411, Astronomical Data Analysis Software and Systems XVIII. p. 251 (arXiv:0902.2850) McConnell N. J., Ma C.-P., 2013, ApJ, 764, 184 McConnell N. J., Ma C.-P., Gebhardt K., Wright S. A., Murphy J. D., Lauer T. R., Graham J. R., Richstone D. O., 2011, Nature, 480, 215 Meurer A., et al., 2017, PeerJ Computer Science, 3, e103 Novak G. S., Faber S. M., Dekel A., 2006, ApJ, 637, 96 Park D., Kelly B. C., Woo J.-H., Treu T., 2012, ApJS, 203, 6 Pearson K., 1901, Philosophical Magazine Series 6, 2, 559 Pennec X., 2006, J. Math. Imaging Vis., 25, 127 Press W. H., Teukolsky S. A., Vetterling W. T., Flannery B. P., 1992, Numerical recipes in FORTRAN. The art of scientific computing. Cambridge: University Press, c1992, 2nd ed. Robotham A. S. G., Obreschkow D., 2015, Publ. Astron. Soc. Australia, 32, e033 Saglia R. P., et al., 2016, ApJ, 818, 47 Sijacki D., Springel V., Di Matteo T., Hernquist L., 2007, MN- RAS, 380, 877 Sijacki D., Vogelsberger M., Genel S., Springel V., Torrey P., Snyder G. F., Nelson D., Hernquist L., 2015, MNRAS, 452, 575 Stigler S. M., 1981, Ann. Statist., 9, 465 Tremaine S., et al., 2002, ApJ, 574, 740 Williams M. J., Bureau M., Cappellari M., 2010, MNRAS, 409, 1330 Wolf J. A., Zierau R., 1996, Riemannian exponential maps and decompositions of reductive Lie groups. Springer, pp 349–354 Zellner A., 1971, An introduction to Bayesian inference in econometrics. Wiley series in probability and mathematical statistics: Applied probability and statistics, J. Wiley van den Bosch R. C. E., 2016, ApJ, 831, 134 van der Walt S., Colbert S. C., Varoquaux G., 2011, Computing in Science Engineering, 13, 22 APPENDIX A: DERIVATION OF THE POSTERIOR DISTRIBUTION We present a derivation of the likelihood, equation (10), and the posterior distribution, equation (11), following the Bayesian style promoted in Jaynes (2003). We consider the following propositions: • η = ‘the true value of the observable is η ∈ M’ • X = ‘a value x ∈ M was measured for the observable’ • V = ‘a detection was made’ • H = ‘the true value of the observable is drawn from the distribution pint defined on a relation S, with parameters ϕ and θ, respectively’ In addition, we will use I to specify all the other relevant prior information. This includes the prior distribution πθ,ϕ of θ and ϕ, the measurement error distribution h(η; x) and the fact that the probability of a detection for a value η of the observable is given by pdet (η). At the outset, we then know the following probabilities P(η|HI) = pint (η; θ, ϕ) := pint (τ(η; θ), ν(η; θ); ϕ) P(η|X I) = h(η; x) (A1) P(V |ηI) = pdet (η). (A3) (A2) We will need the probability P(X |ηV I) of a measured value, given a true value and the fact that there is a detection. This is obtained with Bayes’ theorem P(X |ηV I) = P(η|XV I) P(X |V I) = h(η; x), P(η|V I) (A4) as a function of x (which we write as h(x; η) in the following), since the prior probabilities P(X |V I) and P(η|V I) must be uninformative and equal everywhere, since nothing in I tells us where the true and measured values are a priori. We can now compute the probability of a measured value given the true value, yielding P(X |ηI) = P(X(V + V̄)|ηI) = P(XV |ηI) + P(X V̄ |ηI) = P(X |ηV I)P(V |ηI) + P(X |ηV̄ I)P(V̄ |ηI) = h(x; η)pdet (η) + 0 · [1 − pdet (η)] (A5) = h(x; η)pdet (η), where V̄ is the negation of V (i.e. there was no detection). Here we used the fact that V and V̄ form a complete (P(V + V̄ |I) = 1) and independent set of propositions, together with the identity P(AB|C) = P(A|C)P(B| AC) = P(B|C)P(A|BC). MNRAS 000, 1–19 (2017) Non-linear correlations with intrinsic scatter Using Bayes’ theorem again we can now obtain the probability P(H|X I) that the data obey the relation and are drawn from pint , given the measured value. The theorem gives P(H|X I) = P(X |HI) P(H|I) . P(X |I) (A6) Since the η also form a complete and independent set of propositions (the true value must be somewhere, and the possible positions are independent), we can write ∫ ∫ P(X |HI) = P(Xη|HI)dη = P(X |ηHI)P(η|HI)dη ∫ (A7) = h(x; η)pdet (η)pint (η; θ, ϕ)dη = L(θ, ϕ|x), which gives the likelihood, equation (10). The factor P(H|I) = πθ,ϕ (θ, ϕ) is the parameter prior probability, and the denominator is a normalizing constant, given formally by ∫ ∫ P(X |I) = P(X H|I)dH = P(X |HI)P(H|I)dH ∬ = h(x; η)pdet (η)pint (η; θ, ϕ)πθ,ϕ (θ, ϕ)dη dθdϕ. (A8) We then have the posterior probability, equation (11), ∫ h(x; η)pdet (η)pint (η; θ, ϕ)dη πθ,ϕ (θ, ϕ) P(H|X I) = ∬ . h(x; η)pdet (η)pint (η; θ, ϕ)πθ,ϕ (θ, ϕ)dη dθdϕ (A9) limit distributions can be obtained for the example in Section 3.3. For the linear case we have L x (α, β, σ|x u, y0, σy ) =  p    © ª 1 + β2  1 α + x u β − y0 ® erf ­­ q ® u  2x β 2  2(σy + (1 + β2 )σ 2 )  « ¬      © ª α − y0 ® − erf ­­ q ® 2(σy2 + (1 + β2 )σ 2 )   « ¬ (B3) L y (α, β, σ|x0, y u, σx ) =   q   ©  ª α + x0 β 1 2 ® 1 + β erf ­­ q ®  2y u  2 2 2 2  2(β σ + (1 + β )σ ) (B4) x ¬  «     © ª α + x0 β − y u ® , − erf ­­ q ® 2 2 2 2   « 2(β σx + (1 + β )σ ) ¬  for the upper limits in x and y directions respectively, where x u and y u are the corresponding limiting values. If the measurements have been given in logarithmic scale with base k, we have instead Llogk x (α, β, σ|x u, y0, σy ) = s 2 +(1+β 2 )σ 2 ] log k 2(y0 −α)β+[σ y log k 1 + β2 2β 2 k 2x u β2 © (y0 − α)β + [σy2 ­ erfc ­ q + (1 + 2[σy2 β2 )σ 2 ] log k (B5) − β2 log k xu ª + (1 + β2 )σ 2 ] | β| « APPENDIX B: AN EXAMPLE OF LIMIT DISTRIBUTIONS Here we present a simple example of how the framework presented in the paper works with upper limits, and how analytic results can be obtained for upper limits as well. This is desirable since typically the analytic expression for the likelihood is much faster to compute than performing a numerical integration to obtain the required value. As mentioned in Section 2.3, limits are taken into account by including them into the measurement error distribution. This can be done for the examples in Sections 3.1–3.3 by substituting one or more degrees of freedom xi in equations (16) and (32) with suitable one-dimensional distributions. Conceptually the simplest possibility is the uniform distribution, so that χ[0,x u ] (xi ) i , (B1) u(xi ; xiu ) = xiu where χ[a,b] (x) = 1 if x ∈ [a, b] and 0 otherwise, and xiu is the limiting value. Other choices with less pronounced cutoffs are naturally also possible. If the measurements are already given in logarithmic units with base k, the form u ulogk (xi ; xiu ) = u(k xi ; k xi )k xi log k (B2) must be used instead. Lower limits can be introduced in an analogous manner. Analytic results of reasonable complexity based on these MNRAS 000, 1–19 (2017) 19 Llogk y (α, β, σ|x0, y u, σx ) = q 1 2 2 2 2 log k 1 + β2 k α+x0 β+ 2 [β σx +(1+β )σ ] log k u 2y ® ® ¬ (B6) © α + x0 β + [β2 σx2 + (1 + β2 )σ 2 ] log k − logk y u ª ®, erfc ­­ q ® 2 σ 2 + (1 + β2 )σ 2 ] 2[β x « ¬ where erfc(x) = 1 − erf(x). Note that here the limiting values x u and y u are given in linear scale. For numerical applications, it should be noted that the arguments of the kexponential and the erfc function may have large numerical values, and asymptotic expansions should be used when necessary. This paper has been typeset from a TEX/LATEX file prepared by the author.
10math.ST
Multi-Sensor Control for Multi-Target Tracking Using Cauchy-Schwarz Divergence arXiv:1603.08355v1 [cs.SY] 28 Mar 2016 Meng Jiang, Wei Yi and Lingjiang Kong School of Electronic Engineering University of Electronic Science and Technology of China Email:{kussoyi, lingjiang.kong}@gmail.com Abstract—The paper addresses the problem of multi-sensor control for multi-target tracking via labelled random finite sets (RFS) in the sensor network systems. Based on an information theoretic divergence measure, namely Cauchy-Schwarz (CS) divergence which admits a closed form solution for GLMB densities, we propose two novel multi-sensor control approaches in the framework of generalized Covariance Intersection (GCI). The first joint decision making (JDM) method is optimal and can achieve overall good performance, while the second independent decision making (IDM) method is suboptimal as a fast realization with smaller amount of computations. Simulation in challenging situation is presented to verify the effectiveness of the two proposed approaches. I. I NTRODUCTION Sensor network systems have received tremendous attention in last decade due to their successful applications that range from vehicular network to battlefield detection and tracking [1]. In many practical situations, due to communication and computational constraints, it is required that limited amounts of sensors take right actions. In such cases, the problem of sensor control is to find a member of the command set that can result in best measurements for filtering purposes [2]. In general, sensor control comprises two underlying components, a multi-target filtering process in conjunction with an optimal decision-making method. Multi-target filtering has been recently investigated in a more principled way due to the point process theory or finite set statistics (FISST) based multi-target tracking methodology [3]. Among these random finite set (RFS) based methods, the promising generalized labeled multi-Bernoulli (GLMB) filter [4], [5], or simply the Vo-Vo filter, possesses some useful analytical properties [6] and is a closed form solution to the Bayes multi-target filter, can not only produce trajectories formally but also outperform the probability hypothesis density (PHD) filter [7], cardinalized PHD (CPHD) filter [8] and multi-Bernoulli (MB) filter [9]. Another important component of sensor control solutions is a decision-making process, which mostly resorts to optimization of an objective function and generally falls into two categories. The first one is task-based approach, sensor control methods are designed with a direct focus on the expected performance and the objective function is formulated as a cost function, examples of such cost functions include estimated target cardinality variance [10], [11], posterior expected error of cardinality and states (PEECS) [12], [13] and optimal sub-pattern assignment (OSPA) distance [14]. The task-based approach is useful in some situations especially where the objective function can be formulated in the form of a single criterion, but there is a challenging problem in the case of multiple competing objectives. To solve or avoid this problem, the second one is information-based approach which strives to quantify the information content of the multi-target distribution, aims at obtaining superior overall performance across multiple task objectives and the objective function is formulated as a reward function. The most common choices of reward functions are based on some information theoretic divergence measures such as KullbackCLeibler (KL) divergence [15], [16] and more generally the Rényi divergence [17]–[19]. However, a major limitation of utilizing KL or Rényi divergence is their significant computational cost, and hence most of the time, one has to resort to numerical integration methods such as Monte Carlo (MC) method to derive analytically results. An alternative information divergence measure is the Cauchy-Schwarz (CS) divergence. Using this measure, Hoang et al provided tractable formulations between the probability densities of two Poisson point processes [20], later, Beard et al extended the results to two GLMB densities [6], [21] and presented an analytic expression, which opened the door to sensor control scheme with GLMB Models based on information-based approach. The CS control with GLMB models accounts for target trajectories in a principled manner, which is not possible using other tracking methods. When the surveillance area is very large or targets move in complex movement, one sensor with limited sensing range (LSR) is not competent to the task of multi-target tracking, sensor network systems and subsequent multiple sensor control are necessary. Inspired by the good performance achieved by sensor control with GLMB models based on CS divergence, where Beard et al only considered single sensor, in this paper, we address the problem of multi-sensor control for multi-target tracking using CS divergence via labelled random finite sets (RFS). To be specific, we use Vo-Vo filter to ensure local tracking performance, and Generalized Covariance Intersection (GCI) fusion [22]–[24] to maximize information content of the multi-target distribution. The key contributions of this paper are two tractable approaches of multi-sensor control, the one is optimal with a little complex calculation and the other is suboptimal as a fast realization. Simulation results verify both proposed approaches can perform well in complex situation. 2 II. BACKGROUND This section provides background material on labelled multi-target filtering, GCI fusion and Cauchy-Schwarz divergence which are necessary for the results of this paper. For further details, we refer the reader to [4], [6], [23], [24]. A. Notation In this paper, we adhere to the convention that single-target states are denoted by the small letters, e.g.,x, x while multitarget states are denoted by capital letters, e.g.,X, X. Symbols for labeled states and their distributions/statistics (single-target or multi-target) are bolded to distinguish them from unlabeled ones, e.g., x, X, π, etc. To be more specific, the labeled single target state x is constructed by augmenting a state x ∈ X with a label ℓ ∈ L. Observations generated by single-target states are denoted by the small letter, e.g., z, and the multitarget observations are denoted by the capital letter, e.g., Z. Additionally, blackboard bold letters represent spaces, e.g., the state space is represented by X, the label space by L, and the observation space by Z. The collection of all finite sets of X is denoted by F (X). Moreover, in order to support arbitrary arguments like sets, vectors and integers, the generalized Kronecker delta function is given by  1, if X = Y δY (X) , (1) 0, otherwise R and · δX denotes the set integral [3] defined by Z Z ∞ X 1 f ({x1 , · · · , xn })dx1 · · · dxn (2) f (X)δX = n! n=0 B. GLMB RFS An important labeled RFS is the GLMB RFS [4], which is a class of tractable models for on-line Bayesian inference [3] that alleviates the limitations of the Poisson model. Under the standard multi-object model, the GLMB is a conjugate prior that is also closed under the Chapman-Kolmogorov equation. Let L : X × L → X be the projection L((x, ℓ)) = ℓ, and ∆(X) = δ|X| (|L(X)|) denote the distinct label indicator. A GLMB is an RFS on X × L distributed according to X π(X) = ∆(X) w(c) (L(X))[p(c) ]X (3) where Ξ is a discrete space, ξ are realizations of Ξ, and I denotes a set of track labels. In target tracking applications, the discrete space Ξ typically represents the history of track to measurement associations. A δ-GLMB RFS is thus a special case of a GLMB RFS but with a particular structure on the index space which arises naturally in target tracking applications. The δ-GLMB RFS has density X w(I,ξ) δI (L(X))[p(ξ) ]X (4) π(X) = ∆(X) (I,ξ)∈F (L)×Ξ C. Cauchy-Schwarz Divergence Compared with Kullback-Leibler divergence or Rényi divergence, which are most commonly used measures of information gain, CS divergence [6], [21] has a mathematical form which is more amenable to closed form solution. Using the relationship between probablity density and belief density, the CS divergence between two RFSs, with respective belief densities φ and ϕ, is given by R |X| K φ(X)ϕ(X)δX q DCS (φ, ϕ) = − ln R R K |X| φ2 (X)δX K |X| ϕ2 (X)δX (5) where K is the unit of hyper-volume in X. In particular, Cauchy-Schwarz divergence has a closed form for GLMB densities, in the case where the individual target densities are Gaussian mixtures. For two GLMBs with belief densities X (c) (c) φ(X) = ∆(X) wφ (L(X))[pφ ]X (6) c∈C ψ(X) = ∆(X) (d) (d) wψ (L(X))[pψ ]X (7) d∈C the Cauchy-Schwarz divergence between φ and ψ is given by where ζ(φ, ψ) DCS (φ, ψ) = − ln p ζ(φ, φ)ζ(ψ, ψ) ζ(φ, ψ) = XXX (c) × [K Z (c) (8) (d) wφ (L)wψ (L) L⊆L c⊆C d⊆D c∈C where C is a discrete index set. The weights w(c) (L) and the spatial distributions p(c) satisfy the normalization conditions XX w(c) (L) = 1 X (9) (d) pφ (x, ·)pψ (x, ·)dx]L Closed form of the analytical expression using CS divergence combines GLMB densities and information theoretic divergence measures hence leads to a more efficient implementation of sensor control. L⊆L c∈C Z p(c) (x, ℓ)dx = 1 Further, a δ-GLMB RFS [4], [5] with state space X and (discrete) label space L is a special case of a GLMB RFS with C = F (L) × Ξ w (c) (L) = w(I,ξ) δI (L) p(c) = p(I,ξ) = p(ξ) D. Distributed Fusion In the context of sensor network systems with LRS, where each sensor has a finite field of view (FoV), distributed fusion is necessary to make the best use of local distribution information in order to solve the shadowing effect. The GCI was proposed by Mahler [22] specifically to extend FISST to sensor network systems, which is capable to fuse both Gaussian and non-Gaussian formed multi-target distributions from different sensor with completely unknown correlation. 3 Based on GCI, with the assumption that all the sensor nodes share the same label space for the birth process, Fantacci et al proposed the GCI fusion with labeled set filters by use the consistent label. The results include consensus marginalized δGLMB (CMδ-GLMB) and consensus LMB (CLMB) tracking filter [23]. 1) CMδ-GLMB : Suppose that each sensor i = 1, . . . , N is provided with an Mδ-GLMB density π i of the form X (L) (L) (10) δL (L(X))wi [pi ]X π i = ∆(X) L∈F (L) i where N PNis thei total sensor number and fusion weight ω ∈ (0, 1), i=1 ω = 1, then the fused distribution is given as follows: X X (11) δL (L(X))ws(L) [p(L) πs = ∆(X) s ] L∈F (L) where ws(L) = N  Y (L) wi i=1 = A. Problem Formulation i=1 N  XY F ∈L i=1 N  Y (F ) wi " N  ωi Z Y ω i (F ) pi (x, ·) i=1 #F dx ωi (L) pi p(L) s " N #L ω i ω i Z Y  (L) dx pi (x, ·) i=1 Z Y N  ωi (L) dx pi i=1 2) CLMB : Suppose that each sensor i = 1, . . . , N is (ℓ) (ℓ) provided with a LMB density π i of the form {(ri , pi )}ℓ∈L , where P N is the total sensor number and fusion weight ω i ∈ N (0, 1), i=1 ω i = 1, then the fused distribution is of the form π s = {(rs(ℓ) , p(ℓ) s )}ℓ∈L (12) where rs(ℓ) = Z Y N  ω i (ℓ) (ℓ) ri pi (x) dx i=1 N  Y (ℓ) 1 − ri i=1 p(ℓ) s = N  Y (ℓ) pi i=1 Z Y N  i=1 (ℓ) pi ωi + ω i ω i Z Y N  i=1 and can therefore influence the estimation performance of the tracking system. Typically, such actions may include changing the position, altering the sensor operating parameters, orientation or motion of the sensor platform and so on, which in turn affects the sensor’s ability to detect and track targets. In the context of sensor network systems, where there are more than one sensor waiting to be deployed, the allowable control actions may increase exponentially and hence the control of multi-sensor is a high-dimensional optimization problem. Therefore, making control decisions by manual intervention or some deterministic control policy which provides no guarantee of optimality, is not a good choice. Compared with single sensor control, there are some challenging problems in multi-sensor control such as aforementioned high-dimensional optimization problem and information fusion problem induced by the measurement collected from the multiple sensors. In this section, we seek tractable solution for multi-sensor control for multi-target tracking with GLMB models. ω i (ℓ) (ℓ) ri pi (x) dx dx Consensus algorithms can fuse in a fully distributed and scalable way the information collected from the multiple heterogeneous and geographically dispersed sensors, and therefore have a significant impact on the estimation performance of the tracking system. III. M ULTI -S ENSOR C ONTROL U SING CS DIVERGENCE In most target tracking scenarios, the sensor may perform various actions that can maximize the tracking observability, In sensor network systems, one or more sensors are the direct outputs of the decision-making component of the control solution, as such, the focus has traditionally been placed on improving the decision-making component. However, the multi-target tracking component also plays a significant role in the overall performance of the scheme in terms of accuracy and robustness. Inspired by the versatile GLMB model which offers good trade-offs between tractability and fidelity, in filtering stage, we use the Vo-Vo filter [4], [5] as local sensor and GCI fusion to fuse the information collected from the multiple sensors in order to achieve overall superior performance, the procedure is described as follows: 1) At time step k, with measurement Zki = i i i {z1,k , z2,k , . . . , zm,k } where the subscript k denotes current time and superscript i denotes sequence number of sensors, each sensor node i = 1, . . . , N locally performs prediction and update using Vo-Vo filter, the details can be found in [5]. 2) Implement the GCI fusion with local posterior distribution πik to derive the fused distribution π sk , the superscript s denotes fused distribution. Note that one needs to convert δGLMB posterior distribution to Mδ-GLMB\LMB distribution for consensus fusion method using (11) or (12). 3) After fusion, an estimate of the object set X̂k|k is obtained from the cardinality probability mass function and the location PDFs using MAP technique. A pseudo-code of filtering stage is given in Algorithm 1. In control strategy, we adhere to the convention that formulating the sensor control problem as a Partially Observed Markov Decision Process (POMDP) using FISST [25] and i defining the following notation: πik (·|Z1:k ) is the posterior density for sensor i at time k, Ci is the control action space for sensor i and hence the N multiple sensor control action space C = C1 × · · · × CN , H is the length of i control horizon, the πik+H (·|Z1:k ) is predicted density at time k + H based on known measurements from time 1 to time k, i Z̃k+1:k+H (c1 , . . . , cN ) is the collection of measurements for 4 Algorithm 1: Filtering Procedure i I NPUT: π ik−1 {X|Z1:k−1 }, Zki i i O UTPUT: π k {X|Z1:k }, π sk for i = 1 : N do local prediction i local update → π ik {X|Z1:k } end i GCI( π ik {X|Z1:k })→ π sk s MAP( π k )→ X̂k|k sensor i that would be observed from times k + 1 up to k + H with executed control action (c1 , . . . , cN ) ∈ C at time k, note that ci ∈ Ci is a vector composed of all possible actions what a sensor can take, such as changing direction of movement, velocity, power and so on. We use CS divergence as reward function at the control horizon which is measured between the predicted and posterior multi-target density: R(c1 , . . . ,cN ) = DCS ( π prediction, π update ) (13) then the optimal control action is decided by maximising the expected value of the reward function R(c1 , . . . , cN ) over the allowable actions space C: (ĉ1 , . . . , ĉN ) = arg max (c1 ,...,cN )∈C EAP(R(c1 , . . . , cN )) (14) Note that the above expected reward is not available to analytic solutions, so we resort to Monte Carlo integration, M 1 X (j) R (c1 , . . . , cN ) EAP(R(c1 , . . . , cN )) ≈ M j=1 (15) where M denotes the number of samples. Also for this reason, we prefer CS divergence which provides a closed-form solution with GLMB models to calculate R(j) (c1 , . . . , cN ), can alleviate the side effect induced by the Monte Carlo technique (15). In what following we detail the design of predicted distribution and posterior distribution in (13) and present two multi-sensor control approaches. B. Multi-Sensor Control Strategy J OINT D ECISION M AKING A LGORITHM In order to make the best use of sensor network and overall collected information, we propose an optimal multi-sensor control approach, referred to joint decision making (JDM) algorithm. In this method, the filtering stage is performed as described in Algorithm 1, the fused density πsk will be used for multi-target samples in order to solve the shadowing effect of single sensor with LSR and to compute the predicted density at the end of the control horizon. The specific procedure are as follows: 1) Multi-target Samples: At desicion time step k, draw a set ΨS of M multi-target samples from fused distribution π sk , it is mainly designed for deriving numerical analytical resolutions of CS reward function. 2) Pseudo-Prediction: Compute the predicted density at the end of the control horizon π̄ sk+H , which will be later used as one term of computing CS divergence, by carrying out repeated prediction steps of Vo-Vo filter, without traget birth or death, for this reason, we use the term “pseudo-prediction”. 3) Generate predicted ideal measurement (PIMS): For each sensor i = 1, . . . , N and each multi-target sample X(j) ∈ i ΨS , generating PIMS Z̃k+1:k+H (ci , X(j) ) with current control action ci ∈ Ci based on initial predicted trajectory in sample X(j) , more detials in [21], [26]. 4) Run Vo-Vo Filter Recursion: Run each Vo-Vo filter with i initial local posterior distribution π ik {X|Z1:k } using PIMS i (j) Z̃k+1:k+H (ci , X ) to get the pseudo updated distribution i i (ci , X(j) )}, we will use the term , Z̃k+1:k+H π ik+H {X|Z1:k “filter” to denote Vo-Vo filter recursion [5]. 5) GCI Fusion: For multi-sensor, for each possible control action combination (c1 , . . . , cN ) ∈ C, perform the GCI fusion with pseudo updated distribution i i , Z̃k+1:k+H (ci , X(j) )} to get the fused pseudo π ik+H {X|Z1:k s updated distribution π k+H (c1 , . . . , cN , X(j) ), it will be later used as another term of computing CS divergence. 6) Compute Each Reward: Compute CS reward function for each control action combination and each sample using (8), R(j) (c1 , . . . , cN ) = DCS ( π̄ sk+H , π sk+H (c1 , . . . , cN , X(j) )) (16) after the computation of (16) for all samples in set ΨS , we then compute the expected value of the reward function R(c1 , . . . , cN ) = EAP(R(j) (c1 , . . . , cN )) ≈ M 1 X (j) R (c1 , . . . , cN ) M j=1 (17) 7) Joint Decision Making: Maximize the expected value of the reward function R(c1 , . . . , cN ) over the allowable action space C using (14). A pseudo-code of above control stage is shown in Algorithm 2. Note that in the JDM algorithm, GCI fusion has been uesd both in filtering stage and CS control stage, aims at maximizing observation information content and overall CS divergence, to ensure multiple sensors move in direction where the overall performance is satisfying. Moreover, in order to reduce the computation burden of the JDM algorithm, which is mainly induced by allowable control action combination with computation complexity O(|C1 | × · · · × |CN |), one can resort to importance sampling technique, more details in [27]. I NDEPENDENT D ECISION M AKING A LGORITHM We also propose another suboptimal multi-sensor control approach, referred to independent decision making (IDM) algorithm. In this method, the filtering stage is same but the control stage is simplified as a fast implementation. In particular, the GCI fusion is only performed in filtering stage and each sensor makes control decision independently in control stage, which enables parallel execution of the control 5 Algorithm 2: JDM Procedure π sk , Algorithm 3: IDM Procedure i π ik {X|Z1:k },C I NPUT: O UTPUT: (ĉ1 , . . . , ĉN ) Multi-target Samples: π sk → ΨS = {X(1) , . . . X(M ) } Pseudo-Prediction: for iter = k + 1 : k + H do π sk → π̄ sk+H end for i = 1 : N do for each ci ∈ Ci do for each X(j) ∈ ΨS do Generate PIMS: i X(j) → Z̃k+1:k+H (ci , X(j) ) Run Vo-Vo Filter Recursion: i i filter( π ik {X|Z1:k }, Z̃k+1:k+H (ci , X(j) )) i i → π ik+H {X|Z1:k , Z̃k+1:k+H (ci , X(j) )} end end end GCI Fusion: for each (c1 , . . . , cN ) ∈ C do for each X(j) ∈ ΨS do 1 1 GCI( π 1k+H {X|Z1:k , Z̃k+1:k+H (c1 , X(j) )}, . . . , N N N π k+H {X|Z1:k , Z̃k+1:k+H (cN , X(j) )}) → π sk+H (c1 , . . . , cN , X(j) ) Compute Each Reward: DCS ( π̄ sk+H , π sk+H (c1 , . . . , cN , X(j) )) → R(j) (c1 , . . . , cN ) end EAP(R(j) (c1 , . . . , cN )) → R(c1 , . . . , cN ) end Joint Decision Making: arg max (R(c1 , . . . , cN )) → (ĉ1 , . . . , ĉN ) (c1 ,...,cN )∈C step, and therefore the computation complexity of allowable control action is reduced to O(|C1 | + · · · + |CN |). A pseudocode of IDM algorithm is shown in Algorithm 3. Note that the fused distribution πsk is used in multi-target samples and pseudo-prediction, which can ensure observability in control stage so that avoid making myopic decisions. A comparison between JDM algorithm and IDM algorithm with two sensors is illustrated in Fig. 1. JDM algorithm { •1k X Z1:1k Pseudo-Update } { } •1k + H X Z1:1k , Z k1+11:k + H GCI Z k1+1:k + H 2 k { 2 1:k • XZ Pseudo-Update } • 2 k +H {X Z 2 1:k ,Z 2 k +1 1:k + H • ks + H } ( cˆ1 , cˆ 2 ) Z k2+1:k + H GCI Pseudo-Prediction • ks • ks + H IDM algorithm { •1k X Z11:k Pseudo-Update } { •1k + H X Z1:1k , Z11:1k ,k + H } Z k1+1:k + H GCI • ks Pseudo-Prediction ĉ2 Z k2+1:k + H 2 k { 2 1:k • XZ } ĉ1 • ks + H Pseudo-Update • 2 k +H {X Z 2 1:k 2 1 k ,k + H 1: ,Z } Fig. 1. A comparison between JDM algorithm and IDM algorithm with two sensors. i I NPUT: π sk , π ik {X|Z1:k },C O UTPUT: (ĉ1 , . . . , ĉN ) Multi-target Samples: π sk → ΨS = {X(1) , . . . X(M ) } Pseudo-Prediction: for iter = k + 1 : k + H do π sk → π̄ sk+H end for i = 1 : N do for each ci ∈ Ci do for each X(j) ∈ ΨS do Generate PIMS: i X(j) → Z̃k+1:k+H (ci , X(j) ) Run Vo-Vo Filter Recursion: i filter( π ik {X|Z1:k }, Z̃k+1:k+H (ci , X(j) )) i → π ik+H {X|Z1:k , Z̃k+1:k+H (ci , X(j) )} Compute Each Reward: i (ci , X(j) )}) DCS ( π̄ sk+H , π ik+H {X|Z1:k , Z̃k+1:k+H (j) → Ri (ci ) end (j) EAP(Ri (ci )) → Ri (ci ) end Decision Making on Each Sensor: arg max (Ri (ci )) → ĉi ci ∈Ci end IV. S IMULATION R ESULTS AND D ISCUSSION In this section, the two proposed multi-sensor control approaches are applied to the problem of multi-target tracking with two sensors with LSR. With both methods, local filters are Vo-Vo filters, the fusion method is chosen as CMδ-GLMB and fusion weight of each sensor ω1 , ω2 are both chosen as 0.5. The kinematic target state is a vector of planar position and velocity xk = [tx,k ṫx,k ty,k ṫy,k ]T and the single-target state space model is linear Gaussian according to transition density fk|k−1 (xk |xk−1 ) = N (xk , Fk xk−1 , Qk ) with parameters # " 4   ∆3 ∆ I I I2 ∆I2 2 2 2 2 Fk = , Qk = σv ∆43 02 I2 ∆2 I2 2 I2 where In and 0n denote the n × n identity and zero matrices respectively, ∆ = 1s is the sampling period, σv = 5m/s2 is the standard deviations of the process noise. In the context of multi-sensor control, we consider the following sensor models that the measurement as well as the detection probability is a function of distance between target and sensor states. The sensor measurements are noisy vectors of polar position of the form " # ty,k −sy,k arctan( tx,k ) −sx,k zk = p + wk (xk , uk ) (tx,k − sx,k )2 + (ty,k − sy,k )2 where uk = [sx,k sy,k ] denotes sensor position. wk (xk , uk ) ∼ N (·; 0, Rk ) is the measurement noise with covariance Rk = diag(σθ2 , σr2 ) in which the scales of range and bearing noise are σr = σ0 + ηr kxk − uk k2 and σθ = θ0 + ηθ kxk − uk k, the parameters σ0 = 10m, ηr = 5 × 10−5 m−1 , θ0 = π/180rad 4.2 6 5.5 −200 −100 0 100 sensor1−Course change (deg) 200 7 6 (−60,30) 4 3.8 3.6 3.4 3.2 160 6.5 5.5 −200 C−S Divergence where σD = 10000m controls the rate at which the detection probability drops off as the range increases. Moreover, the survival probability is PS,k = 0.98, the number of clutter reports in each scan is Poisson distributed with λc = 25. Each clutter report is sampled uniformly over the whole surveillance region. The sensor platform moves with constant velocity but takes course changes at pre-specified decision time. The allowable control actions for each sensor is Ci = [−180◦, −150◦ , . . . , 0◦ , . . . , 150◦ , 180◦], the number of samples used to compute the expected reward is M = 40, the idealised measurements are generated over a horizon length of H = 5, with sampling period T = 2s. The test scenario consists of 4 targets, the sensors keep still during first 10s and make first decision at 10s so the second decision at 20s, third decision at 30s, then remain on that course until the end of the scenario at time 40s. The region and tracks are shown in Fig. 2. 7 6.5 100 40 Se −100 0 100 sensor2−Course change (deg) 200 ns −20 or 1 −80 −140 (a) −180 −120 −60 0 60 120 180 r2 nso Se (b) Fig. 4. (a) Reward curve at the time of the second decision (20s) based on IDM algorithm. (b) Reward curve at the time of the second decision (20s) based on JDM algorithm. 50 OSPA (m)(c=100,p=2) N (kxk − uk k; 0, σD ) PD (xk , uk ) = N (0; 0, σD ) C−S Divergence and ηθ = 5 × 10−6m−1 . The probability of target detection in each sensor is independent and of the form C−S Divergence 6 random actions IDM algorithm JDM algorithm 40 30 20 10 10000 0 survive from 9s to 35s Y−Coordinate (m) 8000 Ground Truths sensor1 sensor2 6000 15 20 25 Time Step 30 35 40 survive from 1s to 40s survive from 1s to 40s survive from 16s to 40s 0 0 2000 4000 6000 X−Coordinate (m) 8000 10000 Fig. 2. Target trajectories considered in the simulation experiment. The start/end point for each trajectory is denoted, respectively, by ◦|△. The  indicates initial sensor position. 10000 10000 8000 8000 Ground Truths sensor1 sensor2 decision time 6000 4000 2000 Y−Coordinate (m) Y−Coordinate (m) 10 Fig. 5. Comparison of OSPA errors returned by randomised control action, IDM algorithm and JDM algorithm. The plotted results are the average of 100 Monte Carlo run. 4000 2000 0 0 5 Ground Truths sensor1 sensor2 decision time 6000 4000 2000 2000 4000 6000 X−Coordinate (m) (a) 8000 10000 0 0 2000 4000 6000 X−Coordinate (m) 8000 10000 (b) Fig. 3. (a) Track output from a typical run based on IDM algorithm. (b) Track output from a typical run based on JDM algorithm. Fig. 3 (a) and (b) show a single run to exhibit the typical control behaviour based on IDM algorithm and JDM algorithm, respectively. As it can be seen, both control methods can make proper decisions that sensors move close to the targets. To be more specific, we denote the control action chosen by sensor 1 and sensor 2 by a vector (θ1 , θ2 ), at the first decision time 10s, two control methods make same decision (−30◦ , 30◦ ), at the second decision time 20s, the IDM algorithm takes (−30◦ , 0◦ ) while the JDM algorithm takes (−60◦ , 30◦ ). Fig. 4 (a) and (b) show the CS divergence at the second decision (20s) of IDM algorithm and JDM algorithm, respectively. These results mean that compared with the IDM algorithm, each sensor controlled by JDM algorithm is not greedy to observe all targets, but rather a view of the whole picture to make the amount of information content of fused density larger. Fig. 5 shows the comparison of OSPA errors averaged over 100 Monte Carlo runs among randomised control action, IDM algorithm and JDM algorithm. As it is shown, both control methods can achieve better performance than randomised control strategy and the JDM algorithm is preferable. Moreover, when the situation is more complex such as much more targets or sensors, the performance difference between JDM algorithm and IDM algorithm will increase and the randomised control strategy may collapse. V. C ONCLUSION In this paper, we address the problem of multi-sensor control for multi-target tracking via labelled random finite sets (RFS) 7 in the sensor network systems. With the GCI fusion, two novel multi-sensor control approaches using CS divergence are presented, referred to JDM and IDM algorithm, respectively. Simulation results verify both the control approaches perform well in multi-target tracking, the IDM method has smaller amount of computations while the JDM method makes decision from holistic point of view, and hence achieve better performance. ACKNOWLEDGMENT This work was supported by the National Natural Science Foundation of China under Grants 61301266, the Chinese Postdoctoral Science Foundation under Grant 2014M550465. R EFERENCES [1] P. Ögren, E. Fiorelli, and N. E. Leonard, “Cooperative control of mobile sensor networks: Adaptive gradient climbing in a distributed environment,” IEEE Trans. Autom. Control, vol. 49, no. 8, pp. 1292– 1302, 2004. [2] V. Krishnamurthy, “Algorithms for optimal scheduling and management of hidden markov model sensors,” IEEE Trans. Signal Process., vol. 50, no. 6, pp. 1382–1397, 2002. [3] R. P. Mahler, Statistical multisource-multitarget information fusion. Artech House, Inc., 2007. [4] B.-T. Vo and B.-N. Vo, “Labeled random finite sets and multi-object conjugate priors,” IEEE Trans. Signal Process., vol. 61, no. 13, pp. 3460– 3475, 2013. [5] B.-N. Vo, B.-T. Vo, and D. Phung, “Labeled random finite sets and the bayes multi-target tracking filter,” IEEE Trans. Signal Process., vol. 62, no. 24, pp. 6554–6567, 2014. [6] M. Beard, B.-T. Vo, B.-N. Vo, and S. Arulampalam, “Void probabilities and cauchy-schwarz divergence for generalized labeled multi-bernoulli models,” arXiv preprint arXiv:1510.05532, 2015. [7] B.-N. Vo and W.-K. Ma, “The gaussian mixture probability hypothesis density filter,” IEEE Trans. Signal Process., vol. 54, no. 11, pp. 4091– 4104, 2006. [8] B.-T. Vo, B.-N. Vo, and A. Cantoni, “Analytic implementations of the cardinalized probability hypothesis density filter,” IEEE Trans. Signal Process., vol. 55, no. 7, pp. 3553–3567, 2007. [9] B.-T. Vo, B.-N. Vo, and A. Cantoni, “The cardinality balanced multitarget multi-bernoulli filter and its implementations,” IEEE Trans. Signal Process., vol. 57, no. 2, pp. 409–423, 2009. [10] H. G. Hoang and B. T. Vo, “Sensor management for multi-target tracking via multi-bernoulli filtering,” Automatica, vol. 50, no. 4, pp. 1135–1142, 2014. [11] A. K. Gostar, R. Hoseinnezhad, and A. Bab-Hadiashar, “Multi-bernoulli sensor control for multi-target tracking,” in Intelligent Sensors, Sensor Networks and Information Processing, 2013 IEEE Eighth International Conference on, pp. 312–317, IEEE, 2013. [12] A. K. Gostar, R. Hoseinnezhad, and A. Bab-Hadiashar, “Robust multibernoulli sensor selection for multi-target tracking in sensor networks,” IEEE Signal Processing Letters, vol. 20, no. 12, pp. 1167–1170, 2013. [13] A. K. Gostar, R. Hoseinnezhad, and A. Bab-Hadiashar, “Multi-bernoulli sensor control via minimization of expected estimation errors,” IEEE Trans. Aerosp. Electron. Syst., vol. 51, no. 3, pp. 1762–1773, 2015. [14] A. K. Gostar, R. Hoseinnezhad, A. Bab-Hadiashar, and F. Papi, “Ospabased sensor control,” in Control, Automation and Information Sciences (ICCAIS), 2015 International Conference on, pp. 214–218, IEEE, 2015. [15] K. Kastella, “Discrimination gain to optimize detection and classification,” Systems, Man and Cybernetics, Part A: Systems and Humans, IEEE Transactions on, vol. 27, no. 1, pp. 112–116, 1997. [16] J. M. Aughenbaugh and B. R. La Cour, “Metric selection for information theoretic sensor management,” in Information Fusion, 2008 11th International Conference on, pp. 1–8, IEEE, 2008. [17] C. Kreucher, A. O. Hero III, and K. Kastella, “A comparison of task driven and information driven sensor management for target tracking,” in Decision and Control, 2005 and 2005 European Control Conference. CDC-ECC’05. 44th IEEE Conference on, pp. 4004–4009, IEEE, 2005. [18] B. Ristic and B.-N. Vo, “Sensor control for multi-object state-space estimation using random finite sets,” Automatica, vol. 46, no. 11, pp. 1812–1818, 2010. [19] B. Ristic, B.-N. Vo, and D. Clark, “A note on the reward function for phd filters with sensor control,” IEEE Trans. Aerosp. Electron. Syst., vol. 47, no. 2, pp. 1521–1529, 2011. [20] H. G. Hoang, B.-N. Vo, B.-T. Vo, and R. Mahler, “The cauchy–schwarz divergence for poisson point processes,” IEEE Trans. Inf. Theory, vol. 61, no. 8, pp. 4475–4485, 2015. [21] M. Beard, B.-T. Vo, B.-N. Vo, and S. Arulampalam, “Sensor control for multi-target tracking using cauchy-schwarz divergence,” in Information Fusion (Fusion), 2015 18th International Conference on, pp. 937–944, IEEE, 2015. [22] R. P. Mahler, “Optimal/robust distributed data fusion: a unified approach,” in AeroSense 2000, pp. 128–138, International Society for Optics and Photonics, 2000. [23] C. Fantacci, B.-N. Vo, B.-T. Vo, G. Battistelli, and L. Chisci, “Consensus labeled random finite set filtering for distributed multi-object tracking,” arXiv preprint arXiv:1501.01579, 2015. [24] B. Wang, W. Yi, S. Li, M. R. Morelande, L. Kong, and X. Yang, “Distributed multi-target tracking via generalized multi-bernoulli random finite sets,” in Information Fusion (Fusion), 2015 18th International Conference on, pp. 253–261, IEEE, 2015. [25] R. P. Mahler, “Global posterior densities for sensor management,” in Aerospace/Defense Sensing and Controls, pp. 252–263, International Society for Optics and Photonics, 1998. [26] R. Mahler, “Multitarget sensor management of dispersed mobile sensors,” Theory and Algorithm for Cooperative Systems, Kluwer, Springer, 2005. [27] M. R. Morelande, “Joint data association using importance sampling,” in Information Fusion, 2009. FUSION’09. 12th International Conference on, pp. 292–299, IEEE, 2009.
3cs.SY
arXiv:1506.05893v1 [cs.PL] 19 Jun 2015 On Systematic Testing for Execution-Time Analysis Daniel Bundala Sanjit A. Seshia UC Berkeley Email: [email protected] UC Berkeley Email: [email protected] Abstract—Given a program and a time deadline, does the program finish before the deadline when executed on a given platform? With the requirement to produce a test case when such a violation can occur, we refer to this problem as the worst-case execution-time testing (WCETT) problem. In this paper, we present an approach for solving the WCETT problem for loop-free programs by timing the execution of a program on a small number of carefully calculated inputs. We then create a sequence of integer linear programs the solutions of which encode the best timing model consistent with the measurements. By solving the programs we can find the worst-case input as well as estimate execution time of any other input. Our solution is more accurate than previous approaches and, unlikely previous work, by increasing the number of measurements we can produce WCETT bounds up to any desired accuracy. Timing of a program depends on the properties of the platform it executes on. We further show how our approach can be used to quantify the timing repeatability of the underlying platform. I. I NTRODUCTION Execution-time analysis is central to the design and verification of real-time embedded systems. In particular, over the last few decades, much work has been done on estimating the worst-case execution time (WCET) (see, e.g. [1], [2], [3]). Most of the work on this topic has centered on techniques for finding upper and lower bounds on the execution time of programs on particular platforms. Execution time analysis is a challenging problem due to the interaction between the interaction of a large space of program paths with the complexity of underlying platform (see, e.g., [4], [5]). Thus, WCET estimates can sometimes be either too pessimistic (due to conservative platform modeling) or too optimistic (due to unmodeled features of the platform). The above challenges for WCET analysis can limit its applicability in certain settings. One such problem is to verify, given a program P , a target platform H, and a deadline d, whether P can violate deadline d when executed on H — with the requirement to produce a test case when such a violation can occur. We refer to this problem as the worstcase execution-time testing (WCETT) problem. Tools that compute conservative upper bounds on execution time have two limitations in addressing this WCETT problem: (i) if the bound is bigger than d, one does not know whether the bound is too loose or whether P can really violate d, and (ii) such tools typically aggregate states for efficiency and hence do not produce counterexamples. Moreover, such tools rely on having a fairly detailed timing model of the hardware platform (processor, memory hierarchy, etc.). In some industrial settings, due to IP issues, hardware details are not readily available, making the task much harder for timing analysis (see e.g, this NASA report for more details [6]); in such settings, one needs an approach to timing analysis that can work with a “black-box” platform. In this paper, we present an approach to systematically test a program’s timing behavior on a given hardware platform. Our approach can be used to solve the WCETT problem, in that it not only predicts the execution times of the worstcase (longest) program path, but also produces a suitable test case. It can also be adapted to produce the top K longest paths for any given K. Additionally, the timing estimate for a program path comes with a “guard band” or “error bound” characterizing the approximation in the estimate — in all our experiments, true value was closed to the estimate and well within the guard band. Our approach builds upon on prior work on the GameTime system [7], [8]. GameTime allows one to predict the execution time of any program path without running it by measuring a small sample of “basis paths” and learning a timing model of the platform based on those measurements. The advantage of the GameTime approach is that the platform timing model is automatically learned from endto-end path measurements, and thus it is easy to apply to any platform. However, the accuracy of GameTime’s estimate (the guard bands) depend on the knowledge of a platform parameter µmax which bounds the cumulative variation in the timing of instructions along a program path from a baseline value. For example, a load instruction might take just 1 cycle if the value is in a register, but several 10s of cycles if it is in main memory and not cached. The parameter µmax can be hard to pre-compute based on documentation of the processors ISA or even its implementation, if available. Our approach shares GameTime’s ease of portability to any platform, and like it, it is also suitable for black-box platforms. However, rather than depending on knowledge of µmax , we show how one can compute the guard bands using an integer linear programming formulation. Experimental results show that our approach can be more accurate than the original GameTime algorithm [8], at a small extra computational cost. Moreover, our algorithm is tunable: depending on the desired accuracy specified by a user, the algorithm measures more paths and yields more precise estimate; possibly measuring all paths if perfect accuracy is requested. Finally, we also show how to estimate the parameter µmax . int f ( int x) { i f ( x % 2 == 0 ) { i f ( x & 101) { x ++; } else { x +=7; } } return x ; } [x%2] [!(x&101)] [x&101] [!(x%2)] x+ = 7 x++ return x Fig. 1: Source code (top) and its corresponding control flow graph (bottom) II. P RELIMINARIES Our solution to the problem is an extension of the measurement-based GameTime approach [11]. We now present the model used in [11] as well as in this paper. A. Model To decide whether a program can exceed a given time limit d, it suffices to decide whether the worst input exceeds the limit d. However, recall that without any restrictions on the program, when the program contains unbounded loops or recursion, even determining whether the program terminates not even the number of steps it performs is undecidable. Therefore, we consider only deterministic programs with bounded loops and no recursion. We did not find this limitation restricting as reactive controllers are already often written with this limitation in mind. Given a computer program, one can associate with it the control-flow graph (CFG) in the usual way (Figure 1); vertices representing locations and edges the basic blocks (straight-line code fragments) of the program. Since we assume that the loops are bounded and there is no recursion, the loops can be unrolled and all function calls inlined. Thus, the resulting CFG is always a directed and an acyclic graph (DAG). Given a DAG G = (V, E), with the set of vertices V , set of edges E, we designate two vertices: source s and sink t corresponding to the entry and exit points of the program, respectively. For vertex v of graph, we use in(v) to denote the set of incoming edges to v and out(v) to denote the set of outgoing edges from v. To model [11] the execution times of a program, we associate with each edge e ∈ E cost we . The cost we models the (baseline) execution time of the particular statement the edge e corresponds to. As described in the introduction, we measure only execution times of entire source-to-sink paths and not of individual statements. Given a source-to-sink P path x, the baseline execution time of the path x is wx = e∈x we where the sum is over all edges present in x. However, due to caching, branch misses, etc. the actual execution time differs from the baseline and thus the execution time (the length of the path) can be modeled as X wx = we + dx e∈x where the term dx denotes the variation from the baseline value. The term dx is a function of the input and the context the program runs in. This is known as the bounded path-dependent repeatability condition [12]. The length of path x is denoted wx . Observe that different inputs corresponding to the same path in general take different time to execute. However, we assume that |d| ≤ µx for some µx ∈ R. We denote the maximum maxx µx by µmax . The value µmax is a measure of timing repeatability. If µmax = 0 then the system is perfectly time repeatable. In general, the larger the value of µmax , the less repeatable the timing of the system is. The aim of this paper is to find a path x such that wx is maximal. The algorithm in [11] as well as ours, does not require the knowledge of µx ’s or µmax to find the worstcase execution input. However, the accuracy of the algorithms depend of µmax , as that is inherent to the timing of the underlying hardware, Our algorithm carefully synthesizes a collection of inputs on which it runs the given program and measures the times it takes to execute each of them. Then, using these measurements, it estimates the length of the longest path. Formally, the pair (x, wx ) consisting of a path x and its length wx is called a measurement. We denote the length of the longest path by wM . To summarize, throughout the paper we use the following notation. • G - underlying DAG • S - set of measured paths • M = {(xi , li )} - set of measurements consisting of pairs path xi ∈ S and the observed length li It was shown in [11] how, using only |E| measurements of source-to-sink paths, to find an input corresponding to a path of length at least wM − 2|E|µmax . In particular, if the longest path is longer than the second longest path by at least 2|E|µmax , the algorithm in [11] in fact finds the longest path. Thus, we say that the “accuracy” of the algorithm is 2|E|µmax . in such a way that for any path x, it always holds that |cb | ≤ 2 for every b ∈ B. The paths in B are called the basis paths as they suffice to express any other path. P Now, if the path px can be written as px = b∈B cb · pb then its estimated (baseline) length is X wx = cb · wb b∈B Fig. 2: DAG with exponentially many paths In this paper, we show how to (i) improve the accuracy without increasing the number of measurements, (ii) by increasing the number of measurements improve the accuracy even further, (iii) how to estimate the timing repeatability of the underlying platform (as captured by µmax ). Our algorithm as well as the algorithm in [11] measures the length of some paths and then estimates the lengths of other paths based on those measurements. Note that as long as not all the lengths of all the paths are measured, the inaccuracy of estimates is unavoidable. Consider for example the graph in Figure 2 and assume the graph consists of n “diamonds”. Clearly, there are 2n source-to-sink paths in the graph. Assume that we = 1 for each edge and µx = 0 for all paths x except for one path y for which µy = µmax > 0. Now, suppose we measure the lengths of some collection of paths S. As long as S does not contain y, the length of every observed path is 2n. Hence, any length of wy of y in the interval [2n − µmax , 2n + µmax ] is consistent with the measurement. Therefore, in the worst case, the best achievable estimate of the length of wy can always be at least µmax from the real answer. where wb ’s are the measured lengths of the basis paths. The algorithm thus runs the program on the inputs corresponding to the basis paths in order to measure the lengths pb for each b ∈ B. Moreover, it was shown in [11] how, by encoding the problem as an integer-linear-program (ILP) instance, to find Ppath X such that the corresponding estimated length: pX = b∈B cb · wb is maximized2 . Consider the accuracy P of the estimated length of pX . By construction, pX = b∈B cb · pb . Hence, X X X we = cb we . e∈X b∈B e∈b Further, for b ∈ B, we have wb = wX − X cb · wb = X P e∈b we + db . Hence, w e + dX − e∈X b∈B = X = w e + dX − X X cb ( we + db ) b∈B we − e∈X X cb X b∈B +dX − 1 cb · wb b∈B e∈X X X X e∈b we e∈b cb · db b∈B We now briefly describe the algorithm in [11]; we skip the standard technical details such as CFG extraction or how to find an input corresponding to a given path and focus only on how to extract the longest path. Let m be the number of edges in E. Then, by numbering the edges in E, one can think of each path x as a vector px in Rm such that  0 if ith edge is not used in x px (i) = 1 if ith edge is used in x ≤ dX − X cb · db b∈B ≤ (2|B| + 1)µmax where cb ’s are coefficients in R. Moreover, using theory of 2barycentric spanners [13], it was shown that B can be chosen Thus, the algorithm in [11], finds the longest path (and the corresponding input) only up to the error term of (2|B| + 1)µmax , under certain assumptions outlined in [11]. A challenge, as noted earlier, is that it is not easy to estimate the value of µmax . Consider the first four columns in Table V. The second column in the table shows the lengths of the longest path as estimated by the algorithm in [11]. However, the third column shows the actual length of the path that is measured when the program is executed on the corresponding inputs. Notice that in some cases the prediction does not match the measured time. Also, the algorithm in [11] does not provide any error bounds on the estimates, thereby making the predicted values less useful. In this paper we show how, given the exactly same set of measurements as in [11], we can find a tighter estimate and how to incorporate the knowledge of additional measurements to obtain even tighter bounds. In fact, for the benchmarks given 1 In general, however, it holds that the more paths are included in S the better is the estimate of the longest path. 2 In case the resulting path is infeasible in the program, a constraint is added into the ILP and the ILP is solved again. Now, given two paths x and y, one can define the linear combination a · x + b · y for a, b ∈ R in the natural (component wise) way. Thus, one can think of paths as points in an mdimensional vector space over R. In particular, it was show in [11] that there is always a basis B of at most m source-tosink paths such that each source-to-sink path x can be written as a linear combination of paths from B: X px = cb · pb b∈B x0 x1 x2 x3 Fig. 3: Basis paths for DAG in Figure 2. For example, the path that always takes the bottom path through each diamond can be expressed as x1 + x2 + x3 − 2 ∗ x0 in Table V, we not only obtain more accurate predictions of running time, we can also give error bounds for our estimates. III. A LGORITHM A. Overview We now give an overview of our algorithm. Recall, that the problem studied can be considered as follows: Given a DAG with source s and sink t, find the longest source-to-sink path where the lengths of that paths are modeled as described in the Preliminaries, Section II. The algorithm in [11] expresses every path as a linear combination of basis paths; using their lengths to estimate the length of the paths not measured. Intuitively, if two paths overlap (they share common edges) then knowing the length of one provides some information about the length of the other. Even basis paths with zero coefficient in the linear combination can provide information about the length of an estimated path. In our algorithm, we write integer linear programs (ILPs), with one constraint per measurement, looking for the longest path with the edge weights consistent with the measurements and µx . Even though, µx are not observable, we show how to obtain consistent bound on µmax from the measurements. B. Path Extraction In this section we assume that we have a set of measurements M, consisting of pairs (x, lx ) where x is a path and lx is the measured length of x and we show how to find the longest path consistent with the measurements. In Section III-D we then show how to actually calculate the set S. To make the notation consistent with [11], we call the measured paths the basis paths, even if they do not necessarily form a basis in the underlying vector space as was the case in [11]. Suppose, for the moment, that the value of µmax is known and equal to D ∈ R. Then the following problem encodes the existence of individual edge weights (we ) such that the P cumulative sum ( e∈xi we ) along each measured path is consistent with its measured length; that is, the measured value differs by at most D from the cumulative sum. Problem 1. Input: DAG G, a set of measurements M and D ∈ R max len(path)P s.t. li − D ≤ e∈xi we ≤ li + D for each measurement (xi , li ) ∈ M vars : we ≥ 0 for each edge e Where max len(path) expresses the length of the longest cumulative sum along some source-to-sink path in the graph. We now turn this problem into an ILP by expressing the existence of a path as follows: Problem 2. Input: DAG G, a set of measurements M and D ∈ R P max e∈E pe P s.t. li − D ≤ e∈xi we ≤ li + D Pfor each measurement (xi , li ) ∈ M b =1 Pe∈out(s) e b =1 Pe∈in(t) e P e∈(v) be = e∈out(b) be for each vertex v 6∈ {s, t} pe ≤ we for each edge e pe ≤ M · be for each edge e vars : for each edge e: we ≥ 0 be ∈ {0, 1} pe ≥ 0 Where M ∈ R is a constant larger than any potential we . In the implementation, we take M to be the largest li in the set of measurements S plus one. In the above ILP (Problem 2), Boolean variables be ’s specify which edges of the graph are present in the extremal source-toP sink path and pe ’s shall equal be ×we . Thus, e∈E pe denotes the length of the extremal source-to-sink path. The existence of a path is encoded by the constraints specifying that there is a flow from the source to the sink. That is, that exactly one edge from the source has be = 1, exactly one edge to the sink has be = 1 and that for all intermediate vertices, the number of incoming edges to that vertex with be = 1 equals the number of outgoing edges from that vertex with be = 1. Further, for each edge e ∈ E, we use the variable pe to denote the multiplication pe = be · we . As be ∈ {0, 1}, we have pe ≤ we . Also, the constraints pe ≤ M · pe ensure that if be = 0 then pe = 0. On the other hand, if be = 1 then constraints imply only that 0 ≤ pe ≤ Pwe . Finally, note that the objective function is to maximize e∈E pe . hence, if be = 1 then optimum value for pe is to set pe to we . Hence, in the optimal solution, if be = 1 then pe = we = 1 · we = be · we as desired. PRecall, that for measurement (xi , li ) it holds that li = e∈xi we + d where |d| ≤ µx ≤ µmax . Thus, in general, D needs to be at least 0 to ensure that Problem 2 is feasible. By the assumption, taking D = µmax yields a feasible ILP. TABLE I: Different values of D obtained in the benchmarks by perturbing the measurements. Lemma 1. Problem 2 is feasible for D = µmax . Benchmark However, the value of µmax is neither directly observable nor known as it depends on the actual hardware the program is running on. We now show how to obtain a valid D yielding a feasible ILP in Problem 2. Later we show under what circumstances the solution of the resulting ILP gives the correct longest path. Consider the following LP3 . altitude stabilisation automotive cctask irobot sm Problem 3. Input: DAG G and a set of measurements M min µ P s.t. li − µ ≤ e∈xi we ≤ li + µ for each measurement (xi , li ) ∈ M vars : for each edge e: we ≥ 0 µ≥0 Intuitively, the problem above finds the least value of D for which Problem 2 is feasible, i.e., the least D consistent with the given set of measurements M . Formally, we have: Theorem 2. Let p(µ) be the solution of Problem 3. Then taking D = p(µ) in Problem 2 yields a feasible ILP. Proof: First, note that Problem 3 always has a solution, e.g., take we = 0 and µ = maxi li . Notice that, assuming there is at least one source-to-sink path, the only possible way for Problem 2 to be infeasible is that D is small enough so that the constraints li − D ≤ P e∈xi we ≤ li + D are inconsistent. However, by Pthe construction of Problem 3, p(µ) satisfies, li − p(µ) ≤ e∈xi we ≤ li + p(µ) for every path xi . The result now immediately follows. Note that, by construction, taking µ = µmax in Problem 3 is feasible. Hence, D ≤ µmax as D is the least value consistent with the measurements. Notice that the solution of Problem 3, can be used as a measure of timing repeatability of the underlying hardware platform. In case of perfect timing repeatability, that is if each edge (each statement of the underlying program) always took exactly the same time (regardless of concrete values of cache hits, misses, branch predictions, etc) to execute and that dx = 0 for every measured path, then the solution of Problem 3 would be 0. Conversely, the larger the value of the solution of Problem 3 the bigger the discrepancy between different measurements. To measure the effect of timing repeatability on the computed value of D, we have taken measurements for a set of benchmarks used to evaluate our tool on (Section IV-B) and randomly perturbed the measured execution times. We have perturbed each measurement randomly by up to 10%, 25% and 50%. Table I shows the calculated values of D. As expected, the larger the perturbation, the larger the calculated value of D. 3 Note that Problem 3 is a linear program and not an integer linear program. 0% 57.0 343.2 1116.0 73.9 37.2 0.1 Perturbation 10% 25% 66.1 87.8 371.3 807.1 1281.3 1486.9 110.6 150.9 95.9 288.8 23.2 117.4 50% 126.5 1107.2 2961.3 270.6 552.8 216.8 C. Optimality The solution of Problem 2 is the best estimate of the longest path that is consistent with measurements M. We now show how good the estimate is. Consider the solution of Problem 2 with D equal to the solution of Problem 3. For each edge e, let p(we ) denote the value of the variable we in the solution, and let τ be the path corresponding to the solution of Problem 2. Denote the length of τ in the solution by p(len(τ )). We now show how much p(len(τ )) differs from the actual length of τ . Specifically, we shall show that the goodness of the estimate of the length of τ is related to the following ILP4 . Problem 4. Input: DAG G and a set of measurements M max | len(path)| P s.t. −1 ≤ e∈xi we ≤ +1 for each measurement (xi , li ) ∈ M vars : we for each edge e The existence of a path and the length of the path is expressed in the above ILP in exactly the same way as was done in Problem 2. Note that the above ILP is always feasible with | len(path) at least 1; one solution is to set we = 1 for one edge outgoing from the sink and set we = 0 for all other edges. Further, note that Problem 4 depends only on the graph and the set of the measured basis paths; it is independent of the (measured) lengths of the paths. In fact, we can show that as long as some path does not appear in the measurements M, the solution of the above ILP is strictly greater than 1. Theorem 3. Let G be a DAG, M a set of measurements and π a source-to-sink path in G such that π is not present in M. Then the solution of Problem 4 is strictly greater than 1. Proof: We give a satisfying assignment to variables we in Problem 4 such that len(π) > 1. Specifically, let ei be the first edge of π, that is, the edge outgoing from the sink of G. Further, let, D = {(u, v) |u ∈ π} be the set of edges with the initial vertex lying on π. Then the assignment to weights we is as follows:  1 e = ei  1 + |E| 1 − |E| e∈D we =  0 otherwise 4 To find the absolute value | len(path)| we solve two linear programs. One with the objective function max len(path) and one with the objective function max − len(path). Note that, with this assignment to we ’s, the length of pi 1 > 1. Now, consider any other path τ equals len(π) = 1 + |E| used in measurements M. In particular, τ 6= π. There are |E| edges in G and the weight we associated with each edge e is 1 1 at least − |E| . Hence, len(τ ) ≥ |E| × − |E| = −1. Now, if τ does not include ei , that is ei 6∈ τ then, len(τ ) ≤ 0 as wei is the only positive weight. If τ includes ei , that is ei ∈ τ , then τ necessarilly contains at least one edge from D as τ is different from π. Hence, len(τ ) ≤ 1. In any case, −1 ≤ len(τ ) ≤ 1 as required and thus we have given a valid assignment to we ’s with len(π) > 1. Recall that the set S denotes the set of paths occurring measurements M. Let r(we ) and r(µx ) be the real values of we for each edge e and µx for each path x ∈ S. Then for each edge e the expression |p(we ) − r(we )| denotes the difference between the calculated values of we and the actual value of we . Analogously, the expression P extends to entire paths: for a path x we have p(wx ) = e∈x p(we ). Now, the difference for the worst path can be bounded as follows. Theorem 4. Let k be the solution of Problem 4. Then |p(len(τ )) − r(len(τ ))| ≤ 2kµmax Proof: Note that by construction, r(we ) and r(µx ) are a solution of Problem 3. Hence, for every (xi , li ) ∈ M it holds that. li −µmax ≤ li −r(µxi ) ≤ X r(we ) ≤ li +r(µxi ) ≤ li +µmax . e∈xi Recall that D ≤ µmax and that that p(we ) is a solution of Problem 2. Hence, for every (xi , li ) ∈ M it holds that: li − µmax ≤ li − D ≤ X p(we ) ≤ li + D ≤ li + µmax . e∈xi Hence, by subtracting the last two equations from each other, we have for any basis path xi ∈ S that: −2µmax ≤ X p(we ) − r(we ) ≤ 2µmax e∈xi Now, dividing by 2µmax we have: P p(we ) − r(we ) ≤ 1. −1 ≤ e∈xi 2µmax for any basis path xi ∈ S. Thus, the above inequality implies that taking we = p2 (we ) − r(we ) 2µmax is a (not necessarily optimal) solution of Problem 4. Since k is the length of the longest path achievable in Problem 4, it follows that for any path x (not necessarily in the basis), we have P p(we ) − r(we ) −k ≤ e∈x ≤ k. 2µmax TABLE II: Comparison of the accuracy in the longest path extraction between our algorithm and the one in [11]. For our accuracy, we take 2 ∗ k where k is the solution of Problem 4. For [11] we take 2 ∗ (# basis paths). Benchmark altitude stabilisation automotive cctask irobot sm # Basis Paths 6 10 13 18 21 69 [11] Accuracy 12 20 26 36 42 138 Our Accuracy 10.0 16.4 14.0 34.0 18.0 48.6 By rearranging, we have −2kµmax ≤ X p(we ) − r(we ) ≤ 2kµmax . e∈x In other words, the calculated length differs from the real length by at most 2kµmax , as desired. Recall that the algorithm in [11] has difference between the estimated and the actual length at most 2|E|µmax whereas our algorithm has 2kµmax where k is the solution of Problem 4. Observe that the dependence in the error term on µmax is unavoidable as µmax is inherent to the timing properties of the underlying platform. For comparison, we have generated the same basis as in [11] and calculated the corresponding k’s for several benchmarks. Table II summarizes the results (see Table IV for the description of benchmarks). As can be seen from the table, when using the same set of measurements, our method gives more accurate estimates than the one in [11]. Furthermore, recall that in Problem 3 we calculate the best (lower) bound D on µmax consistent with the given measurements. Together with the above theorem, this gives “error bounds” to the estimate in Problem 2. Specifically, if the length of the longest path computed in Problem 2 is T then, the length of the path when measured, that is consistent with the measurements is within T ± (2k × D). However, note that this is only the best bound deducible from the measurements since D ≤ µmax . Since µmax is not directly observable and we assume no nontrivial bound on µmax , the length of the path cannot be bounded more accurately without actually measuring the path. The above analysis applies to the extraction of the single longest path. Now, suppose that instead of extracting just one longest path, we want to extract K longest paths. To that end, we iterate the above procedure and whenever a path is extracted, we add a constraint eliminating the path from the solution of Problem 2 and then solve the updated ILP. For a path x, the constraint eliminating it from the solution space of P Problem 2 is e∈x be < |x|. The constraint specifies that not all the edges along x can be taken together in the solution. As the length of the predicted and the measured length differ, it may happen (e.g., Table V) that when measured the length of the path predicted to be the longest is not actually the longest. Thus, to find the longest path, we may need to iterate the above process by generating paths with ever smaller predicted lengths, stopping whenever the current estimate differs by more than (2k × D) from the longest estimate. TABLE III: Number of paths generated by Algorithm 1 to reach the desired accuracy (second column). Third column shows the accuracy (solution of Problem 4) of the generated set of paths Benchmark D. Basis Computation The algorithm (Problem 2) to estimate the longest path depends on the set of measurements M of the basis paths S. In this section we show how to calculate such a set of paths. In general, arbitrary set of paths can be used as basis paths. For example, we have shown in Table III that using the set of paths used in [11], we are able to get more accurate estimates than those obtained in [11]. Recall that (Theorem 4) the accuracy of the solution of Problem 2 is tightly coupled with the solution of Problem 4. This leads to a tunable algorithm, which depending on the desired accuracy of the predictions, calculates a set of paths to be used in Problem 2. Specifically, given a desired accuracy A ∈ R, A ≥ 1, we want to find a set of feasible paths S such that the solution of Problem 4 is at most A. We implemented a simple iterative algorithm (Algorithm 1) that finds such a set by repeatedly extending the set of paths by the path corresponding to the solution of Problem 4. In the algorithm, if the longest extracted path is infeasible in the underlying program, we add a constraint into the ILP (Problem 4) prohibiting the path. That is, if the longest path is infeasible and τ is the unsatisfiable core of the longest path5 then we add a constraint that not all the be ’s corresponding to P the edges used in τ are set to 1 in Problem 2, i.e., e∈τ be < |τ | where |τ | denotes the number of edges in τ . Then we solve the updated ILP. S←∅ while (Solution of Problem 4 with paths S) > A do x ← longest path in Problem 4 if x is feasible then S ← S ∪ {x} else Add a constraint prohibiting x end end return S Algorithm 1: Iterative algorithm for basis computation Theorem 5. If A ≥ 1 then the Algorithm 1 terminates with a set P of paths such that the solution of Problem 4 with paths P is at most A. Proof: Note that each constraint in Problem 4 limits the length of some path to (at most) 1. In particular, if S contains all the paths in the graph then the solution of Problem 4 equals 1. 5 Minimal set of edges that cannot be taken together as identified by an SMT solver altitude stabilisation automotive cctask irobot sm Desired k 10 5 2 10 5 2 10 5 2 10 5 2 10 5 2 22 18 15 Actual k 5.0 5.0 1.0 7.0 4.7 2.0 7.0 5.0 2.0 9.0 5.0 2.0 9.0 5.0 2.0 21.8 18.0 14.5 # Basis Paths 7 7 10 11 12 40 14 14 30 19 25 76 22 34 118 70 73 77 Time(s) 0.03 0.03 1.66 0.10 0.96 22.78 0.14 0.89 27.60 0.20 4.10 42.91 0.50 20.13 182.42 328.14 7089.04 10311.49 Further, if the algorithm finds some path x to be the longest in some iteration then the length of x in all subsequent iterations will be at most 1 as x ∈ S. Therefore, as long as the solution is greater than 1, the longest path found is different from all the paths found in the previous iterations. Also, if the path is infeasible, then a constraint is added that prevents the path occurring in any subsequent iterations. It follows from these considerations that the algorithm keeps adding new paths in each iteration and eventually terminates. By construction, the solution of Problem 4 with the set of paths S is at most A. In the extreme case of A = 1, it immediately follows from Theorem 3, that Algorithm 1 returns all feasible paths in the underlying graph. We have implemented the above iterative algorithm and evaluated it on several case studies. Table III summarizes the number of paths generated by the algorithm for the given accuracy k as well as the running time required to find those paths. We have observed that the basis computation took substantial part of the entire algorithm. However, notice that the basis-computation algorithm (Algorithm 1) need not start with S = ∅ and works correctly for any initial collection of paths S. Therefore, as an optimization, we first compute the initial set of paths S using the original algorithm from [11], which computes the 2-barycentric spanner of the underlying DAG. Only then we proceed with the iterative algorithm to find a set of paths with the desired accuracy. Figure 4 shows the performance of the iterative algorithm on two benchmarks. The decreasing (blue) line shows how the accuracy k decreases with each path added to the basis. The increasing (red) line shows the time needed to find each path. The figure shows only the performance after the precomputation of the 2-barycentric spanner. Fig. 4: Performance of the Algorithm 1. The decreasing (blue) line shows the length of x computed (k) in line 3. The increasing (red) line shows the time taken to perform each iteration. (a) cctask k time(s) 0.9 12 0.8 10 0.7 8 0.6 6 0.5 4 0.4 2 10 time(s ) k 14 20 30 40 # paths 50 60 70 0.3 80 (b) irobot 11 10 k time(s) 1.4 1.2 9 8 1.0 k time(s ) 7 6 0.8 5 4 0.6 3 2 20 30 40 50 60 70 # paths 80 90 100 0.4 110 IV. E VALUATION A. Implementation The algorithm to identify the longest (up to accuracy k) path a given program P is shown in Algorithm 2. We now briefly describe the implementation of main stages of the Algorithm 2. Our implementation is build on top of [11]. See [11] for further discussion of technical details. CFG extraction The procedure begins by building the CFG G of the given program. The vertices correspond to locations and edges to individual statements. The extraction is build on top of CIL front end for C [14]. Note that all ILPs (Problems 2, 3 and 4) introduce a variable per each edge of G Extract CFG G from the program P S ← basis with accuracy at most k (Algorithm 1) D ← Solution of Problem 3 τ ← Solution of Problem 2 with paths S and D return τ and its estimated length Algorithm 2: Algorithm to find the worst-case execution time. Input: Program P , accuracy k and that each problem optimizes for the length of a source-tosink path. Thus, if some edge is always followed by another one (the in- and out-degree of the joining vertex is one) then the edges can be merged into a single one6 without changing the solution of the ILP problems. Therefore, we process G by merging edges that lie on a single path into a single edge. This reduces the number of variables used and improves the performance. Basis computation The basis is computed as described in Section III-D, Algorithm 1. We use Gurobi solver [15] to solve individual ILPs and use the 2-barycentric spanner as the initial set S. Solving the ILPs posed the main bottleneck of our approach. Input generation Each path through the CFG G corresponds to a sequence of operations in the program and hence a conjunction of statements. For a given path, we use the Z3 SMT solver [16] to find an input that corresponds to the given path or to prove that the path is infeasible and no corresponding input exists. In the experiments, SMT solving was fairly fast. Longest-path extraction We solve Problem 2 using Gurobi ILP solver [15]. P If the extracted path π is infeasible, we add a constraint ( e∈π be < |π|) eliminating the path from the solution and solve the new problem. Similarly, we solve for K longest paths; we add a constraint prohibiting the extracted path and solve the resulting ILP again, repeating until we successfully generate K feasible paths. Recall that the calculated length of the path is accurate only up to the precision 2k × D. Thus, we can repeat the process until the length of the extracted path is outside of the range for the longest extracted path. However, in practice we did not find this necessary and found the longest path after a few iterations. Path-Length Measurement To measure the execution time of the given program on a given input, we create a C program where we set the input to the given values and then run it using a cycle-accurate simulator of the PTARM processor [17]. B. Benchmarks We have evaluated our algorithm on several benchmarks and compared it with the algorithm in [11]. We used the same benchmarks as in [11] as well as benchmarks from control tasks from robotic and automotive settings. The benchmarks in [11] come from Mälardalen benchmark suite [18] and the 6 For example, in Figure 2, every diamond can be replaced by two edges, one edge for the top half and one edge for the bottom half. TABLE IV: Number of nodes, edges and paths in the CFGs extracted from the benchmarks Benchmark altitude stabilisation automotive cctask irobot sm # Nodes 36 64 88 102 170 452 # Edges 40 72 100 118 195 523 # Paths 11 216 506 657 8136 33, 755, 520 PapaBench suite [19]. The authors of [11] chose implementations of actual realtime systems (as opposed to hand-crafted ones) that have several paths, were of various sizes, but do not require automatic estimation of loop bounds. Since we assume all programs contain only bounded loops and no recursion, we preprocessed the programs by unrolling the loops and inlining the functions where necessary. Table IV summarizes properties of the benchmarks used. Table V shows the lengths of five longest paths as found by our algorithm and the one in [11]. The first half of the table shows the results as obtained by the algorithm in [11]. The second half shows the results as obtained (together with the “error bounds”) by our algorithm (Algorithm 2). Note that in each case the longest path returned by our algorithm is never shorter than the longest path found by [11]. In half of the cases, our algorithm is able to find a path longer than the one in [11]. Also notice that the actual measured length is always within the computed “error bounds”. The biggest benchmark, sm, is a collection of nested switchcase logic setting state variables but with minimal computations otherwise. Hence, there is a large number of paths (33, 755, 520) in the CFG yet, as expected, the computed D is small. V. C ONCLUSION In this paper, we have addressed the problem of estimating the worst-case timing of a program via systematic testing on the target platform. Our approach not only generates an estimate of worst-case timing, but can also produces test cases showing how that timing is exhibited on the platform. Our approach improves the accuracy of the previously published GameTime approach, while also providing error bounds on the estimate. Note that our approach can be adapted to produce timing estimates along arbitrary program paths. In order to do this, one can fix variables be in Problem 2 suitably. Thus, we can also estimate the longest execution of a given path that is consistent with the measurements. In the paper we have analyzed the timing behavior of a given program. However, instead of measuring cycles we can measure energy consumption of the program executions. The same techniques can then be applied to find the input consuming the most energy. In general, the approach presented in this paper can also be extended to other quantitative properties of the program and is not limited only to the WCETT analysis. R EFERENCES [1] Y.-T. S. Li and S. Malik, Performance Analysis of Real-Time Embedded Software. Kluwer Academic, 1999. [2] Reinhard Wilhelm et al., “The Determination of Worst-Case Execution Times—Overview of the Methods and Survey of Tools,” ACM Transactions on Embedded Computing Systems (TECS), 2007. [3] E. A. Lee and S. A. Seshia, Introduction to Embedded Systems: A CyberPhysical Systems Approach, first edition ed. http://leeseshia.org, 2011. [4] E. A. Lee, “Computing foundations and practice for cyber-physical systems: A preliminary report,” University of California at Berkeley, Tech. Rep. UCB/EECS-2007-72, May 2007. [5] R. Kirner and P. Puschner, “Obstacles in worst-case execution time analysis,” in ISORC, 2008, pp. 333–339. [6] NASA Engineering and Safety Center, “NASA report on Toyota unintended acceleration investigation, appendix a: Software,” http://www. nhtsa.gov/staticfiles/nvs/pdf/NASA FR Appendix A Software.pdf. [7] S. A. Seshia and A. Rakhlin, “Game-theoretic timing analysis,” in Proc. IEEE/ACM International Conference on Computer-Aided Design (ICCAD), 2008, pp. 575–582. [8] ——, “Quantitative analysis of systems using game-theoretic learning,” ACM Transactions on Embedded Computing Systems (TECS), 2012. [9] Y.-T. S. Li and S. Malik, “Performance analysis of embedded software using implicit path enumeration,” in Proceedings of the 32Nd Annual ACM/IEEE Design Automation Conference, ser. DAC ’95. New York, NY, USA: ACM, 1995, pp. 456–461. [Online]. Available: http://doi.acm.org/10.1145/217474.217570 [10] R. Wilhelm, “Determining bounds on execution times.” 2009. [11] S. A. Seshia and A. Rakhlin, “Game-theoretic timing analysis,” in Proceedings of the 2008 IEEE/ACM International Conference on Computer-Aided Design, ser. ICCAD ’08. Piscataway, NJ, USA: IEEE Press, 2008, pp. 575–582. [Online]. Available: http: //dl.acm.org/citation.cfm?id=1509456.1509584 [12] Z. Wasson, “Analyzing data-dependent timing and timing repeatability with gametime,” Master’s thesis, EECS Department, University of California, Berkeley, May 2014. [Online]. Available: http://www.eecs. berkeley.edu/Pubs/TechRpts/2014/EECS-2014-132.html [13] B. Awerbuch and R. D. Kleinberg, “Adaptive routing with end-toend feedback: Distributed learning and geometric approaches,” in Proceedings of the Thirty-sixth Annual ACM Symposium on Theory of Computing, ser. STOC ’04. New York, NY, USA: ACM, 2004, pp. 45– 53. [Online]. Available: http://doi.acm.org/10.1145/1007352.1007367 [14] George Necula et al., “CIL - infrastructure for C program analysis and transformation,” http://manju.cs.berkeley.edu/cil/. [15] I. Gurobi Optimization, “Gurobi optimizer reference manual,” 2015. [Online]. Available: http://www.gurobi.com [16] L. De Moura and N. Bjørner, “Z3: An efficient smt solver,” in Proceedings of the Theory and Practice of Software, 14th International Conference on Tools and Algorithms for the Construction and Analysis of Systems, ser. TACAS’08/ETAPS’08. Berlin, Heidelberg: Springer-Verlag, 2008, pp. 337–340. [Online]. Available: http://dl.acm. org/citation.cfm?id=1792734.1792766 [17] Center for Hybrid and Embedded Software, UC Berkeley, “The PTARM simulator,” http://chess.eecs.berkeley.edu/pret/. [18] Mälardalen WCET Research Group, “The Mälardalen benchmark suite,” http://www.mrtc.mdh.se/projects/wcet/benchmarks.html. [19] F. Nemer, H. Cass, P. Sainrat, J. paul Bahsoun, and M. D. Michiel, “Papabench: a free real-time benchmark,” in In WCET ?06, 2006. TABLE V: Comparison of the results produced by the algorithm presented in this paper and in [11] for generating the top five longest paths for a set of benchmarks. Column Predicted shows the length predicted by each algorithm. Column Measured show the running time measured when run on the corresponding input. For our paper, we give “error bounds” of the form k × D. The column Time shows the time it takes to generate the estimates and test cases. The largest measured value per each benchmark is shown in bold. Benchmark altitude stabilisation automotive cctask irobot sm GameTime [11] Predicted Measured Time(s) 867 867 789 789 776 751 11.7 659 763 581 581 4387 3697 4293 4036 4290 3516 26.4 4286 3242 4196 3612 13595 8106 11614 9902 11515 11515 47.0 11361 5010 11243 11138 991 808 972 605 943 852 29.4 936 848 924 821 1462 1430 1459 1463 1457 1418 50.9 1454 1451 1454 1463 2553 2550 2551 2550 2536 2537 211.0 2534 2537 2532 2537 Our Algorithm Predicted Measured 909 ± 1.0 × 57.0 867 815 ± 1.0 × 57.0 758 732 ± 1.0 × 57.0 789 719 ± 1.0 × 57.0 737 638 ± 1.0 × 57.0 581 4303 ± 2.0 × 343.0 3599 4302 ± 2.0 × 343.0 4046 4285 ± 2.0 × 343.0 3944 4284 ± 2.0 × 343.0 3516 4248 ± 2.0 × 343.0 3697 11824 ± 2.0 × 1116.0 10982 11696 ± 2.0 × 1116.0 10657 11424 ± 2.0 × 1116.0 10577 11338 ± 2.0 × 1116.0 11515 9830 ± 2.0 × 1116.0 9263 870 ± 2.0 × 73.0 861 869 ± 2.0 × 73.0 858 866 ± 2.0 × 73.0 897 865 ± 2.0 × 73.0 897 861 ± 2.0 × 73.0 873 1451 ± 2.0 × 37.0 1406 1450 ± 2.0 × 37.0 1411 1449 ± 2.0 × 37.0 1411 1448 ± 2.0 × 37.0 1411 1448 ± 2.0 × 37.0 1464 2552 ± 21.81 × 0.2 2550 2551 ± 21.81 × 0.2 2550 2536 ± 21.81 × 0.2 2537 2536 ± 21.81 × 0.2 2537 2531 ± 21.81 × 0.2 2537 Time(s) 14.4 77.2 93.8 138.4 269.0 3290.2
6cs.PL
COHOMOLOGY FOR FROBENIUS KERNELS OF SL2 arXiv:1209.1662v3 [math.RT] 11 Oct 2013 NHAM V. NGO Abstract. Let (SL2 )r be the r-th Frobenius kernels of the group scheme SL2 defined over an algebraically field of characteristic p > 0. In this paper we give for r ≥ 1 a complete description of the cohomology groups for (SL2 )r . We also prove that the reduced cohomology ring H• ((SL2 )r , k)red is Cohen-Macaulay. Geometrically, we show for each r ≥ 1 that the maximal ideal spectrum of the cohomology ring for (SL2 )r is homeomorphic to the fiber product G ×B ur . Finally, we adapt our calculations to obtain analogous results for the cohomology of higher Frobenius-Luzstig kernels of quantized enveloping algebras of type SL2 . 1. Introduction 1.1. In recent years, the cohomology and representation theory of Frobenius kernels has received considerable interest. It is well-known that the category of restricted representations for the Lie algebra of an algebraic group in characteristic p > 0 is equivalent to that of representations over the first Frobenius kernels of the algebraic group. This connection has inspired many investigations of the cohomology for the first Frobenius kernels of algebraic groups. For higher Frobenius kernels, the cohomology is of interest as it provides information about the original group scheme. For instance, let G be a simple, simply-connected algebraic group defined over an algebraically closed field k of characteristic p > 0. Denote by Gr the r-th Frobenius kernel of G. Then for each i ≥ 0, we can identify Hi (G, M ) with the inverse limit limr Hi (Gr , M ) [15, II.4.12]. In 2006, Bendel, Nakano, and ←− Pillen computed the first and second degree cohomology of the r-th Frobenius kernels of G [3],[4]. However, the state of affairs for higher degree cohomology remains an open problem in general. Via geometry, more is known about the cohomology of Frobenius kernels. It was first noticed for semisimple algebraic groups by Friedlander and Parshall that there is an isomorphism between the cohomology ring for G1 and the coordinate ring of the nilpotent cone of the Lie algebra g =Lie(G) [10]. A generalization was obtained for the higher Frobenius kernels by Suslin, Friedlander, and Bendel [19], [20]. They constructed a homeomorphism between the spectrum of the Gr -cohomology ring and the variety of r-tuples of commuting nilpotent elements in g. Moreover, in the case G = SL2 , Suslin, Friedlander, and Bendel explicitly computed the support varieties for the induced module and simple module of every dominant weight [20, Proposition 6.10]. On the subject of cohomology for finite groups, Benson and Carlson studied the algebraic structure of cohomology rings [7]. One of their major concerns is whether the cohomology ring of a finite group is Cohen-Macaulay. It is known that if E is an elementary abelian p-group, then the cohomology ring for E is Cohen-Macaulay [5, 5.18]. In this paper we are concerned with the same question applied to the cohomology of Frobenius kernels. Since the cohomology ring for the first Frobenius kernel of G is isomorphic to the coordinate ring of the nullcone, it is Cohen-Macaulay. Our proof in Section 7 establishes the Cohen-Macaulayness of the cohomology rings for the higher Frobenius kernels of SL2 . 1.2. Main results. The paper is organized as follows. We establish basic notation in Section 2. Then in Section 3, we derive explicit spectral sequences to compute the cohomology of Br from the spectral sequences stated in [15, I.9.14] and recall a strategy to calculate the cohomology of Gr . Date: March 16, 2018. 1 2 NHAM V. NGO Section 4 contains cohomology calculations for the subgroup schemes Ur , Br , and Gr of SL2 where B is a fixed Borel subgroup of G and U is its unipotent radical subgroup. The computation for cohomology of Gr provides a new proof of a result of van de Kallen concerning good filtrations on the cohomology groups Hn ((SL2 )r , H0 (λ)) with n ≥ 0 and an arbitrary dominant weight λ [21]. One will notice that the results in this section depend highly on the multiplicity of certain dominant weights. Hence, in the next section we introduce an algorithm that calculates the character multiplicity of a weight µ in H• (Br , λ), and hence the multiplicity of H0 (µ) in H• (Gr , H0 (λ)). In Appendix, we provide computer calculations showing that our algorithm is faster than the one encoded by using Ehrhart polynomial. We compute the rings H• (Br , k)red and H• (Gr , k)red in Section 6 in order to investigate their geometric structures. In the process, we develop several techniques to study reduced commutative rings. This computation shows that there is a homeomorphism between the spectra of the reduced Gr -cohomology ring and the ring of global sections on G ×B ur (cf. Proposition 6.2.4). This also plays a key role in showing that the reduced Br - and Gr -cohomology rings are Cohen-Macaulay (Section 7). This new result inspires us to state a conjecture on the Cohen-Macaulayness of the cohomology ring for the Frobenius kernels of an algebraic group. The last section is devoted to studying analogous results for the higher Frobenius-Lusztig kernels of quantum groups. These objects, which are analogs for the hyperalgebras of the higher Frobenius kernels of an algebraic group, were first defined by Drupieski in [9] in the context of quantized enveloping algebras defined over fields of positive characteristic. He verified various properties of the Frobenius-Lusztig kernels which are similar to the results obtained in the case of characteristic 0. 2. Notation 2.1. Representation theory. Let k be an algebraically closed field of characteristic p > 0. Let G be a simple, simply-connected algebraic group over k, defined and split over the prime field Fp . Denote by h the Coxeter number of G. Fix a maximal torus T of G, and denote by Φ the root system of T in G. Fix a set Π = {α1 , . . . , αn } of simple roots in Φ, and let Φ+ be the corresponding set of positive roots. Let B ⊂ G be the Borel subgroup of G containing T and corresponding to Φ+ , the set of positive roots, and let U ⊂ B be the unipotent radical of B. Let W be the Weyl group of Φ; it is generated by the set of simple reflections {sα : α ∈ Π}. Write ℓ : W → N for the standard length function on W , and let w0 ∈ W be the longest element. Let (·, ·) be the inner product associated with the Euclidean space E := ZΦ ⊗Z R. Given α ∈ Φ, let α∨ := 2α/(α, α) be the corresponding coroot. Set α0 to be the highest short root of Φ, and ρ ∨ to be one-halfP the sum of all positive roots in Φ. Then the Coxeter number of Φ is h P= (ρ, α0 ) + 1. Suppose λ = α∈Π mα α a weight in X, then the height of λ is defined as ht(λ) = α∈Π mα . Let X be the weight lattice of Φ, defined by the Z-span of the fundamental weights {ω1 , . . . , ωn }, and let X + ⊂ X be the set of dominant weights. Simple G-modules are indexed by λ ∈ X + , and denoted by L(λ). The simple module L(λ) can be identified with the socle of the induced module • ∗ H 0 (λ) = indG B − λ. Set g = Lie(G), the Lie algebra of G, b = Lie(B), u = Lie(U ). Denote by S (u ) • ∗ ∗ and Λ (u ) respectively the symmetric algebra and exterior algebra over u . Throughout this paper, the symbol ⊗ means the tensor product over the field k, unless otherwise stated. Suppose H is an algebraic group over k and M is a (rational) module of H. Denote by M H the submodule consisting of all the fixed points of M under the H-action. Let Y be a group scheme. Then for every positive integer r, the scheme Y (r) is defined by for each k-algebra A, Y (r) (A) = Y (A(−r) ) r where A(−r) is identified with A as a ring but the action of b ∈ k on A(−r) is the same as bp acting on A (see [15, I.9.2]). Now consider G as a group scheme. Then, for each r let Fr : G → G(r) be the r-th Frobenius morphism. The scheme-theoretic kernel Gr = ker(Fr ) is called the r-th Frobenius COHOMOLOGY FOR FROBENIUS KERNELS OF SL2 3 kernel of G. Given a closed subgroup (scheme) H of G, write Hr for the scheme-theoretic kernel of the restriction Fr : H → H (r) . In other words, we have Hr = H ∩ Gr . Given a rational G-module M , write M (r) for the module obtained by twisting the structure map for M by Fr . Note that Gr acts trivially on M (r) . Conversely, if N is a G-module on which Gr acts trivially, then there is a unique G-module M with N = M (r) . We denote the module M by N (−r) . r Now suppose R ⊆ S are finitely generated commutative k-algebras. Let Fr (S) = {sp | s ∈ S} for every r ≥ 1. If we have the following inclusions Fr (S) ⊆ R ⊆ S then the inclusion R ֒→ S induces the homeomorphism from Spec S onto Spec R, and we call this map an F -isomorphism [5, 5.4]. 2.2. Geometry. Let R be a commutative Noetherian ring with identity. We use Rred to denote the reduced ring R/ Nilrad R where Nilrad R is the radical ideal of 0 in R, which consists of all nilpotent elements of R. Let Spec R be the spectrum of all prime ideals of R. This set is a topological space under the Zariski topology. Let X be a variety. We denote by k[X] the algebra of regular functions defined on X. Note that when X is an affine variety, k[X] coincides with the coordinate algebra of X. Denote by N the nilpotent cone of g. There is an adjoint action of G on g which stablizes N . We call it the dot action and use “·” for the notation. For H a subgroup of G, suppose X, Y are H-varieties. Then the morphism f : X → Y is called H-equivariant if it is compatible with H-action. Given a G-variety V , it can be seen that B acts freely on G × V by setting b · (g, v) = (gb−1 , bv) for all b ∈ B, g ∈ G and v ∈ V . The notation G ×B V stands for the fiber bundle associated to the projection π : G ×B V → G/B with fiber V . Topologically, G ×B V is a quotient space of G × V in which the equivalence relation is given as (g, v) ∼ (g ′ , v ′ ) ⇔ (g′ , v ′ ) = b · (g, v) for some b ∈ B. In other words, each equivalence class of G ×B V represents a B-orbit in G × V . The map m : G ×B V → G · V defined by mapping [g, v] to g · v for all g ∈ G, v ∈ V is called the moment morphism. It is obviously surjective. Although G ×B V is not affine, we still denote by k[G ×B V ] the ring of global sections on this variety. It is sometimes useful to make the following identification: k[G ×B V ] ∼ = k[G × V ]B . Note also that Spec k[G ×B V ] = G ×B V . 3. Main tools In this section, we introduce some methods to compute Br and Gr -cohomology which will be applied later to obtain results on (SL2 )r -cohomology. For simplicity, we write S i and Λj instead of S i (u∗ ) and Λj (u∗ ). We start with the spectral sequences in [15, Proposition I.9.14]. Replacing g∗ by u∗ , we immediately get spectral sequences to compute cohomology of Ur with coefficients in a B-module M . The resulting spectral sequences can be written as follows: If p 6= 2, then M (1) E1i,j = M ⊗ S a1 (1) ⊗ · · · ⊗ S ar (r) ⊗ Λb1 ⊗ Λb2 (1) ⊗ · · · ⊗ Λbr (r−1) ⇒ Hi+j (Ur , M ) where the direct sum is taken over all ai ’s and bj ’s satisfying  i+j = P 2(a1 + · · · + ar ) + b1 + · · · + br (2) r n n−1 ). i = n=1 (an p + bn p If p = 2, then (3) E1i,j = M M ⊗ S a1 ⊗ · · · ⊗ S ar (r−1) ⇒ Hi+j (Ur , M ) 4 NHAM V. NGO where the direct sum is taken over all ai ’s satisfying  i+j = a 1 + · · · + ar P (4) r n−1 . i = n=1 an p These spectral sequences will play important roles in our calculations for cohomology in later sections. 3.1. Spectral sequence for Br -cohomology. We first prove an easy lemma related to Frobenius twist and untwist of a module. Lemma 3.1.1. Suppose M is a G-module. Then for j ≥ i ≥ 0 we have  Tj−i (i) (−i) Tj /Ti ∼ . M = M Proof. From [15, Proposition I.9.5], we can identify Tj /Tj with Tj−i via Fi . Then Tj−i acts on M by untwisting the morphism Fi , that is M (−i) . So instead of computing Tj /Ti -invariant of M , we calculate the Tj−i -invariant of M (−i) and then twist it back to the Tj -module structure; hence the isomorphism follows.  In order to set up an inductive proof, we now look at a simple case when r = 2 and p 6= 2. As B2 /U2 ∼ = T2 is diagonalisable, Corollary I.6.9 in [15] gives us Hi+j (U2 , M )T2 ∼ = Hi+j (B2 , M ). So applying the fixed point functor on both sides of the spectral sequence (1), we have T2 M M ⊗ S a1 (1) ⊗ S a2 (2) ⊗ Λb1 ⊗ Λb2 (1) ⇒ Hi+j (B2 , M ) where the direct sum is taken over all ai , bi ’s satisfying the condition (2). As S a2 (2) is T2 -invariant and S a1 (1) ⊗ Λb2 (1) is T1 -invariant, each direct summand on the left hand side is isomorphic to the following  T T2 /T1 T  a1 (1) b1 b2 (1) 1 a2 (2) a1 (1) b1 b2 (1) 2 ∼ a2 (2) ⊗Λ ⊗Λ S ⊗ M ⊗S ⊗Λ ⊗Λ ⊗ M ⊗S =S T2 /T1  ∼ = S a2 (2) ⊗ S a1 (1) ⊗ Λb2 (1) ⊗ (M ⊗ Λb1 )T1 " # i(−1) T1 (1) h ∼ S a1 ⊗ Λb2 ⊗ (M ⊗ Λb1 )T1 = S a2 (2) ⊗ where the last isomorphism is obtained from Lemma 3.1.1. This computation can be generalized for arbitrary r as follows. Theorem 3.1.2. There exists, for each B-module M , a spectral sequence converging to H• (Br , M ) as a B (r) -module with the following E1 -terms: If p 6= 2, then  T1 (r−1) " T1 #(−1) i(−1) h M   S ar (r) ⊗  (5) E1i,j = (M ⊗ Λb1 )T1 ⊗ S a1 ⊗ Λb2 ⊗ .. ⊗ Λbr   where the direct sum is taken over all ai , bj satisfying condition (2). If p = 2, then  !T1 (r−1) (−1)   M T  (−1) 1   E1i,j = ⊗ .. ⊗ S ar ⊗ S a2 (M ⊗ S a1 )T1 (6) where the direct sum is taken over all ai satisfying condition (4). COHOMOLOGY FOR FROBENIUS KERNELS OF SL2 5 Proof. We only give a proof for the case when p 6= 2 since that for the case p = 2 is very similar. First consider the spectral sequence for U1 -cohomology as follows: M M ⊗ S a1 (1) ⊗ Λb1 ⇒ Hn (U1 , M ) Taking T1 -invariant functor on both sides, we have M (M ⊗ S a1 (1) ⊗ Λb1 )T1 ⇒ (Hn (U1 , M ))T1 ∼ = Hn (B1 , M ) M S a1 (1) ⊗ (M ⊗ Λb1 )T1 ⇒ Hn (B1 , M ). This verifies the theorem for r = 1. Suppose it is true for r. Apply the invariant functor (−)Tr+1 on the Ur+1 -spectral sequence, we obtain Tr+1 M M ⊗ S a1 (1) ⊗ .. ⊗ S ar+1 (r+1) ⊗ Λb1 ⊗ .. ⊗ Λbr+1 (r) ⇒ Hi+j (Br+1 , M ) with ai , bj satisfying  i + j = 2(a1 + · · · + ar+1 ) + b1 + · · · + br+1 Pr+1 n n−1 ). i = n=1 (an p + bn p In order to complete our induction proof on r, we show that the E1 -page of this above spectral sequence can be rewritten in the form of (5). Indeed, using similar argument as for the case r = 2 earlier, we have the following isomorphisms for each direct summand of LHS. Tr+1 /Tr  T br+1 (r) a1 (1) ar (r) b1 br (r−1) r ar+1 (r+1) ⊗Λ ⊗ ··· ⊗ S ⊗ Λ ⊗ ··· ⊗ Λ S ⊗ M ⊗S ∼ =S ar+1 (r+1) ⊗  M ⊗S a1 (1) ⊗ ··· ⊗ S ar−1 (r−1) b1 br (r−1) ⊗ Λ ⊗ ··· ⊗ Λ Tr ⊗S ar (r) br+1 (r) ⊗Λ Tr+1 /Tr . By applying the inductive hypothesis on the Tr -invariant module in the bracket and Lemma 3.1.1, the last module is then isomorphic to the following.  Tr+1 /Tr T1 (r−1) " # (−1) T1 h i(−1)   ar (r) br+1 (r)  b1 T1 a1 b2 br    S ar+1 (r+1) ⊗  ⊗ S ⊗ Λ (M ⊗ Λ ) ⊗ S ⊗ Λ ⊗ .. ⊗ Λ      T1 (r) " T1 (−1) #(−1) h  T1 i(−1)     b1 T1 a1 b2 ∼   (M ⊗ Λ ) ⊗ S ⊗ Λ ⊗ S ar ⊗ Λbr+1  ⊗ .. ⊗ Λbr   = S ar+1 (r+1) ⊗     . This completes our proof.  3.2. Spectral sequence for Gr -cohomology. Recall form [15, II.12.2] that if Ri indG B M = 0 for all i > 0, then Gr -cohomology can be computed from the following spectral sequence m (−r) (−r) Rn indG ) ⇒ Hn+m (Gr , indG . B (H (Br , M ) B M) In particular, for any dominant weight λ ∈ X + , we always have m (−r) Rn indG ) ⇒ Hn+m (Gr , H0 (λ))(−r) . B (H (Br , λ) So our strategy is to compute Hm (Br , λ) first by Theorem 3.1.2, then use this spectral sequence to get Gr -cohomology of H0 (λ). 6 NHAM V. NGO 4. Cohomology We assume from now on that G = SL2 . Let α be the only simple root in the root system Φ of G. Denote ω the fundamental weight in the weight lattice X [12, 13.2]. Then we have ω = α2 . Note also that u is a one-dimensional vector space so we have the following T -module identifications on each degree of the exterior algebra   k if i = 0, i i ∗ Λ = Λ (u ) = α if i = 1,   0 otherwise. This section is organized by the value of p. More explicitly, the first three subsections is to deal with the cohomology of Ur , Br , and Gr in the case p 6= 2 while the last one is to provide results in the case p = 2. Although same methods are applied for both cases, their results are quite different. The author finds this organization is more convenient than listing 2 cases for each result of the section. Our overall goal is computing the cohomology Hn (Gr , H0 (λ)) for every dominant weight λ ∈ X + . Following the strategy in Subsection 3.2, we start with Ur -cohomology. We assume p 6= 2 for the first three subsections. 4.1. Cohomology of Ur . Proposition 4.1.1. Let λ be a dominant weight. For each r ≥ 1, there is a B-isomorphism M λ ⊗ S a1 (1) ⊗ · · · ⊗ S ar (r) ⊗ Λb1 ⊗ Λb2 (1) ⊗ · · · ⊗ Λbr (r−1) . Hn (Ur , λ) ∼ = n=2(a1 +···+ar )+b1 +···+br Proof. Recall from Section 3 that Ur -cohomology can be computed by the following spectral sequence M E1i,j = λ ⊗ S a1 (1) ⊗ · · · ⊗ S ar (r) ⊗ Λb1 ⊗ Λb2 (1) ⊗ · · · ⊗ Λbr (r−1) ⇒ Hi+j (Ur , λ) where the direct sum is taken over all tuplesP(a1 , . . . , ar , b1 , . . . , br ) ∈ Nr × {0, 1}r satisfying i + j = r n n−1 ). Observe that as a B-module, 2(a1 + . . . + ar ) + b1 + . . . + br and i = n=1 (an p + bn p S m = mα and Λ0 = k, Λ1 = α, and Λm = 0 for m > 1. Consider for each n > 0, we have i,j i+n,j−n+1 di,j where the B-module Eni,j has weight n : En → En λ + pa1 α + · · · + pr ar α + b1 α + · · · + pr−1 br α = λ + (pa1 + · · · + pr ar + b1 + · · · + pr−1 br )α = λ + iα. Likewise, Eni+n,j−n+1 is of weight λ + (i + n)α. As all the differentials respect to T -action, we must have λ + iα = λ + (i + n)α if the map is nonzero. This implies n = 0, and so di,j n = 0 for all i, j and n > 0. Hence the spectral sequence collapses at the first page. The result therefore follows.  When λ = 0, the isomorphism is also compatible with the ring structure. This computation was completely done by Andersen-Jantzen in [1, 2.4]. We recall their result as follows. Corollary 4.1.2. For each r ≥ 1, there is an isomorphism of B-algebras H• (Ur , k) ∼ = S •(1) ⊗ · · · ⊗ S •(r) ⊗ Λ• ⊗ · · · ⊗ Λ•(r−1) . Consequently, H• (Ur , k)red ∼ = S •(1) ⊗ · · · ⊗ S •(r) . Remark 4.1.3. Observe that U is isomorphic to Ga . Our method can be applied for V = Gna to obtain the same result as in [15, Proposition I.4.27(b)]. Our approach not only gives a shorter proof but also provides more information on the module structure of H• (Ur , k). It guarantees COHOMOLOGY FOR FROBENIUS KERNELS OF SL2 7 the isomorphism is compatible with the B-module action which will become handy in computing Gr -cohomology later. 4.2. Cohomology of Br . For later convenience, we identify S •(i) with the polynomial ring k[x](i) = k[xi ] where xi has weight pi α and degree 2. We also denote for each 1 ≤ i ≤ r by yi−1 the generator of the exterior algebra Λ(i) . In particular, we have S •(1) ⊗ · · · ⊗ S •(r) ⊗ Λ• ⊗ · · · ⊗ Λ•(r−1) = k[x1 , . . . , xr ] ⊗ Λ(y0 , . . . , yr−1 ). Now we make use of this notation to describe the Br -cohomology. Proposition 4.2.1. Suppose λ is a dominant weight in X + , i.e., λ = mω for some non-negative integer m. For each r ≥ 1, there is a B-isomorphism E MD br Hn (Br , λ)(−r) ∼ xa11 y0b1 xa22 y1b2 · · · xar r yr−1 = where the direct sum is taken over all ai , bj satisfying the following conditions   ai ∈ N and bi ∈ {0, 1} for all 1 ≤ i ≤ r (7) n = 2(a1 + · · · + ar ) + b1 + · · · + br  m r r + 2 + b1 + (a1 + b2 )p + · · · + ar p ∈ p X . Proof. It is observed that collapsing of the spectral sequence (1) implies the collapse of the one in Theorem 3.1.2. So Proposition 4.1.1 implies that  T1 (r−1) " #(−1)  T i(−1) h 1 M   Hn (Br , λ) ∼ S ar (r) ⊗  (M ⊗ Λb1 )T1 ⊗ .. ⊗ Λbr   ⊗ S a1 ⊗ Λb2 = where the direct sum is taken over all tuples (a1 , . . . , ar , b1 , . . . , br ) ∈ Nr × {0, 1}r satisfying n = 2(a1 + . . . + ar ) + b1 + . . . + br . Using the identifications earlier, we can explicitly write out the cohomology for Br as a decomposition of weight spaces E MD a b a b br x11 y01 x22 y12 · · · xar r yr−1 Hn (Br , λ)(−r) ∼ = where each monomial weights  λ+b1 α +(a p 1 +b2 )α p   ar α +  p +(a2 +b3 )α  + · · · + (ar−1 + br )α   ∈ X +.  p r r + This is equivalent to m 2 + b1 + (a1 + b2 )p + · · · + ar p ∈ p X . Now as U is an abelian group in this case, it trivially acts on both sides of the above isomorphism. Hence, this isomorphism is compatible with B-action via the identification B/U ∼  = T. Remark 4.2.2. For each tuple (a1 , . . . , ar , b1 , . . . , br ) ∈ Nr × {0, 1}r satisfying (9), there is γ = nω for some non-negative integer n such that n m + b1 + (a1 + b2 )p + · · · + (ar−1 + br )pr−1 + ar pr = pr . (8) 2 2 Let Nr (p, m, n) denote the number of solutions (a1 , . . . , ar , b1 , . . . , br ) ∈ Nr ×{0, 1}r for the equation. As a consequence, we establish our goal of this subsection. Theorem 4.2.3. Suppose λ = mω ∈ X + . Then there is a B-module isomorphism ∞ M H• (Br , λ)(−r) ∼ (nω)Nr (p,m,n) = n=0 8 NHAM V. NGO and so ch H• (Br , λ)(−r) = X Nr (p, m, n)e(nω). n∈N 4.3. Cohomology of Gr . We are now ready to compute Gr -cohomology. Theorem 4.3.1. Suppose λ = mω ∈ X + . Then there are G-module isomorphisms • (−r) ∼ H• (Gr , H0 (λ))(−r) ∼ )= = indG B (H (Br , λ) ∞ M Nr (p,m,n) indG . B (nω) n=0 where each Nr (p, m, n) is defined in Remark 4.2.2. In particular, if λ = 0, then the first isomorphism is compatible with the cup-products on both sides, i.e., it is an isomorphism of graded G-algebras. Proof. Recall the spectral sequence in Section 3.2, we have n (−r) E2m,n = Rm indG ) ⇒ Hn+m (Gr , H0 (λ))(−r) . B (H (Br , λ) Note that all weights of H• (Br , λ) are also weights of H• (Ur , λ) which are in turn weights of λ ⊗ S •(1) ⊗· · ·⊗S •(r) ⊗Λ• ⊗Λ•(1) ⊗· · ·⊗Λ•(r−1) by the spectral sequence (1). So all weights of Hn (Br , λ) n are dominant for each n ≥ 0. It follows from Kempf’s vanishing that Rm indG B (H (Br , λ)) = 0 for each n ≥ 0 and m > 0. Hence the spectral sequence collapses at the first page and we obtain   n (−r) . Hn (Gr , H0 (λ))(−r) ∼ = indG B H (Br , λ) This implies the first isomorphism in the theorem, that is, • (−r) H• (Gr , H0 (λ))(−r) ∼ ). = indG B (H (Br , λ) Moreover, by [1, Remark 3.2], this isomorphism respects the graded Hn (Gr , k)-module structure on both sides. Hence, in the case λ = 0 it is a graded G-algebra isomorphism. The other isomorphism follows by Theorem 4.2.3.  Remark 4.3.2. This theorem gives us an explicit good filtration of H• (Gr , H0 (λ))(−r) ; thus, showing the same property for each Hn (Gr , H0 (λ))(−r) with n ≥ 0, r ≥ 1. This result is similar to the one in [1, 4.5(1)] and [21, Corollary 2.2]. In fact, for arbitrary simple algebraic group G, it is conjectured that Hn (Gr , H0 (λ)) has a good filtration [15, 12.15]. Following Theorem 4.2.3, we immediately obtain the analogous result for Gr -cohomology. Corollary 4.3.3. Suppose λ = mω ∈ X + . Then we have X ch H• (Gr , H0 (λ))(−r) = Nr (p, m, n) ch H0 (nω). n∈N 4.4. The case p = 2. The results in this subsection are analogs of those in previous subsections. Most of proofs will be omitted. Proposition 4.4.1. Let λ be a dominant weight. For each r ≥ 1, there is a B-isomorphism M λ ⊗ S a1 ⊗ S a2 (1) · · · ⊗ S ar (r−1) . Hn (Ur , λ) ∼ = n=a1 +···+ar Consequently, there is an isomorphism of B-algebras H• (Ur , k) ∼ = S • ⊗ S •(1) ⊗ · · · ⊗ S •(r−1) . Proof. Same argument as in the proof of Proposition 4.1.1 is applied for the spectral sequence 3.  COHOMOLOGY FOR FROBENIUS KERNELS OF SL2 9 Proposition 4.4.2. Suppose λ is a dominant weight in X + , i.e., λ = mω for some non-negative integer m. For each r ≥ 1, there is a B-isomorphism M hxa1 xa2 · · · xar i Hn (Br , λ)(−r) ∼ = 1 2 r where the direct sum is taken over all ai satisfying the following conditions   ai ∈ N for all 1 ≤ i ≤ r (9) n = a1 + · · · + ar   m + 2a1 + 4a2 + · · · + 2r ar ∈ 2r X + . Proof. Same argument as in the proof of Proposition 4.2.1 is applied for the spectral sequence 6.  Theorem 4.4.3. Suppose λ = mω ∈ X + . Then there are G-module isomorphisms ∞ M Nr (2,m,n) • 0 (−r) ∼ G • (−r) ∼ H (Gr , H (λ)) )= indG . = indB (H (Br , λ) B (nω) where Nr (2, m, n) is the number of r-tuples (a1 , . . . , ar ) ∈ r n=0 Nr satisfying the equation r m + 2a1 + 4a2 + · · · + 2 ar = 2 n. In particular, if λ = 0, then the first isomorphism is compatible with the cup-products on both sides, i.e., it is an isomorphism of graded G-algebras. 5. An algorithm to compute Nr (p, m, n) 5.1. Results in the preceding section indicate that the number Nr (p, m, n) plays an important role in the cohomology of Br and Gr . It is closely related to the problem of counting integral lattice points in a polytope. In particular, let Pr be a polytope in Rr determined by the following equations:  m r−1 + x pr = n pr ,  r  2 + y1 + (x1 + y2 )p + · · · + (xr−1 + yr )p 2 0 ≤ xi ≤ n2 pr for each 1 ≤ i ≤ r,   0 ≤ yi ≤ 1 for each 1 ≤ i ≤ r. Then for p 6= 2 and m, n ≥ 0 we have Nr (p, m, n) = |Pr ∩ Zr | for each r ≥ 1. So one can use Barvinok’s algorithm to compute the right-hand side. However, this algorithm is getting slow when r is big due to many complicated subalgorithms and computations involving Complex Analysis. Barvinok actually proved that the algorithm terminates after a polynomial time for a fixed dimension depending on the data for vertices of the polytope (see [2] for further details). 5.2. In this subsection, we sketch an alternative program to calculate the number Nr (p, m, n) with given non-negative integers m, n; r ≥ 2 and a prime p > 2. We start with an algorithm to compute the number of solutions (c1 , ..., cr ) satisfying the equation (10) npr = (c1 + d1 )p + ... + (cr + dr )pr with given nonnegative integer di for each i. Define recursively a family of functions Ni : pi N → N as follow: • Ni (0) = 1 for each 1 ≤ i ≤  r 0 if d1 > n • For each n ∈ N, N1 (np) = 1 otherwise  0 if d2 > n 2 • For each n ∈ N, N2 (np ) = n−d2 2 Σj=0 N1 (jp ) otherwise ( 0 if di+1 > n • For each n ∈ N, Ni+1 (npi+1 ) = n−di+1 i+1 Σj=0 Ni (jp ) otherwise 10 NHAM V. NGO Theorem 5.2.1. For each n ∈ N, the number of solutions of equation (10) is Nr (npr ). Proof. We prove by induction on r. It is trivial for r = 1. Suppose it is true for r − 1. From equation (10), we have n − dr + 1 choices for cr ∈ {dr , dr + 1, .., n}. For each cr = i, the number of solutions is Nr−1 (npr − ipr ) = Nr−1 [p(n − i)pr−1 ]. Summing all the terms and using the recursive formula, we get the total number of solutions Nr (npr ).  Now the algorithm consists of following steps: • If m is even and n is odd, or if m is odd and n is even then the function returns 0. n ′ • If both m, n are even, then let m′ = m 2 and n = 2 . The equation 8 hence becomes (11) m′ + b1 + (a1 + b2 )p + ... + (ar−1 + br )pr−1 + ar pr = n′ pr . (a) Write m′ into base p-expansion. Suppose m′ = d0 + d1 p + ... + dh ph for some h ∈ N. Note that if b1 + m′ > n′ pr then, of course, Nr (p, m, n) = 0. (b) For each r-tuple (b1 , ..., br ) ∈ {0, 1}r , we use previous theorem to compute number Nr (m′ , n′ , b1 , ..., br ) of solutions for d0 + b1 + (a1 + d1 + b2 )p + ... + (ar−1 + dr−1 + br )pr−1 + (ar + dr )pr = (n′ − dr+1 p − ... − dh ph−r )pr . (c) We have Nr (p, m, n) = Σb1 ,..,br Nr (m′ , n′ , b1 , ..., br ). • If both m and n are odd, then repeat Step 2 with m′ = m+1 2 and n′ = n+pr 2 . Remark 5.2.2. This algorithm was coded and compared with the one coded by applying Erhart’s theory. The tables in Appendix 9 shows that our program runs faster than the other. 6. Reduced rings and geometry 6.1. Reduced Br -cohomology ring. In Theorem 4.2.3, we computed H• (Br , k) as a B-module. Describing its ring structure, however, is extremely hard for big r (see [1]). By looking at the reduced part, we can compute H• (Br , k) as a finitely generated H• (Ur , k)red -module. We first need the following observation. Lemma 6.1.1. Given any T -algebra M , there is an isomorphism (M Tr )red ∼ = (Mred )Tr . Proof. Note that Mred = M/ Nilrad M , we consider the short exact sequence 0 → Nilrad M → M → Mred → 0. As Tr is diagonalisable, (−)Tr is exact, so we obtain that 0 → (Nilrad M )Tr → (M )Tr → (Mred )Tr → 0. On the other hand, we know that (M Tr )red = M Tr / Nilrad (M Tr ). So we just need to check that (Nilrad M )Tr = Nilrad (M Tr ) which is true since both equal to Nilrad (M ) ∩ M Tr .  From Corollary 4.1.2 (respectively Proposition 4.4.1 in the case p = 2), we can identify H• (Ur , k)red with the polynomial algebra k[x1 , . . . , xr ] where each xi is of weight pi α (respectively pi−1 α). The preceding lemma and Corollary 4.1.2 imply that  T H• (Br , k)red ∼ = H• (Ur , k)Tr red ∼ = (H• (Ur , k)red ) r Tr  ∼ = S •(1) ⊗ · · · ⊗ S •(r) T ∼ = (k[x1 , . . . , xr ]) r . As a B-module, this reduced cohomology ring can be represented in terms of monomials as follows. COHOMOLOGY FOR FROBENIUS KERNELS OF SL2 11 Theorem 6.1.2. For r ≥ 1, there is a B (r) -module isomorphism M hxa11 , xa22 , . . . , xar r i (12) H• (Br , k)red ∼ = where the ai are non-negative integers satisfying (13) a1 + a2 p + · · · + ar pr−1 = npr−1 r−1 r−2 for some n ∈ N. Furthermore, let R = k[x1p , x2p , . . . , xr ], then the reduced ring H• (Br , k)red is ar−1 a finitely free R-module with the basis Br = {xa11 , xa22 , . . . , xr−1 } where for each i = 1, . . . , r − 1, 0 ≤ ai < pr−i and satifies the equation (13). Proof. The right-hand side is obtained by setting m = b1 = b2 = · · · = br = 0 in the Proposition 4.2.1 (respectively setting m = 0 in Proposition 4.4.2). Now observe that every tuple (m1 pr−1 , m2 pr−2 , . . . , mr ) with mi a non-negative integer is a solution for (13). It follows that H• (Br , k)red contains R as a subring. Moreover, it can be verified that every monomial in the right-hand side of the isomorphism (12) is uniquely written as a product of an element in R and a monomial in Br . The fact that Br is finite completes our proof.  Corollary 6.1.3. For each r ≥ 1, there is a homeomorphism from Spec k[x1 , . . . , xr ](r) onto Spec H• (Br , k)red . Proof. We recall the r-th Frobenius homomorphism of rings F : k[x1 , . . . , xr ](r) → k[x1 , . . . , xr ] F(f ) 7−→ f p r for all f ∈ k[x1 , . . . , xr ]. Observe that H• (Br , k)red ⊆ k[x1 , . . . , xr ](r) r r are finitely generated commutative algebras. Note further that Im F = k[xp1 , . . . , xpr ] lies in the r−1 r−2 ring R = k[xp1 , x2p , . . . , xr ]; hence is a subalgebra of H• (Br , k)red . The inclusions Im F ⊆ H• (Br , k)red ⊆ k[x1 , . . . , xr ](r) implies that the morphism i : Spec k[x1 , . . . , xr ](r) → Spec H• (Br , k)red is an F -isomorphism. Hence, it is a homeomorphism.  Remark 6.1.4. One can easily construct an example where this morphism is not an isomorphism. For instance, when p 6= 2, from the computation of Andersen and Jantzen [1, 2.4] we have Spec H• (B2 , k)red = Spec k[xp1 , x2 ] which is obviously not isomorphic to Spec k[x1 , x2 ] as there is no degree one morphism from one to the other. 6.2. Reduced Gr -cohomology ring. We first develop some techniques to compute reduced rings in general context. Lemma 6.2.1. Let k be a perfect field. Suppose G is a split reductive group over k and let M be a k-algebra. Then we have Nilrad(k[G] ⊗ M ) = k[G] ⊗ Nilrad M . Proof. Consider the short exact sequence 0 → Nilrad M → M → Mred → 0. As G is reductive, the coordinate algebra k[G] is free over k [15, II.1.1]. So we have the following sequence 0 → k[G] ⊗ Nilrad M → k[G] ⊗ M → k[G] ⊗ Mred → 0 12 NHAM V. NGO is exact. It follows that k[G] ⊗ Mred ∼ = k[G] ⊗ M . k[G] ⊗ Nilrad M On the other hand, since k[G] is reduced, it is well-known that the ring k[G] ⊗ Mred is reduced when k is perfect. This implies that k[G] ⊗ Nilrad M = Nilrad (k[G] ⊗ M ).  Lemma 6.2.2. Suppose the same assumptions on k and G as in Lemma 6.2.1. Given a B-algebra M suppose that all weights of Nilrad M are dominant. Then, as an algebra, we always have  and  G ∼ indG M ind = B B (Mred ). red   B Proof. We first show that (k[G] ⊗ M )B red ∼ = [(k[G] ⊗ M )red ] . Let A = k[G] ⊗ M . Then we need   B A AB ∼ . This is equivalent to showing that the to prove (AB )red ∼ = (Ared )B , i.e., Nilrad(A B) = Nilrad(A) following sequence 0 → Nilrad(A)B → AB → (Ared )B is right exact; hence equivalent to H1 (B, Nilrad(A)) = 0. Indeed, the preceding lemma shows that Nilrad(A) = Nilrad(k[G] ⊗ M ) = k[G] ⊗ Nilrad(M ). It follows by [15, Proposition I.4.10] and Kempf’s vanishing that H1 (B, Nilrad(A)) = H1 (B, k[G] ⊗ Nilrad(M )) ∼ = R1 indG B (Nilrad(M )) = 0 since all weights of Nilrad M are dominant. Finally, we have    B ∼ indG B M red = (k[G] ⊗ M ) red ∼ [(k[G] ⊗ M )red ]B = ∼ = [k[G] ⊗ Mred ]B = indG B (Mred ).  Now we are back to the assumption G = SL2 . The following result provides a link between the reduced parts of Br - and of Gr -cohomology. Theorem 6.2.3. For each r ≥ 1, there is a G-isomorphism (−r) (−r) • H• (Gr , k)red ∼ = indG B H (Br , k)red . Proof. It immediately follows from Theorem 4.3.1 and the lemma above.  Proposition 6.2.4. For each r ≥ 1, there is a homeomorphism from Spec k[G ×B ur ] onto Spec H• (Gr , k)red . Proof. Let u(1) × · · · × u(r) = Spec k[x1 , . . . , xr ] where each u(i) is identified with the weight space kpi α ; hence we consider it as an affine space equipped with the B-action. In Corollary 6.1.3, we can see that the F -isomorphism i arises from the inclusion H• (Br , k)red ⊆ k[x1 , . . . , xr ](r) , so it is compatible with the B-action. It follows the B-equivariant homeomorphism (−r) i(−r) : u(1) × · · · × u(r) → Spec H• (Br , k)red . Apply the fibered product with G over B on both sides, we have a homeomorphism   (−r) idG ×B i(−r) : G ×B u(1) × · · · × u(r) → G ×B Spec H• (Br , k)red . COHOMOLOGY FOR FROBENIUS KERNELS OF SL2 13 On the other hand, define a map: Φ : ur → u(1) × · · · × u(r) 2 r (y1 , y2 , . . . , yr ) 7→ (y1p , y2p , . . . , yrp ) for all yi ∈ u. It is easy to see that Φ is a B-equivariant continuous map which is also a homeomorphism. It follows that the fibered products G ×B u(1) × · · · × u(r) and G ×B ur are homeomorphic as a topological space. Now combine two above homeomorphisms and apply Theorem 6.2.3, we establish a homeomorphism from Spec k[G ×B ur ] onto Spec H• (Gr , k)red ; hence completes our proof.  7. Cohen-Macaulay Cohomology ring It is known that there are many classes of groups for which the cohomology is Cohen-Macaulay [6]. Our calculations in this section provide an evidence for the conjecture that simple algebraic groups also have Cohen-Macaulay cohomology. In particular, we show that the reduced rings H• (Br , k)red and H• (Gr , k)red are Cohen-Macaulay. These results are true for any characteristic p > 0, but we only present the proofs in the case p 6= 2. As the strategy is the same for the other case, we leave technical detail for readers. 7.1. First we restate some facts in [14]. Lemma 7.1.1. Suppose λ ∈ ZΦ. Then for each n ∈ Z there is an G-isomorphism indG (S n (u∗ ) ⊗ λ) ∼ = k[G ×B u](2n+2ht(λ)) . B n ∗ B Moreover, the algebra indG B (S (u ) ⊗ λ) is k[G × u] shifted by the degree 2ht(λ). Proof. This is a consequence of Proposition 8.22 in [14]. Note that since λ ∈ ZΦ, we have λ̄ = 0. Then replace k[Ô, 0] = k[O] by k[G ×B u] in the formula in page 111.   • ∗(1) × · · · × u∗(r) ) ⊗ λ is isomorphic to Lemma 7.1.2. For each λ ∈ ZΦ, the algebra indG B S (u G • ∗(1) ∗(r) indB S (u × · · · × u ) with the degree shifted by 2ht(λ). Proof. We employ the algebra map in the previous lemma. In particular, for each degree n, we first consider     M a1 ∗(1) n ∗(1) ) ⊗ · · · ⊗ S ar (u∗(r) ) ⊗ λ indG × · · · × u∗(r) ) ⊗ λ = indG B S (u B S (u a1 +···+ar =n ∼ = M r indG B ((a1 p + · · · + ar p )α + λ) a1 +···+ar =n = M a1 +···+ar =n ∼ = M   (a1 p+···+ar pr ) ∗ S (u ) ⊗ λ indG B k[G ×B u]2(a1 p+···+ar pr )+2ht(λ) . a1 +···+ar =n Now if λ = 0 in this observation, we obtain for each n that   M n ∗(1) × · · · × u∗(r) ) ∼ k[G ×B u]2(a1 p+···+ar pr ) . indG = B S (u a1 +···+ar =n This implies our proof. Consequently, the two algebras in the lemma are isomorphic (without the grading).   • ∗(1) × · · · × u∗(r) ) is Cohen-Macaulay. Lemma 7.1.3. The ring R = indG B S (u 14 NHAM V. NGO Proof. It is not hard to see that k[ur ] is a free k[u∗(1) × · · · × u∗(r) ]-module. As the induction functor preserves direct sums, we have k[G ×B ur ] is a free R-module. Hence there is a flat homomorphism of R-modules R ֒→ k[G ×B ur ] By [17, Theorem 5.2.7 - 5.4.1], we obtain that the ring k[G ×B ur ] is Cohen-Macaulay. As the flatness is locally preserved, Proposition 2.6(d) in [13] implies that the Cohen-Macaulayness of R follows from that of k[G ×B ur ].  We can now establish the goal of this section. Theorem 7.1.4. Both rings H• (Br , k)red and H• (Gr , k)red are Cohen-Macaulay. Proof. Note that H• (Br , k)red = k[u(1) × · · · × u(r) ]Tr , an invariant of a regular domain by a finite group scheme Tr . So it is Cohen-Macaulay by a famous result of Hochster and Roberts [11]. Next by Theorem 6.2.3, we have the decomposition of R-modules • H• (Gr , k)red ∼ = indG B H (Br , k)red M ∼ indG = B (xλ ⊗ k[x1 , . . . , xr ]) . xλ ∈Br • In other words, the ring H (Gr , k)red is a free R-module. By the previous lemma, R is CohenMacaulay, so is H• (Gr , k)red .  7.2. Open questions. The results above imply many open questions involving the properties in commutative algebra like Cohen-Macaulayness for the objects in representation theory as follows. Conjecture 7.2.1. Suppose R is a B-algebra. If R is Cohen-Macaulay, then so is indG B R. Conjecture 7.2.2. Let G be a simple algebraic group defined over an algebraically closed field k of characteristic p, a good prime for G. Then both H• (Br , k)red and H• (Gr , k)red are Cohen-Macaulay. Evidently, if r = 1 then the results of Andersen and Jantzen [1], Friedlander and Parshall [10] show that H• (Br , k)red ∼ = S • (u∗ ) is regular and H• (Gr , k)red ∼ = k[N ] is Cohen-Macaulay. Although our computation supports the conjecture in the case G = SL2 for arbitrary r, it is a difficult problem as very little appears to be known about cohomology of higher Frobenius kernels. 8. Quantum calculations In this section, we apply our methods to compute cohomology for the Frobenius–Lusztig kernels of quantum groups defined in [9]. We first recall the definitions as follows. (Details can be found in [9, 2.1-2.2].) 8.1. Notation and Construction. We basically recover the material in [9, Section 2.1] in the case g = sl2 . Let k be a field of characteristic p 6= 2. Let ℓ be an odd positive integer not divisible by p. Denote by Φ = {α, −α} the root system of sl2 . Let q be an indeterminate and let Uq be the quantized enveloping algebra associated to sl2 , which is the Q(q)-algebra defined by the generators E, F, K, K −1 and satisfying the relations KK −1 = 1 = K −1 K, KEK −1 = q 2 E, KF K −1 = q −2 F, EF − F E = K − K −1 . q − q −1 COHOMOLOGY FOR FROBENIUS KERNELS OF SL2 15 Set A = Z[q, q −1 ]. For given integer i, set [i] = q i − q −i , q − q −1 then denote [i]! = [i][i − 1] . . . [1]. Note that [0]! = 1 as a convention. Suppose m is a positive integer and n is an integer, we write   [n][n − 1] . . . [n − m + 1] n = m [1][2] . . . [m]   n where = 1. Next, for each m ≥ 0, we define the m-th divided powers as follows: 0 E (m) = Em [m]! , F (m) = Fm . [m]! Now the Lusztig A-form quantized enveloping algebra UA is defined as the A-subalgebra of Uq generated by {E (n) , F (n) , K ±1 : n ∈ N}. Fix ζ ∈ k a primitive ℓ-th root of unity in k. We consider k as A-algebra by the homomorphism Z[q, q −1 ] → k mapping q 7→ ζ. Let Uζ = hK ℓ Uk ⊗ 1 − 1 ⊗ 1i where Uk = UA ⊗A k. Denote by uk the Hopf subalgebra of Uk generated by {E, F, K}. Let uζ be the image of uk in Uζ , and call it the small quantum group. For each r ≥ 1, we define Uζ (Gr ) to be the subalgebra of Uζ generated by i i {E, E (p ℓ) , F, F (p ℓ) , K : 0 ≤ i ≤ r − 1}, and call it the r-th Frobenius-Lusztig kernel of Uζ . Note that if p = 0 then we obtain for every r ≥ 1 that Uζ (Gr ) = uζ . We also define for each r ≥ 1 D E i Uζ (Br ) = Uζ (B) ∩ Uζ (Gr ) = E, E (p ℓ) , K : 0 ≤ i ≤ r − 1 , D E (pi ℓ) Uζ (Ur ) = Uζ (U ) ∩ Uζ (Gr ) = E, E : 0≤i≤r−1 . Let G = SL2 , a group scheme defined over k. Let Dist(G) be the algebra of distributions on G. It is known that there is an isomorphism of Hopf algebras between Uζ //uζ and Dist(G). The quotient map Fζ : Uζ → Dist(G) is the quantum analog of the Frobenius homomorphism. Note that the restriction Fζ : Uζ (Tr ) → Dist(Tr ) for each r ≥ 1 induces an isomorphism Uζ (Tr )//u0ζ ∼ = Dist(Tr ). 8.2. Cohomology of Uζ (Ur ). It is observed that for each r ≥ 1, Uζ (Ur ) is a normal subalgebra of Uζ (Br ). There is a right adjoint action of Uζ0 on Uζ (Br ) such that Uζ (Ur ) is a Uζ0 -submodule of Uζ (Br ). Then from [9, Theorem 4.3.1], the cohomology H• (Uζ (Ur ), k) is a left Uζ0 -module. Before computing this module stucture, we need to revise some notation in Section 2. Let S • (x0 , . . . , xr ) be the symmetric algebra over x0 , . . . , xr of degree 2. Then this symmetric algebra can be considered as a Uζ0 -module by assigning weight pi ℓα to xi for each 0 ≤ i ≤ r. Let Λ• (y0 , . . . , yr ) be the exterior algebra generated by y0 , . . . , yr of degree 1. By assigning weight α to y0 and weight pi−1 ℓα to yi for all 1 ≤ i ≤ r, we obtain the Uζ0 -module structure of Λ• (y0 , . . . , yr ). Now we compute the cohomology of Uζ (Ur ) as follows. Theorem 8.2.1. For each r ≥ 1, there is an isomorphism of Uζ0 -algebras H• (Uζ (Ur ), k) ∼ = S • (x0 , . . . , xr ) ⊗ Λ• (y0 , . . . , yr ). 16 NHAM V. NGO Proof. Note that Uζ (Ur ) is in this case the same as grUζ (Ur ), the associated graded algebra of (pi ℓ) Uζ (Ur ). According to [9], it is a k-algebra generated by Eα and Eα for all 1 ≤ i ≤ r − 1, subject to the relations (6.1.2), (6.1.3), and (6.1.4) in [9] applied with Φ+ = {α}. Hence, by Theorem 4.1 and Remark 4.2 in [16], we obtain the isomorphism as desired.  Remark 8.2.2. This result is a special case of [9, Proposition 6.2.2] in which Drupieski computed the cohomology of grUζ (Ur ) in a more general context. 8.3. Cohomology of Uζ (Br ). Since Uζ (Br )//Uζ (Ur ) ∼ = Uζ (Tr ), for each r ≥ 1, there exists a Lyndon-Hochschild-Serre spectral sequence E2i,j = Hi (Uζ (Tr ), Hj (Uζ (Ur ), k)) ⇒ Hi+j (Uζ (Br ), k). As Uζ (Tr ) is a semisimple Hopf algebra, the spectral sequence collapses at the second page and then we obtain the following algebra isomorphism H• (Uζ (Br ), k)) ∼ = H0 (Uζ (Tr ), H• (Uζ (Ur ), k)) = H• (Uζ (Ur ), k)Uζ (Tr ) . Note that the Uζ0 -module stucture is preserved via this isomorphism. From Theorem 8.2.1, first taking the u0ζ -invariant of H• (Uζ (Ur ), k), we have 0 u0 H• (Uζ (Ur ), k)uζ ∼ = (Λ• (y0 )) ζ ⊗ S • (x0 , . . . , xr ) ⊗ Λ• (y1 , . . . , yr ) = S • (x0 , . . . , xr ) ⊗ Λ• (y1 , . . . , yr ) 0 since Λ• (y0 )uζ = Λ• (y0ℓ ) = k. Note also that each generator’s weight in Λ• is divided by ℓ under the Frobenius homomorphism. These results can be enclosed in computing the Uζ (Tr )-invariant of Uζ (Ur )-cohomology as follows. Uζ (Tr )//u0  ζ u0 H• (Uζ (Ur ), k)Uζ (Tr ) ∼ = H• (Uζ (Ur ), k) ζ U (Tr )//u0 ζ ∼ = S • (x0 , . . . , xr ) ⊗ Λ•ζ (y1 , . . . , yr ) ζ Dist(Tr ) ∼ = S • (x′0 , x′1 , . . . , x′r ) ⊗ Λ• (y1′ , . . . , yr′ ) ′ ) is of weight pi α for all 0 ≤ i ≤ r. Now we can use where x′0 is of weight α, and each x′i (or yi+1 an analogous argument as in Subsection 4.2 to compute the Uζ (Br )-cohomology. Theorem 8.3.1. For each r ≥ 1, there is an isomorphism of T -modules M ′ H• (Uζ (Br ), k)(−r) ∼ (nα)Nr (p,n) = n∈N where Nr′ (p, n) is the number of solutions (a0 , . . . , ar , b1 , . . . , br ) ∈ Nr+1 × {0, 1}r for the equation (a0 + b1 ) + p(a1 + b2 ) + · · · + pr−1 (ar−1 + br ) + pr ar = n r p . 2 Remark 8.3.2. Comparing with the equation (8) in Section 4, we have Nr′ (p, n) = ∞ X Nr (p, m, n). m=0 It is also observed that Nr (p, m, n) = 0 when m > npr so the sum above is well-defined and Nr′ (p, n) is finite. COHOMOLOGY FOR FROBENIUS KERNELS OF SL2 17 8.4. Cohomology of Uζ (Gr ). We first need to develop a spectral sequence which is similar to the one in Subsection 3.2. U Lemma 8.4.1. Let M be a Uζ (B)-module such that Ri indUζζ (B) M = 0 for each i ≥ 1. Then there is for each r ≥ 1 a spectral sequence of G-modules (−r)  U j (−r) Ri indG ⇒ Hi+j (Uζ (Gr ), indUζζ (B) M ) . B H (Uζ (Br ), M ) Proof. Note that the category of rational B-modules (resp. G-modules) is equivalent to the category of integrable Dist(B)-modules (resp. locally finite Dist(G)-modules) [8, 6.9, 9.4]. Identifying Dist(H) with Uζ (H)//uζ via the restriction of Frobenius homomorphism Fζ where H is G, B, Gr , or Br . Let Uζ (Br )(−r) F1 (−) = indG , B (−) ◦ (−) U F2 (−) = (−)Uζ (Gr )(−r) ◦ indUζζ (B) (−) being functors from the category of Uζ (B)-modules to the category of rational G-modules. From [15, Proposition I.4.1], we have the following spectral sequences (14) j (−r) Ri indG ⇒ Ri+j F1 (M ), B H (Uζ (Br ), M ) (15) Hi (Uζ (Gr ), Rj indUζζ (B) M )(−r) ⇒ Ri+j F2 (M ). U On the other hand, we consider Uζ (Br ) (−r) ∼ uζ (B) Uζ (Br )//uζ (B)(−r) ∼ uζ (B) Br (−r) indG ) ) ) = indG = indG B (M B (M B (M  uζ (B) Gr (−r) by [1, 3.1]. In addition, we have which is isomorphic to the functor indG BM Uζ (Gr )//uζ  Gr   G uζ (B) uζ (B) ∼ ind M indG M = B B h uζ iUζ (Gr )//uζ U ∼ = indUζζ (B) M Uζ (Gr )  U ∼ = indUζζ (B) M where the second isomorphism is because of Theorem 5.1.1 in [9]. In summary, the two functors F1 and F2 are naturally isomorphic. Hence, the spectral sequences (14), (15) converge to the same U abutment. Since Ri indUζζ (B) M = 0 for each i ≥ 1, the second spectral sequence collapses and then gives us the desired spectral sequence.  Remark 8.4.2. As the isomorphism between F1 and F2 respects the cup-products, similar argument as in [1, Remark 3.2] shows that the spectral sequence in the lemma above is compatible with the H• (Uζ (Gr ), k)-module structure. Now we can compute the cohomology of Uζ (Gr ). Theorem 8.4.3. There are for each r ≥ 1 G-module isomorphisms M ′ indG (nα)Nr (p,n) H• (Uζ (Gr ), k)(−r) ∼ = indG H• (Uζ (Br ), k)(−r) ∼ = B B n∈N in which the first isomorphism is of graded k-algebras. U Proof. Note first that Ri indUζζ (B) k = 0 for all i ≥ 1 by the quantum version of Kempf’s Vanishing Theorem [18, Theorem 5.5]. The preceding lemma implies the following spectral sequence U j (−r) Ri indG ⇒ Hi+j (Uζ (Gr ), indUζζ (B) k)(−r) . B H (Uζ (Br ), k) 18 NHAM V. NGO On the other hand, Theorem 8.3.1 shows that Hj (Uζ (Br ), k)(−r) is decomposed into dominant weight spaces for each j ≥ 0. Hence, we have j (−r) Ri indG =0 B H (Uζ (Br ), k) for all i > 0, which implies the collapse of the spectral sequence so that we have for each j ≥ 0 j (−r) ∼ j indG = H (Uζ (Gr ), k)(−r) B H (Uζ (Br ), k) as a G-module. By Remark 8.4.2, these isomorphisms extend to the first isomorphism of the theorem. The second one immediately follows from Theorem 8.3.1.  8.5. Cohen-Macaulay quantum cohomology. We continue establishing in this section analogous results as in Sections 6 and 7. As most of the arguments here are similar to those of the aforementioned sections, we omit details of proofs below. We begin by looking at the reduced parts of quantum cohomology rings. Proposition 8.5.1. For each r ≥ 0, there are isomorphisms of rings H• (Uζ (Br ), k)red ∼ = S • (x0 , . . . , xr )Tr , ∼ indG S • (x0 , . . . , xr )Tr . H• (Uζ (Gr ), k)red = B Proof. We have   H• (Uζ (Br ), k)red ∼ = H• (Uζ (Ur ), k)Uζ (Tr ) red   u0ζ Uζ (Tr )//u0ζ • ∼ = (H (Uζ (Ur ), k) ) red  • • ∼ = [S (x0 , . . . , xr ) ⊗ Λ (y1 , . . . , yr )]Tr red T ∼ = ([S • (x0 , . . . , xr ) ⊗ Λ• (y1 , . . . , yr )]red ) r ∼ = S • (x0 , . . . , xr )Tr where the fourth isomorphism is from Lemma 6.1.1. Next, Lemma 6.2.2 gives us the second isomorphism of the proposition.  Now the following theorem shows that the Frobenius-Lusztig kernels of quantum groups also have Cohen-Macaulay cohomology. Theorem 8.5.2. For each r ≥ 0, the cohomology rings H• (Uζ (Br ), k)red and H• (Uζ (Gr ), k)red are Cohen-Macaulay. Proof. The argument is similar to that given for Theorem 7.1.4.  Acknowledgments This paper is developed from a part of the author’s Ph.D. thesis. The author gratefully acknowledges the guidance of his thesis advisor Daniel K. Nakano. We deeply thank Christopher M. Drupieski, who spent a lot of time and energy to read and correct our preprints. We are also grateful the conversations with David Krumm. We thank Wilberd van der Kallen and the referee for useful comments and suggestions on the manuscript. Last but not least, the author would like to thank Jon F. Carlson for teaching him MAGMA programming and giving him an account on the SLOTH machine to perform all the calculations. COHOMOLOGY FOR FROBENIUS KERNELS OF SL2 19 9. Appendix 9.1. In this section we compare the effectiveness of two programs computing the number Nr (p, m, n). The first program is encoded from the algorithm in Section 5 and denote by F1 in the tables below. The other one is applied Ehrhart’s theory on counting integral lattice points in a polytope and denote by F2 .1 Note also that both programs are written in MAGMA code and run on the MAGMA computer algebra system. In both tables, we fix m = 0 and respectively consider p = 3 in Table 1, and p = 5 in Table 2. The last two columns show the time needed to compute Nr (p, m, 0) for all 0 ≤ m ≤ 10. The results show that Nr (p, 0, n) = 0 if n is odd, hence only results for m even are exhibited in the tables. Table 1. p = 3 r\n 0 2 1 2 3 4 5 6 7 8 9 10 11 F1 0 F2 1.56 (s) 3 1 13 37 73 121 181 0 5.74 (s) 4 1 111 545 1519 3249 5951 0.01 (s) 41.04 (s) 5 1 2065 17857 70705 195601 439201 0.77 (s) 67392.07 (s) Table 2. p = 5 r\n 0 2 1 2 3 4 5 6 7 8 9 10 11 F1 0 F2 1.86 (s) 3 1 21 61 121 201 301 0 7.15 (s) 4 1 503 2505 7007 15009 27511 0.08 (s) 43.86 (s) 5 1 42521 377561 1505121 4175201 9387801 16.78 (s) 69773.82 (s) References [1] H. H. Andersen and J. C. Jantzen, Cohomology of induced representations for algebraic groups, Math. Ann., 269 (1984), 487-525. [2] A. I. Barvinok, A polynomial time algorithm for counting integral points in polyhedra when the dimension is fixed, Math. Operations Research, 19 (1994), 769-779. [3] C. P. Bendel, D. K. Nakano, and C. Pillen, Extensions for frobenius kernels, J. Algebra, 272 (2004), 476-511. [4] , Second cohomology groups for frobenius kernels and related structures, Adv. Math., 209 (2006), 162-197. [5] D. J. Benson, Representations and cohomology. II, second ed., Cambridge Studies in Advanced Mathematics, 31, Cambridge University Press, Cambridge, 1998, Cohomology of groups and modules. [6] , Commutative algebra in the cohomology of groups, Trends in Com. Algebra, 51 (2004). [7] J. F. Carlson, Systems of parameters and the structure of cohomology rings of finite groups, Contemp. Math., 158 (1994), 1-7. [8] E. Cline, B. Parshall, and L. Scott, Cohomology, hyperalgebras, and representations, J. Algebra, 63 (1980), 98–123. [9] C. M. Drupieski, Representations and cohomology for frobenius-lusztig kernels, J. Pure Appl. Algebra, 215 (2011), 1473-1491. [10] E. M. Friedlander and B. J. Parshall, Cohomology of Lie algebras and algebraic groups, Amer. J. Math., 108 (1986), 235-253. [11] M. Hochster and J. Roberts, Actions of reductive groups on regular rings and Cohen-Macaulay rings, Bull. AMS., 80 (1974), 281-284. 1Both codes are available on arxiv.org. 20 NHAM V. NGO [12] J. E. Humphreys, Introduction to Lie algebras and representation theory, Graduate Texts in Mathematics, 9, Springer-Verlag, New York, 1978, Second printing, revised. [13] C. Ionescu, Cohen-macaulay fibres of a morphism, AAPP, 86 (2008), 1-9. [14] J. C. Jantzen and K.-H. Neeb, Lie theory: Lie algebras and representations, Progress in Mathematics, 228, Birkhauser, 2004. [15] J. C. Jantzen, Representations of algebraic groups, Mathematical Surveys and Monographs, 107, American Mathematical Society, Providence, RI, 2003. [16] M. Mastnak, J. Pevtsova, P. Schauenburg, and S. Witherspoon, Cohomology of finite dimensional pointed Hopf algebras, Proc. London Math. Soc., 100 (2010), 377-404. [17] N. V. Ngo, Commuting varieties of r-tuples over Lie algebras, submitted, 2012. [18] S. Ryom-Hansen, A q-analogue of kempf s vanishing theorem, Mosc. Math. J., 3 (2003), 173-187. [19] A. Suslin, E. Friedlander, and C. Bendel, Infinitesimal 1-parameter subgroups and cohomology, J. Amer. Math. Soc, 10 (1997), 693-728. [20] , Support varieties for infinitesimal group scheme, J. Amer. Math. Soc, 10 (1997), 729-759. [21] W. van der Kallen, Infinitesimal fixed points in modules with good filtration, Math. Z., 212 (1993), 157-159. Department of Mathematics, Statistics, and Computer Science, University of Wisconsin-Stout, Menomonie, WI 54751, USA E-mail address: [email protected] Current address: Department of Mathematics and Statistics, Lancaster University, Lancaster, LA1 4YW, UK E-mail address: [email protected]
0math.AC
Robust Exponential Worst Cases for Divide-et-Impera Algorithms for Parity Games Massimo Benerecetti & Daniele Dell’Erba Fabio Mogavero Università degli Studi di Napoli Federico II Università degli Studi di Verona The McNaughton-Zielonka divide et impera algorithm is the simplest and most flexible approach available in the literature for determining the winner in a parity game. Despite its theoretical exponential worst-case complexity and the negative reputation as a poorly effective algorithm in practice, it has been shown to rank among the best techniques for the solution of such games. Also, it proved to be resistant to a lower bound attack, even more than the strategy improvements approaches, and only recently a family of games on which the algorithm requires exponential time has been provided by Friedmann. An easy analysis of this family shows that a simple memoization technique can help the algorithm solve the family in polynomial time. The same result can also be achieved by exploiting an approach based on the dominion-decomposition techniques proposed in the literature. These observations raise the question whether a suitable combination of dynamic programming and game-decomposition techniques can improve on the exponential worst case of the original algorithm. In this paper we answer this question negatively, by providing a robustly exponential worst case, showing that no possible intertwining of the above mentioned techniques can help mitigating the exponential nature of the divide et impera approaches. 1 Introduction Parity games [38] are perfect-information two-player turn-based games of infinite duration, usually played on finite directed graphs. Their vertices, labeled by natural numbers called priorities, are assigned to one of two players, named Even and Odd or, simply, 0 and 1, respectively. A play in the game is an infinite sequence of moves between vertices and it is said to be winning for player 0 (resp., 1), if the maximal priority encountered infinitely often along the play is even (resp., odd). These games have been extensively studied in the attempt to find efficient solutions to the problem of determining the winner. From a complexity theoretic perspective, this decision problem lies in NPT IME ∩ C O NPT IME [16], since it is memoryless determined [15, 30, 31, 38]. It has been even proved to belong to UPT IME ∩ C O UPT IME [23] and, very recently, to be solvable in quasi-polynomial time [11]. They are the simplest class of games in a wider family with similar complexities and containing, e.g., mean payoff games [14,22], discounted payoff games [47], and simple stochastic games [13]. In fact, polynomial time reductions exist from parity games to the latter ones. However, despite being the most likely class among those games to admit a polynomial-time solution, the answer to the question whether such a solution exists still remains elusive. The effort devoted to provide efficient solutions stems primarily from the fact that many problems in formal verification and synthesis can be reformulated in terms of solving parity games. Emerson, Jutla, and Sistla [16] have shown that computing winning strategies for these games is linear-time equivalent to solving the modal µ C ALCULUS model checking problem [17]. Parity games also play a crucial role in automata theory [15, 29, 37], where they can be applied to solve the complementation problem for alternating automata [21] and the emptiness of the corresponding nondeterministic tree automata [29]. These automata, in turn, can be used to solve the satisfiability and model checking problems for expressive logics, such as the modal [45] and alternating [1, 43] µ C ALCULUS, ATL? [1, 42], P. Bouyer, A. Orlandini & P. San Pietro (Eds.): 8th Symposium on Games, Automata, Logics and Formal Verification (GandALF’17) EPTCS 256, 2017, pp. 121–135, doi:10.4204/EPTCS.256.9 © M. Benerecetti, D. Dell’Erba, & F. Mogavero This work is licensed under the Creative Commons Attribution License. 122 Robust Exponential Worst Cases for Divide-et-Impera Algorithms for Parity Games Strategy Logic [12, 33–36], Substructure Temporal Logic [8, 9], and fixed-point extensions of guarded first-order logics [10]. Previous exponential solutions essentially divide into two families. The first one collects procedures that attempt to directly build winning strategies for the two players on the entire game. To such family belongs the Small Progress Measure approach by Jurdziński [24], which exploits the connection between the notions of progress measures [28] and winning strategies. A second approach in same vein is the Strategy Improvement algorithm by Jurdziński and Vöge [44], based on the idea of iteratively improving an initial, non necessarily winning, strategy. The second family gathers, instead, the approaches based on decomposing the solution of a game into the analysis of its subgames. To this family belong the so called divide et impera approaches led by the Recursive algorithm proposed by Zielonka [46], which adapts to parity games an earlier algorithm proposed by McNaughton for Muller games [32]. Intuitively, it decomposes the input game into subgames and solves them recursively. Using the Recursive algorithm as a back-end, and in the attempt to obtain a better upper bound, the Dominion Decomposition [26, 27] and the Big Step [41] approaches were devised. Both share the idea of intertwining the recursive calls of the back-end with a preprocessing phase, applied to the current subgame, in search of a sufficiently small dominion for some player ℘, i.e., a set of positions from where ℘ wins without ever exiting the set. The first technique does so by means of a brute force search, while the second one exploits a suitable variation of the Small Progress Measure procedure. A different direction has been followed recently within the decomposition-based family, that leads to a novel solution technique based on the notion of priority promotion [5–7]. The approach relies on a new procedure that finds dominions of arbitrary size, which proved to be quite efficient in practice and exhibits the best space complexity among the known solution algorithms, even better than the recently introduced quasi-linear space algorithms [18, 25]. The literature also suggests several heuristics to tune parity game solvers. One of the most successful ones is that of decomposing the game into strongly-connected components (SCCs, for short) and solving it SCC-wise. SCC-decomposition, together with some other minor techniques such as removal of self-cycles and priority compression, can significantly improve the solution process, as empirically demonstrated in [20]. The same authors also show that, against the negative reputation as far as performances are concerned, the Recursive algorithm often stands out as the best solver among those proposed in the literature, particularly when paired with the SCC-decomposition heuristic. Despite having a quite straightforward exponential upper bound, this algorithm has resisted an exponential lower bound for more than ten years, until Friedmann [19] devised an indexed family of games that forces the algorithm to execute a number of recursive calls that grows exponentially with the index. The family is also resilient to the SCC-decomposition technique, since each subgame passed to a recursive call always forms a single SCC. On a closer look, however, the games proposed there force an exponential behavior by requiring the algorithm to repeatedly solve a small number of subgames, actually only a linear number of them. As a consequence, all those games are amenable to a polynomial-time solution, by simply providing the algorithm with a suitable memoization mechanism that prevents it from wasting computational resources on solving already solved subgames. For different reasons, also a dominion decomposition approach can break the lower bound easily, as most of the subgames of a game in the family contain a dominion of constant size. These observations raise the question whether the Recursive algorithm admits an exponential lower bound robust enough to be resilient to a suitable intertwining with memoization, SCC-decomposition, and dominion decomposition techniques. The difficulty here is that such a robust worst case should induce an exponential number of different subgames to prevent memoization from being of any help. At the same time, each of those subgames must contain a single SCC and only dominions of sufficiently large size to M. Benerecetti, D. Dell’Erba, & F. Mogavero 123 prevent both SCC-decomposition and dominion decomposition techniques from simplifying the game. In this paper, we answer positively to the question, by providing a robust, and harder, worst case family that meets all the above requirements, thereby shading some light on the actual power of aforementioned techniques and sanctioning that no combination of them can indeed help improving the exponential lower bound of the divide et impera approaches. A recent breakthrough [11] by Calude et al. proposes a succinct reduction from parity to reachability games based on a clever encoding of the sequences of priorities a player finds along a play. This allows for a mere quasi-polynomial blow up in the size of the underlying graph and sets the basis of the fixedparameter tractability w.r.t. the number of priorities. The approach has been then considerably refined in [18], where these encodings are modeled as progress measures. A similar technique is also used in [25]. Despite the theoretical relevance of this new idea, preliminary experiments [4] seem to suggest that the practical impact of the result does not match the theoretical one, as all exponential algorithms outperform, often by orders of magnitude, the current implementations of the quasi-polynomial ones, which do not scale beyond few hundred vertices. This evaluation is consistent with the fact that the new techniques essentially amount to clever and succinct encodings embedded within a brute force search, which makes matching quasi-polynomial worst cases quite easy to find. These observations suggest that the road to a polynomial solution may need to take another direction. Our work is, therefore, intended to evaluate the weaknesses of classic exponential algorithms, in the same vein of [39, 40], where the authors study the pitfalls of existing exponential algorithms for graphs isomorphism, in spite of the fact that a quasi-polynomial, but impractical, algorithm exists [3]. We believe that a better understanding of the different issues of the known approaches may lead to progress in the quest for a polynomial algorithm. 2 Parity Games Let us first briefly recall the notation and basic definitions concerning parity games that expert readers can simply skip. We refer to [2] [46] for a comprehensive presentation of the subject. A two-player turn-based arena is a tuple A = hPs , Ps , Mvi, with Ps ∩ Ps = 0/ and Ps , Ps ∪ Ps , such that hPs, Mvi is a finite directed graph. Ps (resp., Ps ) is the set of positions of player 0 (resp., 1) and Mv ⊆ Ps × Ps is a left-total relation describing all possible moves. A path in V ⊆ Ps is an infinite sequence π ∈ Pth(V) of positions in V compatible with the move relation, i.e., (πi , πi+1 ) ∈ Mv, for all i ∈ N. A positional strategy for player ℘∈ {0, 1} on V ⊆ Ps is a function σ℘ ∈ Str℘(V) ⊆ (V ∩ Ps℘) → V, mapping each ℘-position v ∈ V ∩ Ps℘ to position σ℘(v) ∈ V compatible with the move relation, i.e., (v, σ℘(v)) ∈ Mv. By Str℘(V) we denote the set of all ℘-strategies on V. A play in V ⊆ Ps from a position v ∈ V w.r.t. a pair of strategies (σ , σ ) ∈ Str (V) × Str (V), called ((σ , σ ), v)-play, is a path π ∈ Pth(V) such that π = v and, for all i ∈ N, if πi ∈ Ps , then πi+1 = σ  (πi ) else πi+1 = σ  (πi ). A parity game is a tuple a = hA , Pr, pri, where A is an arena, Pr ⊂ N is a finite set of priorities, and pr : Ps → Pr is a priority function assigning a priority to each position. The priority function can be naturally extended to games and paths as follows: pr(a) , maxv∈Ps pr(v); for a path π ∈ Pth, we set pr(π) , lim supi∈N pr(πi ). A set of positions V ⊆ Ps is a ℘-dominion, with ℘ ∈ {0, 1}, if there exists a ℘-strategy σ℘ ∈ Str℘(V) such that, for all ℘-strategies σ℘ ∈ Str℘(V) and positions v ∈ V, the induced ((σ , σ ), v)-play π has priority of parity ℘, i.e., pr(π) ≡2 ℘. In other words, σ℘ only induces on V plays whose maximal priority visited infinitely often has parity ℘. The winning region for player ℘ ∈ {0, 1} in game a, denoted by Wn℘ a , is the maximal set of positions that is also a ℘-dominion in a. Since parity games are determined games [15], meaning that from each position one of the two players wins, the two winning regions of a game a form a partition of its positions, i.e., Wna ∪ Wna = Psa . By a\V 124 Robust Exponential Worst Cases for Divide-et-Impera Algorithms for Parity Games we denote the maximal subgame of a with set of positions Ps0 contained in Ps\V and move relation Mv0 equal to the restriction of Mv to Ps0 . The ℘-predecessor of V, in symbols pre℘(V) , {v ∈ Ps℘ : Mv(v) ∩ V 6= 0} / ∪ {v ∈ Ps℘ : Mv(v) ⊆ V}, collects the positions from which player ℘ can force the game to reach some position in V with a single move. The ℘-attractor atr℘(V) generalizes the notion of ℘-predecessor pre℘(V) to an arbitrary number of moves. Thus, it corresponds to the least fix-point of that operator. When V = pre℘(V), player ℘ cannot force any position outside V to enter this set. For such a V, the set of positions of the subgame a \ V is precisely Ps \ V. When confusion cannot arise, we may abuse the notation and write a to mean its set of positions Psa . 3 The Recursive Algorithm Algorithm 1: Recursive algorithm. 1 2 signature sol : PG →a 2Psa × 2Psa function sol(a) (aL ,℘) ← fL (a) (WnL , WnL ) ← sol(aL ) if ℘ ℘ pre℘ a (WnL ) \ WnL = ℘ ℘ Algorithm 2: Left-subgame function. 1 2 7 0/ then ℘ (Wn , Wn ) ← (Psa \Wn℘ L , WnL ) else aR ← fR (a, Wn℘ L ,℘)   (WnR , WnR ) ← sol(aR ) ℘ (Wn℘, Wn℘) ← (Wn℘ R , Psa \WnR ) 1 8 return (Wn , Wn ) 2 3 4 5 6 3 signature fL : PG → PG × {0, 1} function fL (a) ℘ ← pr(a) mod 2 − a? ← a \ atr℘ a (pra (pr(a))) ? return (a ,℘) Algorithm 3: Right-subgame function. signature fR : PG×a 2Psa × {0, 1} → PG function fR (a, W,℘) a? ← a \ atr℘ a (W) return a? The Recursive procedure, reported in Algorithm 1 and proposed by Zielonka [46] in an equivalent version, solves a parity game a by decomposing it into two subgames, each of which is, then, solved recursively. Intuitively, the procedure works as follows. Algorithm 1, by means of Algorithm 2, starts by collecting all the positions that are forced to pass through a position with maximal priority p , pr(a) − in that game. This first step results in computing the set A , atr℘ a (pra (p)), i.e., the attractor to the set pr− a (p) of positions with priority p w.r.t. player ℘ , p mod 2. The subgame aL is, then, obtained from a by removing A from it and solved recursively. The result is a partitioning of the positions of aL into two winning regions, WnL and WnL , one per player. At this point, the algorithm checks whether the subgame aL is completely won by ℘ or, more generally, if the adversary ℘ cannot force any other position in a into its own winning region Wn℘ L in one move. In other words, none of the winning positions of the adversary ℘ ℘ ℘ can attract something outside that region, i.e., pre℘ / If this is the case, the entire a (WnL ) \ WnL = 0. game a is solved. Indeed, the positions of a winning for ℘ are all its positions except, possibly, for those won by ℘ in subgame aL (see Line 4 of Algorithm 1). If, on the other hand, the above condition does not ℘ hold, the winning region of ℘ can be extended with some other positions in a. Let B , atr℘ a (WnL ) be the set collecting all such positions. Observe that all the positions in B are certainly winning for ℘ in the entire game, as, from each such position, ℘ can force entering its own winning region Wn℘ L , from which its opponent ℘ cannot escape. The residual subgame aR , obtained by removing B form a, as computed by Algorithm 3, may now contain positions winning for either player, and, therefore, still needs to be solved recursively (see Line 6 of Algorithm 1). All the positions of aR that turn out to be winning for ℘ in that M. Benerecetti, D. Dell’Erba, & F. Mogavero 125 game, namely Wn℘ R , are, then, all and only those positions winning for ℘ in the entire game a, while the remaining ones are winning for ℘ (see Line 7 of Algorithm 1). As shown by Friedmann in [19], the algorithm admits a worst case family of games {ak }ω k=1 that requires a number of recursive calls exponential in k. The reason is essentially the following. Each game ak of that family contains all a j , with 1 ≤ j < k, as subgames. Each recursive call that receives as input one such subgame a j requires to eventually solve both a j− and a j− . As a consequence, the number of recursive calls performed by the algorithm on game ak can be put in correspondence with a Fibonacci sequence. This proves that their growsat least as fast as the sequence of the Fibonacci numbers,  number √ namely that their number is Ω ((1 + 5)/2)k . The very reason that makes this family exponential also makes it amenable to a polynomial-time solution. It suffices to endow the Recursive algorithm with a memoization mechanism that, for each solved game a, records the triple (a, Wna , Wna ). Each recursive call can, then, directly extract the winning regions of a subgame that is already contained in the collection, thus preventing the procedure from solving any subgame more than once. Not only does the resulting procedure make Friedman worst case vain, but it also speeds up the solution of games significantly, as long as the number of repeated subgames remains relatively small, e.g., linear in the size of the original game, which is often the case in practice. 4 Memoization Resilient Games As mentioned above, the main requirement for an exponential worst case family for the memoized version of the Recursive algorithm is to contain games that force the procedure to solve an exponential number of different subgames. In this section we shall focus primarily on this problem, by showing that such a family exists. More generally, we identify a core family {akC }ω k=1 of games enjoying that specific property. For each k ∈ N+ , game akC contains 2k + 1 gadgets, each one formed by three positions αi , βi , and γi , for i ∈ [0, 2k]. The positions βi and γi , in gadget i, share the same priority i and opposite owners, namely player i mod 2 for βi and (i + 1) mod 2 for γi . The position αi in the gadget has the same owner as the corresponding βi . These positions are leading ones, having higher priorities than all the β ’s and γ’s of the other gadgets. Positions within gadget i are connected as follows: αi can only move to βi ; βi can only move to γi ; γi can choose either to move to βi or to stay in γi itself. Two adjacent gadgets, of indexes i and i + 1, are connected by only two moves: one from γi to αi+1 and one from βi+1 to αi . Figure 1 depicts game aC . The gray portion in the figure represents game aC , where all the priorities of all its α’s have been increased by 2, so as to comply with the requirement that the α’s have the higher priorities. Indeed, in general, given an index k, game ak+ is obtained from akC by increasing by two units the priorities of C k each αi in the gadgets of aC and adding two new gadgets with indexes 2k + 1 and 2(k + 1) connected as in figure. The games in the core family are formally described by the following definition.   k Definition 4.1 (Core Family). The core family {akC }ω k=1 , where aC ,hA , Pr, pri, A ,hPs , Ps , Mvi, and Pr , [0, 4k], is defined as follows. For any index k ≥ 1, the set of positions Ps , {αi , βi , γi : 0 ≤ i ≤ 2k} of akC is divided into three categories: • αi belongs to player ℘ , i mod 2, i.e., αi ∈ Ps℘, and has priority pr(αi ) , 2k + i + 1; • βi belongs to player ℘ , i mod 2, i.e., βi ∈ Ps℘, and has priority pr(βi ) , i; • γi belongs to player ℘ , (i + 1) mod 2, i.e., γi ∈ Ps℘, and has priority pr(γi ) , i. Moreover, the moves from positions αi , βi , and γi , with 0 ≤ i ≤ 2k, are prescribed as follows: • αi has a unique move to βi , i.e., Mv(αi ) = {βi }; 126 Robust Exponential Worst Cases for Divide-et-Impera Algorithms for Parity Games • βi has one move to γi and one to αi−1 , if i > 0, i.e., Mv(βi ) = {γi } ∪ {αi−1 : i > 0}; • γi has one move to γi itself, one to βi , and, if i < 2k, one to αi+1 , i.e., Mv(γi ) = {βi , γi } ∪ {αi+1 : i < 2k}. It is not hard to verify that, for any k ∈ N+ , α0 /5 α1 /6 α2 /7 α3 /8 α4 /9 the game akC is completely won by player 0 and contains precisely 6k + 3 positions and 12k + 4 moves. As we shall see later in detail, β0 /0 β1 /1 β2 /2 β3 /3 β4 /4 the solution of each such games requires Algorithm 1 to solve an exponential number of different subgames. γ0 /0 γ1 /1 γ2 /2 γ3 /3 γ4 /4 These core games form the backbone for a more general framework, consisting of an entire class of game families, with the propFigure 1: Game aC of the core family. erty that each of them remains resilient to memoization techniques. Essentially, each game in any such family extends a core game. In order to define such a wider class, let us first establish what counts as a suitable extension of a core. Clearly, for a game a to be an extension of akC , for some index k ∈ N+ , it must contain akC as a subgame. However, in order to prevent the Recursive algorithm from disrupting the core while processing a, we have to enforce some additional requirements. In particular, we need the algorithm to behave on a virtually in the same way as it does on the core subgame. To this end, we require that all positions αi still have the maximal priorities as in the core. Moreover, all positions αi and βi cannot have additional moves in a w.r.t. those contained in the core. Finally, if γi can escape to some position v outside the core, then v does not have a higher priority, it has a move back to γi , and belongs to the opponent player w.r.t. γi . This condition ensures that no γi can decide to escape the core without being bounced back immediately by the opponent. The following definition makes the notion of extension precise. Definition 4.2 (Core Extension). An arbitrary parity game a ∈ PG is a core extension of akC , for a given index k ∈ N+ , if the following four conditions hold: 1. a \ P = akC , where P , {v ∈ a : v 6∈ akC }; 2. pra (v) < pra (α0 ), for all v ∈ P; 3. {αi , βi ∈ a : 0 ≤ i ≤ 2k} ∩ (Mv(P) ∪ Mv−1 (P)) = 0; / 4. v ∈ Ps℘, γi ∈ Mv(v), and pr(v) ≤ i, for all v ∈ P ∩ Mv(γi ), i ∈ [0, 2k], and ℘ , i mod 2. We shall denote with PGC ⊆ PG the set of all core extensions of akC , for any index k ∈ N+ . We can now define the abstract notion of worst-case family that extends the core family, while still preserving the same essential properties that we are going to prove shortly. k Definition 4.3 (Worst-Case Family). A family of parity games {ak }ω k=1 is a worst-case family if a is a core extension of akC , for every index k ∈ N+ . In order to prove that any worst-case family requires an exponential number of different subgames to be solved, we shall characterize a suitable subtree of the recursion tree generated by the algorithm, when called on one of the games in the family. Starting from the root, which contains the original game ak , we fix specific observation points in the recursion tree that are identified by sequences in the set w ∈ {L, R}≤k , where L (resp., R) denotes the recursive call on the left (resp., right) subgame. Each sequence w identifies b k and ak , of ak that correspond to the input subgames of two successive nested calls. In two subgames, a w w M. Benerecetti, D. Dell’Erba, & F. Mogavero 127 b k , thus the analysis of the recursion tree, we shall only take into account the left subgame akw of each a w disregarding its right subtree as it is inessential to the argument. An example of the resulting subgame tree for game aC of the core family is depicted in Figure 2. According to Algorithm 1 on input aC = aε , the first (left) recursive call is executed on the subgame obtained by removing the 1-attractor to the positions with maximal priority, in this case α9 , which only contains α9 . Therefore, the left subgame coincides b  . The second call is executed on the game obtained by removing the 0-attractor in a precisely with a L ε b  . In this case, that winning region is precisely to the winning region for player 0 of the left subgame a L {β2 , γ2 }, and its 0-attractor is {α2 , γ1 , β2 , γ2 }. As consequence, the subgame passed to the right-hand b  . The rest of the subtree is generated applying the same reasoning. The call precisely coincides with a R following definition generalizes this notion to a game of any worst-case family and characterizes the portion of the recursion tree we are interested in analyzing. Definition 4.4 (Induced Subgame Tree). Given a worst-case family {ak }ω k=1 , the induced subgame tree w6=ε k k k b G , {aw }w∈{L,R}≤k ∪ {aw }w∈{L,R}≤k+1 w.r.t. an index k ∈ N+ is defined inductively on the structure of the sequence w ∈ {L, R}≤k as follows, where akε , ak and z , 2(k − |w|): b k , ak \ atr k ({αz }); 1. a wL w α0 aw b k , ak \ atr k (Wn k ); 2. a w wR b a a w α1 α2 β0 β1 β2 γ0 γ1 γ2 wL b k \ atr ({αz+1 }), if w 6= ε. 3. akw , a w bk aw aε Before proceeding with proving the main result of this section, we need some additional properties of the induced subgame tree of any worst-case family. The following lemma states some invariant of the elements contained in the tree of a games for ak , extending the core akC , that will be essential to the b b a a L R result. In particular, they ensure that all of them are subgames of ak and that, depending on the identifying sequence w, they contain the required leading positions αi of the core. In addition, it states two important properties of every left child in the tree, i.e., those aL aR elements identified by a sequence w ending with L. Both of them will be instrumental in proving that all the subgames in the tree are 0/ indeed different and to assess their number, as we shall see in Lemmas 4.3 and 4.4. The first one ensures that each such game necessarily b1 b1 b1 b1 a a a a LL LR RL RR contain a specific position γi , with the index   i depending on w. The second one character- Figure 2: The induced subgame tree G of a . b k . It states that, in each such game, the izes the winning region for player 0 of the left-child subgames a wL winning positions for player 0 contained in the corresponding core akC are all its β2 j and γ2 j , with even index greater than the maximal index of a leading position αx in that game. Indeed, as soon as the higher positions αi , with i ∈ [x + 1, k], are removed from the game, each residual corresponding γ2 j , possibly together with its associated β2 j , is necessarily contained in an independent 0-dominion. α0 α0 α1 β0 β1 β2 β0 γ0 γ1 γ2 γ0 α0 α0 β0 β1 γ0 γ1 β0 γ0 γ1 α1 β1 γ2 β0 γ2 γ0 β1 β0 γ1 γ0 β1 128 Robust Exponential Worst Cases for Divide-et-Impera Algorithms for Parity Games In the sequel, by lst(w) we denoted the last position of a non-empty sequence w ∈ {L, R}+ . Lemma 4.1. For any index k ∈ N+ and sequence w ∈ {L, R}≤k+1 , let z , 2(k − |w|). Then, the following properties hold, where |w| ≤ k, in the first three items, and w 6= ε, in the remaining ones: 1. akw is a subgame of ak ; 2. α j ∈ akw iff j ∈ [0, z]; 3. γ j ∈ akw , for all j ∈ [0, z], and γz+1 ∈ akw , if w 6= ε and lst(w) = L; b k is a subgame of ak ; 4. a w b k iff j ∈ [0, z + 1]; 5. α j ∈ a w b k , for all j ∈ [0, z], and γz+1 ∈ a b k , if |w| ≤ k, and γ0 ∈ a b k , otherwise, when lst(w) = L; 6. γ j ∈ a w w w b k : j ∈ [1, |w|]}, if lst(w) = L. 7. Wnab k ∩ akC = {βz+2 j , γz+2 j ∈ a w w Finally, the next lemma simply establishes that all the subgames contained in the induced subgame tree of Definition 4.4 are indeed generated by the Recursive algorithm when called with input game ak of some worst-case family. Lemma 4.2. For any index k ∈ N+ and sequence w ∈ {L, R}≤k , the following properties hold: b k , 1); 1. fL (ak ) = (a w 2. wL fR (akw , Wnab k wL bk ; , 0) = a wR b k ) = (ak , 0), if w 6= ε. 3. fL (a w w We are now ready for the main result of this section, namely that the induced subgame tree contains elements which are all different from each other and whose number is exponential in the index k. We split the result into two lemmas. The first one simply states that any subgame in the left subtree of some akw is different from any other subgame in the right subtree. The idea is that for for any subgame in the tree, all subgames of its left subtree contain at least one position, a specific position γi with i depending on w, that is not contained in any subgame of its right subtree. Lemma 4.3. For all indexes k ∈ N+ and sequences w, v ∈ {L, R}∗ , with ` , |w| + |v| ≤ k and z , 2(k − |w|) − 1, the following properties hold: b k , if ` < k, and γ0 ∈ a b k , otherwise; 1. γz ∈ ak and γz ∈ a wLv wLv wLv b k , if ` < k, and γ0 6∈ a b k , otherwise. 2. γz 6∈ akwRv and γz 6∈ a wRv wRv Proof. First observe that, if ` < k, by Items 3 and 6 of Lemma 4.1, position γz belongs to both akw and b k , since 0 < z < 2(k − |w|). Let us consider Item 1 of the current lemma first and show that the every a w position γz belongs to all the descendants of akw in its left subtree. The proof proceeds by induction on the length of the sequence v and recall that, due to Item 2 (resp., 5) of Lemma 4.1, the position with b k ) is αz (resp., αz+1 ). Assume for the base case that |v| = 0. The maximal priority in akw (resp., in a w k b k . By Item 1 of Definition 4.4, a b k is defined as ak \ A, where thesis becomes γz ∈ awL and γz ∈ a w wL wL A = atrak ({αz+1 }). By Definition 4.2 of core extension (Items 1, 3, and 4), a move entering αz+1 may w only come from βz+2 , if it is present in the subgame, which is always the case unless w = ε, or from γz , whose owner is the opponent player 0 and cannot be attracted. Hence, A = {αz+1 , βz+2 }, if w 6= ε, and b k \ A, where A = atr ({αz }). For the A = {αz+1 }, otherwise. Similarly, by Item 3, akwL is defined as a wL bk awL same observations as in the previous case, we have that A = {αz , βz+1 }. Hence, no position γi is removed M. Benerecetti, D. Dell’Erba, & F. Mogavero 129 from either games and the thesis immediately follows. Assume now |v| > 0, let v , v0 · x, with x ∈ {L, R}, b k and γz ∈ ak . We have two cases, depending and set w , wLv0 . By the inductive hypothesis, γz ∈ a w w b k is on whether x = L or x = R. Let r , 2(k − |w|). If x = L, according to Item 1 of Definition 4.4, a wL k  obtained from aw by removing A = atrak ({αr }) = {αr , βr+1 }. Similarly, by Item 3 of Definition 4.4, w b k \ A, where A = atr ({αr−1 }), by observing that |wL| = |w| + 1 and, therefore, ak is defined as a wL wL bk a wL 2(k − |wL|) + 1 = r − 1. In both cases the thesis follows immediately. Let us now consider the case with b k is obtained by removing the set A = atr k (Wn k ) x = R. According to Item 2 of Definition 4.4, a wR b a a w wL from akw . Position γz has odd index and cannot belong to Wnab k , which, by Item 7 of Lemma 4.1, only wL contains, among the positions from the core, those βi and γi , with i ≥ 2(k − |w|) > z and even. Since, b k is a subgame of a core extension, it holds that γz is owned by player 0 and can only have a move a wL leading to αz+1 , which is not in the subgame, or to a position outside the core and owned by player 1. As b k \ A, a consequence, it cannot end up in atrak (Wnab k ) and the thesis holds. Finally, recall that akwR = a wR w wL where A = atrb k ({αr̂ }), with r̂ , 2(k − |wR|) + 1. In the considered subgame, αr̂ has incoming moves awR only from βr̂+1 and γr̂−1 . However, r̂ − 1 = 2(k − |wR|) < 2(k − |w|) − 1 = z. Moreover, r̂ + 1 is an b k , being in Wn k as shown above. As a consequence, even index, and thus βr̂+1 is not contained in a wR b a wL A = {αr̂ } and the thesis follows. In addition, when |w| = k, Item 3 of Lemma 4.1 tells us that γ0 ∈ akw . If b k , due to Item 6 of Lemma 4.1. This ends the proof of Item 1 ` = k, instead, we have that γ0 belongs to a wL b k . Indeed, position of the lemma. As to Item 2 of the lemma, first observe that, if |w| < k, then γz 6∈ a wR  k  k b , the thesis holds for γz ∈ atrak (Wnab k ), as shown above. Since this set is removed from aw to obtain a wR w wL b k . Moreover, every descendant of a b k in the subgame tree is obtained only by removing positions. As a wR wR a consequence, none of them can contain position γz . In case |w| = k, instead, it suffices to observe that, bk . according to Item 7 of Lemma 4.1, γ0 ∈ Wnab k , hence it cannot be contained in a wR wL The main result asserting the exponential size of the induced subtrees of any worst-case family is given by the next lemma. This follows by observing that the number of nodes in the induced tree is exponential in k and by showing that the subgames associated with any two nodes in the tree Gk are indeed different. Lemma 4.4. Gk = 3(2k+1 − 1), for any k ∈ N+ . Proof. To prove that the size of Gk is as stated, we first need to show that all the elements contained in b k , and a b k 0 are the subgame trees are different, namely that, for each w 6= w0 , the subgames akw , akw0 , a w w b k , for each w 6= ε. By Item 5 of Lemma 4.1, pairwise different. Let us start by showing that akw 6= a w b k and, by Item 3 of Definition 4.4, this position is removed from a b k to obtain ak . position α2(k−|w|)+1 ∈ a w w w Hence, those two subgames cannot be equal. Let us consider now two subgames, each associated with one of the sequences w and w0 . There are two possible cases: either (i) w is a strict prefix of w0 , i.e., the one subgame is a descendant of the other in the subgame tree, or (ii) w and w0 share a common longest prefix w that is different from both, i.e., the two subgames lie in two distinct subtrees of the subgame associated with w. In case (i) we have that w0 = wv, for some v 6= ε. An easy induction on the length of b k } and each a0 ∈ {ak 0 , a b k 0 } are the subgames associated with w and w0 , v can prove that if a ∈ {akw , a w w w respectively, then the second is a strict subgame of the first, i.e., a0 ⊂ a. Indeed, Definition 4.4 together with Items 2, 5, and 7 of Lemma 4.1 ensure that, at each step downward along a path in the tree starting from a, whether we proceed on the left or the right branch, at least one position is always removed from the current subgame. In case (ii), instead, Item 1 of Lemma 4.3 tells us that there is at least one position, γz in the lemma, contained in all the subgames of the left subtree, while Item 2 states that the same position 130 Robust Exponential Worst Cases for Divide-et-Impera Algorithms for Parity Games is not contained in any subgame of the right subtree. Therefore, each of the two subgames associated with w must be different from either of the two subgames associated with w0 . Finally, to prove the statement of the lemma, it suffices to observe that the number of sequences of length at most k over the alphabet {L, R} are precisely 2k+1 − 1 and with each such sequence w a subgame akw is associated. As a consequence, the set {akw }w∈{L,R}≤k contains 2k+1 − 1 different elements. Moreover, b k }w6=ε ≤k+1 . We can, then, conclude that the size of Gk is each such subgame has two children in {a w w∈{L,R} precisely 3(2k+1 − 1). As a consequence of Lemma 4.4, we can obtain a stronger lower bound on the execution time of the Recursive algorithm. Indeed, the result holds regardless of whether the algorithm is coupled with a memoization technique. Theorem 4.1 (Exponential Worst Case). The number of distinct recursive calls executed by the Recursive n algorithm, with or without memoization, on a game with n positions is Ω 2 6 in the worst case. Proof. To prove the theorem, it suffices to consider a game akC belonging to the core family. Indeed, Lemma 4.2 states that the induced subgame tree of akC is a subset of the recursion tree induced by the Recursive algorithm executed on that game. Therefore, according to Lemma 4.4, the algorithm performs at least 3(2k+1 − 1) calls, each on a different subgame. By Definition 4.1, game akC has n = 6k + 3 positions and, therefore, we have k = n6 − 12 . As a consequence, the number of recursive calls is bounded from n n 1 below by 3(2 6 + 2 − 1) = Ω 2 6 . γ2 5 0 δ2,3 SCC-Decomposition Resilient Games 1 δ2,3 0 δ1,2 1 δ1,2 1 The previous section provides a class of parametric famγ3 γ1 δ1,3 ilies of parity games over which a dynamic-programming 0 0 δ2,4 δ0,2 1 1 δ0,3 δ1,4 approach cannot help improving the asymptotic exponen1 1 δ3,4 δ0,1 tial behavior of the classic Recursive algorithm. However, 0 0 δ0,3 δ1,4 it is not hard to observe that an SCC-decomposition of the 0 0 δ3,4 δ0,1 underlying game graph, if applied by each recursive call as described in [20], would disrupt the recursive structure 0 γ4 γ0 δ0,4 of the core family {akC }ω k=1 and, consequently, break the exponential worst-case. This is due to the fact that the Figure 3: Clique of a . subgames akw in the induced subgame tree get decomposed into distinct SCCs, which can then be solved as independent subgames and memoized. In other words, the Recursive algorithm extended with memoization and SCC-decomposition can easily solve the core family. b  and a b  of Figure 2. A concrete instance of this behavior can be observed by looking at the two games a LL RL b  . Therefore, The first one is formed by three distinct components, one of which exactly corresponds to a RL a solution of these components immediately implies that the leaves in the induced subgame tree could not be considered distinct games w.r.t. to the behavior of the combined algorithm anymore. This behavior can, however, be prevented by introducing a suitable extension of the core family, which complies with the requirements of Definition 4.2. The basic idea is to connect all the pairs of positions γi and γ j together in ℘ a clique-like fashion, by means of additional positions, denoted δ{i, j} with ℘ ∈ {0, 1}, whose owners ℘ are chosen so as to preserve the exponential behavior on the underlying core family. With more detail, if ℘ i ≡2 j, there is a unique connecting position δ{i, j} of parity ℘ ≡2 i, the opposite of that of γi and γ j . If, 0 , δ 1 }, separate γ and γ . Figure 3 on the other hand, i 6≡2 j, two mutually connected positions, {δ{i, i j j} {i, j} M. Benerecetti, D. Dell’Erba, & F. Mogavero 131 depicts the extension of the core game aC , where, besides the positions γi, only the additional positions and their moves are shown. The complete formalization of the new family follows.   k Definition 5.1 (SCC Family). The SCC family {akS }ω k=1 , where aS , hA , Pr, pri, A , hPs , Ps , Mvi, k Pr , [0, 4k], and Ps , aC ∪ P, is defined, for any index k ≥ 1, as follows: ℘ 1. P , {δ{i, j} : ℘ ∈ {0, 1} ∧ i, j ∈ [0, 2k] ∧ i 6= j ∧ (i ≡2 j → ℘ ≡2 i)}; 2. (γi , δI℘), (δI℘, γi ) ∈ Mv iff i ∈ I and i ≡2 ℘, for i ∈ [0, 2k] and δI℘ ∈ P; 3. (δI℘, δI℘) ∈ Mv iff i 6≡2 j, for δI℘ ∈ P and I = {i, j}; 4. δI℘ ∈ Ps℘ and pr(δI℘) , 0, for δI℘ ∈ P; 5. akS \ P = akC . Intuitively, in Item 1, P denotes the set of additional positions of akS w.r.t. to the core family game akC , which is, indeed, a proper subgame, as stated in Item 5. Item 2, instead, formalizes the moves connecting the additional δI℘ positions with the γi of the core, while Item 3 describes the mutual connection between the δ positions that share the same doubleton of indexes I. Finally, Item 4 associates each δI℘ with its corresponding owner ℘ and priority 0. The following lemma proves that such a parity-game family is indeed a worst-case family. Lemma 5.1. The SCC family {akS }ω k=1 is a worst-case family. Proof. To prove that the SCC family of Definition 5.1 is a worst-case family, we need to show that each game akS is a core extension of akC , i.e., that it complies with the Definition 4.2. Items 1 and 5 of Definition 5.1 imply Item 1 of Definition 4.2, since the set P does not contain any position of the core and, in addition, akC is a subgame of akS , as all the positions and moves of the core are contained in akS . Item 2 of Definition 4.2 follows from Item 4 of Definition 5.1. Indeed, by Definition 4.1, pr(αi ) , 2k + i + 1, for i ∈ [0, 2k] and k ≥ 1, while all the additional positions in P have priority 0. By Items 2 and 3 of Definition 5.1, there are no moves connecting positions δI with positions αi or βi , for any i ∈ [0, 2k], hence Item 3 of Definition 4.2 is satisfied. Finally, we need to show that whenever a γi has a move to a position v in P, then v does not have higher priority, belongs to the opponent of γi , and has a move back to γi (Item 4 of Definition 4.2). This property is enforced by Items 2 and 4 of Definition 5.1. Indeed, by the latter, position δI℘ is owned by player ℘. Moreover, by the former, γi , whose owner is (i + 1) mod 2, can only ℘ ℘ have a move to δ{i, j} if δ{i, j} has a move back to γi and ℘ = i mod 2. Hence, the two positions belong to opposite players. Since, in addition, all positions δ have priority 0, the requirement is satisfied. Due to the clique-like structure of the new family, it is not hard to see that every game in the induced subgame tree forms a single SCC. This guarantees that the intertwining of SCC-decomposition and memoization cannot prevent an exponential worst-case behavior of the Recursive algorithm on this family. Lemma 5.2. Each game in the induced subgame tree Gk of the SCC family {akS }ω k=1 , for an arbitrary index k ∈ N+ , forms a single SCC. b k ∈ Gk ) be a game in the induced subgame tree. By induction on the structure Proof. Let akw ∈ Gk (resp., a w of the string w, it is not hard to see that, for all indexes i, j ∈ [0, 2k] with i 6= j, it holds that γi , γ j ∈ akw b k ) iff the positions δ ℘ ∈ P, with ℘ ∈ {0, 1}, belong to ak (resp., a b k ), as well. For the (resp., γi , γ j ∈ a w w w {i, j} k k b k = ak \ A base case aε = a , the thesis trivially follows from Definition 5.1. For the inductive case a wx w k k b b k ). (resp., a = a \ A), let us assume, as inductive hypothesis, that the statement holds for ak (resp., a wx w w w By Definition 4.4, the set A is computed as the attractor to some set of positions B such that either 132 Robust Exponential Worst Cases for Divide-et-Impera Algorithms for Parity Games ℘ ℘ (i) γi , γ j , δ{i, j} 6∈ A or (ii) δ{i, j} ∈ A and at least one between γi and γ j belongs to A, for all i, j ∈ [0, 2k]. b k ). Case (i) arises when B = {α2(k−|w|) } (resp., B = {α2(k−|w|)+1 }), while Case (ii) when B = Wn (a wL Consequently, the required property on wx immediately follows from the inductive hypothesis on w, ℘ since, if a position δ{i, j} is removed from the game, also one between γi and γ j is removed as well and vice versa. Now, let a be an arbitrary game in Gk . Thanks to the topology of the games in the SCC family and to the property proved above, it easy to see that all positions in X = {βi , γi , δI℘ ∈ a} form a strongly connected subgame. Indeed, two positions βi and γi are mutually reachable due to the two moves (βi , γi ), (γi , βi ) ∈ Mv. Moreover, two arbitrary positions γi and γ j , with i 6= j, are mutually reachable via ℘ ℘ the positions δ{i, j} . Also, there are no isolated positions δ{i, j} . Finally, to prove that a is indeed a single SCC, it remains just to show that the positions in Y = {αi ∈ a} can reach and can be reached by those in X. The first part is implied by Item 1 of Lemma 4.1, since every αi has only a move to βi , which needs to belong to a in order for this to be a game. Now, due to the same observation, all positions αi , but possibly the last one αm with maximal index m in a, are reachable by βi+1 . Finally, αm can be reached by γm−1 , which necessarily belongs to a due to Item 3 of the same lemma. Putting everything together, we obtain the following structural, although non asymptotic, strengthening of Theorem 4.1. Theorem 5.1 (SCC-Decomposition Worst Case). The number of distinct recursive  executed by the  √ calls n/3 Recursive algorithm with SCC decomposition on a game with n positions is Ω 2 in the worst case. Proof. Due to Lemma 5.1, the SCC family is an exponential worst-case family. As shown in the proof of Theorem 4.1, the Recursive algorithm performs at least 3(2k+1 − 1) calls to solve a game of {ak }ω k=1 , and therefore, of {akS }ω . As consequence of Lemma 5.2, the number of calls cannot be affected by k=1 an SCC-decomposition technique, since there is an exponential number of subgames, the ones in the induced subgame tree of akS , each of which forms a single SCC. Moreover, a core game akC has 6k + 3 positions, while the number of additional positions P in the extension akC is given by 3k2 + 2k, which follows from Definition 5.1. Indeed, for every pair of positions γi , γ j , with i, j ∈ [0, 2k] and i 6= j, there ℘ k 2 is a single position δ{i, j} , if i ≡2 j, and two such positions, otherwise. Hence, aS has n , 3k + 8k + 3 positions, from which we obtain that k = √ bounded from below by 3(2 6 3n+7−1 3 √ 3n+7−4 . As  3√  n/3 − 1) = Ω 2 a consequence, the number of recursive calls is . Dominion-Decomposition Resilient Games A deeper analysis of the SCC family reveals that the size of the smallest dominion for player 0 in Game akS (there are no dominions for player 1, being the game completely won by its opponent) is of size 2(k + 1). This observation, together with the fact that the game has 3k2 + 8k + 3 positions, l√ immediatelymimplies that the proposal of [26, 27] of a brute force search for dominions of size at most 3k2 + 8k + 3 < 2(k + 1) cannot help improving the solution process on these games. We can prove an even stronger result, since this kind of search cannot reduce the running time in any of the subgames of the induced tree. The reason is that the smallest dominion in each such subgame that contains at least a position in the core has size linear w.r.t. k, as reported by the following lemma. Lemma 6.1. For all k ∈ N+ , let a be a subgame in the induced subgame tree Gk of akS , and D ⊆ a the smallest dominion such that D ∩ akC 6= 0. / Then, |D| ≥ k + 1. M. Benerecetti, D. Dell’Erba, & F. Mogavero 133 Proof. We start by proving that any such dominion D must necessarily contain at least a position γi , from some i ∈ N+ . Assume, by contradiction, that it does not. Then, D ⊆ {αi , βi ∈ a : i ∈ [0, 2k]} ∪ P. We can prove that D is not a game. By assumption, D must contain at least one position αi or βi , otherwise D ∩ akC = 0. / Let j be the smallest index such that α j ∈ D or β j ∈ D. Then, at least one of those two positions has only moves leading outside D. Hence D is not a game and, a fortiori, cannot be a dominion. Therefore, D must contain at least a position γi . By Definition 5.1, γi is connected in akS to precisely ℘ 2k positions δ{i, j} , where j ∈ [0, 2k], j 6= i, and whose owner ℘ ≡2 i is the adversary of the owner of γi . Let us consider the k indexes j ∈ [0, 2k] such that i 6≡2 j. For each such j, we have two cases, depending ℘ on whether γ j belongs to a or not. If it does, then so does δ{i, j} . If it does not, then it must have been removed by some application of Item 2 of Definition 4.4. If the involved attractor w.r.t. player 0 does not ℘ ℘ ℘ attract δ{i, j} , then it cannot attract δ{i, j} either, as it has no moves to γ j . If, on the other hand, δ{i, j} gets ℘ attracted, it must belong to player 0. As a consequence, δ{i, j} belongs to player 1 and is not attracted. In ℘ either case, we conclude hat δ{i, j} cannot be removed and, therefore, is still contained in a. Since, in ℘ addition, all the k positions δ{i, j} , with j ∈ [0, 2k] and j 6≡2 i, are mutually connected to γi and their owner is the opponent of the one of γi , they must be contained in D as well. Hence, D contains at least k + 1 positions. The above observation allows us to obtain an exponential lower bound for the Recursive algorithm combined with memoization, SCC decomposition, and dominion decomposition techniques. Indeed, the brute-force  procedure employed by the Dominion Decomposition algorithm of [26] needs at least time k+1 Ω 2 to find a dominion of size k + 1. For the sake of space and clarity of exposition, we postpone the formal treatment of the Big Step procedure to the extended version of this work, reporting here an informal description only. Intuitively, its exponential behavior on the SCCpfamily follows from the following observations: (i) the algorithm only looks for dominions of size d = 3 pn2 , where p and n are the numbers of priorities and positions, and (ii) the update of the measure functions used by the procedure requires an exponential number of steps in d before reaching a fixpoint. As a consequence, none of the dominion decomposition approaches, combined with memoization and SCC decomposition, can efficiently solve the SCC family. Corollary 6.1 (Exponential Dominion-Decomposition Worst Case). The solution time of the Recursive algorithm  √with  memoization, SCC decomposition, and dominion decomposition on a game with n positions Θ( n) is Ω 2 in the worst case. References [1] R. Alur, T.A. Henzinger & O. Kupferman (2002): Alternating-Time Temporal Logic. JACM 49(5), pp. 672–713, doi:10.1145/585265.585270. [2] K. Apt & E. Grädel (2011): Lectures in Game Theory for Computer Scientists. Cambridge University Press, doi:10.1017/CBO9780511973468. [3] L. Babai (2016): Graph Isomorphism in Quasipolynomial Time [Extended Abstract]. In: STOC’16, ACM, pp. 684–697, doi:10.1145/2897518.2897542. [4] M. Benerecetti, D. Dell’Erba & F. Mogavero: Solving Parity Games via Priority Promotion. Under submission. [5] M. Benerecetti, D. Dell’Erba & F. Mogavero (2016): A Delayed Promotion Policy for Parity Games. In: GANDALF16, EPTCS 226, pp. 30–45, doi:10.4204/EPTCS.226.3. [6] M. Benerecetti, D. Dell’Erba & F. Mogavero (2016): Improving Priority Promotion for Parity Games. In: HVC’16, LNCS 10028, Springer, pp. 1–17, doi:10.1007/978-3-319-49052-6 8. 134 Robust Exponential Worst Cases for Divide-et-Impera Algorithms for Parity Games [7] M. Benerecetti, D. Dell’Erba & F. Mogavero (2016): Solving Parity Games via Priority Promotion. In: CAV’16, LNCS 9780 (Part II), Springer, pp. 270–290, doi:10.1007/978-3-319-41540-6 15. [8] M. Benerecetti, F. Mogavero & A. Murano (2013): Substructure Temporal Logic. In: LICS’13, IEEECS, pp. 368–377, doi:10.1109/LICS.2013.43. [9] M. Benerecetti, F. Mogavero & A. Murano (2015): Reasoning About Substructures and Games. TOCL 16(3), pp. 25:1–46, doi:10.1109/LICS.2013.43. [10] D. Berwanger & E. Grädel (2004): Fixed-Point Logics and Solitaire Games. TCS 37(6), pp. 675–694, doi:10.1007/s00224-004-1147-5. [11] C.S. Calude, S. Jain, B. Khoussainov, W. Li & F. Stephan (2017): Deciding Parity Games in Quasipolynomial Time. In: STOC’17, ACM, pp. 252–263, doi:10.1145/3055399.3055409. [12] K. Chatterjee, T.A. Henzinger & N. Piterman (2010): Strategy Logic. doi:10.1016/j.ic.2009.07.004. [13] A. Condon (1992): The Complexity of Stochastic Games. doi:10.4230/LIPIcs.FSTTCS.2010.505. IC 208(6), pp. 677–693, IC 96(2), pp. 203–224, [14] A. Ehrenfeucht & J. Mycielski (1979): Positional Strategies for Mean Payoff Games. doi:10.1007/BF01768705. IJGT 8(2), [15] E.A. Emerson & C.S. Jutla (1991): Tree Automata, muCalculus, and Determinacy. In: FOCS’91, IEEECS, pp. 368–377, doi:10.1109/SFCS.1988.21949. [16] E.A. Emerson, C.S. Jutla & A.P. Sistla (2001): On Model Checking for the muCalculus and its Fragments. TCS 258(1-2), pp. 491–522, doi:10.1016/S0304-3975(00)00034-7. [17] E.A. Emerson & C.-L. Lei (1986): Temporal Reasoning Under Generalized Fairness Constraints. In: STACS’86, LNCS 210, Springer, pp. 267–278, doi:10.1007/3-540-16078-7 62. [18] J. Fearnley, S. Jain, S. Schewe, F. Stephan & D. Wojtczak (2017): An Ordered Approach to Solving Parity Games in Quasi Polynomial Time and Quasi Linear Space. In: SPIN’17, ACM, pp. 112–121, doi:10.1145/3092282.3092286. [19] O. Friedmann (2011): Recursive Algorithm for Parity Games Requires Exponential Time. RAIROTIA 45(4), pp. 449–457, doi:10.1051/ita/2011124. [20] O. Friedmann & M. Lange (2009): Solving Parity Games in Practice. In: ATVA’09, LNCS 5799, Springer, pp. 182–196, doi:10.1007/978-3-642-04761-9 15. [21] E. Grädel, W. Thomas & T. Wilke (2002): Automata, Logics, and Infinite Games: A Guide to Current Research. LNCS 2500, Springer, doi:10.1007/3-540-36387-4. [22] V.A. Gurvich, A.V. Karzanov & L.G. Khachivan (1990): Cyclic Games and an Algorithm to Find Minimax Cycle Means in Directed Graphs. USSRCMMP 28(5), pp. 85–91, doi:10.1016/0041-5553(88)90012-2. [23] M. Jurdziński (1998): Deciding the Winner in Parity Games is in UP ∩ co-UP. IPL 68(3), pp. 119–124, doi:10.1016/S0020-0190(98)00150-1. [24] M. Jurdziński (2000): Small Progress Measures for Solving Parity Games. In: STACS’00, LNCS 1770, Springer, pp. 290–301, doi:10.1007/3-540-46541-3 24. [25] M. Jurdziński & R. Lazic (2017): Succinct Progress Measures for Solving Parity Games. In: LICS’17, ACM, pp. 1–9, doi:10.1109/LICS.2017.8005092. [26] M. Jurdziński, M. Paterson & U. Zwick (2006): A Deterministic Subexponential Algorithm for Solving Parity Games. In: SODA’06, SIAM, pp. 117–123, doi:10.1145/1109557.1109571. [27] M. Jurdziński, M. Paterson & U. Zwick (2008): A Deterministic Subexponential Algorithm for Solving Parity Games. SJM 38(4), pp. 1519–1532, doi:10.1137/070686652. [28] N. Klarlund & D. Kozen (1991): Rabin Measures and Their Applications to Fairness and Automata Theory. In: LICS’91, IEEECS, pp. 256–265, doi:10.1109/LICS.1991.151650. M. Benerecetti, D. Dell’Erba, & F. Mogavero 135 [29] O. Kupferman & M.Y. Vardi (1998): Weak Alternating Automata and Tree Automata Emptiness. In: STOC’98, ACM, pp. 224–233, doi:10.1145/276698.276748. [30] A.D. Martin (1975): Borel Determinacy. AM 102(2), pp. 363–371. [31] A.D. Martin (1985): A Purely Inductive Proof of Borel Determinacy. In: SPM’82, Recursion Theory., AMS and ASL, pp. 303–308. [32] R. McNaughton (1993): Infinite Games Played on Finite Graphs. APAL 65, pp. 149–184, doi:10.1016/01680072(93)90036-D. [33] F. Mogavero, A. Murano, G. Perelli & M.Y. Vardi (2012): What Makes ATL* Decidable? A Decidable Fragment of Strategy Logic. In: CONCUR’12, LNCS 7454, Springer, pp. 193–208, doi:10.1007/978-3-64232940-1 15. [34] F. Mogavero, A. Murano, G. Perelli & M.Y. Vardi (2014): Reasoning About Strategies: On the Model-Checking Problem. TOCL 15(4), pp. 34:1–42, doi:10.1145/2631917. [35] F. Mogavero, A. Murano, G. Perelli & M.Y. Vardi (2017): Reasoning About Strategies: On the Satisfiability Problem. LMCS 13(1:9), pp. 1–37, doi:10.23638/LMCS-13(1:9)2017. [36] F. Mogavero, A. Murano & M.Y. Vardi (2010): Reasoning About Strategies. In: FSTTCS’10, LIPIcs 8, Leibniz-Zentrum fuer Informatik, pp. 133–144, doi:10.4230/LIPIcs.FSTTCS.2010.133. [37] A.W. Mostowski (1984): Regular Expressions for Infinite Trees and a Standard Form of Automata. In: SCT’84, LNCS 208, Springer, pp. 157–168, doi:10.1007/3-540-16066-3 15. [38] A.W. Mostowski (1991): Games with Forbidden Positions. Technical Report, University of Gdańsk, Gdańsk, Poland. [39] D. Neuen & P. Schweitzer (2017): An Exponential Lower Bound for Individualization-Refinement Algorithms for Graph Isomorphism. Technical Report, arXiv. [40] D. Neuen & P. Schweitzer (2017): Benchmark Graphs for Practical Graph Isomorphism. Technical Report, arXiv. [41] S. Schewe (2007): Solving Parity Games in Big Steps. In: FSTTCS’07, LNCS 4855, Springer, pp. 449–460, doi:10.1007/978-3-540-77050-3 37. [42] S. Schewe (2008): ATL* Satisfiability is 2ExpTime-Complete. In: ICALP’08, LNCS 5126, Springer, pp. 373–385, doi:10.1007/978-3-540-70583-3 31. [43] S. Schewe & B. Finkbeiner (2006): Satisfiability and Finite Model Property for the Alternating-Time muCalculus. In: CSL’06, LNCS 6247, Springer, pp. 591–605, doi:10.1007/11874683 39. [44] J. Vöge & M. Jurdziński (2000): A Discrete Strategy Improvement Algorithm for Solving Parity Games. In: CAV’00, LNCS 1855, Springer, pp. 202–215, doi:10.1007/10722167 18. [45] T. Wilke (2001): Alternating Tree Automata, Parity Games, and Modal muCalculus. BBMS 8(2), pp. 359–391. [46] W. Zielonka (1998): Infinite Games on Finitely Coloured Graphs with Applications to Automata on Infinite Trees. TCS 200(1-2), pp. 135–183, doi:10.1016/S0304-3975(98)00009-7. [47] U. Zwick & M. Paterson (1996): The Complexity of Mean Payoff Games on Graphs. TCS 158(1-2), pp. 343–359, doi:10.1016/0304-3975(95)00188-3.
8cs.DS
Fast, Multicore-Scalable, Low-Fragmentation Memory Allocation through Large Virtual Memory and Global Data Structures tifact * Keywords Memory allocator, virtual memory, concurrent data structures, multicore scalability 1. Introduction Dynamic memory management is a key technology for highlevel programming. Most of the existing memory allocators are extremely robust and well designed. Nevertheless, dynamic memory management for multicore machines is still a challenge. In particular, allocators either do not scale in performance for highly dynamic allocation scenarios, or they do scale but consume a lot of memory. Scalable performance of concurrent programs is crucial to utilize multicore hardware. Permission to make digital or hard copies of part or all of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for third-party components of this work must be honored. For all other uses, contact the owner/author(s). OOPSLA’15, October 25–30, 2015, Pittsburgh, PA, USA. Copyright is held by the owner/author(s). ACM 978-1-4503-3689-5/15/10. http://dx.doi.org/10.1145/2814270.2814294 at e d Categories and Subject Descriptors D.4.2 [Operating Systems]: Storage Management—Allocation/deallocation strategies; D.3.4 [Programming Languages]: Processors— Memory management (garbage collection) * Easy to ed R nt We demonstrate that general-purpose memory allocation involving many threads on many cores can be done with high performance, multicore scalability, and low memory consumption. For this purpose, we have designed and implemented scalloc, a concurrent allocator that generally performs and scales in our experiments better than other allocators while using less memory, and is still competitive otherwise. The main ideas behind the design of scalloc are: uniform treatment of small and big objects through so-called virtual spans, efficiently and effectively reclaiming free memory through fast and scalable global data structures, and constant-time (modulo synchronization) allocation and deallocation operations that trade off memory reuse and spatial locality without being subject to false sharing. um e Abstract We se eu * Complete * t en C * AE ll Doc Ev arXiv:1503.09006v2 [cs.PL] 25 Aug 2015 Ar * University of Salzburg, Austria [email protected] Ana Sokolova sis t Michael Lippautz PS L A O O * Con * Christoph M. Kirsch alu Martin Aigner Scalable allocation is needed for scalable performance of concurrent programs which allocate memory dynamically. Even though general purpose allocation was shown superior to custom allocation [4] a decade ago, many multithreaded applications still use custom allocation or limit dynamic allocation to very few threads. We have developed a new memory allocator called scalloc that enables programmers to design many-threaded high-performance applications that dynamically allocate memory without the need for any additional application-tailored allocation strategies. There are three high-level challenges in the design of a competitive concurrent allocator: (1) fast allocation for high performance, (2) memory layout facilitating fast access, and (3) effective and efficient reuse of memory for low memory consumption. All need to be achieved for various object sizes. Moreover, in presence of concurrency, all need to be achieved with as little coordination as possible. In particular, it is well-established common practice in concurrent allocators to allocate from thread-local allocation buffers (TLABs) [3] for fast allocation. The memory layout needs to support spatial locality without introducing false sharing. Finally, the key challenge is the reuse of free memory: When many threads deallocate objects of various sizes, even in other threads’ TLABs, the freed memory should ideally be globally available for immediate reuse by any thread (requiring thread synchronization) for any request (requiring memory defragmentation). Coordination is necessary for memory reuse, the challenge is to minimize its need and cost. Most competitive concurrent allocators are separated into a local (TLAB-based) frontend, for fast allocation, and a global backend, for reusing memory. TLABs grow and shrink incrementally in chunks of memory which we call spans. Note that spans are called superblocks in Hoard [3], SLABs in llalloc [23], superpages in Streamflow [27], and spans in TCMalloc [10]. Allocation is thread-local and fast as long as there is space in the allocating thread’s TLAB, otherwise the TLAB needs to grow by a new span. Therefore, the larger the spans are, the faster the allocation. However, the larger the spans, the higher the memory consumption, since free memory in the TLAB of a given thread is not available to any other thread. Only when a span is empty it can be reused by other threads via the global backend, or even be returned to the operating system. The scalability of the global backend is crucial for the scalability of the allocator. Hence, there is a trade-off between scalability and memory consumption. There are two possibilities in the design of spans: either all spans are of the same size, or not. If not all spans are of the same size, then making free spans reusable for as many requests as possible requires thread synchronization and defragmentation (to control external fragmentation). If they are of the same size, then free spans can be reused by all requests up to the size of the spans, only requiring thread synchronization. The disadvantage of same-sized spans that can accommodate small but also big objects is increased memory consumption (due to internal fragmentation). Most competitive concurrent allocators are therefore hybrids that use relatively small same-sized spans for small objects and different-sized spans for big objects. To address the challenges in scalable concurrent allocation, we have designed scalloc based on three main ideas introduced here: (a) virtual spans which are same-sized spans in virtual memory; (b) a scalable global backend based on recently developed scalable concurrent data structures; and (c) a constant-time (modulo synchronization) frontend that eagerly returns spans to the backend. We have implemented these three new concepts in scalloc which is open source written in standard C/C++ and supports the POSIX API of memory allocators (malloc, posix_memalign, free, etc.). Scalloc provides scalability and reduces memory consumption at the same time. Virtual spans reduce the need and cost of coordination (as they are all of the same size) and at the same time reduce memory consumption. Namely, a virtual span contains a real span of a typically much smaller size for actual allocation. Due to on-demand paging, the rest of the virtual span does not manifest in actual memory consumption. The trick is that the operating system implicitly takes care of physical memory fragmentation because the fraction of the virtual span that is unused has no cost aside of consuming virtual address space. Moreover, the same size of virtual spans allows us to use a single global data structure for collecting and reusing empty spans. Global shared data structures were long considered performance and scalability bottlenecks that were avoided by introducing complex hierarchies. Recent developments in concurrent data structure design show that fast and scalable pools, queues, and stacks are possible [1, 11, 15]. We leverage these results by providing a fast and scalable backend, called the span-pool, that efficiently and effectively reuses and returns free memory to the operating system (through madvise system calls). To the best of our knowledge, no other concurrent allocator uses a single global data structure as its backend. The frontend takes advantage of the scalable backend by eagerly returning spans as soon as they get empty. In contrast to other approaches, the frontend runs per-thread in constant time (modulo synchronization) meaning that at least one thread will make progress in constant time while others may have to retry. The combination of all three design choices is needed to achieve scalability and low memory consumption. Scalloc is based on a mix of lock-free and lock-based concurrent data structures to minimize code complexity without sacrificing performance (scalloc is implemented in around 3000 lines of code). In our and others’ [13] experience locks are still a good choice for synchronizing data structures that are mostly uncontended. Our experiments show that scalloc increases performance on average while consuming less memory than the previously fastest allocator (TBB). Furthermore, scalloc outperforms and outscales all allocators for varying objects sizes that fit virtual spans while consuming as much or less memory. Scalloc handles spatial locality without being subject to active or passive false sharing, like some other allocators. Access to memory allocated by scalloc is as fast or faster than with most other allocators. In the following section we provide high-level insight into the experience we gained when developing scalloc that is relevant to a broader audience beyond memory management experts. Section 3 explains the design of virtual spans, the span-pool, and the frontend and how they are integrated in scalloc. Section 4 discusses memory fragmentation and algorithmic complexity of scalloc. Section 5 provides implementation details relevant for performance and reproducibility but optional for understanding the rest of the paper. We discuss related work in Section 6 and present the experimental evaluation in Section 7. 2. Experience and Relevance In our experience with multicore machines dynamic memory management may be a temporal and spatial bottleneck on machines with increasingly many cores and an increasing amount of memory. The challenge is to develop fast, scalable, and low-fragmentation allocators that provide fast memory access and are robust, i.e., do all of that for as many workloads as possible. The following summary reflects our experience which we obtained in numerous experiments with different configurations and versions of scalloc as well as with many other stateof-the-art allocators. • 64-bit address spaces and on-demand paging help re- duce memory consumption and code complexity. On 64bit machines even extremely large amounts of virtual address fragmentation can be tolerated because of ondemand paging and the sheer number of virtual addresses available. For example, when allocating 1-byte objects only, scalloc in its default configuration may still allocate up to 256GB of physical memory in 32TB of virtual memory (16KB real spans in 2MB virtual spans). As ondemand paging does not map unused virtual memory, defragmentation is only done (simply through unmapping) virtual span un m m ap em pe or d y arena re ad ser dr ve es d se s when resizing empty real spans. Virtual spans enable uniform treatment of a large range of object sizes (1-byte to 1MB objects in default scalloc) only leaving huge objects (>1MB) to the operating system. In particular, virtual spans enable the use of a single global data structure for collecting and reusing empty spans called the spanpool. However, that data structure still needs to scale in performance. real span block payload virtual span real span header • Lock-freedom improves performance and scalability but it may not always be necessary for overall performance and scalability. The span-pool is a so-called distributed stack [11] of lock-free Treiber stacks [29] (stacks rather than queues for spatial locality). In default scalloc there are as many Treiber stacks in the span-pool as there are cores on the machine. Access to the span-pool works by first identifying one of the Treiber stacks, which is fast, and then operating on that, possibly in parallel with as many threads as there are cores. The key insight here is that a span-pool with only one Treiber stack does not scale anymore but, most interestingly, results in slightly lower memory consumption because threads find empty spans even faster. Moreover, replacing Treiber stacks with lock-based stacks results in loss of performance and limits scalability [15]. In a different part of scalloc we nevertheless use locks to synchronize access to an uncontended double-ended queue. Here, locking significantly reduces code complexity while not harming overall performance and scalability. • Constant-time deallocation is not only possible and obvi- ously good for robustness but can also be done to save memory. Allocating objects thread-locally without synchronization is fast and standard practice. Deallocating objects, however, is more difficult as it may happen concurrently in the same span. Encouraged by the performance and scalability of the span-pool, a technical innovation in scalloc is that spans are eagerly inserted into the span-pool as soon as they get empty, replacing possibly non-constant-time cleanup later. It turns out that doing so reduces memory consumption further, again without harming performance and scalability. On top of the design choices, a careful implementation of all concepts is necessary for competitive performance. We note that when comparing with other allocators, the implementations (and not necessarily the design choices) are being compared. Even a great concept may not perform when poorly implemented. 3. Virtual Spans, Span-Pool, and Frontend This section explains on conceptual level how virtual spans, the span-pool, and the frontend work, and how they are integrated in scalloc. Figure 1: Structure of arena, virtual spans, and real spans 3.1 Real Spans and Size Classes Like many other allocators, scalloc uses the well-known concept of size classes. A (real) span in scalloc is a contiguous portion of memory partitioned into same-sized blocks. The size of blocks in a span determines the size class of the span. All spans in a given size class have the same number of blocks. In scalloc, there are 29 size classes but only 9 distinct real-span sizes which are all multiples of 4KB (the size of a system page). The first 16 size classes, with block sizes ranging from 16 bytes to 256 bytes in increments of 16 bytes, are taken from TCMalloc [10]. These 16 size classes all have the same real-span size. Size classes for larger blocks range from 512 bytes to 1MB, in increments that are powers of two. These size classes may have different real-span size, explaining the difference between 29 size classes and 9 distinct realspan sizes. The design of size-classes limits block internal fragmentation for sizes larger than 16 bytes to less than 50%. Objects of size larger than any size class are not managed by spans, but rather allocated directly from the operating system using mmap. 3.2 Virtual Spans A virtual span is a span allocated in a very large portion of virtual memory (32TB) which we call arena. All virtual spans have the same fixed size of 2MB and are 2MB-aligned in the arena. Each virtual span contains a real span, of one of the available size classes. Wa say “size class of the virtual span” for the size class of the contained real span. Typically, the real span is (much) smaller than the virtual span that contains it. The maximal real-span size is limited by the size of the virtual span. This is why virtual spans are suitable for big objects as well as for small ones. The structure of the arena, virtual spans, and real spans is shown in Figure 1. The advantages of using virtual spans are: 1. Virtual memory outside of real spans does not cause fragmentation of physical memory, as it is not used and therefore not mapped (because of on-demand paging of the operating system); 2. Uniform treatment of small and big objects; 3. No repeated system calls upon every span allocation since the arena is mmapped only once. 1. Current kernels and hardware only provide a 48-bit, instead of a 64-bit, address space. As a result, not all of virtual memory can be utilized (see below); 2. Returning a virtual span to the span-pool may be costly in one scenario: a virtual span with a real span of a given size greater than a given threshold becomes empty and is inserted into the span pool. Then, in order to limit physical-memory fragmentation, we use madvise1 to inform the kernel that the remaining virtual (and thus mapped physical) memory is no longer needed. real-span size y real-span size n stack 1 stack 2 stack p free span free span free span free span free span free span free span – free span – free span pre allocated real-span size x – dynamic Note that since virtual spans are of the same size and aligned in virtual memory, getting a new virtual span from the arena is simply incrementing a bump pointer. When a virtual span gets empty, it is inserted into the free-list of virtual spans, i.e., the span-pool discussed in the next section. The disadvantages of using virtual spans are: Figure 2: Span-pool layout The span-pool is a global concurrent data structure that logically corresponds to an array of real-span-size-segregated “stack-like” pools. The span-pool implements put and get methods; no values are lost nor invented from thin air; it neither provides a linearizable emptiness check, nor any or- der guarantees. However, each pool within the span-pool is a locally linearizable [12] “stack-like” pool. It is “stack-like” since in a single-threaded scenario it is actually a stack. Figure 2 illustrates that the segregation by real-span size is implemented as pre-allocated array where each index in the array refers to a given real-span size. Consequently, all size classes that have the same real-span size refer to the same index. Each array entry then holds another preallocated array, the pool array, this time of lock-free Treiber stacks [29]. The pool array has size equal to the number of cores (determined at run-time during the initialization phase of the allocator). As a result a stack in any of the pools of the span-pool is identified by a real-span index and a core index. A Treiber stack is a pointer to the top of a singly-linked list of elements; pushing and popping is done lock-free by atomic compare-and-swap operations on the top pointer. The design is inspired by distributed queues [11]. We use stacks rather than queues for the following reasons: spatial locality, especially on thread-local workloads; lower latency of push and pop compared to enqueue and dequeue; and stacks can be implemented without sentinel nodes, i.e., no additional memory is needed for the data structure. Thereby, we utilize the memory of the elements inserted into the pool to construct the stacks, avoiding any dynamic allocation of administrative data structures. Distributed stacks are, to our knowledge, among the fastest scalable pools. To make the occurrence of the ABA problem [16] unlikely we use 16-bit ABA counters that are embedded into link pointers2 . Completely avoiding the ABA problem is a non-trivial task, which can be solved using e.g. hazard pointers [24]. Listing 1 shows the pseudo code of the span-pool. Upon returning a span to the span-pool, a thread performing a put call first determines the real-span index for a given span (line 21) and the core index as thread identifier modulo the number of cores (line 22). Before actually inserting (line 25) the given span into the corresponding stack the thread may return the span’s underlying memory to the operating system using the madvise system call with advice MADV_DONTNEED (line 24), effectively freeing the affected memory. This is the expensive case, only performed on spans with large real-span size determined by a threshold, 1 2 Note that the design of the span-pool minimizes the chances that a virtual span changes its real-span size. Mmapping virtual memory in a single call at this order of magnitude (32TB) is a new idea first developed for scalloc. Upon initialization, scalloc mmaps 245 virtual memory addresses, the upper limit for a single mmap call on Linux. This call does not introduce any significant overhead as the memory is not mapped by the operating system. It is still possible to allocate additional virtual memory using mmap, e.g. for other memory allocation or memory-mapped I/O. The virtual address space still left is 248 − 245 bytes, i.e., 224TB. In the worst case of the current configuration with 2MB virtual spans, if real spans are the smallest possible (16KB), the physical memory addressable with scalloc is (245 /221 ) ⋅ 214 bytes = 238 bytes = 256GB. We have also experimented with configurations of up to 128MB for virtual spans resulting in unchanged temporal and spatial performance for the benchmarks that were not running out of arena space. Enhancing the Linux kernel to support larger arenas is future work. On current hardware, with up to 48 bits for virtual addresses, this would enable up to 256TB arena space and 2TB addressable physical memory (in the worst case, with 2MB virtual spans and 16KB real spans). Note that in scalloc virtual spans do not restrict the possibility of observing segmentation faults because unmapped memory that is not used by a real-span is still protected against access using the mprotect system call. 3.3 Backend: Span-Pool madvise is used to inform the kernel that a a range of virtual memory is not needed and the corresponding page frames can be unmapped. Currently a 64-bit address space is limited to 48 bits of address, enabling the other 16 bits to be used as ABA counter. expected Arena (RSS = 0) Listing 1: Span-pool pseudo code 1 2 Int n u m _ c o r e s() ; Int t h r e a d _ i d() ; 3 4 5 6 7 8 // Utility f u n c t i o n s to map spans and real - span // sizes to distinct indexes . Int r e a l _ s p a n _ i d x( Span span ) ; Int r e a l _ s p a n _ i d x( Int r e a l _ s p a n _ s i z e) ; 9 10 11 free // Returns the number of cores . // Returns this thread ’s id // (0 - based ) . // Returns the real span size of a given span . Int r e a l _ s p a n _ s i z e( Span span ) ; hot Backend (RSS compacted) reusable floating Frontend (RSS = real span size) malloc() free() Figure 3: Life cycle of a span 12 13 14 15 // Madvise all but a span ’s first page with // M A D V _ D O N T N E E D. void m a d v i s e _ s p a n( Span span ) ; 16 17 18 SpanPool { Stack spans [ M A X _ R E A L _ S P A N _ I D X][ n u m _ c o r e s() ]; 19 void put ( Span span ) : Int rs_idx = r e a l _ s p a n _ i d x( span ) ; Int core_idx = t h r e a d _ i d() mod n u m _ c o r e s() ; i f r e a l _ s p a n _ s i z e( span ) >= M A D V I S E _ T H R E S H O L D: m a d v i s e _ s p a n( span ) ; spans [ rs_idx ][ core_idx ]. put ( span ) ; 20 21 22 23 24 25 26 Span get ( Int s i z e _ c l a s s) : Int rs_idx = r e a l _ s p a n _ i d x( s i z e _ c l a s s) ; Int core_idx = t h r e a d _ i d() mod n u m _ c o r e s() ; // Fast path . spans [ rs_idx ][ core_idx ]. get () ; i f span == NULL : // Try to reuse some other span . f o r rs_idx in range (0 , M A X _ R E A L _ S P A N _ I D X) : f o r core_idx in range (0 , n u m _ c o r e s() ) : spans_ [ rs_idx ][ core_idx ]. Get () ; i f span != NULL : r e t u r n span ; // If e v e r y t h i n g fails , just return a span from // the arena . r e t u r n arena . a l l o c a t e _ v i r t u a l _ s p a n() ; 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 } as unused spans with large physically mapped real-spans result in noticeable physical fragmentation and the madvise system call may anyway be necessary upon later reuse, e.g. when a span is to be reused in a size class with a smaller real-span size. The MADVISE_THRESHOLD (line 23) is set to 32KB, which is the boundary between real-span sizes of size classes that are incremented by 16 bytes and those that are incremented in powers of two. Note that lowering the threshold does not substantially improve the observed memory consumption in our experiments while it noticeably decreases performance. Furthermore, for scenarios where physical fragmentation is an issue, one can add a compaction call that traverses and madvises particular spans. Upon retrieving a span from the span pool, for a given size class, a thread performing a get call first determines the real-span index of the size class (line 28) and the core index as thread identifier modulo the number of cores (line 29). In the fast path for span retrieval the thread then tries to retrieve a span from this identified stack (line 31). Note that this fast path implements the match to the put call, effectively maximizing locality for consecutively inserted) and retrieved spans of equal real-span sizes. If no span is found in the fast path, the thread searches all real-span size indexes and core indexes for a span to use (lines 34–38). Note that this motivates the design of the real-span sizes: For reuse, a span of a large real-span size has anyway been madvised whereas all other spans have the same real-span size; Reusing a span in the same real-span size (even if the size class changes) amounts only to changing the header. Only when the search for an empty virtual span fails, the thread gets a new virtual span from the arena (as for initial allocation; line 41). Note that the search through the span-pool may fail even if there are spans in it due to the global use of the arrays (and the nonlinearizable emptiness check). 3.4 Frontend: Allocation and Deallocation We now explain the mutator-facing frontend of scalloc, i.e., the part of the allocator that handles allocation and deallocation requests from the mutator. We distinguish several states in which a span can be, illustrated in Figure 3. A span can be in a state: expected, free, hot, floating, or reusable. A span is expected if it is still in the arena, i.e., it is completely unused. Note that in this state its memory footprint is 0 bytes. Spans contained in the span-pool are free. A span can be in some of the other states only when it is in the frontend, i.e., it is assigned a specific size class. Spans that are hot are used for allocating new blocks. For spans that are not hot we distinguish between floating and reusable based on a threshold of the number of free blocks. Spans with less than or equal free blocks than the specified threshold are floating, spans with more free blocks than specified by the threshold are reusable. We refer to this threshold as reusability threshold. It is possible to only have spans that are floating, i.e., no reuse of nonempty spans, at the expense of increased fragmentation. Throughout its life in the frontend, a span is always assigned to exactly one local-allocation buffer (LAB), the so-called owning LAB. By default LABs are TLABs in scalloc, i.e., each LAB has a owner thread. Alternatively, scalloc can also be configured to use core-local allocation buffers (CLABs), i.e., one LAB per core where threads with equal identifiers modulo number of cores share the same LAB. Either way, in each LAB and for each size class there is a unique hot span. Furthermore, each LAB contains for each size class a set of reusable spans. More details about this set are given in Section 5. A consequence of the concept of ownership is that deallocation of a block may happen in spans that are not owned by a thread. We refer to such deallocation as remote free, whereas deallocation in a span owned by a thread is a local free. All allocations in scalloc are done locally, performed in the corresponding hot span. A common problem in allocator design is handling remote frees in a scalable way. Having no mechanism for handling remote frees results in so-called blowup fragmentation [3], i.e., any memory freed through remote frees cannot be reused again. Similar to other spanbased allocators [23, 27], scalloc provides two free lists of blocks in each span, a local free list and a remote free list. The local free list is only accessed by an owning thread, while the remote free list can be accessed concurrently by multiple (not owning) threads at the same time. Allocation. Upon allocation of a block in a given size class, a thread checks its LAB’s size class for a hot span. If a hot span exists the thread tries to find a block in the local free list of the hot span. If a block is found, the thread allocates in this block (this is the allocation fast path). The following situations can also occur (for implementation details see Section 5): (a) No hot span exists in the given size class. The thread then tries to assign a new hot span by trying to reuse one from the set of reusable spans. If no span is found there, the thread falls back to retrieving a span from the span-pool. (b) There is a hot span, but its local free list is empty. The idea now is to use a remotely freed block. However, it is not a wise option to allocate in the remote free list, as that would make allocation interfere with remote frees, destroying the performance of allocation. Therefore, this is a point of choice: If there are enough blocks (in terms of the reusability threshold) in the remote free list, the thread moves them all to its local free list and continues with fast-path allocation. Otherwise, if there are not enough blocks in the remote free list, the thread gets a new hot span like in (a). Deallocation. Upon deallocation, a thread returns the block to be freed to the corresponding free list, which is the local free list in case where the thread owns the span, and the remote free list otherwise. Depending on the state of the span where the block is allocated, the thread then performs the following actions (for implementation details see Section 5): (a) The span is floating. If the number of free blocks in this span is now larger than the reusability threshold, the span’s state changes to reusable and the span is inserted into the set of reusable spans of the owning LAB. (b) The span is reusable. If the free was the last free in the span, i.e., all blocks have been freed, the span is removed from the set of reusable spans of the owning LAB and returned to the span-pool. If the span is hot, no additional action is taken. Note that a new contribution of scalloc is that a span is freed upon the deallocation of the last object in the span. All other span-based allocators postpone freeing of a span until the next allocation which triggers a cleanup. 4. Properties Span-internal Fragmentation. Span-internal fragmentation is a global property and refers to memory assigned to a real-span of a given size class that is currently free (unused by the mutator) but cannot be reused for serving allocation requests in other size classes by any LAB. Let f be the current global span-internal fragmentation. Let s refer to the span on which the next operation happens. Let size be the size class of s and u be the size of the payload (memory usable for blocks) of s. At initialization f = 0. Then, for an allocation of a block in s f= { f + u − size f − size if no usable span (1) otherwise (2) where no usable spans means no hot span and no reusable spans are present (1). Note that a span might already be reusable (with respect to the threshold) but not yet present in the set of reusable spans. This case is still covered by (1) and is a result of the fact that freeing an object and further processing it (reusable sets, or span-pool) are operations performed non-atomically. Furthermore, for a deallocation of a block in s f= { f −u f + size if last block (3) otherwise (4) where last block (3) refers to the last free of a block in a given span. Note that to achieve this fragmentation property on a free call an allocator, such as scalloc, has to return an empty span to a global backend immediately. A regular free not emptying the span increases fragmentation by the size of the block as this span cannot be reused globally (4). Operation Complexity. An allocation operation only considers hot spans and reusable spans and does not need to clean up empty spans. The operation is constant-time as in the uncontended case either a hot span is present and can be used for allocating a block or a reusable span is made hot again before allocating a block in it. In the contended case more than one reusable span may need to be considered because of concurrent deallocation operations. At least one of the operations will make progress in constant time. A deallocation operation only considers the affected span, i.e., the span containing the block that is freed. Local deallocations are constant-time and remote deallocations are constant-time modulo synchronization (insertion into the remote free-list which is lock-free). Spans that get reusable are made reusable in constant-time modulo synchronization (insertion into the set of reusable spans which is lock-based). Spans that get empty are handled in the span-pool. Span-pool put and get operations are constant-time modulo synchronization (the span-pool is lock-free). block payload header link epoch owner local remote f-list f-list Listing 2: Auxiliary structures and methods free used free ... 43 44 // Constant i n d i c a t i n g t e r m i n a t e d LABs . Int T E R M I N A T E D; 45 Figure 4: Real span layout 46 47 LAB get_lab ( Int owner ) ; Bool i s _ o r p h a n( Span span ) ; 48 49 5. Implementation Details We now explain the implementation details of scalloc, i.e., the encoding of fields in headers and the concrete algorithms used for allocation, deallocation, and thread termination. The real-span header layout is shown in Figure 4. A link field is used to link up spans when necessary, i.e., it is used to link spans in the span-pool as well as in the set of reusable spans. The epoch field is used to uniquely identify a span’s state within its life cycle (see below). The local and remote free list contained in a span are encoded in the fields local f-list and remote f-list, respectively. A span’s owning LAB is encoded in the owner field. The fields of a LAB are: an owner field that uniquely identifies a LAB; for each size class a field that refers to the hot span, called hot_span; and per size class the set of reusable spans kept in a field reusable_span. Owner encoding. The owner field consists of two parts, an actual identifier (16 bits) of the owning LAB and a reference (48 bits) to the owning LAB. The whole field fits in a single word and can be updated atomically using compareand-swap instructions. Note that upon termination of the last thread that is assigned to a LAB, the owner is set to TERMINATED. Subsequent reuses of the LAB (upon assigning newly created threads to it) result in a different owner, i.e., the actual identifier is different while the reference to the LAB stays the same. Also note that due to thread termination a span’s owning LAB might have a different owner than the span’s owner field indicates. Epoch encoding. The epoch field is a single word that encodes a span’s state and an ABA counter. The states hot, free, reusable, and floating are encoded in the upper parts (bitwise) of the word. The ABA counter (encoded in the rest of the word) is needed for versioning spans as the state alone is not enough to uniquely encode a state throughout a span’s life cycle. E.g., one thread can observe a reusable span that after the last free is empty. Since freeing the object and transitioning the span into the state is not an atomic operation, another thread can now observe this span as empty (because it has been delayed after an earlier free operation) and put it into the span-pool. This span can now be reused by the same thread in the same size class ultimately ending up in the state reusable, but not completely empty. At this point the thread that initially freed the last block in the previous round needs to be prevented from transitioning it into state free. Remote f-list encoding. We use a Treiber stack [29] to implement the remote free list in a span. The top pointer of 50 51 52 Span { /* Free list i m p l e m e n t a t i o n s omitted . */ Int epoch ; Int owner ; Int s i z e _ c l a s s; 53 Bool Bool Bool Bool 54 55 56 57 t r y _ m a r k _ h o t( Int o l d _ e p o c h) ; t r y _ m a r k _ f l o a t i n g( Int o l d _ e p o c h) ; t r y _ m a r k _ r e u s a b l e( Int o l d _ e p o c h) ; t r y _ m a r k _ f r e e( Int o l d _ e p o c h) ; 58 Bool t r y _ r e f i l l _ f r o m _ r e m o t e s() ; Bool t r y _ a d o p t( Int n e w _ o w n e r) ; 59 60 61 } 62 63 64 Set { /* Set i m p l e m e n t a t i o n omitted . */ Int owner ; 65 void open ( Int owner ) ; void close () ; // Sets owner to T E R M I N A T E D; 66 67 68 Span get () ; Bool put ( Int old_owner , Span span ) ; Bool t r y _ r e m o v e( Int old_owner , Span span ) ; 69 70 71 72 } the stack is stored in its own cache line in the span header. Furthermore, we keep the number of blocks in the stack’s top pointer. This number is increased on each put operation. A single call is used to retrieve all blocks from this free list by atomically setting the stack’s top pointer to NULL (implicitly setting the block count to 0). Note that generating a new state (putting and retrieving all blocks) only requires the top pointer. As a result special ABA handling is not needed (ABA can occur, but is not a problem) 3 . Listing 2 provides an overview of auxiliary methods on spans and sets for reusable spans. Recall that an owner field embeds a reference to the corresponding LAB, which can be retrieved using get_lab (line 46). Furthermore, the function is_oprhan (line 47) is used to check whether the given span is an orphan, i.e., all threads assigned to its owning LAB have terminated before all blocks have been returned. A span then contains the previously mentioned epoch and owner fields (lines 50–51). The methods that try to mark a span as being in a specific state (lines 54–57) all take an epoch value and try to atomically change it to a new value that has the corresponding state bits set and the ABA counter increased. These calls are then used in the actual algorithm for allocation and deallocation to transition a span from one state into another. The method try_refill_from_remotes (line 59) is used to move remote blocks (if there are more available then reusability threshold) from the remote free list to the local one. The 3 For detailed explanations of the ABA problem see [24]. method try_adopt (line 60) is used to adopt orphaned spans, i.e., atomically change their owning LAB. Maintaining reusable spans should not have a noticeable performance impact (latency of allocation and deallocation) — which of course suggests using fast and scalable rather than non-scalable and slow data structures. Our design provides constant time put, get, and remove of arbitrary spans (lines 69–71). Furthermore, reusable spans are cleaned upon termination of the last thread assigned to a LAB, requiring open and close methods (lines 66–67) that effectively prohibit put and remove methods accessing a set when no owner (i.e. TERMINATED) is present or the owner is different than the one provided as parameter. For details on thread termination see below. Contention on sets of reusable spans is low as the sets are segregated by size class and LABs. For the implementation of reusable sets of spans in scalloc we use a lock-based deque. We are aware of lock-free implementations of deques [7] that can be enhanced to be usable in scalloc. However, the process of cleaning up the set at thread termination (see below) requires wait-freedom as other threads may still be accessing the data structure. Helping approaches can be used to (even efficiently [19]) solve this problem. Experiments suggest that contention on these sets is low and we thus keep the implementation simple. Listing 3: Frontend: Allocation, deallocation, and thread termination and initialization 73 74 75 76 LAB { Span hot_span [ N U M _ S I Z E _ C L A S S E S]; Set r e u s e a b l e _ s p a n s[ N U M _ S I Z E _ C L A S S E S]; Int owner ; 77 // Retrieve a span from the set of reusable spans // or the span - pool . Span get_span ( Int s i z e _ c l a s s) : Span span ; do : span = r e u s e a b l e _ s p a n s[ s i z e _ c l a s s]. get () ; i f span != NULL && span . t r y _ m a r k _ h o t( span . epoch ) : r e t u r n span ; u n t i l span == NULL ; span = s p a n _ p o o l. get ( s i z e _ c l a s s) ; span . t r y _ m a r k _ h o t( span . epoch ) ; // always succeeds r e t u r n span ; 78 79 80 81 82 83 84 85 86 87 88 89 90 91 Block allocate ( Int sc /* size class */ ) : i f hot_span [ sc ] == NULL : hot_span [ sc ] = get_span ( sc ) ; Block block = hot_span [ sc ]. a l l o c a t e _ b l o c k() ; i f block == NULL : // Case of empty local free list . i f hot_span [ sc ]. t r y _ r e f i l l _ f r o m _ r e m o t e s() : block = hot_span [ sc ]. a l l o c a t e _ b l o c k() ; r e t u r n block ; hot_span [ sc ]. t r y _ m a r k _ f l o a t i n g( span . epoch ) ; hot_span [ sc ] = get_span ( sc ) ; block = hot_span [ sc ]. a l l o c a t e _ b l o c k() ; r e t u r n block ; 92 93 94 95 96 97 98 99 100 101 102 103 104 Listing 3 illustrates the main parts of scalloc’s frontend. For simplicity we omit error handling, e.g. returning out of memory. Recall that each LAB is assigned an owner and holds for each size class a reference to the hot_span and the reusable_spans (lines 74–76). The method get_span (line 80) is used to retrieve new spans, either from the reusable spans (lines 82–87), or from the span-pool (line 88). The calls to try_mark_hot on line 85 and line 89 represent the transitions free → hot and reusable → hot, respectively. Note that the transition free → hot does not compete with any other threads. The method allocate (line 92) is used to allocate a single block in a hot span. If no hot span is present a new one is obtained using get_span (line 94). The hot span is then used to retrieve a block from the local free list of a span (line 95). If this attempt fails because the local free list is empty, the remote free list is inspected. If enough (with respect to reusability threshold represented as REUSABILITY_THRESHOLD) remotely freed blocks are available, they are moved to the local free list (line 98), just before actually allocating a new block (line 99). If not enough remotely freed blocks are available the current hot span is marked as floating (line 101), i.e., the hot span takes the transition hot → floating, and a new hot span is retrieved (line 102). The block is then allocated in the new hot span (line 103). The method deallocate (line 106) is used to free a single block. Since freeing a block and transitioning spans through states are non-atomic operations, the owner and epoch values of a span are stored before freeing the 105 void d e a l l o c a t e( Block block ) : Span span = s p a n _ f r o m _ b l o c k( block ) ; Int sc = span . s i z e _ c l a s s; Int o l d _ o w n e r = span . owner ; Int o l d _ e p o c h = span . epoch ; span . free ( block , owner ) ; i f span . i s _ o r p h a n() : span . t r y _ a d o p t( owner ) ; i f span . f r e e _ b l o c k s() > R E U S A B I L I T Y _ T H R E S H O L D: i f span . t r y _ m a r k _ r e u s a b l e( o l d _ e p o c h) : o l d _ o w n e r. r e u s e a b l e _ s p a n s[ sc ]. put ( old_owner , span ) ; i f span . is_full () : i f span . t r y _ m a r k _ f r e e( o l d _ e p o c h) : o l d _ o w n e r. r e u s e a b l e _ s p a n s[ sc ]. t r y _ r e m o v e( old_owner , span ) ; s p a n _ p o o l. put ( span ) ; 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 void t e r m i n a t e() : f o r sc in s i z e _ c l a s s e s: r e u s e a b l e _ s p a n s[ sc ]. close () ; hot_span [ sc ]. t r y _ m a r k _ f l o a t i n g( hot_span [ sc ]. epoch ) ; hot_span [ sc ] = NULL ; Span span ; do : span = r e u s e a b l e _ s p a n s[ sc ]. get () ; span . t r y _ m a r k _ f l o a t i n g( span . epoch ) ; u n t i l span == NULL ; owner = T E R M I N A T E D; 124 125 126 127 128 129 130 131 132 133 134 135 136 void init ( Int n e w _ o w n e r) : owner = n e w _ o w n e r; f o r sc in s i z e _ c l a s s e s: r e u s e a b l e _ s p a n s[ sc ]. open ( n e w _ o w n e r) ; 137 138 139 140 141 } block (lines 109–110). The span’s free call (line 111) then puts the block into the corresponding free list (local or remote, depending on the owner of the span). If after this free, the number of free blocks is larger than the reusability threshold (line 114), the span is put into state reusable (floating → reusable). Similar to other state transitions, this action is serialized through try_mark_reusable (line 115). The succeeding thread then also tries to insert the span into the set of reusable spans for this size class (line 117). Note that this call takes the old owner as parameter to prohibit inserting into a reusable set of a LAB that has either no owner or an owner that is different from the old owner. Similarly, making the transition reusable → free requires marking it as free through try_mark_free (line 119). Note that marking a span as free competes with reusing it in get_span. After successfully marking it as free the span can be removed (if needed) from the set of reusable spans (line 121). Finally, the span is put into the span-pool (line 122). Thread Termination. Similar to others [17], we refer to spans that have not yet been transitioned into the state free (because they contain live blocks) while all threads assigned to their owning LAB have terminated as orphaned spans. Since LABs do not necessarily have references to all owned spans (there exist no references to floating spans) a span cannot be declared as orphaned by setting a flag. Instead, orphaned spans can be detected by comparing a span’s owner against the owner that is set in the owning LAB. Owner fields that differ or a LAB owner set to TERMINATED indicates an orphaned span. Orphaned spans are always floating and adopted by threads upon freeing a block in these spans (lines 112–113). LAB cleanup happens in terminate (line 124) where for each size class (lines 125–134) the reusable spans set is closed (line 126), and all spans (hot and reusable) are transitioned into state floating (line 128 and line 133). For reusable spans this transition competes with reusable → free (line 119), where a potential last free of a block in a span triggers putting the span into the span-pool. Finally, the LAB is marked as terminated and consequently all spans that are not free can be observed as orphaned. Reusing a LAB later on requires setting a new unique owner (line 140). Handling Large Objects. Scalloc provides span-based allocation of blocks of size less than or equal to 1MB and relies on conventional mmap for all other objects. For allocation this means that the frontend just forwards the allocation request to an allocator that just mmaps the block and adds a header containing the required size. Deallocation requires checking whether a block has been allocated in a span or not. However, since spans are contained in a single large arena this check is cheap (xor-ing against aligned arena boundary). Depending on whether the block has been allocated in a span or not, the request is just forwarded appropriately. Unwritten Rules. The illustrated concepts yield a design that provides scalability on a multi-core system while keeping memory compact with respect to to a reusability threshold. To this end we would like to note that being competitive in absolute terms requires an implementation that forces strict inlining of code, careful layout of thread-local storage, and intercepting thread creation and termination. Without those techniques absolute performance suffers from overheads of function calls as well as cache misses (for unnecessarily checking conditions related to thread-local storage). 6. Related Work We first discuss related work on concurrent data structures and then on existing concurrent memory allocators. Concurrent data structures in the fast path of the frontend as well as the backend of scalloc are lock-free [16]. A recent trend towards semantically relaxed concurrent data structures [1, 15] opens doors for new design ideas and even greater performance and scalability so that hierarchies of spans (buffers in general) can be avoided and may be utilized globally across the whole system. The concurrent data structures in scalloc are pools, allowing in principle every data structure with pool semantics to be used. However, unlike segment queues [1] and k-Stacks [15], Distributed Queues [11] with Treiber stacks [29], as used in scalloc, do not require dynamically allocated administrative memory (such as sentinel nodes), which is important for building efficient memory allocators. The data structures for reusable spans within a TLAB are implemented using locks but could in principle be replaced with wait-free sets, which nowadays can be implemented almost as efficiently as their lock-free counterparts [19]. Many concepts underlying scalloc such as size classes, hierarchical allocation (local allocation buffers, spans), and local memory caching in so-called private heaps (span ownership) have already been introduced and studied in threadlocal variants [3, 30]. Scalloc borrows from some of these concepts and integrates them with lock-free concurrent data structures, and introduces new ideas like virtual spans. In our experiments we compare scalloc to some of the best and most popular concurrent memory allocators: Hoard (git-13c7e75), jemalloc (3.6.0), llalloc (1.4), ptmalloc24 (libc 2.19), Streamflow (git-41aa80d), SuperMalloc (git-bd7096f), Intel TBB allocator (4.3), and TCMalloc (googleperftools 2.1). McRT-Malloc [17] is left out of our comparison because of a missing implementation. For Michael’s allocator [25] there exists no reference implementation — an implementation for x86-64 by the Streamflow authors crashes for all our benchmarks; we have received another implementation5 which unfortunately does not perform and scale as we expect from the original paper. We thus decided to leave the Michael allocator out of our comparisons. ptmalloc2 [9] extends Doug Lea’s malloc [22] (dlmalloc; 2.7.x) and is part of the GNU libc library. jemalloc [8] 4 Since ptmalloc3 performs worse than ptmalloc2, we exclude ptmalloc3 from our experimental evaluation. 5 In a private correspondence we received pointers to the Amino Concurrent Building Blocks (http://amino-cbbs.sourceforge.net/) malloc implementation. is the default allocator in FreeBSD and NetBSD and has been integrated into products of Mozilla (like Firefox) and Facebook. TCMalloc [10] is Google’s counter-part to jemalloc, also aiming at performance and scalability. TBB [18] is maintained by Intel as part of their thread building block library which aims at easy creation of fast and scalable multithreaded programs. llalloc [23] is an allocator developed by Lockless Inc. Hoard [3] and Streamflow [27] are both academic allocators known to perform well. SuperMalloc [20] is another recently developed academic allocator introducing, to our knowledge independently, after scalloc’s virtual spans, the idea of segmenting virtual address space for uniform treatment of different-sized objects. Note that the concept of virtual spans may readily be used in other allocators and is orthogonal to the actual allocator design. Moreover, mapping virtual memory in a scalable fashion, e.g. as in RadixVM [6], does not solve the problem of designing a competitive allocator. Memory fragmentation and systemcall overhead still need to be managed. All mentioned allocators create private heaps in one way or another. This design has proven to reduce contention and (partially) avoid false sharing. Scalloc is no different in this aspect as it also creates private heaps (span ownership) and exchanges space between threads (through the span-pool). Another aspect all allocators have in common are heaps segregated by size classes for spatial locality. It makes object headers obsolete (except for coalescing which is why ptmalloc2 uses them). Allocators implementing private heaps without returning remotely freed objects to the allocating threads suffer from unbounded blowup fragmentation in producerconsumer workloads [3]. Hence, it is necessary to transfer remotely freed memory back to the heap it was allocated on. ptmalloc2 solves the blowup fragmentation problem by globally locking and then deallocating the block where it has been allocated. TCMalloc and jemalloc both maintain caches of remotely freed objects which are only returned to a global heap when reaching certain thresholds. Hoard allocates objects in superblocks which are similar to the spans in scalloc. Unlike scalloc, Hoard returns remotely freed objects in a hierarchical fashion, first by deallocating the objects in the superblocks in which they were allocated, then by transferring superblocks between private heaps, and eventually by transferring superblocks from private heaps to a global heap. For this purpose, Hoard locks the involved superblocks, private heaps, and the global heap. llalloc, Streamflow, and TBB maintain a private and a public free-list per thread and size class. The public free lists are implemented using lock-free algorithms. Scalloc does exactly the same. To this end we would like to note that the frontends of llalloc and Streamflow are to some extent similar to scalloc’s frontend. However, both allocators require cleaning up empty spans in allocation calls, and use different strategies for large objects and backends. Another common practice in many allocators is to handle small and big objects, whatever the threshold between small and big is, in separate sub-allocators which are typically based on entirely different data structures and algorithms. jemalloc, llalloc, ptmalloc2, and TCMalloc are such hybrid allocators, whereas Hoard, scalloc, Streamflow, SuperMalloc, and TBB are not. ptmalloc2 manages big objects in best-fit free-lists, jemalloc and TCMalloc round the size of big objects up to page multiples and allocate them from the global heap, and llalloc maintains a binary tree of big objects (c.f. binary buddy system) in a large portion of memory obtained from the operating system. Huge objects, again whatever the threshold between big and huge is, are handled by the operating system in all considered allocators including scalloc. The principle challenge is to determine the thresholds between small and big, for hybrid allocators, as well as between big and huge, for all allocators. Scalloc addresses that challenge, through virtual spans, by removing the threshold between small and big objects and by making the threshold between big and huge so large that it is likely to be irrelevant in the foreseeable future for most existing applications. A concept related to virtual spans called spaces appears in the Memory Management Toolkit (MMTk) for managed languages [5]. We note that the generally poor performance of SuperMalloc for concurrent workloads shows that virtual spans alone do not suffice for achieving competitive temporal and spatial performance and scalability. Virtual spans alone only simplify allocator design as they enable uniform treatment of small and big objects, and reduce memory consumption. As shown in our experimental evaluation, the combination of virtual spans with a scalable backend and a highperformance frontend is crucial for achieving competitive performance and scalability. 7. Experimental Evaluation In our experiments we compare scalloc with other allocators and with other scalloc configurations on synthetic and real workloads. Our evaluation is structured in two parts. The first part of the evaluation covers well known allocator workloads from the literature (threadtest, shbench, larson) [3, 21, 26] as well as the single-threaded allocation intensive workload 483.xalancbmk from the SPEC CPU2006 suite [14] that are known to perform interesting usage patterns, e.g. threadtest provides a completely thread-local workload for batched allocation and deallocation of objects. Furthermore, the evaluation also employs workloads generated with ACDC [2], a benchmarking tool that can be configured to emulate virtually any relevant workload characteristic not covered by existing benchmarks, e.g. producer-consumer patterns, varying object sizes, and different object access patterns. The second part of the evaluation focuses on our design decisions implemented in scalloc. In particular, we show the impact of effectively disabling key features of scalloc like virtual spans. We have also experimented with application benchmarks and generally found that scalloc either performs as other competitive allocators or better. However, in our and others’ [25] experience most concurrent applications either use custom allocation or tailor their behavior so that very few threads allocate concurrently, as is the case in e.g. the Chrome web browser. We see our work as a step towards providing an infrastructure that changes this practice. A summary of all benchmarks can be found in Table 1. A detailed description of each experiment is presented in the corresponding subsection. All experiments ran on a UMA machine with four 10core 2GHz Intel Xeon E7-4850 processors supporting two hardware threads per core, 32KB 8-way associative L1 data cache and 32KB 4-way associative L1 instruction cache per core, 256KB unified 8-way associative L2 cache per core, 24MB unified 24-way associative L3 cache per processor, 128GB of main memory, and Linux kernel version 3.8.0. Note that recent Linux kernels provide the ability to use transparent huge pages6 as backing store for regular pages, i.e., huge pages can be used by the kernel as physical page frames for regular pages. Since this feature interferes with any mechanism relying on on-demand paging, e.g. calling madvise to return memory, we have disabled it in all experiments except one where we use it to disable virtual spans intentionally. Transparent huge pages also impact other allocators, e.g. jemalloc. There are two configurable parameters in scalloc, MADVISE_THRESHOLD and REUSABILITY_THRESHOLD. We choose MADVISE_THRESHOLD to be 32KB which is the smallest real-span size. In principle one can set the threshold as low as the system page size, effectively trading performance for lower memory consumption, but as spans are subject to reuse at all times this is not necessary. Furthermore we choose REUSABILITY_THRESHOLD to be 80%, i.e., spans may be reused as soon as 80% of their blocks are free. Span reuse is useful in workloads that exhibit irregular allocation and deallocation patterns. Since span reuse optimizes memory consumption with negligible overhead we have also considered a configuration that does not reuse spans and discuss the results but do not show the data for clarity. Unless explicitly stated we report the arithmetic mean of 10 sample runs including the 95% confidence interval based on the corrected sample standard deviation. For memory consumption we always report the resident set size (RSS). The sampling frequency varies among experiments and has been chosen high enough to not miss peaks in memory consumption between samples. Since most benchmarks do not report memory consumption we employ an additional process for measuring the RSS. As a result, benchmarks like threadtest, larson, and shbench only scale until 39 threads. We still report the 40 threads ticks to illustrate this behavior. 6 See https://www.kernel.org/doc/Documentation/vm/transhuge.txt Table 1: Summary of benchmarks B ENCHMARK O BJECT S IZE [B YTES ] S INGLE - THREADED 483.xalancbmk 1-2M M ULTI - THREADED Threadtest Shbench Larson Prod.-Cons. False Sharing Object Sizes Spatial Locality 64 1-8 7-8 16-512 8 16-4M 16-32 D ESIGN D ECISIONS Virtual Spans 16-4M Span-Pool 256 Frontend 64 L OCAL F REES R EMOTE F REES T HREAD T ERM . 100% 0% no 100% 0% 100% 0% ≥ 99% < 1% see Section 7.3 see Section 7.4 100% 0% 100% 0% no no yes no no no no 100% 100% 100% no no no 0% 0% 0% 7.1 Single-threaded Workload: 483.xalancbmk We compare different allocators on the 483.xalancbmk workload of the SPEC CPU2006 suite which is known to be an allocation intense single-threaded workload [28]. Figure 5 reports a benchmark score called ratio where a higher ratio means a lower benchmark running time. The results omit data for Streamflow because it crashes. Scalloc (among others) provides a significant improvement compared to ptmalloc2 but the differences among the best performing allocators including scalloc are small. Nevertheless, the results demonstrate competitive single-threaded temporal performance of scalloc. Note that the SPEC suite does not provide metrics for memory consumption. 7.2 Thread-local Workloads We evaluate the performance of allocators in workloads that only consist of thread-local allocations and deallocations. Recall that scalloc only allocates blocks in a hot span of a given size class. Hence, workloads that perform more consecutive allocations in a single size class than a span can hold blocks (i.e. the working set is larger than the real-span size) result in benchmarking the span-pool. Threadtest Threadtest [3] allocates and deallocates objects of the same size in a configurable number of threads and may perform a configurable amount of work in between allocations and deallocations. For a variable number of threads t, the benchmark is configured to perform 104 rounds per thread of allo5 cating and deallocating 10t objects of 64 bytes. For temporal performance we show the speedup with respect to singlethreaded ptmalloc2 performance. In scalloc, objects of 64 bytes are allocated in 64-byte blocks in spans with a real-span size of 32KB. Since allocations and deallocations are performed in rounds reusing of spans has no effect on memory consumption. The overhead all other allocators except for llalloc which consumes more memory. Note that reusing spans in this benchmark has an impact on memory consumption. Scalloc is configured to reuse at 80% free blocks in a span. Disabling reusing of spans results for 20 threads in a memory consumption increase of 14.7% (while having no noticeable impact on performance). This suggests that reusing spans in scalloc is important in non-cyclic workloads. Note that the decrease of memory consumption at 6 threads is a workload artifact. In contrast, the peak in memory consumption for llalloc at 20 threads (which is repeatable) suggests an allocator artifact. 1.35 relative score to ptmalloc2 (SPEC ratio; more is better) 1.3 1.25 1.2 1.15 1.1 1.05 Larson (Thread Termination) 1 ar Ho d je c llo ma c loc allo llal er M p Su B TB c llo Ma TC c llo sca Figure 5: Single-threaded temporal performance: SPEC CPU2006 483.xalancbmk of adding and removing spans to the reusable set is negligible. Figure 6a illustrates temporal performance where all allocators but jemalloc scale until 39 threads with only the absolute performance being different for most allocators. Since the working set for a single round of a thread is roughly 6.4MB, allocators are forced to interact with their backend. The results suggest that the span-pool with its strategy of distributing contention provides the fastest backend of all considered allocators. The memory consumption shown in Figure 6b suggests that threads do not exhibit a lock-step behavior, i.e., they run out of sync with respect to their local rounds, which ultimately manifests in lower memory consumption for a larger number of threads. The span-pool supports this behavior by providing a local fast path with a fall back to scalable global sharing of spans. Shbench Similar to threadtest, shbench [26] exhibits a thread-local behavior where objects are allocated and deallocated in rounds. Unlike threadtest though, the lifetime of objects is not exactly one round but varies throughout the benchmark. For a variable number of threads t, the benchmark is configured to perform 106 rounds per thread of objects between 1 and 8 bytes in size. We exclude Streamflow from this experiment because it crashes for more than 1 thread in the shbench workload. For temporal performance we show the speedup with respect to single-threaded ptmalloc2. Figure 6c shows the performance results. As objects survive rounds of allocations the contention on the span-pool is not as high as in threadtest. The memory consumption in Figure 6d indicates that the absolute performance is determined by span sizes (or other local buffers). Allocators that keep memory compact in this benchmark also suffer from degrading absolute performance. Scalloc performs better than The larson benchmark [21] simulates a multi-threaded server application responding to client requests. A thread in larson receives a set of objects, randomly performs deallocations and allocations on this set for a given number of rounds, then passes the set of objects on to the next thread, and finally terminates. The benchmark captures robustness of allocators for unusual allocation patterns including terminating threads. Unlike results reported elsewhere [27] we do not observe a ratio of 100% remote deallocations as larson also exhibits thread-local allocation and deallocation in rounds. For a variable number of threads t, the benchmark is configured to last 10 seconds, for objects of 7 bytes (smallest size class for all allocators), with 103 objects per thread, and 104 rounds per slot of memory per thread. Unlike the other experiments, the larson benchmark runs for a fixed amount of time and provides a throughput metric of memory management operations per second. We exclude Streamflow from this experiment as it crashes under the larson workload. Figure 7a illustrates temporal performance where all considered allocators scale but provide different speedups. Similar to shbench, the rate at which spans get empty varies. The memory consumption in Figure 7b illustrates that better absolute performance comes at the expense of increased memory consumption. Furthermore, terminating threads impose the challenge of reassigning spans in scalloc (and likely also impose a challenge in other allocators that rely on threadlocal data structures). Similar to shbench, reusing spans before they get empty results in better memory consumption. Disabling span reuse increases memory consumption by 7.6% at 20 threads while reducing performance by 2.7%. 7.3 Producer-Consumer Workload This experiment evaluates the temporal and spatial performance of a producer-consumer workload to study the cost of remote frees and possible blowup fragmentation for an increasing number of producers and consumers. For that purpose we configure ACDC such that each thread shares all allocated objects with all other threads, accesses all local and shared objects, and eventually the last (arbitrary) thread accessing an object frees it. The probability of a remote free in the presence of n threads is therefore 1 − 1/n, e.g. running llalloc ptmalloc2 Streamflow SuperMalloc 50 TBB TCMalloc memory consumption in MB (less is better) speedup with respect to ptmalloc2 (more is better) Hoard jemalloc 45 40 35 30 25 20 15 10 5 0 1 2 4 6 8 10 20 number of threads 30 compact scalloc 14 12 10 8 6 4 2 0 40 1 2 4 6 8 10 (a) Speedup 20 number of threads 30 40 30 40 30 40 (b) Memory consumption 140 2 memory consumption in GB (less is better) speedup with respect to ptmalloc2 (more is better) Figure 6: Thread-local workload: Threadtest benchmark 120 100 80 60 40 20 0 1 2 4 6 8 10 20 number of threads 30 1.8 1.6 1.4 1.2 1 0.8 0.6 0.4 0.2 0 40 1 2 4 6 8 10 (c) Speedup 20 number of threads (d) Memory consumption Figure 7: Thread-local workload: Shbench benchmark memory consumption in MB (less is better) million operations per sec (more is better) 200 180 160 140 120 100 80 60 40 20 0 12 4 8 10 20 number of threads (a) Throughput 30 40 8 7 6 5 4 3 2 1 0 12 4 8 10 20 number of threads (b) Memory consumption Figure 8: Thread-local workload (including thread termination): Larson benchmark llalloc ptmalloc2 Streamflow SuperMalloc total per-thread allocator time in seconds (less is better) 0.4 0.35 0.3 0.25 0.2 0.15 0.1 0.05 0 2 4 6 8 10 20 number of threads 30 40 TBB TCMalloc average per-thread memory consumption in MB (less is better) Hoard jemalloc (a) Total per-thread allocator time compact scalloc 16 14 12 10 8 6 4 2 0 2 4 6 8 10 20 number of threads 30 40 (b) Average per-thread memory consumption Figure 9: Temporal and spatial performance for the producer-consumer experiment 100000 average memory consumption in MB (logscale, less is better) 100 10 1 0.1 0.01 1000 100 10 object size range in bytes (logscale) (c) Total allocator time 4M 1- M B B B 64 6K -2 B1 56 4K K B B K -6 16 16 4- 4K B B 1- 1K 625 -2 -6 56 4B 64 4M 1- M B1 56 25 25 6K -2 64 B B B K B 4K B -6 K 16 16 4- 4K B B 1- 1K B 625 -2 56 4B 64 -6 B 1 0.001 16 10000 16 total allocator time in seconds (logscale, less is better) 1000 object size range in bytes (logscale) (d) Average memory consumption Figure 10: Temporal and spatial performance for the object-size robustness experiment at 40 threads two threads causes on average 50% remote frees and running 40 threads causes on average 97.5% remote frees. Figure 9a presents the total time each thread spends in the allocator for an increasing number of producers/consumers. Up to 30 threads scalloc and Streamflow provide the best temporal performance and for more than 30 threads scalloc outperforms all other allocators. The average per-thread memory consumption illustrated in Figure 9b suggests that all allocators deal with blowup fragmentation, i.e., we do not observe unbounded growth in memory consumption. However, the absolute differences among different allocators are significant. Scalloc provides competitive spatial performance where only jemalloc and ptmalloc2 require less memory at the expense of higher total per-thread allocator time. This experiment demonstrates that the approach of scalloc to distributing contention across spans with one remote free list per span works well in a producer-consumer workload and that using a lock-based implementation for reusing spans is not a performance bottleneck. 7.4 Robustness against False Sharing False sharing occurs when objects that are allocated in the same cache line are read from and written to by different threads. In cache coherent systems this scenario can lead to performance degradation as all caches need to be kept consistent. An allocator is prone to active false sharing [3] if objects that are allocated by different threads (without communication) end up in the same cache line. It is prone to passive false sharing [3] if objects that are remotely deallo- 7.5 Robustness for Varying Object Sizes We configure the ACDC allocator benchmark [2] to allocate, access, and deallocate increasingly larger thread-local objects in 40 threads (number of native cores) to study the scalability of virtual spans and the span pool. Figure 9c shows the total time spent in the allocator, i.e., the time spent in malloc and free. The x-axis refers to intervals [2x , 2x+2 ) of object sizes in bytes with 4 ≤ x ≤ 20 at increments of two. For each object size interval ACDC allocates 2x KB of new objects, accesses the objects, and then deallocates previously allocated objects. This cycle is repeated 30 times. For object sizes smaller than 1MB scalloc outperforms all other allocators because virtual spans enable scalloc to rely on efficient size-class allocation. The only possible bottleneck in this case is accessing the span-pool. However, even in the presence of 40 threads we do not observe contention on the span-pool. For objects larger than 1MB scalloc relies on mmap which adds system call latency to allocation and deallocation operations and is also known to be a scalability bottleneck [6]. The average memory consumption (illustrated in Figure 9d) of scalloc allocating small objects is higher (yet still competitive) because the real-spans for size-classes smaller than 32KB have the same size and madvise is not enabled for them. For larger object sizes scalloc causes the smallest memory overhead comparable to jemalloc and ptmalloc2. This experiment demonstrates the advantages of trading virtual address space fragmentation for high throughput and low physical memory fragmentation. 7.6 Spatial Locality In order to expose differences in spatial locality, we configure ACDC to access allocated objects (between 16 and 32 bytes) increasingly in allocation order (rather than out-ofallocation order). For this purpose, ACDC organizes allo- 12 total memory access time in seconds (less is better) cated by a thread are immediately usable for allocation by this thread again. We have conducted the false sharing avoidance evaluation benchmark from Berger et. al. [3] (including active-false and passive-false benchmarks) to validate scalloc’s design. The results we have obtained suggest that most allocators avoid active and passive false sharing. However, SuperMalloc and TCMalloc suffer from both active and passive false sharing, whereas Hoard is prone to passive false sharing only. We omit the graphs because they only show binary results (either false sharing occurs or not). Scalloc’s design ensures that in the cases covered by the active-false and passive-false benchmarks no false sharing appears, as spans need to be freed to be reused by other threads for allocation. Only in case of thread termination (not covered by the active-false and passive-false benchmarks) threads may adopt spans in which other threads still have blocks, potentially causing false sharing. We have not encountered false sharing with scalloc in any of our experiments. 10 8 6 4 2 0 0 20 40 60 80 percentage of object accesses in allocation order 100 Figure 11: Memory access time for the locality experiment cated objects either in trees (in depth-first, left-to-right order, representing out-of-allocation order) or in lists (representing allocation order). ACDC then accesses the objects from the tree in depth-first, right-to-left order and from the list in FIFO order. We measure the total memory access time for an increasing ratio of lists, starting at 0% (only trees), going up to 100% (only lists), as an indicator of spatial locality. ACDC provides a simple mutator-aware allocator called compact to serve as optimal (yet without further knowledge of mutator behavior unreachable) baseline. Compact stores the lists and trees of allocated objects without space overhead in contiguous memory for optimal locality. Figure 11 shows the total memory access time for an increasing ratio of object accesses in allocation order. Only jemalloc and llalloc provide a memory layout that can be accessed slightly faster than the memory layout provided by scalloc. Note that scalloc does not require object headers and reinitializes span free-lists upon retrieval from the span-pool. For a larger ratio of object accesses in allocation order, the other allocators improve as well but not as much as llalloc, scalloc, Streamflow, and TBB which approach the memory access performance of the compact baseline allocator. Note also that we can improve memory access time with scalloc even more by setting its reusability threshold to 100%. In this case spans are only reused once they get completely empty and reinitialized through the span-pool at the expense of higher memory consumption. We omit this data for consistency reasons. To explain the differences in memory access time we pick the data points for ptmalloc2 and scalloc at x=60% where the difference in memory access time is most significant and compare the number of all hardware events obtainable using perf7 . While most numbers are similar we identify two events where the numbers differ significantly. First, the L1 cache miss rate with ptmalloc2 is 20.8% while scalloc causes 7 See https://perf.wiki.kernel.org scalloc scalloc-no-madvise scalloc-no-virtual-spans scalloc-no-madvise-no-virtual-spans 100000 average memory consumption in MB (logscale, less is better) 100 10 1 0.1 0.01 0.001 10000 1000 100 10 object size range in bytes (logscale) (a) Total allocator time 4M 1- M B B B 25 64 6K -2 B1 56 4K K B B K 16 -6 16 4- 4K B B 1- 1K 6- 56 25 -2 -6 B 4B 64 4M 1- M B B B B1 6K 25 64 -2 -6 56 4K K B B K 16 16 4- 4K B B 1- 1K B 6- 56 25 -2 64 16 -6 4B 1 16 total allocator time in seconds (logscale, less is better) 1000 object size range in bytes (logscale) (b) Average memory consumption Figure 12: Temporal and spatial performance for the virtual span evaluation a L1 miss rate of 15.2% at almost the same number of total L1 cache loads. We account this behavior to more effective cache line prefetching because we observe 272.2M L1 cache prefetches with scalloc and only 119.8M L1 cache prefetches with ptmalloc2. Second, and related to the L1 miss rate, we observe 408.5M last-level cache loads with ptmalloc2 but only 190.2M last-level cache loads with scalloc because every L1 cache miss causes a cache load on the next level. The last-level cache miss rate is negligible with both allocators suggesting that the working set (by design) fits into the last-level cache. Note that last-level cache events in perf include L2 and L3 cache events on our hardware. 7.7 Design Decisions We now evaluate scalloc’s design and how the three main contributions, virtual spans, the scalable backend, and the constant-time frontend influence temporal and spatial performance. To do so, we provide several different configurations of scalloc and the benchmarking environment and compare them against each other in isolated settings in best-effort manner. By best-effort we mean that we design our experiments so that they highlight the contribution of an isolated component to overall performance. Still, frontened evaluations will also include the backend and vice versa, and disabling virtual spans is implicit via disabling a kernel feature. Virtual Spans Virtual spans enable uniform treatment of objects across a large range of different sizes while avoiding physical memory fragmentation through on-demand paging and explicit madvise calls. The following experiment aims at illustrat- ing the benefits, cost, and limitations of virtual spans and ultimately the role played by the paging mechanism of the operating system. We compare four scalloc configurations on the same workload as in Section 7.5, see Figure 9c and Figure 9d. The first configuration, scalloc, is the default configuration used in all previous experiments. The second configuration, scalloc-no-madvise, only differs in the policy for returning memory to the operating system by disabling all madvise calls. Both configurations are executed with transparent huge pages disabled in the Linux kernel, i.e., virtual memory is mapped to 4KB pages only. The third and fourth configuration are the same as scalloc and scalloc-no-madvise but with transparent huge pages enabled, i.e., the kernel may switch from 4KB pages to 2MB pages, effectively disabling the advantages of virtual spans. Therefore we suffix those configurations with no-virtual-spans. Figure 12a shows the total allocator time for an increasing range of object sizes. The difference between scalloc and scalloc-no-madvise is explained by the cost and consequences of calling madvise which causes consecutive page faults requiring the operating system to zero pages. However, the memory consumption of scalloc, illustrated in Figure 12b, improves almost proportionaly to the cost of calling madvise. For small objects up to 256 bytes there are no differences because madvise is only called on spans of larger size classes. For huge objects (larger than 1MB) there are no differences because scalloc allocates huge objects directly through mmap. Enabling transparent huge pages (for scalloc-no-virtualspans and scalloc-no-madvise-no-virtual-spans) allows the kernel to allocate 2MB pages instead of 4KB pages. Since the cost of zeroing 2MB pages is significantly higher than that of 4KB pages the cost of allocating spans goes up, especially for small size classes (less than 256 bytes) where the real span size is small compared to the virtual span size. Figure 12a shows that virtual spans perform better with 4KB pages than with 2MB pages. The memory consumption in Figure 12b increases dramatically for small size classes because the whole virtual span size is materialized (but still unused) in physical memory. For larger objects, calling madvise causes the kernel to fall back from 2MB pages to 4KB pages. As a consequence, the scallocno-virtual-spans configuration approaches the small memory footprint of scalloc. Still the cost of zeroing 2MB pages and eventually falling back to 4KB pages causes a significant temporal overhead compared to scalloc. Disabling the advantages of virtual spans by enabling transparent huge pages and also disabling madvise calls (scalloc-no-madvise-novirtual-spans) causes the highest memory consumption because unused space in virtual spans is materialized in physical memory and because the kernel cannot fall back to 4KB pages. The total allocator time is lower compared to scallocno-virtual-spans because no madvise calls are necessary. From the results of this experiment we conclude that the paging mechanism of Linux is sufficient for implementing virtual spans efficiently if paging happens on a 4KB granularity. We also conclude that calling madvise can trade speed for memory consumption and choosing either setting depends on the application of scalloc. However, improving the performance of madvise on operating system level would improve scalloc’s virtual span design even further. Scalable Backend A consequence of the design around virtual and real spans is that, depending on the workload and in particular on object sizes, the backend may be subject to high levels of contention. The following experiment evaluates the design of the span-pool in terms of performance and scalability, i.e., it shows that multiple stacks per size class are necessary to deal with workloads that cause high contention on the backend. Note that for workloads that only utilize small objects, e.g. 8-byte objects, real spans provide enough buffering only requiring a single stack per size class in the span-pool. We omit separate plots for this data. However, for larger objects, real spans only provide a limited amount of blocks requiring a fast and scalable backend. For example, for 256-byte objects the real span size of 32KB amounts to 127 blocks, potentially resulting in frequent interaction with the span-pool. The experiment is based on threadtest and configured as in Section 7.2 with the only difference being that the benchmark is configured to allocate and deallocate 256-byte objects. We compare our default scalloc version, which is based on a span-pool with as many stacks per size class as threads, with a version that only uses a single stack per size class, called scalloc-no-span-pool. Figure 13a illustrates that for an increasing number of threads, a single stack is unable to deal with contention on the span-pool, effectively resulting in degraded performance. However, in terms of memory consumption, Figure 13b shows that using a single stack results in better memory utilization as threads synchronize on a single source of empty spans. Scalloc’s design trades the better performance (up to 2.7x) for slightly worse memory utilization (up to 15%). Constant-time Frontend In a similar spirit, we evaluate the performance impact of a constant-time frontend that returns empty spans to the backend as soon as possible, i.e., upon freeing the last object contained in a span. The experiment is based on threadtest and configured as in Section 7.2, see Figure 6a and Figure 6b. As the experiment is configured for small object sizes, returning memory to the operating system only plays a minor role. We compare our default scalloc version with a scalloc version that returns empty spans to the backend at a later point in time in its allocation slow path, called scalloc-reclaim-span-in-allocation. Note that threadtest provides no information about peroperation latency and hence the experiment only shows throughput and scalability, but since each thread implements a closed system, throughput is indirectly proportional to latency. Figure 13c illustrates performance and scalability. Both scalloc versions provide almost the same speedup but differ in memory consumption illustrated in Figure 13d. The results indicate that eagerly returning spans as soon as they get empty rather than delaying reclamation until the next (slow path) allocation increases the potential for reusing spans by other threads effectively reducing memory consumption. At 39 threads the difference in memory consumption is about 25% between the two scalloc versions. 8. Conclusion We presented three contributions: (a) virtual spans that enable uniform treatment of small and big objects; (b) a fast and scalable backend leveraging newly developed global data structures; and (c) a constant-time (modulo synchronization) frontend that eagerly returns empty spans to the backend. Our experiments show that scalloc is either better (threadtest, object sizes, producer-consumer) or competitive (shbench, larson, mutator locality, SPEC) in performance and memory consumption compared to other allocators. To conclude, the problem of high-performance and scalable memory allocation is complex. There may be different solutions. Our solution was guided by an initial idea to design an allocator whose scalability benefits from the scalability of recently developed concurrent data structures. In order to make maximal use of global data structures, we developed virtual spans and additionally the constant-time frontend. It scalloc-no-span-pool 25 memory consumption in MB (less is better) speedup with respect to ptmalloc2 (more is better) scalloc 20 15 10 5 0 1 2 4 6 8 10 20 number of threads 30 30 25 20 15 10 5 0 40 1 2 4 6 8 10 (a) Speedup 20 number of threads 30 40 30 40 (b) Memory consumption Figure 13: Span-Pool evaluation: Threadtest benchmark using 256-byte objects scalloc-reclaim-spans-in-allocation 50 memory consumption in MB (less is better) speedup with respect to ptmalloc2 (more is better) scalloc 45 40 35 30 25 20 15 10 5 0 1 2 4 6 8 10 20 number of threads 30 40 9 8 7 6 5 4 3 2 1 0 1 2 4 6 8 10 (c) Speedup 20 number of threads (d) Memory consumption Figure 14: Frontend evaluation: Threadtest benchmark using 64-byte objects may be interesting to study other applications of global scalable concurrent data structures. Other interesting future work may be (1) integrating virtual spans and virtual memory management, (2) NUMAaware mapping of real spans, and in particular (3) dynamically resizing real spans to trade off LAB provisioning and performance based on run-time feedback from mutators, similar in spirit to just-in-time optimizations in virtual machines. Acknowledgements This work has been supported by the National Research Network RiSE on Rigorous Systems Engineering (Austrian Science Fund (FWF): S11404-N23, S11411-N23) and a Google PhD Fellowship. References [1] Y. Afek, G. Korland, and E. Yanovsky. Quasi-linearizability: Relaxed consistency for improved concurrency. In Proc. Conference on Principles of Distributed Systems (OPODIS), pages 395–410. Springer, 2010. doi: 10.1007/ 978-3-642-17653-1_29. [2] M. Aigner and C. Kirsch. ACDC: Towards a universal mutator for benchmarking heap management systems. In Proc. International Symposium on Memory Management (ISMM), pages 75–84. ACM, 2013. doi: 10.1145/2464157.2464161. [3] E. Berger, K. McKinley, R. Blumofe, and P. Wilson. Hoard: a scalable memory allocator for multithreaded applications. In Proc. International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS), pages 117–128. ACM, 2000. doi: 10.1145/384264.379232. [4] E. Berger, B. Zorn, and K. McKinley. Reconsidering custom memory allocation. In Proc. Conference on Object-oriented Programming, Systems, Languages, and Applications (OOPSLA), pages 1–12. ACM, 2002. doi: 10.1145/582419.582421. [5] S. Blackburn, P. Cheng, and K. McKinley. Oil and water? High performance garbage collection in Java with MMTk. In Proc. International Conference on Software Engineering (ICSE). IEEE, 2004. doi: 10.1109/ICSE.2004.1317436. [6] A. Clements, M. Kaashoek, and N. Zeldovich. RadixVM: Scalable address spaces for multithreaded applications. In Proc. ACM European Conference on Computer Systems (EuroSys), pages 211–224. ACM, 2013. doi: 10.1145/2465351. 2465373. [7] M. Dodds, A. Haas, and C. Kirsch. A scalable, correct timestamped stack. In Proc. Symposium on Principles of Programming Languages (POPL), pages 233–246. ACM, 2015. doi: 10.1145/2775051.2676963. [8] J. Evans. A scalable concurrent malloc(3) implementation for freebsd. In Proc. BSDCan, 2006. [15] T. Henzinger, C. Kirsch, H. Payer, A. Sezgin, and A. Sokolova. Quantitative relaxation of concurrent data structures. In Proc. Symposium on Principles of Programming Languages (POPL), pages 317–328. ACM, 2013. doi: 10.1145/2429069. 2429109. [16] M. Herlihy and N. Shavit. The Art of Multiprocessor Programming. Morgan Kaufmann Publishers Inc., 2008. [17] R. Hudson, B. Saha, A.-R. Adl-Tabatabai, and B. Hertzberg. Mcrt-malloc: a scalable transactional memory allocator. In Proc. International Symposium on Memory Management (ISMM), pages 74–83. ACM, 2006. doi: 10.1145/1133956. 1133967. [18] Intel Corporation. Thread building blocks http://threadingbuildingblocks.org. (tbb). [19] A. Kogan and E. Petrank. A methodology for creating fast wait-free data structures. In Proc. Symposium on Principles and Practice of Parallel Programming (PPoPP), pages 141– 150. ACM, 2012. doi: 10.1145/2145816.2145835. [20] B. Kuszmaul. Supermalloc: A super fast multithreaded malloc for 64-bit machines. In Proc. International Symposium on Memory Management (ISMM), pages 41–55. ACM, 2015. doi: 10.1145/2754169.2754178. [21] P.-A. Larson and M. Krishnan. Memory allocation for longrunning server applications. In Proc. International Symposium on Memory Management (ISMM), pages 176–185. ACM, 1998. doi: 10.1145/286860.286880. [22] D. Lea. A memory allocator. http://g.oswego.edu/dl/html/malloc.html. [23] Lockless Inc. llalloc: Lockless memory allocator. http://locklessinc.com/. [9] W. Gloger. ptmalloc2 – a multi-thread malloc implementation. http://malloc.de/en/. [24] M. Michael. Hazard pointers: Safe memory reclamation for lock-free objects. IEEE Trans. Parallel Distrib. Syst., 15(6): 491–504, 2004. doi: 10.1109/TPDS.2004.8. [10] Google Inc. gperftools: Fast, multi-threaded malloc() and nifty performance analysis tools. http://code.google.com/p/gperftools/. [25] M. Michael. Scalable lock-free dynamic memory allocation. In Proc. Conference on Programming Language Design and Implementation (PLDI), pages 35–46. ACM, 2004. doi: 10. 1145/996893.996848. [11] A. Haas, T. Henzinger, C. Kirsch, M. Lippautz, H. Payer, A. Sezgin, and A. Sokolova. Distributed queues in shared memory—multicore performance and scalability through quantitative relaxation. In Proc. International Conference on Computing Frontiers (CF), pages 17:1–17:9. ACM, 2013. doi: 10.1145/2482767.2482789. [12] A. Haas, T. Henzinger, A. Holzer, C. Kirsch, M. Lippautz, H. Payer, A. Sezgin, A. Sokolova, and H. Veith. Local linearizability. CoRR, abs/1502.07118, 2015. [13] D. Hendler, I. Incze, N. Shavit, and M. Tzafrir. Flat combining and the synchronization-parallelism tradeoff. In Proc. Symposium on Parallel Algorithms and Architectures (SPAA), pages 355–364. ACM, 2010. doi: 10.1145/1810479.1810540. [14] J. L. Henning. Spec cpu2006 benchmark descriptions. SIGARCH Comput. Archit. News, 34(4):1–17, 2006. doi: 10.1145/1186736.1186737. [26] MicroQuill Inc. shbench. http://www.microquill.com/. [27] S. Schneider, C. Antonopoulos, and D. Nikolopoulos. Scalable locality-conscious multithreaded memory allocation. In Proc. International Symposium on Memory Management (ISMM), pages 84–94. ACM, 2006. doi: 10.1145/1133956. 1133968. [28] K. Serebryany, D. Bruening, A. Potapenko, and D. Vyukov. Addresssanitizer: A fast address sanity checker. In Proc. USENIX Conference on Annual Technical Conference (USENIX ATC), pages 28–28. USENIX Association, 2012. [29] R. Treiber. Systems programming: Coping with parallelism. Technical Report RJ-5118, IBM Research Center, 1986. [30] P. Wilson, M. Johnstone, M. Neely, and D. Boles. Dynamic storage allocation: A survey and critical review. In Proc. International Workshop on Memory Management (IWMM), pages 1–116. Springer, 1995. doi: 10.1007/3-540-60368-9_ 19.
6cs.PL
JOINT ESTIMATION OF ANGLE AND DELAY OF RADIO WAVE ARRIVAL UNDER MULTIPLICATIVE NOISE ENVIRONMENT Pradip Sircar Department of Electrical Engineering Indian Institute of Technology Kanpur Kanpur 208016, India <[email protected]> L SUMMARY We address the problem of joint estimation of angle and delay of radio wave arrival in a multipath mobile communication channel using knowledge of the transmitted pulse shape function [1-3]. Employing an array of sensors to sample the radio received signal, and subsequent array signal processing can provide the characterization of a high-rank channel in terms of the multipath angles of arrival and time delays [4]. An improved characterization of the channel can lead to better equalization process and effective transmit diversity [5]. Although several works have been reported in the literature for estimation of the high-rank channel parameters, we are not aware of any work that deals with the problem of estimation in a fading channel, which essentially leads to a multiplicative noise environment [6]. Indeed, it has been pointed out while developing the cumulant-based techniques for multiplicative noise environment that the technique is useless for the Rayleigh faded radio channels because the fourth-order cumulant of the received signal is identically zero in this case [7]. In the present work, we develop a unique technique for parameter estimation of a Rayleigh faded high-rank channel under the assumption of independent multipath rays [8]. Note that in [8], the problem considered is related to the low-rank channel model arising from local scattering around the mobile unit, and there is no distant scatterer / reflector present [4]. Consider an array of M sensors receiving L reflections of a known pulse shape function g (t ) , where each propagation path is parameterized by the angle of arrival  i and the time delay  i ; and there is a complex reflection coefficient i (t ) associated with each path at time t . Under the assumption that the reflecting points are in the far field of the array, the output vector measured at the array of sensors is given by x(t )   i (t ) a (i ) g (t   i )  n(t ) (1) i 1 where a (i ) is the response vector of the array in the direction  i , and n (t ) is the noise vector [5]. The complex coefficient i (t )   i (t )e ji (t ) is a random sequence such that the attenuation  i is Rayleigh distributed and the phase  i is uniformly distributed. It is assumed that the coefficient i (t ) is independent from snapshot to snapshot as well as from ray to ray. In fact, the method developed in this work under the condition of independence of i (t ) is valid when the attenuation is Rayleigh, Rician or Suzuki distributed [9]. Therefore, the developed method is equally applicable in various urban and suburban mobile communication scenarios. For a uniform linear array (ULA) of element spacing  in wavelength, the output signal at the k th sensor neglecting noise is given by [5] L xk (t )    i (t )e ji (t ) e j 2 ( k 1)sin i g (t   i ) (2) i 1 Taking the Fourier transform (FT) of both the sides, we get L xk ( )    i ( )e ji ( ) e j 2 ( k 1)sin i e j i g ( ) (3) i 1 where xk ( ) , g ( ) ,  i ( ) and i ( ) are the FT „s of xk (t ) , g (t ) ,  i (t ) and i (t ) respectively [10]. We compute the correlation between the frequency samples at the k th and the m th sensors as (4) ck ,m  E{xk () xm ()} where E stands for the expectation operator. On evaluation (4) reduces to L ck , m   Gi e (5) i 1 c , lines are computed for the estimates of  i . Some estimated time delays are shown in Table 1. j 2 ( k  m ) sin i  k m under the condition of independence of i (t ) , where Gi are real valued constants. It is clear from (5) that since the correlation c is in the form of sum of exponential functions of sin i , the estimates of sin i can be obtained by employing the singular value decomposition (SVD) based Prony‟s method [11]. Once the estimates of sin i  si are found, we compute the frequency samples i ( ) as follows 1 M  j 2 ( k 1) si xk ( ) e M k 1 which reduces to i ()   i () g () and i ( )  i ( )   i  g ( ) for large M . i ( )  (6) Table 1 1 3.2404 3.0070 3.2362 3.2964  2 7.0124 6.9589 7.0295 7.2644 References [1] M. Wax and A. Leshem, “Joint estimation of time delays and direction of arrival of multipath reflections of a known signal,” IEEE Trans. on Signal Processing, vol. 45, no. 10, pp. 24772484, Oct. 1997. (7) (8) [2] A.-J. van der Veen, M.C. Vanderveen, and A. Paulraj, "Joint angle and delay estimation using shift-invariance techniques," IEEE Trans. on Signal Processing, vol. 46, no. 2, pp. 405-418, Feb. 1998. It can be seen from (8) that if i ( ) is assumed to be zero mean, then the best-fit straight line of the frequency samples i ( )  gi ( ) has the slope of  i . Thus, the estimates of  i can be obtained using the known samples of g ( ) . [3] A.L. Swindlehurst, "Time delay and spatial signature estimation using known asynchronous signals," IEEE Trans. on Signal Processing, vol. 46, no. 2, pp. 449-462, Feb. 1998. For simulation study we use the raised-cosine pulse shape function g (t ) given by [5] G.V. Tsoulos (Ed.), Adaptive Antennas for Wireless Communications, IEEE Press, Piscataway, N.J., 2001. sin( t ) cos(  t ) (9) cos[2 f c t   . p(t )] t 1  4 2t 2 where  is the excess bandwidth, f c is the carrier frequency and p (t ) is a random sequence of bits [12]. We set   0.35 , f c  0.25 , and collect samples over 32 symbol periods at the over sampling rate of 4. The pulse shape function g (t ) is plotted in Fig. 1. The magnitude spectrum of the function g (t ) is shown in Fig. 2, and the phase spectrum is shown in Fig. 3. After unwrapping the phase of the spectrum, we get the plot as shown in Fig. 4. g (t )  We choose the angles of arrival to be 10 and 20 , and the time delays are set at 3 and 7 respectively. An array of 64 sensors with element spacing half of wavelength are used for processing. The complex reflection (fading) coefficients are chosen to be complex Gaussian random variables with real and imaginary parts both having zero mean and unity variance. The estimated angles are found to be 10.0000 and 20.0001 degrees. The best-fit straight lines are drawn in Figs. 5 and 6 using the frequency samples of i ( ) . The slopes of the straight [4] J. Fuhl, A.F. Molisch, and E. Bonek, “Unified channel model for mobile radio systems with smart antennas,” IEE Proc. Radar, Sonar Navigation, vol.145, no.1, pp.32-41, Feb. 1998. [6] O. Besson and F.C. Castanie, “On estimating the frequency of a sinusoid in autoregressive multiplicative noise,” Signal Processing, vol. 30, no. 1, pp. 65-83, Jan. 1993. [7] A. Swami, “Multiplicative noise models: Parameter estimation using cumulants,” Signal Processing, vol.36, pp. 355373, 1994. [8] T. Trump and B. Ottersten, “Estimation of nominal direction of arrival and angular spread using an array of sensors,” Signal Processing, vol. 50, pp. 57-69, 1996. [9] W.C.Y. Lee, Mobile Communications Engineering: Theory and Applications, McGraw-Hill, New York, 1997. [10] A.V. Oppenheim and R.W. Schafer, Digital Signal Processing, Prentice-Hall, Englewood Cliffs, N.J., 1975. [11] D.W. Tufts and R. Kumaresan, “Singular value decomposition and improved frequency estimation using linear prediction,” IEEE Trans. on Acoustics, Speech, Signal Processing, vol. ASSP-30, no. 4, pp. 671-675, Aug. 1982. [12] S. Haykin, Communication Systems, John Wiley, New York, 2001. Fig. 1 The pulse shape function g (t ) Fig. 4 The unwrapped phase spectrum of the function g (t ) Fig. 2 The magnitude spectrum of the function g (t ) Fig. 5 The best-fit straight line of slope 1 Fig. 3 The phase spectrum of the function g (t ) Fig. 6 The best-fit straight line of slope  2
5cs.CE
arXiv:1506.02877v4 [math.DS] 20 Oct 2016 DISTORTION AND TITS ALTERNATIVE IN SMOOTH MAPPING CLASS GROUPS SEBASTIAN HURTADO, EMMANUEL MILITON Abstract. In this article, we study the smooth mapping class group of a surface S relative to a given Cantor set, that is the group of isotopy classes of orientation-preserving smooth diffeomorphisms of S which preserve this Cantor set. When the Cantor set is the standard ternary Cantor set, we prove that this group does not contain any distorted element. Moreover, we prove a weak Tits alternative for these groups. 1. Introduction Definition 1.1. Let S be a surface of finite type and let K be a closed subset contained in S. Let Diff(S, K) be the group of orientationpreserving C ∞ -diffeomorphisms of S that leave K invariant (i.e. f (K) = K) and let Diff 0 (S, K) be the identity component of Diff(S, K). We define the “smooth” mapping class group M∞ (S, K) of S relative to K as the quotient: M∞ (S, K) = Diff(S, K)/Diff 0 (S, K) If K is a finite set of points, M∞ (S, K) coincides with the braid group with |K| points in S. The groups M∞ (S, K) appear very naturally when studying group actions on surfaces, as given a smooth group action on S preserves a non-trivial closed set K, one obtains a group homomorphism into M∞ (S, K). These groups were first studied by Funar and Neretin in [13]. The aim of this paper is to contribute to the study of M∞ (S, K) for a Cantor set K ⊂ S. Our results are aiming towards the understanding of two basic properties of these groups, namely, the distortion of the cyclic subgroups and the Tits alternative. A recent result related to mapping class groups of infinite type that deserves to be mentioned (but which we will not make use of here) is J.Bavard’s proof that the mapping class group of R2 relative to a Date: April 10, 2018. 1 DISTORTION AND TITS ALTERNATIVE IN M∞ (S, K) 2 Cantor set K acts faithfully on a Gromov hyperbolic space. This hyperbolic space is similar to the curve complex for finite mapping class groups and was suggested by Calegari (see [3] and [5]). Possible lines of research and developments after Bavard’s article are suggested by Calegari in his blog (see [5]). These developments partly inspired this work. We now introduce some notation in order to state our results and explain the ideas involved in the proofs. Denote by PM∞ (S, K) ⊂ M∞ (S, K) (the “pure” smooth mapping class group of K in S) the subgroup of the mapping class group M∞ (S, K) consisting of the elements which fix K pointwise. We also define the group diffS (K) as the group of homeomorphisms of K which are induced by orientation-preserving diffeomorphisms of S preserving K. In other words, a homeomorphism f : K → K belongs to diffS (K) if there exists f¯ ∈ Diff(S) such that f¯|K = f . There is a natural exact sequence of groups given by: (1) PM∞ (S, K) → M∞ (S, K) → diffS (K). The exact sequence (1) was studied by Funar and Neretin in [13], where it is proven that PM∞ (S, K) is always a countable group (this follows from Lemma 2.2) and where for certain “affine” Cantor sets K, the group diffS (K) is shown to be countable and to have a “Thompson group” kind of structure. We can now proceed to state our results. We begin with our results about distortion in M∞ (S, K). 1.1. Distortion. We recall the concept of distortion which comes from geometric group theory and is due to Gromov (see [17]). Definition 1.2. Let G be a group and let G ⊂ G be a finite set which is symmetric (i.e. G = G −1 ). For any element f ∈ G contained in the group generated by G, the word length lG (f ) of f is defined as the minimal integer n such that f can be expressed as a product f = s1 s2 ...sn where each si ∈ G. An element f of a group G is called distorted if it has infinite order and there exists a finite symmetric set G ⊂ G such that (1) f ∈ hGi. DISTORTION AND TITS ALTERNATIVE IN M∞ (S, K) lG (f n ) n→∞ n (2) lim 3 = 0. By a theorem of Farb, Lubotzky and Minsky, the mapping class group of a surface of finite type does not have distorted elements (see [14]). We believe that such a result should extend to the groups M∞ (S, K) for every Cantor set K. Our first result is the following. Recall that a Cantor set is a nonempty totally disconnected topological space such that any point of K is an accumulation point. Theorem 1.1. Let S be a closed surface and K be a closed subset of S which is a Cantor set. The elements of PM∞ (S, K) are undistorted in M∞ (S, K). If we change the C ∞ regularity into a C r regularity, for some r ≥ 1, this theorem is still true and can be proved in the same way. It is important to point out that any element in PM∞ (S, K) can be thought as a mapping class of a surface of finite type (see Corollary 2.3) and is therefore much easier to deal with compared to other elements of M∞ (S, K). In fact, this group is a limit of finite-type surface mapping class groups. Theorem 1.1 is proven using some of the techniques developed by Franks and Handel in [11] to show that there are no distorted element in the groups of area-preserving diffeomorphisms of surfaces and techniques used by Alibegovic in [1] to prove the same thing in the outer automorphism group of a free group. Denote by M0 (S, K) the quotient of the group of orientation-preserving homeomorphisms of S which preserve K by the subgroup consisting of homeomorphisms of S which are isotopic to the identity relative to K. It is worth pointing out that if the smoothness assumption is dropped and if K is a Cantor set, one can construct distorted elements in M0 (S, K). One can even construct elements which fix the set K pointwise and which are distorted in the subgroup M00 (S, K) of M0 (S, K) consisting of homeomorphisms isotopic to the identity in S. In particular, Theorem 1.2 below implies that the group M0 (S, K) is not isomorphic to M∞ (S, K): the behavior of these groups is different from the behavior of classical mapping class groups (i.e. when K is a finite set). DISTORTION AND TITS ALTERNATIVE IN M∞ (S, K) 4 In the smooth case, we have not been able so far to produce any distorted element for our groups M∞ (S, K) (even when S = S1 is the circle and K ⊂ S1 ). We will then focus on one of the simplest examples of Cantor sets in surfaces: the standard ternary Cantor set Cλ contained in an embedded segment l ⊂ S (see Section 4 for a precise definition of Cλ ). It is shown in [13] that the group diffS (Cλ ) consists of piecewise affine homeomorphisms of Cλ and therefore diffS (K) is very“similar” to Thompson’s group V2 , see Lemma 4.2. Using the fact that there are no distorted elements in Thompson’s groups Vn (see [2]) and the exact sequence (1), we are then able to show the following: Theorem 1.2. Let S be a closed surface and 0 < λ < 1/2. Then, there are no distorted elements in the group M∞ (S, Cλ ), where Cλ is an embedding of the standard ternary Cantor set with parameter λ in S. Here also , the theorem holds in case of a C r regularity, for r ≥ 1. 1.2. Tits alternative. By a theorem by McCarthy (see [21]), mapping class groups of finite type satisfy the Tits alternative, i.e., any subgroup Γ ⊂ M∞ (S) either contains a free subgroup on two generators or is virtually solvable. In [22], Margulis proved that the group Homeo(S1 ) of homeomorphisms of the circle satisfies a similar alternative. More precisely, he proved that a group Γ ⊂ Homeo(S1 ) either preserves a measure on S1 or contains a free subgroup on two generators, see [23]. Ghys asked whether the same statement holds for Diff(S) for a surface S (see [16]). We believe that some kind of similar statement should hold for our groups M∞ (S, K). Here, we obtain the following result in the case where the Cantor set K is the standard ternary Cantor set Cλ . Theorem 1.3. Let Γ be a finitely generated subgroup of M∞ (S, Cλ ), then one of the following holds: (1) Γ contains a free subgroup on two generators. (2) Γ has a finite orbit, i.e. there exists p ∈ Cλ such that the set Γ(p) := {g(p) |g ∈ Γ} is finite. This theorem also holds in case of a C r regularity, for r ≥ 1. DISTORTION AND TITS ALTERNATIVE IN M∞ (S, K) 5 Note also the following immediate corollary of Theorem 1.3. This corollary is similar to Margulis’s theorem on the group of homeomorphisms of the circle. Corollary 1.4. Let Γ be a subgroup of M∞ (S, Cλ ), then one of the following holds: (1) Γ contains a free subgroup on two generators. (2) The action of Γ on the Cantor set Cλ has an invariant probability measure. To obtain the corollary from the theorem, observe that, as the group M∞ (S, Cλ ) is countable, such a subgroup Γ can be written as the union of a sequence (Γp )p∈N of finitely generated subgroups with Γp ⊂ Γp+1 for all p. By Theorem 1.3, the action of each subgroup Γp has an invariant probability measure µp . Now, an invariant probability measure for the action of Γ is obtained by taking an accumulation point of the sequence (µp )p∈N . We will deduce Theorem 1.3 as an immediate corollary of the following statement about Thompson’s group Vn , which could be of independent interest: Theorem 1.5. For any finitely generated subgroup Γ ⊂ Vn , either Γ has a finite orbit or Γ contains a free subgroup. The proof of this result involves the study of the dynamics of elements of Vn on the Cantor set Kn where it acts naturally. These dynamics are known to be of contracting-repelling type and the spirit of our proof is similar to the proof of Margulis for Homeo(S1 ). The proof of this theorem uses the following lemma, which might be useful to prove similar results. Lemma 1.6. Let Γ be a countable group acting on a compact space K by homeomorphisms and a finite subset F ⊂ K. Then there is finite orbit of Γ on K or there is an element g ∈ Γ sending F disjoint from itself (i.e. g(F ) ∩ F = ∅). The proof of the previous lemma is based on Horbez’s recent proof of the Tits alternative for mapping class groups and related automorphisms groups (see [8] and [9]). 1.3. Outline of the article. In Section 2, we prove Theorem 1.1. In Section 3, we show that the group diffS (K) is independent of the surface S where K is embedded. Then, we will focus on the study of DISTORTION AND TITS ALTERNATIVE IN M∞ (S, K) 6 the standard ternary Cantor set, and, in Section 4, we prove Theorem 1.2. Finally, in Section 5, we prove Theorems 1.3, 1.5 and Lemma 1.6. Section 5 is independent of Section 2 and Section 3 is independent of the other sections. 1.4. Acknowledgements. We would like to thank Michael Handel for pointing out Alibegovic’s results could be useful for the proof of Theorem 1.1 (and they indeed were). 2. Distorted elements in smooth mapping class groups In this section, we prove Theorem 1.1, which we restate now: Theorem 2.1. Let S be a closed surface and K be a closed subset of S which is a Cantor set. The elements of PM∞ (S, K) are undistorted in M∞ (S, K). The proof and main ideas of Theorem 2.1 come from the work of Franks and Handel about distorted elements in surface diffeomorphism groups (see [11]) and the work of Alibegovic about distorted elements in the outer automorphism group of a free group (see [1]). The reason why the hypothesis f |K = Id makes things more simple is the following observation. Lemma 2.2 (Handel). Let S be a surface. Suppose f is a diffeomorphism fixing a compact set K pointwise. Suppose that K contains an accumulation point p. Then, there exists a neighborhood U of p and an isotopy ft fixing K pointwise such that f0 = f and f1 |U = Id. Proof. We consider the homotopy ht = tf + (1 − t)Id in a coordinate chart around p. Take a sequence of points pn ∈ K converging to p. As f (pn ) = pn , there exists v ∈ Tp (S) such that Dp f (v) = v. Observe that the equation Dp ht (w) = 0 implies that Dp f (w) = −αw, for some α > 0. As Dp f (v) = v and f is orientation preserving, this is not possible unless w = 0. Hence Dp ht is invertible. This implies that, for every t, Dht is invertible in a neighborhood U of p: there is a neighborhood U of p where ht is invertible and is therefore an actual isotopy between the inclusion i : U → S and f |U . Now, using the Isotopy Extension Theorem (Lemma 5.8 in Milnor hcobordism book) we can extend the isotopy ht |U to an actual isotopy gt DISTORTION AND TITS ALTERNATIVE IN M∞ (S, K) 7 of S such that g0 = Id, gt fixes K pointwise and that coincides with ht on U . Therefore the isotopy ft = gt−1 f gives us the desired result.  If the closed set K is perfect, we can take an appropriate finite cover of K by coordinate charts and use the previous lemma to prove that every element f ∈ PM∞ (S, K) is isotopic to a diffeomorphism f 0 which is the identity in a small neighborhood of K. Hence it can be considered as an element of a mapping class group of a surface of finite type. Corollary 2.3. Let S be a surface. Suppose f is a diffeomorphism fixing a compact perfect set K pointwise. Then there exists a diffeomorphism g isotopic to f relative to K and a finite collection of smooth closed disjoint disks {Di } covering K such that g|Di = Id. As we will show next, this corollary implies that if f is distorted in M∞ (S, K), then f must be isotopic to a composition of Dehn twists about disjoint closed curves βi which do not meet K. 2.1. Representatives of mapping classes. We use the following theorem due to Franks and Handel (see Theorem 1.2, Definition 6.1 and Lemma 6.3 in [12]). This theorem is a direct consequence of Lemma 2.2 and of classical Nielsen-Thurston theory (see [15] on Nielsen-Thurston theory). Given a diffeomorphism f of the surface S, we denote by Fix(f ) the set of points of S which are fixed under f . Theorem 2.4 (Franks-Handel). Let f be a diffeomorphism in Diff ∞ 0 (S) and M = S−Fix(f ). There exists a finite set R of disjoint simple closed curves of M which are pairwise non-isotopic and a diffeomorphism ϕ of S which is isotopic to f relative to Fix(f ) such that: (1) For any curve γ in R, the homeomorphism ϕ preserves an open annulus neighbourhood Aγ of the curve γ. (2) For any connected component Si of S − ∪γ Aγ , (a) if Fix(f ) ∩ Si is infinite, then ϕ|Si = Id|Si . (b) if Fix(f ) ∩ Si is finite, then either ϕ|Mi = Id|Mi or ϕ|Mi is pseudo-Anosov, where Mi = Si − Fix(f ). We need more precisely the following corollary of this theorem. Corollary 2.5. Let ξ be an element in M∞ 0 (S, K) which fixes a closed set K pointwise. There exists a finite set R of disjoint simple closed curves of M which are pairwise non-isotopic and a diffeomorphism ψ of S which is a representative of ξ such that: DISTORTION AND TITS ALTERNATIVE IN M∞ (S, K) 8 (1) For any curve γ in R, the diffeomorphism ψ preserves an open annulus neighbourhood Aγ of the curve γ. (2) For any connected component Si of S − ∪γ Aγ , (a) if K ∩ Si is infinite, then ψ|Si = Id|Si . (b) if K ∩ Si is finite, then either ψ|Mi = Id|Mi or ψ|Mi is pseudo-Anosov, where Mi = Si − K. Proof. Apply Theorem 2.4 to a representative of ξ. This provides a diffeomorphism ϕ with the properties given by the theorem. When K ∩ Si is infinite, the theorem states that ϕ|Si = Id|Si and we take ψ|Si = Id|Si . If the set K ∩ Si is finite, we can apply the classical Nielsen-Thurston theory (see Theorem 5 p.12 in [15]) to ϕ|Si to obtain a decomposition of Si and a diffeomorphism ψ|Si whose restriction to each component of this decomposition satisfies (b).  Notice that, in the case where K is a Cantor set, Case (b) in Corollary 2.5 can happen only if K does not meet Si . Let ξ be an element in M∞ 0 (S, K) and denote by ψ its representative in the group Diff ∞ (S) given by the above corollary. Here, we 0 distinguish three cases to prove Theorem 2.1. (1) There exists a connected component Si for which Case (b) occurs and ψ|Mi is pseudo-Anosov. (2) The diffeomorphism ψ is a composition of Dehn twists about curves of R and one of the curves of R is not nullhomotopic in S. (3) The diffeomorphism ψ is a composition of Dehn twists about curves of R which are nullhomotopic in S. The first case is adressed in Subsection 2.2, the second one in Subsection 2.3 and the third one in Subsection 2.4. 2.2. The pseudo-Anosov case. In this subsection, we need the following obstruction to being a distorted element. Endow the surface S with a Riemannian metric g. For a loop α of S, we denote by lg (α) its length with respect to the chosen Riemannian metric and, for an isotopy class [α] of loops of S − K, we denote by lg ([α]) the infimum of the lengths of loops representing [α]. Lemma 2.6. Let ξ be an element of M∞ (S, K) and α be a smooth loop of S − K. Suppose that ξ is distorted in M∞ (S, K). Then log(lg (ξ n ([α]))) lim = 0. n→+∞ n Proof. By definition of a distorted element, there exists a finite set G ⊂ M∞ (S, K) and a sequence (ln )n of integers such that DISTORTION AND TITS ALTERNATIVE IN M∞ (S, K) 9 (1) for any n, ξ n = η1,n η2,n η3,n . . . ηln ,n , where, for any indices i and j, ηi,j ∈ G. (2) limn→+∞ lnn = 0. For any element η in G, choose a representative gη of this element in Diff ∞ (S). Also take a representative α of the isotopy class [α]. Denote M = maxη∈G,x∈S kDgη (x)k where k.k is the norm associated to the chosen Riemannian metric on S. Then, for any n, l(ξ n ([α])) ≤ l(gη1,n gη2,n gη3,n . . . gηln ,n (α)) ≤ M ln l(α). n Hence log(l(ξn ([α]))) ≤ sion of the lemma. ln log(M )+log(l(α)) . n This inequality yields the conclu Proof of Theorem 2.1 : case of a class with a pseudo-Anosov component. Suppose that there exists a connected component Si for which Case (b) in Corollary 2.5 occurs. In this case, it is a classical fact that there exn ists an isotopy class of essential loop [α] such that limn log(l(ξn ([α]))) > 0 (see Proposition 19 p.178 in [15]). Hence, by Lemma 2.6, the element ξ is undistorted in M∞ (S, K).  2.3. Case of a Dehn twist about an essential curve. In this subsection, we show that any element in PM∞ (S, K) whose normal form contains a Dehn twist about a curve which is essential in S is undistorted in M∞ (S, K). To prove this, we will show something slightly stronger in the C 0 -topology using the method developed by Alibegovic in [1] to show there are no distorted elements in Out(Fn ). For a Cantor set K in a surface S, let Homeo(S, K) be the group of homeomorphisms of S that preserve K and Homeo0 (S, K) be the identity component of Homeo(S, K). We define the topological mapping class group: M0 (S, K) = Homeo(S, K)/Homeo0 (S, K). As every Cantor set K ⊂ S is homeomorphic to the ternary Cantor set K 0 via a homeomorphism of S, we assume throughout this section that K is the ternary Cantor set in S. Take a disk D ⊂ S containing K in its interior and think of D as a disk in R2 containing the ternary Cantor set K. Fix a point p0 on the boundary of this disk. For any n ≥ 1 and any sequence I ∈ {0, 1}n , we define the disk DI as an open disk containing exactly the points in the ternary cantor set K ⊂ R2 whose tryadic expansion starts by 2I. DISTORTION AND TITS ALTERNATIVE IN M∞ (S, K) 10 We choose those disks so that their boundaries are pairwise disjoint. In particular, if n is fixed and I and J belong to {0, 1}n , the disks DI and DJ are disjoint. Also, choose those disks in such a manner that the diameter of DI tends to 0 when the length of I tends to +∞. We define Sn as the surface with boundary [ Sn := S \ DI I∈{0,1}n and Un = [ DI . n I∈{0,1} See Figure 1. D Figure 1. The surface S2 The surfaces Sn exhaust S and have a partial order given by the containment relation, that is, for this order, Sn < Sm if Sn ⊂ Sm . Observe that the group G := π1 (S \ K, p0 ) is the direct limit of the family of groups (Gn , fn,m ), where Gn := π1 (Sn , p0 ) and the group morphisms fn,m : Gn → Gm are obtained from the inclusions Sn → Sm . Observe also that each group Gn is a non-abelian free group. Figure 2. The loops x0 , x100 and x11 . For any sequence I ∈ {0, 1}n , we consider the loop xI based at p0 as in Figure 2 (it bounds a disk whose intersection with K consists of DISTORTION AND TITS ALTERNATIVE IN M∞ (S, K) 11 elements of K whose tryadic expansion starts with 2I). We also take a standard generating set A of π1 (S \ D, p0 ). In particular, the group G0 = π1 (S − D, p0 ) is the free group on elements of A. See Figure 3. Figure 3. S = T2 and A = {a0 .a1 }. Observe that for our elements xI in π1 (S \K, p0 ), the following equality holds xI = xI0 xI1 For each surface Sn , we consider the set of generators Xn ∪ A of the fundamental group Gn = π1 (Sn , p0 ), where [ {0, 1}k and the last element of I is 0} Xn = {xI such that I ∈ k≤n Any element in Gn can be written uniquely in a reduced way using these generators of Gn . As usual, we will identify elements of Gn with reduced words on the elements of A ∪ Xn . For any g in Gn , we denote by ln (g) the word length of g with respect to this generating set. If n < m, recall that we have a natural inclusion fn,m : Gn → Gm . Observe that, for any g ∈ Gn , ln (g) = lm (fn,m (g)) by our choice of generating set. Hence we have a well defined length l on G, which is the direct limit of the Gn ’s. Here is another way to see l. Observe that G is the free group on the infinite set A ∪ X, where [ X= Xn . n∈N The map l : G → R+ is just the word length on G with respect to this generating set. We define the following: DISTORTION AND TITS ALTERNATIVE IN M∞ (S, K) 12 Definition 2.1. For each w ∈ G = π1 (S \ K, p0 ), we can write w in a unique way using the generators X ∪ A of G. We define c(w) for a reduced word w as the maximal k such that w = w0 w̄k w1 where w̄ is a word that represents a non-trivial element in π1 (S). If no such decomposition exists, we define c(w) = 0. Definition 2.2. For an isotopy class [w] of loop in S \ K, we define c([w]) as the maximal c(w0 ) such that w0 is a cyclically reduced word representing [w]. For example, consider the 2-torus T2 in Figure 3. The chosen generators of π1 (Sn , p0 ) are A = {a0 , a1 } together with the set of loops Xn . In that case, if w = (a0 x0 )2 x50 (a0 a1 x0 a0 −1 a1 −1 )7 then c(w) = 2, because of the (a0 x0 )2 factor. If S is the 2-sphere S2 , then, for any word w we have c(w) = 0. Hence we will assume from now on that g(S) ≥ 1. We are in position to prove the main two propositions of this subsection. Proposition 2.7. For any g ∈ Homeo(S, K) supported in D and any isotopy class [w] of loop in S \ K: c(g([w])) ≤ c([w]) + 2. Proof. Let w be a cyclically reduced word representing a loop [w] in S \ K and let Sn be a surface containing the loop w. We will begin the proof by making some observations on how such a g supported in D can act on words in the generators Xn ∪ A of G. Let c be the word in A corresponding to the loop surrounding the disk D (a product of commutators of elements of A). Observe that the group π1 (D, K) is generated by Xn ∪ {c} and in fact any element in π1 (D, K) can be written in a unique way as a word of the form w(x, c). Observe that, if g ∈ Homeo(D, K), then, for any word a ∈ hAi, we have g(a) = a. For a word w(x, c) in Xn ∪ c, the element g(w(x, c)) is a word w0 (x, c) in Xl ∪ c for some l possibly larger than n. Q If w = xj aj , where the xj ’s are words in Xn and the aj are words in A, we can rewrite w if some of the a0j s are powers of c or if the aj ’s DISTORTION AND TITS ALTERNATIVE IN M∞ (S, K) 13 begin or end by powers of c. We write w as a word w= m Y wi (x, c)ai i=1 where the ai ’s are words in hAi such that the beginning and ending of the ai ’s are not powers of c. Applying g, we obtain g(w) = m Y g(wi (x, c))ai . i=1 in Xl ∪ c which represents If wi0 (x, c) is the reduced Q word Qm 0 g(wi (x, c)), 0 we can write g(w) = m w (x, c)a . The word i i=1 i i=1 wi (x, c)ai might 0 not be reduced as wi (x, c) might end or begin with powers of c and some cancellations might occur at the beginning and ending of these ai ’s. But, after performing these cancellations, we will not be able to cancel completely any of the words ai , as by assumption the ai ’s are not powers of c. In this way, we obtain a reduced word for g(w) of the form m Y g(w) = wi00 (x, c)a0i i=1 a0i ’s where the words neither begin nor end with powers of c and 00 the words wi (x, c) and a0i are non-trivial (except possibly for a00m and w100 (x, c)). We can now begin the actual proof of our proposition. We take a cyclically reduced word w = C w̄m D, such that c([w]) = c(w) = m and w̄ a non-trivial element in π1 (S). If we write as before Qrepresents m w = i=1 wi (x, c)ai , where the a0i s are words in hAi which neither begin nor end with powers ofQc, then, looking at the first time w̄ appears as a subword of the word ki=1 w(xi , ci )ai , there should be at least one ai that appears in w̄, because w̄ is non-trivial in π1 (S). Let us denote this ai by α. We call by αj , the corresponding α in the j-th time ŵ appears in w from left to right.  Qm−1 Therefore, we can write our word w = w1 j=1 αw0 αw2 , where w0 is a word that begins and ends in the alphabet Xn ∪ C. Also w1 (w2 respectively) is a word that ends (begins respectively) in a word of the alphabet Xn ∪ C. Applying g, we get:  m−1  Y g(w) = g(w1 ) αg(w0 ) αg(w2 ) j=1 DISTORTION AND TITS ALTERNATIVE IN M∞ (S, K) 14 Let wi0 be the reduced word which represents g(wi ) in Xl ∪ {c}. Observe that w00 begins and ends with words in the alphabet Xl ∪ C (Same thing for the end of w10 and the beginning of w20 ). At this point, some cancellations might occur at the beginning or the end of the α’s but, for the α’s in the word g(w) that have the subword g(w0 ) to the left and to the right, the same cancellations should occur and so after applying these cancellations we obtain α0 , wi00 ’s and a reduced word for g(w) of the form:  m−1  Y 00 0 00 g(w) = w1 α w0 w200 . j=2 0 w000 , which is conjugate to αg(w0 ), is a nontrivial word Moreover, α in A representing a non-trivial class in π1 (S). We can see from there that c([g(w)]) ≥ c([w]) − 2. Applying this to g −1 and the word g(w) we obtain c(g(w)) ≤ c(w) + 2.  Let us define PM0 (S, K) as the set of mapping classes in M0 (S, K) represented by a homeomorphism which pointwise fixes a small neighborhood N (K) of K. For any mapping class g in PM0 (S, K), we denote by N (g) the smallest integer n such that g has a representative which pointwise fixes Un . Finally, for any mapping class g we fix a homeomorphism ĝ which represents g, which fixes the point p0 and which pointwise fixes UN (g) . Proposition 2.8. For any g ∈ PM0 (S, K), there exists a constant Cg such that for every isotopy class [w] of loop in S \ K, the following holds: c(g([w])) ≤ c([w]) + Cg . Before proving this proposition, we need two lemmas which will be proved afterwards. For any mapping class ϕ ∈ PM0 (Sn ), we denote by ϕ̂ a homeomorphism of Sn which fixes the point p0 . The homeomorphism ϕ̂ induces an automorphism π1 (Sn , p0 ) → π1 (Sn , p0 ) which we also denote by ϕ̂. Let Λn (ϕ̂) = max∈{−1,1} w∈A∪Xn l(ϕ̂ (w)). The following lemma is essentially due to Alibegovic (see [1]). As the constant appearing in this lemma is not explicit in [1] and as we need an explicit constant, we will prove it. DISTORTION AND TITS ALTERNATIVE IN M∞ (S, K) 15 Lemma 2.9. For any w ∈ π1 (Sn , x0 ) and any ϕ ∈ PM0 (Sn ), c([ϕ(w)]) ≥ c([w]) − 2Λn (ϕ̂)2 . This lemma combined with the lemma below will yield Proposition 2.8. Lemma 2.10. Let f ∈ PM0 (S, K). There exist Cf > 0 such that, for any w ∈ X ∪ A and any  ∈ {−1, 1}, l(fˆ (w)) ≤ Cf . Proof of Proposition 2.8. For any n ≥ N (g), the mapping class g induces a mapping class in PM0 (Sn ). By Lemma 2.9, for any w in π1 (Sn , x0 ), c([g(w)]) ≥ c(w) − 2Λn (ĝ)2 . By definition of Λn and by Lemma 2.10, the quantity 2Λn (ĝ)2 is uniformly bounded above (independently of n) by a constant Cg . Hence, for any w in π1 (S − K, p0 ), we have c([g(w)]) ≥ c([w]) − Cg . Then it suffices to apply the above inequality with the element [g −1 (w)] instead of [w] to obtain the proposition.  Proof of Lemma 2.9. Let p = c([w]). Take a cyclically reduced representative w in π1 (Sn , p0 ) of the class [w] such that c(w) = p. We assume that p > 2Λn (ϕ̂)2 . Otherwise, the lemma is trivial. By definition of c, there exists a word w in π1 (Sn , p0 ) which projects non-trivially on π1 (S, p0 ) such that w = w1 wp w2 . , where w1 , w2 ∈ π1 (Sn , p0 ). Then ϕ̂(w) = ϕ̂(w1 )ϕ̂(w)p ϕ̂(w2 ). Let λw0 λ−1 be the reduced representative of ϕ̂(w), where the word w0 is cyclically reduced. Of course, the element w0 projects nontrivially on π1 (S, p0 ) as the morphism ϕ̂ induces an automorphism of π1 (S, p0 ). Note that the element ϕ̂(w2−1 w1 )λw0p λ−1 belongs to the conjugacy class 0 of ϕ̂(w) Let w12 be the reduced representative of ϕ(w2−1 w1 ) and let 0 −1 W = w12 λw λ . By Lemma 2.11 below, there are at most Λn (ϕ̂)2 0 simplifications between the words w12 and λw0p λ−1 . Moreover, by the same lemma, the length of a word A such that the reduced representative of W has the form AW 0 A−1 , with W 0 cyclically reduced, is at 2 most Λn (ϕ̂)2 . Hence the word W 0 contains the word w0p−2Λn (ϕ̂) as a subword. As a consequence c([ϕ(w)]) ≥ c(W 0 ) ≥ p − 2Λn (ϕ̂)2 .  DISTORTION AND TITS ALTERNATIVE IN M∞ (S, K) 16 Let n ≥ 1. We denote by l the word length on the free group Fp on p generators and by G the standard generating set of this free group. For any automorphism f of the free group Fp , let Λ(f ) = max l(f  (g)). ∈{−1,1}, g∈G 0 For elements w and w of Fp , which we see as reduced words on elements of G ∪ G −1 , we denote by co(w, w0 ) the length of the longest word w such that the words w and w0 both begin with w. The following lemma is due to Cooper (see [7]). Lemma 2.11. Let f be an automorphism of Fp . For any w and w0 in Fp , if co(w, w0 ) = 0, then co(f (w), f (w0 )) ≤ Λ(f )2 . This lemma means that, if w−1 w0 is a reduced word, then there are at most Λ(f )2 simplifications in f (w)−1 f (w0 ) between the words f (w)−1 and f (w0 ). Proof. It suffices to prove that, for any elements w and w0 of Fp , co(w, w0 ) > Λ(f )2 ⇒ co(f −1 (w), f −1 (w0 )) > 0. Claim 2.12. Denote by w the maximal common prefix of w and w0 . Then co(f −1 (w), f −1 (w0 )) ≥ l(w)/Λ(f ) − Λ(f ). If we believe this claim and if l(w) = co(w, w0 ) > Λ(f )2 , then co(f −1 (w), f −1 (w0 )) > 0. Now, let us prove this claim. It suffices to prove co(f −1 (w), f −1 (w)) ≥ l(w)/Λ(f ) − Λ(f ) and the same thing for f −1 (w0 ). As w and w0 play symmetric roles, it suffices to prove it for w. Take any strict prefix of w of the form wξ and let a ∈ A be the following letter in the reduced word w. Taking the product of f −1 (wξ) with f −1 (a) can cause at most Λ(f ) simplifications, hence co(f −1 (wξ), f −1 (wξa)) ≥ l(f −1 (wξ)) − Λ(f ). By definition of Λ(f ), l(f −1 (wξ))Λ(f ) ≥ l(f (f −1 (wξ))) ≥ l(w). Hence co(f −1 (wξ), f −1 (wξa)) ≥ l(w)/Λ(f ) − Λ(f ). But co(f −1 (w), f −1 (w)) ≥ minξ,a co(f −1 (wξ), f −1 (wξa)), where the minimum is taken over all the words ξ and letters a such that wξa is a prefix of w. This yields the lemma.  It suffices to prove Lemma 2.10 to complete the proof of Proposition 2.8. Proof of Lemma 2.10. For any finite sequence I of 0 and 1, we denote by YI the set of elements w of X such that there exists a finite sequence J of 0 and 1 with w = xIJ . Lemma 2.10 is an easy consequence of the following claim. DISTORTION AND TITS ALTERNATIVE IN M∞ (S, K) 17 Claim 2.13. For any sequence I in {0, 1}N (f ) , there exists an element γI in π1 (SN (f ) , p0 ) such that ∀w ∈ YI , fˆ(w) = γI wγI−1 . Before proving the claim, let us prove Lemma 2.10. Observe that [ A ∪ X = A ∪ XN (f ) ∪ YI . I∈{0,1}N (f ) By the above claim, for any element w of X ∪ A, l(fˆ(w)) ≤ max(1 + 2 max l(γI ), max I∈{0,1}N (f ) w∈A∪XN (f ) l(fˆ(w))). Moreover, by the claim and as, for any element w of X ∪ A, fˆ−1 (w) = fˆ−1 (γ −1 )fˆ−1 (fˆ(w))fˆ−1 (γI ) = fˆ−1 (γ −1 )wfˆ−1 (γI ). I I Therefore, we can take Cf = max(1 + 2 max N (f ) I∈{0,1} ∈{−1,0} l(fˆ (γI )), max l(fˆ (w))). w∈A∪XN (f ) ∈{−1,1} Now, let us prove the claim. For any I ∈ {0, 1}N (f ) , fix a simple curve αI such that αI (0) = p0 , αI (1) ∈ ∂DI and αI ((0, 1)) ⊂ SN (f ) . A loop which represents w ∈ YI can be written w = αI w0 αI−1 , where w0 : [0, 1] → S is a simple loop which is contained in DI with w0 (0) = w0 (1) = αI (1). As the diffeomorphism fˆ fixes the point p0 and pointwise fixes UN (f ) , fˆ(w) = fˆ(αI )fˆ(w0 )fˆ(αI−1 ) = fˆ(αI )w0 fˆ(αI−1 ), fˆ(αI (0)) = p0 = αI (0), fˆ(αI (1)) = αI (1) and fˆ(αI ((0, 1))) ⊂ SN (f ) . Hence fˆ(w) = fˆ(αI )αI−1 wαI f (αI−1 ). It suffices to take γI = f (αI )αI−1 .  Definition 2.3. Given an arbitrary cantor set K in a surface S, there is a homeomorphism hK of S sending K to the standard ternary cantor set K 0 ⊂ S. We define, for each isotopy class [w] of loop in S \ K: c([w]) = c([hK (w)]) We are ready to prove and state the main proposition for the smooth mapping class group M∞ (S, K). Proposition 2.14. Let K be any cantor set in a surface S. For every g ∈ M∞ (S, K), there exists a constant Cg such that, for any isotopy class [w] of loop contained in S \ K, c(g([w])) ≤ c([w]) + Cg . DISTORTION AND TITS ALTERNATIVE IN M∞ (S, K) 18 Proof. By making use of Proposition 3.1, we can write any representative of a mapping class group g ∈ M∞ (S, K) as a product g = g1 g2 , where g1 is supported in a disk D containing K and g2 is a pure mapping class in PM∞ (S, K). If hK is the homeomorphism of S sending K to the ternary Cantor set K 0 , we have g hK = g1hK g2hK where the notation xy is used to denote the conjugate yxy −1 . Recall that a representative of g2 pointwise fixes a neighborhood of K, by Lemma 2.2. Hence the elements g1hK and g2hK satisfies the conclusion of our theorem by Prop. 2.7 and Prop. 2.8, therefore the mapping class g hK in M0 (S, K 0 ) also satisfies the conclusion of our theorem. So, for any isotopy class [w] of loop contained in S \ K: c([g(w)]) = c([hK g(w)]) = c(g hK ([hK (w)])) ≤ c([hK (w)])+Cg = c([w])+Cg .  As a corollary, we can prove a second case of Theorem 2.1. Proof of Theorem 2.1 : second case. Let g be an element of PM∞ (S, K) whose normal form contains a Dehn twist about a simple loop α which is not homotopically trivial in S. If such a loop α exists, one can find a non trivial loop [w] ∈ S \ K, such that c(g n ([w])) ≥ nk1 for some k1 > 0. By Prop. 2.14, the mapping class g is not distorted.  2.4. All the curves of R are nullhomotopic in S. To prove Theorem 2.1 in this case, we need the concept of spread. This concept was introduced by Franks and Handel in [11]. 2.4.1. Spread. Let γ be a smooth curve with endpoints p, q (smooth at the endpoints) and β be a simple nullhomotopic closed curve on S such that the point p is contained in the disk bounded by β. For any curve α, the spread Lβ,γ (α) is going to measure how many times α rotates around β with respect to γ. More formally Lβ,γ (α) is defined as the maximal number k, such that there exist subarcs α0 ⊂ α, γ0 ⊂ γ such that γ0 α0 is a closed curve isotopic to β k in S \ {p, q}. DISTORTION AND TITS ALTERNATIVE IN M∞ (S, K) 19 β α α γ q p α Figure 4. Examples of curves α, β and γ with Lβ,γ (α) = 3 Example 2.15. In the example depicted in Figure 4, we have a thricepunctured sphere S together with the curves α, β and γ. In this case we have Lβ,γ (α) = 3. The bold loop is a loop isotopic to β 3 . Let us denote by CS,K the set of simple smooth curves [0, 1] → S whose endpoints belong to K and whose interior is contained in S − K. Two such curves are said to be isotopic if there exists a diffeomorphism in Diff 0 (S, K) which sends one of these curves to the other one. We denote by C S,K the set of isotopy classes of curves in CS,K . Take an isotopy class [α] in C S,K . We define Lβ,γ ([α]) as the infimum of Lβ,γ (α) over all the representatives α of the class [α]. The lemma below is stronger than Lemma 6.8 in [11] but it follows from the proof of Lemma 6.8. Notice that we state it only in the case where the curve β bounds a disk as we believe that the proof given in [11] covers only this case (which is sufficient for the purposes of the article [11]). Let γ be a smooth curve in CS,K which join the points x1 and x2 . Let β be a simple loop contained in S − K which bounds a disk D in the surface S and which is homotopic to a small loop around x1 relative to {x1 , x2 }. We suppose that γ is not homotopic relative to its endpoints to a curve contained in D. DISTORTION AND TITS ALTERNATIVE IN M∞ (S, K) 20 Lemma 2.16 (Franks-Handel). Let G = {gi , 1 ≤ i ≤ k} be a finite set of elements of Diff(S). There exists a constant C > 0 such that the following property holds. Let f be any diffeomorphism which fixes K pointwise and which belongs to the group generated by the gi ’s. Then, for any curve α in CS,K , Lβ,γ (f (α)) ≤ Lβ,γ (α) + ClG (f ). Corollary 2.17. Let G = {ξi , 1 ≤ i ≤ k} be a finite set of elements in M∞ (S, K). Let η be an element of the group generated by the ξi ’s which fixes K pointwise. Then there exists a constant C > 0 such that, for any n > 0 and [α] in C S,K , Lβ,γ (η n ([α])) ≤ Lβ,γ ([α]) + ClG (η n ). Proof of the corollary. Let ln = lG (η n ). Take a representative f in Diff ∞ (S) of η and, for each i, choose a representative gi of ξi . For any curve α representing a class [α] in CS,K , the curve f n (α) represents the class η n ([α]). Additionally, by hypothesis, we can write f n = gi1 gi2 . . . giln h0 , where 1 ≤ ij ≤ k and h0 is a diffeomorphism of S isotopic to the identity relative to K. Franks and Handel’s lemma implies that there exists a constant C > 0 independent of n and α such that Lβ,γ (f n (α)) ≤ Lβ,γ (h0 (α)) + Cln . Hence Lβ,γ (η n ([α])) ≤ Lβ,γ (h0 (α)) + Cln . As α is any curve in the isotopy class of [α], Lβ,γ (η n ([α])) ≤ Lβ,γ ([α]) + Cln .  The above corollary immediately yields the result below. Corollary 2.18. Let η be a distorted element in PM∞ (S, K). Then, for any [α] in C S,K , Lβ,γ (η n ([α])) = 0. n→+∞ n We are now ready to start the proof of Theorem 2.1. lim 2.4.2. End of the proof of Theorem 2.1. The following proposition completes the proof of Theorem 2.1. Proposition 2.19. Let ξ be a non-trivial element of M∞ (S, K). Suppose that ξ fixes K pointwise and is equal to a finite composition of Dehn twists about disjoint simple loops of S − K which are pairwise non-isotopic relative to K, which are not homotopic to a point relative DISTORTION AND TITS ALTERNATIVE IN M∞ (S, K) 21 to K and which are homotopically trivial in S. Then ξ is not distorted in M∞ (S, K). Proof. Denote by f a representative of ξ in Diff ∞ (S) which is equal to the identity outside small tubular neighbourhoods of the loops appearing in the decomposition of ξ. Also denote by C(f ) the set of loops appearing in this decomposition. By hypothesis, any curve in C(f ) bounds a disk in S. First case: Suppose that at least two connected components of the complement of the curves of C(f ) contain points of K. Lemma 2.20. There exists a simple smooth curve α : [0, 1] → S such that its endpoints α(0) = x1 and α(1) = x2 belong to the Cantor set K and with one of the following properties. (1) The curve α meets exactly one loop β of C(f ) transversely in only one point. Moreover, this loop β is isotopic to a small loop around x1 relative to {x1 , x2 }. (2) The curve α meets exactly two loops β and γ of C(f ) transversally and in one point. Moreover, the loop β is isotopic to a small loop around x1 relative to {x1 , x2 } and the loop γ is isotopic to a small loop around x2 relative to {x1 , x2 }. Proof. In order to carry out this proof, we have to introduce some notation. Suppose that the surface S is different from the sphere. Then, for any loop γ in C(f ), there exists a unique connected component of S − γ which is homeomorphic to an open disk. We call this connected component the interior of γ. In the case where S is a sphere, we fix a point on this surface which does not belong to any curve of C(f ). Then, for any loop γ of C(f ), we call interior of γ the connected component of S − γ which does not contain this point. To each curve γ in C(f ), we will associate a number l(γ) ∈ N which we call its level. For any curve γ of C(f ) which is not contained in the interior of a loop of C(f ), we set l(γ) = 0. Denote by Ci (f ) the set of curves of C(f ) whose level is i. The following statement defines inductively the level of any curve in C(f ): for any i ≥ 1, a curve γ in C(f ) − Ci−1 (f ) satisfies l(γ) = i if it is not contained in the interior of a curve in C(f ) − Ci−1 (f ). See Figure 5 for an example. The represented loops are the elements of C(f ) in this example and the numbers beside them are their levels. Now, we are ready for the proof. Take a loop β in C(f ) whose level is maximal. As the level of this curve is maximal, its interior does not DISTORTION AND TITS ALTERNATIVE IN M∞ (S, K) 22 0 0 1 2 2 2 1 1 0 Figure 5. Level of curves of C(f ). contain any curve of C(f ). However, its interior has to contain a point x1 of K: otherwise, the loop β would be homotopically trivial. If l(β) = 0, denote by U the complement of the interiors of the curves of level 0 in C(f ). Otherwise, let U be the complement of the interiors of the curves of level l(β) in the interior of δ, where δ is the unique loop of level l(β) − 1 whose interior contains β. If the open set U contains some point x2 of K, it is not difficult to find a curve α which satisfies the first property of the lemma. Otherwise, there exists a loop γ of level l(β) which is different from β. If l(β) = 0, this is a consequence of the hypothesis made for the first case. If l(β) 6= 0, we can further require that this loop is contained in the interior of δ: if this was not the case, β would be isotopic to δ, a contradiction. In this case, take a path α going from x1 to U crossing β once and from U to a point x2 of K contained in the interior of γ crossing γ once. This path satisfies the second property of the lemma.  In this case, we will prove Proposition 2.19 only in the case where the surface S is different from the sphere. The case of the sphere is similar and is left to the reader. Denote by S 0 the surface obtained from S by blowing up the points x1 and x2 (replacing these points with circles). Denote by C1 ⊂ S 0 the circle which projects to the point x1 in S and by C2 ⊂ S 0 the circle which projects to the point x2 . Denote by S̃ 0 the universal cover of S 0 . The space S̃ 0 can be seen as a subset of the universal cover H2 of the double of S 0 , which is the closed surface obtained by gluing S 0 with itself by identifying their boundaries. The curve α lifts to a smooth curve α0 of S 0 whose endpoints are x01 ∈ C1 and x02 ∈ C2 . By abuse of notation, we denote by β the lift of the curve DISTORTION AND TITS ALTERNATIVE IN M∞ (S, K) 23 β to S 0 . As the diffeomorphism f fixes both points x1 an x2 , it induces a smooth diffeomorphism f 0 of S 0 , acting by the differential of f on the circles C1 and C2 . Observe that the diffeomorphism f 0 preserves C1 and C2 and is not a priori isotopic to the identity. As the compact set K is perfect, the point x1 is accumulated by points of K which are fixed under f . Denote by z a point of C1 which corresponds to a direction in Tx1 (S) accumulated by points of K. Then the diffeomorphism f 0 fixes the point z. Denote by C̃1 a lift of C1 , i.e. a connected component of p−1 (C1 ), where p : S̃ 0 → S 0 is the projection, and by z̃ a lift of the point z contained in C̃1 . Denote by α̃0 a lift of α0 which meets C̃1 and by β̃ the lift of β which meets α̃0 . The curve α̃0 joins the points x̃01 ∈ C̃1 and x̃02 ∈ C̃2 , where C̃2 is a connected component of p−1 (C2 ). Denote by f˜0 : S̃ 0 → S̃ 0 the lift of f 0 which fixes the point z̃. This lift f˜0 preserves C̃1 . Denote by T the deck transformation corresponding to β̃ (or equivalently C̃1 ). Then the diffeomorphism f˜0 fixes all the points of the orbit of z̃ under T . Hence the orbit of x̃01 under f˜0 lies on C̃1 between two consecutive points of the orbit of z̃ under T . Up to translating z̃, we can suppose that these points are z̃ and T (z̃). T 3 (x̃02 ) T 2 (x̃02 ) T (x̃02 ) f̃ (α̃) T 2 (α̃) T 3 (α̃) T 3 (x̃01 ) T (α̃) T 2 (x̃01 ) T (x̃01 ) x̃01 α̃ x̃02 C̃2 C̃1 β̃ Figure 6. f˜(α̃) in the case k = 3 First suppose that the only loop in C(f ) met by the curve α is β. In this case, by definition of a Dehn twist, there exists k 6= 0 such that, for any integer n, f˜0n (x̃02 ) ∈ T kn (C̃2 ) (see Figure 6). For any 1 ≤ j ≤ kn−1, the curve T j (α̃0 ) separates S̃ 0 into two connected components. Observe DISTORTION AND TITS ALTERNATIVE IN M∞ (S, K) 24 that the point f˜n (x̃01 ) belongs to one of them and that the component T kn (C2 ) belongs to the other one. Hence the curve f˜0n (α̃0 ) has to meet each of the curves T j (α̃0 ), for 1 ≤ j ≤ kn − 1. Denote by ỹ1 the first intersection point of the curve f˜0n (α̃) with the curve T (α̃0 ) and by ỹ2 the last intersection point of f˜0n (α̃0 ) with the curve T kn−1 (α̃0 ). As the curve T (α̃0 ) belongs to the same component of the complement of T kn−1 (α̃0 ) as the point x̃01 , the curve α̃0 meets the point ỹ1 before meeting the point ỹ2 . Consider the curve γ̃ which is the concatenation of the segment of f˜0n (α̃0 ) between ỹ1 and ỹ2 and the segment of the curve T kn−1 (α̃0 ) between ỹ2 and T kn (ỹ1 ) The projection on S of γ̃ is isotopic to β kn−2 relative to x1 and x2 . Hence Lβ,α (f n (α)) ≥ |k| n−2. In the above proof, we just used the fact that the curve α̃0 joined a point of the boundary component C̃1 which is between z̃ and T (z̃) to the boundary component C̃2 . We will prove the following claim. Claim 2.21. Any curve δ of CS,K which represents the same class as α in C S,K has a lift δ̃ 0 to S̃ 0 with the following property. The curve δ̃ 0 joins a point of the boundary component C̃1 which is between z̃ and T (z̃) to the boundary component C̃2 . Hence, for any curve δ isotopic to α relative to K, we obtain that, for any n, Lβ,α (f n (δ)) ≥ kn − 2 and Lβ,α (ξ n ([α])) ≥ |k| n − 2. By Corollary 2.18, the element ξ is undistorted in the group M∞ (S, K). Proof of the claim. By definition, there exists a continuous path (gt )t∈[0,1] of diffeomorphisms in Diff ∞ 0 (S, K) such that g0 = IdS and g1 (α) = δ. This path of diffeomorphisms lifts (by acting by the differential on C1 and C2 ) to a path of diffeomorphisms (gt0 )t∈[0,1] of S 0 which in turn lifts to a path (g̃t0 )t∈[0,1] of diffeomorphisms such that g̃00 = IdS̃ 0 . As the direction in S corresponding to z ∈ C1 is accumulated by points of K, we have that for any t, gt0 (z) = z, then, for any t, g̃t0 (z̃) = z̃ and g̃t0 (T (z̃)) = T (z̃). Moreover, for any t, the diffeomorphism g̃t0 preserves C̃1 and C̃2 . Therefore, for any t, the point g̃t0 (α̃0 (0)) lies between the points z̃ and T (z̃) and the point g̃t0 (α̃0 (1)) belongs to C̃2 . In particular, the curve g̃10 (α̃0 ) is a lift of δ which satisfies the required properties.  DISTORTION AND TITS ALTERNATIVE IN M∞ (S, K) 25 Now, suppose that the curve α meets a loop of C(f ) which is different from β, i.e. the second case in Lemma 2.20 occurs. Denote by γ̃ a lift of γ to S̃ 0 . Observe that there exists k 6= 0 such that, for any n, the curve f˜0n (α̃0 ) meets T kn (γ̃). As the curves T j (α̃) separate the point x̃1 from the curve T kn (γ̃) for any 1 ≤ j ≤ kn − 1, this case can be handled in the same way as the case where the curve α meets only one loop in C(f ). Second case: Only one component of the complement of the curves of C(f ) meets K, i.e. the diffeomorphism f is some power of a Dehn twist about this curve. In this case, we can take this curve as β and we take any simple curve α : [0, 1] → K in CS,K with the following properties. (1) α(0) = α(1). (2) The curve α is not homotopic relative to its endpoints to a curve contained in the disk bounded by β. (3) The curve α meets β in exactly two points. This case is then handled in the same way as the first case.  3. Independence of the surface Let S be a closed surface and K be any closed subset of S. Recall that diffS (K) = M∞ (S, K)/PM∞ (S, K). This group can also be seen as the quotient of the group Diff ∞ (S, K) consisting of diffeomorphisms that preserve K by the subgroup of Diff ∞ (S, K) consisting of elements which fix K point-wise. In what follows, we call disk the image of the unit closed disk D2 under an embedding D2 ,→ S. Suppose that the closed set K is contained in the interior of a disk D. The goal of this section is to prove the following proposition. Proposition 3.1. Any element of diffS (K) has a representative in Diff ∞ 0 (S) which is supported in D. The proof of this proposition also implies that diffS (K) is isomorphic to M∞ (S, K)/PM∞ (S, K). The following corollary implies that, to prove something about groups of the form diffS (K), it suffices to prove it in the case where the surface S is the sphere. DISTORTION AND TITS ALTERNATIVE IN M∞ (S, K) 26 Corollary 3.2. Let S an S 0 be surfaces and K ⊂ S and K 0 ⊂ S 0 be closed subsets. Suppose that there exist disks DS ⊂ S and DS 0 ⊂ S 0 as well as a diffeomorphism ϕ : DS → DS 0 such that: (1) The closed set K is contained in the interior of the disk DS . (2) The closed set K 0 is contained in the interior of the disk DS 0 . (3) ϕ(K) = K 0 . Then, the group diffS (K) is isomorphic to diffS 0 (K 0 ). Proof. Let ψ : D2 → DS be a diffeomorphism. This diffeomorphism induces a morphism Ψ : diffD2 (ψ −1 (K)) → diffS (K) . ξ 7→ ψξψ −1 By Proposition 3.1, this morphism is onto. Let us prove that it is into. Let ξ and ξ 0 be elements of diffD2 (ψ −1 (K)) such that Ψ(ξ) = Ψ(ξ 0 ). 2 Take representatives f and f 0 of ξ and ξ 0 in Diff ∞ 0 (D ). Then there ∞ exists a diffeomorphism g in Diff 0 (S) which fixes K pointwise such that ψf ψ −1 = gψf 0 ψ −1 . The support of g, which is also the support of ψf f 0−1 ψ −1 , is contained in DS . Hence, there exists a diffeomorphism 2 −1 0 −1 g 0 in Diff ∞ 0 (D ) which fixes ψ (K) pointwise such that g = ψg ψ . 0 0 0 Therefore, f = g f and ξ = ξ . For the same reason, the map Ψ0 : diffD2 (ψ −1 (K)) → diffS 0 (K 0 ) ξ 7→ ϕψξψ −1 ϕ−1 is an isomorphism. Hence the map Ψ0 Ψ−1 is an isomorphism between diffS (K) and diffS 0 (K 0 ).  To prove Proposition 3.1, we need the following lemma (see [19] Theorem 3.1 p.185). Lemma 3.3. Let Σ be a surface and e1 , e2 : D2 → Σ be orientation preserving smooth embeddings such that e1 (D2 ) ∩ ∂Σ = ∅ and e2 (D2 ) ∩ ∂Σ = ∅. Then there exists a diffeomorphism h in Diff ∞ 0 (Σ) such that h ◦ e1 = e2 . Proof of Proposition 3.1. Let ξ be an element of diffS (K) and take a representative f of ξ in Diff ∞ 0 (S). In the case where the surface S is the sphere, choose a representative f which fixes a point p in S − D. Let Σ be an embedded compact surface contained in the interior D̊ of D which is a small neighbourhood of K. More precisely, this embedded surface Σ is chosen close enough to K so that the sets Σ and DISTORTION AND TITS ALTERNATIVE IN M∞ (S, K) 27 f (Σ) are contained in D̊. Observe that this surface Σ is not necessarily connected and denote by Σ1 , . . . , Σl its connected components. As these surfaces are embedded in a disk, each of these components is diffeomorphic to a disk with or without holes. Fix 1 ≤ i ≤ l. Denote by Ui the connected component of S − Σi which contains ∂D. Finally, let Di = S − Ui . Observe that the surface Di is diffeomorphic to a disk : it is the surface Σi with ”filled holes”. Claim 3.4. For any i, Di ∪ f (Di ) ⊂ D̊. Proof. In the case where S 6= S2 , observe that the connected component of S − f (Σi ) which contains ∂D (and hence S − D as f (Σi ) ⊂ D) is not homeomorphic to a disk. Therefore, this connected component has to be f (Ui ) and S − D̊ ⊂ f (Ui ) ∩ Ui . Taking complements, we obtain the desired property. The case of the sphere is similar: f (Ui ) is the only connected component of S − f (Σ) which contains p = f (p).  Given two disks in the family D1 , D2 , . . . , Dl , observe that either they are disjoint or one of them is contained in the other one. Indeed, for any i, the boundary of Di is a boundary component of Σi and the surfaces Σi are pairwise disjoint. Hence, it is possible to find 0 pairwise disjoint disks D10 , . . . Dm among the disks D1 , . . . , Dl such that 0 0 0 . D1 ∪ D2 ∪ . . . ∪ Dl = D1 ∪ D2 ∪ . . . ∪ Dm We prove by induction on i that, for any i ≤ m, there exists a diffeomorphism gi supported in D such that f|D10 ∪D20 ∪...∪Di0 = gi|D10 ∪D20 ∪...∪Di0 . Then the diffeomorphism gm is a representative of ξ supported in D. In the case i = 1, use Lemma 3.3 to find a diffeomorphism g1 supported in D such that f|D10 = g|D10 . Suppose that we have built the diffeomorphism gi for some i < m. 0 Observe that the diffeomorphism gi−1 f fixes D10 ∪D20 ∪. . .∪Dm pointwise −1 0 0 and satisfies gi f (Di+1 ) ∪ Di+1 ⊂ D̊. Apply Lemma 3.3 to find a diffeomorphism h supported in D − (D10 ∪ D20 ∪ . . . ∪ Di0 ) such that 0 0 gi−1 f|Di+1 = h|Di+1 and take gi+1 = gi h.  DISTORTION AND TITS ALTERNATIVE IN M∞ (S, K) 28 4. Standard Cantor set Fix a parameter 0 < λ < 1/2. The central ternary Cantor set Cλ in R × {0} ⊂ R2 ⊂ S2 is obtained from the interval [0, 1] as the limit of the following inductive process: At the first step, take out the central subinterval of length (1 − 2λ) from the interval [0, 1] to obtain a collection I1 of two intervals of size λ. At the n-th step of the process, we obtain a collection In of 2n intervals of size λn by removing from each interval I in In−1 , the middle subinterval of size (1 − 2λ)|I|. Our Cantor set is given by the formula: Cλ := ∩n≥0 (∪In ) In this section we will prove Theorem 1.2, which we restate as follows: Theorem 4.1. Let S be a closed surface. For any λ > 0, there are no distorted elements in the group M∞ (S, Cλ ), where Cλ is a smooth embedding in S of the standard ternary Cantor set with affine parameter λ. Definition 4.1. We call elementary interval in our Cantor set Cλ a set of the form Cλ ∩ I 0 , where I 0 is an interval in the collection In for some n. It was proven in Funar-Neretin ([13], see Theorem 6) that any element φ ∈ diffR2 (Cλ ) is piecewise affine, i.e. there exists a finite collection of elementary intervals {Ik } covering Cλ such that φ sends Ik into another elementary interval φ(Ik ) and such that φ|Ik = ±λnk x + ck , for some nk ∈ Z and an appropriate constant ck . One consequence of this fact is that the group diffR2 (Cλ ) does not depend on λ. Therefore we define the group V2 := diffR2 (Cλ ). The group V2 contains Thompson’s group V2 , which we define as the group of homeomorphisms of Cλ which are piecewise affine, where the affine maps are of the form x → λn x + c, see 5.1 for another description of V2 . (See also [2], [6] and [13]). Even though the groups V2 and V2 are different and V2 ⊂ V2 , there is an embedding of the group V2 into V2 as we will show in the following proposition: Proposition 4.2. There is an injective homomorphism φ : V2 → V2 . Proof. Let us define K := Cλ for some 0 < λ < 1. Consider the Cantor set K 0 := K0 ∪ K1 , where K0 = K and K1 is the Cantor set obtained DISTORTION AND TITS ALTERNATIVE IN M∞ (S, K) 29 Figure 7. An element f ∈ V2 Figure 8. The corresponding element φ(f ) ∈ V2 . by reflecting K0 in the vertical line x = 3/2 as in Figure 8. There is an involution σ : K → K given by x → 1 − x. We will use the following notation: for any interval I ⊂ K, Ii is the corresponding interval of I in the copy Ki . For a homeomorphism f ∈ V2 of the ternary Cantor set Cλ , we define φ(f ) ∈ V2 as the piecewise affine homeomorphism of K 0 which satisfies the following property. Let I ⊂ K be any elementary interval such that our homeomorphism f sends I affinely into the elementary interval J := f (I). In this situation, we will define φ(f ) on I0 ∪ σ(I)1 by the following rules: (1) If f preserves the orientation of I, we define: φ(f )(I0 ) = J0 and φ(f )(σ(I)1 ) = σ(J)1 . DISTORTION AND TITS ALTERNATIVE IN M∞ (S, K) 30 (2) If f reverses the orientation of I, we define: φ(f )(I0 ) = σ(J)1 and φ(f )(σ(I)1 ) = J0 . (3) In (1) and (2), the maps φ(f )|I0 and φ(f )|σ(I)1 are affine orientation preserving maps. One can easily check that φ(f ) is well defined on K 0 (If I ⊂ J and f |I and f |J are affine maps, then the definition of φ(f ) on I0 ∪ σ(I)1 and on J0 ∪ σ(J)1 should coincide). See Figure 8 for an illustration of this construction. We still need to prove that φ is a group homomorphism, but that can be shown easily as follows: Suppose f and g are two elements of V2 . If we partition our Cantor set K into a collection {In } of sufficiently small intervals, we can suppose that each interval In is mapped affinely by f and also that each interval f (In ) is mapped affinely by g. One can then do a case by case check (whether f, g are preserving orientation or not in In and f (In ) respectively) to show that, restricted to the intervals (In )0 and (σ(In ))1 in K 0 , we have φ(gf ) = φ(g)φ(f ).  Example: Consider the element f described in Figure 7. The arrows in the picture indicate where f is mapping each of the 4 elementary intervals affinely. The symbols −, + denote whether the interval is mapped by f preserving orientation or not. The corresponding element φ(f ) is depicted in Figure 8. The previous construction is useful for our purposes because it is known there are no distorted elements in Thompson’s group Vn (see Bleak-Collin-et al. [2], Sec.8, see also Hmili-Liousse [20], Corollary 1.10). By Proposition 4.2, this implies there are no distorted elements in V2 . Having that fact in mind and in view of Theorem 2.1 we can easily finish the proof of Theorem 4.1: Proof of Theorem 4.1. Suppose f ∈ M∞ 0 (S, Cλ ) is distorted. Observe that, by Corollary 3.2, the group diffS (Cλ ) is isomorphic to diffR2 (Cλ ). From the exact sequence: ∞ PM∞ 0 (S, Cλ ) → M0 (S, Cλ ) → diffS (Cλ ) = V2 , π we obtain that π(f ) is distorted. Now, by Lemma 4.2, V2 embeds in V2 and as there are no infinite order distorted elements in V2 (See [2], Sec.8), the element π(f ) has finite order. Thus, we obtained that k f k ∈ PM∞ is as well 0 (S, Cλ ) for some k ≥ 1, and the element f k distorted. By Theorem 2.1, f = Id and so f has finite order.  DISTORTION AND TITS ALTERNATIVE IN M∞ (S, K) 31 5. Tits alternative The “Tits alternative” states that a finitely generated group Γ which is linear (isomorphic to a subgroup of GLn (R) for some n) either contains a copy of the free subgroup on two generators F2 or it is virtually solvable. In [22], Margulis proved a similar statement for Homeo(S1 ): Any subgroup Γ ⊂ Homeo(S1 ) either contains a free subgroup or preserves a measure in S1 . As the derived subgroup [Fn , Fn ] of Thompson’s group Fn is a simple subgroup of Homeo(S1 ) (see [6], Theorem 4.5) and does not contain free subgroups on two generators by BrinSquier’s Theorem (see [16], Theorem 4.6 p.344), the actual statement of the Tits alternative cannot hold in Homeo(S1 ) (see also [23]). In this section, we prove Theorem 1.3. By Corollary 3.2, Theorem 1.3 reduces to the following theorem. Theorem 5.1. Let Γ be a finitely generated subgroup of M∞ (R2 , Cα ), then one of the following holds: (1) Γ contains a free subgroup on two generators F2 (2) Γ has a finite orbit, i.e. there exists p ∈ Cα such that the set Γ(p) := {g(p) |g ∈ Γ} is finite. Using the description of diffR2 (Cλ ) explained at the beginning of Section 4 and Proposition 4.2, we deduce the previous theorem as an immediate corollary of the following statement about Thompson’s group Vn , which could be of independent interest: Theorem 5.2. For any finitely generated subgroup Γ ⊂ Vn , either the action of Γ on the Cantor set Kn has a finite orbit or Γ contains a free subgroup. The finite generation condition is indeed necessary, as the following example shows: The finite group of permutations S2n is a subgroup of V2 as it acts on Cλ by permutations of the elementary intervals of the collectionSIn described at the beginning of Section 4. Defining the group S∞ := n S2n , we easily see that S∞ has no finite orbit (the action is in fact minimal) and there is no free subgroups in S∞ as any element has finite order. 5.1. Elements of Vn and tree pair diagrams. We need to describe the action of the elements of Vn on the Cantor set Kn in detail. In order to do this, we will use as a tool the description of the elements of Vn as tree pair diagrams as described for example in [2], [4], [6], [24]. DISTORTION AND TITS ALTERNATIVE IN M∞ (S, K) 32 We will follow very closely the description given in [2] and we refer to it for a more detailed explanation of the material introduced in this subsection. The main tool for us is the existence of “revealing tree pair diagrams” which were first introduced by Brin in [4]. These “revealing diagrams” allow us to read the dynamics of elements of Vn easily. Indeed, we will show that for each element g ∈ Vn , there are two g−invariant clopen sets Vg and Ug such that Kn = Ug ∪ Vg , where g|Ug has finite order and g|Vg has “repelling-contracting” dynamics. The reader that decide to skip this introductory subsection, should look at Lemma 5.5, where all the properties of the dynamics of elements of Vn in Kn that we will use are described. Figure 9. The rooted tree T2 , for a vertex a ∈ T2 , the tree Ta and the elementary interval Ka are depicted 5.1.1. Notation. From now on, Kn denotes the Cantor set that we identify with the ends of the infinite rooted n−tree Tn (see Figure 9, where T2 and K are depicted). For a vertex a ∈ Tn , we define Ta as the infinite n-ary rooted tree descending from a. We define the clopen set Ka ⊂ K as the ends of Ta (see Figure 9). Any subset of Kn of the form Ka is an elementary interval as in Definition 4.1. DISTORTION AND TITS ALTERNATIVE IN M∞ (S, K) 33 The group Vn is a subgroup of the group Homeo(Kn ). Our next task is to describe which kind of homeomorphisms of Kn belong to Vn , looking at the example depicted in Figure 10 might be instructive to understand what an element of Vn can be. Figure 10. An element f of V2 An element g of Vn is described by a triple (A, B, σ) where A and B are n-ary rooted trees (connected subtrees of Tn ) with the same number of endpoints (A, B tell us a way of partitioning our Cantor set Kn into elementary intervals) together with a bijection σ between the endpoints of A and the endpoints of B that tell us how an interval is going to be mapped by g to another interval. More formally, for an endpoint a ∈ A, g maps Ka into Kσ(a) by mapping Ta into Tσ(a) in the obvious way (see Figure 10). 5.2. Revealing pairs. It should be noted that an element g ∈ Vn is not described by a unique tree pair diagram (A, B, σ). Some tree pair diagrams describe the dynamics of an element Vn better than others. As an example, consider the element f with the diagrams depicted in Figures 10 and 11. In the tree pair diagram in Figure 11, the trees A and B coincide and so f must have finite order. Before defining what a revealing tree pair diagram is, we will need to set up some notation. Let g ∈ Vn be an element described by a tree pair (A, B, σ). DISTORTION AND TITS ALTERNATIVE IN M∞ (S, K) 34 Figure 11. A revealing pair diagram for the element in Figure 10. Consider the sets X = A − B and Y = B − A. Notice that each connected component of X (respectively Y ) is a rooted tree whose root is an endpoint of B but not of A (respectively A but not B). In the example depicted in Figure 12, X is blue and Y is red. Let L(A,B,σ) denote the set of vertices of Tn which are endpoints of either A or B. A vertex in L(A,B,σ) is called neutral if x is an endpoint of both A and B. Observe that if λ ∈ L(A,B,σ) and if g i (λ) is a neutral vertex of L(A,B,σ) for every i ≥ 0, then the vertex λ must be periodic for g. Let t be the period of λ, i.e. the minimal t > 0 such that g t (λ) = λ. Observe that in this case g t |Kλ = Id. If λ is not periodic we can find the largest integers s ≥ 0 and r ≥ 0, such that for any −r < i < s, the vertex g i (λ) is a neutral vertex of L(A,B,σ) . In this case, we define the iterated augmentation chain as s IAC(λ) := g i (λ) i=−r . Observe that the vertex g −r (λ) is an endpoint of A but not of B and the vertex g s (λ) is an endpoint of B but not of A. An attractor in L(A,B,σ) is defined as an endpoint of A such that g s (λ) belongs to B \ A and such that g s (λ) is strictly contained in Tλ (g s (λ) is under λ). In this case we see that g s |Kλ has attracting dynamics, and there is a unique attracting point p for g s inside Kλ . In a similar way, one defines a “repeller ” as a vertex λ in B, such that g −r (λ) is strictly contained in Tλ . In Figure 12, the red vertices are attractors and the blue one is a repeller. Observe that attractors are always roots of components of Y and repellers are always roots of components of X. DISTORTION AND TITS ALTERNATIVE IN M∞ (S, K) 35 Definition 5.1. Let (A, B, σ) be a tree pair diagram for an element g ∈ Vn . The set X = A \ B (respectively Y = B \ A) consists of a union of rooted trees, whose roots are endpoints of B (respectively A). If all these vertices are repellers (respectively attractors), then (A, B, σ) is said to be a revealing tree pair diagram. Theorem 5.3 (Brin [4]). For every g ∈ Vn , there exists a revealing tree pair diagram (A, B, σ), even more, there is an algorithm to extend any tree pair diagram into a revealing tree pair diagram. One easy consequence of Theorem 5.3 is that every periodic element of Vn has a tree pair diagram (A, B, σ) where A = B, as it is illustrated in Figure 11. If (A, B, σ) is a revealing pair, the dynamics of each interval under a vertex of L(A,B,σ) can be easily described as we will show next. Let λ be a vertex of L(A,B,σ) s and suppose that λ is not a periodic i vertex. Let IAC(λ) = g (λ) i=−r be its iterated augmented chain. In this case, g −r (λ) is an endpoint of A but not of B, and g s (λ) is an endpoint of B but not of A. Hence, there are two possibilities: either g s (λ) is a root of a component of X, or g s (λ) is a vertex of a tree in Y . If g s (λ) is a root of a component of X, then, as (A, B, σ) is a revealing tree pair diagram, g s (λ) is a repeller. The vertex g −r (λ) is then strictly under g s (λ) and there is a unique fixed point p for g −r−s in Kgs (α) . This point p is a repelling periodic point of order s + r. In that case, the elementary intervals {g i (Kλ )}s−1 i=−r are disjoint and each of them contains a unique repelling periodic point in the orbit of p. If g s (λ) is a vertex of a tree in Y and the vertex g −r (λ) is a root of a component of Y , then g −r (λ) is an attractor. In this case, there is a unique periodic attracting point q of order s + r in Kg−r (α) . Again, the intervals {g i (Kλ )}s−1 i=−r are disjoint and each of them contains a unique attracting periodic point in the orbit of p. If the vertex g −r (λ) is a vertex of a tree in Y under a repeller α and the vertex g s (λ) is a vertex of a tree in X under an attarctor ω, then we see that the forward orbit of Kλ is getting attracted toward the periodic orbit pω corresponding to ω and the backward orbit of Kλ gets attracted toward the periodic repeller pα corresponding to α. DISTORTION AND TITS ALTERNATIVE IN M∞ (S, K) 36 Figure 12. A revealing pair diagram for an element of V2 Example (see Figure 12). We use the following notation, for a number j, we denote by jA the vertex in T2 numbered by j in the tree A. We define similarly the vertices jB . Observe that for our particular example we have 1A = 3B and 2A = 9B . In Figure 12, X is depicted blue. It consists of one rooted tree with root 2B . Observe that, for this element, we have 9A → 9B = 2A → 2B and the vertex 9A is under 2B , and so 2B is a repeller. There is a unique repelling periodic point under 2B of period 2. The set Y consists of two trees, one tree with root 3A and the other one with root 13A , we have 3A → 1A → 7A → 5A → 5B and 5B is under 3A and so 3A is an attractor, there is an attracting periodic point of period 4 under 3A . We also notice that 13B is under 13A and so there is an attracting fixed point under 13A . Observe also that 10A → 11A → 11B , the vertex 10A is under the repeller 2B and 11B under the attractor 13A , this means there are points DISTORTION AND TITS ALTERNATIVE IN M∞ (S, K) 37 arbitrarily close to the repelling periodic point that converge toward the attracting fixed point under 13A and we also have 8A → 8B , where 8A is under the repeller 2B and 8B under the attractor at 3A , and so there are orbits going from the repelling periodic orbit to the attracting periodic orbit corresponding to 3A . As a consequence of the previous discussion, we obtain the following lemma. For a more detailed discussion, see [2] and [24]. Lemma 5.4. Let (A, B, σ) be a revealing pair for an element g ∈ Vn . Let λ be a vertex in LA,B,σ , then exactly one of the following holds. (1) λ is periodic, in which case there is t > 0 such that g t λ = λ and g t |Kλ = Id. (2) Kλ contains a unique contracting periodic point p and there is t > 0 such that g t (Kλ ) ⊂ Kλ and g t |Kλ is contracting affinely (i.e g t sends the interval Kλ into the interval g t (Kλ ) in the obvious way). (3) Kλ contains a unique repelling periodic point p in λ and there is r > 0 such that g −r (Kλ ) ⊂ Kλ and g −r |Kλ is contracting affinely. (4) There exist s ≥ 0, r ≥ 0 such that g s (λ) and g r (λ) are vertices but not roots of components of Y and X respectively. In this case, the following property holds. As n → ∞, g n (Kλ ) gets contracted affinely converging towards an attracting periodic orbit of g and g −n (Kλ ) gets attracted towards a repelling periodic orbit of g. In the proof of Theorem 5.1, we use the following notation which makes the proof easier to digest. Definition 5.2 (Neighborhoods). In the Cantor set Kn , let us consider the metric coming from the standard embedding of Kn in the interval [0, 1]. For a point p ∈ Kn and  > 0, we define the neighborhood N (p) as the maximal elementary interval I such that p ∈ I and length(I) < . Similarly, if S is a finite set, we define N (S) := ∪s∈S N (s). Definition 5.3. For any element g ∈ Vn , we define the following: Att(g) := { p ∈ Kn such that p is periodic and attracting} Rep(g) := { p ∈ Kn such that p is periodic and repelling} Per0 (g) := Att(g) ∪ Rep(g) DISTORTION AND TITS ALTERNATIVE IN M∞ (S, K) 38 By Lemma 5.4, both sets Att(g) and Rep(g) are finite. Hence the set Per0 (g) is also finite. As a conclusion of Lemma 5.4 we obtain the following lemma that enumerates all the dynamical properties of the action of elements Vn on Kn that we will use. Lemma 5.5. Given an element g ∈ Vn there exist two g−invariant clopen sets Ug , Vg (i.e. finite union of elementary intervals in Kn ) such that: (1) Kn = Ug ∪ Vg . (2) g|Ug has finite order. (3) There are finitely many periodic points of g contained in Vg ( the set Per0 (g)) and the dynamics of g|Vg are “attracting-repelling” i.e. for every  > 0, there exists m0 such that, for m ≥ m0 , we have: g m (Vg \ N (Rep(g))) ⊂ N (Att(g)) g −m (Vg \ N (Att(g))) ⊂ N (Rep(g)). (4) If  is small enough, for any point p ∈ Att(g), there exists s (the period of p) such that g s (N (p)) ⊂ N (p) and g s |N (p) is an affine contraction. The analogous condition also holds for points in Rep(g). 5.3. Proof of Theorem 5.1. The idea of the proof of Theorem 5.1 is to use the “attracting-repelling” dynamics of elements of Vn and the “ping-pong” lemma to obtain a free subgroup F2 contained in Γ (this strategy was the one used by Margulis to prove his “alternative” for Homeo(S1 ), see [22]). To illustrate the idea of the proof, suppose our group G contains two elements f and h such that h sends Per0 (f ) ∪ Uf disjoint from itself. In that case, if we consider the element g = hf h−1 , the sets Per0 (f ) ∪ Uf and Per0 (g) ∪ Ug are disjoint. Under this last condition, one can apply the ping-pong lemma (see [18], Ch. 2) as follows to show that hf n , g n i generate a free group if n is large enough. Let us take small disjoint neighborhoods N (Per0 (f )) and N (Per0 (g)) and consider the set X = K \ (Uf ∪ Ug ∪ N (Per0 (f )) ∪ N (Per0 (g))). DISTORTION AND TITS ALTERNATIVE IN M∞ (S, K) 39 If we take  small enough, then X 6= ∅, and, by Lemma 5.5, if n is large enough, we have f n (X) ⊂ N (Att(f )) f −n (X) ⊂ N (Rep(f )) and we also have f n (N (Per0 (g))) ⊂ N (Att(f )) f −n (N (Per0 (g))) ⊂ N (Rep(f )). The corresponding statement for g n and g −n are also true. This implies that f n , g n generate a free group, as for any nontrivial word w on the elements f n , g n , we have by the “ping-pong” argument that w(X) ⊂ N (Per0 (f ) ∪ Per0 (g)) and therefore w 6= Id. As a conclusion, we have proved the following lemma: Lemma 5.6. Let Γ ⊂ Vn . If there are two elements f, h ∈ Γ such that the sets Per0 (f ) ∪ Uf and h(Per0 (f ) ∪ Uf ) are disjoint, then Γ contains a free subgroup on two generators. To prove Theorem 5.1, we will show that either a pair of elements f, h of Γ as in Lemma 5.6 exists or that Γ has a finite orbit in Kn . The following result is the key lemma for proving the existence of such an element h sending Per0 (f ) ∪ Uf disjoint from itself. It is based on a recent proof by Camille Horbez (See [8], Sec.3, [9]) of the Tits alternative for mapping class groups, outer automorphisms of free groups and other related groups. Lemma 5.7. Let Γ be a countable group acting on a compact space K by homeomorphisms and let F ⊂ K be a finite subset. Then either there is finite orbit of Γ on K or there exists an element g ∈ Γ sending F disjoint from itself (i.e. g(F ) ∩ F = ∅). Before beginning the proof of Lemma 5.7, we recall the following basic notions of random walks on groups and harmonic measures. For a discrete group Γ, let us take a probability measure µ on Γ and suppose that hsupp(µ)i = Γ. Suppose our group Γ acts continuously on a compact space X. A harmonic measure in X for (Γ, µ) is a Borel probability measure ν on X such that µ ∗ ν = ν, where ”∗” denotes the convolution operator. This means that, for every ν-measurable set A ⊆ X, X (2) ν(A) = ν(g −1 (A))µ(g) g∈Γ DISTORTION AND TITS ALTERNATIVE IN M∞ (S, K) 40 A harmonic measure always exists (see the proof below) and one can think of it as a measure on X that is invariant under the action of Γ on average (with respect to µ). Proof of Lemma 5.7. Suppose that there is no element of Γ sending F disjoint from itself. Let n = |F |. If n = 1, the theorem is obvious and so we assume n > 1. Consider the diagonal action of Γ on K n . Let p~ = (p1 , p2 , ..., pn ) be an n-tuple consisting of the n different elements of F in some order. We take a probability measure µ supported in our group Γ such that hsuppµi = Γ and take a harmonic probability measure ν on K n supported in Γ~p. Such a harmonic measure ν can be obtained as follows: Take the Dirac probability measure δp~ in K n supported in {~p} and consider the averages of convolutions P νl := 1l li=1 µi ∗δp~ (µi is the measure obtained by convoluting µ i times with itself). Then ν can be taken as any accumulation point of νl in the space of probability measures in K n . Observe that, by our assumption, for each g ∈ Γ, the element g(~p) is contained in a set of the form K l × {pi } × K m for some integers i, l and m such that l + m = n − 1 and therefore: [ Γ~p ⊂ K l × {pi } × K m . 0≤i≤n, l+m=n−1 As ν(Γ~p) = 1, we can conclude that there exist integers i, l and m such that ν(K l × {pi } × K m ) > 0. Let us take q ∈ K such that ν(K l × {q} × K m ) is maximal. We will show that q has a finite Γ-orbit. Observe that, for g ∈ Γ, g(K l × {q} × K m ) = K l × {g(q)} × K m and, therefore, X ν(K l × {q} × K m ) = ν(K l × {gi−1 (q)} × K m )µ(gi ). i So we obtain by our maximality assumption that ν(K l × {q} × K m ) = ν(K l × {g −1 (q)} × K m ) for every g in the support of µ. Hence this also holds for every g ∈ Γ. But being ν a probability measure this can only happen if the orbit Γ(q) is finite and so we are done.  Remark 5.1. One can also conclude with a little bit more of extra work that, for some i, Γ(pi ) is a finite orbit. We will not make use of this fact. The following proposition is our main tool to construct free subgroups of a subgroup Γ of Vn . DISTORTION AND TITS ALTERNATIVE IN M∞ (S, K) 41 Proposition 5.8. Suppose f, g ∈ Γ ⊂ Vn are such that Uf and Ug are disjoint and suppose there is no periodic orbit for Γ in Kn . Then, there exists a free subgroup on two generators contained in Γ. Proof. Taking powers of f and g we can suppose that f |Uf = Id, g|Ug = Id and that the repelling and attracting periodic points of f and g are fixed by f and g respectively. We will prove that, given any  > 0, there exists an element w ∈ G such that Per0 (w ) ∪ Uw is contained in N (Per0 (f ) ∪ Per0 (g)). First, let us show this implies Proposition 5.8. By Lemma 5.7, we can find an element h ∈ Γ sending Per0 (f ) ∪ Per0 (g) disjoint from itself. Hence, if  is small enough, h sends N (Per0 (f ))∪ N (Per0 (g)) disjoint from itself, which implies that the sets Per0 (w ) ∪ Uw and h(Per0 (w ) ∪ Uw ) are disjoint. By Lemma 5.6, Γ contains a free subgroup. We will prove that our desired element w can be taken of the form w := g m1 f m2 . To illustrate the idea of the proof of this fact, suppose first that Per0 (f ) and Per0 (g) are disjoint. In this case, let us define the set V := Vf − N (Rep(f )). Take  small enough so that, for a point p ∈ Att(f ) either N (p) ⊂ Ug or N (p) is contained in Vg \ N (Rep(g)). Also, take  small enough so that the sets N (Att(f )), N (Rep(f )), N (Att(g)) and N (Rep(g)) are pairwise disjoint. By Lemma 5.5, we can take m large enough so that f m (V ) ⊂ N (Att(f )) and g m (N (Att(f ))) ⊂ N (Att(f ) ∪ Att(g)). As a conclusion, we obtain that: (3) g m f m (V ) ⊂ N (Att(f )) ∪ N (Att(g)). Also, if we consider the set U := Uf \ N (Rep(g)), taking m larger if necessary, we have (4) g m f m (U ) = g m (U ) ⊂ g m (Vg \ N (Rep(g))) ⊂ N (Att(g)). As we are assuming for the moment that the sets Per0 (f ) and Per0 (g) are disjoint, we also obtain that (5) g m f m (N (Att(f )) ∪ N (Att(g))) ⊂ N (Att(f )) ∪ N (Att(g)) Inclusions 3, 4 and 5 imply that, for  small enough and m sufficiently large, all the periodic points of w := g m f m in K \ N (Rep(f ) ∪ Rep(g)) ⊂ U ∪ V must be contained in N (Att(f )) ∪ N (Att(g)) and DISTORTION AND TITS ALTERNATIVE IN M∞ (S, K) 42 therefore the periodic points of w must be contained in N (Per0 (f )) ∪ N (Per0 (g)) as we wanted. To finish the proof of Proposition 5.8, we need to deal with the case where Per0 (f ) and Per0 (g) have points in common. This case is significantly trickier but the proof is similar to the one above. We include this case as an independent lemma: Lemma 5.9. Let f , g be elements of Vn such that Uf and Ug are disjoint. For every  > 0, we can find an element w ∈ Vn of the form w = g m1 f m2 such that all the periodic points of w ( i.e. Uw ∪Per0 (w )) are contained in N (Per0 (f ) ∪ Per0 (g)). Proof. We can suppose all the periodic points of f and g are fixed and, taking  > 0 small enough, we can suppose that for p ∈ Per0 (f ) ∪ Per0 (g), the sets N (p) are pairwise disjoint and entirely contained in the sets Uf , Vf , Ug , Vg if p intersects such a set. Let 0 :=  and take an integer n large enough such that g n (Vg \ N0 (Rep(g))) ⊂ N0 (Att(g)). Choose 0 < 1 < 0 small enough so that N1 (Att(g) ∩ Rep(f )) ⊂ g n (N0 (Att(g) ∩ Rep(f ))) and g n (N1 (Rep(g) ∩ Att(f ))) ⊂ N0 (Rep(g) ∩ Att(f )). Finally choose an integer m large enough so that f m (Vf \ N1 (Rep(f ))) ⊂ N1 (Att(f )). We can now define the sets Wg := Vg \ N0 (Rep(g) ∪ (Att(g) ∩ Rep(f ))) and A0 ,1 := N0 (Att(g) ∩ Rep(f )) \ N1 (Att(g) ∩ Rep(f )). We observe that by our choices of 0 , 1 and n, we have: (6) g n (Wg ) ⊂ N0 (Att(g) \ Rep(f )) ∪ A0 ,1 . We will show that the element w := g n f m has the desired properties. One should have in mind that m is chosen much bigger than n in order to guarantee that all the points in Att(f )∩Rep(g) are attractors for w . DISTORTION AND TITS ALTERNATIVE IN M∞ (S, K) 43 We define the set: X := N0 (Att(f )) ∪ N0 (Att(g) \ Rep(f )) ∪ A0 ,1 . First, we show that X is attracting most of K towards itself. More concretely, we show the following: Lemma 5.10. For the set X defined above, the following properties hold: (1) g n f m (X) ⊂ X (Invariance) (2) g n f m (K \ N0 (Rep(f ) ∪ Rep(g))) ⊂ X. (Contractivity) Proof. We start by proving item (1). X was defined as the union of the sets N0 (Att(f )), N0 (Att(g) \ Rep(f )) and A0 ,1 , we will show that when we apply g n f m to each of these sets, the resulting set is still contained in X. Let us start with N0 (Att(f )). We have: g n f m (N0 (Att(f ))) ⊂ g n (N1 (Att(f ))). To understand g n (N1 (Att(f ))), we consider each of the cases whether Att(f ) intersects the sets Per0 (g), Ug or none of them. Observe the following: • By our choice of 1 , we have: g n (N1 (Att(f ) ∩ Rep(g))) ⊂ N0 (Att(f ) ∩ Rep(g)) ⊂ X. • As g is attracting in N1 (Att(g)), we have: g n (N1 (Att(f ) ∩ Att(g))) ⊂ N1 (Att(f ) ∩ Att(g)) ⊂ X. • As g|Ug = Id, we have: g n (N1 (Att(f )) ∩ Ug ) = N1 (Att(f )) ∩ Ug ⊂ X • As Vg \ N (Per0 (g)) ⊂ Wg and by Inclusion 6 we know that g n (Wg ) ⊂ N0 (Att(g) \ Rep(f )) ∪ A0 ,1 ⊂ X, we have: g n (N1 (Att(f )) ∩ (Vg \ N (Per0 (g)))) ⊂ g n (Wg ) ⊂ X. As s consequence, we obtain that g n (N1 (Att(f ))) ⊂ X and therefore g n f m (N0 (Att(f ))) ⊂ X as we wanted. We now consider the set N0 (Att(g) \ Rep(f )). We distinguish two cases, whether N0 (Att(g)\Rep(f )) intersects Uf , or Vf . Let us consider the former case first. Observe that: (7) f m (N0 (Att(g) \ Rep(f )) ∩ Uf ) = N0 (Att(g) \ Rep(f )) ∩ Uf . We clearly have: (8) g n (N0 (Att(g) \ Rep(f ))) ⊂ N0 (Att(g) \ Rep(f )). DISTORTION AND TITS ALTERNATIVE IN M∞ (S, K) 44 From Inclusions 7 and 8 we obtain: (9) g n f m (N0 (Att(g) \ Rep(f )) ∩ Uf ) ⊂ X. Now we consider the set N0 (Att(g) \ Rep(f )) ∩ Vf . We have: g n f m (N0 (Att(g) \ Rep(f )) ∩ Vf ) ⊂ g n f m (Vf \ N0 (Rep(f ))). Observe that f m (Vf \ N0 (Rep(f ))) ⊂ N1 (Att(f )). We have already proved that g n (N1 (Att(f ))) ⊂ X and so together with Inclusion 9 we have g n f m (N0 (Att(g) \ Rep(f ))) ⊂ X as we wanted. It remains to show that g n f m (A0 ,1 ) ⊂ X. Observe that A0 ,1 ⊂ Vf \ N1 (Rep(f )) and also that f m (Vf \ N1 (Rep(f ))) ⊂ N1 (Att(f )). Using the fact that g n (N1 (Att(f ))) ⊂ X as we proved before, we obtain: g n f m (A0 ,1 ) ⊂ g n (N1 (Att(f ))) ⊂ X. We have shown so far that g n f m (X) ⊂ X. Along the way we also proved that g n f m (Vf \ N0 (Rep(f ))) ⊂ X. To conclude the proof of Lemma 5.10, we only need to show that g n f m (Uf \ N0 (Rep(g))) ⊂ X. As the set Uf is contained in the set Vg (because Uf and Ug are disjoint) and so the inclusion Uf \ N0 (Rep(g)) ⊂ Wg holds, we obtain: g n f m (Uf \ N0 (Rep(g))) = g n (Uf \ N0 (Rep(g))) ⊂ g n (Wg ) and by Inclusion 6 we have: g n (Wg ) ⊂ N0 (Att(g) \ Rep(f )) ∪ A0 ,1 ⊂ X and so we are done with the proof of Lemma 5.10.  Now, to finish the proof of Lemma 5.9 observe that as X ⊂ K \ N (Rep(f ) ∪ Rep(g)) and w (K \ N (Rep(f ) ∪ Rep(g))) ⊂ X, we have that all the periodic points of w contained in K \ N (Rep(f ) ∪ Rep(g)) are actually contained in X, which is a subset of N (Att(f ) ∪ Att(g)). Therefore the periodic points of w (namely the set Uw ∪ Per0 (w )) must be contained in N (Per0 (f ) ∪ Per0 (g)) as we wanted.   As a consequence of Proposition 5.8, for any group Γ ⊂ Vn , either there is a finite orbit, a free subgroup, or for every pair of elements f, g in Γ, we have Uf ∩ Ug 6= ∅. We will generalize Proposition 5.8 to an arbitrary number of group elements of Γ. For any finite set F ⊂ Γ, we define the set KF := ∩g∈F Ug . DISTORTION AND TITS ALTERNATIVE IN M∞ (S, K) 45 Proposition 5.11. Suppose the action of Γ ⊂ Vn on the Cantor set Kn does not have a finite orbit. Then, for every finite set F ⊂ Γ, there exists a finite set SF ⊂ K such that, for any  > 0, there exists an element h ∈ Γ with the following properties: (1) the set Uh ∪ Per0 (h ) (the set of periodic points of h ) is contained in KF ∪ N (SF ). (2) h fixes point-wise KF . Proof. The proof is by induction on the size of the set F . The proposition is clearly true if the set F contains only one element. Suppose the result is true for a set F and let F 0 = F ∪{g}. By induction hypothesis, we can find a finite set SF for F with the desired properties. Consider the set SF 0 := SF ∪ Per0 (g). Given  > 0 we can find h that fixes KF whose periodic points are contained in KF ∪ N/2 (SF ). By taking powers of h , we can suppose that h fixes point-wise the clopen set Uh . We can also suppose that Ug is fixed by g by replacing g with a power g k . Observe that both h and g fix the set K 0 := Uh ∩ Ug , and so we have two elements g and h preserving the clopen set C := K \K 0 . We now consider the actions of g and h on our new Cantor set C. Restricted to C, we have Uh ∩ Ug = ∅ and so we are in position to apply Proposition 5.9 (see Remark 5.2 below) to find an element h0 in the subgroup hh , gi ⊆ Γ such that all the periodic points of h0 in C are contained in the set N/2 (Per0 (h ) ∪ Per0 (g)). As Per0 (h ) ⊂ N/2 (SF ), we obtain that Per0 (h0 ) ⊂ N (SF 0 ) and that Uh0 is contained in (Uh ∩ Ug ) ∪ N (SF 0 ), which is a subset of KF 0 ∪ N (SF 0 ) and so we are done.  Remark 5.2. Even though Proposition 5.9 is stated for our original Cantor set Kn , it works equally well for actions on clopen sets C ⊂ Kn . By applying Lemma 5.7, we have the following corollary generalizing Proposition 5.8: Corollary 5.12. For every subgroup Γ ⊂ Vn one of the following holds: (1) The action of Γ on Kn has a finite orbit. (2) Γ contains a free subgroup on two generators. (3) The set KΓ := ∩g∈Γ Ug is non-empty. Proof. Suppose Γ does not have a finite orbit and KΓ = ∅. By the finite intersection property for compact sets, there is a finite set F ⊂ Γ such that KF = ∅. By Proposition 5.11, we can find a finite set SF ⊂ K such that, for every  > 0, there is an element h in Γ whose periodic points are contained in N (SF ). By Lemma 5.7, we can find an element DISTORTION AND TITS ALTERNATIVE IN M∞ (S, K) 46 t sending SF disjoint from itself and therefore also sending N (SF ) disjoint from itself for  small enough, which implies by Lemma 5.6 that there is a free group on two generators contained in Γ and we are done.  We will finish the proof of Theorem 5.1 by proving the following lemma. It is important to point out that it is the only place where we use the finite generation condition on Γ. Lemma 5.13. If Γ is a finitely generated subgroup of Vn and KΓ := ∩g∈Γ Ug 6= ∅, then the action of Γ on K has a finite orbit. Proof. Observe that KΓ is Γ-invariant and therefore there is a minimal closed set Λ ⊂ KΓ which is invariant under the action of Γ on K. If the minimal set Λ is a finite set, then Γ has a finite orbit and we are done. We will now show that if Λ were infinite, then there would exist an element g in Γ with an attracting fixed point in Λ, contradicting that Λ ⊂ KΓ ⊂ Ug . Let S be a finite generating set for Γ. We can take 0 > 0 such that for any g ∈ S and any elementary interval I of size less than 0 , the element g maps affinely I into the elementary interval g(I). We also take 1 < 0 , such that for any elementary interval I of size less than 1 and g ∈ S, we have that g(I) is an elementary interval of size less than 0 . Take x ∈ Λ. For every elementary interval In of length less than 1 containing x, we will show arguing by contradiction that there exists gn ∈ Γ such that 1 ≤ |gn (In )| ≤ 0 and such that gn |In is affine. Suppose that there is no such gn in Γ. In this case, proceeding by induction on the word length of g ∈ Γ, we can see that for every g ∈ Γ, g|In is an affine map and that |g(In )| < 1 . As the orbit Γ(x) is dense in Λ and as Λ is infinite, the point x is a non-trivial accumulation point of Γ(x). Hence, for every In containing x, there exists hn ∈ Γ such that hn (x) ∈ In and therefore the intersection hn (In ) ∩ In is non-trivial. Furthermore, we can suppose that hn (x) 6= x. Remember that for any pair of elementary intervals In , Im , either one is contained in the other one or they are disjoint. Therefore as the elementary intervals In and hn (In ) intersect, either hn (In ) = In or one interval is contained strictly in the other DISTORTION AND TITS ALTERNATIVE IN M∞ (S, K) 47 one. If In = hn (In ), then hn |In = Id because hn is affine, contradicting that hn (x) 6= x. We can then suppose that hn (In ) is contained strictly into In . As the map hn |In is affine, hn is a contraction inside In and therefore hn has exactly one contracting fixed point y ∈ In . This implies that y does not belong to Uhn , contradicting the fact that y = liml→∞ hln (x) ∈ Λ ⊂ KΓ . In conclusion, we found a contradiction for the non-existence of gn and so for every elementary interval In of size less than 1 containing x, there exists gn ∈ Γ such that gn (In ) is an elementary interval, gn |In is affine and 1 ≤ |gn (In )| ≤ 0 . As there is a finite number of elementary intervals satisfying 1 ≤ |I| ≤ 0 , there exist two intervals Im , Il , one contained strictly in the other (Let’s say Il ⊂ Im ) such that gm (Im ) = gl (Il ). This implies the element g := gl−1 gm is affine on Im and hence g|Im is a contraction, which implies that there is a unique contracting fixed point y for g in Im . Hence y 6∈ Ug , but y = limn→∞ g n (x) and therefore y also belongs to Λ. This contradicts the inclusion Λ ⊂ KΓ ⊂ Ug . Therefore, we obtain a contradiction to the fact that Λ is infinite.  References [1] Alibegovic, Emina. ”Translation lengths in Out(Fn)”. Dedicated to John Stallings on the occasion of his 65th birthday. Geom. Dedicata 92 (2002), 87?93. [2] Bleak, Collin, et al. ”Centralizers in R. Thompson’s group Vn ” arXiv preprint arXiv:1107.0672 (2011). [3] Bavard, Juliette. ”Hyperbolicite du graphe des rayons et quasi-morphismes sur un gros groupe modulaire” arXiv preprint arXiv:1409.6566 (2014). [4] Brin, Matthew G. ”Higher dimensional Thompson groups.” Geometriae Dedicata 108.1 (2004): 163-192. [5] Calegari Danny, Blogpost: https://lamington.wordpress.com/2014/10/24/mappingclass-groups-the-next-generation/ [6] Cannon, James W., William J. Floyd, and Walter R. Parry. ”Introductory notes on Richard Thompson’s groups.” Enseignement Mathématique 42 (1996): 215-256. [7] Cooper, Daryl. ”Automorphisms of free groups have finitely generated fixed point sets”. J. Algebra 111 (1987), no. 2, 453?456. [8] Horbez, Camille. ”A short proof of Handel and Mosher’s alternative for subgroups of textOut(FN ).” arXiv preprint arXiv:1404.4626 (2014). [9] Horbez, Camille. ”The Tits alternative for the automorphism group of a free product.” arXiv preprint arXiv:1408.0546 (2014). [10] Fisher, David. ”Groups acting on manifolds: around the Zimmer program.” arXiv preprint arXiv:0809.4849 (2008). [11] J. Franks, M. Handel, Distortion elements in group actions on surfaces, Duke Math. J. 131 (2006), no 3, 441-468. DISTORTION AND TITS ALTERNATIVE IN M∞ (S, K) 48 [12] J. Franks, M. Handel, Periodic points of Hamiltonian surface diffeomorphisms, Geom. Topol. 7 (2003), 713-756. [13] Funar, Louis, and Yurii Neretin. ”Diffeomorphisms groups of Cantor sets and Thompson-type groups.” arXiv preprint arXiv:1411.4855 (2014). [14] Farb, Benson, Alexander Lubotzky, and Yair Minsky. ”Rank-1 phenomena for mapping class groups.” Duke Mathematical Journal 106.3 (2001): 581597. [15] A. Fathi, F. Laudenbach, V. Poenaru, Travaux de Thurston sur les surfaces, Astrisque vol. 66, SMF, Paris, France. [16] Ghys, Etienne. ”Groups acting on the circle.” Enseignement Mathematique 47.3/4 (2001): 329-408. [17] M. Gromov Asymptotic invariants of infinite groups. Geometric group theory. Volume 2 Cambridge Univ. Press, Cambridge(1993), 1-295 [18] de La Harpe, Pierre. Topics in geometric group theory. University of Chicago Press, 2000. [19] M. W. Hirsch, Differential Topology, Graduate texts in Mathematics, Springer. [20] Hmili, Hadda; Liousse, Isabelle Dynamique des changes d’intervalles des groupes de Higman-Thompson Vr,m. Ann. Inst. Fourier (Grenoble) 64 (2014), no. 4, 1477-1491 [21] McCarthy, John. A ”Tits-alternative” for subgroups of surface mapping class groups. Trans. Amer. Math. Soc. 291 (1985), no. 2, 583-612. [22] Margulis, Gregory. ”Free subgroups of the homeomorphism group of the circle.” Comptes Rendus de l’Acadmie des Sciences-Series I-Mathematics 331.9 (2000): 669-674. [23] Navas, Andres. Groups of circle diffeomorphisms. University of Chicago Press, 2011. [24] Salazar-Diaz, Olga Patricia. ”Thompsons group V from a dynamical viewpoint.” International Journal of Algebra and Computation 20.01 (2010): 39-70. APA [25] Robert J. Zimmer, Ergodic theory and semisimple groups
4math.GR
arXiv:1804.00748v1 [math.GR] 2 Apr 2018 ON THE JOINT SPECTRAL RADIUS FOR ISOMETRIES OF NON-POSITIVELY CURVED SPACES AND UNIFORM GROWTH EMMANUEL BREUILLARD AND KOJI FUJIWARA Abstract. We recast the notion of joint spectral radius in the setting of groups acting by isometries on non-positively curved spaces and give geometric versions of results of Berger-Wang and Bochi valid for δ-hyperbolic spaces and for symmetric spaces of non-compact type. This method produces nice hyperbolic elements in many classical geometric settings. Applications to uniform growth are given, in particular a new proof and a generalization of a theorem of Besson-Courtois-Gallot. 1. Introduction This paper is concerned with the following general problem. Given a group G generated by a finite set S. Suppose that G contains elements with a certain property P. Can we estimate the shortest length of an element g ∈ G which has the property P ? Here the length of an element g ∈ G is the smallest length of a word with letters in S and S −1 , which represents g. For example the property P could be “being of infinite order”, or “having an eigenvalue of modulus different from 1”, say when G is a matrix group. Or else when G is a subgroup of isometries of a non-positively curved space P could be : “having positive translation length”. This type of question is ubiquitous in problems dealing with uniform exponential growth. In this paper we give a method to find nice short words in a variety of situations when the group acts on a space with non-positive curvature. As an application we will give several uniform exponential growth results, in particular for groups acting on products of δ-hyperbolic spaces. In [23] we will consider applications to the growth of mapping class groups. This method consists in studying the growth of the joint minimal displacement of the generating set S. To fix ideas say (X, d) is a metric space and S ⊂ Isom(X) is a finite set of isometries of X. Let G := hSi be the group generated by S and x ∈ X is a point. We define the joint displacement at x by L(S, x) := max d(x, sx) s∈S and the joint minimal displacement of S by L(S) := inf L(S, x). x∈X This quantity appears in many places in geometric group theory, for example in the construction of harmonic maps as in the work of Gromov-Schoen [46] and Korevaar-Schoen [55], or in Kleiner’s proof of Gromov’s polynomial growth theorem [54], and, when X is a Hilbert space, in relation to reduced first cohomology and Date: April 4, 2018. 1 2 EMMANUEL BREUILLARD AND KOJI FUJIWARA Hilbert compression as in [34] ; it is ubiquitous in the study of free group automorphisms and it is key to constructing limits of representations, e.g. see [8], and or in recent work about surface group representations in higher rank Lie groups, e.g. [27]. In fact a more common quantity is the `2 version of L(S), sometimes called theP energy of S and defined as the infimum of the averaged squared displacement 1 2 s∈S d(sx, x) . In this paper however we will exclusively consider L(S), which |S| ∞ is the ` version of the energy. One advantage of working with L(S) is that it behaves well under set theoretic powers S n of S (while the energy is more suitable to random walks as expounded for example in Gromov’s paper [45]). It is natural to also consider the asymptotic joint displacement `(S) := lim L(S n )/n. n→+∞ It is not hard to show (see Section 2 below) that this limit exists and coincides with the limit of L(S n , x)/n for any point x. When S = {g} is a singleton, L(g) is called the translation length of g and we call `(g) the asymptotic translation length. We may also consider the maximal translation length λ(S) := max `(s) s∈S and the corresponding notion for products 1 λ(S j ), 1≤j≤k j 1 λ∞ (S) := sup λ(S j ) j∈N j and compare these quantites to those defined above. The choice of normalization in the definition of λk (S) is made so as to guarantee the following straightforward inequalities (see Section 2). λk (S) := max Lemma 1.1 (general nonsense lemma). If (X, d) is any metric space and S ⊂ Isom(X) a finite set of isometries, then for all k ∈ N 1 λ(S) ≤ λk (S) ≤ λ∞ (S) ≤ `(S) ≤ L(S k ) ≤ L(S). k Moreover `(S k ) = k`(S) and λ∞ (S k ) = kλ∞ (S). Finally 1 λ∞ (S) = lim sup λ(S n ). n n→+∞ We will be interested in the following questions: To what extent are these inequalities sharp ? What is the growth of L(S n ) as n grows ? For which spaces do we always have λ∞ (S) = `(S) ? These quantities are interesting when X is an unbounded metric space, especially in presence of some form of non-positive curvature, for example a CAT (0)-space or a δ-hyperbolic space. When X = SLd (R)/ SOd (R) and the metric d is given by (1) d(g, h) := log ||g −1 h||, where the norm is the operator norm associated to a Euclidean scalar product on Rd , then any S ⊂ SLd (R) acts by isometries on X and the quantity `(S) is the (log of the) well-known joint spectral radius of the set of matrices S. This JOINT SPECTRAL RADIUS AND UNIFORM GROWTH 3 quantity has been first studied by Rota and Strang in 1960 [69] and further by Daubechies-Lagarias [35] in the context of wavelets and iterated function systems and by Berger-Wang [12]. The main result of Berger-Wang [12, Thm. IV] says that (2) λ∞ (S) = `(S). This means that the rate of growth of kS n k is identical to that of the maximal eigenvalue of an element in S n , where kS n k := maxn kgk, g∈S and a posteriori justifies the terminology “joint spectral radius” for exp(`(S)) in that it generalizes the classical Gelfand formula expressing the modulus of the maximal eigenvalue as the rate of exponential growth of the norm of powers of a single matrix. In the literature on the joint spectral radius authors usually consider arbitrary finite sets of matrices S ⊂ Md (R) which are not necessarily invertible. In this paper however, because of our geometric point of view, we will focus on the invertible case. 1.1. Geometric Berger-Wang identity and geometric Bochi inequality. One of the leitmotivs of this paper will be extend the Berger-Wang identity (2) and its refinements to geometric actions on non-positively curved spaces X. We will mainly focus on fairly classical spaces such as Euclidean spaces, Hilbert spaces, or non-positively curved spaces such as symmetric spaces of non-compact type. We will also obtain satisfactory results for arbitrary δ-hyperbolic spaces and will mention some properties valid in arbitrary CAT (0)-spaces. We hope that our work may provide motivation to study the joint minimal displacement and Berger-Wang type identities in other geometries of interest, such as the Teichmuller space or the Outer space. We begin with: Theorem 1.2 (geometric Berger-Wang identity). The Berger-Wang identity (2) holds for every finite set S of isometries of X, when X is either a symmetric space of non-compact type, a tree, or an arbitrary δ-hyperbolic space. By contrast, we will show in Section 9 that the Berger-Wang identity fails for isometries of a Euclidean space. In the case of symmetric spaces, this result is closely related to the original Berger-Wang identity for matrices. However in higher rank it does not follow directly (nor does it imply it) as we stress in the following remark. In the case of δ-hyperbolic spaces Theorem 1.2 was recently obtained by Oregon-Reyes [63], whose paper addresses for the first time the question of extending the classical results on the joint spectral radius to other geometric contexts. Remark 1.3. Note that, as usual, symmetric spaces are considered with their defining CAT (0) metric induced by a left-invariant Riemannian metric associated to the Killing form of the group. The quantities studied in this paper such as L(S) and λ(S) are sensitive to the choice of metric. For example the classical Berger-Wang identity (2) for matrices does not follow from the geometric Berger-Wang identity proved in the above theorem, nor does it imply it, say for X = SLd (R)/ SOd (R). Recall that the distance (1) on X = SLd (R)/ SOd (R) is not the usual CAT (0) Riemannian symmetric space metric, but rather a Finsler-type norm-like distance (as in [1] and [67]). 4 EMMANUEL BREUILLARD AND KOJI FUJIWARA In [13] Bochi gave a different proof of (2), which yields a stronger inequality of the form (3) λk0 (S) ≥ L(S) − C, where k0 and C are constants depending only on the dimension. The Berger-Wang identity follows immediately by applying the Bochi inequality to S n and letting n go to infinity. Note that a different proof of Bochi’s inequality was given in [17, Cor 4.6] and extended in [18] to non-archimedean local fields. In this paper we will prove geometric analogues of the Bochi inequality (3) in the geometric settings mentioned in the above theorem. For example: Theorem 1.4 (geometric Bochi-type inequality for hyperbolic spaces). There is an absolute constant K > 0 such that the following holds. If (X, d) is a geodesic δ-hyperbolic space, then λ2 (S) ≥ L(S) − Kδ for every finite set S ⊂ Isom(X). Consequently `(S) ≥ L(S)−Kδ, which answers a question raised in [63, Question 6.1]. For isometries of trees (case when δ = 0) we have λ2 (S) = `(S) = L(S). In follows in particular that λ2 (S) = 0 implies L(S) = 0, which is the content of a well-known lemma of Serre about tree isometries ([71, I. Prop. 26]). The proof for δ-hyperbolic spaces is a quasification of the corresponding proof for isometries of trees. It involves in particular a Helly-type theorem for hyperbolic spaces, which we prove in Section 6. See [39] and [28] for a related use of Helly-type theorems in geometric group theory. As already mentioned Theorem 1.2 for δ-hyperbolic spaces follows from Theorem 1.4. We now record one more consequence of Theorem 1.4 (see Proposition 13.8 for the proof), which is well-known and due to Gromov [47, 8.1] (see also [63, Thm 1.10]). Corollary 1.5. Let X be a geodesic δ-hyperbolic space and S ⊂ Isom(X) a finite set. Assume that `(S) = 0. Then hSi either has a bounded orbit on X, or fixes a unique point in ∂X. A similar but slightly weaker statement when X is a symmetric space is proven in Section 7, based on the Bochi inequality applied to various linear embeddings of X (see Theorem 7.5 and Proposition 7.7). In particular: Proposition 1.6. Let X be a symmetric space of non-compact type and S ⊂ Isom(X) be a finite subset. Then : 1 λk0 (S) ≥ √ L(S) − C, d where d ∈ N is such that X is a convex subspace of SLd (C)/ SUd (C), k0 ≤ d2 , and C > 0 is a constant depending on d only. We suspect but were unable to prove that the multiplicative constant √1d in the above result can be taken to be 1. See Theorem 7.5 and Question 4 in Section 14. On the other hand we will prove in Section 10 that the constant C cannot be taken to be zero. In fact for each n one may find an S with `(S) > 0 but λn (S) = 0 (see Lemma 1.12). JOINT SPECTRAL RADIUS AND UNIFORM GROWTH 5 1.2. Growth of joint minimal displacement. A consequence of the geometric Berger-Wang identity is that in order to guarantee the existence of a single element g with positive translation length in the group generated by S, it is enough to show that `(S) > 0. Accordingly this suggests that in order to find a nice hyperbolic element in a power of S, it is important to study the growth rate of L(S n ). In a CAT(0) space a simple geometric argument, similar to one used by V. Lafforgue in [58, Lemma 2] for Hilbert spaces, shows the following: Lemma 1.7. If X is a CAT(0) metric space and S a finite set of isometries, then √ n n L(S). L(S ) ≥ 2 The square root n growth behavior is sharp as examples of Cornulier, Tessera and Valette [34] show (see Remark 3.8). Of course if `(S) > 0 then L(S n ) grows linearly, but the above sublinear growth is useful in order for L(S n ) to go above a certain threshold after which the linear growth can start. For example if X is δ-hyperbolic, we will show that L(S n ) ≥ n(L(S) − Kδ) for some absolute constant K, so that we get linear growth provided L(S) > Kδ. While if X is a symmetric space of non-compact type a consequence of our analysis is: Proposition 1.8. There is c = c(X) > 0 such that if S is a finite set of isometries of a symmetric space X of non-compact type c · min{L(S), L(S)2 } ≤ `(S) ≤ L(S). Observe that a consequence of the left hand-side and of Theorem 1.2 is the wellknown fact that if a finitely generated group of isometries of X is entirely made of elliptic elements then it fixes a point on X or on its visual boundary (see 3.13). When X is a symmetric space of non-compact type, the Margulis lemma asserts the existence of a constant  = (X) > 0 depending only on dim X such that the following holds : every finite set S of isometries of X, which generates a discrete subgroup of Isom(X), and has L(S) <  must generate a virtually nilpotent subgroup. Combining this with the previous proposition, one obtains: Corollary 1.9. There are constants c0 , c1 > 0 depending only on X, such that if S is a finite set of isometries of a symmetric space X of non-compact type generating a non virtually nilpotent discrete subgroup of Isom(X), then c1 ≤ `(S) ≤ L(S) ≤ c0 · `(S). In [27, Cor 1.3] Burger and Pozzetti show that in the case of maximal representations of a surface group in the Siegel upper-half space, the above inequalities hold already with λ(S) in place of `(S) and with an explicit value of c1 . 1.3. Euclidean spaces. When X is a finite dimensional Euclidean space, it is still true that L(S) = 0 if and only if `(S) = 0, namely: Proposition 1.10. If S is a finite set of isometries of Euclidean Rd , then the following are equivalent: (1) S has a common fixed point, (2) L(S) = 0, (3) `(S) = 0. 6 EMMANUEL BREUILLARD AND KOJI FUJIWARA While it is clear that L(S) = 0 implies `(S) = 0, the converse is slightly more subtle, because it can happen that S has no global fixed point, and yet every single element in the group generated by S has a fixed point (see Example 9.1). In particular one can have `(S) > 0 while λ∞ (S) = 0. This means that the BergerWang identity (2) fails for isometries of Euclidean spaces. See Section 3.3. By contrast, when X is an infinite dimensional Hilbert space one can have `(S) = 0 while L(S) > 0. A sublinear cocycle need not be trivial in the reduced first cohomology [34, 3.9], see Section 3.2. 1.4. Large torsion balls and escape from elliptics. Schur proved in 1907 [70] that a subgroup of GLn (C) all of whose elements are of finite order must be finite. In [18] the first author proved a uniform version of Schur’s theorem: Theorem 1.11 (uniform Schur theorem [18]). There is N = N (d) ∈ N such that for every finite symmetric subset S ⊂ GLd (C) containing 1 and generating an infinite group, there is an element g ∈ S N of infinite order. Examples of Grigorchuk and de la Harpe [44] and of Bartholdi and Cornulier [11] show that N (d) must grow to infinity with d. In Section 10 we will show that, by contrast with the case of torsion elements, one cannot escape elliptic elements in general: Lemma 1.12 (no uniform escape from elliptics). In the real Lie group SO(4, 1), for each N ∈ N one can find a pair S = {a, b} such that for all words w of length at most N in a±1 , b±1 the cyclic subgroup hwi is bounded, but the subgroup hSi is unbounded and even Zariski dense (in particular it does not fix a point on hyperbolic 4-space H4 nor on the boundary ∂H4 ). The proof is based on the Tits alternative and the Borel-Larsen theorem [15] on the dominance of word maps on semisimple algebraic groups. On the other hand the geometric Bochi-type inequalities proved in this paper give a tool to produce quickly (i.e. in S n for n small) a non-elliptic element. The time needed to produce this element however depends on L(S). For example Theorem 5.6 in Section 5 shows that, when X is a δ-hyperbolic space, there is g ∈ S ∪ S 2 with `(g) > 0 (and in particular of infinite order) provided L(S) > Kδ. However L(S n ) may well remain under Kδ for large n, even though `(S) > 0. For example quotients of infinite Burnside groups provide examples of δ-hyperbolic groups with large torsion balls in their Cayley graph ([62, 11]). Lemma 1.12 also shows that even though the geometric Berger-Wang identity λ∞ (S) = `(S) holds in symmetric spaces by Theorem 1.2, the additive constant √ C in the Bochi-type inequality λk (S) ≥ `(S)/ d − C, which is a consequence of Proposition 1.6, cannot be zero. 1.5. Uniform exponential growth (UEG). If S is a finite generating subset in a group Γ, we define 1 h(S) = lim log |S n |, n→+∞ n and call h(S) the entropy of Γ for S. The original motivation for the present paper was a theorem of Besson-CourtoisGallot [6]. They showed that given a > 0 and n ∈ N, there is a constant c(n, a) > 0 such that if M is a complete Riemannian manifold of dimension n with pinched JOINT SPECTRAL RADIUS AND UNIFORM GROWTH 7 sectional curvature κM ∈ [−a2 , −1] and Γ is a discrete group of isometries of M generated by a finite set S, then 1 h(S) = lim log |S n | > c(n, a) > 0, n→+∞ n provided Γ is not virtually nilpotent. We will generalize this result and give a new proof of it, seeing it as a fairly direct consequence of the Bochi-type inequality of Theorem 1.4. Our approach provides the additional information that generators of a free semigroup can be found in a bounded ball – a feature the Besson-Courtois-Gallot proof did not yield. The proof will be given in Section 13, but let us briefly explain here how this works. Due to its negative curvature, the manifold M is a δ-hyperbolic metric space for some δ > 0 which is independent of n and a. Once a hyperbolic element in S or a bounded power S n has been found, a simple ping-pong argument gives generators of a free semi-group (cf. Section 11 below). Thanks to the geometric Bochi inequality for hyperbolic spaces, i.e. Theorem 1.4, in order to find a hyperbolic element, we only need to check that L(S) > Kδ or at least that L(S n ) > Kδ for some controlled n (cf. Theorem 13.1). The manifold is also CAT (0), so Lemma 1.7 applies, and we see that we only need to rule out the possibility that L(S) is very small. But if we assume that the group Γ is discrete, the Margulis lemma tells us that there is a constant  = (n, a) > 0 such that if L(S) <  and hSi is discrete, then hSi is virtually nilpotent. This ends the proof. Using instead the generalized Margulis lemma proved by Green, Tao and the first author in [21] this argument yields the following generalization of the BessonCourtois-Gallot theorem. Theorem 1.13 (UEG for hyperbolic spaces with bounded geometry). Given P ∈ N, there is a constant N (P ) ∈ N such that the following holds. Assume that X is a geodesic δ-hyperbolic space with the property that every ball of radius 2δ can be covered by at most P balls of radius δ. Let S be a finite symmetric set of isometries generating a group Γ and containing 1. Then either Γ is virtually nilpotent, or S N contains two generators of a free semigroup and in particular: 1 log 2. h(S) > N We stress that the constant N depends only on P and not on δ. 1.6. Hyperbolic groups. It is known that a non-elementary hyperbolic group has uniform exponential growth and even uniform uniform exponential growth, that is subgroups have uniform exponential growth. See [36, 57, 29]. Uniform exponential growth follows immediately from our general result on actions on hyperbolic spaces (see Theorem 13.1). The point is that when X is the Cayley graph of a hyperbolic group, then it is straightforward that L(S n ) ≥ n if S generates the group so the Margulis lemma used above in Theorem 1.13 is irrelevant. Theorem 1.14 (Growth of hyperbolic groups). There is an absolute constant C1 > 0 such that if G is a group with finite generating set S whose Cayley graph Cay(G, S) is δ-hyperbolic, then either G is finite or virtually cyclic, or S M contains two hyperbolic elements that are generators of a free semi-group, where M is the least integer larger than C1 δ. In particular, h(S) ≥ (log 2)/M . 8 EMMANUEL BREUILLARD AND KOJI FUJIWARA We stress that M depends only on δ. This special feature was not explicit for example in [57]. Stated as such the theorem is sharp inasmuch as M must depend on δ (it tends to infinity as δ goes to infinity) : indeed Olshanski [62] gave for sufficiently large primes p and radii R examples of non-elementary 2-generated Gromov hyperbolic groups (with large δ = δ(R, p)) whose ball of radius R is made of p-torsion elements (and hence there is no element of infinite order in a ball of small radius). The same conclusion about h(S) has recently been obtained independently by Besson, Courtois, Gallot and Sambusetti in their recent preprint [7] without exhibiting a free semi-group, but with the following explicit lower bound h(S) ≥ log 2/(26δ + 16). Note that by contrast sharpness of such a lower bound is not known as it is still an open problem whether or not there is an absolute constant c > 0 such that h(S) > c for every generating set S of an arbitrary hyperbolic group (independently of δ). Uniform uniform exponential growth also immediately follows from Theorem 13.1. In this case, S may not generate the whole group, and the constant M must depend not only on δ, but also on the size of S. See Corollary 13.4 and Remarks 13.6 and 13.7. 1.7. Uniform Tits alternative for groups acting on trees. In [17] Gelander and the first author proved a uniform Tits alternative for linear groups. Namely given a non virtually solvable finitely generated group Γ contained in GLn (k) for some field k, there is an integer N = N (Γ) such that for every symmetric generating set S of Γ the ball S N contains a pair of free generators of a free subgroup. The number N was later shown in [18, 19] to be a constant depending only on the dimension n and in particular independent of the group Γ. A natural question arises as to whether or not a similar phenomenon occurs for subgroups of Isom(X), where X is a tree. We will give the following counter-example: Proposition 1.15. Given N ∈ N there are two isometries a, b of a trivalent tree without common fixed point on the tree nor on its boundary, such that for every two words w1 , w2 of length at most N in a, b and their inverses, the subgroup hw1 , w2 i is not free non-abelian. In other words the uniform uniform Tits alternative does not hold for nonelementary subgroups of isometries of a tree. Note that the assumptions imply that ha, bi contains a non-abelian free subgroup. This is to be contrasted with the fact (see Proposition 12.1) that under the same assumptions there always is a pair of words of length at most 3, which generates a free semi-group. On the other hand it is not clear whether or not the uniform Tits alternative holds for a fixed subgroup Γ, (see Question 2. in Section 14). Acknowledgment. We are grateful to Martin Bays, Mohammad Bardestani, Marc Burger, Yves de Cornulier, Gilles Courtois, Thomas Delzant, Nicolas Monod, Andrea Sambusetti and Cagri Sert for useful conversations and references. The first author acknowledges support from ERC grant no. 617129 GeTeMo. The second author is supported by Grant-in-Aid for Scientific Research (15H05739). The project was started in Hawaı̈ in 2008 and completed in Cambridge in 2017. The authors would also like to thank the Isaac Newton Institute for Mathematical Sciences, Cambridge, for support (through EPSRC grant no EP/K032208/1) and hospitality JOINT SPECTRAL RADIUS AND UNIFORM GROWTH 9 during the programme on Non-Positive Curvature, where work on this paper was undertaken. Contents 1. Introduction 2. The joint minimal displacement 3. General CAT(0) spaces 4. Quantitative Serre’s lemma for groups acting on trees 5. The joint minimal displacement in hyperbolic spaces 6. Helly type theorem for hyperbolic spaces 7. Symmetric spaces of non-compact type 8. Almost elliptics in P SL2 (R) with large displacement 9. Euclidean spaces and linear escape of cocycles 10. Escaping elliptic isometries of symmetric spaces 11. Producing free semi-groups by Ping-Pong 12. Uniform Tits alternative for groups acting on trees 13. Application to uniform exponential growth 14. Questions References 1 9 11 17 18 25 26 32 34 37 40 44 45 52 52 2. The joint minimal displacement In this section we recall the geometric quantities introduced in the introduction and prove the general inequalities they satisfy, i.e. Lemma 1.1. In this section (X, d) is an arbitrary metric space. Let S be a finite set of isometries and x a point in X. Recall that we have defined L(S, x), L(S), `(S) and λk (S) for k ∈ N≥1 ∪ ∞ at the beginning of the introduction. 2.1. Proof of Lemma 1.1. First we make the following simple observation: Claim 1: If U, V are finite subsets of isometries of X and x ∈ X, then: L(U V, x) ≤ L(V, x) + L(U, x) (4) Indeed by the triangle inequality: L(U V, x) = max L(uv, x) ≤ u∈U,v∈V max L(uv, ux) + L(u, x) = u∈U,v∈V max L(v, x) + L(u, x) u∈U,v∈V ≤ L(V, x) + L(U, x). From this we get that n 7→ L(S n , x) is subadditive, and therefore by the subadditive lemma: Claim 2: the following limit exists and is independent of x 1 1 (5) `(S) := lim L(S n , x) = inf L(S n , x). n n n≥1 n We take the above as a definition for `(S). To see that this limit does not depend on the point x simply note that for every finite set S and every pair of points x, y L(S, x) = max d(sx, x) ≤ max{d(sx, sy + d(sy, y) + d(y, x)} ≤ 2d(x, y) + L(S, y) s∈S s∈S 10 EMMANUEL BREUILLARD AND KOJI FUJIWARA and hence exchanging the roles of x and y |L(S, x) − L(S, y)| ≤ 2d(x, y). (6) Claim 3: For every n ∈ N we have 1 (7) L(S n ) ≤ L(S) n Indeed applying (4) iteratively we have L(S n , x) ≤ nL(S, x) for all x. Claim 4: The sequence L(S n )/n converges to `(S) and 1 1 (8) `(S) = lim L(S n ) = inf L(S n ) n≥1 n n n n Indeed, since L(S , x) ≥ L(S ) we get immediately from (5) that `(S) ≥ lim sup n1 L(S n ). On the other hand `(S) ≤ n1 L(S n , x) for all x and all n. Minimizing in x we get `(S) ≤ n1 L(S n ) and hence `(S) ≤ inf n≥1 n1 L(S n ) ≤ lim inf n1 L(S n ). We conclude immediately that: Claim 5: `(S n ) = n`(S) for every n ∈ N. We now turn to λ(S) and λk (S), which we have defined in the introduction as: λ(S) := max `(s) s∈S and 1 λ(S j ). j We can now complete the proof of Lemma 1.1. λk (S) := max 1≤j≤k Claim 6: λ(S) ≤ `(S). Indeed (5) implies that `(s) ≤ `(S) for every s ∈ S. It follows that λ(S) ≤ `(S) and thus that λk (S) ≤ `(S) for every k ∈ N. Finally we have: Claim 7: For every k, n ∈ N we have 1 (9) λn (S) ≤ λn (S k ) ≤ λkn (S). k To see this note that `(sk ) = k`(s) for every isometry s and every k ∈ N. In particular λ(S k ) ≥ kλ(S). From this the left hand side of Claim 7 follows easily, while the right hand side is formal. Now, given j ∈ N and applying the left hand side of (9) to S j in place of S, with n = 1 and letting k tend to infinity we see that: 1 1 λ(S j ) ≤ lim sup λ(S k ) j k→+∞ k and hence 1 1 λ∞ (S) = max λ(S j ) = lim sup λ(S k ). j≥1 j k k→+∞ JOINT SPECTRAL RADIUS AND UNIFORM GROWTH 11 To complete the proof of Lemma 1.1 it only remains to verify that λ∞ (S k ) = kλ∞ (S) for every k ∈ N. This is clear by letting n tend to infinity in Claim 7. 2.2. Joint displacement and circumradius. We define the minimal circumradius r(S) of S to be the lower bound of all positive r > 0 such that there exists some x ∈ X and a ball of radius r which contains Sx = {sx; s ∈ S}. This quantity is closely related to L(S) as the following lemma shows: Lemma 2.1. Suppose S ⊂ Isom(X) is a finite set. Then r(S) ≤ L(S) ≤ 2r(S). Moreover r(gSg −1 ) = r(S) for every g ∈ Isom(X). Proof. If r > r(S), there exists x ∈ X such that Sx is contained in a ball of radius r. In particular, d(sx, x) ≤ 2r for every s ∈ S. This means that L(S) ≤ L(S, x) ≤ 2r. Hence L(S) ≤ 2r(S). Conversely, if x is such that L(S) ≥ L(S, x) − , then d(sx, x) ≤ L(S) +  for all s ∈ S, and in particular Sx belongs to the ball of radius L(S) +  centered at x. Hence r(S) ≤ L(S) + . Since  > 0 is arbitrary, we get r(S) ≤ L(S). That r(gSg −1 ) = r(S) for every g ∈ Isom(X) follows immediately from the definition of r(S).  3. General CAT(0) spaces The goal of this section is to recall some definitions and basic properties of groups acting by isometries on CAT(0) spaces and describe some basic examples, such as Euclidean and Hilbert spaces, where the Berger-Wang (2) identity fails. We also relate the vanishing of L(S) to the presence of fixed points. We first recall the notion of CAT(0) space. A good reference book is [24]. For a geodesic segment σ, we denote by |σ| its length. If ∆ = (σ1 , σ2 , σ3 ) is a triangle in a metric space X with σi a geodesic segment, a triangle ∆ = (σ 1 , σ 2 , σ 3 ) in Euclidean R2 is called a comparison triangle if |σi | = |σ i | for i = 1, 2, 3. A comparison triangle exists if the side-lenghts satisfy the triangle inequality. We say that a triangle ∆ is CAT(0) if d(x, y) ≤ d(x̄, ȳ) for all points x, y on the edges of ∆ and the corresponding points x̄, ȳ on the edges of the comparison triangle ∆ in R2 . A geodesic space is a CAT(0) space if all triangles are CAT(0). Complete CAT(0) spaces are often called Hadamard spaces. A geodesic metric space is CAT(0) if and only if every geodesic trangle with vertices a, b, c satisfies the following inequality: (10) 1 2d(a, m)2 ≤ d(a, b)2 + d(a, c)2 − d(b, c)2 . 2 If X is a simply connected, Riemannian manifold whose sectional curvature is non-positive, then it is a CAT(0) space. In particular symmetric spaces of noncompact type are CAT(0) spaces. So are Euclidean and Hilbert spaces. 12 EMMANUEL BREUILLARD AND KOJI FUJIWARA 3.1. Minimal displacement of a single isometry. This section is devoted to the proof of Proposition 3.1 below. This fact is likely to be well-known to experts, but in lack of reference, we decided to include a proof. Recal that an isometry g is said to be semisimple if the infimum is attained in the definition of L(g) := inf d(gx, x). x∈X When X is a CAT (0) metric space, isometries are classified into three classes (see [24]): g is said to be • elliptic, if g is semisimple and L(g) = 0 ( ⇐⇒ fixes a point in X), • hyperbolic, if g is semisimple and L(g) > 0, • parabolic otherwise. It is known that g is elliptic (hyperbolic, parabolic) if and only if g n is elliptic (hyperbolic, parabolic, resp.) for some n 6= 0, [24, II.6.7, II.6.8]. For CAT (0) spaces, it turns out that the minimal displacement coincides with the rate of linear growth of an arbitrary orbit, namely: Proposition 3.1. Let X be a CAT(0) metric space, and g be an isometry. Then we have: L(g) = `(g). In particular L(g n ) = nL(g) for each n > 0 and for any point x ∈ X, we have L(g) = lim n→∞ 1 d(g n x, x). n Proof. It is enough to prove that L(g 2 ) = 2L(g), n because iterating we will find that `(g) = lim L(g 2 )/2n = L(g). Since L(g 2 ) ≤ 2L(g) always (see Lemma 1.1) we only need to verify that L(g) ≤ L(g 2 )/2. For this we have the following simple argument, which we learned from Nicolas Monod. Given x ∈ X consider the geodesic triangle x, gx, g 2 x. The mid-point y between x and gx is mapped under g to the mid-point gy between gx and g 2 x. Using a Euclidean comparison triangle, we see from the CAT(0) assumption that 1 d(x, g 2 x). 2 In particular L(g) ≤ 21 L(g 2 , x) and minimizing in x we obtain what we wanted. d(y, gy) ≤  3.2. Hilbert spaces and affine isometric actions. Affine isometric actions on Hilbert spaces have been studied by many authors, in particular in connection to Kazhdan’s property (T ) and the Haagerup property. We refer the reader to the work Cornulier-Tessera-Valette [34] for background ; see also the work KorevaarSchoen [55] and [54] for two interesting geometric applications. When X is a Hilbert space, one can easily relate the vanishing of the quantities `(S) and L(S) to the cohomological properties of the affine isometric action associated to the finitely generated group Γ := hSi. Let us describe briefly here this connection. The linear part of the Γ action by isometries on X is a unitary representation π of Γ on X. The translation part is a cocycle, i.e. a map b : Γ → X such that b(gh) = π(g)b(h) + b(g) for all g, h ∈ Γ ; we denote the linear space of cocycles from Γ to X by Z. A cocycle is a called a co-boundary if there is x ∈ X JOINT SPECTRAL RADIUS AND UNIFORM GROWTH 13 such that b(g) = π(g)x − x. The closure B of the space of B co-boundaries gives 1 rise to the reduced first cohomology group of the action H (π, X) = Z/B. It is also natural to study the growth of cocycles. In [34] a cocycle b : Γ → X is called sublinear if ||b(g)|| = o(|g|S ), when the word length |g|S with respect to the generating set S goes to infinity. It is straightforward to check that b is sublinear when b ∈ B [34, Cor. 3.3]. The relationship with our quantities `(S) and L(S) is a follows: 1 (1) L(S) = 0 if and only if b vanishes in H , i.e. b ∈ B, (2) `(S) = 0 if and only if b is sublinear. We note that there are classes of discrete groups (e.g. polycyclic groups as shown in [34, Thm 1.1]) for which `(S) = 0 if and only if L(S) = 0. While there are others [34, Prop. 3.9], where we may have L(S) > 0 and `(S) = 0. We will show below (in Proposition 9.3) that the latter examples can only happen in infinite dimension. 3.3. Euclidean spaces. In this subsection we briefly describe the case when X = Rd is a Euclidean space. Proofs will be given in Section 9. Proposition 3.2. A subgroup G of Isom(Rd ) with d = 2, 3 all of whose elements have a fixed point must have a global fixed point. In particular λ∞ (S) = 0 implies L(S) = `(S) = 0. This is no longer true in dimension 4 and higher. Indeed we have: Proposition 3.3. When d ≥ 4, one can find a finite set S in Isom(Rd ) such that `(S) > 0 but λ∞ (S) = 0. The example is given by a subgroup of Isom(R4 ) generated by two rotations within distinct centers and whose rotation parts generate a free subgroup of SO(4, R) whose non trivial elements never have 1 as an eigenvalue. See Example 9.1. Consequently: Corollary 3.4. The Berger-Wang identity (2) fails on Euclidean spaces of dimension d ≥ 4. However we will show that if a finite set of isometries does not admit a global fixed point, then it always has a positive rate of escape. Namely: Proposition 3.5. If S is a finite set in Isom(Rd ), then the following are equivalent: (1) L(S) = 0, (2) `(S) = 0, (3) S has a common fixed point. In other words: if Γ is a group and π a finite dimensional unitary representation, then for any cocycle b : Γ → Hπ the following are equivalent: (1) b is in the closure of coboundaries, (2) b is sublinear, (3) b is a coboundary. This conveniently complements [34, Cor 3.7]. 14 EMMANUEL BREUILLARD AND KOJI FUJIWARA 3.4. A diffusive lower bound on joint displacement. With just the CAT(0) √ property one always gets n growth for the joint displacement L(S n ). This may not seem very surprising as already any random walk is expected to have at least a diffusive behaviour (see Remark 3.10 below). However one interesting feature of the following lower bound is the absence of any additive constant and the linear dependence in terms of L(SS −1 ). Proposition 3.6. Let X be a CAT (0) geodesic metric space and S a finite subset of Isom(X). For every n ∈ N we have: √ n L(SS −1 ). L(S n ) ≥ 2 Proof. Recall that r(S) denotes the infinimum over all points x, y of the radius r of the balls centered at y which contain Sx and that (Lemma 2.1) r(S) ≤ L(S). By definition of r(S n ) if r > r(S n ), then there exists some x, y ∈ X such that S n x ⊂ B(y, r). This means that sS n−1 x lies in B(y, r) for every s ∈ S and hence S n−1 x lies in the intersection of all balls B(s−1 y, r) for s ∈ S. Lemma 3.7. Let X be a CAT(0) geodesic metric space and B(y, r) and B(z, r) two balls of radius r > 0. Let m be a mid-point of a geodesic between y and z. Then B(y, r)∩B(z, r) is contained in the ball centered at m with radius (r2 − 14 d(y, z)2 )1/2 . Proof. This is straightforward from the CAT(0) inequality (10).  −1 Now from this lemma s−1 1 B ∩ s2 B is contained in the ball centered at the mid−1 2 1/2 −1 −1 . It follows point between s1 y and s2 y and with radius (r2 − 14 d(s−1 1 y, s2 y) ) n−1 that S x lies in a ball of that radius. 2 By definition of r(S n−1 ), it follows that r(S n−1 )2 ≤ r2 − 41 d(s2 s−1 1 y, y) . This 1 −1 2 n 2 n holds for all s1 , s2 ∈ S and all r > r(S ), thus: 4 L(SS , y) ≤ r(S ) − r(S n−1 )2 . We conclude that L(SS −1 )2 ≤ 4(r(S n )2 − r(S n−1 )2 ). Finally, summing over n, we obtain the desired result.  The above lower bound is useful to show that even if L(SS −1 ) is very small, there will be some controlled n for which L(S n ) has macroscopic size. √ Remark 3.8. The behaviour in n of the lower bound is sharp for general CAT(0) spaces. Indeed Cornulier, Tessera and Valette √ exhibited an affine isometric action of the free group on a Hilbert space with a n upper bound on cocycle growth, see [34, Prop. 3.9]. When X is a product of symmetric spaces and Euclidean spaces however, then L(S n ) grows linearly provided L(S) > 0. This follows from the combination of Propositions 9.3 and 1.8. Remark 3.9. In [58] V. Lafforgue gave another proof of Shalom’s theorem [72] that a group without property (T ) has non-trivial first reduced cohomology. His main lemma is essentially a version of Proposition 3.6 in the case when X is a Hilbert space. Remark 3.10. In [45] Gromov investigates the growth of the energy of a random walk on a general CAT(0) space. In particular from his harmonic growth inequalities √ in [45, 3.4] one gets that the average √ displacement of a random walk grows like n, which is another way to recover the n growth in Proposition 3.6. JOINT SPECTRAL RADIUS AND UNIFORM GROWTH 15 3.5. Fixed points on the boundary. Let X be a complete CAT(0) geodesic space. Note that the sublevel sets of the function x 7→ L(S, x) are convex subsets. Note further that any nested sequence of bounded closed convex non-empty sets has non-empty intersection (see e.g. [61]*Theorem 14). In particular we have: Proposition 3.11. If x 7→ L(S, x) tends to infinity when x leaves every bounded subset of X, then L(S, x) achieves its minimum L(S) at some point x0 ∈ X. If X is locally compact one has: Proposition 3.12. Suppose X is a CAT(0) locally compact geodesic space such that no sublevel sets of x 7→ L(S, x) is bounded. Then S has a global fixed point on the visual boundary ∂X. For this see for example [55]*2.2.1. Recall that the visual boundary ∂X is the set of equivalence classes of infinite geodesic rays [0, +∞) → X, where two rays (xt )t and (yt )t are equivalent if d(xt , yt ) is uniformly bounded. We get: Corollary 3.13. Suppose X is a CAT(0) locally compact geodesic space. And S ⊂ Isom(X) a finite set of isometries such that L(S) = 0, then S has a global fixed point in X ∪ ∂X. 3.6. CAT(0) and Gromov hyperbolic spaces. If X is only assumed to be CAT (0), then there may be parabolic isometries g with L(g) > 0. For example, the product of a parabolic isometry of the hyperbolic plane with a non trivial translation of R. A less obvious example is given by the warped product (exp(−y)+C)dx2 +dy 2 on R2 , with C > 0. This space is CAT (0) and translation (x, y) 7→ (x + 1, y) is a parabolic isometry with positive displacement C (see Remark 2.4. in [53]). However if we assume additionally that X is Gromov hyperbolic, then parabolic isometries must have zero displacement. More precisely, we have: Proposition 3.14. Let X be a complete CAT(0) space which is Gromov hyperbolic. Let g be an isometry of X with L(g) > 0. Then g is hyperbolic in the sense that L(g) is achieved on a geodesic, which is the unique g-invariant geodesic. For the definition of Gromov hyperbolic spaces we refer to Section 5 below as well as the books [24, 16, 33]. Before we start the proof, we quote some results. Let X be a complete CAT(0) space and ∂X its visual boundary at infinity. Set X = X ∪ ∂X. For a closed convex subset C ⊂ X, let C ⊂ X be its closure. Theorem 3.15 ([61]*Prop. 23). Assume that a complete CAT(0) space X is Gromov hyperbolic. Then for any nested family F of non-empty closed convex subsets C ⊂ X, the intersection ∩C∈F C is non-empty. In particular we have the following. Corollary 3.16. Let X be a Gromov hyperbolic complete CAT(0) space. Then a parabolic isometry g has a fixed point in X̄\X. Proof. The family of sublevel sets of x 7→ L(g, x) has empty intersection in X, for otherwise g would have a fixed point in X. By the previous theorem, the closures in X̄ of these sublevel sets has non-empty intersection in X̄\X. Each point in the intersection is fixed by g.  We quote a standard fact on δ-hyperbolic space. 16 EMMANUEL BREUILLARD AND KOJI FUJIWARA Theorem 3.17. Let X be a δ-hyperbolic space and g an isometry of X. If L(g) is sufficiently large, compared to δ, then g is “hyperbolic” in the sense that there is an infinite quasi-geodesic γ in X which is g-invariant. Moreover, let x ∈ X be any point and m the midpoint of a geodesic segment from x to g(x). Form a g-invariant piecewise geodesic, γ, joining the points {g n (m)}n∈Z in this order by geodesics. Then, there exists a constant M , which depends only on δ, such that for any points p, q ∈ γ, the Hausdorff distance between the part in γ from p to q and a geodesic from p to q is at most M . Remark 3.18. The first claim appears in [43, §8, Prop 24] with L(g) > 26δ. The advantage to retake x to m is that we have uniform bounds on the quasi-geodesic constants. In fact, we have 2|m − g(m)| − |m − g 2 (m)| ≤ 4δ, namely, the three points m, g(m), g 2 (m) are nearly on a geodesic. It follows that the path γ is a (K, L)-quasi geodesic with constants K, L depending only on . Once we have that, the existence of M is by the Morse lemma. A detailed argument is, for example, in [42] for L(g) > 1000δ. For an isometry a of X and a constant C, define F ixC (a) = {x ∈ X|d(x, a(x)) ≤ C}. This is a closed, possibly empty, set. It is convex if X is CAT(0). We start the proof of the proposition 3.14. Proof. Since it suffices to show that g n is hyperbolic for some n > 0, by Proposition 3.1, we may assume that L(g) is as large as we want by replacing g by a high power. So, we assume that L(g) is large enough compared to the hyperbolicity constant δ, so that Theorem 3.17 applies to g. Set C0 = L(g). We will show F ixC0 (g) is not empty. For each C > C0 , the set F ixC (g) is non-empty convex set which is invariant by g, and is δ-hyperbolic. By Theorem 3.17, there is a g-invariant quasi-geodesic, but we may assume that this path is contained in F ixC (g). Indeed, if we start with a point x ∈ F igC (g), the point m is also in F igC (g) since it is convex, and so are all points g n (m). Therefore γ in the theorem is contained in F icC (g). Let us denote this γ by γC . Now, the Hausdorff distance of any two of those quasi-geodesics γC , C > C0 , is at most 2M + 2δ = M 0 . To see that, observe that the Hausdorff distance of the two quasi-geodesics is finite since they are both g-invariant. Since they are both bi-infinite, in fact the bound is 2M + 2δ. In particular there is a metric ball, B ⊂ X, of radius M 0 such that for any C > C0 , B ∩ γC 6= ∅, therefore B ∩ F ixC (g) is not empty. Set F = {B ∩ F ixC (g)|C > C0 }. It is a nested family of bounded convex closed subsets of X. Hence the family has a non-empty intersection, in particular ∩C>C0 F ixC (g) is not empty, and therefore F ixC0 (g) is not empty.  In view of the above propositions, in the case of a complete CAT(0) and δhyperbolic space, the classification of isometries becomes: • elliptic when g fixes a point in X, • hyperbolic when L(g) > 0 (in this case g fixes a unique geodesic and acts by translation by L(g) on it), • parabolic when L(g) = 0 (in this case g does not fix a point in X but fixes a point in ∂X). JOINT SPECTRAL RADIUS AND UNIFORM GROWTH 17 4. Quantitative Serre’s lemma for groups acting on trees The goal of this section is to prove Proposition 4.4 below, which is an extension of the following well-known lemma due to Serre ([71, I. Prop. 26]). In the next section we will generalize everything to δ-hyperbolic spaces. Lemma 4.1 (Serre’s lemma). If a, b are isometries of a simplicial tree, such that a, b and ab each have some fixed point, then a and b have a common fixed point. We first note the following simple fact: Lemma 4.2. If a is an isometry of a simplicial tree, then L(a) = `(a) = λ(a). Indeed either a fixed a point on the tree, and all quantities vanish, or a is a hyperbolic isometry translating along an axis ∆a = {x; d(ax, x) = L(a)}, so that in particular L(an ) = nL(a) and thus λ(a) = L(a). Proposition 4.3 (A formula for the joint minimal displacement of a pair). Let a, b be isometries of a simplicial tree. Then L(ab) } = λ2 ({a, b}). L({a, b}) = max{L(a), L(b), 2 More generally this formula extends to an arbitrary finite subset of isometries: Proposition 4.4 (A formula for the joint minimal displacement). Let S be a finite set of isometries of a simplicial tree. Then L(ab) L(S) = max {L(a), } = λ2 (S). a,b∈S 2 Recall that by definition L(S) = inf x∈X maxs∈S d(x, sx) and L(g) = L({g}) for an isometry g. And `(S) = lim L(S n )/n. Corollary 4.5 (Growth of joint minimal displacement). Let S be a finite set of isometries of a simplicial tree. Then L(S) = `(S) = λ2 (S) and indeed for every n ∈ N, L(S n ) = nL(S). We now pass to the proofs of the above statements. The proofs are quite simple and we do not claim much originality here. Even though we were not able to find the above statements in the existing literature, all ingredients in their proofs are well-known and can be found, for example in [32, 3.3]. First we make the following simple observations: Let g is an isometry of a simplicial tree X, let ∆g be the “axis” of g, ∆g := {x ∈ X; d(gx, x) = L(g)} and let x be any point in X. (a) we have d(gx, x) = 2d(x, ∆g ) + L(g), (b) L(g) = d(gm, m), where m is the midpoint of the geodesic segment [x, gx]. To see this, consider a point y on ∆g , which minimizes the distance between x and ∆g and note that the geodesic between y and gy lies entirely in ∆g , so that in particular the concatenation of the geodesic segments from x to y and from y to gy remains a geodesic. Furthermore the midpoint between x and gx will coincide with the midpoint between y and gy. Proof of Proposition 4.3. Let the point x realize the infimum of max{d(x, ax), d(x, bx)}. Assume that L({a, b}) > max{L(a), L(b)}. This implies that the axes ∆a and ∆b 18 EMMANUEL BREUILLARD AND KOJI FUJIWARA do not intersect. We claim that x must be the midpoint of the geodesic segment [ax, bx] and that d(x, ax) = d(x, bx). To see this look at the triangle with vertices x, ax and bx. If it is not flat with x the midpoint of [ax, bx], then the geodesics [x, ax] and [x, bx] intersect on some segment near x. But y 7→ d(y, ay) decreases as the point y moves away from x on this segment. This is a consequence of item (a) above: it decreases strictly unless x is on the axis ∆a of a, and it decreases until it reaches the midpoint m of the segment [x, ax], where we have L(a) = d(m, am) by item (b) above. The same holds for b. Since L({a, b}, x) > max{L(a), L(b)}, we conclude that unless x is on both axes ∆a and ∆b , this contradicts the minimality of x. For the same reason x is also the midpoint of the geodesic segments [b−1 x, ax] and [bx, a−1 x]. By item (b) above applied to x viewed as a midpoint of [b−1 x, ax] (noting that ax = (ab)b−1 x) we get: d(abx, x) = L(ab). But (11) d(abx, x) = d(bx, a−1 x) = 2d(ax, x) = 2d(bx, x) = 2L(a, b). So this shows that L(a, b) = L(ab)/2 and this ends the proof of the proposition.  We may now extend our formula to an arbitrary finite set of isometries. Recall that for an isometry a of a metric space (X, d) and a number A ≥ 0 we denote F ixA (a) := {x ∈ X; d(ax, x) ≤ A}. Proof of Proposition 4.4. This follows easily from Proposition 4.3. Indeed set M = maxa,b∈S {L(a), L(ab)/2}. By Proposition 4.3 we have M ≥ L({a, b}) for every pair a, b ∈ S. Hence F ixM (a) and F ixM (b) intersect for every pair a, b ∈ S. However recall that each F ixM (a) is a convex subset (it is a subtree), and in any tree any collection of subtrees which pairwise intersect non trivially must have a non-empty intersection. Therefore there is a point z such that d(z, az) ≤ M for all a ∈ S and we have established L(S) ≤ M . The opposite inequality is obvious.  Proof of Corollary 4.5. This is obvious combining Lemma 3.6 and Proposition 4.4.  5. The joint minimal displacement in hyperbolic spaces In this section we extend the results of Section 4 to isometries of δ-hyperbolic spaces and prove Theorem 1.4 from the introduction, which implies Theorem 1.2 in the case of hyperbolic spaces. First we recall the definition of δ-hyperbolicity and prove a general lower bound on L(S n ) using the same circumcenter argument as in Proposition 3.6. Gromov introduced the notion of a δ-hyperbolic metric space in [47]. Recall that a metric space (X, d) is said to be geodesic if any two points can be joined by a geodesic (i.e. length minimizing) continuous path. A geodesic triangle ∆ = (σ1 , σ2 , σ3 ) in a geodesic space X is said to be δ-thin if σi is contained in the δ-neighborhood of σj ∪ σk for any permutation of (i, j, k) of (1, 2, 3). There is another notion that is closely related to δ-thinness. A point c is a δ-center of a geodesic triangle ∆ = (σ1 , σ2 , σ3 ) if the distance from c to every σi is ≤ δ, [16]. It is easy to see that if a (geodesic) triangle is δ-thin, then it has a JOINT SPECTRAL RADIUS AND UNIFORM GROWTH 19 δ-center. Conversely, if a geodesic triangle has a δ-center, then it is 6δ-thin (see [16, Lemma 6.5]. The metric space (X, d) is said to be δ-hyperbolic if any geodesic triangle is δ-thin. Good references on the geometry of δ-hyperbolic spaces include [24, 16, 33]. Note that we can also define the δ-hyperbolicity of a geodesic space if every geodesic triangle has a δ-center (for example [16]). As we said, those two definitions are equivalent, but the constant δ may differ, so if we want to stress the difference, we call it δ-center-hyperbolicity. We note that there is also a notion of δ-hyperbolic space where the space is not required to be geodesic (via the so-called 4-points condition, see [16]). However the geodesic assumption is necessary in our theorems. For example it can be seen easily that results such as Lemma 5.4 or Theorem 5.6 fail when the space is not assumed geodesic. As pointed out in [63, Remark 4.4] one can take for instance the usual hyperbolic disc with a large ball (centered say at the origin) removed. This is still a δ-hyperbolic space in the sense of the 4-points condition with the same δ, but an elliptic isometry centered at the origin will have `(g) = 0 while L(g) will be large. 5.1. Using the circumradius to relate joint minimal and joint asymptotic displacements. Here we show: Proposition 5.1. Let X be a δ-hyperbolic geodesic metric space and S a finite subset of Isom(X). For every n ∈ N we have: L(SS −1 ) 1 L(S n ) ≥ − 2δ n 2 Proof. The argument is analogous to that of Proposition 3.6 in the CAT(0) setting. Recall that r(S) denotes the infinimum over all points x, y of the radius r of the balls centered at y which contain Sx. Also recall (Lemma 2.1) that r(S) ≤ L(S). Let n ≥ 1 and r > r(S n ). By definition of r(S n ), there exists some x, y ∈ X such that S n x is contained in the ball B of radius r centered at y. This means that sS n−1 x lies in B for every s ∈ S and hence S n−1 x lies in the intersection of all balls s−1 B for s ∈ S. We require the following Lemma 5.2. Let X be a δ-hyperbolic geodesic metric space and B(y, r) and B(z, r) two balls of radius r > 0. Let m be a mid-point of a geodesic between y and z. Then B(y, r) ∩ B(z, r) is contained in the ball centered at m with radius r − 21 d(y, z) + 2δ. Proof. This is straightforward from the definition of δ-hyperbolicity.  −1 Now from this lemma s−1 1 B ∩ s2 B is contained in the ball centered at the mid−1 −1 −1 point between s1 y and s2 y and with radius r − 12 d(s−1 1 y, s2 y) + 2δ. It follows n−1 that S x lies in a ball of that radius. By definition of r(S n−1 ), it follows that r(S n−1 ) ≤ r − 21 d(s2 s−1 1 y, y) + 2δ. This holds for all s1 , s2 ∈ S and all r > r(S n ), thus: 21 L(SS −1 , y) ≤ r(S n )−r(S n−1 )+2δ. We conclude that 12 L(SS −1 ) ≤ r(S n ) − r(S n−1 ) + 2δ. Finally, summing over n, we obtain the desired result.  20 EMMANUEL BREUILLARD AND KOJI FUJIWARA Corollary 5.3. Let X be a δ-hyperbolic geodesic metric space and S a finite symmetric subset of Isom(X). We have: L(S 2 ) ≤ `(S) + 2δ. 2 Proof. Clear from the combination of Proposition 5.1 and Lemma 1.1. `(S) ≤  This result was obtained quite cheaply using the circumradius. Using a more delicate analysis, based on a refinement of Serre’s lemma, we will prove below in Proposition 5.6 a much stronger result, a Bochi-type inequality, which yields a hyperbolic element of large translation length. 5.2. Powers of a single element. We begin by showing that the asymptotic translation length of a single element is controled by its translation length, provided the latter is large enough. Lemma 5.4. There is a universal constant C > 0 such that the following holds. Let g be an isometry in a δ-hyperbolic space. Then for all m > 0, L(g m ) ≥ m(L(g) − Cδ). In particular: L(g) − Cδ ≤ `(g) ≤ L(g). Proof. We first prove the lemma for m = 2. For the proof we may assume δ > 0. Pick a point y such that L(g 2 , y) ≤ L(g 2 ) + δ. Consider the three points y, gy and g 2 y. We will show that unless L(g) = O(δ) this triangle is O(δ)-flat and gy is O(δ) away from a mid point of [y, g 2 y]. Let q be a point at distance at most δ from all three geodesics joining these points, which is given to us by the δ-hyperbolicity assumption. Since d(y, gy) = d(gy, g 2 y) we conclude that |d(y, q) − d(q, gy)| = O(δ). In a δ-hyperbolic space any two geodesics joining two given points are at distance O(δ) of each other. Therefore d(p, q) = O(δ), where p is a mid-point between y and g 2 y. Now if r is a mid-point between y and gy, then r is O(δ) close to either [q, gy] or to [y, q] according as d(y, r) ≥ d(y, q) or not. In the first case d(r, gr) = O(δ), which implies that L(g) = O(δ) and there is nothing to prove. In the second case gr will be at most O(δ) away from [q, g 2 y] and we get: |d(y, g 2 y) − [d(y, r) + d(r, q) + d(q, gr) + d(gr, g 2 y)]| = O(δ), while d(r, q) ≤ d(y, r) + O(δ) and d(q, gr) ≤ d(gr, g 2 y) + O(δ). Combining these two facts we get: 2d(r, gr) ≤ d(y, g 2 y) + O(δ), from which the inequality 2L(g) ≤ L(g 2 ) + O(δ) follows immediately. We now pass to the general case, when is an arbitrary integer m > 2. First we observe that if L(g 2 ) ≥ 2(L(g) − Cδ) for every isometry g, then a straigthforward n induction shows that L(g 2 ) ≥ 2n (L(g) − 2Cδ) for every g and every integer n. But observe that given any point x the sequence m 7→ L(g m , x) is subadditive. In m particular, by the subadditive lemma, { L(gm ,x) }m converges towards L(g m , x) L(g m , x) = lim . m7→+∞ m≥1 m m inf Letting m grow along powers of 2 we see that the latter is at least L(g) − 2Cδ. This means that L(g m , x) ≥ m(L(g) − 2Cδ) for every integer m and every point x. In particular L(g m ) ≥ m(L(g) − 2Cδ) as desired.  JOINT SPECTRAL RADIUS AND UNIFORM GROWTH 21 5.3. Bochi-type formula for hyperbolic spaces. Here we prove Theorem 1.4 from the introduction. Proposition 5.5 (Joint minimal displacement of a pair). There is an absolute constant K > 0 such that if δ ≥ 0 and (X, d) is a δ-hyperbolic geodesic space, and a, b are two isometries of X, then `(ab) } ≤ L({a, b}). L({a, b}) − Kδ ≤ max{`(a), `(b), 2 Recall our notation used throughout for a finite set S of isometries of a metric space (X, d) we denote by L(S, x) := maxs∈S d(x, sx), L(S) := inf x∈X L(S, x) and `(S) := lim L(S n )/n, while λk (S) := max1≤j≤k 1j maxg∈S j `(g). Theorem 5.6 (Theorem 1.4 from the introduction). There is an absolute constant K > 0 such that if δ ≥ 0 and (X, d) is a δ-hyperbolic geodesic space, and S is a finite set of isometries of X, then `(ab) L(S) − Kδ ≤ λ2 (S) = max {`(a), } ≤ L(S). a,b∈S 2 As a consequence of this proposition, we obtain the following strengthening of Proposition 5.1. Corollary 5.7 (Growth of joint minimal displacement). There is an absolute constant K > 0 such that the following holds. Let S be a finite set of isometries of a δ-hyperbolic space. Let n ∈ N. Then n(L(S) − Kδ) ≤ λ2 (S n ) ≤ L(S n ). Moreover λ∞ (S) = `(S). We now pass to the proofs. As always in δ-hyperbolic geometry arguments are modeled on the tree case and this is why we decided to include the special case of trees separately even though it is of course implied by the δ-hyperbolic case by setting δ = 0. A key ingredient will be Lemma 5.9 below, which computes the displacement of an isometry in terms of its translation length and the distance to its axis. Before we embark in the proof we begin by recalling the following basic fact about tree approximation in δ-hyperbolic spaces. Lemma 5.8. (see [16, Prop. 6.7]) Given k points x1 , ..., xk in a δ-hyperbolic metric space (X, d) there is a metric tree T embedded in X such that for all i, j (12) d(xi , xj ) ≤ dT (xi , xj ) ≤ d(xi , xj ) + Ck δ, where dT (xi , xj ) is the length of the geodesic path joining xi and xj in T . Here Ck is a constant depending only on k. Recall that for an isometry a of a metric space (X, d) and a number A ≥ 0 we denote F ixA (a) := {x ∈ X; d(ax, x) ≤ A}. Lemma 5.9. There are absolute constants c, K > 0 with the following property. Let (X, d) be a geodesic δ-hyperbolic metric space. Let M ≥ cδ and a ∈ Isom(X). Assume that F ixM (a) is non-empty and let x ∈ / F ixM (a). Then (13) |2d(x, F ixM (a)) + M − d(ax, x)| ≤ Kδ, 22 EMMANUEL BREUILLARD AND KOJI FUJIWARA and (14) d(q, aq) ≤ M + Kδ, for every mid-point q between x and ax. Proof. Let  > 0 and pick y ∈ F ixM (a) such that d(x, y) ≤ d(x, F ixM (a)) + . We may write: d(ax, x) ≤ d(ax, ay) + d(ay, y) + d(y, x) ≤ 2d(x, y) + M, so one side of (13) follows immediately. To see the other side consider the four points x, y, ax, ay and apply Lemma 5.8 to these four points with k = 4. Let w be the intersection of the three geodesics in T connecting ax, ay and x, and let z be the intersection of the three geodesics in T connecting ax, y and x. First we claim that: (15) d(y, z) ≤  + O(δ) To see this, first recall that in a δ-hyperbolic space the Gromov product of a pair of points based at a third point is equal up to an error of 4δ to the distance from the third point to the geodesic between the pair (see [16, Lemma 6.2]). Now note that if α is the geodesic joining y and ay, then α is entirely contained in F ixM (a). Consequently d(x, α) ≥ d(x, y) − . Hence (y, ay)x ≥ d(x, α) − 4δ ≥ d(x, y) −  − 4δ, which unfolding the Gromov product means: d(x, z) + d(z, ay) ≥ d(x, ay) ≥ d(x, y) + d(y, ay) − 2 − O(δ). In view of (12), it follows that the same holds with dT in place of d. However: dT (x, y) + dT (y, ay) = dT (x, z) + dT (z, ay) + 2dT (y, z), so we conclude that (15) holds. At this pont we note that d(ay, y) ≥ M − 2. Indeed by the intermediate value theorem, we may pick a point u on a geodesic between x and y such that d(au, u) = M . Then d(x, u) ≤ d(x, y), while u ∈ F ixM (a) so that d(x, u) ≥ d(x, F ixM (a)) ≥ d(x, y) − . Consequently d(u, y) ≤  and hence d(ay, y) ≥ d(au, u) − 2 as desired. Now two cases occur, according as w belongs to the tree geodesic [ay, z]T or to [z, x]T . In the first case, by symmetry the previous argument also shows that (16) d(ay, w) ≤  + O(δ) Combining (15) and (16) (and using (12) then yields d(ax, x) ≥ d(ax, w) + d(w, z) + d(z, x) − O(δ) ≥ d(ax, ay) + d(ay, y) + d(y, x) − 2 − O(δ) ≥ 2d(x, F ixM (a)) + M − 6 − O(δ), from which the remaining side of (13) is immediate since  is arbitrary. We can also observe now from the second inequality above that any mid-point p between y and ay is satisfies |d(x, p) − d(ax, p)| = O(δ). The δ-hyperbolicity of the space then implies that d(p, q) = O(δ) for every mid-point q between x and ax. On the other hand d(p, ap) ≤ M (because y ∈ F ixM (a)). Therefore d(q, aq) ≤ M + O(δ). And (14) holds. In the second case, z is also the intersection of the tree geodesics between the three points y, ay and ax and the previous argument once again shows that (17) d(ay, z) ≤  + O(δ) JOINT SPECTRAL RADIUS AND UNIFORM GROWTH 23 This means (using (15)) that d(ay, y) ≤ 2 + O(δ) and hence that M ≤ 4 + O(δ). So this case happens only when M = O(δ), a case we discard by choosing c large enough.  Proof of Proposition 5.5. Let  > 0 be arbitrary and let x be a point in X such that L({a, b}, x) ≤ L({a, b}) + . At the end of the argument we will let  tend to 0. Let K be a large absolute constant, whose value we will specify later. Without loss of generality, we may assume that L({a, b}) > max{L(a), L(b)} + Kδ + 3, for otherwise there is nothing to prove. We can apply Lemma 5.9 to a with Ma = max{L(a) + , Kδ}. Let x be a point in F ixMa (a) such that d(x, x) ≤ d(x, F ixMa (a))+. Then (13) of Lemma 5.9 shows that the piecewise geodesic path between x, x, ax and ax is geodesic up to an error O(δ) + . More precisely if y is any point on a geodesic between x and x, then (13) gives d(ay, y) ≤ d(ay, ax) + d(ax, x) + d(x, y) ≤ 2d(x, y) + L(a) +  + O(δ) (18) ≤ d(ax, x) − 2d(x, y) +  + O(δ) Now we may conclude that |d(ax, x) − d(bx, x)| ≤ Kδ + 3. To see this assume by contradiction that d(x, ax) > d(x, bx) + 2t +  with 2t > 2 + Kδ and t < d(x, F ixMa (a)). We may choose y at distance t from x on the geodesic [x, x]. Then L({a, b}, x) = d(ax, x), while d(by, y) ≤ d(bx, x) + 2t < d(ax, x) −  and d(ay, y) ≤ d(ax, x) − 2d(x, y) +  + Kδ by the above inequality, so d(ay, y) < d(ax, x) −  so L({a, b}, y) < L({a, b}, x) − , which contradicts the choice of x. This argument is valid if 2d(x, F ixMa (a)) > 2+Kδ. But we are always in this case, because otherwise L({a, b}, x) ≤ d(x, ax) ≤ Ma + 2 + Kδ, which is in contradiction with our assumption that L({a, b}) > max{L(a), L(b)} + Kδ + 3. Now we claim that x is at most O(δ) +  away from the midpoint between ax and bx. By the above discussion it is enough to show that it is that close to the geodesic between ax and bx. Let us verify this claim. Without loss of generality we may assume that d(x, F ixMa (a)) ≥ d(x, F ixMb (b)). Now consider the triangle with vertices x, ax and bx. It is δ-thin by hyperbolicity. Thus there is a point z at distance at most δ from all three geodesics. In particular the geodesic between z and x is in the O(δ) neighborhood of both the geodesic between x and ax and the geodesic between x and bx. If y is any point on [x, z] such that d(x, y) ≤ d(x, F ixMb (b)) + . Then we also have d(x, y) ≤ d(x, F ixMa (a)) +  and the above inequality (18) for a and its analogue for b applied at y show that L({a, b}, y) ≤ L({a, b}, x) − 2d(x, y) +  + O(δ), and thus, given our choice of x, d(x, y) ≤  + O(δ). Choosing y as far from x as possible, we see that this means either that d(x, z) ≤  + O(δ) and we have proved our claim, or that d(x, F ixMb (b)) ≤ 2 + O(δ). Let us rule out the second case. If d(x, F ixMb (b)) ≤ 2 + O(δ) the entire segment [x, bx] lies in F ixMb0 (b), where Mb0 = Mb +2+O(δ) ≤ L(b)+3+O(δ). So again if y is any point on [x, z] such that 24 EMMANUEL BREUILLARD AND KOJI FUJIWARA d(x, y) ≤ d(x, F ixMa (a)) + , then not only d(ay, y) ≤ d(ax, x) − 2d(x, y) +  + O(δ) but also d(by, y) ≤ Mb0 ≤ L(b) + 3 + O(δ). Now we may choose our numerical constant K > 0 so large that the implied constant in the big O in the two last inequalities is at most K/2 say. Then d(by, y) ≤ L({a, b}) − Kδ/2 and d(ay, y) ≤ L({a, b}) − 2d(x, y) + 2 + Kδ/2 so L({a, b}, y) ≤ L({a, b}) + max{−Kδ/2, 2 + Kδ/2 − 2d(x, y)}, and we conclude that 2d(x, y) ≤ 2 + Kδ/2. Again choosing y as far from x as possible, we see that this means that d(x, F ixMa (a)) ≤ 2+K/δ/2. In particular d(ax, x) and d(bx, x) are both at most max{Ma , Mb }+4+ Kδ ≤ max{L(a), L(b)} + 5 + 2Kδ. The last quantity is < L({a, b}) by assumption and this is impossible. This ends the proof of the claim. We have thus shown that x is at most O(δ) +  away from the midpoint between ax and bx. The same reasoning applies to the segments between b−1 x and ax, as well as between bx and a−1 x. If m is the midpoint of [b−1 x, ax] then (14) of Lemma 5.9 shows that L(ab) ≤ d(abm, m) ≤ L(ab) +  + O(δ), so d(abx, x) ≤ L(ab) + O(δ) + 2. On the other hand 2d(x, bx) ≤ d(bx, a−1 x) + O(δ) + 2 ≤ d(abx, x) + O(δ) + 2 ≤ L(ab) + O(δ) + 4. And similarly 2d(x, bx) ≤ L(ab) + O(δ) + 4, so that 1 L(ab) + O(δ) + 2. 2 Letting  tend to zero, the proof is complete. L({a, b}) ≤ L({a, b}, x) ≤  Proof of Theorem 5.6. The right hand side inequality is obvious. The left hand side follows easily from Proposition 5.5 combined with Helly’s theorem for hyperbolic spaces, namely Theorem 6.1. Indeed pick  > 0 and set M = max {L(a), L(ab)/2} + Kδ + , a,b∈S where K is as in Proposition 5.5. This proposition tells us that F ixM (a) and F ixM (b) intersect non trivially for every pair of isometries a, b ∈ S. From our Helly-type theorem for hyperbolic spaces Theorem 6.1 we conclude that the 28δneighborhoods of all F ixM (a), a ∈ S, intersect non-trivially. Each such neighborhood is clearly contained in F ixM +56δ (a). We have established that L(S) ≤ M + 56δ. Letting  tend to 0, this ends the proof.  Proof of Corollary 5.7. Recall from Claim 7 equation (9) in the proof of Lemma 1.1 in Section 2 that nλ2 (S) ≤ λ2 (S n ). Now by Theorem 5.6 we get the desired inequalities: n(L(S) − Kδ) ≤ nλ2 (S) ≤ λ2 (S n ) ≤ L(S n ) ≤ nL(S). JOINT SPECTRAL RADIUS AND UNIFORM GROWTH 25 If we now apply Theorem 5.6 to S n we get L(S n ) − Kδ ≤ λ2 (S n ) Letting n tend to infinity we also get λ∞ (S) = `(S).  We give a consequence of Proposition 5.7 anc Lemma 1.7. Corollary 5.10. Let X be CAT(0) and δ-hyperbolic. Then for any  > 0, there exists an integer N = N (δ, ) > 0 with the following property. For any finite set S ⊂ Isom(X) with 1 ∈ S, one of the following holds: (1) L(S) < , (2) there is g ∈ S N such that `(g) ≥ L(S). Proof. By Theorem 5.6, L(S) ≤ λ2 (S) + Kδ. Also, for any n > 0, L(S n ) ≤ √ n λ2 (S n ) + Kδ. But since X is CAT(0), we also have 2 L(S) ≤ L(S n ) by Lemma 1.7. Combining those two inequalities, and taking n large enough, we obtain the desired conclusion.  6. Helly type theorem for hyperbolic spaces It is well-known and easy to prove that any family of convex subsets of a tree with non-empty pairwise intersection must have a non-empty intersection. In this section we prove the following extension of this fact to hyperbolic spaces: Theorem 6.1 (Helly for hyperbolic spaces). Let (X, d) be a δ-hyperbolic geodesic metric space. Let (Ci )i be a family of convex subsets of X such that Ci ∩ Cj 6= ∅ for all i, j. Then the intersection of all (Ci )28δ is non-empty. Recall that for a subset E ⊂ X we denote by (E)t the t-neighborhood of E, i.e. (E)t := {x ∈ X; d(x, E) ≤ t}. The proof is insprired by [31]. We begin with a lemma: Lemma 6.2. Let C1 and C2 be convex subsets of X with non empty intersection. Let z be a point in X. Let xi be a point in Ci such that d(z, xi ) ≤ d(z, Ci ) + δ. Assume that d(z, x1 ) ≥ d(z, x2 ) − δ. Then d(x1 , C2 ) ≤ 28δ. Proof. Pick u ∈ C1 ∩ C2 . It is a standard fact about δ-hyperbolic spaces that the distance to a geodesic and the Gromov product of the end points are equal within an error 4δ (see [16, Lemma 6.2]). This means that (u, x1 )z ≥ d(z, ux1 ) − 4δ ≥ d(z, x1 ) − 5δ. Unfolding the Gromov product, we get: d(z, u) + 10δ ≥ d(u, x1 ) + d(x1 , z) The same holds for x2 in place of x1 . This means that the paths u, x1 , z and u, x2 , z are almost geodesic (i.e. 10δ-taut in the terminology of [16, chap. 6]). Hence they must be very close to each other. Applying [16, Lemma 6.4] we see that both paths are within 27δ of each other. In particular d(x1 , C2 ) ≤ d(x1 , ux2 ) ≤ 28δ, which is what we wished for.  Proof of Theorem 6.1. Pick any point z ∈ X. The point of the proof is that the previous lemma identifies one specific point that must be in the intersection. Let xi ∈ Ci as in the previous lemma. Without loss of generality, we may assume that d(x1 , z) ≥ d(xi , z) − δ for all indices i. Then we may apply the lemma to all pairs C1 and Ci . And conclude that x1 belongs to the desired intersection. This ends the proof.  26 EMMANUEL BREUILLARD AND KOJI FUJIWARA 7. Symmetric spaces of non-compact type In this section we prove the Berger-Wang identity for symmetric spaces of noncompact type, as well as the Bochi-type inequality stated in the introduction. In particular we establish Proposition 1.8 and Theorem 1.2 for these spaces. So X is assumed to be a symmetric space of non-compact type associated to a real semisimple algebraic group G. The space (X, d) is then CAT (0) and the distance is G-invariant. We refer to [24] for background on these spaces and to [66, 51] for finer properties. We only recall here the following important example: Example 7.1. Let Pd be the symmetric space associated to G = SLd (C) and K = SU (d, C), that is X = Pd = G/K. Recall the Cartan decomposition G = KAK, where A is the Lie subgroup of diagonal matrices with positive real entries. The distance on Pd is left G-invariant and is given by the following simple formula: p (19) d(gx0 , x0 ) = d(ax0 , x0 ) = (log a1 )2 + . . . + (log ad )2 , where g = kak ∈ KAK, x0 is the point in Pd fixed by the maximal compact subgroup K and a = diag(a1 , . . . , ad ). This example is important also because every symmetric space of non-compact type arises as a convex (totally geodesic) subspace of some Pd . In fact if M is an arbitrary symmetric space of non-compact type, then Isom(M ) is a linear semisimple Lie group with finitely many connected components and thus embeds as a closed subgroup of some SLd (C) for some d. By the Karpelevich-Mostow theorem the connected component of the identity Isom(M )0 , which is a semisimple Lie group, admits a convex totally geodesic orbit within the symmetric space Pd , which is isometric to M . In particular every isometry of M extends to an isometry of Pd . We also recall here that, since (X, d) is a locally compact CAT(0) space we know that g ∈ Isom(X) satisfies L(g) = 0 if and only if `(g) = 0 and if and only if g fixes a point in X = X ∪ ∂X (Corollary 3.13). This is also equivalent to saying that the eigenvalues of g under some (or any) faithful linear representation of Isom(X) have modulus 1. To begin with, we recall the following fact: Proposition 7.2 (subgroups of elliptics). Suppose X is a symmetric space of noncompact type and S ⊂ Isom(X) a finite set of isometries. Then the following are equivalent: (1) λ∞ (S) = 0, (2) L(S) = 0, Moreover in this case S fixes a point in X. Note the contrast with Euclidean spaces, where the analogous statement fails (see Section 9). This proposition, or at least some variant, is likely well-known, but lacking a reference we will include a proof for the reader’s convenience. Remark 7.3. Observe that L(S) = L(S ∪ S −1 ). So the conditions of the previous proposition are also equivalent to λ∞ (S ∪ S −1 ) = 0, which amounts to say that L(g) = 0 for every g in the subgroup generated by S. Remark 7.4. In Section 10 we will show that we cannot replace λ∞ (S) by λk (S) for some finite k independent of S in the above proposition. We now pass to the Berger-Wang identity. JOINT SPECTRAL RADIUS AND UNIFORM GROWTH 27 Theorem 7.5 (geometric Berger-Wang). Let X be a symmetric space of noncompact type. For every  > 0 there is k = k(X, ) ∈ N such that for every finite set S ⊂ Isom(X) one has: λk (S) ≥ (1 − )`(S) − . In particular the Berger-Wang identity holds, i.e. λ∞ (S) = `(S). We also relate the joint minimal displacement to the asymptotic minimal displacement and find the following general inequality: Proposition 7.6. Let X be a symmetric space of non-compact type viewed as a convex subspace of Pd := SLd (C)/ SUd (C), and let S ⊂ Isom(X) be a finite subset, then : √ 1 √ L(S) − log d ≤ `(S) ≤ L(S). (20) d Similarly using the Bochi inequality (see Proposition 7.11 below) we will show: Proposition 7.7. Let X be a symmetric space of non-compact type viewed as a convex subspace of Pd := SLd (C)/ SUd (C), and let S ⊂ Isom(X) be a finite subset, then : 1 λk0 (S) ≥ √ L(S) − C, d where C > 0 is a constant depending on d only and k0 ≤ d2 . Remark 7.8. Bochi’s original proof of his inequality (Proposition 7.11 below) gave a worse estimate on k0 (exponential in d). In [17, Cor. 4.6] we gave a different proof of Bochi’s inequality with the above d2 bound. Furthermore the dependence of C on d is not effective in Bochi’s proof from [13]. In [20] we make effective the argument from [17, Cor. 4.6] and give an explicit estimate on the constant. Remark 7.9. Since rank one symmetric spaces are Gromov hyperbolic the stronger inequality: λk0 (S) ≥ L(S) − C holds in these cases even with k0 = 2 according to Theorem 1.4. It is likely that a similar linear lower bound (with no multiplicative constant in front of L(S)) holds for general symmetric spaces as well (although not necessarily with k0 = 2). The best we could do in this direction however is the lower bound from Theorem 7.5. Before passing to the proofs of the above results, we would like to explain the connection with the well-studied notion of joint spectral radius of a finite set of matrices. Remark 7.10 (Connection with the joint spectral radius). Recall that if S ⊂ Md (C) is a finite set of matrices, then the joint spectral radius R(S) of S (in the sense of Rota and Strang [69]) is defined as 1/n R(S) = lim kS n k2 , n→+∞ where kQk2 := maxg∈Q kgk2 for Q ⊂ Md (C) and kgk2 is the operator norm of g acting on Hermitian Cd . As it turns out, when S ⊂ SLd (C), we can interpret R(S) as exp `(S) for a suitably defined left invariant distance on the homogeneous space Pd∞ := SLd (C)/ SUd (C). This distance is defined by: (21) d(gx0 , x0 ) = max{log ai } i 28 EMMANUEL BREUILLARD AND KOJI FUJIWARA where g = kak ∈ KAK, x0 is the point in Pd∞ fixed by the maximal compact subgroup K = SUd (C) and a = diag(a1 , . . . , ad ) ∈ A the subgroup of diagonal matrices with positive real entries. Note that even though Pd∞ and the symmetric space Pd discussed in Example 7.1 have the same underlying space SLd (C)/ SUd (C), the distance is not the same. Observe that as we have defined it: d(gx0 , x0 ) = log kgk2 , and hence we have: ∞ `Pd (S) = log R(S), ∞ where `Pd (S) is the `(S) defined in the introduction for the metric space X = Pd∞ . Similarly the largest modulus Λ(g) of an eigenvalue of g ∈ SLd (C) is the limit ∞ lim kg n k1/n , that is exp `Pd (g). Therefore we see that for a finite subset S in SLd (C) the Berger-Wang identity R(S) = lim sup max{Λ(g), g ∈ S n }1/n n→+∞ proved in [12] is simply the statement: P∞ ∞ `Pd (S) = λ∞d (S). Comparing (19) and (21) we see that all quantities pertaining to Pd are comparable to the corresponding quantities pertaining to Pd∞ . In particular √ ∞ ∞ `Pd (S) ≤ `Pd (S) ≤ d · `Pd (S). In [13] Bochi gave a different proof of the Berger-Wang identity, which gave much more, namely an eigenvalue lower bound in terms of R(S). He proved: Proposition 7.11. (Bochi inequality [13, Thm B.]) There are constants c = c(d) > 0 and k0 = k0 (d) ∈ N such that if S ⊂ Md (C) is a finite set of matrices, then c · R(S) ≤ max maxj Λ(g)1/j ≤ R(S). j≤k0 g∈S It is also known [13] that R(S) = inf kSk k·k where the infimum is taken over the operator norm associated to an arbitrary choice of (not necessarily hermitian) norm on the real vector space Cd . Since by√John’s ellipsoid theorem every two operator norms are equivalent up to a factor 2d, we have that √ R(S) ≤ inf kxSx−1 k2 ≤ 2d · R(S). x∈GLd (C) Combining this with (19) and (21) we obtain in particular the following inequalities between the joint minimal displacement, the joint asymptotic displacement and the joint spectral radius of a finite subset S of SLd (C) (22) log R(S) ≤ LPd (S) ≤ √ √ d log( 2dR(S)) and, replacing S by S n and passing to the limit: √ (23) log R(S) ≤ `Pd (S) ≤ d log(R(S)) We now turn to the proofs of the statements above. JOINT SPECTRAL RADIUS AND UNIFORM GROWTH 29 Proof of Proposition 7.2. That (2) implies (1) is clear by Lemma 3.6. For the implication (1) implies (2), we first reduce to the case when X = Pd is the symmetric space of Example 7.1. As described in this example, X embeds as totally geodesic subspace of Pd for some d and Isom(X) embeds in Isom(Pd ). Since Pd is CAT(0) and X is a closed convex subset, the nearest point projection πX from Pd to X is well-defined and it is a distance non-increasing map [24, Prop II.2.4]. Consequently for x ∈ Pd and S ⊂ Isom(X) we have L(S, πX (x)) = L(S, x). This means that, when S ⊂ Isom(X), all quantities L(S), `(S), λk (S) coincide when defined in X or in Pd . So now we assume as we may that X = Pd . Recall Burnside’s theorem (as in [3, 1.2] for example) : if G ≤ GLd (C) is an irreducible subgroup, then P there are finitely many g1 , ..., gd2 ∈ G and t1 , ..., td2 ∈ Md (C) such that x = tr(gi x)ti for every x ∈ Md (C). So if g has eigenvalues of modulus 1 for each g ∈ G, then G is contained in a bounded part of Md (C). Note that Burnside’s theorem holds just as well if G is a semi-group containing 1 in place of a subgroup: indeed the linear span in Md (C) of a semigroup in GLd (C) is invariant under the subgroup it generates so it must be all of Md (C) provided the subgroup acts irreducibly. We now show (1) implies (2) for Pd . For g ∈ Isom(Pd ) the condition L(g) = 0 is equivalent to the requirement that all eigenvalues of g have modulus 1. Taking a composition series for hSi, Burnside’s theorem implies that hSi is conjugate to a bloc upper-triangular subgroup of GLd (C), and bounded (i.e. relatively compact) in each bloc. Conjugating by an appropriate diagonal element, we can conjugate S into any neighborhood of the (compact) bloc diagonal part. This means that choosing y ∈ Pd we can make L(S, y) arbitrarily small. Therefore L(S) = 0 as desired.  Proof of Theorem 7.5. As in the proof of Proposition 7.2 we may assume that X is the symmetric space Pd of Example 7.1. For g ∈ SLd (C) with eigenvalues a1 , ..., ad ordered in such a way that |a1 | ≥ . . . ≥ |ad |, we set j(g) = (log |a1 |, . . . , log |ad |) and we observe that (24) `(g) = p (log |a1 |)2 + . . . + (log |ad |)2 = kj(g)k2 . If g = k1 ak2 , with k1 , k2 ∈ K = SUd (C) and a diagonal, then we set κ(g) = j(a) and note that kgk = kκ(g)k2 . We will use Bochi’s inequality in various irreducible representations of SLd (C). in the spirit of Kostant’s paper [56]. Recall that irreducible linear representations of SLd (C) are parametrized by a highest weight n := (n1 , . . . , nd ), where the ni ’s are integers satisfying n1 ≥ . . . ≥ nd ≥ 0. We denote the associated representation by (πn , Vn ). We may find a hermitian scalar product and an orthonormal basis of the representation space Vn of πn in which πn (K) is unitary and πn (a) diagonal for every diagonal a ∈ SLd (C). Then πn (a) has maximal eigenvalue equal to its operator norm and equal to hn, j(a)i := n1 log |a1 | + . . . + nd log |ad |. Furthermore: (25) log kπn (g)k = hn, κ(g)i, (26) log Λ(πn (g)) = hn, j(g)i. 30 EMMANUEL BREUILLARD AND KOJI FUJIWARA Fix  > 0. Note that there are finitely many integer vectors n1 , . . . , nm in the quadrant Q = {x ∈ Rd ; x1 ≥ . . . ≥ xd ≥ 0} such that for all x ∈ Q we have: ni (27) sup h , xi ≥ kxk(1 − ). 1≤i≤m kni k Indeed just pick rational points forming an -net near the unit sphere in Q. Let `n (S) be the asymptotic joint displacement of πn (S) with respect to uniform norm on Vn . Namely 1 `n (S) := lim max log kπn (g)k| k k g∈S k and similarly λn k (S) := max j≤k 1 max log Λ(πn (g)). j g∈S k Note that λn k (S) ≤ λk (S)knk (28) because log Λ(πn (g)) = hn, j(g)i ≤ kj(g)k2 knk = `(g)knk. Now using (27) we may write for each k ≥ 1 (29) (30) `(S) ≤ 1 1 1 ni max kκ(g)k ≤ max sup hκ(g), i k g∈S k k (1 − ) g∈S k 1≤i≤m kni k 1 1 1 ≤ sup max log kπni (g)k. (1 − ) 1≤i≤m kni k k g∈S k Passing to the limit as k tends to infinity we get: (31) `(S) ≤ 1 `ni (S) sup . (1 − ) 1≤i≤m kni k Then the Bochi inequality for the joint spectral radius (Proposition 7.11) implies that for each n there is an integer kn and a positive constant Cn such that for all S, `n (S) ≤ λn kn (S) + Cn . Setting K = max{kni , i = 1, . . . , m} and C = max{Cni /kni k; i = 1, . . . , m} we get from (31) and (28) i λn K (S) + C ≤ λK (S) + C. 1≤i≤m kni k (1 − )`(S) ≤ sup Finally we may choose the smallest integer n such that C/n <  and, changing S into S n , from Claim 7 equation (9) in the proof of Lemma 1.1 we obtain: (1 − )`(S) ≤ λKn (S) + .  Proof of Proposition 7.6. This is just the combination of (22) and (23) given that, as argued in the proof of Proposition 7.2 L(S) and `(S) defined in X coincide with their counterpart in Pd .  JOINT SPECTRAL RADIUS AND UNIFORM GROWTH 31 Proof of Proposition 7.7. This follows from Proposition 7.11 and (23) after we note that log Λ(g) ≤ `(g) for g ∈ SL(C). The bound k0 ≤ d2 follows from the different proof of Bochi’s inequality given in [17, Cor. 4.6].  We end this section by recording two consequences of the above analysis (compare with Corollary 5.10). Corollary 7.12 (Escaping elliptic elements in symmetric spaces). Let X be a symmetric space of non-compact type and  > 0, then there is N (dim X, ) > 0 such that for every finite subset S ⊂ Isom(X) with 1 ∈ S one of the following holds: (1) L(S) < , (2) there is g ∈ S N such that L(g) ≥ L(S). √ Proof. Since X is CAT (0), Theorem 3.6 shows that L(S n ) ≥ 2n L(S) for every √ √ integer n. In particular by Proposition 7.7, if L(S) ≥  and N  2 d(C/ + 1), then there is g ∈ S N such that L(g) ≥ L(S) as desired.  Recall that for every symmetric space X, there exists a positive constant  > 0, the Margulis constant of X, such that if S is a finite set of isometries of X generating a discrete subgroup of Isom(X) and if L(S) < , then the subgroup generated by S is virtually nilpotent (see [68], [26]). Hence we also get: Corollary 7.13. Let X be a symmetric space of non-compact type, then there is N > 0 such that for every finite subset S ⊂ Isom(X) containing 1 and generating a discrete subgroup, which is not virtually nilpotent, there is g ∈ S N such that L(g) ≥ L(S). Proof. Apply Corollary 7.12 with  being the Margulis constant of X.  Remark 7.14. The best N = N (, d) for which Corollary 7.12 holds tends to infinity as  goes to 0. For the same reason the constant C in Proposition 7.7 cannot be taken to be 0 even at the cost of decreasing the multiplicative constant in front of L(S). An example showing this in SL(2, R) is given below in Section 8. We can now give the Proof of Proposition 1.8. This follows from the combination of Proposition 7.6 and Lemma 1.7. We embed X as a closed convex subspace of the symmetric space Pd from Example 7.1 √ for some d. Let n be the smallest √ positive √ integer such √ that L(S) n/2 ≥ 2 d log d. If n = 1, then L(S) ≥ 4 d log d and thus the √ inequality in Proposition 7.6 yields `(S) ≥ 34 L(S)/ d. When n ≥ 2, Lemma 1.7 and Proposition 7.6 imply √ √ √ √ 1 n n n`(S) ≥ √ L(S n ) − log d ≥ √ L(S) − log d ≥ √ L(S) d 2 d 4 d √ On√the other hand if n ≥ 2, then the minimality of n implies that L(S) n ≤ √ 16 d log d and the result follows.  As shown in [17, Corollary 4.6] Proposition 7.11 also holds for Bruhat-Tits buildings. In fact it was observed and shown later in [18, Lemma 2.1] that in this case 32 EMMANUEL BREUILLARD AND KOJI FUJIWARA the constant c can be taken to be 1, that is the joint spectral radius is equal to the renormalized maximal eigenvalue, namely: R(S) = max maxj Λ(g)1/j , j≤k0 g∈S if S ⊂ Md (k) is a finite set of matrices and k a non-archimedean local field. The same argument as in the proof of Proposition 7.7 readily implies: Lemma 7.15 (Bochi inequality for Bruhat-Tits buildings). Let X be a Bruhat-Tits building associated to a non-archimedean local field k and a semisimple algebraic group G of dimension d. Then for every finite subset S ⊂ G(k) containing 1 there 2 is g ∈ S O(d ) such that √ L(g) ≥ L(S)/ d. Similarl the argument in the proof of Theorem 7.5 shows that `(S) = λ∞ (S) if S ⊂ G(k). An immediate consequence is also the following: Theorem 7.16 (Escaping elliptic elements in Bruhat-Tits buildings). Let X as in Theorem 7.15. There is N = N (d) ∈ N, such that for every finite subset S ⊂ G(k) containing 1 we have: (1) either L(S) = 0 and S fixes a point in X, (2) or L(S) > 0 and there is g ∈ S N such that L(g) ≥ L(S). Compare with Corollary 7.12 and note the absence of . This result can be seen as a quantitative version of the fact, proved in [66], that if a subgroup of G(k) is made entirely of elliptic elements, then it must fix a point in X. In particular we can always escape from elliptic elements in bounded time. By contrast, we will show in Section 10 that this property fails in certain symmetric spaces of non-compact type. Even though results such as Theorems 7.12 and 7.16 fail for general CAT (0) spaces (as they fail already for Euclidean spaces X = Rd ) it is worth investigating for which classes of CAT (0) spaces they hold. For example: Question: Does Theorem 7.16 hold for the isometry group of an arbitrary affine building ? does it hold for isometries of a finite dimensional CAT (0) cube complex ? We note that [52] answers this question positively for CAT (0) square complexes. 8. Almost elliptics in P SL2 (R) with large displacement The purpose of this section is to prove Lemma 1.12 from the introduction, which gives a simple example showing that Theorems 1.4 is best possible. More generally we will show: Proposition 8.1. Let X be a symmetric space of non-compact type. Then there is no N = N (X) > 0 such that for every finite set S ⊂ Isom(X) with 1 ∈ S = S −1 , there is g ∈ S N such that L(g) ≥ L(S). This shows that the additive term −Kδ is necessary (i.e. that we cannot take K = 0) in Theorem 1.4, and the N (d, ) must tend to infinity as  → 0 in Corollary 7.12. Note that this is in stark contrast to the non-archimedean case (see Theorem 7.16). JOINT SPECTRAL RADIUS AND UNIFORM GROWTH 33 The proof is based on the fact that zooming in near a point in the hyperbolic plane X = H2 , the metric becomes almost Euclidean, while on the Euclidean plane we can explicitely construct a set S with the desired properties. We begin by giving this construction: Example 8.2. Let R2 be the Euclidean plane. Subgroups of Isom(R2 ) which consist only of elliptic elements must have a global fixed point in R2 . Indeed the commutator of two non trivial rotations with different fixed points is a non-trivial translation. However the following is an example showing that we may have L(S) = 1, while no translation with significant translation length can be found in S N for any fixed N. Take small numbers x1 , x2 > 0 and set θi ∈ (0, π) so that 2 sin(θi /2) = xi . θ2 θ1 and 2π are Q-linearly Assume that θ1 and θ2 are independent (i.e. that 1, 2π ±1 ±1 independent). Let S := {1, R1 , R2 }, where R1 is the rotation around the point −1 p1 := (−x−1 1 , 0) and angle θ1 , and R2 the rotation around the point p2 := (x2 , 0) and angle θ2 . Note that due to the independence assumption on θ1 and θ2 the linear parts of R1 and R2 generate a subgroup of SO(2, R) which is free abelian of rank 2. Consequently any word in R1 and R2 which gives a translation in Isom(R2 ) must belong to the commutator subgroup of the free group. Moreover L(S) = 1 because F ix1 (R1 ) = {p; |R1 p − p| ≤ 1} and F ix2 (R2 ) = {p; |R2 p − p| ≤ 1} are the discs with radius x−1 and x−1 respectively centered 1 2 around p1 and p2 respectively. They intersect at (0, 0). However, any word w = w(R1 , R2 ) in R1 and R2 which is a translation in Isom(R2 ) belongs to the commutator subgroup of the free group, and hence the powers of R1 in this word sum up to 0 and so do the powers of R2 . As a result, for every  > 0 and every given N ∈ N, one can choose small but positive x1 and x2 so that any such w of length at most N maps the origin (0, 0) at a distance at most  from itself. Hence L(w) ≤  while L(S) = 1. Proof of Proposition 8.1. It is enough to prove this in the case when X = H2 is the hyperbolic plane, because H2 always embeds as a closed convex subspace of X stabilized by a copy of P SL(2, R) in Isom(X). Suppose, by way of contradiction, that there is N ∈ N such that maxS N L(g) ≥ L(S) for every finite subset S ⊂ Isom(H2 ) containing 1. Let x1 , x2 be two small positive numbers to be determined later. On the hyperbolic plane X = H2 consider a base point x0 and a geodesic through x0 . For every  > 0 let p1 () and p2 () be points on this geodesic on opposite sides of the base point x0 such that d(x0 , pi ()) = x−1 i . Let Ri () be the hyperbolic rotation fixing pi () and of angle θi () ∈ (0, π) defined in such a way that d(Ri ()x0 , x0 ) = . Also note that the sets {x ∈ H2 ; d(Ri ()x, x) ≤ } are two hyperbolic disc centered at pi () that intersect only at the base point x0 . It follows that (32) L(S ) = L(S , x0 ) = . Consider the renormalized pointed metric space (X , d , x0 ) := (X, d/, x0 ). In the Gromov-Hausdorff topology for pointed metric spaces, this family of metric spaces converges, as  tends to 0, to the Euclidean plane (R2 , 0) with its standard Euclidean metric. The points p1 () and p2 () converge to two points p1 and p2 , which, after choosing coordinates, can be assumed to be (−x−1 1 , 0) and 34 EMMANUEL BREUILLARD AND KOJI FUJIWARA (x−1 2 , 0). Moreover the hyperbolic rotations Ri () converge to their Euclidean counterpart Ri based at pi with angle θi defined by ||Ri (0, 0)|| = 1, i.e. x−1 = i 2 sin(θi /2) as in Example 8.2. Consequently any word of length at most N in S := {1, R1 ()±1 , R2 ()±1 } converges to the isometry of R2 given by the same word with letters R1 and R2 . In particular: lim w(R1 (), R2 ())x0 = w(R1 (), R2 ())(0, 0), →0 and 1 lim L(w(R1 (), R2 ()), x0 ) = L(w(R1 , R2 ), (0, 0)),  (33) →0 where L(g, x) is the displacement of g at x in H2 . Now by our assumption for each  there is a word w = w of length at most N such that L(w(R1 (), R2 ()) ≥ L(S ) = . (34) There are boundedy many words of length at most N , so letting  tend to 0 along a certain sequence only we may assume that w is independent of . Then there are two options according as w(R1 , R2 ) is a translation or a rotation. Suppose first that w is a translation. We have: 1 1 L(w(R1 (), R2 (), x0 ) ≥ L(w(R1 (), R2 ())) ≥ 1,   while by (33) the left handside converges (as  goes to zero along the subsequence) to L(w(R1 , R2 ), (0, 0)). However, w(R1 , R2 ) being a translation means that the word w belongs to the commutator of the free group and the powers of R1 sum to 0 as do the powers of R2 (due to the independence of θ1 and θ2 as in Example 8.2). This implies that L(w(R1 , R2 ), (0, 0)) < 1/100 provided x1 and x2 are chosen larger than some absolute constant. This is a contradiction. We are left with the case when w(R1 , R2 ) is a rotation, with center say c ∈ R2 . Since (X, d/, x0 ) Gromov-Hausdorff converges to Euclidean R2 , there must be some point c() ∈ H2 which converges to c. This also means that 1 lim d(w(R1 (), R2 ())c(), c()) = d(w(R1 , R2 )c, c) = 0.  →0 In particular: L(w(R1 (), R2 ()) = o(), which is in contradiction with (34). This ends the proof.  9. Euclidean spaces and linear escape of cocycles In this section we assume that the metric space X is the Euclidean space Rd . We will prove the results stated in Section 3 regarding isometric actions on Rd . In particular we will show an example of a finitely generated group of Isom(Rd ) without global fixed point all of whose elements are elliptic. And we will show that every affine isometric action on Rd without global fixed point as positive drift, i.e. that cocycles that are not co-boundaries have linear rate of escape. We begin with the former. JOINT SPECTRAL RADIUS AND UNIFORM GROWTH 35 Example 9.1 (A subgroup of rotations without global fixed point). This is an example of a subgroup of Isom(R2n ) for each n ≥ 2 without global fixed point in R2n all of whose elements are elliptic. A similar example for n = 2 for isometries of R4 ' C2 with linear part in SU2 (C) is due to Bass, answering a question of Kaplansky ([3, counterexample 1.10]). Consider S = {1, A±1 , B ±1 }, where A and B are two rotations fixing different fixed points pA 6= pB . We may choose the linear parts RA and RB in O(2n) of A and B in such a way that the group they generate is a free group which does not have 1 as an eigenvalue. This fact follows easily from Borel’s theorem on the dominance of words maps [15, 59] in simple algebraic groups (here SO(2n)) and from the fact that in even dimension a generic rotation does not have 1 as an eigenvalue. To see this consider that, due to the dominance of word maps, the preimage in SO(2n) × SO(2n) of the elements having 1 as an eigenvalue via any word map is an algebraic subvariety of positive co-dimension, hence has empty interior. By Baire’s theorem a Baire generic pair will lie outside the union of these subvarieties when the word ranges over all reduced words on two letters in the free group. A consequence of this property is that every element in the subgroup Γ of Isom(R2n ) generated by A and B is elliptic (i.e. fixes a point in R2n ). Indeed, since RA and RB generate a free subgroup, every non trivial element of Γ has a non trivial linear part and this linear part does not have 1 as an eigenvalue. But such isometries must fix a point. So L(g) = 0 for every g ∈ Γ, while clearly L(S) ≥ 12 |pA − pB | min |θ|, where the minimum is taken over the angles θ of RA and RB (i.e the numbers in [0, π] such that exp(±iθ) are the eigenvalues of RA and RB ). This example is to be contrasted with Proposition 3.2, which we restate here: Proposition 9.2. A subgroup G of Isom(Rd ) with d = 2, 3 all of whose elements have a fixed point must have a global fixed point. Proof. Let G0 be the index two subgoup of orientation preserving isometries. When d = 2, the commutator subgroup [G0 , G0 ] is made of translations. Hence G0 is abelian. Two commuting isometries must preserve the fixed point set of each other. It follows that G0 is either trivial or has a unique global fixed point, which must then be fixed by G (since G0 is normal in G). When d = 3 generic orientation preserving isometries are skew translations and do not have fixed points, in fact isometries with a fixed point form a closed subset of empty interior. In particular the closure H of G0 is a proper closed subgroup of Isom(R3 )0 . Say SO(3, R) denotes the stabilizer of the origin in R3 . If the linear part of H is not all of SO(3, R) it must either be finite or conjugate to SO(2, R). In the latter case all elements in H have parallel axes and H must preserve an affine plane (the orthogonal to the axes) and be either trivial or have a unique global fixed point by the d = 2 case ; in this case G fixes this point. If the linear part of H is finite, then every element of H has bounded order forcing G0 itself (and hence G) to be finite (Burnside) and hence to have a global fixed point. Finally if the linear part of H is all of SO(3, R), then H must be conjugate to SO(3, R) (and hence have the origin as its unique global fixed point, which must then be fixed by all of G). To see this note first the following simple geometric fact: if g, h are two rotations of angle π with disjoint axis, then gh is a skew rotation with axis the common perpendicular to the axes of g and h and translation length twice the 36 EMMANUEL BREUILLARD AND KOJI FUJIWARA distance between the axes. Now pick h ∈ H a rotation of angle π and axis ∆. If g∆ intersects ∆ for all g ∈ H, then any two lines of the form g∆, g ∈ H, intersect. This means either that the H-orbit of ∆ is made of all lines through a single point (and then this point is the unique global fixed point), or that it lies in an affine plane (the one spanned by any two of the lines) and that H preserves that plane, a fact not compatible with the assumption that its linear part is all of SO(3, R).  Now we show that non trivial cocycles have linear rate of escape. Proposition 9.3. For any d ≥ 2 and S ⊂ Isom(Rd ) a finite set, then `(S) = 0 if and only if S has a global fixed point in Rd . Proof. First we give a proof of the easier fact that L(S) = 0 implies the existence of a global fixed point. Indeed note that the fixed point set F ix(s) of an isometry s of Rd is an affine subspace and, when F ix(s) is non-empty, the sublevel sets F ixt (s) = {x ∈ Rd ; d(x, sx) ≤ t} are convex subsets of Rd that are products of F ix(s) by the unit ball for a positive definite quadratic form on the orthogonal of F ix(s). In particular there is cs > 0 such that F ixt (s) ⊂ (F ix(s))cs t for all t > 0. Similarly the intersection of all (F ix(s))t for s varying in S and all t > 0 coincides with the intersection of all F ix(s), s ∈ S (note that for any two affine subspaces there is c > 0 such that the intersection of their t-neighorhoods is contained in the ct-neighborhood of their intersection). So we obtain that S has a global fixed point. Now we will show the slighty more delicate fact that the absence of global fixed point implies `(S) > 0. To do this we will first assume that Γ is dense in a Lie subgroup of the form R n V , where R is a closed Lie subgroup of O(V ) and V ≤ Rd is a non-zero vector subspace. Afterwards we will reduce to this case. For  > 0 consider a finite covering of the unit sphere in V by Euclidean balls of radius . In each ball pick an element γ ∈ Γ whose translation part tγ belongs to this ball and whose rotation part rγ belongs to the ball of radius  around the identity in R, i.e. krγ − 1k ≤  for the operator norm on endomorphisms of V . This gives us a finite list γ1 , ..., γN of elements of Γ. They all belong to S k for some integer k. Now we make the following observation. If x ∈ V \ {0} and g = (rg , tg ) ∈ Isom(V ), then kgxk2 = krg x + tg k2 = kxk2 + ktg k2 + 2hrg x, tg i. In particular: 1 kgxk2 ≥ kxk2 + ktg k2 + 2hrg x, tg i ≥ (kxk + )2 2 r x provided 12 ≤ ktg k and h krgg xk , tg i ≥ 12 . Now if tg lies in the same -ball as x/kxk and krg − 1k ≤ , then these conditions are satisfied, provided  is small enough ( = 1/10 does it). So we have shown that given any x ∈ V \ {0}, there is one γi ∈ S k such that 1 kγi xk ≥ kxk + . 2 Starting with any point x0 ∈ V \ {0} this immediately implies that for all n ≥ 1, n L(S nk , x0 ) ≥ , 2 and thus `(S) ≥ 1/2k > 0 as desired. JOINT SPECTRAL RADIUS AND UNIFORM GROWTH 37 We now explain how to reduce to the above special case. Let H be the closure of Γ in Isom(Rd ). The Lie subgroup H has the form R n (∆ ⊕ V ), there V ≤ Rd is a vector subspace and ∆ is a discrete subgroup of Rd contained in the orthogonal of V . The isometric H-action on ∆ ⊕ V factorizes modulo ∆ to an isometric H-action on V . It is enough to show that `(S) > 0 in the quotient action. The quotient action contains all translations from V . So by the analysis above it is enough to know that V is non-zero. Note that, since ∆ is discrete and invariant under conjugation by R, there is a finite index subgroup of R commuting with ∆. So if V were trivial, there is a finite index subgroup Γ0 of Γ such that any element g in this finite index subgroup will satisfy tgn = ntg . It follows that `(S) > 0 unless Γ0 lies in R. But then Γ0 (and hence Γ taking the barycenter of a finite orbit) has a global fixed point.  10. Escaping elliptic isometries of symmetric spaces The goal of this section is mainly to provide certain counter-examples showing that in general one cannot escape elliptic elements in bounded time when taking products of isometries of symmetric spaces. In this section we say that an element g ∈ Isom(X) is a generalized elliptic element if `(g) = 0. Since here X will be CAT(0), this is equivalent to the condition L(g) = 0 by Proposition 3.1. For symmetric spaces of non-compact type, this condition is equivalent to requiring that all eigenvalues of g (under some or any faithful linear representation of Isom(X)) have modulus one. We recalled in Proposition 7.2 the well-known fact that any subgroup of isometries of a symmetric space X of non-compact type, which is made exclusively of generalized elliptic elements, must fix a point in X or its boundary. So if G is a subgroup of Isom(X) generated by a finite set S we have L(S) = 0 if and only if L(g) = 0 for all g ∈ G. And if this happens then G fixes a point either in X or on the visual boundary ∂X (see Proposition 3.13). The following natural question then arises: Question: Do we always escape from elliptics (or generalized elliptics) in bounded time ? namely does there exist N = N (X) ∈ N such that for every finite symmetric set S ⊂ Isom(X) containing 1, either L(S) = 0 or there is g ∈ S N such that L(g) > 0 ? This section is devoted to answering this question. The answer, for hyperbolic spaces, is a little surprising: Proposition 10.1. The above question has a positive answer if X is an n-dimensional hyperbolic Hn , when n = 2, 3, but a negative answer when n ≥ 4. So if X is hyperbolic n-space with n ≥ 4, then there are subgroups of isometries that pretend to be elliptic on a ball of arbitrarily large radius, even though they have no global fixed point in X nor on its boundary (and we will even build Zariskidense examples when n is even). Further below we will also answer the question completely for arbitrary symmetric spaces of non-compact type. Similarly a subgroup of isometries of the Euclidean plane or 3-space, all of whose elements are rotations, must have a global fixed point (Proposition 3.2 above). But this is no longer the case in Rn for n ≥ 4 by Example 9.1. So the dimension threshold is the same as for hyperbolic spaces. 38 EMMANUEL BREUILLARD AND KOJI FUJIWARA Note that Example 9.1 can of course be embedded in a symmetric space X (e.g. by viewing Isom(R2n ) as a bloc upper triangular subgroup of SL2n+1 (R)). This group will be made of elliptic elements only. Even though it will not fix a point in the symmetric space X, it will fix a point on the boundary (see Corollary 3.13). In particular L(S) = 0 in this example (even though L(S) and `(S) are strictly positive, when the group is viewed as a subgroup of isometries of Euclidean space). In the case of SL2 (C) a simple matrix computation yields the following avatar of Serre’s lemma (Lemma 4.1): Proposition 10.2. Let a, b ∈ SL2 (C). Assume that a, b and ab have all their eigenvalues of modulus 1. Then one of the following holds: (1) a and b can be simultaneously conjugated into SU2 (C), (2) a and b can be simultaneously conjugated into the subgroup of upper triangular matrices with eigenvalues of modulus 1, (3) [a, b] := aba−1 b−1 is loxodromic (i.e. its eigenvalues have modulus 6= 1). Since PSL2 (R) = Isom(H2 )0 and PSL2 (C) = Isom(H3 )0 the first part of Proposition 10.1 follows easily. Proof. We first recall the following well-known fact: Claim: For any a, b ∈ SL2 (C) write x = 21 tr(a), y = 1 2 tr(b), z = 1 2 tr(ab). Then 1 tr([a, b]) = 2(x2 + y 2 + z 2 ) − 4xyz − 1. 2 The proof is omitted: it is a simple computation using Cayley-Hamilton. One writes a2 − 2xa + 1 = 0 and similarly for b2 and (ab)2 in order to expand any word in a and b as a linear combination of a, b, ab, aba and bab, then one takes the trace. Note that a matrix u ∈ SL2 (C) has eigenvalues of modulus 1 if and only if tr(u) is real and belongs to [−2, 2]. Suppose first that neither a nor b is diagonalizable. Then after changing a and b into their opposite if necessary, we may assume that both a and b are unipotent, hence have trace 2, that is x = y = 1. Then 21 tr[a, b] = 2z 2 − 4z + 3. This achieves its minimum at z = 1 only and the minimum is 1. This means that [a, b] is loxodromic unless z = 1. In some basis the matrices of a and b read:     1 t α β a= and b = . 0 1 γ δ We may assume that t 6= 0. We compute easily tr(ab) = tr(b) + tγ. Hence if [a, b] is not loxodromic, we conclude that tγ = 0. It follows that γ = 0, which is case (2) in the proposition. We may thus assume that a is diagonalizable, and a ∈ / {±1}. In some basis the matrices of a and b now read:     iθ e 0 α β a= and b = γ δ 0 e−iθ with cos(2θ) 6= 1. Then we compute: 1 tr[a, b] = cos(2θ) + αδ(1 − cos(2θ)). 2 If [a, b] is not loxodromic, then tr[a, b] is real in [−2, 2]. Consequently αδ ∈ R. Since α + δ = tr(b) is real, we conclude that α and δ are complex conjugates and JOINT SPECTRAL RADIUS AND UNIFORM GROWTH 39 αδ = |α|2 . Since tr[a, b] ≤ 2, the above formula forces |α| ≤ 1. If |α| = 1, then αδ = 1 and thus βδ = 0, which means that we are in case (2) of the proposition. We may thus assume that |α| < 1 and also that βδ 6= 0. Up to conjugating simultaneously a and b by a diagonal matrix diag(t, t−1 ), for a suitable real t > 0, we may assume that γ = −β. Indeed: t−2 γ = −t2 β ⇔ t4 = −γ/β = (1 − |α|2 )/|β|2 . But now δ = α and γ = −β. This means that b ∈ SU2 (C). So we are in case (1) of the proposition. This ends the proof.  To prove the second part of Proposition 10.1, we need to construct a counterexample in Isom(H4 ). Example 10.3 (No escape in hyperbolic 4-space). Let A, B be the two rotations in SO(4) constructed in Example 9.1. They generate a free subgroup of SO(4) whose non trivial elements do not have 1 as an eigenvalue. Now observe that the union of all conjugates of SO(4) inside SO(4, 1) has non-empty interior. One way to see this is to argue that this set is definable in real algebraic geometry and has the same dimension as SO(4, 1) itself, because the absolute (complex) ranks of SO(4) and of SO(4, 1) coincide (they are equal to 2). Moreover an element of SO(4) lies in the interior if and only if 1 is not one of its eigenvalues. This implies that for every integer N ≥ 1 there are neighborhoods UN (A) and UN (B) in SO(4, 1) of A and B respectively such that w(a, b) lies in the interior of elliptic elements for every non trivial reduced word w of length at most N in the free group on two letters, and every choice of a in UN (A) and b in UN (B). But we may choose such a pair a, b so that it generates a Zariski-dense subgroup of SO(4, 1). Indeed the set of pairs generating a non-Zariski dense subgroup of a semisimple algebraic group is a proper closed subvariety of the product ([48, Thm 3.3] or [22, Thm 4.1]). A Zariski-dense subgroup cannot be bounded, for otherwise it would be contained in a conjugate of the maximal compact subgroup SO(4). So by Proposition 7.2 it must contain a non-elliptic element. Remark 10.4 (real closed fields). This counter-example shows that Proposition 7.2 is very special to the field of real numbers. It does not hold for a general real closed field, or say for an ultrapower K of the reals. Over such fields K the example yields a Zariski-dense subgroup of SO(4, 1)(K) all of whose elements are contained in some conjugate of SO(4)(K). The above counter-example can be made to work (with the exact same proof) in any symmetric space X for which the elliptic elements of Isom(X)0 have nonempty interior. Namely for each N ∈ N one can find pairs generating a Zariski-dense subgroup with the entire N -ball of the Cayley graph contained in the set of elliptic elements. Elliptic elements have non-empty interior if and only if the fundamental rank rkC G − rkC K vanishes, where G = Isom(X)0 and K is a maximal compact subgroup of G (by [65, Example 3] this condition is equivalent to the vanishing of the Euler characteristic of the compact dual of X). For example if X = Hn this happens if and only if n is even. On the other hand, if X is such that elliptic elements have empty interior in Isom(X)0 , then it is always possible to escape them, and in fact escape the set of generalized elliptic elements, in bounded time, because they are contained in a proper algebraic subvariety of Isom(X)0 . 40 EMMANUEL BREUILLARD AND KOJI FUJIWARA Proposition 10.5 (general symmetric spaces). Let X = G/K be a symmetric space of non-compact type and G = Isom(X)0 . If rkC G > rkC K, then there is N = N (X) ∈ N such that for every finite set S ⊂ G generating a Zariski-dense subgroup of G, S N contains an element g with an eigenvalue of modulus different from 1. Proof. An element g ∈ G is generalized elliptic (i.e. `(g) = 0) if and only if all its eigenvalues under some or any faithful linear representation of G have modulus 1. This can be read off the characteristic polynomial of g by asking that its real irreducible factors are either X ± 1 or X 2 + 2bX + 1, where b ∈ [−1, 1]. Therefore generalized elliptic elements form a definable set in real algebraic geometry [14] whose Zariski-closure is a subvariety of positive co-dimension in G. Then the lemma follows by “escape from subvarieties” (see [38] [21, Lemma 3.11]).  11. Producing free semi-groups by Ping-Pong We prove a proposition concerning free semi-groups in δ-hyperbolic geometry. A hyperbolic isometry g of a δ-hyperbolic space X has two fixed points, which are in the ideal boundary of X. We denote the fixed point set by F ix(g). Proposition 11.1. For δ ≥ 0, there is an absolute (numerical) constant ∆ with the following property. Let X be a δ-hyperbolic space, and g, h isometries of X. Suppose L(g), L(h) > ∆δ. (Then g, h are hyperbolic isometries.) Assume F ix(g) 6= F ix(h). Then the pair {g, h}, maybe after taking inverses of one or both of those, generates a free semi-group. This proposition appears as Proposition 7.1 in [6] when X is an Hadamard manifold of K ≤ −1. The case when X is a simplicial tree was treated by Bucher and de la Harpe in [25, Lemma]. In that case, δ = 0. We give a proof of Proposition 11.1 since we do not know a reference in this context. It is not optimal, but ∆ ≤ 10000. We follow the strategy in [25] and use the following well-known Ping-Pong lemma. Finding suitable sets A, B in the δ-hyperbolic setting is more complicated than the tree case. Lemma 11.2. Let X be a set and g, h injective maps from X to X. Suppose there are non-empty subsets A, B in X such that A ∩ B = ∅, g(A ∪ B) ⊂ A, h(A ∪ B) ⊂ B. Then g, h generate a free semi-group. We will use axes of g, h to define A, B. We believe the following result is well known to specialists, but do not know a reference exactly for this statement, so we will give an argument at the end of this section. Lemma 11.3. If g is an isometry of a δ-hyperbolic space X with L(g) > 1000δ, then there is a g-invariant, piecewise-geodesic, γ, parametrized by the arc-length, such that 9 , 24δ)-quasi-geodesic. (1) γ is a ( 10 (2) For any points x, y ∈ γ, the Hausdorff distance between a geodesic [x, y] and the sub-path of γ from x to y is at most 12δ. We call this quasi-geodesic γ an axis of g in this section. The fixed point set F ix(g) consists of the two end-points of γ, which are γ(±∞) = limt→±∞ γ(t), respectively for + and −. JOINT SPECTRAL RADIUS AND UNIFORM GROWTH 41 Let πγ : X → γ be the nearest points projection. This is a coarse map in the sense that the image of each point is not a point but a set in X, but it is uniformly bounded: for every x ∈ X, diam πγ (x) ≤ 30δ. Proof. If δ = 0 then X is a tree and the conclusion holds, so that we assume δ > 0. Let M (δ) = 12δ be the constant in Lemma 11.3. Let x ∈ X and y, z ∈ πγ (x). We show |y − z| ≤ 2M + 6δ = 30δ. Assume not. Let w be the midpoint of [y, z], and take v on [x, y] (or on [x, z]) with |w − v| ≤ δ. Also take w0 ∈ γ with |w−w0 | ≤ M . Then |w0 −v| ≤ M +δ. On the other hand, |y−v| ≥ M +3δ−δ, so that |x−v| ≤ |x−y|−M −2δ. We then have |x−w0 | ≤ |x−v|+|v−w0 | ≤ |x−y|−δ < |x−y|, so that y ∈ γ is not a nearest point from x (w0 ∈ γ is closer), a contradiction.  Since γ is g-invariant, the map πγ is g-equivariant: gπγ (x) = πγ (gx). For convenience, we choose a point from the set πγ (x) and denote this point by πγ (x). We arrange πγ in this new definition to be g-equivariant. Proof of Proposition 11.1. We set ∆ = 10000. We also assume δ > 0 since if δ = 0 then X is a tree and this case is essentially treated in [25]. We will define subsets A, B in X that satisfies the assumption of Lemma 11.2 for g, h, or maybe one or both of their inverses. Then we are done by the lemma. Let γ, σ be axes of g, h from Lemma 11.3. We arrange the direction (to which the parameter increases) of γ, σ as follows. If F ix(g) ∩ F ix(h) is non-empty (then it consists of one point by our assumption), then we arrange γ(−∞) = σ(−∞). Notice that this case is equivalent to the projection πγ (σ) being unbounded. Now, if πγ (σ) is bounded but its diameter is longer than 500δ, then it means that near πγ (σ), σ runs parallel to γ in a bounded (≤ 30δ) neighborhood of σ (use Lemma 11.3 (2)), so that we arrange the directions of γ, σ coincide in this part. Otherwise, we put directions randomly. In any case, γ(∞) 6= σ(∞). Since g, h are hyperbolic, there are L 6= 0 with g(γ(t)) = γ(t + L) for all t, and K 6= 0 with h(σ(t)) = σ(t + K) for all t. Changing g or h or both to their inverses if necessary, we may assume that L > 0, K > 0. We will prove the proposition for the pair g, h. We choose two base points P ∈ γ, Q ∈ σ in the following way. Case (a). If the distance between γ, σ is more than 100δ, then choose a shortest geodesic τ between them, and set P = τ ∩ γ, Q = τ ∩ σ. Case (b). If the distance between γ, σ is at most 100δ, then let P be the last point (in terms of the parameter t) in γ that is contained in (σ)100δ , which denotes the 100δ-neighborhood of σ. Likewise, let Q be the last point in σ that is contained in (γ)100δ . Note that |P − πσ (P )| = |Q − πγ (Q)| = 100δ. In either case, by adding constants to parameters, we may assume P = γ(0), Q = σ(0). Now we define two subsets in X. Set 1 A = {x ∈ X|πγ (x) ∈ γ([ min(L(g), L(h)), ∞))} 2 1 B = {x ∈ X|πσ (x) ∈ σ([ min(L(g), L(h)), ∞))} 2 We want to show the following. Then we are done by Lemma 11.2. (35) A ∩ B = ∅, g(A ∪ B) ⊂ A, h(A ∪ B) ⊂ B. 42 EMMANUEL BREUILLARD AND KOJI FUJIWARA For two points x, y ∈ X, we write x ∼ y if |x − y| ≤ 1000δ. We first show: (I) πσ (P ) ∼ Q. πγ (Q) ∼ P . (II) If x ∈ B then πγ (x) ∼ P . If x ∈ A then πσ (x) ∼ Q. We use the following lemma on the nearest points projection in a δ-hyperbolic space to prove (I) and (II). If α is a geodesic, then the lemma is well-known. We do not know a reference for our setting, so we give an argument at the end of the section. We denote the Hausdorff distance between two sets Y, Z in X by dH (Y, Z). A geodesic between two points x, y ∈ X is denoted by [x, y]. Lemma 11.4. (1) Let α be an axis from Lemma 11.3, x ∈ X, and w ∈ α. Let z = πα (x). Then dH ([x, z] ∪ [z, w], [x, w]) ≤ 16δ. Moreover, suppose y ∈ X with w = πα (y). If |z − w| ≥ 40δ, then dH ([x, z] ∪ [z, w] ∪ [w, y], [x, y]) ≤ 18δ. (2) If |x − y| ≤ D, then |πα (x) − πα (y)| ≤ D + 36δ. We start the proof of (I) and (II). Note that if x ∈ A, then |πγ (x) − P | ≥ − 24δ = 4476δ since L(g), L(h) ≥ 10000δ and γ is an axis of g. Similarly, if x ∈ B, then |πσ (x) − Q| ≥ 4476δ. First, we discuss the case (a) in terms of P, Q, ie, |P − Q| > 100δ. Then (I) is trivial since (we can arrange that) πσ (P ) = Q and πγ (Q) = P . For (II), we show that if x ∈ B then πγ (x) ∼ P . Set y = πσ (x) and z = πγ (x). We want to show |z −P | ≤ 1000δ. Since Q = πσ (P ), y = πσ (x) and |Q−y| ≥ 4476δ, we have dH ([x, y] ∪ [y, Q] ∪ [Q, P ], [x, P ]) ≤ 18δ by Lemma 11.4. Also dH ([x, z] ∪ [z, P ], [x, P ]) ≤ 16δ since z = πγ (x). So, dH ([x, y] ∪ [y, Q] ∪ [Q, P ], [x, z] ∪ [z, P ]) ≤ 34δ. To argue by contradiction, assume |P − z| > 1000δ. Let R ∈ [P, Q] be the point with |P − R| = 100δ. Then there is R0 ∈ [P, z] with |R − R0 | ≤ 34δ. Then there is R00 ∈ γ with |R0 − R00 | ≤ 12δ, so that |R − R00 | ≤ 46δ < |R − P |. But then |R00 − Q| ≤ |Q − R| + |R − R00 | < |Q − R| + |R − P | = |Q − P |. This is a contradiction since P must be the nearest point on γ from Q (but we found R00 is closer). We are done for the first claim of (II). The second one is similar (just switch the roles), and we do not repeat. Case (a) is finished. Suppose we are in case (b). For two points x, y ∈ γ, we write x ≤ y if x = y, or y appears after x in terms of the parameter t. We write x < y if x ≤ y and x 6= y. We use the similar notation for points on σ. We argue (I). By the way we chose P, Q, we have πσ (P ) ≤ Q and πγ (Q) ≤ P . By Lemma 11.4, dH ([Q, πσ (P )] ∪ [πσ (P ), P ], [Q, P ]) ≤ 16δ and dH ([Q, πγ (Q)] ∪ [πγ (Q), P ], [Q, P ]) ≤ 16δ. So, dH ([Q, πσ (P )] ∪ [πσ (P ), P ], [Q, πγ (Q)] ∪ [πγ (Q), P ]) ≤ 32δ. To argue by contradiction, suppose |πσ (P ) − Q| > 1000δ. Then since |Q − πγ (Q)| = 100δ and |P − πσ (P )| = 100δ, we have |πγ (Q) − P | > 800δ. But this forces that the orientations of γ and σ are opposite along the geodesic [πγ (Q), P ] (draw a thin rectangle for πγ (Q), Q, πσ (P ), P ), which is a contradiction. We showed |πσ (P ) − Q| ≤ 1000δ. The other inequality is proved similarly. (I) is shown. We argue (II). As before we only discuss the first one. Set y = πσ (x) and z = πγ (x). We want to show |P − z| ≤ 1000δ. Since πσ (P ) ≤ Q, we have |y − πσ (P )| ≥ 4476δ. So, dH ([P, πσ (P )] ∪ [πσ (P ), y] ∪ [y, x], [P, x]) ≤ 18δ. Also, dH ([P, z] ∪ [z, x], [P, x]) ≤ 16δ. Hence, dH ([P, z] ∪ [z, x], [P, πσ (P )] ∪ [πσ (P ), y] ∪ [y, x]) ≤ 34δ. Now, to argue by contradiction, assume |P − z| > 1000δ. Let R ∈ [P, z] be the point with |P − R| = 500δ. Pick a point R0 ∈ γ with P < R0 < z and |R−R0 | ≤ 12δ by Lemma 11.3. Also, pick a point R00 ∈ [P, πσ (P )]∪[πσ (P ), y]∪[y, x] 9 10 5000δ JOINT SPECTRAL RADIUS AND UNIFORM GROWTH 43 with |R − R00 | ≤ 34δ. Notice that in fact R00 ∈ [πσ (P ), y] since |P − πσ (P )| = 100δ. Then pick a point R000 ∈ σ with |R00 − R000 | ≤ 12δ. But this implies |R000 − R0 | ≤ (12 + 34 + 12)δ = 58δ, so that R0 ∈ (σ)100δ . This is a contradiction since P < R0 on γ (P must be the last such point). (II) is shown. We finished the proof of (I) and (II). We now show (35) using (I) and (II). Clearly both A and B are not empty. To see A ∩ B is empty, take any point x ∈ B. Then by (II), πγ (x) ∼ P , ie, |πγ (x) − P | ≤ 1000δ. But if x ∈ A then as we said |πγ (x) − P | ≥ 4476δ, so x 6∈ A, hence we are done. g(A) ⊂ A is immediate from the g-equivariance of πγ . To see g(B) ⊂ A, let x ∈ B. Since πγ (x) ∼ P we have g(πγ (x)) ∼ g(P ). Also g(P ) ∈ γ ∩ A 9 10000δ − 24δ = 8976δ, hence |P − g(πγ (x))| ≥ 7976δ. This implies |P − g(P )| ≥ 10 implies g(πγ (x)) ∈ γ ∩ A. But since g(πγ (x)) = πγ (g(x)), it follows g(x) ∈ A from the definition of A. We showed g(B) ⊂ A, hence g(A ∪ B) ⊂ A. h(A ∪ B) ⊂ B is similar (switch the roles) and we do not repeat. (35) is proved.  We give a proof of Lemma 11.3. A similar statement appears as Lemma 1 in [42], in which we only assume g is hyperbolic, with no large lower bound of L(g), and find a g-invariant piecewise geodesic that satisfies (2) with a constant bigger than 12δ. One can not expect (1) holds in that case. Proof. If δ = 0, then X is a tree and there is a g-invariant geodesic, γ. This is a desired path, so we assume δ > 0 in the rest. If we take any point x ∈ X and join its g-orbit in the obvious order by geodesics, we obtain a g-invariant, piecewise geodesic. This path is always a quasi-geodesic but we do not have uniform bounds on the quasi-geodesic constants. But we choose m to be the midpoint of [x, gx], then define a g-invariant, piecewise geodesic: γ = ∪n∈Z g n ([m, gm]). The merit of m is that [m, gm] is very close to L(g), and the “bumps” at points g n (m) on γ are small. We first show γ satisfies (2) using L(g) ≥ 1000δ. Take any two points x, y ∈ γ. Using the g-action if necessary, we may assume x ∈ [m, g(m)], y ∈ [g n−1 (m), g n (m)] for some n > 1. (If n = 1, then the claim (2) is trivial.) The first observation is that g i (m) ∈ N2δ ([m, g n (m)]) for all 0 ≤ i ≤ n. This is an easy exercise by induction on n, and we leave it to readers (see Remark). From this it follows x, y ∈ N3δ ([m, g n (m)]). Next, we show: Claim. g(m), · · · , g n−1 (m) are all in N10δ ([x, y]). To see that, take points on [m, g n (m)] that are close to those points: x, g(m), g 2 (m), · · · , g n−1 (m), y ∈ [m, g n (m)] with |x − x| ≤ 3δ, |g(m) − g(m)| ≤ 2δ, · · · , |g n−1 (m) − g n−1 (m)| ≤ 2δ, |y − y| ≤ 3δ. Take [x, y] to be the subpath of [m, g n (m)]. Notice that the points g 2 (m), · · · , g n−2 (m) are contained in [x, y] since L(g) ≥ 1000δ, but possibly g(m) or g n−1 (m) is not in [x, y], ie, g(m) ∈ [m, x] or g n−1 (m) ∈ [y, g n (m)]. But this exceptional case happens only when g(m) is close to x, or g n−1 (m) is close to y. We finish this case first. So suppose g(m) ∈ [m, x]. Then pick a point z ∈ [m, x] with |g(m) − z| ≤ 4δ using |x − x| ≤ 3δ. It implies that |g(m) − z| ≤ 2δ + 4δ = 6δ, hence |x − g(m)| ≤ 6δ. This is a desired bound and the claim is shown for g(m). Similarly, we have |y − g n−1 (m)| ≤ 6δ. 44 EMMANUEL BREUILLARD AND KOJI FUJIWARA Now we go back to the general case, ie, g i (m) ∈ [x, y], so that g i (m) ∈ N2δ ([x, y]). But, dH ([x, y], [x, y]) ≤ 8δ since |x − x|, |y − y| ≤ 3δ. It then implies that g i (m) is in N10δ ([x, y]). The claim is shown. Finally, let γ(x, y) denote the subpath of γ between x, y then the above claim implies that dH ([x, y], γ(x, y)) ≤ 12δ since γ(x, y) is a piecewise geodesic joining the points in the claim. (2) is shown. We prove (1). Remember that g i (m), 1 ≤ i ≤ n − 1, are the points that are contained in γ(x, y), the subpath of γ between x, y. Then by (2), pick points xi ∈ [x, y], 1 ≤ i ≤ n − 1, with |xi − g i (m)| ≤ 12δ. Let x = γ(t), y = γ(s). Then, |x − y| = |x − x1 | + |x1 − x2 | + · · · + |xn−1 − y| ≥ (|x − g(m)| − 12δ) + (|g(m) − g 2 (m)| − 24δ) + · · · + (|g n−2 (m) − g n−1 (m)| − 24δ) + (|g n−1 (m) − y| − 12δ) 1000δ − 24δ (|x − g(m)| + |g(m) − g 2 (m)| + · · · |g n−1 (m) − y|) − 24δ 1000δ 1000 − 24 9 ≥ |t − s| − 24δ ≥ |t − s| − 24δ. 1000 10 Note that we need −24δ since we do not have |x−g(m)|, |g n−1 (m)−y| ≥ 1000δ.  ≥ Remark 11.5. This claim appears in the beginning of the proof of Lemma 1 in [42], where we do not assume L(g) ≥ 1000δ, so that we take a power of g, g N , with L(g N ) ≥ 1000δ, then prove the same claim for g N . We give a proof of Lemma 11.4. Proof. If δ = 0, then X is a tree and the lemma is trivial, so we assume δ > 0. (1) We prove the first claim. If |x−z| ≤ 14δ, then the conclusion is trivial, so assume |x − z| > 14δ. Let z 0 ∈ [x, z] with |z − z 0 | = 14δ. z 0 ∈ Nδ ([x, w] ∪ [z, w]), but in fact z 0 ∈ Nδ ([x, w]). This is because if z 0 ∈ Nδ ([z, w]), then z 0 ∈ N13δ (α) since α is an axis, which is impossible since d(z 0 , α) = d(z 0 , z) = 14δ. So, pick z 00 ∈ [x, w] such that |z 00 −z 0 | ≤ δ, then |z −z 00 | ≤ 15δ. It implies that dH ([z, w], [x, z]∪[z, w]) ≤ 16δ, and we are done. An argument for the second claim is similar. Drawing a geodesic quadrilateral for x, z, w, y and using |z − w| is long, we find z 00 , w00 ∈ [x, y] with |z − z 00 |, |w − w00 | ≤ 16δ. Then the conclusion easily follows. We omit details. (1) is finished. (2) is a consequence of (1). Indeed, suppose |πα (x) − πα (y)| > D + 36δ. By (1), there must be points Z, W ∈ [x, y] with |Z − πα (x)|, |W − πα (y)| ≤ 18δ. That implies that |Z − W | > D, so that |x − y| > D, a contradiction.  12. Uniform Tits alternative for groups acting on trees There is no uniform Tits alternative for groups acting on trees. This section is devoted to an example showing this. To begin with, we recall the following: Proposition 12.1. If S is a finite set of isometries of a tree with no global fixed point on the tree nor on its boundary, then one may find a pair a, b in (S ∪ S −1 )3 generating a free sub-semigroup. Proof. This assumption implies that L(S) > 0. Proposition 4.4 implies that there is g ∈ S ∪ S 2 with L(g) > 0. Since g is a hyperbolic isometry it fixes exactly two points on the boundary of the tree. Say x is the forward fixed point. Our assumption JOINT SPECTRAL RADIUS AND UNIFORM GROWTH 45 implies that there is s ∈ S with sx 6= x. Now we may apply Proposition 11.1 to the pair {g, sgs−1 } (take inverses if necessary) and get the desired conclusion.  So we can find a free sub-semigroup quickly. We now show that by contrast we may not be able to quickly find a pair generating a free subgroup. This is Proposition 1.15 from the Introduction, which we restate here. Proposition 12.2. For every N ∈ N one can find a pair S = {a, b} of automorphisms of the 3-valent homogeneous tree T such that the subgroup generated by S contains a free subgroup and has no global fixed point on T nor on the boundary ∂T , but no pair of elements in the N -ball B(N ) := ({1} ∪ S ∪ S −1 )N generates a free subgroup. Proof. Let a and b be two hyperbolic elements with translation length 1 and whose axes intersect on a finite segment [p, q] of length L on which they translate in the same direction. It is clear that aL+1 and bL+1 generate a free subgroup. Indeed they play ping-pong on the tree : the attracting and repelling neighborhoods being the four connected components of T \ {p, q} different from that containing the open segment (p, q). In particular the subgroup Γ := ha, bi generated by a and b does not fix a point in T nor on the boundary ∂T . Fix a labelling of the edges of T using the alphabet {1, 2, 3}. Now choose a and b as above with the further property that a and b preserve the cyclic ordering of the edges at every vertex, except possibly at the end-points p and q of the intersection of the axes and a and b. To see that it is possible to do this note first that if we start with one edge of T there is a unique bi-infinite geodesic through this edge such that any two consecutive edges on the geodesic are labelled by consecutive labels and thus there is a unique tree automorphism a that preserves the cyclic order and acts by unit translation on this bi-infinite geodesic ∆a . This gives a. To find b do the same on a bi-infinite geodesic ∆b such that ∆a ∩ ∆b is a segment [p, q] of length L. It is possible to obtain the isometry b (in a unique way) so that b preserves the cyclic order at every vertex, except that we need to reverse that order at exactly two points : the end-points p and q. Now let c and d be any two words of length at most L/2 in a, b and their inverses. The commutator [c, d] must fix the point p. We claim that [c, d] has finite order (and thus c, d cannot generate a free subgroup). Indeed [c, d] preserves the cyclic ordering at any vertex which is at distance at least R from either p or q, where R is the maximum distance from either p or q or the image of either p or q under any word of length at most 2L in a, b and their inverses. Since [c, d] fixes p some power [c, d]n of [c, d] will fix pointwise the entire ball of radius R around p. But since the edge ordering outside is also preserved, [c, d]n must be trivial. This ends the proof.  Remark 12.3. As was pointed out to us by Yves de Cornulier, the above isometries a, b belong to the group of tree automorphisms with prescribed local action and finitely many singularities. These groups, denoted by G(F, F 0 ), in [60] have attracted a lot of attention lately. In our example F 0 = Sym(3) and F = Z/3Z. 13. Application to uniform exponential growth In this section we discuss applications to the exponential growth of groups. We recall some definitions. Let Γ be a group and S a finite set in Γ. Assume that 1 ∈ S 46 EMMANUEL BREUILLARD AND KOJI FUJIWARA and S = S −1 . Set 1 log |S n |. n write h(S, Γ) to indicate that the subset S generates Γ. We denote by hSi the subgroup generated by S. We recall that the quantities `(S) and L(S) were defined in the Introduction. Let Γ be a finitely generated group. Set h(S) := lim n→∞ h(Γ) = inf {h(S); hSi = Γ}, S where S runs over finite generating subsets. If h(Γ) > 0 we say Γ has uniform exponential growth, of growth rate h(Γ). 13.1. Trichotomy for actions on hyperbolic spaces. The following result is a consequence of the Bochi-type inequality for hyperbolic spaces (Theorem 1.4) and of the construction of ping-pong pairs from Section 11. Theorem 13.1 (Trichotomy for actions on hyperbolic spaces). There is an absolute constant C > 1 such that the following holds. Let X be a δ-hyperbolic geodesic space and S ⊂ Isom(X) a finite set with 1 ∈ S. Assume S = S −1 . Then one of the following holds: (1) L(S) ≤ Cδ on X. (2) hSi leaves a set of two points in the boundary of X invariant. Moreover, hSi contains a hyperbolic isometry g, and F ix(g) is the invariant set. (3) If N > C is an integer, then S N contains two elements, which are hyperbolic isometries and are generators of a free semi-group. In particular, h(S) ≥ (log 2)/N > 0. Proof. Assume C > K + 1, where K is the numerical constant from Theorem 5.6 (and Corollary 5.7). If we are not in case (1), then L(S) > (K + 1)δ. Since by Corollary 5.7, for all n > 0, n(L(S) − Kδ) ≤ λ2 (S n ), so that nδ < λ2 (S n ). It implies that for each n > 0 there exists g ∈ S 2n with 2nδ < `(g). Set N0 be the smallest integer with ∆ ≤ N0 , where ∆ is the constant from Proposition 11.1. Then there is g ∈ S 2N0 with ∆δ ≤ `(g). Since `(g) ≤ L(g), we have ∆δ ≤ L(g) and g is hyperbolic on X. Now, if S preserves F ix(g), then we are in (2), otherwise, there must be s ∈ S such that the proposition applies to g, sgs−1 ∈ S 2N0 +2 (take inverses if necessary), and we are in (3) provided C > 2N0 + 2.  13.2. Uniform exponential growth of hyperbolic groups. We now prove uniform, and uniform uniform exponential growth of hyperbolic groups. First we show Theorem 1.14 from the introduction, that δ-hyperbolic groups have uniform exponential growth depending only on δ, in the form of a corollary of our trichotomy Theorem 13.1 applied to hyperbolic groups. This slighlty improves on Koubi’s result [57] and Champetier-Guirardel [29], where a further dependence on the size of the generating set was required. We then discuss uniform uniform exponential growth. Corollary 13.2 (Growth of hyperbolic groups). There is an absolute constant C1 > 0 with the following property. If G is a non-elementary, hyperbolic group, then for any finite symmetric generating subset S ⊂ G containing 1, with the Cayley graph Γ(G, S) δ-hyperbolic for some δ > 0, then S M contains two hyperbolic elements that are generators of a free semi-group, where M is the least integer larger than C1 δ. In particular, h(S) ≥ (log 2)/M . JOINT SPECTRAL RADIUS AND UNIFORM GROWTH 47 We start with a simple lemma. Lemma 13.3. Let G be a group generated by a finite symmetric set S with Cayley graph Γ(G, S). Then for the (left) action of G on Γ(G, S), we have for all n > 0, L(S n ) ≥ n. Proof. Fix n > 0. For any g ∈ G, we need to show that there is h ∈ S n g such that d(g, h) ≥ n. Equivalently this amounts to ask that h ∈ S n g but h ∈ / gS n−1 . n n−1 n n−1 Suppose for contradiction that S g is contained in gS , then |S | ≤ |S |. But since S n−1 ⊂ S n , this means that S n = S n−1 . This implies that hSi is finite.  Proof of Corollary 13.2. Let C > 0 be the absolute constant from Theorem 13.1. (We may assume both C and δ are integers.) For each n > 0, L(S n ) ≥ n by Lemma 13.3. Let n be the least integer larger than Cδ. Theorem 13.1 applied to S n implies that either S N n contains generators of a free semigroup, or S n and hence hSi leaves invariant a pair of distinct points on the boundary ∂X of the Cayley graph X = Γ(G, S). But G acts with dense orbits on its boundary, so the second case cannot occur. Now set C1 = N C.  We now give a uniform exponential growth result for subgroups of hyperbolic groups. This time we cannot a priori rule out the dependence on the cardinality of the generating set of the ambient group. Corollary 13.4 (Uniform growth of subgroups in a hyperbolic group). There exists an absolute constant (integer) C1 > 0 with the following property. Let G be a group generated by a finite symmetric set T so that the Cayley graph Γ(G, T ) is δ-hyperbolic for some integer δ > 0. Then for every finite subset S ⊂ G with 1 ∈ S and S = S −1 , either hSi is finite or virtually cyclic, or S B1 contains two generators of free semi-group, where B1 is the cardinality of the ball T C1 δ of radius C1 δ in Γ(G, T ). In particular, h(S) ≥ (log 2)/B1 . Proof of Corollary 13.4. Let C > 0 be the absolute constant in Theorem 13.1. We may assume C is an integer by replacing it with the smallest integer larger than C if necessary. Assume hT i = G is infinite, otherwise, nothing to show. Set B = |T (C+1)δ |. Clearly S ⊂ Isom(X). Assume hSi is infinite, otherwise there is nothing to show. Let n > 0 and assume that L(S n ) ≤ Cδ. This means that there is g ∈ G such that gS n g −1 ⊂ T Cδ . This forces n ≤ |S n | < |T (C+1)δ | = B. In particular if n ≥ B, then L(S n ) > Cδ. Apply Theorem 13.1 to the set S B . Then, either S (C+1)B contains generators of a free semigroup (set N = (C + 1) in (3)), or S B and hence hSi leaves invariant a pair of distinct points on the boundary ∂X, which form the fix point set of a hyperbolic isometry g in hSi. In the latter a standard argument implies that hSi is virtually cyclic. Indeed if h ∈ hSi fixes both fixed points of g, then hgh−1 is also hyperbolic and fixes the same points. The Morse lemma implies that the axes of g and hgh−1 are uniformly close to each other, and in particular hgh−1 g −1 lies in a ball of bounded radius (independent of h) in X around the identity. This shows that the centralizer of g in hSi has finite index in hSi. But the centralizer of an element of infinite order in a hyperbolic group is virtually cyclic [43, ch. 8]. We go back to the former case, and argue S (C+1)B ⊂ S B1 for some B1 as desired. Let k be the least integer with 2k > C + 1. Set C1 = 4k (C + 1). Let B1 = |T C1 δ |, 48 EMMANUEL BREUILLARD AND KOJI FUJIWARA k which is equal to |T 4 (C+1)δ | > 2k |T (C+1)δ | = 2k B > (C + 1)B, where the first > follows from a well-known “doubling” result ([41]) we state below. It implies that B1 > (C + 1)B, so that from the previous discussion S B1 contains generators of a free semi-group, hence C1 is a desired constant. Theorem 13.5 (Freiman). Let A be a finite, symmetric set in a group with 1 ∈ A such that AA is not a finite subgroup. Then |AA| ≥ (3/2)|A|. By our assumption, hT i is not a finite subgroup, so that |T 4 | > 2|T |. Applying k this repeatedly, we obtain |T 4 (C+1)δ | > 2k |T (C+1)δ |.  Remark 13.6. In [57] Koubi obtains the same result in the case when S is a generating subset of G. In [29] Champetier and Guirardel show a related result : there is an explicit n depending only on δ and |T | such that given any f, g ∈ G either at least one of the pairs {f n , g n } or {f n , g −n } generates a free semigroup, or f n and g n commute. In a very recent work Delzant and Steenbock [37] give another proof of the entropy lower bound obtained in Corollary 13.4, which gets better as |S| gets larger, a nice feature our result does not have. Remark 13.7 (sharpness of Corollary 13.4). The constant B1 in Corollary 13.4 – i.e. the smallest radius such that S B1 contains generators of a free semi-group for any S ⊂ G generating a non-elementary subgroup – must depend on the size of T and not just on δ. We cannot have a bound depending only on δ as in Corollary 13.2. To see this consider for an arbitrarily large radius R and an arbitrarily large prime p one of Olshanski’s examples [62] of a Gromov hyperbolic group G generated by a set T consisting of 2 generators, their inverses and the identity, whose ball of radius R is made of elements of p-torsion. Such a group is δ-hyperbolic for some large (say integer) δ depending on p, R. However if we consider the new Cayley graph Γ(G, T δ ), we obtain a 2-hyperbolic group with T R containing no element of infinite order, let alone generators of a free semigroup. 13.3. Actions by virtually nilpotent groups. We give a proof of the following that is stated as Corollary 1.5. Proposition 13.8. Let X be a geodesic δ-hyperbolic space and S ⊂ Isom(X) a finite set. Assume that `(S) = 0. Then hSi either has a bounded orbit on X, or fixes a unique point in ∂X. Proof. For every n > 0 we have `(S n ) = 0 since n`(S) = `(S n ). So, λ2 (S n ) = 0 by Lemma 1.1. Apply Theorem 1.4 to S n , we obtain Kδ ≥ L(S n ). So, for each n > 0, there is a point xn ∈ X such that L(S n , xn ) ≤ Kδ. We will show that Γ = hSi has a bounded orbit, or fixes a point in ∂X. We recall an elementary fact. Let yn be an infinite sequence of points in the δ-hyperbolic space X. Then there is a subsequence ymn such that either ymn converges to a point in ∂X, or it (coarsely) ”rotates” about some point x ∈ X in the sense that any geodesic [ymn , ymk ], mn 6= mk , intersects the ball B(x, 20δ). By this fact, there are two cases for the sequence xn : there is an infinite subsequence xmn such that either (i) it converges to a point x ∈ ∂X, or (ii) it rotates, ie, there exist a point x ∈ X such that for any mn < mk , the distance between x and the geodesic [xmn , xmk ] is at most 20δ. JOINT SPECTRAL RADIUS AND UNIFORM GROWTH 49 Then, (i) implies that the point x is fixed by Γ. We discuss the uniqueness later. In the case (ii), since both xmn , xmk , mn < mk are moved by S mn at most by Kδ, each point on [xmn , xmk ] is moved by S mn at most by, say, Kδ + 10δ. It implies that S mn moves x by at most 40δ + (K + 10)δ. This is for any n > 0, so the Γ-orbit of x is bounded. Now we argue that if there are at least two fixed points in ∂X, then Γ has a bounded orbit in X. Indeed, if there are three fixed points, then a Γ-orbit must be bounded since X is hyperbolic. If there are exactly two fixed points in ∂X, then join those two points by a quasi-geodesic γ in X. Then γ is coarsely invariant by Γ, ie, there is a constant C such that for any g ∈ Γ, the Hausdorff-distance between γ and g(γ) is at most C. Notice that Γ does not contain any hyperbolic isometry since `(S) = 0. It implies that there is a constant D, which depends on C and δ, such that every point on γ is moved by at most D by any element in Γ, ie, Γ-orbit is bounded.  Corollary 13.9 (Virtually nilpotent groups). Let X be a δ-hyperbolic space, S ⊂ Isom(X) a finite set with 1 ∈ S and S = S −1 . Assume Γ = hSi is virtually nilpotent. Then one of the following holds: (i) Γ has a bounded orbit in X, (ii) Γ fixes a unique point x ∈ ∂X, (iii) Γ leaves invariant a set of two points in ∂X, which is the fixed point set of some hyperbolic isometry g ∈ Γ. Proof. We apply Theorem 13.1 to S. The case (3) does not happen since h(S) = 0 since Γ has polynomial growth. The case (2) implies the conclusion (iii). So assume S does not satisfy (2). Then S satisfies (1), ie, L(S) < (K + 1)δ. We also apply Theorem 13.1 to S n for each n > 1. Again, (3) does not happen, and (2) is desirable, so we assume L(S n ) < (K + 1)δ. But this implies `(S) = 0. Apply Proposition 13.8, and we are done.  13.4. Spaces of bounded packing. For a metric space X, a subgroup Γ in Isom(X) is said to be discrete if for any point x ∈ X and a bounded subset Y ⊂ X, Γ(x) ∩ Y is finite. To state our main result, we recall one definition from [21]. A metric space X has bounded packing with packing constant P > 0 if every ball of radius 2 in X can be covered by at most P balls of radius 1. Here is an elementary lemma we use later. Lemma 13.10. If a geodesic space has bounded packing for P , then any ball of radius n > 0, which is an integer, is covered by at most P n−1 balls of radius 1. Proof. We argue by induction on n. For n = 1, the claim is trivial. Suppose the claim holds for n > 0. Take a ball B of radius n + 1, and let B 0 be the ball of radius n with the same center. By assumption, cover B 0 by at most P n balls of radius 1. Now for each of those balls, take the ball of radius 2 with the same center. Those balls of radius 2 cover B (here we are using that the space is geodesic). Also, each of balls of radius 2 is covered by at most P balls of radius 1. So, by collecting all of those balls of radius 1, B is covered by at most P · P n balls of radius 1.  In [21] balls of radius 4 instead of 2 were used to define the bounded packing property. This is a minor change, which only affects the constant P according to this lemma. 50 EMMANUEL BREUILLARD AND KOJI FUJIWARA In the following theorem we state the bounded packing property in terms of balls of radius δ and 2δ, which is more natural for a δ-hyperbolic space. Theorem 13.11. Given P , there is N (P ) with the following property. Let X be a geodesic δ-hyperbolic space, with δ > 0, such that every ball of radius 2δ is covered by at most P balls of radius δ. Let S be a finite subset in Isom(X) with S = S −1 and assume that Γ = hSi is a discrete subgroup of Isom(X). Then either Γ is virtually nilpotent, or S N contains two generators of a free semi-group, and in particular: 1 h(S) ≥ log 2. N Moreover, if Γ is virtually nilpotent, then either (i) Γ is finite, (ii) fixes a unique point in ∂X, or (iii) Γ is virtually cyclic and contains a hyperbolic isometry g such that F ix(g) in ∂X is invariant by Γ. The following theorem by Breuillard-Green-Tao, which improved Gromov’s theorem on groups with polynomial growth, is a key ingredient of the argument. Theorem 13.12. ([21, Cor 11.2]) For Q ≥ 1 there is a constant C(Q) with the following property. Let S be a finite generating set of a group G with 1 ∈ S. Suppose there exists a finite subset A in G such that |A2 | ≤ Q|A| and S C(Q) ⊂ A. Then G is virtually nilpotent. Here is a useful consequence. Corollary 13.13. For integers P, J > 0, set k = C(P 2J ), where C is from Theorem 13.12. Suppose X is a geodesic space and has bounded packing for P . Let S be a finite set in Isom(X) with S = S −1 such that Γ = hSi is discrete. If L(S k ) < J, then hSi is virtually nilpotent. Proof. For a point x ∈ X define SJ (x) = {γ ∈ Γ||x − γx| ≤ J}. By assumption, there is x ∈ X with L(S k , x) < J, so S k ⊂ SJ (x). Set A = SJ (x). A is finite since Γ is discrete. We have A2 ⊂ S2J (x) by triangle inequality. Since X has bounded packing for P , |A2 | ≤ P 2J |A|. Indeed, let B be the ball of radius 2J centered at x in X. Then A2 (x) ⊂ B. By Lemma 13.10, B is covered by balls of radius 1: B1 , · · · , Bk with k ≤ P 2J . Now choose ai ∈ A2 , if it exists, with ai (x) ∈ Bi for each i. Now for any a ∈ A2 , since a(x) ∈ B, there is Bi with a(x) ∈ Bi , so that |ai (x) − a(x)| ≤ 2. This means a−1 i a ∈ A, so that a ∈ ai A. Since a ∈ A2 was arbitrary, and |ai A| = |A|, we find |A2 | ≤ k|A| ≤ P 2J |A|. 2J On the other hand, by definition, S C(P ) = S k ⊂ SJ (x) = A. Now by Theorem 13.12 with Q = P 2J , hSi is virtually nilpotent.  Proof of Theorem 13.11. By scaling the metric of X by a constant, we assume that X is 1-hyperbolic. By our assumption, X has bounded packing property for P with respect to the new metric. Set k = C(P 2(K+1) ) as in Corollary 13.13 for J = K + 1. There are two cases. Case 1: L(S k ) < K + 1. In this case hSi is virtually nilpotent by Corollary 13.13 applied to S k with J = K + 1. Case 2: L(S k ) ≥ K + 1. JOINT SPECTRAL RADIUS AND UNIFORM GROWTH 51 Apply Theorem 13.1 to S k with δ = 1. Set N0 = N (1), where N (1) is the constant from Theorem 13.1. Since we are in Case 2, (1) does not happen. If (2) happens then hSi is virtually cyclic since hSi is discrete. If (3) happens then S kN0 contains two elements that generate a free semi-group. The constant k depends only on P . (K does not depend on anything.) Set N = kN0 and we are done. To show the moreover part, we apply Corollary 13.9. If Γ has a bounded orbit, then Γ must be finite since the action is discrete. If there is g ∈ Γ that is hyperbolic such that F ix(g) is invariant by Γ, then hgi has finite index in Γ since Γ is discrete, so that Γ is virtually cyclic. Otherwise, Γ fixes a unique point x ∈ ∂X.  Using Theorem 13.11, we give a quick proof of the following theorem by BessonCourtois-Gallot. Theorem 13.14. ([6, Theorem 1.1]) Let X be a d-dimensional, simply connected Riemannian manifold with curvature −a2 ≤ K ≤ −1. Let Γ = hSi be a finitely generated discrete subgroup of Isom(X) with S = S −1 . Then either Γ is virtually nilpotent, or S N contains two generators of free semigroup, in particular, h(S) ≥ 1 N log 2, where the constant N depends only on d and a. In other words, unless Γ is virtually nilpotent, Γ has uniform exponential growth, and the growth rate depends only on d, a. Before we start the proof, we quote a well-known fact (see the paragraph in [21] before Corollary 11.19). Lemma 13.15. Let d ≥ 1 be an integer, and a ≥ 0. Then there exists K(d, a) ≥ 1 with the following property. Suppose M is a d-dimensional complete Riemannian manifold with a Ricci curvature lower bound Ric ≥ −(d − 1)a2 . Then M has bounded packing for K(d, a). For readers’ convenience we give an outline of an argument. Outline of proof of Lemma 13.15. Let B(x, R) denote the ball of radius R in M vol(B(x,4) centered at x. By the Bishop-Gromov inequality, supx∈M vol(B(x,1/2) is bounded from above by a number K that depends only on d, a. We will show B(x, 2) is covered by at most K balls of radius 1. Let L be the maximal number of disjoint balls of radius 1/2 in B(x, 2). Let B(y, 1/2) be the one of maximal volume, v, among them. Since B(x, 2) is contained in B(y, 4), we have Lv ≤ vol(B(x, 2)) ≤ Kv. In particular, L ≤ K. But the balls of radius 1 centered at the same points cover B(x, 2). We are done.  Proof of Theorem 13.14. Since X is simply connected and K ≤ −1, X is CAT(0) and δ-hyperbolic for, say, δ = 2. Since −a2 ≤ K and the dimension of X is d, we have Ric ≥ −(d − 1)a2 . By Lemma 13.15, X has bounded packing for the constant K(d, a). Namely, any ball of radius 2 is covered by at most K balls of radius 1. So, any ball of radius 4 is covered by at most K 3 balls of radius 1 by Lemma 13.10. Set N = N (K(d, a)3 ), where N on the right hand side is the function from Theorem 13.11. Since the assumption of Theorem 13.11 is satisfied by X for δ = 2 and P = K(d, a)3 , either Γ is virtually nilpotent, or S N contains two generators of free semigroup, in particular, h(S) ≥ N1 log 2.  52 EMMANUEL BREUILLARD AND KOJI FUJIWARA 14. Questions 1. Let X be the metric completion of the Teichmuller space of a surface Σ with the Weil-Petersson metric. X is a complete CAT(0) space. Do we have a Bochi-type inequality (see Thereom 1.4)? To be concrete, let a, b be the Dehn twists along curves α, β. Then they are elliptic isometries. Assume that a, b do not commute (ie, the geometric intersection number of α, β is not 0), then F ix(a), F ix(b) are disjoint. Do we have a Bochi-type inequality for the set {a, b} ? We remark that there is a uniform positive lower bound, which depends on Σ, on the distance between F ix(a), F ix(b). 2. Let Γ be a finitely generated subgroup of Isom(X), where X is a tree. Assume that Γ fixes no point on X nor on ∂X. Does there exists N = N (Γ) ∈ N such that, for every symmetric finite generating set S of Γ, (S ∪ {1})N contains two free generators of a non-abelian free subgroup ? Note that it is certainly true for discrete subgroups of isometries of a tree, because they are virtually free [4]. Note further that according to a result of J. Wilson [73] the question has a negative answer, if we drop the assumption that Γ fixes no point on the tree (or only its boundary for that matter), while still assuming that Γ contains some non-abelian free subgroup. 3. Does there exist an absolute constant c > 0 such that h(S) > c for every generating set S of an arbitrary non elementary word hyperbolic group (independently of δ, see [64, Question 2.1]). 4. Can we remove the mutiplicative constant in Proposition 7.7 ? that is given a symmetric space X of non-compact type, does there exist k, C > 0 such that λk (S) ≥ L(S) − C for every finite set S of isometries of X. Does this hold also for isometries of Bruhat-Tits buildings or more generally of any Euclidean building ? 5. The proof of the geometric Berger-Wang identity (Theorem 7.5) and the Bochitype inequality (Proposition 7.7) for symmetric spaces of non-compact type relies on the Bochi inequality for matrices, thus eventually on linear algebra (see the other proof given in [17]). It would be very interesting to find a geometric proof, akin to our proof of Theorem 1.4 for hyperbolic spaces. Perhaps this could shed light on Question 4. 6. Is there a geometric Bochi inequality for isometries of a CAT(0) cube complex ? what about isometries of median spaces ? References [1] Abels Herbert and Margulis Gregory. Coarsely geodesic metrics on reductive groups. Modern dynamical systems and applications, 163–183, Cambridge Univ. Press, Cambridge, (2004). [2] Werner Ballmann, Mikhael Gromov and Viktor Schroeder. Manifolds of nonpositive curvature. Progress in Mathematics, 61. Birkhäuser Boston, Inc., Boston, MA, 1985. [3] Hyman Bass. Groups of integral representation type. Pacific J. Math. 86 (1980), no. 1, 1551. [4] Hyman Bass. Covering theory for graphs of groups. J. of Pure and Applied Algebra 89 (1993), 3–47. [5] Gérard Besson, Gilles Courtois and Sylvestre Gallot. Growth of discrete groups of isometries in negative curvature: a gap-property. C. R. Math. Acad. Sci. Paris 341 (2005), no. 9, 567-572. [6] Gérard Besson, Gilles Courtois and Sylvestre Gallot. Uniform growth of groups acting on Cartan-Hadamard spaces. J. Eur. Math. Soc. (JEMS) 13 (2011), no. 5, 1343–1371. JOINT SPECTRAL RADIUS AND UNIFORM GROWTH 53 [7] Gérard Besson, Gilles Courtois, Sylvestre Gallot, and Andrea Sambusetti. Curvature-Free Margulis Lemma for Gromov-Hyperbolic Spaces, preprint 2017. [8] Mladen Bestvina. R-trees in topology, geometry, and group theory. Handbook of geometric topology, 55–91, North-Holland, Amsterdam, (2002). [9] Mladen Bestvina, Kenneth Bromberg and Koji Fujiwara. Constructing group actions on quasitrees and applications to mapping class groups. Publ. Math. Inst. Hautes Etudes Sci. 122 (2015), 1–64. [10] Mladen Bestvina, Kenneth Bromberg and Koji Fujiwara. Stable commutator length on mapping class groups. Ann. Inst. Fourier (Grenoble) 66 (2016), no. 3, 871898. [11] Laurent Bartholdi and Yves de Cornulier. Infinite groups with large balls of torsion elements and small entropy. Arch. Math. (Basel) 87 (2006), no. 2, 104–112. [12] Marc A. Berger and Yang Wang. Bounded semigroups of matrices. Linear Algebra Appl. 166 (1992), 21–27. [13] Jairo Bochi. Inequalities for numerical invariants of sets of matrices. Linear Algebra Appl. 368 (2003), 7181. [14] Jacek Bochnak, Michel Coste and Marie-Franoise Roy. Real algebraic geometry. Translated from the 1987 French original. Ergebnisse der Mathematik und ihrer Grenzgebiete (3), 36. Springer-Verlag, Berlin, (1998). x+430 pp. ISBN: 3-540-64663-9 [15] Armand Borel. Free subgroups of semisimple algebraic groups, l’Enseign. Math. (2) 29 (1983), no. 1-2, 151-164. [16] Brian Bowditch. A course on geometric group theory. MSJ Memoirs, 16, Mathematical Society of Japan, Tokyo, (2006). x+104 pp. ISBN: 4-931469-35-3. [17] Emmanuel Breuillard and Tsachik Gelander. Uniform independence in linear groups. Invent. math. 173, 225–263 (2008). [18] Emmanuel Breuillard. A height gap theorem and non amenable subgroups of GLn (Q), Ann. of Math. (2) 174 (2011), no. 2, 1057–1110. [19] Emmanuel Breuillard. A strong Tits alternative, arXiv:0804.1395. [20] Emmanuel Breuillard. Effective estimates for the spectral radius of a bounded set of matrices, in preparation. [21] Emmanuel Breuillard, Ben Green, Terence Tao. The structure of approximate groups. Publ. Math. Inst. Hautes Etudes Sci. 116 (2012), 115-221. [22] Emmanuel Breuillard, Ben Green, Robert Guralnick, and Terence Tao. Strongly dense free subgroups of semisimple algebraic groups. Israel J. Math. 192 (2012), no. 1, 347–379. [23] Emmanuel Breuillard and Koji Fujiwara, Growth of mapping class groups, in preparation. [24] Martin R. Bridson, A. Haefliger, Metric spaces of non-positive curvature. Grundlehren der Mathematischen Wissenschaften [Fundamental Principles of Mathematical Sciences], 319. Springer-Verlag, Berlin, (1999). [25] Michèle Bucher and Pierre de la Harpe. Free products with amalgamation and HNNextensions of uniformly exponential growth, Mathematical Notes 67 (2000), 686–689, translated from Mateaticheskie Zametki 67 (2000), 811–815. [26] Yuri Burago and V.A. Zalgaller. Geometric inequalities, Grundlehren der Mathematischen Wissenschaften 285, (1988), Springer Verlag, Berlin. [27] Marc Burger and Maria Beatrice Pozzetti. Maximal representations, non Archimedean Siegel spaces, and buildings. arXiv:1509.01184 [28] Pierre-Emmanuel Caprace and Alexander Lytchak. At infinity of finite-dimensional CAT (0) spaces. Math. Ann., Vol. 346 (2010), 1–21 [29] Christophe Champetier and Vincent Guirardel. Monodes libres dans les groupes hyperboliques. (French) [Free monoids in hyperbolic groups] Séminaire de Théorie Spectrale et Géométrie, Vol. 18, Année 19992000, 157–170. [30] Jeff Cheeger and Tobias H. Colding. Lower bounds on Ricci curvature and the almost rigidity of warped products. Ann. of Math. (2) 144 (1996), no. 1, 189–237. [31] V. Chepoi, F. Dragan, B. Estellon, M. Habib and Y. Vaxès. Diameters, centers, and approximating trees of delta-hyperbolic geodesic spaces and graphs, Symposium on Computational Geometry, SoCG’2008, pp.59–68. [32] Ian Chiswell. Introduction to Λ-trees. World Scientific Publishing Co., Inc., River Edge, NJ, (2001). xii+315 pp. 54 EMMANUEL BREUILLARD AND KOJI FUJIWARA [33] Michel Coornaert, Thomas Delzant and Athanase Papadopoulos. Géométrie et théorie des groupes. Les groupes hyperboliques de Gromov. With an English summary. Lecture Notes in Mathematics, 1441. Springer-Verlag, Berlin, (1990). x+165 pp. [34] Yves de Cornulier, Romain Tessera and Alain Valette. Isometric group actions on Hilbert spaces: growth of cocycles. Geom. Funct. Anal. 17 (2007), no. 3, 770792. [35] Ingrid Daubechies and Jeffrey Lagarias. Sets of matrices all infinite products of which converge. Linear Algebra Appl. 161 (1992), 227263. [36] Thomas Delzant. Sous-groupes distingués et quotients des groupes hyperboliques. Duke Math. J. 83 (1996), no. 3, 661–682. [37] Thomas Delzant and Markus Steenbock, Product set growth in groups and hyperbolic geometry. preprint, 2018. [38] Alex Eskin, Shahar Mozes and Hee Oh. On uniform exponential growth for linear groups. Invent. Math. 160 (2005), no. 1, 1–30. [39] Benson Farb. Group actions and Helly’s theorem. Advances in Mathematics 222 (2009) 1574– 1588. [40] Benson Farb and Dan Margalit. A primer on mapping class groups. Princeton Mathematical Series, 49. Princeton University Press, Princeton, NJ, (2012). 472 pp. [41] Gregory A. Freiman, On finite subsets of nonabelian groups with small doubling. Proc. Amer. Math. Soc. 140 (2012), no. 9, 29973002. [42] Koji Fujiwara. Subgroups generated by two pseudo-Anosov elements in a mapping class group. II. Uniform bound on exponents. Trans. Amer. Math. Soc. 367 (2015), no. 6, 43774405. [43] Etienne Ghys and Pierre de la Harpe. Sur les groupes hyperboliques d’après Mikhael Gromov. Progress in Mathematics, 83. Birkhäuser Boston, Inc., Boston, MA, 1990. [44] Rostislav Grigorchuk and Pierre de la Harpe. Limit behaviour of exponential growth rates for nitely generated groups, in Essays on geometry and related topics, Vol. 1, 2, 351–370, Monogr. Enseign. Math., 38, Enseignement Math., Geneva, (2001). [45] Misha Gromov. Random walk in random groups. Geom. Funct. Anal. 13 (2003), no. 1, 73–146. [46] Mikhail Gromov and Richard Schoen. Harmonic maps into singular spaces and p-adic superrigidity for lattices in groups of rank one. Inst. Hautes tudes Sci. Publ. Math. No. 76 (1992), 165–246. [47] Mikhael Gromov. Hyperbolic groups. Essays in group theory, 75–263, Math. Sci. Res. Inst. Publ., 8, Springer, New York, 1987. [48] Robert M. Guralnick. Some applications of subgroup structure to probabilistic generation and covers of curves, in Algebraic Groups and their Representations (Cambridge, 1997), NATO Adv. Sci. Inst. Ser. C Math. Phys. Sci. Vol. 517, Kluwer Academic Publ., Dordrecht, (1998), pp. 301–320. [49] Pierre de la Harpe, Uniform growth in groups of exponential growth. Proceedings of the Conference on Geometric and Combinatorial Group Theory, Part II (Haifa, 2000). Geom. Dedicata 95 (2002), 117. [50] Vitali Kapovitch and Burkhard Wilking. Structure of fundamental groups of manifolds with Ricci curvature bounded below. arXiv:1105.5955 [51] Michael Kapovich and Bernhard Leeb. Discrete isometry groups of symmetric spaces. Survey. preprint arXiv:1703.02160. [52] Aditi Kar and Micha Sageev. Uniform exponential growth for square complexes, arXiv preprint arXiv:1607.00052. [53] Anders Karlsson and Gregory Margulis. A Multiplicative Ergodic Theorem and Nonpositively Curved Spaces, Commun. Math. Phys. 208, 107 – 123 (1999) [54] Bruce Kleiner. The local structure of length spaces with curvature bounded above. Math. Z., 231(3):409–456, (1999). [55] Nicholas J. Korevaar and Richard M. Schoen. Sobolev spaces and harmonic maps for metric space targets. Comm. Anal. Geom. 1 (1993), no. 3-4, 561–659 [56] Bertram Kostant. On convexity, the Weyl group and the Iwasawa decomposition. Ann. Sci. École Norm. Sup. (4) 6 (1973), 413–455 (1974). [57] Malik Koubi. Croissance uniforme dans les groupes hyperboliques. Annales de l’institut Fourier (1998) Volume: 48, Issue: 5, page 1441–1453. [58] Vincent Lafforgue. Une remarque sur les fonctions conditionnellement de type négatif. (French) [A remark on conditionally negative definite functions] C. R. Math. Acad. Sci. Paris 342 (2006), no. 7, 497–499. JOINT SPECTRAL RADIUS AND UNIFORM GROWTH 55 [59] Michael Larsen. Word maps have large image. Israel J. Math. 139 (2004), 149–156. [60] Adrine Le Boudec. Groups acting on trees with almost prescribed local action. Comment. Math. Helv. 91 (2016), no. 2, 253–293. [61] Nicolas Monod. Superrigidity for irreducible lattices and geometric splitting. J. Amer. Math. Soc. 19 (2006), 781-814. [62] Alexander Olshanskii. An infinite group with subgroups of prime orders. Math. USSR Izv. 16, 279-289, 1981 [63] Eduard Oregon-Reyes. Properties of sets of isometries of Gromov hyperbolic spaces, arXiv preprint 1606.01575, 2016. [64] Dennis V. Osin. Algebraic entropy of elementary amenable groups. Geom. Dedicata 107 (2004), 133–151. [65] Stefan Papadima. Discrete symmetry, toral symmetry and the Euler characteristic of manifolds. Proc. Amer. Math. Soc. 103 (1988), no. 2, 612–614. [66] Anne Parreau. Sous-groupes elliptiques de groupes linéaires sur un corps valué. (French) [Elliptic subgroups of linear groups over a field with valuation] J. Lie Theory 13 (2003), no. 1, 271–278. [67] Anne Parreau. La distance vectorielle dans les immeubles affines et les espaces symétriques, preprint. [68] Raghunathan, M. S. Discrete subgroups of Lie groups. Ergebnisse der Mathematik und ihrer Grenzgebiete, Band 68. Springer-Verlag, New York-Heidelberg, 1972. ix+227 pp. [69] Gian-Carlo Rota and Gilbert Strang. A note on the joint spectral radius. Nederl. Akad. Wetensch. Proc. Ser. A 63 = Indag. Math. 22 1960 379381. [70] Issai Schur. Uber Gruppen periodischer Substitutionen, Sitzber. Preuss. Akad. Wiss., (1911). JFM 42.0155.01. [71] Jean-Pierre Serre, Trees, Springer-Verlag. Berlin-New York, 1980. [72] Yehuda Shalom. Rigidity of commensurators and irreducible lattices. Invent. Math. 141 (2000), no. 1, 154. [73] John Wilson. On exponential growth and uniformly exponential growth for groups. Invent. Math. 155 (2004), no. 2, 287–303. University of Cambridge, DPMMS E-mail address: [email protected] Department of Mathematics, Kyoto University E-mail address: [email protected]
4math.GR
Direct Method for Training Feed-forward Neural Networks using Batch Extended Kalman Filter for MultiStep-Ahead Predictions Artem Chernodub, Institute of Mathematical Machines and Systems NASU, Neurotechnologies Dept., Glushkova 42 ave., 03187 Kyiv, Ukraine [email protected] This paper is dedicated to the long-term, or multi-step-ahead, time series prediction problem. We propose a novel method for training feed-forward neural networks, such as multilayer perceptrons, with tapped delay lines. Special batch calculation of derivatives called Forecasted Propagation Through Time and batch modification of the Extended Kalman Filter are introduced. Experiments were carried out on well-known timeseries benchmarks, the Mackey-Glass chaotic process and the Santa Fe Laser Data Series. Recurrent and feed-forward neural networks were evaluated. Keywords: Forecasted Propagation Through Time, multi-step-ahead prediction, Batch Extended Kalman Filter 1 Introduction Time series forecasting is a current scientific problem that has many applications in control theory, economics, medicine, physics and other domains. Neural networks are known as an effective and friendly tool for black-box modeling of unknown plant’s dynamics [1]. Usually, neural networks are trained to perform single-step-ahead (SS) predictions, where the predictor uses some available input and output observations to estimate the variable of interest for the time step immediately following the latest observation [2-4]. However, recently there has been growing interest in multi-step-ahead (MS) predictions, where the values of interest must be predicted for some horizon in the future. Knowing the sequence of future values allows for estimation of projected amplitudes, frequencies, and variability, which are important for modeling predictive control [5], flood forecasts [6], fault diagnostics [7], and web server queuing systems [8]. Generally speaking, the ability to perform MS predictions is frequently treated as the “true” test for the quality of a developed empirical model. In particular, well-known echo state machine neural networks (ESNs) became popular because of their ability to perform good long-horizon ( H  84 ) multistep predictions. The most straightforward approach to perform MS prediction is to train the SS predictor first and then use it in an autonomous “closed-loop” mode. The predictor’s output is fed back to the input for a finite number of time steps. However, this simple method frequently shows poor results because of the accumulation of errors on difficult data points [4]. Recurrent neural networks (RNNs) such as NARX and Elman networks usually show better results. They are based on the calculation of special dynamic derivatives called Backpropagation Through Time (BPTT). The underlying idea of BPTT is to calculate derivatives by propagating the errors back across the RNN, which is unfolded through time. This penalizes the predictor for accumulating errors in time and therefore provides better MS predictions. Nonetheless, RNNs have some disadvantages. First, the implementation of RNNs is harder than feed-forward neural networks (FFNNs) in industrial settings. Second, training the RNNs is a difficult problem because of their more complicated error surfaces and vanishing gradient effects [9]. Third, the internal dynamics of RNNs make them less friendly for stability analysis. All of the above reasons prevent RNNs from becoming widely popular in industry. Meanwhile, RNNs have inspired a new family of methods for training FFNNs to perform MS predictions called direct methods [4]. Accumulated error is backpropagated through an unfolded through time FFNN in BPTT style that causes minimization of the MS prediction error. Nevertheless, the vanishing gradient effect still occurs in all multilayer perceptron-based networks with sigmoidal activation functions. We propose a new, effective method for training the feed-forward neural models to perform MS prediction, called Forecasted Propagation Through Time (FPTT), for calculating the batch-like dynamic derivatives that minimize the negative effect of vanishing gradients. We use batch modification of the EKF algorithm which naturally deals with these batch-like dynamic derivatives for training the neural network. 2 Modeling time series dynamics We consider modeling time series in the sense of dealing with generalized nonlinear autoregression (NAR) models. In this case, time series behavior can be captured by expressing the observable value y(k  1) as a function of N previous values y (k ),..., y ( k  N  1) : y ( k  1)  F ( y ( k ), y ( k  1),..., y (k  N  1)), (1) where k is the time step variable and F () is an unknown function that defines the underlying dynamic process. The goal of training the neural network is to develop the empirical model of function F () as closely as possible. If such a neural model F~() is available, one can perform iterated multi-step-ahead prediction: ~( y(k ), y(k  1),..., y(k  N  1)), ~ (2) y (k  1)  F … ~( ~ ~ (3) y (k  H  1)  F y (k  H ), ~ y (k  H  1),..., ~ y (k  H  N  1)), ~ where y is the neural network’s output and H is the horizon of prediction. 2.1 Training traditional Multilayer Perceptrons using EKF for SS predictions Dynamic Multilayer Perceptron. Dynamic multilayer perceptrons (DMLP) are the most popular neural network architectures for time series prediction. Such neural networks consist of multilayer perceptrons with added tapped delay line of order N (Fig. 1, left). Fig. 1. DMLP neural network (left), NARX neural network (right). The neural network receives an input vector T x(k )  [ y (k ) y (k  1) .... y (k  N )] , and calculates the output ( 2) (1) ( 2) (1) ~ y (k  1)  g ( w j ( f ( w ji xi ))), where w and w are weights of the hidden   j i and output layers and f () and g () are activation functions of the hidden and output layers. ~ y Calculation of BP derivatives. The Jacobians for the neural network’s training w procedure are calculated using a standard backpropagation technique by propagating a constant value  OUT  1 at each backward pass instead of propagating the residual ~ y (k ) error  OUT  t (k  1)  ~ instead of error y (k  1) which calculates Jacobians w E (k ) [e(k  1) 2 ] y E (k )   2e(k  1) because . w w w w Extended Kalman Filter method for training DMLP. Although EKF training [7], [10] is usually associated with RNNs it can be applied to any differentiable parameterized model. Training the neural network using an Extended Kalman Filter may be considered a state estimation problem of some unknown “ideal” neural network that provides zero residual. In this case, the states are the neural network’s weights w(k ) and the residual is the current training error e( k  1)  t (k  1)  ~y ( k  1) . During the initialization step, covariance matrices of measurement noise R  I and dynamic training noise Q  I are set. Matrix R has size Lw  Lw , matrix Q has size Nw  Nw , where Lw is the gradients number of output neurons, and N w is the number of the network’s weight coefficients. Coefficient  is the training speed, usually  ~ 10 2...10 4 and coefficient  defines , the measurement noise, usually  ~ 10 4...10 8 . Also, the identity covariance matrix P of size Nw  Nw and zero observation matrix H of size Lw N w are defined. The following steps must be performed for all elements of the training dataset: 1) Forward pass: the neural network’s output ~y ( k  1) is calculated. ~y 2) Backward pass: Jacobians are calculated using backpropagation. Observation w matrix H (k ) is filled:  ~ y (k  1) H (k )    w1 3) Residual matrix E (k ) is filled: ~ y (k  1) ... w2 ~ y (k  1)  . wN w  E(k )  e(k  1). (4) (5) 4) New weights w(k ) and correlation matrix P ( k  1) are calculated: K (k )  P(k ) H (k )T [ H (k ) P(k ) H (k )T  R]1, (6) P(k  1)  P(k )  K (k )H (k )P(k )  Q, w(k  1)  w(k )  K (k ) E(k ). (7) (8) 2.2 Training NARX networks using BPTT and EKF Nonlinear Autoregression with eXternal inputs. The NARX neural network structure is shown in Fig. 1. It is equipped with both a tapped delay line at the input and global recurrent feedback connections, so the input vector x(k )  [ y (k ) ... y (k  N ) ~ y (k ) ... ~ y (k  L)]T , where N is the order of the input tapped delay and L is the order of the feedback tapped delay line. Calculation of BPTT derivatives. Jacobians are calculated according to the BPTT scheme [1, p. 836], [4], [7]. After calculating the output ~ y (k  1) , the NARX network is unfolded back through time. The recurrent neural network is presented as an FFNN with many layers, each corresponding to one retrospective time step k  1 , k  2 , , ~ y (k  n) k  h , where h is a BPTT truncation depth. The set of static Jacobians are w calculated for each of the unrolled retrospective time steps. Finally, dynamic BPTT ~ y BPTT (k ) Jacobians are averaged static derivatives obtained for the feed-forward w layers. Extended Kalman Filter method for training NARX. Training the NARXs using an EKF algorithm is accomplished in the same way as training the DMLPs described above. The only difference is that the observation matrix H is filled by the dynamic derivatives ~ ~ yBPTT (k ) yBPTT (k ) and , which contain temporal information. (1) w( 2) w 2.3 Direct method of training Multilayer Perceptrons for MS predictions using FPTT and Batch EKF Calculation of FPTT derivatives. We propose a new batch-like method of calculating the dynamic derivatives for the FFNNs called Forecasted Propagation Through Time (Fig. 3). Fig. 2. Calculation of dynamic FPTT derivatives for feedforward neural networks 1) At each time step the neural network is unfolded forward through time H times using Eqs. (2)-(3) in the same way as it is performed for regular multistep-ahead prediction, where H is a horizon of prediction. Outputs ~ y (k  1),..., ~ y (k  H  1) are calculated. 2) For each of forecasted time steps, prediction errors H e(k  h  1)  t (k  h  1)  ~ y (k  h  1) , h  1,..., H are calculated. y ( k  h)   ~ 3) The set of independent derivatives   , h  1,..., H  1 , using the  W  standard backpropagation of independent errors e(k  h) are calculated for each copy of the unfolded neural network. There are three main differences between the proposed FPTT and traditional BPTT. First, BPTT unfolds the neural network backward through time; FPTT unfolds the neural network recursively forward through time. This is useful from a technological point of view because this functionality must be implemented for MS predictions anyway. Second, FPTT does not backpropagate the accumulated error through the whole unfolded structure. It instead calculates BP for each copy of the neural network. Finally, FPTT does not average derivatives, it calculates a set of formally independent errors and a set of formally independent derivatives for future time steps instead. By doing this, we leave the question about contributions of each time step to the total MS error to the Batch Kalman Filter Algorithm. Batch Extended Kalman Filter method for training DMLP using FPTT. The EKF training algorithm also has a batch form [11]. In this case, a batch size of H patterns and a neural network with Lw outputs is treated as training a single shared-weight network with Lw  H outputs, i.e. H data streams which feed H networks constrained to have identical weights are formed from the training set. A single weight update is calculated and applied equally to each stream's network. This weights update is sub- optimal for all samples in the batch. If streams are taken from different places in the dataset, then this trick becomes equivalent to a Multistream EKF [7], [10], a well-known technique for avoiding poor local minima. However, we use it for direct minimization of ~ (k ) and residual matrix accumulated error H steps ahead. Batch observation matrix H ~ (k ) now becomes: E y (k  1)  ~  w1 ~ (k )   H ...  y (k  H  1)  ~  w1  ~ y (k  1) ... w2 ... ... ~ y (k  H  1) ... w2 ~ y (k  1)   wN w  ... , ~ y (k  H  1)   wN w  ~(k )  e(k  1) e(k  2) ... e(k  H  1). E (9) (10) ~ (k ) is The size of matrix R~ is ( Lw  H )  ( Lw  H ) , the size of matrix H ~ ( Lw  H )  N w , and the size of matrix E (k ) is ( Lw  H )  1 . The remainder is identical to regular EKF. 3 Experiments 3.1 Mackey-Glass Chaotic Process The Mackey-Glass chaotic process is a famous benchmark for time series predictions. The discrete-time equation is given by the following difference equation (with delays): xt 1  (1  b) xt  a xt  1  ( xt  )10 , t   ,  1,... , (11) where   1 is an integer. We used the following parameters: a  0.1 , b  0.2 ,   17 as in [4]. 500 values were used for training; the next 100 values were used for testing. First, we trained 100 DMLP networks with one hidden layer and hyperbolic tangent activation functions using traditional EKF and BP derivatives. The training parameters for EKF were set as   10 3 and   10 8 . The number of neurons in the hidden layer was varied from 3 to 8, the order of input tapped delay line was set N  5 , and the initial weights were set to small random values. Each network was trained for 50 epochs. After each epoch, MS prediction on horizon H  14 on training data was performed to select the best network. This network was then evaluated on the test sequence to achieve the final MS quality result. Second, we trained 100 DMLP networks with the same initial weights using the proposed Batch EKF technique together with FPTT derivatives and evaluated their MS prediction accuracy. Third, we trained 100 NARX networks (orders of tapped delay lines: N  5 , L  5 ) using EKF and BPTT derivatives to make comparisons. The results of these experiments are presented in Table 1. Normalized Mean Square Error (NMSE) was used for the quality estimations. Table 1. Mackey-Glass problem: mean NMSE errors for different prediction horizon values H DMLP EKF BP DMLP BEKF FPTT NARX EKF H=1 0.0006 0.0017 0.0010 H=2 0.0014 0.0022 0.0014 H=6 0.013 0.012 0.012 H=8 0.022 0.018 0.018 H=10 0.033 0.022 0.023 H=12 0.044 0.027 0.028 H=14 0.052 0.030 0.032 3.2 Santa-Fe Laser Data Series In order to explore the capability of the global behavior of DMLP using the proposed training method, we tested it on the laser data from the Santa Fe competition. The dataset consisted of laser intensity collected from the real experiment. Data was divided to training (1000 values) and testing (100 values) subsequences. This time the goal for training was to perform long-term (H=100) MS prediction. The order of the time delay line was set to N  25 as in [2], the rest was the same as in the previous experiment. The obtained average NMSE for 100 DMLP networks was 0.175 for DMLP EKF BP (classic method) versus 0.082 for DMLP BEKF FPTT (proposed method). Fig. 3. The best results of the closed-loop long-term predictions (H=100) on testing data using DMLPs trained using different methods. Meanwhile, the best instance trained using Batch EKF+FPTT shows 10 times better accuracy than the best instance trained using the classic approach. 4 Conclusions We considered the multi-step-ahead prediction problem and discussed neural network based approaches as a tool for its solution. Feed-forward and recurrent neural models were considered, and advantages and disadvantages of their usage were discussed. A novel direct method for training feed-forward neural networks to perform multi-stepahead predictions was proposed, based on the Batch Extended Kalman Filter. This method is considered to be useful from a technological point of view because it uses existing multi-step-ahead prediction functionality for calculating special FPTT dynamic derivatives which require a slight modification of the standard EKF algorithm. Our method demonstrates doubled long-term accuracy in comparison to standard training of the dynamic MLPs using the Extended Kalman Filter due to direct minimization of the accumulated multi-step-ahead error. References 1. Haykin S.: Neural Networks and Learning Machines, Third Edition, New York: Prentice Hall, 2009 – 936 p. 2. Lin T.S., Giles L.L., Horne B.G., Sun-Yan Y. A delay damage model selection algorithm for NARX neural networks. In: IEEE Transactions on Signal Processing. – 1997. – Vol. 45. – I. 11. – p. 2719 – 2730. 3. Parlos A.G., Raisa O.T., Atiya A.F.: Multi-step-ahead prediction using dynamic recurrent neural networks. In: Neural Networks, Volume 13, Issue 7, 2000, pp. 765–786. 4. Bone R., Cardot H.: Advanced Methods for Time Series Prediction Using Recurrent Neural Networks In: Recurrent Neural Networks for Temporal Data Processing, Chapter 2, Intech. – Croatia. –2011. – P. 15 – 36. 5. Qina S.J. Badgwellb T.A.: A survey of industrial model predictive control technology. In: Control Engineering Practice, Volume 11, Issue 7, 2003, p. 733–764. 6. Toth E., Brath A. Multistep ahead streamflow forecasting: Role of calibration data in conceptual and neural network modeling. In: Water Resources Research, Volume 43, Issue 11, 2007, DOI: 10.1029/2006WR005383. 7. Prokhorov D.V.: Toyota Prius HEV Neurocontrol and Diagnostics. In: Neural Networks, 2008, No. 21, pp. 458 – 465. 8. Amani P.: NARX-based multi-step ahead response time prediction for database servers. In: 11th International Conference on Intelligent Systems Design and Applications (ISDA), 22-24 Nov. 2011, Cordoba, Spain, p. 813 - 818. 9. S. Hochreiter, Y. Bengio, P. Frasconi, J. Schmidhuber.: Gradient flow in recurrent nets: the difficulty of learning long-term dependencies. In: A Field Guide to Dynamical Recurrent Neural Networks // IEEE Press. – 2001. – 421 P. 10. Haykin S. Kalman Filtering and Neural Networks. In: John Wiley & Sons, Inc, 2001 – 304 p.. 11. Li S. Comparative Analysis of Backpropagation and Extended Kalman Filter in Pattern and Batch Forms for Training Neural Networks. In: Proceedings on International Joint Conference on Neural Networks(IJCNN '01), Washington, DC, July 15-19, 2001, Vol. 1, pp: 144 – 149.
9cs.NE
arXiv:1801.08074v1 [cs.IT] 24 Jan 2018 Non-parametric Estimation of Mutual Information with Application to Nonlinear Optical Fibers Tommaso Catuogno Menelaos Ralli Camara Marco Secondini Ericsson Research Pisa, Italy with Scuola Superiore Sant’Anna, TeCIP institute at the time of this research Scuola Superiore Sant’Anna, TeCIP institute Pisa, Italy Scuola Superiore Sant’Anna, TeCIP institute Pisa, Italy [email protected] [email protected] [email protected] Abstract—This paper compares and evaluates a set of nonparametric mutual information estimators with the goal of providing a novel toolset to progress in the analysis of the capacity of the nonlinear optical channel, which is currently an open problem. In the first part of the paper, the methods of the study are presented. The second part details their application to several optically-related channels to highlight their features. I. I NTRODUCTION multidimensional spaces, which is a key feature in the presence of memory. The paper is organized as follows. Section II introduces three different non-parametric estimators based on kNN statistics, as well as the auxiliary-channel lower bound. Section III and IV present the application of the methods to some classical simple channels and to some optical fiber channels, respectively. Conclusions are finally drawn in Section V. The evaluation of the capacity of the optical fiber channel II. E STIMATION OF MUTUAL INFORMATION is still an open problem, mainly due to the unavailability of an exact and mathematically tractable channel model [1]. A. Kozachenko estimator There have been several studies on the fiber capacity limits A possible approach to directly estimate the entropy of a (see, for instance, [2]–[5] and references therein). In particular, random variable from its realizations is through kNN statistics. many works have derived numerically-computed lower bounds Given a continuous random vector X ∈ Rd , its entropy is (or their analytical approximations) implicitly or explicitly based on the use of an auxiliary-channel lower bound [6]. defined as The main limit of this approach is that the tightness of the H(X) = −E[ log(X)] (1) bound is determined by the accuracy with which the auxiliary channel approximates the true one, that is, by our knowledge where the logarithm is in base 2, as all the others in the of the true channel. Often, a simple Gaussian auxiliary channel paper. Let also p(x) be the probability density function (pdf) is used (for numerical convenience and/or lack of a better of X evaluated in x. Our goal is to estimate H(X) from N knowledge) which, however, has been proved to give very realizations x1 , x2 , . . . , xN of the random vector X, without loose bounds in some cases [7], [8], [5]. On the other hand, knowing p(x). The kNN approach, rather than estimating p(x) the capacity of the optical fiber channel is upper bounded by from the available realizations (as typical histogram-based the capacity of an equivalent additive white Gaussian noise methods do), directly estimates log p(x) from the statistics of (AWGN) channel with same total accumulated noise [4]. The the distance between x and its k-th nearest neighbour in the gap between the tightest available lower and upper bounds is available data set. The obtained estimator is described in [10] still unsatisfactorily large at high powers. and is named Kozachenko-Leonenko Entropy Estimator, that In this work, we introduce a family of non-parametric muis: tual information (MI) estimators, based on k-nearest neighbour (kNN) statistics, which do not require any a priori information N about the underlying channel model and which can be used d X log ǫ(i) (2) Ĥ(X) = −ψ(k) + ψ(N ) + log c + d to progress in the information theoretical analysis of the N i=1 optical fiber channel. Other approaches, based for instance on the use of histograms, have been already explored [9]. where cd is the volume of the d-dimensional unit sphere and The methods considered in this work are of particular interest ǫ(i) is defined as the distance, over a chosen metric, between since they combine the simplicity and adaptability of the sample xi and its k-neighbour. By using the same approach, histogram method with the peculiar capability to work over it is also possible to estimate the mutual information I(X; Y ) between two random vectors, X and Y . This is done by using the relation I(X, Y ) = H(X) + H(Y ) − H(X, Y ) (3) and using (2) to estimate the input, output, and joint entropies appearing in (3). B. Kraskov Estimator The Kozachenko estimator has also been used to develop another class of MI estimators that are more stable and works particularly well for low-dependent random variables [11]. The obtained estimator, referred to as Kraskov Estimator, differs from Kozachenko’s one for the choice of the parameter k. In the latter, k is the same for the estimation of the joint and marginal entropies, leading to a comparison of entropies evaluated on different scales. In contrast, in [11], a simple solution to bypass the problem is illustrated. Given a multidimensional plane, let nx (i) be the number of points in the interval [xi − ǫ(i)/2, xi + ǫ(i)/2]. The distance from xi to its nx (i) + 1 neighbor is equal to ǫ/2. Therefore, we can substitute k with nx (i) + 1 in (2), obtaining the Kozachenko Estimator, it is possible to define the Local Gaussian entropy estimator [12] Ĥ(x) = ψ(N )−ψ(k)− N N 1 X 1 X log(g(xi ))+ log Gi (7) N i=1 N i=1 By comparing this estimator with the previous ones, it can be shown that, while close to the mode of the distribution the approximations to the integral of the probability density are similar among all the estimators, in the tails the integral is better captured by the Local Gaussian Estimator. This feature is particularly relevant in high-dimensional space distributions, as demonstrated in [12], where this method outperforms all the others. D. Auxiliary-channel lower bound A completely different approach to estimate the MI of a channel from a set of input and output realizations, without having an explicit knowledge of the underlying model p(y|x), is the use of the auxiliary-channel lower bound [6] N n 1 X q(yi |xi ) q(y|x) o ≃ log (8) I(X; Y ) ≥ E log N q(y) N q(yi ) i=1 1 X ψ(nx (i) + 1) Ĥ(X) ≈ − R N i=i In (8), q(y|x) and q(y) = q(y|x)p(x)dx are, respectively, the (4) conditional and output pdf of an arbitrarily selected auxiliary N dx X channel, while the expectation is taken with respect to the log ǫ(i). + ψ(N ) + log cdx + N i=1 actual input–output joint distribution p(x, y). The choice of the By substituting (4) in (3) we eventually obtain the Kraskov auxiliary channel affects the tightness and the computability of the bound (8), not its validity. Moreover, the bound is estimator. achievable by a mismatched detector that is optimized for C. Local Gaussian Estimator the auxiliary channel. This approach has been implicitly or Although the previous estimators work well in low dimen- explicitly adopted in optical fiber communications to obtain sions, they loose accuracy when the dimensionality of the some capacity lower bounds (e.g., [2], [3]). In many cases, random variable is high or the distribution highly non-uniform a simple Gaussian-auxiliary-channel lower bound (GLB)— in the defined volumes. In fact, the primary source of errors in which is exact in the linear regime and, hence, accurate at these methods is due to the assumption of a constant density low optical powers—has been considered, obtaining an easily in each volume, yielding—in cases of a highly concentrated computable bound that is achievable by conventional detectors probability mass function—an overestimate of the entropy. To [13]. overcome this problem, a different approach is to approximate III. A PPLICATION TO CLASSICAL CHANNELS the probability at sample xi by In this section, we consider two simple scenarios, for which 1 p(x) ≈ ρ exp(− (x − µ)T S −1 (x − µ)) (5) the MI is exactly known, to investigate the accuracy of the 2 considered MI estimators and their behaviour with respect −1 where µ and S represent the empirical mean and covariance to specific channel characteristics—namely, different signalmatrix of the p neighbors of the point xi . With this approach, to-noise ratios and the presence of interference. the volume surrounding each sample is maintained constant, while the distribution within it is considered non-uniform, and A. AWGN channel in particular, it is assumed locally Gaussian with mean and We start by considering an AWGN channel, y = x + n, and covariance estimated on a set of points around the one under a circularly symmetric complex Gaussian input distribution. In study. To obtain an equation of the same form as the previous this case, the input distribution is capacity achieving and the methods, the volume related to sample xi is approximated by MI equals channel capacity I(X; Y ) = C = log(1 + SNR). Fig. (1) compares the exact MI (capacity) with the estimates 1 Pi = p(xi ) Gi (6) obtained through the approaches described in the previous g(xi ) section, considering a total number of samples N = 15000. R where Gi = ||x−xi ||<ǫ/2 g(x)dx and g(xi ) = exp(− 21 (xi − In particular, the kozachenko estimator is computed in two µ)T S −1 (xi − µ)) . Using (5) and (6) in the derivation of flavors, with k = 2 and k = 5, to highlight the performance 14 Shannon Capacity GLB Local Gaussian, k = 4 Kraskov, k = 4 Kozachenko, k = 2 Kozachenko, k = 5 12 MI [bits/symbol] MI [bits/symbol] differences; Kraskov method is executed instead with k = 4, compared with the GLB and with the kNN Kraskov estimate the optimal parameter for this case.Finally the Local Gaussian for α in the range [0, π/2] (a symmetric behaviour is obtained estimator is ran with k = 4 and p = 0.04N , a value suggested in [π/2, π], and the curves have a period of π). The GLB is in the paper of reference for the method. Regarding the auxil- bound to measure the MI according to the underlying model iary channel, in this simple case, is exactly matched to the true specified by the selected auxiliary channel and has no ability channel, such that the auxiliary-channel lower bound provides to adapt to the specific characteristics of the true channel. a very accurate estimate for any SNR. On the other hand, all Therefore, it is accurate only in the absence of any rotation the non-parametric methods based on kNN statistics become and vanishes as the rotation approaches π/2. On the other less accurate for high SNRs. The maximum SNR for which the hand, the Kraskov estimate is always close to the exact MI MI can be accurately estimated in this example is between 25 regardless of the value of α (a similar result is obtained with and 30 dB, depending on the selected method and parameters. the other kNN-based estimators), showing a clear capability This is due to the increased correlation between the input to "see" the MI between the input and output variables even and output samples, which causes an overestimation of the when it is "mixed up" by an arbitrary rotation. entropy while computing the volumes around the samples in 5 the joint space. In principle, this limit can be increased at will by increasing the number of samples N , at the expense, 4 however, of significantly increasing the computational effort. 10 8 3 2 1 0 6 Shannon Capacity GLB Kraskov, k =4 0 4 /2 Fig. 2: AWGN 2 × 2 channel - N = 11000 SNR = 6dB 2 0 /4 Angle 0 5 10 15 20 25 30 35 40 SNR [dB] Fig. 1: AWGN Channel - N = 15000 B. 2 × 2 channel After testing the behaviour of the methods at different SNRs, we investigate their ability to estimate the MI in the presence of interference. To this end, we consider a 2×2 multiple-input multiple-output (MIMO) channel y = Hx + n in which the channel matrix   cos α sin α H= (9) − sin α cos α IV. A PPLICATION TO OPTICAL FIBER CHANNELS In this section, we compare the estimators by considering three different scenarios related to the optical fiber channel— namely, a nonlinear channel with no dispersion, a linear dispersive channel, and a more realistic channel with both dispersion and nonlinearity. A. Zero Dispersion The first channel under study is the zero-dispersion optical channel. In this case, the propagating signal is affected only by Kerr nonlinearity and amplified spontaneous emission (ASE) noise and the channel is memoryless. The capacity of this corresponds to a fixed rotation by an angle α and n is a noise channel has been studied in [7], [14]. When the input power vector of two i.i.d. circularly symmetric complex Gaussian Pin is low, the effect of nonlinearity is negligible, the channel variables. For α = 0, we obtain two independent AWGN is approximately AWGN, and its capacity approaches the channels. Then, increasing α, the information from the first AWGN channel capacity C = log(1 + SNR). On the other (second) input is partly transferred also to the second (first) hand, when Pin is large, the interaction between noise and output, causing interference. Eventually, for α = π/2, we Kerr nonlinearity generates a strong nonlinear phase noise that have again two independent AWGN channels, with a crosswise takes over the whole phase interval [0, 2π]. In this case, the input-output interconnection. phase brings almost no information and the capacity is lower It is easy to verify that, regardless of the value of α, the bounded as 1 1 channel matrix is unitary and, hence, has no impact on the MI. C ≥ log(SNR) − (10) 2 2 In particular, for i.i.d. circularly symmetric complex Gaussian inputs, the MI equals the capacity of the channel, which is the bound being asymptotically exact for Pin → ∞ and achievtwice the capacity of the AWGN channel. However, if the able by an input distribution with half-Gaussian amplitude channel model is unknown, it might be not straightforward to profile and uniform phase [14]. verify this result by observing only the channel realizations, On the basis of such theoretical results, we tested the unless a good non-parametric MI estimator is available. This considered MI estimators to verify their accuracy in a high is illustrated in Fig. (2), in which the exact MI (capacity) is nonlinear regime, in which the conditional distribution of SNR [dB] MI [Bits/symbol] 15 13 10 20 30 50 -10 60 0 10 20 30 40 50 60 -10 5 3 13 11 9 7 5 3 1 -10 0 10 20 Pin [dBm] (a) 100 km × 12 span 30 40 -1 30 40 50 60 14 12 10 8 6 4 2 1 -20 20 16 15 7 10 18 17 9 0 20 19 11 -1 -30 SNR [dB] SNR [dB] 40 MI [bits/symbol] 17 0 Shannon Capacity Half-Capacity GLB Kozachenko Kozachenko - Gaussian MI [bits/symbol] -10 19 0 -10 0 10 20 30 40 50 60 10 Pin [dBm] the channel may deviate significantly from a Gaussian distribution (see, for instance, [14, Fig. 4]). We considered three links with same total length of 1200 km but different span length and number (12x100, 6x200, and 4x300 km); a fiber attenuation α = 0.2 dB/km and nonlinear parameter γ = 1.27 W−1 km−1 ; an amplifier noise figure of 6 dB; and a symbol rate of 50 GBd. Fig. 3 shows the MI estimates as a function of the input power for the the three considered links, different estimators, and both a Gaussian and half-Gaussian input distribution. The linear capacity and the half-Gaussian capacity lower bound (10) are also plotted. In all the cases, the power range is selected to have a fixed SNR range, which is also reported (on the upper horizontal axis) as a reference. While for shorter spans the same SNR is obtained with a lower input power, therefore operating in a linear or weakly nonlinear regime, for longer spans it is achieved at a higher power, therefore operating in a strongly nonlinear regime. In the weakly nonlinear regime of Fig. 3a, all the MI estimates are close to the linear capacity at low power, as expected. On the other hand, when the power is increased, the estimates reach a maximum and, then, decrease again. In the GLB case, this happens at significantly lower power (around 0 dBm) and is a typical behaviour of the estimator over the nonlinear optical channel [5]. In fact, it is due to the mismatch between the true and auxiliary channel and cannot be modified by increasing the number of samples. On the other hand, the Kozachenko estimators are able to estimate a significantly higher MI at higher powers, reaching a peak at about 20 dBm of input power. At very high power, the MIs fall below the lower bound, clearly indicating that also this (and the other kNN) methods are no longer accurate. This is not, however, an intrinsic limit of the method, but rather a limitation induced by the number of samples considered for the estimation, as already discussed in the AWGN case of Fig. 1. In fact, the maximum estimated MI and the crossing point with the capacity lower bound depend on N and can be increased by increasing it. 30 40 50 60 70 80 Pin [dBm] (b) 200 km × 6 span Fig. 3: Zero Dispersion Channel - N = 2 20 (c) 300 km × 4 span 18 increases. B. Dispersive Channel As a second test, we consider the case of a linear dispersive optical channel, with the goal of analyzing the impact of channel memory on the estimators. A linearly-modulated 10 GBd signal is propagated through a link consisting of a few (from 1 to 5) spans of 80 km single mode fiber (SMF)— with dispersion coefficient D = 16 ps/nm/km and attenuation coefficient α = 0.2 dB/km—each followed by an optical amplifier with a noise figure of 5.3 dB. The pulse shape has a root-raised-cosine Fourier transform with rolloff factor 0.2, and i.i.d. circularly symmetric complex Gaussian input symbols are considered. At the receiver, after matched filtering and symbol time sampling, no other processing is performed, such that a significant inter-symbol interference (ISI) due to chromatic dispersion is present. Analogously to the case of the MIMO channel investigated in the previous section, dispersion corresponds to a unitary transformation. Therefore, it does not affect the MI, which in this case equals the capacity of the AWGN channel. However, without an explicit knowledge of the channel model, it might be hard to extract the information from the received samples, being it spread and mixed up over several received symbols. This is clearly apparent from Fig. 4, if the GLB is considered, which simply neglects channel memory and corresponds to a symbol-by-symbol detection. In this case, the estimated MI is much lower than the actual one, and rapidly vanishes as the accumulated dispersion (number of spans) increases. A very similar behaviour is obtained when considering the Kozachenko estimator, still on a symbol-by-symbol basis. On the other hand, we should be able to fully recover the information from the output samples if they are jointly processed. To this end, we consider the local-Gaussian estimator (which is known to be more robust in a high-dimensional space) and estimate the MI between each input sample and a block of The difference between the GLB and the kNN estimator is 3, 5, or 21 output samples. As expected, the MI estimates even more evident in cases (b) and (c), in which a strongly increase when increasing the block size, as a longer portion nonlinear regime is already achieved at lower SNR and MI. of the channel memory is considered. In particular, for 21 While the GLB is able to measure very little or almost zero output samples, the estimate approaches the exact value after a MI, the Kozachenko estimator gradually decreases from the single span, and remains reasonably high for longer distances, linear capacity to the half-capacity lower bound as the power clearly showing a good behaviour in a high-dimensional space (two real input variables and 42 real output variables) and a significant ability to cope with severe ISI. 14 12 MI [bits/symbol] 10 Shannon Capacity GLB Kozachenko Local Gaussian, M = 3 Local Gaussian, M = 5 Local Gaussian, M = 25 8 6 4 2 0 1280 2560 3840 5120 6400 Cumulative dispersion [ps/nn] Fig. 4: Dispersive Channel - N = 218 C. Realistic optical channel As a final test, we consider a realistic optical channel with both dispersion and nonlinearity. Moreover, to test the ability of the estimators to work also with discrete distributions, we consider a 64QAM modulation. The considered scenario is the same described in [15]. The symbol rate is 14 GBd, and a link of 30x120 km spans of SMF is considered, with α = 0.2 dB/km, D = 16 ps/nm/km, γ = [1.3]W −1 km−1 . Each span is followed by an optical amplifier with a noise figure of 5.5dB and an ideal fiber Bragg grating that exactly compensates for dispersion. At the output, digital backpropagation (DBP) is used to mitigate linear and nonlinear ISI (being though ineffective against signal-noise interaction), after which matched filtering and symbol-time sampling are performed. Fig. (5) compares the GLB and the Kozachenko estimate with the capacity of the linear channel. With respect to the GLB, the Kozachenko estimator is able to cope with the non-Gaussian distribution induced by signal-noise interaction and give a higher MI estimate. Remarkably, the Kozachenko estimate equals the tightest MI lower bound obtained in [15] by employing a complex algorithm—stochastic DBP with Gaussian message passing—specifically designed to include the effect of signal-noise interaction in DBP. SNR [dB] 6.25 10 MI [bits/symbol] 8 8.25 10.25 12.25 14.25 16.25 18.25 20.25 22.25 24.25 -2 0 2 4 6 8 Shannon Capacity GLB Kozachenko - QAM64 6 4 2 -10 -8 -6 -4 Pin [dBm] Fig. 5: Realistic Channel - N = 218 V. C ONCLUSION We have explored some non-parametric approaches for the estimation of the MI, based on kNN statistics. This approaches are especially useful when no knowledge of the channel model is available, as in the case of the optical fiber channel, about which very little is known in terms of capacity limits. The considered methods have been tested in several different scenarios—including simple classical channel models and more realistic optical fiber channels. They are accurate for a wide range of SNRs, and are able to cope with non-Gaussian distribution, interference, and a long channel memory. In all the considered cases, the non-parametric methods have outperformed the Gaussian-auxiliary-channel lower bound and approached either the exact MI (when available) or the tightest available bounds, never exceeding them. These encouraging results suggest that kNN-based nonparametric MI estimators might be a useful tool for the analysis of the optical fiber channel and deserve more attention. Further investigations are required to verify the effectiveness of the methods in different scenarios, such as wavelength-division multiplexing systems, and possibly to build provable lower bounds out of these methods. R EFERENCES [1] E. Agrell, M. Karlsson, A. Chraplyvy, D. J. Richardson, P. M. Krummrich, P. Winzer, K. Roberts, J. K. Fischer, S. J. Savory, B. J. Eggleton et al., “Roadmap of optical communications,” Journal of Optics, vol. 18, no. 6, p. 063002, 2016. [2] P. P. Mitra and J. B. Stark, “Nonlinear limits to the information capacity of optical fiber communications,” Nature, vol. 411, no. 6841, pp. 1027– 1030, 28 Jun. 2001. [3] R.-J. Essiambre, G. Kramer, P. J. Winzer, G. J. Foschini, and B. Goebel, “Capacity limits of optical fiber networks,” Journal of Lightwave Technology, vol. 28, no. 4, pp. 662–701, 2010. [4] G. Kramer, M. Yousefi, and F. Kschischang, “Upper bound on the capacity of a cascade of nonlinear and noisy channels,” in IEEE Information Theory Workshop (ITW), April 2015. [5] M. Secondini and E. Forestieri, “Scope and limitations of the nonlinear shannon limit,” Journal of Lightwave Technology, vol. 35, no. 4, pp. 893–902, 2017. [6] D.-M. Arnold, H.-A. Loeliger, P. O. Vontobel, A. Kavcic, and W. Zeng, “Simulation-based computation of information rates for channels with memory,” IEEE Transactions on Information Theory, vol. 52, no. 8, pp. 3498–3508, 2006. [7] K. Turitsyn, S. Derevyanko, I. Yurkevich, and S. Turitsyn, “Information capacity of optical fiber channels with zero average dispersion,” Physical review letters, vol. 91, no. 20, p. 203901, 2003. [8] E. Agrell, A. Alvarado, G. Durisi, and M. Karlsson, “Capacity of a nonlinear optical channel with finite memory,” Journal of Lightwave Technology, vol. 32, no. 16, pp. 2862–2876, 2014. [9] T. Fehenberger and N. Hanik, “Mutual information as a figure of merit for optical fiber systems,” arXiv preprint arXiv:1405.2029, 2014. [10] L. Kozachenko and N. N. Leonenko, “Sample estimate of the entropy of a random vector,” Problemy Peredachi Informatsii, vol. 23, no. 2, pp. 9–16, 1987. [11] A. Kraskov, H. Stögbauer, and P. Grassberger, “Estimating mutual information,” Physical review E, vol. 69, no. 6, p. 066138, 2004. [12] D. Lombardi and S. Pant, “Nonparametric k-nearest-neighbor entropy estimator,” Physical Review E, vol. 93, no. 1, p. 013310, 2016. [13] M. Secondini, E. Forestieri, and G. Prati, “Achievable information rate in nonlinear wdm fiber-optic systems with arbitrary modulation formats and dispersion maps,” Journal of Lightwave Technology, vol. 31, no. 23, pp. 3839–3852, 2013. [14] M. I. Yousefi and F. R. Kschischang, “The per-sample capacity of zero-dispersion optical fibers,” in 2011 12th Canadian Workshop on Information Theory, May 2011, pp. 98–101. [15] N. V. Irukulapati, M. Secondini, E. Agrell, P. Johannisson, and H. Wymeersch, “Tighter lower bounds on mutual information for fiberoptic channels,” arXiv preprint arXiv:1606.09176, 2016.
7cs.IT
arXiv:1512.00638v1 [math.GR] 2 Dec 2015 Minimal genus of a multiple and Frobenius number of a quotient of a numerical semigroup F. Strazzanti Abstract Given two numerical semigroups S and T and a positive integer d, S is said to be one over d of T if S = {s ∈ N | ds ∈ T } and in this case T is called a d-fold of S. We prove that the minimal genus of ⌉, where g and f denote the genus and the d-folds of S is g + ⌈ (d−1)f 2 the Frobenius number of S. The case d = 2 is a problem proposed by Robles-Pérez, Rosales, and Vasco. Furthermore, we find the minimal genus of the symmetric doubles of S and study the particular case when S is almost symmetric. Finally, we study the Frobenius number of the quotient of some families of numerical semigroups. MSC: 20M14; 13H10. Keywords Quotient of a numerical semigroup · Genus · Symmetric numerical semigroup · Almost symmetric semigroup · Frobenius number · d-symmetric semigroup · Numerical duplication. 1 Introduction A monoid S ⊆ N is called numerical semigroup if N \ S is finite. Numerical semigroup theory has application in several contexts. For example in [15] Rosales, Garcı́a-Sánchez, Garcı́a-Garcı́a, and Urbano-Blanco Preprint of an article published in International Journal of Algebra and Computation 25 (2015), no. 6, 1043–1053, DOI: 10.1142/S0218196715500290 c World Scientific Publishing Company http://www.worldscientific.com/doi/abs/10.1142/S0218196715500290 1 studied Diophantine inequalities of the form ax mod b ≤ cx with a, b and c positive integers and proved that the set of their nonnegative solutions is a numerical semigroup; they called such a semigroup proportionally modular numerical semigroup. In order to characterize these semigroups, they introduced the concept of quotient of a numerical semigroup: given two numerical semigroups S, T and a positive integer d, we write S = Td if S = {s ∈ N | sd ∈ T }; we also say that T is a multiple of S. In [10, Corollary 3.5] it is proved that a numerical semigroup is proportionally modular if and only if there exist two positive integers a, d such that S = ha,a+1i . d After these works, the notion of quotient of a numerical semigroup has been widely studied. In [11] Robles-Pérez, Rosales, and Vasco studied the set of the doubles of a numerical semigroup S, that is the set of the semigroups T such that S = T2 . At the end of their article, the authors asked for a formula, that depend on S, for computing the minimum of the genus of a double of S, where the genus of a numerical semigroup is the cardinality of its complement in N. In this paper we find this formula in a more general frame; indeed in Theorem 2.1 we prove that     S (d − 1)f (S) = g(S) + , min g(S) | S = d 2 where g(·) denotes the genus and f (·) is the Frobenius number, that is the largest integer that is not in the numerical semigroup. If R is a one-dimensional, noetherian, local, and analytically irreducible domain, it is possible to associate to it a numerical semigroup S. In this case the properties of R can be translated in numerical properties and conversely; a famous result in this context is that R is Gorenstein if and only if S is symmetric (see Chapter II of [2]). For this reason symmetric numerical semigroups are extensively studied and in this context, in [3], Barucci and Fröberg introduced a generalization of symmetric semigroups and Gorenstein rings that they called, respectively, almost symmetric numerical semigroups and almost Gorenstein rings. Rosales and Garcı́a-Sánchez proved in [13] that, given a numerical semigroup S, there exist infinitely many symmetric doubles of S. We also find the minimal genus of the semigroups in this family and construct the unique semigroup that has this genus; to do this, we use the numerical duplication of a numerical semigroup defined in [5]. The formula is more satisfactory when S is almost symmetric. 2 A numerical semigroup is said to be d-symmetric if for all integers n ∈ Z, whenever d divides n, either n or f (S) − n is in S. In the last section we prove that, if S is d-symmetric, then   S f (S) − x f = , d d where x is the minimum integer of S such that x ≡ f (S) mod d. As a corollary, this formula holds for symmetric and pseudo-symmetric numerical semigroups. Unfortunately, in general, it is difficult to find x, but, when S is symmetric and d = 2, it is simply the minimum odd generator of S. We also give a description of f ( S5 ) when S is generated by two consecutive elements. This research is motivated by the characterization of proportionally modular numerical semigroups and it is an open question proposed first in [14] and after in [6]. Finally, another simple formula is found for some particular almost symmetric semigroups (cfr. Corollary 2.6). The paper is organized as follows. In the second section we find the formula for the minimal genus of a multiple of a numerical semigroup S (see Theorem 2.1) and in Corollary 2.5 we characterize the semigroup with minimal genus when S is almost symmetric. In Section 3 we find the minimal genus of a symmetric double of S and construct the unique semigroup that has this genus (see Proposition 3.1); moreover, in Corollary 3.3 we study the particular case of S almost symmetric. Finally, in the last section, we prove the formula for the Frobenius number of the quotient of a d-symmetric numerical semigroup (see Theorem 4.2) and we give corollaries in some particular cases. 2 Minimal genus of a multiple of a numerical semigroup Given a numerical semigroup S, we call the elements of N \ S gaps and their cardinality g(S) is the genus of S; moreover the maximum integer that is not in S is called Frobenius number of S and it is denoted by f (S). Let S and T be two numerical semigroups. We say that S is one over d of T or that T is a d-fold of S, if S = {s ∈ N | ds ∈ T }. If d = 2 we say that S is one half of T or that T is a double of S and we denote the set of doubles 3 of S with D(S). Robles-Pérez, Rosales, and Vasco proposed the following problem: Problem [11, Problem 42] Let S be a numerical semigroup. Find a formula, that depend on S, for computing min{g(S) | S ∈ D(S)}. In this paper we answer to this question in a more general frame; indeed in the next theorem we find a formula for the minimal genus of a d-fold of S. We set d · X = {dx | x ∈ X}. Theorem 2.1. Let S be a numerical semigroup with Frobenius number f and let d ≥ 2 be an integer. Then     S (d − 1)f = g(S) + . min g(S) | S = d 2 ⌉ = ⌊ df2 ⌋ − ⌊ f2 ⌋. Let S be a d-fold of S. Proof. We first note that ⌈ (d−1)f 2 It is easy to see that S has exactly g(S) gaps that are multiples of d. In order to count the other gaps, we note that df ∈ / S because f ∈ / S. Consider 0 < x ≤ df /2, x not a multiple of d. If x is not a gap of S, then df − x ∈ / S, since df is not in S. All these gaps are different and, since there are ⌊ f2 ⌋ multiples of d smaller than df /2, they are ⌊ df2 ⌋ − ⌊ f2 ⌋. Hence we get g(S) ≥ g(S) + ⌊ df2 ⌋ − ⌊ f2 ⌋ = g(S) + ⌈ (d−1)f ⌉. 2 To prove the theorem we only need to exhibit a d-fold of S with genus g(S) + ⌊ df2 ⌋ − ⌊ f2 ⌋. It easy to see that such a semigroup is T = d · S ∪ {b + i | i ∈ N, d ∤ b + i}, where b = ⌊ df2 ⌋ + 1. In the next example we will see that there can be several numerical semigroups whose genus equals the minimum obtained in the previous theorem. However, by its proof, it is clear that all these semigroups have Frobenius number df ; consequently there are finitely many such semigroups. If x1 , . . . , xr are integers, we denote by {x1 , . . . , xr →} the set {x1 , . . . , xr } ∪ {xr + i | i ∈ N}. Example 2.2. Consider S = {0, 3, 6 →} and set d = 3. According to the proof of the previous theorem, a “triple” of S with minimal genus is {0, 8, 9, 10, 11, 13, 14, 16 →} that has genus g(S) + ⌈ (3−1)5 ⌉ = 4 + 5 = 9. 2 4 Notice that {0, 7, 9, 10, 11, 13, 14, 16 →} is another triple of S with minimal genus. The integers x ∈ / S such that x+s ∈ S for all s ∈ S \{0} are called pseudoFrobenius numbers and we denote by PF(S) the set of the pseudo-Frobenius numbers of S. The integer t(S) = |PF(S)| is the type of S. Moreover we call a numerical semigroup S almost symmetric if L(S) ⊆ PF(S), where L(S) = {x ∈ Z \ S | f (S) − x ∈ / S}. Given a numerical semigroup S, it is always true (see [9, Proposition 2.2]) that f (S) + t(S) g(S) ≥ 2 and it is well-known that the equality holds if and only if S is almost symmetric. Proposition 2.3. Let S be a numerical semigroup with Frobenius number f and let S be a d-fold of S with minimal genus. 1) If f is even or d is odd, S has type t(S); 2) If f is odd and d is even, S has type either t(S) or t(S) + 1. Moreover if S is almost symmetric, S has type t(S) + 1. Proof. By the proof of Theorem 2.1 it is clear that if x ∈ / S is not a multiple of d, then df − x ∈ S or x = df /2. Consequently the pseudo-Frobenius numbers of S, different from df /2, are multiples of d. It is easy to see that this implies t(S) ≤ t(S), if f is even or d is odd, and t(S) ≤ t(S) + 1 otherwise, because in the first case df /2 is not an integer or it is a multiple of d. Let x be a pseudo-Frobenius number of S, we claim that dx ∈ PF(S). Clearly if dy ∈ S, then dx + dy = d(x + y) ∈ S, since x ∈ PF(S). Let z be a nonzero element of S that is not a multiple of d and suppose that dx + z ∈ / S. We have already noted that df − dx − z = d(f − x) − z ∈ S, then d(f − x) = d(f − x) − z + z ∈ S and this implies f − x ∈ S; this is a contradiction because x ∈ PF(S) and then x + (f − x) = f ∈ S. Hence t(S) ≥ t(S) and this proves 1) and the first part of 2). We only need to prove that if f is odd, d is even, and S is almost symmetric, then df /2 is a pseudo-Frobenius number of S. Suppose that there exists x ∈ S \ {0} such that df /2 + x ∈ / S. If df − (df /2 + x) = df /2 − x ∈ S, then df /2 ∈ S and thus df ∈ S; contradiction. If df /2 − x ∈ / S, since it is a muldf /2−x ∈ L(S) ⊆ PF(S) tiple of d by the beginning of the proof, we have d that implies df /2 − x ∈ PF(S) by the first part of the proof and thus df /2 = df /2 − x + x ∈ S; contradiction. 5 If S is not almost symmetric, f is odd, and d is even, the type of S can be t(S) as shows the following example. However we note that in this case the semigroup T constructed in the proof of Theorem 2.1 always has type t(S) + 1. Example 2.4. Consider S = {0, 5, 6, 7, 10 →} that is not almost symmetric. We note that the numerical semigroups T = {0, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 33, 34, 35, 37 →}, T ′ = {0, 14, 19, 20, 21, 23, 24, 25, 26, 27, 28, 29, 30, 31, 33, 34, 35, 37 →} are 4-folds of S with minimal genus. Since 18 is a pseudo-Frobenius number of T but not of T ′ , we have t(T ) = 3 = t(S) + 1 and t(T ′ ) = 2 = t(S). Corollary 2.5. Let S be an almost symmetric numerical semigroup with Frobenius number f and let S be a d-fold of S. Set t = t(S) if f is even or d is odd, and set t = t(S) + 1 otherwise. Then S has minimal genus if and only if it is almost symmetric with type t. Proof. In light of the previous proposition we can assume that S has type t. Suppose first that f is even or d is odd. Since S is almost symmetric, t(S) = 2g(S) − f ; then   df + t df + 2g(S) − f (d − 1)f (d − 1)f g(S) ≥ = = g(S) + = g(S) + 2 2 2 2 and we have the equality, i.e. S has minimal genus, if and only if S is almost symmetric. In the second case we can use the same argument. Since a d-fold of S with minimal genus has Frobenius number df (S), we get the next corollary. Corollary 2.6. Let S, S, and t be as in the previous corollary. If S is almost symmetric with type t, then d divides f (S) and f (S) = f (S)/d. In the last section we will study the Frobenius number of the quotient for other families of numerical semigroups. 6 3 Genus of a symmetric double of a numerical semigroup A numerical semigroup S is called symmetric if it has type one. It is wellknown that S is symmetric if and only if g(S) = f (S)+1 (see [14, Corollary 2 4.5]) and this implies that a symmetric numerical semigroup is almost symmetric. In [13] it is proved that every numerical semigroup is one half of infinitely many symmetric semigroups. We set   S D(S) = S symmetric numerical semigroup | S = . 2 In this section we want to find the elements of D(S) with minimal genus. Let b be an odd element of S. The numerical duplication of a numerical semigroup S with respect to a relative ideal E and b is defined in [5] as S ✶b E = 2 · S ∪ (2 · E + b) where we recall that 2 · X = {2x | x ∈ X}. This is a numerical semigroup if and only if E + E + b ⊆ S. Since S is one half of S ✶b E, this construction is useful to study the doubles of S (for another application of numerical duplication see [1]). Set K = {k | f (S) − k ∈ / S}; we call E canonical ideal of S if E = K + x for some x ∈ Z. In [16, Corollary 3.10] it is proved that D(S) = {S ✶b E | E + E + b ⊆ S and E is a canonical ideal of S}. ′ Set E = K + x, then it is straightforward to check that S ✶b E = S ✶b K, where b′ = 2x + b ∈ S. Consequently we get D(S) = {S ✶b K | K + K + b ⊆ S}. Let S ✶b K be an element of D(S). By construction and since f (K) = f (S), its Frobenius number is the maximum between 2f (S) and 2f (S) + b, that is 2f (S) + b. Since S ✶b K is symmetric, its genus is f (S ✶b K) + 1 2f (S) + b + 1 b+1 g(S ✶ K) = = = f (S) + , 2 2 2 therefore we get the minimum genus when b is minimum. Hence we can state the following proposition: b 7 Proposition 3.1. There exists a unique numerical semigroup with minimal genus among the members of D(S) and it is S ✶b K, where b is the minimum odd element of S such that K + K + b ⊆ S. Its genus is f (S) + b+1 . 2 We notice that if b > f (S), then K + K + b ⊆ S; this means that we have to check a finite number of elements to find the b with the property of the above proposition. Example 3.2. Consider the numerical semigroup S = {0, 5, 7, 8, 10, 12 →}. In this case K = {0, 2, 5, 7, 8, 9, 10, 12 →}. Since 2+2+5 ∈ / S and 0+2+7 ∈ / S, we have K +K +5 * S and K +K +7 * S, while K +K +13 ⊆ S because 13 is greater than f (S). Hence the symmetric double of S with minimal genus is S ✶13K = {0, 10, 13, 14, 16, 17, 20, 23, 24, 26, 27, 28, 29, 30, 31, 32, 33, 34, 36 →} that has genus f (S) + b+1 = 18. Note that the minimum genus of a double 2 f (S) of S is g(S) + ⌈ 2 ⌉ = 13 and, according to the proof of Theorem 2.1, it is obtained by the semigroup {0, 10, 13, 14, 15, 16, 17, 19, 20, 21, 23 →}. There is a particular case in which we can avoid looking for the “right” b. Corollary 3.3. Let S be an almost symmetric numerical semigroup. The element with minimal genus in the family D(S) is S ✶b K, where b is the . minimum odd element of S. Its genus is f (S) + b+1 2 Proof. It is enough to prove that K + K + b ⊆ S. By definition K = S ∪L(S) and this implies K = (S ∪ PF(S)) \ {f (S)} because L(S) = PF(S) \ {f (S)}, since S is almost symmetric. Therefore it is very easy to check that K + K + b ⊆ S, since b ∈ S \ {0}. Example 3.4. Consider the almost symmetric numerical semigroup S = {0, 6, 7, 11, 12, 13, 14, 16 →}. Since 7 is the minimum odd integer of S, the minimal genus of a symmetric double of S is 15 + 8/2 = 19 and it is obtained by {0, 7, 12, 14, 17, 19, 21, 22, 24, 26, 27, 28, 29, 31, 32, 33, 34, 35, 36, 38 →}. 4 The Frobenius number of the quotient In this section we study the Frobenius number of a quotient of some particular numerical semigroups. In a particular case we have already found a formula in Corollary 2.6. The next definition is due to Swanson, see [17]. 8 Definition 4.1. Let d be a positive number. A numerical semigroup is said to be d-symmetric if for all integers n ∈ Z, whenever d divides n, either n or f (S) − n is in S. It is easy to see that a symmetric numerical semigroup is d-symmetric for any d ∈ N and that a 1-symmetric semigroup is symmetric (see [14, Proposition 4.4]). Theorem 4.2. Let d ≥ 2 be an integer and let S be a d-symmetric numerical semigroup. If x is the smallest element of S such that x ≡ f (S) (mod d), then   S f (S) − x f = . d d ∈ / Sd . Suppose by Proof. Since x ∈ S, f (S) − x is a gap of S; therefore f (S)−x d contradiction that there exists a gap y of Sd greater than f (S)−x . Then dy is d not in S and this implies f (S)−dy ∈ S, since S is d-symmetric. Consequently we have x ≤ f (S) − dy by definition of x, but this is a contradiction because , i.e. x > f (S) − dy. y > f (S)−x d Example 4.3. Consider the numerical semigroup S = {0, 6, 9, 10, 12, 14 →} that is 3-symmetric but not 4-symmetric (and then not symmetric). By the previous theorem, we get   S 13 − 10 f = = 1, 3 3 while for S/4. S 4 the formula gives again 1 that is not the Frobenius number of We remember that a numerical semigroup is pseudo-symmetric if f (S) is even and for any n ∈ / S different from f (S)/2, one has f (S) − n ∈ S. Corollary 4.4. Let S be either a symmetric or a pseudo-symmetric numerical semigroup. If x is the smallest element of S such that x ≡ f (S) mod d, then   f (S) − x S = f d d for any integer d ≥ 2. 9 Proof. We note that a symmetric numerical semigroup is d-symmetric, while a pseudo-symmetric numerical semigroup is d-symmetric if and only if 2d does not divide f (S). If f (S) is a multiple of d we have x = 0 and it is trivial to note that f (S)/d is the maximum gap of Sd . Since symmetric and pseudo-symmetric numerical semigroups are the almost symmetric numerical semigroups with type one and two respectively, it is natural to ask if the previous corollary holds also for almost symmetric numerical semigroups. The next example shows that this is not true. Example 4.5. Let d ≥ 2 be an integer and consider the numerical semigroup S = {0, d + 2 →}. We have Sd = {0, 2 →} but the formula of the previous corollary would give   S d + 1 − (2d + 1) f = = −1 d d that is false. If a1 , . . . , ae ∈ N we set ha1 , . . . , ae i = {λ1 a1 + · · · + λe ae | λ1 , . . . , λe ∈ N}; this is a numerical semigroup if and only if gcd(a1 , . . . , ae ) = 1. We say that a1 , . . . , ae is a system of generators of ha1 , . . . , ae i; it is well-known that there exists a unique minimal system of generators of a numerical semigroup. Unfortunately, in general, it is not easy to find the element x of Theorem 4.2, but we can say more in a particular case. Corollary 4.6. Let S be a symmetric numerical semigroup. Then   S f (S) − x f = , 2 2 where x is the smallest odd generator of S. Proof. The thesis follows from the previous corollary because in a symmetric numerical semigroup the Frobenius number is odd (see [14, Proposition 4.4]). We note that the previous corollary holds for any system of generators. The next corollary was proved in a different way in [12, Proposition 7]. 10 Corollary 4.7. Let a < b be two positive integers with gcd(a, b) = 1. Then   ( ab−b − a if a is odd, ha, bi 2 f = ab−a 2 − b if a is even. 2 Proof. It is well-known that ha, bi is symmetric, see Corollary 4.17 of [14], moreover Sylvester proved in [18] that f (ha, bi) = ab − a − b (it is possible to find this result also in [14, Proposition 2.13]). If a is odd, we have x = a and then   f (ha, bi) − a ab − a − b − a ab − b ha, bi = = = − a. f 2 2 2 2 If a is even, then b is odd because gcd(a, b) = 1 and consequently x = b. The second formula can be found with the same argument of the first one.   In [14] and in [6] the authors ask for a formula for f ha,bi , at least if d b = a + 1. To this aim it is possible to use Corollary 4.4, but can be difficult to find x. In the next corollary we give a formula for d = 5. Corollary 4.8. Let a be a positive integer.  a2  5 −a−1      a2 −3a−3 ha, a + 1i 5 f = a2 −a−1  5  5   a2 −1 −a 5 Then if if if if a ≡ 0 mod 5, a ≡ 1, 2 mod 5, a ≡ 3 mod 5, a ≡ 4 mod 5. Proof. By Sylvester’s formula the Frobenius number of ha, a+ 1i is a2 −a−1. We only need to find the minimum x ∈ S such that x ≡ a2 − a − 1 mod 5 and it is easy to see that x = 4(a + 1) x = 2(a + 1) x=0 x = 4a if if if if a ≡ 0 mod 5, a ≡ 1, 2 mod 5, a ≡ 3 mod 5, a ≡ 4 mod 5. 11  Clearly Corollary 4.6 gives a formula for f S2 , provided that we know a formula for f (S). In the next corollary we collect some cases using the formulas found in [8, Corollary 3.11], [7, Theorem 4], and [4, Théorème 2.3] respectively; for the first and the third case see also Remark 10.7 and Proposition 9.15 of [14]. Let T = hn1 , . . . , ne i be a numerical semigroup. We set x = min{ni | ni is odd}, ci = min{k ∈ N \ {0} | kni ∈ hn1 , . . . , ni−1 , ni+1 , . . . , ne i}, X ci ni = rij nj . j6=i Corollary 4.9. 1) Let S be a numerical semigroup with three minimal generators. It is symmetric if and only if S = ham1 , am2 , bm1 + cm2 i, where a, b, c, m1 , m2 are natural numbers such that a ≥ 2, b+c ≥ 2, gcd(m1 , m2 ) = 1, and gcd(a, bm1 + cm2 ) = 1. In this case   a(m1 m2 − m1 − m2 ) + (a − 1)(bm1 + cm2 ) − x S = ; f 2 2 2) Let S = hn1 , . . . , n4 i be a symmetric numerical semigroup that is not complete intersection, then   n2 c2 + n3 c3 + n4 r14 − (n1 + n2 + n3 + n4 + x) S = f ; 2 2 3) If S is a free numerical semigroup for the arrangement of its minimal generators {n1 , . . . , ne }, then   S (c2 − 1)n2 + · · · + (ce − 1)ne − n1 − x f = . 2 2 Acknowledgments. The author thanks Pedro Garcı́a-Sánchez for his careful reading of an earlier version of the paper. 12 References [1] V. Barucci, M. D’Anna, F. Strazzanti, A family of quotients of the Rees algebra, Communications in Algebra 43 (2015), no. 1, 130–142. [2] V. Barucci, D. E. Dobbs, M. Fontana, Maximality properties in numerical semigroups and applications to one-dimensional analytically irreducible local domain, Mem. Amer. Math. Soc. vol. 125, no. 598 (1997). [3] V. Barucci, R. Fröberg, One-dimensional almost Gorenstein rings, Journal of Algebra 188 (1997), 418–442. [4] J. Bertin, P. Carbonne, Semi-groupes d’entiers et application aux branches, Journal of Algebra 49 (1977), 81–95. [5] M. D’Anna, F. Strazzanti, The numerical duplication of a numerical semigroup, Semigroup Forum 87 (2013), no. 1, 149–160. [6] M. Delgado, P. A. Garcı́a-Sánchez, J. C. Rosales, Numerical semigroups problem list, CIM Bulletin 33 (2013), 15–26. [7] R. Fröberg, The Frobenius number of some semigroups, Communications in Algebra 22 (1994), no. 14, 6021–6024. [8] J. Herzog, Generators and relations of abelian semigroups and semigroup rings, Manuscripta Mathematica 3 (1970), 175–193. [9] H. Nari, Symmetries on almost symmetric numerical semigroups, Semigroup Forum 86 (2013), no. 1, 140–154. [10] A. M. Robles-Pérez, J. C. Rosales, Equivalent proportionally modular Diophantine inequalities, Archiv der Mathematik 90 (2008), no. 1, 24–30. [11] A. M. Robles-Pérez, J. C. Rosales, P. Vasco, The doubles of a numerical semigroup, Journal of Pure and Applied Algebra 213 (2009), no. 3, 387–396. [12] J. C. Rosales, Fundamental gaps of numerical semigroups generated by two elements, Linear Algebra and its applications 405 (2005), 200–208. [13] J. C. Rosales, P. A. Garcı́a-Sánchez, Every numerical semigroup is one half of infinitely many symmetric numerical semigroups, Communications in Algebra 36 (2008), 2910–2916. [14] J. C. Rosales, P. A. Garcı́a-Sánchez, Numerical Semigroups, Springer Developements in Mathematics, Vol 20, 2009. [15] J. C. Rosales, P. A. Garcı́a-Sánchez, J. I. Garcı́a-Garcı́a, J. M. Urbano-Blanco, Proportionally modular Diophantine inequalities, Journal of Number Theory 103 (2003), 281–294. 13 [16] F. Strazzanti, One half of almost symmetric numerical semigroups, Semigroup Forum 91 (2015), no. 2, 463–475. [17] I. Swanson, Every numerical semigroup is one over d of infinitely many symmetric numerical semigroups, Commutative algebra and its applications, Walter de Gruyter, Berlin, (2009), 383–386. [18] J. J. Sylvester, Mathematical questions with their solutions, Educational Times 41 (1884), no. 21. Department of Mathematics, University of Pisa, Largo Bruno Pontecorvo 5, 56127 Pisa, Italy E-mail address: [email protected] 14
0math.AC
(DE)2 CO: Deep Depth Colorization arXiv:1703.10881v3 [cs.CV] 21 Feb 2018 F. M. Carlucci*, P. Russo*, and B. Caputo1 Abstract— The ability to classify objects is fundamental for robots. Besides knowledge about their visual appearance, captured by the RGB channel, robots heavily need also depth information to make sense of the world. While the use of deep networks on RGB robot images has benefited from the plethora of results obtained on databases like ImageNet, using convnets on depth images requires mapping them into three dimensional channels. This transfer learning procedure makes them processable by pre-trained deep architectures. Current mappings are based on heuristic assumptions over preprocessing steps and on what depth properties should be most preserved, resulting often in cumbersome data visualizations, and in sub-optimal performance in terms of generality and recognition results. Here we take an alternative route and we attempt instead to learn an optimal colorization mapping for any given pre-trained architecture, using as training data a reference RGB-D database. We propose a deep network architecture, exploiting the residual paradigm, that learns how to map depth data to three channel images. A qualitative analysis of the images obtained with this approach clearly indicates that learning the optimal mapping preserves the richness of depth information better than current hand-crafted approaches. Experiments on the Washington, JHUIT-50 and BigBIRD public benchmark databases, using CaffeNet, VGG16, GoogleNet, and ResNet50 clearly showcase the power of our approach, with gains in performance of up to 16% compared to state of the art competitors on the depth channel only, leading to top performances when dealing with RGB-D data. I. INTRODUCTION Robots need to recognize what they see around them to be able to act and interact with it. Recognition must be carried out in the RGB domain, capturing mostly the visual appearance of things related to their reflectance properties, as well as in the depth domain, providing information about the shape and silhouette of objects and supporting both recognition and interaction with items. The current mainstream state of the art approaches for object recognition are based on Convolutional Neural Networks (CNNs, [1]), which use end-to-end architectures achieving feature learning and classification at the same time. Some notable advantages of these networks are their ability to reach much higher accuracies on basically any visual recognition problem, compared to what would be achievable with heuristic methods; their being domain-independent, and their conceptual simplicity. Despite these advantages, they also present some limitations, such as This work was partially supported by the ERC grant 637076 RoboExNovo (F.M.C., P. R., B.C.), and the CHIST-ERA project ALOOF (B.C, F. M. C., P. R.). ∗ Equal contribution 1 All authors are at the Department of Computer, Control, and Management Engineering Antonio Ruberti at Sapienza Rome University, Italy and at the Italian Institute of Technology, VANDAL Laboratory, Milan, Italy { fabio.carlucci,paolo.russo, barbara.caputo } @iit.it high computational cost, long training time and the demand for large datasets, among others. This last issue has so far proved crucial in the attempts to leverage over the spectacular success of CNNs over RGBbased object categorization [2], [3] in the depth domain. Being CNNs data-hungry algorithms, the availability of very large scale annotated data collections is crucial for their success, and architectures trained over ImageNet [4] are the cornerstone of the vast majority of CNN-based recognition methods. Besides the notable exception of [5], the mainstream approach for using CNNs on depth-based object classification has been through transfer learning, in the form of a mapping able to make the depth input channel compatible with the data distribution expected by RGB architectures. Following recent efforts in transfer learning [6], [7], [8] that made it possible to use depth data with CNN pre-trained on a database of a different modality, several authors proposed hand-crafted mappings to colorize depth data, obtaining impressive improvements in classification over the Washington [9] database, that has become the golden reference benchmark in this field [10], [11]. We argue that this strategy is sub-optimal. By handcrafting the mapping for the depth data colorization, one has to make strong assumptions on what information, and up to which extent, should be preserved in the transfer learning towards the RGB modality. While some choices might be valid for some classes of problems and settings, it is questionable whether the family of algorithms based on this approach can provide results combining high recognition accuracies with robustness across different settings and databases. Inspired by recent works on colorization of grayscale photographs [12], [13], [14], we tackle the problem by exploiting the power of end-to-end convolutional networks, proposing a deep depth colorization architecture able to learn the optimal transfer learning from depth to RGB for any given pre-trained convnet. Our deep colorization network takes advantage of the residual approach [15], learning how to map between the two modalities by leveraging over a reference database (Figure 1, top), for any given architecture. After this training stage, the colorization network can be added on top of its reference pre-trained architecture, for any object classification task (Figure 1, bottom). We call our network (DE)2 CO: DEep DEpth COlorization. We assess the performance of (DE)2 CO in several ways. A first qualitative analysis, comparing the colorized depth images obtained by (DE)2 CO and by other state of the art hand-crafted approaches, gives intuitive insights on the advantages brought by learning the mapping as opposed to choosing it, over several databases. We further deepen this analysis with an experimental evaluation of our and other existing transfer learning methods on the depth channel only, using four different deep architectures and three different public databases, with and without fine-tuning. Finally, we tackle the RGB-D object recognition problem, combining (DE)2 CO with off-the shelf state of the art RGB deep networks, benchmarking it against the current state of the art in the field. For all these experiments, results clearly support the value of our algorithm. All the (DE)2 CO modules, for all architectures employed in this paper, are available at https://github.com/fmcarlucci/de2co. II. RELATED WORK Since 2012’s AlexNet [3] spectacular success, CNNs have become the dominant learning paradigm in visual recognition. Several architectures have been proposed in recent years, each bringing new flavors to the community. Simonyan and Zisserman [16] investigated the effect of increasing the network depth. GoogLeNet [2] also increased the depth and width of the network while restraining the computational budget, with a dramatic reduction in the number of parameters. He et al. [15] proposed a residual learning approach using a batch normalization layer and special skip connections for training deeper architectures, showing an impressive success in ILSVRC2015. All these architectures will be used in this work, to assess its generality. Lately, several authors attempted to take advantage of pretrained CNNs to perform RGB-D detection and recognition. Colorization of depth images can be seen as a transfer learning process across modalities, and several works explored this avenue within the deep learning framework. In the context of RGB-D object detection, a recent stream of works explicitly addressed cross modal transfer learning through sharing of weights across architectures [17], [18] and [19]. This last work is conceptually close to our approach, as it proposes to learn how to transfer RGB extracted information to the Depth domain through distillation [20]. While [19] has proved very successful in the object detection realm, it presents some constraints that might potentially be problematic in object recognition, from the requirement of paired RGB-D images, to detailed data preprocessing and preparation for training. As opposed to this, our algorithm does not require explicit pairing of images in the two modalities, can be applied successfully on raw pixel data and does not require other data preparation for training. Within the RGB-D classification literature, [21] converts the depth map to surface normals and then re-interprets it as RGB values, while Aekerberg et al. [22] builds on this approach and suggests an effective preprocessing pipeline to increase performance. A new method has also been proposed by Gupta, Saurabh, et al. [23] : HHA is a mapping where one channel encodes the horizontal disparity, one the height above ground and the third the pixelwise angle between the surface normal and the gravity vector. Schwarz et al [24] proposed a colorization pipeline where colors are assigned to the image pixels according to the distance of the vertexes of a rendered mesh to the center of the object. Besides the naive grayscale method, the rest of the mentioned colorization schemes are computationally expensive. Eitel et al [11] used a simple color mapping technique known as ColorJet, showing this simple method to be competitive with more sophisticated approaches. All these works, and many others [25], [5], make use of an ad-hoc mapping for converting depth images into three channels. This conversion is vital as the dataset has to be compatible with the pre-trained CNN. Depth data is encoded as a 2D array where each element represents an approximate distance between the sensor and the object. Depth information is often depicted and stored as a single monochrome image. Compared to regular RGB cameras, the depth resolution is relatively low, especially when the frame is cropped to focus on a particular object. While addressing this issue, we avoid heuristic choices in our approach and we rely instead on an end-to-end, residual based deep architecture to learn the optimal mapping for the cross modal knowledge transfer. Most of works in object recognition, against whom we compare our method, are evaluated on one single database, with Washington being the standard choice in the robot vision literature. This raises concerns about the generality of these methods, especially considering their hand-crafted nature. We circumvent this issue by evaluating (DE)2 CO on three different databases. Our work is also related to the colorization of grayscale images using deep nets. Cheng et al [14] proposed a colorization pipeline based on three different hand-designed feature extractors to determine the features from different levels of an input image. Larsson et al [13] used an architecture consisting of two parts. The first part is a fully convolutional version of VGG-16 used as feature extractor, and the second part is a fully-connected layer with 1024 channels predicting the distributions of hue and the chroma for each pixel given its feature descriptors from the previous level. Iizuka et al [12] proposed an end-to-end network able to learn global and local features, exploiting the classification labels for better image colorization. Their architecture consists of several networks followed by fusion layer for the colorization task. Sun et al. [26] propose to use large scale CAD rendered data to leverage depth information without using low level features or colorization. In Asif et al. [27], hierarchical cascaded forests were used for computing grasp poses and perform object classification, exploiting several different features like orientation angle maps, surface normals and depth information colored with Jet method. Our work differs from this last research thread in the specific architecture proposed, and in its main goal, as here we are interested in learning optimal mapping for categorization rather than for colorization of grayscale images. III. COLORIZATION OF DEPTH IMAGES Although depth and RGB are modalities with significant differences, they also share enough similarities (edges, gradients, shapes) to make it plausible that convolutional filters learned from RGB data could be re-used effectively for Fig. 1: The (DE)2 CO pipeline consists of two phases. First, we learn the mapping, from depth to color, maximizing the discrimination capabilities of a network pre trained on ImageNet. In this step the network is frozen and we are only learning the mapping and the final layer. We then evaluate the colorization on a different depth dataset: here we also freeze the colorization network and only train a new final layer for the testbed dataset. representing colorized depth images. The approach currently adopted in the literature consists of designing ad-hoc colorization algorithms, as revised in the previous section. We refer to these kind of approaches as hand-crafted depth colorization. Specifically, we choose ColorJet [11], SurfaceNormals [21] and SurfaceNormals++ [22] as baselines against which we will assess our data driven approach because of their popularity and effectiveness. In the rest of the section we first briefly summarize ColorJet (section III-A), SurfaceNormals and SurfaceNormals++ (section III-B). We then describe our deep approach to depth colorization (section III-C). To the best of our knowledge, (DE)2 CO is the first deep colorization architecture applied successfully to depth images. A. Hand-Crafted Depth Colorization: ColorJet ColorJet works by assigning different colors to different depth values. The original depth map is firstly normalized between 0-255 values. Then the colorization works by mapping the lowest value to the blue channel and the highest value to the red channel. The value in the middle is mapped to green and the intermediate values are arranged accordingly [11]. The resulting image exploits the full RGB spectrum, with the intent of leveraging at best the filters learned by deep networks trained on very large scale RGB datasets like ImageNet. Although simple, the approach gave very strong results when tested on the Washington database, and when deployed on a robot platform. Still, ColorJet was not designed to create realistic looking RGB images for the objects depicted in the original depth data (Figure 3, bottom row). This raises the question whether this mapping, although more effective than other methods presented in the literature, might be sub-optimal. In section III-C we will show that by fully embracing the end-to-end philosophy at the core of deep learning, it is indeed possible to achieve significantly higher recognition performances while at the same time producing more realistic colorized images. B. Hand-Crafted Depth Colorization: SurfaceNormals(++) The SurfaceNormals mapping has been often used to convert depth images to RGB [21], [28], [11]. The process is straightforward: for each pixel in the original image the corresponding surface normal is computed as a normalized 3D vector, which is then treated as an RGB color. Due to the inherent noisiness of the depth channel, such a direct conversion results in noisy images in the color space. To address this issue, the mapping we call SurfaceNormals++ was introduced by Aakerberg [22]: first, a recursive median filter is used to reconstruct missing depth values, subsequently a bilateral filter smooths the image to reduce noise, while preserving edges. Next, surface normals are computed for each pixel in the depth image. Finally the image is sharpened using the unsharp mask filter, to increase contrast around edges and other high-frequency components. C. Deep Depth Colorization: (DE)2 CO (DE)2 CO consists of feeding the depth maps, normalized into grayscale images, to a colorization network linked to a standard CNN architecture, pre-trained on ImageNet. Given the success of deep colorization networks from grayscale images, we first tested existing architectures in this context [29]. Extensive experiments showed that while the visual appearance of the colorized images was very good, the recognition performances obtained when combining such network with pre-trained RGB architectures was not competitive. Inspired by the generator network in [30], we propose here a residual convolutional architecture (Figure 2). By design [15], this architecture is robust and allows for deeper training. This is helpful here, as (DE)2 CO requires stacking together two networks, which for not very deep architectures might lead to vanishing gradient issues. Furthermore, residual blocks works at pixel level [30] helping to preserve locality. Our architecture works as follows: the 1x228x228 input depth map, reduced to 64x57x57 size by a conv&pool layer, passes through a sequence of 8 residual blocks, composed by 2 small convolutions with batch normalization layers and leakyRelu as non linearities. The last residual block output is convolved by a three features convolution to form the 3 channels image output. Its resolution is brought back to 228x228 by a deconvolution (upsampling) layer. Our whole system for object recognition in the depth domain using deep networks pre-trained over RGB images can be summarized as follows: the entire network, composed by (DE)2 CO and the classification network of choice, is trained on an annotated reference depth image dataset. The weights of the chosen classification network are kept frozen in their pre-trained state, as the only layer that needs to be retrained is the last fully connected layer connected to the softmax layer. Meanwhile, the weights of (DE)2 CO are updated until convergence. After this step, the depth colorization network has learned the mapping that maximizes the classification accuracy on the reference training dataset. It can now be used to colorize any depth image, from any data collection. Figure 3, top rows, shows exemplar images colorized with (DE)2 CO trained over different reference databases, in combination with two different architectures (CaffeNet, an implementation variant of AlexNet, and VGG-16 [16]). We see that, compared to the images obtained with ColorJet and SurfaceNormal++, our colorization technique emphasizes the objects contours and their salient features while flatting the object background, while the other methods introduce either high frequency noise (SurfaceNormals++) or emphasize background gradient instead of focusing mainly on the objects (ColorJet). In the next section we will show how this qualitative advantage translates also into a numerical advantage, i.e. how learning (DE)2 CO on one dataset and performing depth-based object recognition on another leads to a very significant increase in performance on several settings, compared to hand-crafted color mappings. IV. EXPERIMENTS We evaluated our colorization scheme on three main settings: an ablation study of how different depth mappings perform when the network weights are kept frozen (section IV-B), a comparison of depth performance with network finetuning (section IV-C) and finally an assessment of (DE)2 CO when used in RGB-D object recognition tasks (section IV-D). Before reporting on our findings, we illustrate the databases and baselines we used (section IV-A). A. Experimental Setup Databases We considered three datasets: the Washington RGB-D [9], the JHUIT-50 [31] and the BigBIRD [32] object datasets, which are the main public datasets for RGB-D object recognition. The first consists of 41, 877 RGB-D images organized into 300 instances divided in 51 classes. We performed experiments on the object categorization setting, where we followed the evaluation protocol defined in [9]. The JHUIT-50 is a challenging recent dataset that focuses on the problem of fine-grained classification. It contains 50 object instances, often very similar with each other (e.g. 9 different kinds of screwdrivers). As such, it presents different (64) (64) Leaky ReLU Leaky ReLU (64) Leaky ReLU (To pretrained network) Fig. 2: Overview of the (DE)2 CO colorization network. On the left, we show the overall architecture; on the right, we show details of the residual block. recognition challenges compared to the Washington database. Here we followed the evaluation procedure defined in [31]. BigBIRD is the biggest of the datasets we considered: it contains 121 object instances and 75.000 images. Unfortunately, it is an extremely unforgiving dataset for evaluating depth features: many objects are extremely similar, and many are boxes, which are indistinguishable without texture information. To partially mitigate this, we grouped together all classes annotated with the same first word: for example nutrigrain apple cinnamon and nutrigrain blueberry were grouped into nutrigrain. With this procedure, we reduced the number of classes to 61 (while keeping all of the samples). As items are quite small, we used the object masks provided by [32] to crop around the object. Evaluation-wise, we followed the protocol defined in [31]. Hand-crafted Mappings According to previous works [11], [22], the two most effective mappings are ColorJet [11] and SurfaceNormals [21], [22]. For ColorJet we normalized the data between 0 and 255 and then applied the mapping using the OpenCV libraries1 . For the SurfaceNormals mapping we considered two versions: the straightforward conversion of 1 ”COLORMAP JET” from http://opencv.org/ Fig. 3: (DE)2 CO colorizations applied on different objects, taken from[31], [9], [32]. Top row shows the depth maps mapped to grayscale. From the second to the fourth row, we show the corresponding (DE)2 CO colorizations learned on different settings. Fifth row shows ColorJet views [11], while the last row shows the surface normals mapping.[22] SurfaceNormals++. These images showcase (DE)2 CO’s ability to emphasize the object’s shape and to capture its salient features. the depthmap to surface normals [21] and the enhanced version SurfaceNormals++[22] which uses extensive preprocessing and generally performs better2 . B. Ablation Study In this setting we compared our (DE)2 CO method against hand crafted mappings, using pre-trained networks as feature extractors and only retraining the last classification layer. We did this on the three datasets described above, over four architectures: CaffeNet (a slight variant of the AlexNet [33]), VGG16 [16] and GoogleNet [2] were chosen because of their popularity within the robot vision community. We also tested the recent ResNet50 [15], which although not currently very used in the robotics domain, has some promising properties. In all cases we considered models pretrained on ImageNet [4], which we retrieved from Caffe’s Model Zoo3 . Training (DE)2 CO means minimizing the multinomial logistic loss of a network trained on RGB images. This means that our network is attached between the depth images 2 The authors graciously gave us their code for our experiments. 3 https://github.com/BVLC/caffe/wiki/Model-Zoo and the pre-trained network, of which we freeze the weights of all but the last layer, which are relearned from scratch (see Figure 1). We trained each network-dataset combination for 50 epochs using the Nesterov solver [34] and 0.007 starting learning rate (which is stepped down after 45%). During this phase, we used the whole source datasets, leaving aside only 10% of the samples for validation purposes. When the dataset on which we train the colorizer is different from the test one, we simply retrain the new final layer (freezing all the rest) for the new classes. Effectively we are using the pre-trained networks as feature extractors, as done in [24], [11], [25] and many others; for a performance analysis in the case of network finetuning we refer to paragraph IV-C. In this setting we used the Nesterov (for Washington and JHUIT-50) and ADAM (for BigBIRD) solvers. As we were only training the last fully connected layer, we learned a small handful of parameters with a very low risk of overfitting. Table II reports the results from the ablation while Figure 4 focuses on the class recall for a specific experiment. For every architecture, we report the results obtained using Col- Network CaffeNet VGG GoogleNet ResNet-50 (DE)2 CO colorizer Time (ms) 695 1335 1610 1078 400 Network CaffeNet (DE)2 CO + CaffeNet VGG (DE)2 CO + VGG Time (s) 1.87 1.23 2.91 2.16 TABLE I: Left: forward-backward time for 50 iterations, as by caffe time. Right: feature extraction times for 100 images; note that using (DE)2 CO actually speeds up the procedure. We explain this by noting that (DE)2 CO uses single channel images and thus needs to transfer only 13 of the data from memory to the GPU - clearly the bottleneck here. orJet, SurfaceNormals (plain and enhanced) and (DE)2 CO learned on a reference database between Washington or JHUIT-50, and (DE)2 CO learned on the combination of Washington and JHUIT-50. For the CaffeNet and VGG networks we also present results on simple grayscale images. We attempted also to learn (DE)2 CO from BigBIRD alone, and in combination with one (or both) of the other two databases. Results on BigBIRD only were disappointing, and results with/without adding it to the other two databases did not change the overall performance. We interpret this result as caused by the relatively small variability of objects in BigBIRD with respect to depth, and for sake of readability we decided to omit them in this work. We see that, for all architectures and for all reference databases, (DE)2 CO achieves higher results. The difference goes from +1.7%, obtained with CaffeNet on the Washington database, to the best of +16.8% for VGG16 on JHUIT50. JHUIT-50 is the testbed database where, regardless of the chosen architecture, (DE)2 CO achieves the strongest gains in performance compared to hand crafted mappings. Washington is, for all architectures, the database where hand crafted mappings perform best, with the combination Washington to CaffeNet being the most favorable to the shallow mapping. On average it appears the CaffeNet is the architecture that performs best on this datasets; still, it should be noted that we are using here all architectures as feature extractors rather than as classifiers. On this type of tasks, both ResNet and GoogLeNet-like networks are known to perform worse than CaffeNet [35], hence our results are consistent with what reported in the literature. In Table III we report a second ablation study performed on the width and depth of (DE)2 CO architecture. Starting from the standard (DE)2 CO made of 8 residual blocks with 64 filters for each convolutional layer (which we found to be the best allaround architecture), we perform additional experiments by doubling and halving the number of residual blocks and the number of filters in each convolutional layer. As it can be seen, the (DE)2 CO architecture is quite robust but can be potentially finetuned to each target dataset to further increase performance. In table I we report runtimes for the considered networks. As the results show, while (DE)2 CO requires some extra computation time, in real life this is actually offset by the fact that only 31 of the data is being moved to the GPU. C. Finetuning In our finetuning experiments we focused on the best performing network from the ablation, the CaffeNet (which is also used by current competitors [11], [22]), to see up to which degree the network could exploit a given mapping. The protocol was quite simple: all layers were free to move equally, the starting learning rate was 0.001 (with step down after 45%) and the solver was SGD. Training went on for 90 epochs for the Washington and JHUIT-50 datasets and 30 eps. for BigBIRD (a longer training was detrimental for all settings). To ensure a fair comparison with the static mapping methods, the (DE)2 CO part of the network was kept frozen during finetuning. Results are reported in Table IV. We see that here the gap between hand-crafted and learned colorization methods is reduced (very likely the network is compensating existing weaknesses). SurfaceNormals++ performs pretty well on Washington, but less so on the other two datasets (it’s actually the worse on BigBIRD). Surprisingly, the simple grayscale conversion is the one that performs best on BigBIRD, but lags clearly behind on all other settings. (DE)2 CO on the other hand, performs comparably to the best mapping on every single setting and has a 5.9% lead on JHUIT-50; we argue that it is always possible to find a shallow mapping that performs very well on a specific dataset, but there are no guarantees it can generalize. D. RGB-D While this paper focuses on how to best perform recognition in the depth modality using convnets, we wanted to provide a reference value for RGB-D object classification using (DE)2 CO on the depth channel. To classify RGB images we follow [22] and use a pretrained VGG16 which we finetuned on the target dataset (using the previously defined protocol). RGB-D classification is then performed, without further learning, by computing the weighted average (weight factor α was cross-validated) of the fc8 layers from the RGB and Depth networks and simply selecting the most likely class (the one with the highest activations). This cue integration scheme can be seen as one of the simplest, off-the-shelf algorithm for doing classifications using two different modalities [36]. We excluded BigBIRD from this setting, due to lack of competing works to compare with. Results are reported in Tables V-VI. We see that (DE)2 CO produces results on par or slightly superior to the current state of the art, even while using an extremely simple feature fusion method. This is remarkable, as competitors like [22], [11] use instead sophisticated, deep learning based cue integration methods. Hence, our ability to compete in this setting is all due to the (DE)2 CO colorization mapping, clearly more powerful than the other baselines. It is worth stressing that, in spite of the different cue integration and depth mapping approaches compared in Tables V-VI, convnet results on RGB are already very high, hence in this setting the advantage brought by a superior performance on the depth channel tends to be covered. Still, on Washington JHUIT 100 VGG Colorjet VGG Mapping learned on Washington 90 80 Recall 70 60 50 40 30 20 10 clamp_ace clamp_craftsman_bend screw_driver_craftsman_black marker_orange screw_driver_red_blue_long clamp_crescent_red screw_driver_black_blue_short screw_driver_craftsman_gray clamp_green wrench_black_closed wrench_black_open screw_driver_white screw_driver_black_blue_long paint_krylon drill_flat screw_driver_wiha clamp_stanley clipper_silver_open clamp_black_red mallet_black_white clipper_silver_closed link_node ruler_stanley clipper_blue hammer_craftsman screw_driver_black mallet_fiber greenlee_closed greenlee_open link_2node screw_driver_yellow link screw_driver_bondhus screw_driver_yellow_cross knife_olfa tape_black stapler_bostitch marker_blue sander igniter_master drill_point scissor_fiskars mallet_ball_pein cresent mallet_drilling ruler_komelon tape_white working_glasses_orange screw_driver_orange 0 Fig. 4: Per class recall on JHUIT-50, using VGG, with (DE)2 CO learned from Washington. Recalls per class are sorted in decreasing order, according to ColorJet performance. In this setting, (DE)2 CO, while generally performing better, seems to focus on different perceptual properties and is thus, compared with the baseline, better at some classes rather than others. Method: VGG16 on Grayscale VGG16 on ColorJet VGG16 on SurfaceNormals VGG16 on SurfaceNormals++ VGG16 (DE)2 CO learned on Washington VGG16 (DE)2 CO learned on JHUIT-50 CaffeNet on Grayscale CaffeNet on ColorJet CaffeNet on SurfaceNormals CaffeNet on SurfaceNormals++ CaffeNet (DE)2 CO learned on Washington CaffeNet (DE)2 CO learned on JHUIT-50 GoogleNet on ColorJet GoogleNet on SurfaceNormals GoogleNet on SurfaceNormals++ GoogleNet (DE)2 CO learned on Washington GoogleNet (DE)2 CO learned on JHUIT-50 ResNet50 on ColorJet ResNet50 on SurfaceNormals ResNet50 on SurfaceNormals++ ResNet50 (DE)2 CO learned on Washington ResNet50 (DE)2 CO learned on JHUIT-50 Washington[9] 74.9 75.2 75.3 77.3 79.6 78.1 76.6 78.8 79.3 81.4 83.1 79.1 73.5 72.9 76.7 − 76.6 75.1 77.4 79.6 − 76.4 JHUIT-50[31] 33.7 35.3 30.8 35.8 52.7 51.2 44.6 45.0 38.3 44.8 53.1 57.5 40.0 36.5 41.5 51.9 − 38.9 33.2 45.4 45.5 − BigBIRD Reduced[32] 22 19.9 16.8 11.5 22.8 23.7 22.9 22.7 18.9 14.0 28.6 25.2 21.8 18.4 13.9 25.2 24.4 18.7 16.5 13.8 23.9 24.7 TABLE II: Object classification experiments in the depth domain, comparing (DE)2 CO and hand crafted mappings, using 5 pre-trained networks as feature extractors. Best results for each network-dataset combination are in bold, overall best in red bold. Extensive experiments were performed on VGG and Caffenet, while GoogleNet and ResNet act as reference. filters/blocks 32 filters 64 filters 128 filters 4 blocks 56.5 56.8 53.1 8 blocks 52.8 53.1 53.9 16 blocks 57.1 53.6 53.3 TABLE III: (DE)2 CO ablation study, learned on Washington, tested on JHUIT-50. Grid search optimization over width and depth of generator architecture shows improved results. we achieve the second best result, and on JHUIT-50 we get the new state of the art. V. CONCLUSIONS This paper presented a network for learning deep colorization mappings. Our architecture follows the residual philosophy, learning how to map depth data to RGB images for a given pre-trained convolutional neural network. By using our (DE)2 CO algorithm, as opposed to the hand-crafted colorization mappings commonly used in the literature, we obtained a significant jump in performance over three different benchmark databases, using four different popular deep networks pre trained over ImageNet. The visualization of the obtained colorized images further confirms how our algorithm is able to capture the rich informative content and the different facets of depth data. All the deep depth mappings presented in this paper are available at https: //github.com/fmcarlucci/de2co. Future work will further investigate the effectiveness and generality of our approach, testing it on other RGB-D classification and detection problems, with various fine-tuning strategies and on several Method: CaffeNet CaffeNet CaffeNet CaffeNet CaffeNet CaffeNet on Grayscale on ColorJet on SurfaceNormals++ (DE)2 CO learned on Washington (DE)2 CO learned on JHUIT-50 (DE)2 CO learned on Washington + JHUIT-50 Washington[9] 82.7 ± 2.1 83.8 ± 2.7 84.5 ± 2.9 84.0 ± 2.0 82.3 ± 2.3 84.0 ± 2.3 JHUIT-50[31] 53.7 54.1 55.9 60.0 62.0 61.8 BigBIRD Reduced[32] 29.6 25.4 17.0 − − 28.0 TABLE IV: CaffeNet finetuning using different colorization techniques. Method: FusionNet[11] CNN + Fisher [37] DepthNet [5] CIMDL [28] FusionNet enhanced[22] (DE)2 CO RGB 84.1 ± 2.7 90.8 ± 1.6 88.4 ± 1.8 87.3 ± 1.6 89.5 ± 1.9 89.5 ± 1.6 Depth 83.8 ± 2.7 81.8 ± 2.4 83.8 ± 2.0 84.2 ± 1.7 84.5 ± 2.9 84.0 ± 2.3 RGB-D 91.3 ± 1.4 93.8 ± 0.9 92.2 ± 1.3 92.4 ± 1.8 93.5 ± 1.1 93.6 ± 0.9 TABLE V: Selected results on Washington RGB-D Method: DepthNet [5] Beyond Pooling [31] FusionNet enhanced[22] (DE)2 CO RGB 88.0 − 94.7 94.7 Depth 55.0 − 56.0 61.8 RGB-D 90.3 91.2 95.3 95.7 TABLE VI: Selected results on JHUIT-50 deep networks, pre-trained over different RGB databases, and in combination with RGB convnet with more advanced multimodal fusion approaches. R EFERENCES [1] Y. LeCun, B. E. Boser, J. S. Denker, D. Henderson, R. E. Howard, W. E. Hubbard, and L. D. Jackel, “Handwritten digit recognition with a back-propagation network,” in NIPS, 1990. [2] C. Szegedy, W. Liu, Y. Jia, P. Sermanet, S. Reed, D. Anguelov, D. Erhan, V. Vanhoucke, and A. Rabinovich, “Going deeper with convolutions,” in CVPR, 2015. [3] A. Krizhevsky, I. Sutskever, and G. E. Hinton, “Imagenet classification with deep convolutional neural networks,” in NIPS, 2012. [4] J. Deng, W. Dong, R. Socher, L.-J. Li, K. Li, and L. Fei-Fei, “Imagenet: A large-scale hierarchical image database,” in CVPR, 2009. [5] F. M. Carlucci, P. Russo, and B. Caputo, “A deep representation for depth images from synthetic data,” in ICRA, 2017. [6] R. Girshick, J. Donahue, T. Darrell, and J. Malik, “Rich feature hierarchies for accurate object detection and semantic segmentation,” in Proceedings of the IEEE conference on computer vision and pattern recognition, 2014, pp. 580–587. [7] J. Donahue, Y. Jia, O. Vinyals, J. Hoffman, N. Zhang, E. Tzeng, and T. Darrell, “Decaf: A deep convolutional activation feature for generic visual recognition,” in ICML, 2014. [8] J. Yosinski, J. Clune, Y. Bengio, and H. Lipson, “How transferable are features in deep neural networks?” in NIPS, 2014. [9] K. Lai, L. Bo, X. Ren, and D. Fox, “A large-scale hierarchical multiview rgb-d object dataset,” in Robotics and Automation (ICRA), 2011 IEEE International Conference on. IEEE, 2011, pp. 1817–1824. [10] M. Schwarz, H. Schulz, and S. Behnke, “Rgb-d object recognition and pose estimation based on pre-trained convolutional neural network features,” in ICRA, 2015. [11] A. Eitel, J. T. Springenberg, L. Spinello, M. Riedmiller, and W. Burgard, “Multimodal deep learning for robust rgb-d object recognition,” in Intelligent Robots and Systems (IROS), 2015 IEEE/RSJ International Conference on. IEEE, 2015, pp. 681–687. [12] S. Iizuka, E. Simo-Serra, and H. Ishikawa, “Let there be Color!: Joint End-to-end Learning of Global and Local Image Priors for Automatic Image Colorization with Simultaneous Classification,” ACM Transactions on Graphics (Proc. of SIGGRAPH 2016), vol. 35, no. 4, 2016. [13] G. Larsson, M. Maire, and G. Shakhnarovich, “Learning representations for automatic colorization,” in ECCV, 2016. [14] Z. Cheng, Q. Yang, and B. Sheng, “Deep colorization,” in ICCV, 2015. [15] K. He, X. Zhang, S. Ren, and J. Sun, “Deep residual learning for image recognition,” in CVPR, 2016. [16] K. Simonyan and A. Zisserman, “Very deep convolutional networks for large-scale image recognition,” ICLR, 2015. [17] J. Hoffman, S. Gupta, J. Leong, S. Guadarrama, and T. Darrell, “Crossmodal adaptation for rgb-d detection,” in International Conference in Robotics and Automation (ICRA), 2016. [18] J. Hoffman, S. Gupta, and T. Darrell, “Learning with side information through modality hallucination,” in Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2016, pp. 826–834. [19] S. Gupta, J. Hoffman, and J. Malik, “Cross modal distillation for supervision transfer,” in The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2016. [20] G. Hinton, O. Vinyals, and J. Dean, “Distilling the knowledge in a neural network,” arXiv preprint arXiv:1503.02531, 2015. [21] L. Bo, X. Ren, and D. Fox, “Unsupervised feature learning for RGBD based object recognition,” in 13th International Symposium on Experimental Robotics, ISER, 2012. [22] A. Aakerberg and K. Nasrollahi, “Depth value pre-processing for accurate transfer learning based rgb-d object recognition,” in IJCAI, 2017. [23] S. Gupta, R. Girshick, P. Arbeláez, and J. Malik, “Learning rich features from rgb-d images for object detection and segmentation,” in ECCV, 2014. [24] M. Schwarz, H. Schulz, and S. Behnke, “Rgb-d object recognition and pose estimation based on pre-trained convolutional neural network features,” in (ICRA), 2015. [25] H. F. Zaki, F. Shafait, and A. Mian, “Convolutional hypercube pyramid for accurate rgb-d object category and instance recognition,” in ICRA, 2016. [26] L. Sun, C. Zhao, and R. Stolkin, “Weakly-supervised dcnn for rgb-d object recognition in real-world applications which lack large-scale annotated training data,” arXiv preprint arXiv:1703.06370, 2017. [27] U. Asif, M. Bennamoun, and F. A. Sohel, “Rgb-d object recognition and grasp detection using hierarchical cascaded forests,” IEEE Transactions on Robotics, 2017. [28] Z. Wang, R. Lin, J. Lu, J. Feng, et al., “Correlated and individual multi-modal deep learning for rgb-d object recognition,” arXiv preprint arXiv:1604.01655, 2016. [29] R. Zhang, P. Isola, and A. A. Efros, “Colorful image colorization,” ECCV, 2016. [30] K. Bousmalis, N. Silberman, D. Dohan, D. Erhan, and D. Krishnan, “Unsupervised pixel-level domain adaptation with generative adversarial networks,” arXiv preprint arXiv:1612.05424, 2016. [31] C. Li, A. Reiter, and G. D. Hager, “Beyond spatial pooling: Finegrained representation learning in multiple domains,” in Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2015, pp. 4913–4922. [32] A. Singh, J. Sha, K. S. Narayan, T. Achim, and P. Abbeel, “Bigbird: A large-scale 3d database of object instances,” in ICRA, 2014. [33] A. Krizhevsky, I. Sutskever, and G. E. Hinton, “Imagenet classification with deep convolutional neural networks,” in NIPS, P. Bartlett, F. Pereira, C. Burges, L. Bottou, and K. Weinberger, Eds., 2012. [34] Y. Nesterov, “A method of solving a convex programming problem with convergence rate o (1/k2),” in Soviet Mathematics Doklady, vol. 27, no. 2, 1983, pp. 372–376. [35] H. Azizpour, A. S. Razavian, J. Sullivan, A. Maki, and S. Carlsson, “Factors of transferability for a generic convnet representation,” IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 38, no. 9, pp. 1790–1802, 2016. [36] T. Tommasi, F. Orabona, and B. Caputo, “Discriminative cue integration for medical image annotation,” Pattern Recognition Letters, vol. 29, no. 15, pp. 1996–2002, 2008. [37] W. Li, Z. Cao, Y. Xiao, and Z. Fang, “Hybrid rgb-d object recognition using convolutional neural network and fisher vector,” in Chinese Automation Congress (CAC), 2015. IEEE, 2015, pp. 506–511.
1cs.CV
A Continuous Model of Cortical Connectivity arXiv:1610.03809v1 [q-bio.NC] 12 Oct 2016 Daniel Moyer, Boris A. Gutman, Joshua Faskowitz, Neda Jahanshad, and Paul M. Thompson Imaging Genetics Center, University of Southern California [email protected] Abstract. We present a continuous model for structural brain connectivity based on the Poisson point process. The model treats each streamline curve in a tractography as an observed event in connectome space, here a product space of cortical white matter boundaries. We approximate the model parameter via kernel density estimation. To deal with the heavy computational burden, we develop a fast parameter estimation method by pre-computing associated Legendre products of the data, leveraging properties of the spherical heat kernel. We show how our approach can be used to assess the quality of cortical parcellations with respect to connectivty. We further present empirical results that suggest the “discrete” connectomes derived from our model have substantially higher test-retest reliability compared to standard methods. Keywords: Human Connectome, Diffusion MRI, Non-Parametric Estimation 1 Introduction In recent years the study of structural and functional brain connectivity has expanded rapidly. Following the rise of diffusion and functional MRI connectomics has unlocked a wealth of knowledge to be explored. Almost synonymous with the connectome is the network-theory based representation of the brain. In much of the recent literature the quantitative analysis of connectomes has focused on region-to-region connectivity. This paradigm equates physical brain regions with nodes in a graph, and uses observed structural measurements or functional correlations as a proxy for edge strengths between nodes. Critical to this representation of connectivity is the delineation of brain regions, the parcellation. Multiple studies have shown that the choice of parcellation influences the graph statistics of both structural and functional networks [15,17,18]. It remains an open question which of the proposed parcellations is the optimal representation, or even if such a parcellation exists [14]. It is thus useful to construct a more general framework for cortical connectivity, one in which any particular parcellation of the cortex may be expressed and its connectivity matrix derived, and one in which the variability of connectivity Earlier forms of this paper included erroneous results due to a software bug. These errors, which artificially raised ICC scores, have been corrected in this version. measures can be modeled and assessed statistically. It is also important that this framework allow comparisons between parcellations, and representations in this framework must be both analytically and computationally tractable. Since several brain parcellations at the macroscopic scale are possible, a representation of connectivity that is independent of parcellation is particularly appealing. In this paper, we develop such a general framework for a parcellation independent connectivity representation, building on the work of [8]. We describe a continuous point process model for the generation of observed tract1 (streamline) intersections with the cortical surface, from which we may recover a distribution of edge strengths for any pair of cortical regions, as measured by the inter-region tract count. Our model is an intensity function over the product space of the cortical surface with itself, assigning to every pair of points on the surface a point connectivity. We describe an efficient method to estimate the parameter of the model, as well as a method to recover the region-to-region edge strength. We then demonstrate the estimation of the model on a Test-Retest dataset. We provide reproducibility estimates for our method and the standard direct count methods [10] for comparison. We also compare the representational power of common cortical parcellations with respect to a variety of measures. 2 Continuous Connectivity Model The key theoretical component of our work is the use of point process theory to describe estimated cortical tract projections. A point process is a random process where any realization consists of a collection of discrete points on a measurable space. The most basic of these processes is the Poisson process, in which events occur independently at a specific asymptotic intensity (rate) λ over the chosen domain [12]. λ completely characterizes each particular process, and is often defined as a function λ : Domain → R+ , which allows the process to vary in intensity by location. The expected count of any sub-region (subset) of the domain is its total intensity, the integral of λ over the sub-region. In this paper, our domain is the connectivity space of the cortex, the set of all pairs of points on the surface, and the events are estimated tract intersections with the cortical surface. 2.1 Model Definition Let Ω be union of two disjoint subspaces each diffeomorphic to the 2-sphere representing the white matter boundaries in each hemisphere. Further consider the space Ω × Ω, which here represents all possible end point pairs for tracts that reach the white matter boundary. We treat the observation of such tracts as events generated by an inhomogeneous (symmetric) Poisson process on Ω × Ω; in our case, for every event (x, y) we have a symmetric event (y, x). 1 It is critical to distinguish between white matter fibers (fascicles) and observed “tracts.” Here, “tracts” denotes the 3d-curves recovered from Diffusion Weighted Imaging via tractography algorithms. Assuming that each event is independent of all other events except for its symmetric event (i.e., each tract is recovered independently), we model connectivity as a intensity function λ : Ω × Ω → R+ , such that for any regions E1 , E2 ⊂ Ω, the number of events is Poisson distributed with parameter ZZ C(E1 , E2 ) = λ(x, y)dxdy. (1) E1 ,E2 Due to properties of the Poisson distribution, the expected number of tracts is exactly C(E1 , E2 ). For any collection of regions {Ei }N i=1 = P , we can compute a weighted graph G(P, λ) by computing each C(Ei , Ej ) for pairs (Ei , Ej ) ∈ P × P . Each node in this graph represents a region, and each weighted edge represents the pairwise connectivity of the pair S T of nodes (regions) it connects. We call P a parcellation of Ω if i Ei = Ω and i Ei has measure 0 ({Ei } is almost disjoint). 2.2 Recovery of the Intensity Function A sufficient statistic for Poisson process models is the intensity function λ(x, y). Estimation of the function is non-trivial, and has been the subject of much study in the spatial statistics community [3]. We choose to use a non-parametric Kernel Density Estimation (KDE) approach due to an efficient closed form for bandwidth estimation described below. This process is self-tuning up to a choice of desiderata for the bandwidth parameter. We first inflate each surface to a sphere and register them using a spherical registration (See section 3.1); however this entire method can be undertaken without group registration. We treat each hemisphere as disjoint from the other, allowing us to treat Ω × Ω as the product of spheres (S1 ∪ S2 ) × (S1 ∪ S2 ). Throughout the rest of the paper D denotes a dataset containing observed tract endpoints (x, y)i , and λ̂ denotes our estimation of λ. The unit normalized spherical heat kernel is a natural choice of kernel for S2 . We use its truncated spherical harmonic representation [1], defined as follows for any two unit vectors p and q on the 2-sphere: Kσ (p, q) = H X 2h + 1 h Ph0 th 4π exp{−h(h + 1)σ}Ph0 (p · q) Here, is the h degree associated Legendre polynomial of order 0. Note that the non-zero order polynomials have coefficient zero due to the radial symmetry of the spherical heat kernel [1]. However, since we are estimating a function on Ω × Ω, we use the product of two heat kernels as our KDE kernel κ. For any two points p and q, the kernel value associated to a end point pair (x, y) is κ((p, q)|(x, y)) = Kσ (x, p)Kσ (y, q). It is easy to show that R K σ (x, p)Kσ (y, q)dpdq = 1. Ω×Ω The spherical heat kernel has a single shape parameter σ which corresponds to its bandwidth. While in general tuning this parameter requires the re-estimation of λ̂ at every iteration, by rewriting our kernel we can memoize part of the computation so that we only need to store the sum of the outer products of the harmonics. Writing out κ((p, q)|D) = the following: κ((p, q)|D) = P (xi ,yi )∈D   H X H  X 2k + 1 2h + 1 h k 4π | 4π Kσ (xi , p)Kσ (yi , q), we have exp{−σ(h2 + h + k 2 + k)} {z } Independent of D, evaluated every iteration X × Ph0 (xi · p)Pk0 (yi · q)  (xi ,yi )∈D | {z } Independent of σ, evaluated once Thus, evaluations of the kernel at any point (p, q) can be done quickly for sequences of values of σ. We then are left with the choice of loss function. Denoting the true intensity function λ, the estimated intensity λ̂, and the leave-one-out estimate λ̂i (leaving out observation i), Integrated Squared Error (ISE) is defined: Z ISE(σ|D) = (λ̂(x, y|σ) − λ(x, y))2 dxdy ZΩ×Ω X 2 λ̂i (xi , yi ) + Constant. ≈ λ̂(x, y|σ)2 dxdy − |D| (xi ,yi )∈D Hall and Marron [9] suggest tuning bandwidth parameters using ISE. In practice, we find that replacing each leave-one-out estimate with its logarithm log λ̂i (xi , yi ) yields more consistent and stable results. 2.3 Selecting a parcellation Given an estimated intensity λ̂ and two or more parcellations P1 , P2 , . . . , we would like to know which parcellation and associated graph G(P, λ̂) best represents the underlying connectivity function. There are at least two perspectives to consider. Approximation Error: Because each Pi covers Ω (and Pi × Pi = Ω × Ω), each G(P1 , λ̂) can be viewed as a piece-wise function g : Ω × Ω → R+ , where 1 g(x, y) = |Ei ||E C(Ei , Ej ) such that x ∈ Ei and y ∈ Ej . In other words, g is j| the constant approximation to λ over every pair of regions. A natural measure of error is another form of Integrated Squared Error: ZZ Err(λ̂, G(P1 , λ̂)) = (g(x, y) − λ(x, y))2 dxdy. (2) Ω×Ω This is analogous to squared loss (`2 -loss). Likelihood: An alternative viewpoint leverages the point process model to measure a likelihood: X log L(P ) = log Poisson(|{(x, y)i ∈ D : x ∈ Ei , y ∈ Ej }|; C(Ei , Ej )). (3) Ei ,Ej ∈P Here, the independence assumption plays a critical role, allowing pairs of regions to be evaluated separately. Unfortunately this is biased toward parcellations with more, smaller regions, as the Poisson distribution has tied variance and mean in one parameter. A popular likelihood-based option that somewhat counterbalances this is Akaike’s Information Criterion (AIC),   |P | log |D|. (4) AIC(P ) = −2 log L(P ) + 2 AIC balances accuracy with parsimony, penalizing overly parameterized models - in our case, parcellations with too many regions. 3 Application to CoRR Test-Retest Data We demonstrate the use of our framework on a test-retest dataset. We measure connectome reproducibility using Intraclass Correlation (ICC) [13], and compare three parcellations using multiple criteria (See Equations 2,3, and 4). 3.1 Procedure, Connectome Generation, and Evaluation Our data are comprised of 29 subjects from the Institute of Psychology, Chinese Academy of Sciences sub-dataset of the larger Consortium for Reliability and Reproducibility (CoRR) dataset [19]. T1-weighted (T1w) and diffusion weighted (DWI) images were obtained on 3T Siemens TrioTim using an 8-channel head coil and 60 directions. Each subject was scanned twice, roughly two weeks apart. T1w images were processed with Freesufer’s [4] recon-all pipeline to obtain a triangle mesh of the grey-white matter boundary registered to a shared spherical space [5], as well as corresponding vertex labels per subject for three atlas-based cortical parcellations, the Destrieux atlas [6], the Desikan-Killiany (DK) atlas [2], and the Desikan-Killiany-Tourville (DKT31) atlas [11]. Probabilistic streamline tractography was conducted using the DWI in 2mm isotropic MNI 152 space, using Dipy’s [7] implementation of constrained spherical deconvolution (CSD) [16] with a harmonic order of 6. As per Dipy’s ACT, we retained only tracts longer than 5mm with endpoints in likely grey matter. We provide the mean ICC score computed both with and without entries that are zero for all subjects. When estimating λ̂ the kernels are divided by the number of tracks, and we use a sphere with unit surface area instead of unit radius for ease of computation. We threshold each of the kernel integrated connectomes at 10−5 , which is approximately one half of one unit track density. We then compute three measures of parcellation representation accuracy, namely ISE, Negative Log Likelihood, and AIC scores. 3.2 Results & Discussion Table 1 shows a surprisingly low mean ICC scores for regular count matrices. This may be because ICC normalizes each measure by its s2 statistic, meaning that Atlas Number of Regions Count ICC Intensity ICC (Full) Intensity ICC (w/Threshold) DK 68 0.2093 0.4868 0.5613 Destrieux 148 0.1722 0.4535 0.6481 DKT31 62 0.2266 0.4388 0.4645 Table 1. This table shows mean ICC scores for each connectome generation method. The count method - the standard approach - defines edge strength by the fiber endpoint count. The integrated intensity method is our proposed method; in general it returns a dense matrix. However, many of the values are extremely low, and so we include results both with and without thresholding. Highest ICC scores for each atlas are bolded. Type DK Destrieux DKT31 ISE 1.8526 × 10−5 2.1005 × 10−5 2.1258 × 10−5 Negative LogLik 85062.5 355769.4 88444.5 AIC Score 174680.95 733294.8 185253.5 Retest ISE 1.0517 × 10−5 1.0257 × 10−5 1.1262 × 10−5 Retest Negative LogLik 85256.0 357292.9 88434.9 Retest AIC Score 175068.1 736341.9 185234.3 Table 2. This table shows the means over all subjects of three measures of parcellation “goodness”. The retest versions are the mean of the measure using the parcellation’s regional connectivity matrix (or the count matrix) from one scan, and the estimated intensity function from the other scan. entries in the adjacency matrices that should be zero but that are subject to a small amount of noise – a few erroneous tracks – have very low ICC. Our method in effect smooths tracts endpoints into a density; end points near the region boundaries are in effect shared with the adjacent regions. Thus, even without thresholding we dampen noise effects as measured by ICC. With thresholding, our method’s performance is further improved, handily beating the counting method with respect to ICC score. It is important to note that for many graph statistics, changing graph topology can greatly affect the measured value [18]. While it is important to have consistent non-zero measurements, the difference between zero and small but non-zero in the graph context is also non-trivial. The consistency of zero-valued measurements is thus very important in connectomics. Table 2 suggests that all three measures, while clearly different, are consistent in their selection at least with respect to these three parcellations. It is somewhat surprising that the Destrieux atlas has quite low likelihood criteria, but this may be due to the (quadratically) larger number of region pairs. Both likelihood based retest statistics also choose the DK parcellation, while ISE chooses the Destrieux parcellation by a small margin. It should be noted that these results must be conditioned on the use of a probabilistic CSD tractography model. Different models may lead to different intensity functions and resulting matrices. The Fig. 1. A visualization of the ICC scores for connectivity to Brodmann Area 45 (Destrieux region 14) for the Count connectomes (left) and the proposed Integrated Intensity connectomes (right). Blue denotes a higher score. R Fig. 2. A visualization of the marginal connectivity M (x) = E λ̂(x, y)dy for the Left i Post-central Gyrus region of the DK atlas (Region 57). The region is shown in blue on the inset. Red denotes higher connectivity regions with the blue region. biases and merits the different models and methods (e.g. gray matter dilation for fiber counting vs streamline projection) remain important open questions. 4 Conclusion We have presented a general framework for structural brain connectivity. This framework provides a representation for cortical connectivity that is independent of the choice of regions, and thus may be used to compare the accuracy of a given set of regions’ connectivity matrix. We provide one possible estimation method for this representation, leveraging spherical harmonics for fast parameter estimation. We have demonstrated this framework’s viability, as well as provided a preliminary comparison of regions using several measures of accuracy. The results presented here lead us to conjecture that our connectome estimates are more reliable compared to standard fiber counting, though we stress that a much larger study is required for strong conclusions to be made. Further adaptations of our method are possible, such as using FA-weighted fiber counting. Our future work will explore these options, conduct tests on larger datasets, and investigate the relative differences between tracking methods and parcellations more rigorously. Acknowledgments This work was supported by NIH Grant U54 EB020403, as well as the Rose Hills Fellowship at the University of Southern California. The authors would like to thank the reviewers as well as Greg Ver Steeg for multiple helpful conversations. References 1. Chung, M.K.: Heat kernel smoothing on unit sphere. In: Biomedical Imaging: Nano to Macro, 2006. 3rd IEEE International Symposium on. pp. 992–995. IEEE (2006) 2. Desikan, R.S., et al.: An automated labeling system for subdividing the human cerebral cortex on MRI scans into gyral based regions of interest. NeuroImage 31(3), 968–980 (2006) 3. Diggle, P.: A kernel method for smoothing point process data. Applied Statistics pp. 138–147 (1985) 4. Fischl, B.: Freesurfer. NeuroImage 2(62), 774–781 (2012) 5. Fischl, B., et al.: High-resolution intersubject averaging and a coordinate system for the cortical surface. Human Brain Mapping 8(4), 272–284 (1999) 6. Fischl, B., et al.: Automatically parcellating the human cerebral cortex. Cerebral Cortex 14(1), 11–22 (2004) 7. Garyfallidis, E., et al.: Dipy, a library for the analysis of diffusion MRI data. Front. Neuroinform 8(8) (2014) 8. Gutman, B., et al.: Registering cortical surfaces based on whole-brain structural connectivity and continuous connectivity analysis. In: MICCAI 2014, pp. 161–168. Springer (2014) 9. Hall, P., Marron, J.S.: Extent to which least-squares cross-validation minimises integrated square error in nonparametric density estimation. Probability Theory and Related Fields 74(4), 567–581 (1987) 10. Jahanshad, N., et al.: Alzheimer’s Disease Neuroimaging I (2013) genome-wide scan of healthy human connectome discovers SPON1 gene variant influencing dementia severity. Proc Natl Acad Sci USA 110(12), 4768–4773 11. Klein, A., Tourville, J., et al.: 101 labeled brain images and a consistent human cortical labeling protocol. Front. Neurosci 6(171), 10–3389 (2012) 12. Moller, J., Waagepetersen, R.P.: Statistical inference and simulation for spatial point processes. CRC Press (2003) 13. Portney, L.G., Watkins, M.P.: Statistical measures of reliability. Foundations of Clinical Research: Applications to Practice 2, 557–586 (2000) 14. de Reus, M.A., Van den Heuvel, M.P.: The parcellation-based connectome: limitations and extensions. NeuroImage 80, 397–404 (2013) 15. Satterthwaite, T.D., Davatzikos, C.: Towards an individualized delineation of functional neuroanatomy. Neuron 87(3), 471–473 (2015) 16. Tournier, J.D., Yeh, C.H., Calamante, F., Cho, K.H., Connelly, A., Lin, C.P.: Resolving crossing fibres using constrained spherical deconvolution: validation using diffusion-weighted imaging phantom data. NeuroImage 42(2), 617–625 (2008) 17. Wang, J., et al.: Parcellation-dependent small-world brain functional networks: A resting-state fMRI study. Human Brain Mapping 30(5), 1511–1523 (2009) 18. Zalesky, A., et al.: Whole-brain anatomical networks: does the choice of nodes matter? NeuroImage 50(3), 970–983 (2010) 19. Zuo, X.N., et al.: An open science resource for establishing reliability and reproducibility in functional connectomics. Scientific Data 1 (2014)
5cs.CE
Multi-shot Pedestrian Re-identification via Sequential Decision Making Jianfu Zhang1 , Naiyan Wang2 , and Liqing zhang1 arXiv:1712.07257v1 [cs.CV] 19 Dec 2017 1 Department of Computer Science and Engineering, Shanghai Jiao Tong University 2 Tusimple [email protected],[email protected],[email protected] Abstract Multi-shot pedestrian re-identification problem is at the core of surveillance video analysis. It matches two tracks of pedestrians from different cameras. In contrary to existing works that aggregate single frames features by time series model such as recurrent neural network, in this paper, we propose an interpretable reinforcement learning based approach to this problem. Particularly, we train an agent to verify a pair of images at each time. The agent could choose to output the result (same or different) or request another pair of images to see (unsure). By this way, our model implicitly learns the difficulty of image pairs, and postpone the decision when the model does not accumulate enough evidence. Moreover, by adjusting the reward for unsure action, we can easily trade off between speed and accuracy. In three open benchmarks, our method are competitive with the state-of-the-art methods while only using 3% to 6% images. These promising results demonstrate that our method is favorable in both efficiency and performance. Figure 1: Examples to demonstrate the motivation of our work. For most track pairs, several even only one pair of images are enough to make confident prediction. However, when there exists occlusions, blur or other hard cases, it is necessary to use more pairs, and alleviate the influences of these samples of bad quality. aggregate these image level features. Consequently, the key lies in how to leverage the rich yet possibly redundant and noisy information resides in multiple frames to build track level features from image level features. A common choice is pooling[36] or bag of words[37]. Furthermore, if the input tracks are videos (namely, the temporal order of frames is preserved), optical flow[5] or recurrent neural network (RNN)[23, 38] are commonly adopted to utilize the motion cues. However, most of these methods have two main problems: the first one is that it is computationally inefficient to use all the frames in each track due to the redundancy of each track. The second one is there could be noisy frames caused by occlusion, blur or incorrect detections. These noisy frames may significantly deteriorate the performance. To solve the aforementioned problems, we formulate multi-shot re-id problem as a sequential decision making task. Intuitively, if the agent is confident enough about existing evidences, it could output the result immediately. Otherwise, it needs to ask for another pair to verify. To model such human like decision process, we feed a pair of images from the two tracks to a verification agent at each 1. Introduction Pedestrian Re-identification (re-id) aims at matching pedestrians in different tracks from multiple cameras. It helps to recover the trajectory of a certain person in a broad area across different non-overlapping cameras. Thus, it is a fundamental task in a wide range of applications such as video surveillance for security and sports video analysis. The most popular setting for this task is single shot re-id, which judges whether two single frames are the same person. This setting has been extensively studied in recent years[8, 1, 16, 27, 17]. On the other hand, multi-shot re-id (or a more strict setting, video based re-id) is a more realistic setting in practice, however it is still at its early age compared with single shot re-id task. Currently, the main stream of solving multi-shot re-id task is first to extract features from single frames, and then 1 time step. Then, the agent could output one of three actions: same, different or unsure. By adjusting the rewards of these three actions, we could trade off between the number of pairs used and final accuracy. We depict several examples in Fig. 1. In case of easy examples, the agent could decide using only one pair of images, while when the cases are hard, the agent chooses to see more pairs to accumulate evidences. In contrast to previous works that explicitly deduplicate redundant frames[6] or distinguish high quality from low quality frames[21], our method could implicitly consider these factors in a data driven end-to-end manner. Moreover, our method is general enough to accommodate all single shot re-id methods as image level feature extractor even those non-deep learning based methods. The main contributions of our work are listed as following: • We are the first to introduce reinforcement learning into multi-shot re-id problem. We train an agent to either output results or request to see more samples. Thus, the agent could early stop or postpone the decision as needed. Thanks to this behavior, we could balance speed and accuracy by only adjusting the rewards. • We verify the effectiveness and efficiency on three popular multi-shot re-id dataset. Along with the deliberately designed image feature extractor, our method could outperform the state-of-the-art methods while only using 3% to 6% images without resorting to other post-processing or additional metric learning methods. • We empirically demonstrate that the Q function could implicitly indicate the difficulties of samples. This desirable property makes the results of our method more interpretable. 2. Related Work Pedestrian re-identification for single still images has been explored extensively in these years. These researches mainly focused on two aspects: the first one is to extract features that are both invariant and discriminative from different viewpoints to overcome illumination changes, occlusions, blurs issues, etc. Representative works before deep learning age include [29, 14, 35]. However, these handcrafted features are subverted by the rapidly developed Convolutional Neural Networks (CNN) in recent years. CNN has become de facto standard for feature extraction. The second aspect is metric learning. Metric learning embeds each sample to a latent space that preserves certain relationships of samples. Popular methods including Mahalanobis distance metric (RCA)[2], Locally Adaptive Decision Function (LADF)[18] and Large Margin Nearest Neighbor (LMNN)[30]. These two streams have intersected in the deep learning age: Numerous work focus on learning discriminative features by the guide of metric learning based loss funcions. The earliest work was proposed by Chopra et al. in [4]. They presented a method based on Siamese architecture to learn similarity for face verification task with CNN. Schroff et al. [25] proposed FaceNet model to learn embeddings by comparing the triplet loss to maximize the relative distance for matched pairs and the mismatched pairs. Inspired by these methods for face verification, deep learning methods for image based re-identification also have shown a great progress in recent years[8, 16, 1]. Recently, some methods utilized domain knowledge to improve the performance. In [33, 34] pedestrian landmarks are included to handle body part misalignment problem. On the other hand, many multitask methods are proposed based on deep learning and reported promising performance. Wang et al. [27] proposed a joint learning framework by combining the patch matching and metric learning methods. Li et al. [17] proposed a multi-loss model combining metric learning and global classification to discover the local and global features. Compared with image based re-id task, multi-shot re-id problem is a more realistic setting, since the most popular application of re-id problem is surveillance video. It at least provides several representative frames after condensation, or even the entire videos are stored. Consequently, how to utilize such multi-frame information is at the core of multi-shot re-id. Flow Energy Profile[19] is proposed to detect walking cycles with flow energy profile to extract spatial and temporal invariant features. In [37], Bagof-words are adopted with learned frame-wised features to generate a global feature. Not surprisingly, deep learning also expressed its power in multi-shot re-id problem. A natural choice for temporal model in deep learning is Recurrent Neural Network (RNN). In the pioneering work [23], McLaughlin et al. first extracted features with CNN from images and then use RNN and temporal pooling to aggregate those features. Similarly, Chung et al. [5] presented a two stream method using Siamese network for each stream and use RNN and temporal pooling for each stream. Recently, this idea is extended with spatial and temporal attention in [38, 32] to automatically pick out discriminative frames and integrate context information. Another interesting work is [21]. In [21], a CNN model learns the quality for each image. And then the video is aggregated with the image features weighted by the quality. The goal of Reinforcement Learning (RL) is to learn policies based on trial and error in a dynamic environment. In contrast to traditional supervised learning, reinforcement learning trains an agent by maximizing the accumulated reward from environment. Additional to its traditional applications in control and robotics, recently RL has been successfully applied to a few computer vision tasks by treating Figure 2: An illustration of our proposed method. them as a decision making process[3, 22, 11, 15]. In [11], the features for visual tracking problem are organized according to their costs, and then an agent is trained to decide current features are good enough to make accurate prediction or need to proceed to next level of features. By this way, the agent saves unnecessary computation of expensive features. In [15], RL is applied to learn attention for detected bounding boxes by iteratively detecting and removing irrelevant pixels in each image. Our method shares the same spirit as these works, but tailored for multi-shot re-id problem. 3. Method In this section, we will introduce our approach to multishot re-id problem. First, we will start with a formal formulation of this problem, and then present each component of our method. The overview of our method is depicted in Figure 2. 3.1. Formulation In multi-shot re-id task, we are given two sequences (X , Y) = ({x1 , . . . , xn }, {y1 , . . . , yn }), where x1 represents the first image in X . We compute the distance (or similarity) of these two sequences by: D(X , Y) = kg(f (x1 ), . . . , f (xn ))−g(f (y1 ), . . . , f (yn ))k22 . (1) Here f (·) is a feature extractor that extracts discriminative feature for each frame, and g(·) is an aggregation function that aggregates image level features to sequence level feature. We then use it to rank all the queries. In the sequel, we will first present the details of our single image feature extractor f (·) in Sec. 3.2. It is built with a CNN trained with three different loss functions. Next, we elaborate our reinforcement learning based aggregation method g(·) in Sec. 3.3. 3.2. Image Level Feature Extraction For single image feature extractor, a CNN is trained to embed an image into a latent space that preserves the relative relationships of samples. To achieve this goal, we train the CNN with combination of three different kinds of loss functions: classification loss, pairwise verification loss [4] and triplet verification loss [25]. According to a recent work [31], multiple loss functions could better ensure the structure of the latent space and margins between samples. Particularly, we optimize large margin softmax loss[20] instead of softmax loss, since it demonstrates extraordinary performance in various classification and verification tasks. Implementation details: We use two well-known network structures Inception-BN[12] and AlexNet [13] pretrained on Imagenet[13] as the base networks. We choose these two networks with different capacity and expression power to demonstrate the universality of our proposed aggregation method that will be presented next. In specific, we use the flattened features of the last pooling layer from base networks. we set the margin in triplet loss to 0.9. For large margin softmax, we set β = 1000, βmin = 3, and the margin as 3. For more details of these parameters, please refer to [20]. We optimize the network by momentum SGD optimizer with 320000 iterations, the learning rate is 0.01 and multiplied by 0.1 after 50000 and 75000 iterations. As an important baseline, we use simple average pooling of the l2-normalized features generated from all the images as the feature for a sequence. Namely, the aggregation function is defined as: g(X ) = n X f (xi ) i n (2) 3.3. Sequence Level Feature Aggregation We train an agent to learn the aggregation function g(·). It jointly decides the results and whether additional image pairs are needed to make the final decision. The problem is formulated as a Markov Decision Processes (MDP), described by (S, A, P, R) as the states, actions, transitions and rewards. Each time step t, the agent will get a random image pair from the two input sequences to observe a state st ∈ S and choose an action at ∈ A from the experience it has learned. Then the agent will receive a reward rt ∈ R from the environment in training and determine the next state st+1 . We will elaborate the details of them in the sequel. Actions: We have three actions for the agent: same, different and unsure. The first two actions will terminate current episode, and output the result immediately. We anticipate when the agent has collected enough information and is confident to make the decision, it stops early to avoid unnecessary computation. If the agent chooses to take action unsure, we will feed the agent with another random image pair from the two input sequences. Rewards: We define the rewards as follows: 1. +1, if at matches gt. 2. −1, if at differs from gt, or when t = tmax , at is still unsure. 3. rp , if t < tmax , at is unsure. Here tmax is defined as the maximum time step for each episode. gt is the ground truth. rp is defined as a penalty (negative reward) or reward for the agent seeking for another image pair. If rp is negative, it will be penalized if requesting more pairs; on the other hand, if rp is positive, we encourage the agent to gather more pairs, and stop gathering when it has collected tmax pairs to avoid a penalty of −1. The value of rp may strongly affect the agent’s behavior, we will discuss its impact in Sec. 4.3. States and Deep Q-learning: We use Deep QLearning[24] to find the optimal policy. For each state and action (st , at ), Q(st , at ) represents the optimal discounted accumulated rewards for the state and action. In training, we could iteratively update the Q function by: Q(st , at ) = rt + γ max Q(st+1 , at+1 ). at+1 (3) The state st for time step t in the episode consists of three parts. The first part is the image features of current pair (f (x), f (y)) which are generated by the image feature extractor mentioned in Section 3.2. The second part is a weighted average of historical image features. This part makes the agent be aware of the previous image pairs it has already seen before. In specific, for each observation ot the weight wt is defined as: eQu (4) eQs + eQd + eQu where Qu is short for Q(st , at = unsure), and vice versa. The weight decreases as Qu increases, as higher Qu may indicate that current pair of images are hard to distinguish. The aggregated features should be affected as small as possible. As a result, ht is the weighted average of the historical features for t > 1: Pt−1 i=1 wi × oi ht = P . (5) t−1 i=1 wi wt = 1.0 − ht = ot when t = 1. Note that though the Q function is not specifically trained for sample weighting, it still reflects the importance of each frame. We leave end-to-end learning of the weights as our future work. We also augment the image features with hand-crafted features for better discrimination. For each time step t, we calculate the distance kf (xi ) − f (yj )k22 and inner product f (xi ) · f (yj ) for all 1 ≤ i, j ≤ t − 1, and then add the maximum, minimum and mean of them to the input, which results in 6 dimension extra features. The network structure is shown in Fig.2. We simply use a two layer fully connected network as the Q function. Each fully connected layer has 128 outputs. Testing: For each query video sequences we play one episode and take the difference of the Q-value of action same and different at the terminal step as the final score. Then we rank the gallery identities by this value. Implementation details: In training phase, for each episode we randomly choose positive or negative sequence pairs with the ratio 1 : 1. We feed the weighted historical features, features of current step and hand-crafted distance features into the Q-Net. The whole net along with the single image feature extractor is trained end-to-end except for fixing the first two stages of the base networks. We train the Q-Net for 20 epochs by momentum SGD optimizer, 100000 iterations for each epoch. We use learning[26] as the exploration strategy and anneal  linearly from 1 to 0.1 in the first 10 epochs. Learning rate is rp rp rp rp rp 40 20 0.2 0.1 0.0 −0.1 −0.2 60 40 0 4 6 8 10 12 14 16 #. Images Used per Episode PRID2011 Inception BN rp rp rp rp rp 80 2 40 20 iLIDS-VID Inception BN rp rp rp rp rp = = = = = 0.2 0.1 0.0 −0.1 −0.2 60 40 20 2 0 4 6 8 10 12 14 16 #. Images Used per Episode = = = = = 0.2 0.1 0.0 −0.1 −0.2 60 40 0 4 6 8 10 12 14 16 #. Images Used per Episode 80 60 rp rp rp rp rp 20 100 0.2 0.1 0.0 −0.1 −0.2 Percentage = = = = = MARS Alexnet 100 2 4 6 8 10 12 14 16 #. Images Used per Episode MARS Inception BN 100 rp rp rp rp rp 80 Percentage 2 80 Percentage = = = = = 20 100 0 rp rp rp rp rp 80 60 0 iLIDS-VID Alexnet 100 0.2 0.1 0.0 −0.1 −0.2 Percentage Percentage 80 = = = = = Percentage PRID2011 Alexnet 100 = = = = = 0.2 0.1 0.0 −0.1 −0.2 60 40 20 2 4 6 8 10 12 14 16 #. Images Used per Episode 0 2 4 6 8 10 12 14 16 #. Images Used per Episode Figure 3: Statistics of the number of images used in each episode for our model with different reward for action unsure. Dataset Settings Baseline rp = 0.2 rp = 0.1 rp = 0 rp = −0.1 rp = −0.2 PRID2011 iLIDS-VID MARS CMC1 #.of Images CMC1 #.of Images CMC1 #.of Images 84.3 85.2 84.6 83.7 81.9 80.8 200.000 6.035 3.970 3.162 2.835 2.605 60.0 60.2 60.3 55.4 54.0 50.7 146.000 6.681 3.966 3.134 2.789 2.307 68.3 71.2 70.5 69.0 68.2 67.5 111.838 6.417 3.931 2.952 2.507 2.130 Table 1: Test results for our model based on Inception BN image feature extractor. set to 0.0001, discount factor γ = 0.9 and batch size is 16. Experience replay is used and the memory buffer size is set to be 5000. In our implementation, we set the maximum time step for each episode tmax = 8. 4. Experiments In this section, we will present the results of our method on three open benchmarks, and compare it with other stateof-the-art methods. We will first introduce the datasets and evaluation metric used, and then present the ablation analyses of our method. After comparisons with other methods, we will also present some qualitative results to interpret the mechanism of our methods. 4.1. Datasets The iLIDS-VID dataset[28] contains 300 identities with 600 image sequences from two cameras. The length for each image sequence ranges from 23 to 192 frames. The challenge of this dataset is mainly due to severe occlusion. The bounding boxes are human annotated. The PRID2011[10] dataset consists two cameras with 385 identities in camera A and 749 identities in camera B. 200 identities appear in both camera. The length for each image sequence varies from 5 to 675 frames. Same as iLIDS-VID, the bounding boxes are labeled by human. The Motion Analysis and Re-identification Set (MARS)[36] is a recently released large scale dataset PRID2011 Alexnet 55 CMC Rank 1 30 40 35 25 35 2 4 6 8 10 12 14 #. Images Used per Episode 30 20 Baseline All Average Ours 15 16 PRID2011 Inception BN 90 Baseline All Average Ours 2 4 6 8 10 12 14 #. Images Used per Episode 16 iLIDS-VID Inception BN 65 2 4 6 8 10 12 14 #. Images Used per Episode 16 MARS Inception BN 64 62 Baseline All Average Ours 40 35 16 6 8 10 12 14 #. Images Used per Episode CMC Rank 1 CMC Rank 1 CMC Rank 1 Baseline All Average Ours 4 66 45 70 2 68 50 75 20 Baseline All Average Ours 70 55 80 25 72 60 85 65 40 CMC Rank 1 45 MARS Alexnet 45 35 CMC Rank 1 50 30 iLIDS-VID Alexnet 40 2 4 6 8 10 12 14 #. Images Used per Episode 16 Baseline All Average Ours 60 58 2 4 6 8 10 12 14 #. Images Used per Episode 16 Figure 4: CMC Rank 1 result for our model compared with baseline. Dataset Settings Baseline rp = 0.2 rp = 0.1 rp = 0 rp = −0.1 rp = −0.2 PRID2011 iLIDS-VID MARS CMC1 #.of Images CMC1 #.of Images CMC1 #.of Images 47.8 52.6 50.1 47.1 45.3 41.5 200.000 6.316 4.317 3.349 2.870 2.394 32.1 35.1 33.3 31.7 30.3 28.3 146.000 9.154 5.722 3.637 2.614 2.307 36.8 41.2 38.9 37.3 36.4 35.9 111.838 7.119 4.491 3.238 2.604 2.221 Table 2: Test results for our model based on Alexnet image feature extractor. containing 1261 identities and 20715 tracklets under 6 different camera views. Bounding boxes are generated by GMMCP[7] tracker and Deformable Part Model (DPM)[9] pedestrian detector, which makes it quite noisy yet close to real applications. represents the expectation of the true matching hits in the first top-n ranking. Here we use n ∈ {1, 5, 10, 20} in the evaluations. 4.2. Evaluation Settings Before comparing our models with prior works, we first conduct ablation studies of some important factors of our method. We compare the CMC Rank 1 results of our proposed models with baseline methods in Figure 4. For baseline results we calculate the average pooling feature mentioned in Equation 2. The dashed blue line in the figure denotes the results of average pooling of all pairs, while the green triangle denotes the setting that we randomly sample pairs from the tracks, and then average pool their features to a track level feature. We vary the number of pairs sampled to generate the curve. For iLIDS-VID and PRID2011 dataset, we randomly split the dataset half-half for training and testing. We average the results of 10 runs to make the evaluation stable. For MARS dataset, we follow the setting by the authors of the dataset. 625 identities are used for training, and the rest are used for testing. In testing, 1980 tracklets are preserved for query sets, while the rests are used as gallery sets. To evaluate performance for each algorithm, we report the Cumulative Matching Characteristic (CMC) metric. It 4.3. Ablation Studies Dataset CMC Rank PRID2011 iLIDS-VID MARS 1 5 10 20 1 5 10 20 1 5 10 20 RNN-CNN[23] ASTPN[32] Two-Stream[5] CNN+XQDA[37] 70 77 78 77.9 90 95 94 93.5 95 99 97 - 97 99 99 99.3 58 62 60 53.0 87 86 86 81.4 91 94 93 - 96 98 97 95.1 40 44 65.3 64 70 82.0 70 74 - 77 81 89.0 Alexnet (All frames) Alexnet + Ours Inception-BN (All frames) Inception-BN + Ours 47.8 52.6 84.3 85.2 74.4 81.3 96.5 97.1 83.6 88.4 98.8 98.9 91.2 96.3 99.7 99.6 32.1 35.1 60.0 60.2 59.0 61.3 85.4 84.7 70.0 72.1 92.0 91.7 80.6 84.0 96.3 95.2 36.8 41.2 68.3 71.2 53.1 55.6 83.5 85.7 61.6 63.1 88.0 91.8 68.8 73.3 90.8 94.3 QAN[21] STRN[38] 90.3 79.4 98.2 94.4 99.3 - 100 99.3 68.0 55.2 86.8 86.5 95.4 - 97.4 97.0 70.6 90.0 - 97.6 Table 3: Comparisons with other state-of-the-art methods. Please note that some results are not directly comparable due to different setting. For more details, please refer to the text. We first evaluate the choice of network for the image feature extractor. We use two different networks: Alexnet[13] and Inception-BN[12] to test our models. The results are listed in Table 1 and Table 2. In specific, we improve over the baseline of AlexNet remarkably, while we achieve a good performance compared with state-of-the-art methods with Inception-BN. It is worthy noting that our method also outperforms the baseline that uses all pairs. We owe the reason to that the average pooling of all the pairs may be easily contaminated by some imperfect frames. We then take a close look of the analysis of the number of pairs used in these two networks. Not surprisingly, our method uses notably less number of images. Particularly, we achieve competitive or even better results than state-of-the-art models using only 3% to 6% image pairs. Compared with Alexnet, Inception-BN provides more accurate image level discriminative features, therefore the agent tends to make a quick decision. The agent chooses more samples to stop at the end of a episode in AlexNet. Another important parameter of our model is the reward for unsure action rp . We show the statistics of the length of each episode in Figure 3 and corresponding CMC rank 1 in Figure 4. When rp is small (negative), the agent will stop early and verify the identities with fewer images. When rp is big (positive), the agent will be encouraged to be more cautious, requesting more image pairs for better performance. This will help the agent postpone its decision to avoid mistakes caused by imperfect quality like occlusions. Next, we compare across different datasets. There are tons of occlusions in iLIDS-VID and MARS datasets. Moreover, there are many mislabeled samples in MARS since the bounding boxes for MARS dataset are machine generated. PRID2011 dataset is much easier with few occlusions. Comparing among different datasets, we find that the agent tends to ask for more images in iLIDS-VID and MARS dataset than PRID2011 dataset under the same setting. These two findings coincide with our anticipated behavior of the agent. 4.4. Comparisons with State-of-the-art Methods Table 3 summarizes the CMC results of our model and the state-of-the-art multi-shot re-id models. Here we use the setting of rp = 0.2 since this setting is the best according to evaluations in previous section. CNNRNN[23], ASTPN[32], STRN[38] and Two-Stream[5] are four different methods based on RNN time series model and more advanced attention mechanism. CNN-XQDA[37] and QAN[21] train discriminative embeddings of images and apply different pooling methods. Among them, CNNRNN[23], ASTPN[32] and Two-Stream[5] use both image and explicit motion features (optical flow) as inputs for deep neural network. Here QAN[21] uses their own extra data for training. STRN[38] uses MARS pre-trained model to train PRID2011 and iLIDS-VID. Therefore, their methods cannot be fairly compared with other methods. We just list their results for reference. For PRID2011 dataset, our method outperforms all other methods, improves the CMC Rank 1 about 5% compared with best state-of-the-art methods. For iLIDS-VID and MARS dataset, our results are at least comparable or even better than the compared methods. For CMC Rank 5, 10 and 20, the trends are similar to Rank 1. Note that all the other methods use all the images for each verification. Our proposed model uses only 3 to 4 image pairs for each track pairs on average to obtain this encouraging performance. 0.8 0.6 0.6 0.4 (a) 0.2 Q-Value Q-Value 0.4 0.0 −0.2 −0.4 −0.6 (b) 0.0 −0.2 −0.4 1 0.2 2 3 4 5 #. Time Steps 6 7 1 8 2 3 (a) (d) 0.4 0.4 0.2 0.2 0.0 0.0 −0.2 −0.2 1 2 3 6 7 8 6 7 8 (b) Q-Value Q-Value (c) 4 5 #. Time Steps 4 5 #. Time Steps 6 7 8 1 (c) same different 2 3 4 5 #. Time Steps (d) unsure Figure 5: Some example episodes generated by our model. All the sampled images for each identity are listed on the left with a red dashed line split the end of the episode and the unused images. On the right side, Q values for each are shown. 4.5. Qualitative Results In Figure 5, four representative episodes are shown. We can see the change of the Q value for the agent in dynamic environment. (a) and (b) are the same person, while (c) and (d) are different persons. These four episodes end with different length. Occlusions happen in the early pairs of (a), (b) and (c). The agent stops soon after the occlusions disappear. For (d), the these two persons have similar appearances but they are different persons, the agent had a high but not enough confidence to choose different. Then another person appears in the second and third pair makes the agent hesitate and reduce its confidence for the different action. After receiving more images, the agent has collected enough information and choose different eventually. 5. Conclusion In this paper we have introduced a novel approach for multi-shot pedestrian re-identification problem by casting it as a pair by pair decision making process. Thanks to reinforcement learning, we train an agent to receive image pairs sequentially, and output one of the three actions: same, different or unsure. By early stop or decision postponing, the agent could adjust the budget needs to make confident deci- sion according to the difficulty of the tracks. We have tested our method on three different multi-shot pedestrian re-id datasets. We have shown our model can yield competitive or even better results with state-of-the-art methods using only 3% to 6% of images. Furthermore, the Q values outputted by the agent is a good indicator of the difficulty of image pairs, which makes our decision process is more interpretable by the help of Q values. Currently, the weight for each frame is determined by the Q value heuristically, which means the weight is not guided fully by the final objective function. More advanced mechanism such as attention can be easily incorporated into our framework. We leave this as our future work. References [1] E. Ahmed, M. J. Jones, and T. K. Marks. An improved deep learning architecture for person re-identification. In CVPR, 2015. 1, 2 [2] A. Bar-Hillel, T. Hertz, N. Shental, and D. Weinshall. Learning a Mahalanobis metric from equivalence constraints. Journal of Machine Learning Research, 6:937–965, 2005. 2 [3] J. C. Caicedo and S. Lazebnik. Active object localization with deep reinforcement learning. In ICCV, 2015. 3 [4] S. Chopra, R. Hadsell, and Y. LeCun. Learning a similarity metric discriminatively, with application to face verification. In CVPR, 2005. 2, 3 [5] D. Chung, K. Tahboub, and E. J. Delp. A two stream Siamese convolutional neural network for person re-identification. In ICCV, 2017. 1, 2, 7 [6] A. Das, R. Panda, and A. K. Roy-Chowdhury. Continuous adaptation of multi-camera person identification models through sparse non-redundant representative selection. Computer Vision and Image Understanding, 156:66–78, 2017. 2 [7] A. Dehghan, S. M. Assari, and M. Shah. GMMCP tracker: Globally optimal generalized maximum multi clique problem for multiple object tracking. In CVPR, 2015. 6 [8] S. Ding, L. Lin, G. Wang, and H. Chao. Deep feature learning with relative distance comparison for person re-identification. Pattern Recognition, 48(10):2993–3003, 2015. 1, 2 [9] P. F. Felzenszwalb, R. B. Girshick, D. A. McAllester, and D. Ramanan. Object detection with discriminatively trained part-based models. IEEE Transactions on Pattern Analysis and Machine Intelligence, 32(9):1627–1645, 2010. 6 [10] M. Hirzer, C. Beleznai, P. M. Roth, and H. Bischof. Person re-identification by descriptive and discriminative classification. In SCIA, 2011. 5 [11] C. Huang, S. Lucey, and D. Ramanan. Learning policies for adaptive tracking with deep feature cascades. In ICCV, 2017. 3 [12] S. Ioffe and C. Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. In ICML, 2015. 3, 7 [13] A. Krizhevsky, I. Sutskever, and G. E. Hinton. ImageNet classification with deep convolutional neural networks. In NIPS, 2012. 3, 7 [14] I. Kviatkovsky, A. Adam, and E. Rivlin. Color invariants for person reidentification. IEEE Transactions on Pattern Analysis and Machine Intelligence, 35(7):1622–1634, 2013. 2 [15] X. Lan, H. Wang, S. Gong, and X. Zhu. Identity alignment by noisy pixel removal. In BMVC, 2017. 3 [16] W. Li, R. Zhao, T. Xiao, and X. Wang. DeepReID: Deep filter pairing neural network for person re-identification. In CVPR, 2014. 1, 2 [17] W. Li, X. Zhu, and S. Gong. Person re-identification by deep joint learning of multi-loss classification. In IJCAI, 2017. 1, 2 [18] Z. Li, S. Chang, F. Liang, T. S. Huang, L. Cao, and J. R. Smith. Learning locally-adaptive decision functions for person verification. In CVPR, 2013. 2 [19] K. Liu, B. Ma, W. Zhang, and R. Huang. A spatiotemporal appearance representation for viceo-based pedestrian re-identification. In ICCV, 2015. 2 [20] W. Liu, Y. Wen, Z. Yu, and M. Yang. Large-margin softmax loss for convolutional neural networks. In ICML, 2016. 3 [21] Y. Liu, J. Yan, and W. Ouyang. Quality aware network for set to set recognition. In CVPR, 2017. 2, 7 [22] M. Malmir, K. Sikka, D. Forster, I. R. Fasel, J. R. Movellan, and G. W. Cottrell. Deep active object recognition by joint [23] [24] [25] [26] [27] [28] [29] [30] [31] [32] [33] [34] [35] [36] [37] [38] label and action prediction. Computer Vision and Image Understanding, 156:128–137, 2017. 3 N. McLaughlin, J. M. del Rincón, and P. C. Miller. Recurrent convolutional network for video-based person reidentification. In CVPR, 2016. 1, 2, 7 V. Mnih, K. Kavukcuoglu, D. Silver, A. A. Rusu, J. Veness, M. G. Bellemare, A. Graves, M. A. Riedmiller, A. Fidjeland, G. Ostrovski, S. Petersen, C. Beattie, A. Sadik, I. Antonoglou, H. King, D. Kumaran, D. Wierstra, S. Legg, and D. Hassabis. Human-level control through deep reinforcement learning. Nature, 518(7540):529–533, 2015. 4 F. Schroff, D. Kalenichenko, and J. Philbin. FaceNet: A unified embedding for face recognition and clustering. In CVPR, 2015. 2, 3 R. S. Sutton and A. G. Barto. Reinforcement learning: An introduction. IEEE Transactions on Neural Networks, 9(5):1054–1054, 1998. 4 F. Wang, W. Zuo, L. Lin, D. Zhang, and L. Zhang. Joint learning of single-image and cross-image representations for person re-identification. In CVPR, 2016. 1, 2 T. Wang, S. Gong, X. Zhu, and S. Wang. Person reidentification by video ranking. In ECCV, 2014. 5 X. Wang, G. Doretto, T. Sebastian, J. Rittscher, and P. H. Tu. Shape and appearance context modeling. In ICCV, 2007. 2 K. Q. Weinberger and L. K. Saul. Distance metric learning for large margin nearest neighbor classification. Journal of Machine Learning Research, 10:207–244, 2009. 2 T. Xiao, H. Li, W. Ouyang, and X. Wang. Learning deep feature representations with domain guided dropout for person re-identification. In CVPR, 2016. 3 S. Xu, Y. Cheng, K. Gu, Y. Yang, S. Chang, and P. Zhou. Jointly attentive spatial-temporal pooling networks for video-based person re-identification. In ICCV, 2017. 2, 7 H. Zhao, M. Tian, S. Sun, J. Shao, J. Yan, S. Yi, X. Wang, and X. Tang. Spindle net: Person re-identification with human body region guided feature decomposition and fusion. In CVPR, 2017. 2 L. Zhao, X. Li, Y. Zhuang, and J. Wang. Deeply-learned part-aligned representations for person re-identification. In ICCV, 2017. 2 R. Zhao, W. Ouyang, and X. Wang. Learning mid-level filters for person re-identification. In CVPR, 2014. 2 L. Zheng, Z. Bie, Y. Sun, J. Wang, C. Su, S. Wang, and Q. Tian. MARS: A video benchmark for large-scale person re-identification. In ECCV, 2016. 1, 6 L. Zheng, L. Shen, L. Tian, S. Wang, J. Wang, and Q. Tian. Scalable person re-identification: A benchmark. In ICCV, 2015. 1, 2, 7 Z. Zhou, Y. Huang, W. Wang, L. Wang, and T. Tan. See the forest for the trees: Joint spatial and temporal recurrent neural networks for video-based person re-identification. In CVPR, 2017. 1, 2, 7
9cs.NE
1 Strong Coordination of Signals and Actions over Noisy Channels with two-sided State Information Giulia Cervia, Laura Luzzi, Maël Le Treust and Matthieu R. Bloch arXiv:1801.10543v2 [cs.IT] 8 Mar 2018 Abstract We consider a network of two nodes separated by a noisy channel with two-sided state information, in which the input and output signals have to be coordinated with the source and its reconstruction. In the case of non-causal encoding and decoding, we propose a joint source-channel coding scheme and develop inner and outer bounds for the strong coordination region. While the inner and outer bounds do not match in general, we provide a complete characterization of the strong coordination region in three particular cases: i) when the channel is perfect; ii) when the decoder is lossless; and iii) when the random variables of the channel are independent from the random variables of the source. Through the study of these special cases, we prove that the separation principle does not hold for joint source-channel strong coordination. Finally, in the absence of state information, we show that polar codes achieve the best known inner bound for the strong coordination region, which therefore offers a constructive alternative to random binning and coding proofs. Index Terms Common randomness, coordination region, strong coordination, joint source-channel coding, channel synthesis, polar codes, random binning. I. I NTRODUCTION While communication networks have traditionally been designed as “bit pipes” meant to reliably convey information, the anticipated explosion of device-to-device communications, e.g., as part of the Internet of Things, is creating new challenges. In fact, more than communication by itself, what is crucial for the next generation of networks is to ensure the cooperation and coordination of the constituent devices, viewed as autonomous decision makers. In the present work, coordination is meant in the broad sense of enforcing a joint behavior of the devices through communication. More specifically, we shall quantify this joint behavior in terms of how well we can approximate a target joint distribution between the actions and signals of the devices. Our main objective in the present work is to characterize the amount of communication that is required to achieve coordination for several networks. A general information-theoretic framework to study coordination in networks was put forward in [3], related to earlier work on “Shannon’s reverse coding theorem” [4] and the compression of probability distribution sources and mixed quantum states [5–7]. This framework also relates to the game-theoretic perspective on coordination [8] with applications, for instance, power control [9]. Recent extensions of the framework have included the possibility of coordination through interactive communication [10, 11]. Two information-theoretic metrics have been proposed to measure the level of coordination: empirical coordination, which requires the joint histogram of the devices’ actions to approach a target distribution, and strong coordination, which requires the joint distribution of sequences of actions to converge to an i.i.d. target distribution, e.g., in variational distance [3, 12]. Empirical coordination captures an “average behavior” over multiple repeated actions of the devices; in contrast, strong coordination captures the behavior of sequences. A byproduct of strong coordination is that it enforces some level of “security,” in the sense of guaranteeing that sequence of actions will be unpredictable to an outside observer beyond what is known about the target joint distribution of sequences. The work of M.R. Bloch was supported in part by NSF under grant CIF 1320304. The work of M. Le Treust was supported by SRV ENSEA 2014 and INS2I CNRS through projects JCJC CoReDe 2015 and PEPS StrategicCoo 2016. The authors thank SRV ENSEA for financial support for the visit of M. R. Bloch in 2017. This work was presented in part in [1] at the IEEE International Symposium on Information Theory (ISIT 2017), Aachen, Germany and in [2] at the IEEE Information Theory Workshop (ITW 2016), Cambridge, United Kingdom. G. Cervia, L. Luzzi and M. Le Treust are with ETIS UMR 8051, Université Paris Seine, Université Cergy-Pontoise, ENSEA, CNRS, Cergy-Pontoise, France (email: {giulia.cervia, laura.luzzi, mael.le-treust}@ensea.fr). M.R. Bloch is with School of Electrical and Computer Engineering, Georgia Institute of Technology, Atlanta, Georgia (email: [email protected]). 2 Strong coordination in networks was first studied over error free links [3] and later extended to noisy communication links [11]. In the latter setting, the signals that are transmitted and received over the physical channel become a part of what can be observed, and one can therefore coordinate the actions of the devices with their communication signals [13, 14]. From a security standpoint, this joint coordination of actions and signals allows one to control the information about the devices’ actions that may be inferred from the observations of the communication signals. This “secure coordination” was investigated for error-free links in [15]. In the present paper, we address the problem of strong coordination in a two-node network comprised of an information source and a noisy channel, in which both nodes have access to a common source of randomness. This scenario presents two conflicting goals: the encoder needs to convey a message to the decoder to coordinate the actions, while simultaneously coordinating the signals coding the message. As in [16–18] we introduce a random state capturing the effect of the environment, to model actions and channels that change with external factors, and we consider a general setting in which state information and side information about the source may or may not be available at the decoder. We derive an inner and an outer bound for the strong coordination region by developing a joint source-channel scheme in which an auxiliary codebook allows us to satisfy both goals. Since the two bounds do not match, the optimality of our general achievability scheme remains an open question. We, however, succeeded to characterize the strong coordination region exactly in some special cases: i) when the channel is noiseless; ii) when the decoder is lossless; and iii) when the random variables of the channel are independent from the random variables of the source. In all these cases, the set of achievable target distributions is the same as for empirical coordination [17], but we show that a positive rate of common randomness is required for strong coordination. We conclude the paper by considering the design of an explicit coordination scheme in this setting. Coding schemes for coordination based on polar codes have already been designed in [19–22]. Inspired by the binning technique using polar codes in [23], we propose an explicit polar coding scheme that achieves the inner bound for the coordination capacity region in [1] by extending our coding scheme in [2] to strong coordination. We use a chaining construction as in [24, 25] to ensure proper alignment of the polarized sets. The remainder of the paper is organized as follows. Section II introduces the notation and some preliminary results. Section III describes a simple model in which there is no state and no side information and derives an inner and an outer bound for the strong coordination region. The information-theoretic modeling of coordination problems relevant to this work is best illustrated in this simplified scenario. Section IV extends the inner and outer bounds to the general case of a noisy channel with state and side information at the decoder. In particular, the inner bound is proved by proposing a random binning scheme and a random coding scheme that have the same statistics. Section V characterizes the strong coordination region for three special cases and shows that the separation principle does not hold for strong coordination. Section VI presents an explicit polar coding scheme for the simpler setting where there is no state and no side information. Finally, Section VII presents some conclusions and open problems. II. P RELIMINARIES We define the integer interval Ja, bK as the set of integers between a and b. Given a random vector X n := (X1 , . . . , Xn ), we note X i the first i components of X n , X∼i the vector (Xj )j6=i , j ∈ J1, nK, where the component Xi has been removed and X[A] the vector (Xj )j∈A , A ⊆ J1, nK. The total variation between two probability mass functions P and Q on A is given by 1X V(P, Q) := |P (a) − Q(a)|. 2 a∈A The Kullback-Leibler divergence between two discrete distributions P and Q is X P (a) D(P kQ) := P (a) log . Q(a) a We use the notation f (ε) to denote a function which tends to zero as ε does, and the notation δ(n) to denote a function which tends to zero exponentially as n goes to infinity. We now state some useful results. First, we recall well-known properties of the variational distance and KullbackLeibler divergence. 3 Lemma 1 ([26, Lemma 1]): Given a pair of random variables (A, B) with joint distribution PAB , marginals PA and PB and |A| ≥ 4, we have 1 |A| V(PAB , PA PB )2 ≤ I(A; B) ≤ V(PAB , PA PB ) log . 2 log 2 V(PAB , PA PB ) Lemma 2 ([27, Lemma 16]): For any two joint distributions PAB and PbAB , the total variation distance between them can only be reduced when attention is restricted to PA and PbA . That is, V(PA , PbA ) ≤ V(PAB , PbAB ). Lemma 3 ([27, Lemma 17]): When two random variables are passed through the same channel, the total variation between the resulting input-output joint distributions is the same as the total variation between the input distributions. Specifically, V(PA , PbA ) = V(PA PB|A , PbA PB|A ). Lemma 4: When two random variables are passed through the same channel, the Kullback-Leibler divergence between the resulting input-output joint distributions is the same as the Kullback-Leibler divergence between the input distributions. Specifically,     D PA kPbA = D PA PB|A kPbA PB|A .   Lemma 5 ([28, Lemma 4]): If V PY n PX n |Y n , PY0 n PX0 n |Y n = ε then there exists y ∈ Y n such that   V PX n |Y n =y , PX0 n |Y n =y = 2ε. The proofs of the following results are in Appendix A. The following lemma is in the same spirit as [12, Lemma VI.3]. We state a slightly different version which is more convenient for our proofs.  Lemma 6: Let PAn such that V PAn , P̄A⊗n ≤ ε, then we have n X I(At ; A∼t ) ≤ nf (ε). t=1  In particular, if PAB is such that V PAB , P̄A P̄B ≤ ε, then I(A; B) ≤ f (ε).  ⊗n Lemma 7: Let PAn B n such that V PAn B n , P̄AB ≤ ε. Then we have n X I(At ; At−1 B∼t |Bt ) ≤ nf (ε). (1) t=1 Let the variable T serve as a random time index, for any random variable C we have H(C|B n ) ≥ nI(AT ; CB∼T T |BT ) − nI(AT BT ; T ) − nf (ε). III. I NNER AND OUTER BOUNDS FOR THE STRONG COORDINATION REGION A. System model Figure 1. Coordination of signals and actions for a two-node network with a noisy channel with non-causal encoder and decoder. (2) 4 Before we study the general model with a state in detail, it is helpful to consider a simpler model depicted in Figure 1 to understand the nature of the problem. Two agents, the encoder and the decoder, wish to coordinate their behaviors: the stochastic actions of the agents should follow a known and fixed joint distribution. We suppose that the encoder and the decoder have access to a shared source of uniform randomness C ∈ J1, 2nR0 K. Let U n ∈ U n be an i.i.d. source with distribution P̄U . The encoder observes the sequence U n ∈ U n and selects a signal X n = fn (U n , C), fn : U n × J1, 2nR0 K → X n . The signal X n is transmitted over a discrete memoryless channel parametrized by the conditional distribution P̄Y |X . Upon observing Y n and common randomness C , the decoder selects an action V n = gn (Y n , C), where gn : Y n × J1, 2nR0 K → V n is a stochastic map. For block length n, the pair (fn , gn ) constitutes a code. We recall the definitions of achievability and of the coordination region for empirical and strong coordination [3, 27]. Definition 1: A distribution P̄U XY V is achievable for empirical coordination if for all ε > 0 there exists a sequence (fn , gn ) of encoders-decoders such that   P V TU n X n Y n V n , P̄U XY V > ε < ε where TU n X n Y n V n is the joint histogram of the actions induced by the code. The empirical coordination region Re is the closure of the set of achievable distributions P̄U XY V . Definition 2: A pair (P̄U XY V , R0 ) is achievable for strong coordination if there exists a sequence (fn , gn ) of encoders-decoders with rate of common randomness R0 , such that  lim V PU n X n Y n V n , P̄U⊗n XY V = 0 n→∞ where PU n X n Y n V n is the joint distribution induced by the code. The strong coordination region R is the closure of the set of achievable pairs (P̄U XY V , R0 )1 . Our first result is an inner and outer bound for the strong coordination region R [1]. Theorem 1: Let P̄U and P̄Y |X be the given source and channel parameters, then R0in ⊆ R ⊆ R0out where:   P̄U XY V = P̄U P̄X|U P̄Y |X P̄V |U XY         ∃ W taking values in W   0 Rin := (P̄U XY V , R0 ) P̄U XY W V = P̄U P̄W |U P̄X|U W P̄Y |X P̄V |W Y (3)     I(W ; U ) ≤ I(W ; Y )       R0 ≥ I(W ; U XV |Y )   P̄U XY V = P̄U P̄X|U P̄Y |X P̄V |U XY         ∃ W taking values in W       (P̄U XY V , R0 ) P̄U XY W V = P̄U P̄W |U P̄X|U W P̄Y |X P̄V |W Y 0 Rout := . (4) I(W ; U ) ≤ I(X; Y )         R0 ≥ I(W ; U XV |Y )       |W| ≤ |U × X × Y × V| + 4 Remark 1: Observe that the decomposition of the joint distributions P̄U XY V and P̄U W XY V is equivalently characterized in terms of Markov chains: ( Y − X − (U, W ) Y − X − U, . (5) V − (Y, W ) − (X, U ) Remark 2: The empirical coordination region for the setting of Figure 1 was investigated in [13], in which the authors derived an inner and outer bound. Note that the information constraint I(W ; U ) ≤ I(W ; Y ) and the decomposition of the joint probability distribution P̄U P̄W |U P̄X|U W P̄Y |X P̄V |W Y are the same for empirical coordination [13, Theorem 1]. The main difference is that strong coordination requires a positive rate of common randomness R0 > I(W ; U XV |Y ). 1 As in [3], we define the achievable region as the closure of the set of achievable rates and distributions. This definition allows to avoid boundary complications. For a thorough discussion on the boundaries of the achievable region when R is defined as the closure of the set of rates for a given distribution, see [12, Section VI.D]. 5 B. Proof of Theorem 1: inner bound We postpone the achievability proof because it is a corollary of the inner bound in the general setting of Theorem 2 proven in Section IV-A. A stand-alone proof can be found in the conference version of the present paper [1]. Remark 3: With the same random binning techniques, [11] characterizes an inner bound for the strong coordination region in the slightly different scenario in which only U n and V n need to be coordinated. Given the source and channel parameters P̄U and P̄Y |X respectively, the inner bound in [11] is:   P̄ P̄ P̄ P̄ = P̄   U XY V U X|U Y |X V |U XY       ∃ W taking values in W   RHadd,in := (P̄U V , R0 ) P̄U XY W V = P̄U P̄W X|U P̄Y |X P̄V |W Y . (6)     I(W ; U ) ≤ I(W ; Y )       R0 ≥ I(W ; U V ) − I(W ; Y ) Note that the joint distribution and the information constraints are the same as in (3) but in (3) the rate of common randomness is larger since I(W ; U XV |Y ) = I(W ; U XY V ) − I(W ; Y ) ≥ I(W ; U V ) − I(W ; Y ). The difference in common randomness rate I(W ; XY |U V ) stems from the requirement in [11], which coordinates U n and V n but not necessarly (U n , X n , Y n , V n ). C. Proof of Theorem 1: outer bound Consider a code (fn , gn ) that induces a distribution PU n X n Y n V n that is ε-close in total variational distance to the i.i.d. distribution P̄U⊗n XY V . Let the random variable T be uniformly distributed over the set J1, nK and independent of n n sequence (U , X , Y n , V n , C). The variable T will serve as a random time index. The variable UT is independent of T because U n is an i.i.d. source sequence [3]. 1) Bound on R0 : We apply Lemma 7 to An := U n X n V n , B n := Y n and C and, using (2), we have nR0 ≥ H(C) ≥ H(C|B n ) (a) ≥ nI(AT ; CB∼T T |BT ) − nI(AT BT ; T ) − nf (ε) (7) (b) ≥ nI(AT ; CB∼T T |BT ) − 2nf (ε) = nI(UT XT VT ; CY∼T T |YT ) − 2nf (ε) where (a) follows from Lemma 7 and (b) comes from [12, Lemma VI.3]. 2) Information constraint: We have (a) 0 ≤ I(X n ; Y n ) − I(C, U n ; Y n ) ≤ I(X n ; Y n ) − I(U n ; Y n |C) = H(Y n ) − H(Y n |X n ) + H(U n |Y n C) − H(U n |C) n n n n X X X (b) X t−1 ≤ H(Yt )− H(Yt |Xt ) + H(Ut |U Yt Y∼t C)− H(Ut ) t=1 (c) ≤ n X t=1 t=1 t=1 (H(Yt ) − H(Yt |Xt ) + H(Ut |Y∼t C) − H(Ut )) t=1 (d) ≤ nH(YT ) − nH(YT |XT T ) + nH(UT |Y∼T CT ) − nH(UT |T ) (e) = nH(YT ) − nH(YT |XT ) + nH(UT |Y∼T CT ) − nH(UT ) = nI(XT ; YT ) − nI(UT ; Y∼T , C, T ) where (a) comes from the Markov chain Y n − X n − (C, U n ) and (b) comes from the chain rule for the conditional entropy and the fact that U n is an i.i.d. source independent of C . The inequalities (c) and (d) come from the fact 6 that conditioning does not increase entropy and (e) from the memoryless nature of the channel P̄Y |X and the i.i.d. nature of the source P̄U . 3) Identification of the auxiliary random variable: We identify the auxiliary random variables Wt with (C, Y∼t ) for each t ∈ J1, nK and W with (WT , T ) = (C, Y∼T , T ). For each t ∈ J1, nK the following two Markov chains hold: Yt − Xt − (C, Y∼t , Ut ) ⇐⇒ Yt − Xt − (Wt , Ut ) (8) Vt − (C, Y∼t , Yt ) − (Ut , Xt ) ⇐⇒ Vt − (Wt , Yt ) − (Ut , Xt ) (9) where (8) comes from the fact that the channel is memoryless and (9) from the fact that the decoder is non-causal and for each t ∈ J1, nK the decoder generates Vt from Y n and common randomness C . Then, we have YT − XT − (C, Y∼T , UT , T ) ⇐⇒ YT − XT − (WT , UT , T ) (10) VT − (C, Y∼T , YT , T ) − (UT , XT ) ⇐⇒ VT − (WT , YT , T ) − (UT , XT ) (11) where (10) holds because P{YT = y|XT = x, Y∼T = ỹ, UT = u, T = t, C} = P{YT = y|XT = x} since the channel is memoryless. Then by (9), (11) holds because n X 1 I(VT ; UT XT |CY T ) = I(Vt ; Ut Xt |CY n T = t) = 0. n n i=1 Since W = Wt when T = t, we also have (U, X) − (W, Y ) − V and Y − X − (U, W ). The cardinality bound is proved in Appendix G. IV. I NNER AND OUTER BOUNDS FOR THE STRONG COORDINATION REGION WITH STATE AND SIDE INFORMATION Figure 2. Coordination of signals and actions for a two-node network with a noisy channel with state and side information at the decoder. In this section we consider the model depicted in Figure 2. It is a generalization of the simpler setting of Figure 1, where the noisy channel depends on a state S n , and the decoder has access to non-causal side information Z n . The encoder selects a signal X n = fn (U n , C), with fn : U n × J1, 2nR0 K → X n and transmits it over the discrete memoryless channel P̄Y |XS where S represents the state. The decoder then selects an action V n = gn (Y n , Z n , C), where gn : Y n × Z n × J1, 2nR0 K → V n is a stochastic map and Z n represents the side information available at the decoder. Remark 4: Note that the channel state information and side information at the decoder are represented explicitly by the random variables S n and Z n respectively, but the model is quite general and includes scenarios where partial or perfect channel state information is available at the encoder as well, since the variables U n and S n are possibly correlated. We recall the notions of achievability and of the coordination region for empirical and strong coordination [3, 27] in this setting. Definition 3: A distribution P̄U SZXY V is achievable for empirical coordination if for all ε > 0 there exists a sequence (fn , gn ) of encoders-decoders such that   P V TU n S n Z n X n Y n V n , P̄U SZXY V > ε < ε 7 where TU n S n Z n X n Y n V n is the joint histogram of the actions induced by the code. The empirical coordination region Re is the closure of the set of achievable distributions P̄U SZXY V . A pair (P̄U SZXY V , R0 ) is achievable for strong coordination if there exists a sequence (fn , gn ) of encoders-decoders with rate of common randomness R0 , such that  lim V PU n S n Z n X n Y n V n , P̄U⊗n SZXY V = 0 n→∞ where PU S Z X Y V is the joint distribution induced by the code. The strong coordination region R is the closure of the set of achievable pairs (P̄U SZXY V , R0 ). n n n n n n In the case of non-causal encoder and decoder, the problem of characterizing the strong coordination region for the system model in Figure 2 is still open, but we establish the following inner and outer bounds. Theorem 2: Let P̄U SZ and P̄Y |XS be the given source and channel parameters, then Rin ⊆ R ⊆ Rout where:   P̄ P̄ P̄ P̄ = P̄   U SZXY V U SZ X|U Y |XS V |U XY SZ       ∃ W taking values in W   Rin := (P̄U SZXY V , R0 ) P̄U SZW XY V = P̄U SZ P̄W |U P̄X|U W P̄Y |XS P̄V |W Y Z (12)     I(W ; U ) ≤ I(W ; Y Z)       R0 ≥ I(W ; U SXV |Y Z)   P̄U SZXY V = P̄U SZ P̄X|U P̄Y |XS P̄V |U XY SZ         ∃ W taking values in W       (P̄U SZXY V , R0 ) P̄U SZW XY V = P̄U SZ P̄W |U P̄X|U W P̄Y |XS P̄V |W Y Z (13) Rout := I(W ; U ) ≤ min{I(XU S; Y Z), I(XS; Y ) + I(U ; Z)}        R0 ≥ I(W ; U SXV |Y Z)       |W| ≤ |U × S × Z × X × Y × V| + 5 Remark 5: As in Theorem 1, even if inner and outer bound do not match, they only differ on the upper bound on I(W ; U ). Note that we cannot compare I(XU S; Y Z) and I(XS; Y )+I(U ; Z) (for more details, see the discussion in Appendix C). Hence, in Rout the upper bound on the mutual information I(W ; U ) is the minimum of the two. Remark 6: Observe that the decomposition of the joint distributions P̄U SZXY V and P̄U SZW XY V is equivalently characterized in terms of Markov chains:  ( Z − (U, S) − (X, Y, W )  Z − (U, S) − (X, Y ) , . (14) Y − (X, S) − (U, W )  Y − (X, S) − U  V − (Y, Z, W ) − (X, S, U ) A. Proof of Theorem 2: inner bound The achievability proof uses the same techniques as in [11] inspired by [28]. The key idea of the proof is to define a random binning and a random coding scheme, each of which induces a joint distribution, and to prove that the two schemes have the same statistics. Before defining the coding schemes, we state the results that we will use to prove the inner bound. The following lemma is a consequence of the Slepian-Wolf Theorem . Lemma 8 (Source coding with side information at the decoder [29, Theorem 10.1] ): Given a discrete memoryless source (An , B n ), where B n is side information available at the decoder, we define a stochastic encoder ψn : An → J1, 2nR K, where C := ϕn (An ) is a binning of An . If R > H(A|B), the decoder recovers An from C and B n with arbitrarily small error probability. Lemma 9 (Channel randomness extraction [30, Lemma 3.1] and [28, Theorem 1]): Given a discrete memoryless source (An , B n ), we define a stochastic encoder ϕn : B n → J1, Jn K, where K := ϕn (B n ) is a binning of B n with Jn values chosen independently and uniformly at random. if R < H(B|A), then we have   lim Eϕn V PAϕn K , QK PAn = 0, n→∞ where Eϕn denotes the average over the random binnings and QK is the uniform distribution on J1, Jn K. 8 Although Lemma 9 ensures the convergence in total variational distance and is therefore enough to prove strong coordination, it does not bring any insight on the speed of convergence. For this reason, throughout the proof we will use the following lemma instead. We omit the proof as it follows directly from the discussion in [31, Section III.A]. Lemma 10 (Channel randomness extraction for discrete memoryless sources and channels): Let An with distribution PAn be a discrete memoryless source and PB n |An a discrete memoryless channel. Then for every ε > 0, there exists a sequence of (Jn , n) codes ϕn : B n → J1, Jn K and a constant α > 0 such that for K := ϕn (B n ) we have log Jn lim inf ≤ (1 − ε)H(B|A) and D (PAn K kPAn QK ) ≤ 2−αn . (15) n→∞ n 1) Random binning scheme: Assume that the sequences U n , S n , Z n , X n , W n , Y n and V n are jointly i.i.d. with distribution P̄U n S n Z n P̄W n |U n P̄X n |W n U n P̄Y n |X n S n P̄V n |W n Y n Z n . We consider two uniform random binnings for W n : • first binning C = ϕ1 (W n ), where ϕ1 : W n → J1, 2nR0 K is an encoder which maps each sequence of W n uniformly and independently to the set J1, 2nR0 K; • second binning F = ϕ2 (W n ), where ϕ2 : W n → J1, 2nR̃ K is an encoder. Figure 3. The square and the circle represent the possible outputs C of the first binning and the dot and the cross the outputs F of the second binning. Given y and the realizations of C and F , it is possible to recover w. Note that if R̃ + R0 > H(W |Y Z), by Lemma 8, it is possible to recover W n from Y n , Z n and (C, F ) with SW high probability using a Slepian-Wolf decoder via the conditional distribution P c . This defines a joint W n |CF Y n Z n distribution: SW P̄U n S n Z n W n W c n X n Y n CF V n = P̄U n S n Z n P̄W n |U n P̄X n |W n U n P̄C|W n P̄F |W n P̄Y n |X n S n P̄V n |W n Y n Z n PW c n |CF Y n Z n . In particular, P̄W n |CF U n is well defined. 2) Random coding scheme: In this section we follow the approach in [28, Section IV.E]. Suppose that in the setting of Figure 2, encoder and decoder have access not only to common randomness C but also to extra randomness F , where C is generated uniformly at random in J1, 2nR0 K with distribution QC and F is generated uniformly at random in J1, 2nR̃ K with distribution QF independently of C . Then, the encoder generates W n according to P̄W n |CF U n defined above and X n according to P̄X n |U n W n . The encoder sends X n through the channel. The decoder SW obtains (Y n , Z n ) and (C, F ) and reconstructs W n via the conditional distribution P c . The decoder then n n n W |CF Y Z b |w, b y, z), generates V n letter by letter according to the distribution PV n |W c n Y n Z n (more precisely P̄V n |W n Y n Z n (u b is the output of the Slepian-Wolf decoder). This defines a joint distribution: where w SW PU n S n Z n W n W cnY nZn . c n X n Y n CF V n = QC QF PU n S n Z n P̄W n |CF U n P̄X n |W n U n P̄Y n |X n S n PW c n |CF Y n Z n PV n |W We want to show that the distribution P̄ is achievable for strong coordination: lim V(P̄U n S n Z n X n W n W c n Y n V n , PU n S n Z n X n W n W c n Y n V n ) = 0. n→∞ (16) 9 We prove that the random coding scheme possesses all the properties of the initial source coding scheme stated in Section IV-A1. Note that D(P̄U n S n Z n W n W c n X n Y n CF kPU n S n Z n W n W c n X n Y n CF ) SW = D(P̄U n S n Z n P̄W n |U n P̄X n |W n U n P̄C|W n P̄F |W n P̄Y n |X n S n PW c n |CF Y n Z n SW kQC QF PU n S n Z n P̄W n |CF U n P̄X n |W n U n P̄Y n |X n S n PW c n |CF Y n Z n ) (17) (a) = D(P̄U n S n Z n P̄W n |U n P̄C|W n P̄F |W n kQC QF PU n S n Z n P̄W n |CF U n ) (b) = D(P̄U n S n Z n CF kPU n S n Z n QC QF ) where (a) comes from Lemma 4. Note that (b) follows from Lemma 4 as well, since W n is generated according to P̄W n |CF U n and because of the Markov chain W − U − ZS , W n is conditionally independent of (Z n , S n ) given e < H(W |U SZ) = H(W |U ), we apply Lemma 10 where B n = W n , K = (C, F ), and claim U n . Then if R0 + R 0 0 that there exists a fixed binning ϕ0 := (ϕ01 , ϕ02 ) such that, if we denote with P̄ ϕ and P ϕ the distributions P̄ and P with respect to the choice of a binning ϕ0 , we have   0 D P̄Uϕn S n Z n CF kPU n S n Z n QC QF = δ(n), which by (17) implies  0 D P̄ ϕn kP ϕn Then, by Lemma 1 we have  0 V P̄ ϕn , P ϕn c n X n Y n CF U SnZnW nW c n X n Y n CF U SnZnW nW 0  = δ(n).  = δ(n). c n X n Y n CF U SnZnW nW 0 c n X n Y n CF U SnZnW nW (18) From now on, we will omit ϕ0 to simplify the notation. Now we would like to show that we have strong coordination for V n as well, but in the second coding scheme n c n and not W n as in the first scheme. Because of V is generated using the output of the Slepian-Wolf decoder W e + R0 > H(W |Y Z) implies that W c n is equal to W n with high probability and we will Lemma 8, the inequality R use this fact to show that the distributions are close in total variational distance. First, we recall the definition of coupling and the basic coupling inequality for two random variables [32]. Definition 4: A coupling of two probability distributions PA and PA0 on the same measurable space A is any probability distribution PbAA0 on the product measurable space A × A whose marginals are PA and PA0 . Proposition 1 ([32, I.2.6]): Given two random variables A, A0 with probability distributions PA , PA0 , any coupling PbAA0 of PA , PA0 satisfies V(PA , PA0 ) ≤ 2PPbAA0 {A 6= A0 } Then, we apply Proposition 1 to A = U n S n Z n W n X n Y n CF PA = P̄U n S n Z n W n X n Y n CF c n X n Y n CF A0 = U n S n Z n W PA0 = P̄U n S n Z n W c n X n Y n CF A = U × S × Z × W × X × Y × J1, 2nR0 K × J1, 2nR̃ K. c n is equal to W n with high probability by Lemma 8, and the probability of error goes to zero exponentially Since W in the Slepian-Wolf Theorem [29, Theorem 10.1], we find that for the random binning scheme V(P̄U n S n Z n W n X n Y n CF , P̄U n S n Z n W c n X n Y n CF ) = δ(n). This implies that: V(P̄U n S n Z n W n W c n X n Y n CF , P̄U n S n Z n W n X n Y n CF 1W c n |W n ) = δ(n). (19) 10 Similarly, we apply Proposition 1 again to the random coding scheme and we have V(PU n S n Z n W n W c n X n Y n CF , PU n S n Z n W n X n Y n CF 1W c n |W n ) = δ(n). (20) Then using the triangle inequality, we find that V(P̄U n S n Z n W n W c n X n Y n CF V n , PU n S n Z n W n W c n X n Y n CF V n ) = V(P̄U n S n Z n W n W c n X n Y n CF P̄V n |W n Y n Z n , PU n S n Z n W n W c n X n Y n CF PV n |W cnY nZn ) (21) ≤ V(P̄U n S n Z n W n W c n X n Y n CF P̄V n |W n Y n Z n , P̄U n S n Z n W n X n Y n CF 1W c n |W n P̄V n |W n Y n Z n ) + V(P̄U n S n Z n W n X n Y n CF 1W c n |W n P̄V n |W n Y n Z n , PU n S n Z n W n X n Y n CF 1W c n |W n PV n |W cnY nZn ) + V(PU n S n Z n W n X n Y n CF 1W c n |W n PV n |W n Y n Z n , PU n S n Z n W n W c n X n Y n CF PV n |W c n Y n Z n ). The first and the third term go to zero exponentially by applying Lemma 3 to (19) and (20) respectively. Now observe that 1W c n |W n P̄V n |W n Y n Z n = 1W c n |W n PV n |W cnY nZn by definition of PV n |W c n Y n Z n . Then by using Lemma 3 again the second term is equal to  V P̄U n S n Z n W n X n Y n CF , PU n S n Z n W n X n Y n CF and goes to zero by (18) and Lemma 2. Hence, we have V(P̄U n S n Z n W n W c n X n Y n CF V n ) = δ(n). c n X n Y n CF V n , PU n S n Z n W n W (22) Using Lemma 2, we conclude that V(P̄U n S n Z n X n W n W c n Y n V n ) = δ(n). c n Y n V n , PU n S n Z n X n W n W 3) Remove the extra randomness F: Even though the extra common randomness F is required to coordinate (U n , Z n , X n , Y n , V n , W n ) we will show that we do not need it in order to coordinate only (U n , S n , Z n , X n , Y n , V n ). Observe that by Lemma 2, equation (22) implies that Sn, V(P̄U n S n Z n X n Y n V n F , PU n S n Z n X n Y n V n F ) = δ(n). (23) As in [28], we would like to reduce the amount of common randomness by having the two nodes agree on an instance F = f . To do so, we apply Lemma 10 again where B n = W n , K = F , ϕ = ϕ002 and An = U n S n Z n X n Y n V n . If R̃ < H(W |SU ZXY V ), there exists a fixed binning such that V(P̄U n S n Z n X n Y n V n F , QF P̄U n S n Z n X n Y n V n ) = δ(n). (24) Remark 7: Note that in Section IV-A2 we had already chosen a specific binning ϕ02 . In Appendix B we prove that there exists a binning which works for both conditions. Because of (23), (24) implies V(PU n S n Z n X n Y n V n F , QF P̄U n S n Z n X n Y n V n ) = δ(n). (25) Hence, we can fix f ∈ F such that (U n , S n , Z n , X n , Y n , Û n ) is almost independent of F according to P . To conclude, if f ∈ F is fixed, the distribution PU n S n Z n X n Y n V n changes to PU n S n Z n X n Y n V n |F =f and by Lemma 5 we have V(P̄U n S n Z n X n Y n V n |F =f , PU n S n Z n X n Y n V n |F =f ) = δ(n). Since P̄U n S n Z n X n Y n V n |F =f is close to P̄U n S n Z n X n Y n V n because of (24), we have V(P̄U n S n Z n X n Y n V n , PU n S n Z n X n Y n V n ) = δ(n). (26) 11 4) Rate constraints: We have imposed the following rate constraints: e + R0 < H(W |U ), H(W |Y Z) < R e < H(W |U SZXY V ). R Therefore we obtain: R0 > H(W |Y Z) − H(W |U SZXY V ) = I(W ; U SXV |Y Z), I(W ; U ) < I(W ; Y Z). B. Proof of Theorem 2: outer bound Consider a code (fn , gn ) that induces a distribution PU n S n Z n X n Y n V n that is ε-close in total variational distance to the i.i.d. distribution P̄U⊗n SZXY V . Let the random variable T be uniformly distributed over the set J1, nK and independent of the sequence (U n , S n , Z n , X n , Y n , V n , C). The variable (UT , ST , ZT ) is independent of T because (U n , S n , Z n ) is an i.i.d. source sequence [3]. 1) Bound on R0 : The proof is the same as in Section III-C2, using An := U n S n X n V n and B n := Y n Z n in (7). Then, we obtain R0 ≥ I(W ; U SXV |Y Z). 2) Information constraint: As proved in Appendix C, in the general case we are not able to compare I(XU S; Y Z) and I(XS; Y ) + I(U ; Z). Then, we show separately that: I(W ; U ) ≤ I(XU S; Y Z), (27) I(W ; U ) ≤ I(XS; Y ) + I(U ; Z). (28) a) Proof of (27): We have (a) 0 ≤ I(X n S n ; Y n ) − I(CU n ; Y n ) = H(Y n |CU n ) − H(Y n |X n S n ) (b) = H(Y n |CU n ) − H(Y n |CU n X n S n ) = I(Y n ; X n S n |CU n ) ≤ I(Y n Z n ; X n S n |CU n ) (29) (c) = I(Y n Z n ; X n S n U n |C) − I(Y n Z n ; U n |C) ≤ nI(YT ZT ; XT ST UT |T ) − nI(UT ; Y∼T Z∼T CT ) where (a) and (b) come from the Markov chain Y n − (X n , S n ) − (C, U n ). To prove (c), we show separately that: (i) I(Y n Z n ; U n |C) ≥ nI(UT ; Y∼T Z∼T CT ), (ii) I(Y n Z n ; X n S n U n |C) ≤ nI(YT ZT ; XT ST UT |T ). Proof of (i): Observe that (d) I(Y n Z n ; U n |C) = H(U n |C) − H(U n |Y n Z n C) = H(U n ) − H(U n |Y n Z n C) n n  X (e) X t−1 = H(Ut ) − H(Ut |U Yt Zt Y∼t Z∼t C) ≥ (H(Ut ) − H(Ut |Y∼t Z∼t C)) t=1 t=1 (f ) = nH(UT |T ) − nH(UT |Y∼T Z∼T CT ) = nH(UT ) − nH(UT |Y∼T Z∼T CT ) = nI(UT ; Y∼T Z∼T CT ) where (d) comes from the independence between U n and C and (e) and (f ) follow from the i.i.d. nature of U n . Proof of (ii): First, we need the following result (proved in Appendix D. Lemma 11: For every t ∈ J1, nK the following Markov chain holds: (Yt , Zt ) − (Xt , Ut , St ) − (C, X∼t , U∼t , S∼t , Y∼t , Z∼t ). Then, observe that I(Y n Z n ; X n S n U n |C) ≤ I(Y n Z n ; X n S n U n C) n n X X n n n t−1 t−1 = I(Yt Zt ; X S U C|Y Z )≤ I(Yt Zt ; X n S n U n CY t−1 Z t−1 ) t=1 t=1 (30) 12 = (g) = n X I(Yt Zt ; Xt St Ut ) + t=1 n X n X I(Yt Zt ; X∼t S∼t U∼t CY t−1 Z t−1 |Xt St Ut ) t=1 I(Yt Zt ; Xt St Ut ) = nI(YT ZT ; XT ST UT |T ) t=1 where (g) follows from Lemma 11. Moreover, since the distributions are ε-close to i.i.d. by hypothesis, the last term is close to nI(Y Z; XSU ). In fact, we have I(YT ZT ; XT ST UT |T ) = H(YT ZT |T ) + H(XT ST UT |T ) − H(YT ZT XT ST UT |T ) n n n X X X 1 1 1 = H(Yt Zt ) + H(Xt St Ut ) − H(Yt Zt Xt St Ut ). n n n t=1 t=1 t=1 Then, as in the proof of [12, Lemma VI.3],  |Y × Z| := ε1 , |H(Yt Zt ) − H(Y Z)| ≤ 2ε log ε   |X × S × U | |H(Xt St Ut ) − H(XSU )| ≤ 2ε log := ε2 , ε   |Y × Z × X × S × U| := ε3 . |H(Yt Zt Xt St Ut ) − H(Y ZXSU )| ≤ 2ε log ε  This implies that |I(YT ZT ; XT ST UT |T ) − I(Y Z; XSU )| ≤ g(ε), (31) where g(ε) := (ε1 + ε2 + ε3 ). Then, (29) becomes 0 ≤ nI(Y Z; XSU ) − nI(UT ; Y∼T Z∼T CT ) + g(ε). b) Proof of (28): In this case, for the second part of the converse, we have (a) (b) 0 ≤ I(X n S n ; Y n ) − I(CZ n U n ; Y n ) ≤ I(X n S n ; Y n ) − I(U n ; Y n C|Z n ) = H(Y n ) − H(Y n |X n S n ) − H(U n ) + I(U n ; Z n ) + H(U n |Y n Z n C) n n n n n X X X X (c) X ≤ H(Yt ) − H(Yt |Xt St ) − H(Ut ) + I(Ut ; Zt ) + H(Ut |U t−1 Yt Zt Y∼t Z∼t C) t=1 t=1 t=1 t=1 t=1 (d) ≤ nH(YT ) − nH(YT |XT ST T ) − nH(UT |T ) + nI(UT ; ZT |T ) + nH(UT |Y∼T Z∼T CT ) (e) = nH(YT ) − nH(YT |XT ST ) − nH(UT ) + nI(UT ; ZT ) + nH(UT |Y∼T Z∼T CT ) = nI(XT , ST ; YT ) − nI(UT ; Y∼T Z∼T CT ) + nI(UT ; ZT ) where (a) comes from the Markov chain Y n − (X n , S n ) − (C, Z n , U n ), (b) from the fact that I(CZ n U n ; Y n ) ≥ I(Z n U n ; Y n |C) = I(Z n U n ; Y n C) ≥ I(U n ; Y n C|Z n ) by the chain rule and the fact that U n and Z n are independent of C . Then (c) comes from the chain rule for the conditional entropy. The inequalities (d) comes from the fact that conditioning does not increase entropy (in particular H(YT |T ) ≤ H(YT )) and (e) from the memoryless channel P̄Y |XS and the i.i.d. source P̄U Z . Finally, since the source is i.i.d. the last term is nI(U ; Z). Remark 8: Note that if U is independent of Z the upper bound for I(U ; W ) is I(XS; Y ). 3) Identification of the auxiliary random variable: For each t ∈ J1, nK we identify the auxiliary random variables Wt with (C, Y∼t , Z∼t ) and W with (WT , T ) = (C, Y∼T , Z∼T , T ). The following Markov chains hold for each t ∈ J1, nK: Zt − (Ut , St ) − (C, Xt , Yt , Y∼t , Z∼t ) ⇐⇒ Zt − (Ut , St ) − (Xt , Yt , Wt ), (32) Yt − (Xt , St ) − (C, Y∼t , Z∼t , Ut ) ⇐⇒ Yt − (Xt , St ) − (Wt , Ut ), (33) Vt − (C, Y∼t , Z∼t , Yt , Zt ) − (Ut , St , Xt ) ⇐⇒ Vt − (Wt , Yt , Zt ) − (Ut , St , Xt ). (34) 13 Then we have ZT − (UT , ST ) − (C, XT , YT , Y∼T , Z∼T , T ) ⇐⇒ ZT − (UT , ST ) − (XT , YT , WT , T ), (35) YT − (XT , ST ) − (C, Y∼T , Z∼T , UT , T ) ⇐⇒ YT − (XT , ST ) − (WT , UT , T ), (36) VT − (C, Y∼T , Z∼T , YT , ZT , T ) − (UT , ST , XT ) ⇐⇒ VT − (WT , YT , ZT , T ) − (UT , ST , XT ). (37) where (35) and (36) come from the fact that P{ZT = z|ST = s, UT = u, XT = x, YT = y, Y∼T = ỹ, Z∼T = z̃, T = t, C} = P{ZT = z|ST = s, UT = u}, P{YT = y|XT = x, ST = s, Y∼T = ỹ, Z∼T = z̃, UT = u, T = t, C} = P{YT = y|XT = x, ST = s} since the source is i.i.d. and the channel is memoryless. Then by (34), (37) holds because I(VT ; UT ST XT |CY n Z n T ) = n X 1 I(Vt ; Ut St Xt |CY n Z n T = t) = 0. n i=1 Since W = Wt when T = t, we also have Z−(U, S)−(X, Y, W ), (U, S, X)−(W, Y, Z)−V and Y −(X, S)−(W, U ). The cardinality bound is proved in Appendix G. V. S TRONG COORDINATION REGION FOR SPECIAL CASES Although the inner and outer bounds in Theorem 2 do not match in general, we characterize the strong coordination region exactly in three special cases: perfect channel, lossless decoding and separation between the channel and the source. The empirical coordination region for these three settings was derived in [17]. In this section we recover the same information constraints as in [17], but we show that for strong coordination a positive rate of common randomness is also necessary. This reinforces the conjecture, stated in [3], that with enough common randomness the strong coordination capacity region is the same as the empirical coordination capacity region for any specific network setting. A. Perfect channel Figure 4. Coordination of signals and actions for a two-node network with a perfect channel. Suppose we have a perfect channel as in Figure (4). In this case X n = Y n and the variable Z n plays the role of side information at the decoder. We characterize the strong coordination region RPC . Theorem 3: In the setting of Theorem 2, suppose that P̄Y |XS (y|x, s) = 1X=Y {x = y}. Then the strong coordination region is   P̄U ZXV = P̄U Z P̄X|U P̄V |U XZ         ∃ W taking values in W       (P̄U ZXV , R0 ) P̄U ZW XV = P̄U Z P̄W |U P̄X|U W P̄V |W XZ RPC := (38) I(W X; U ) ≤ H(X) + I(W ; Z|X)         R0 ≥ I(W ; U V |XZ)       |W| ≤ |U × Z × X × V| + 4 Remark 9: Observe that the decomposition of the joint distributions P̄U ZXV and P̄U ZW XV is equivalently characterized in terms of Markov chains: ( Z − U − (X, W ) Z − U − X, . (39) V − (X, Z, W ) − U 14 1) Achievability: We show that RPC is contained in the region Rin defined in (12) and thus it is achievable. We note Rin (W ) the subset of Rin for a fixed W ∈ W that satisfies: P̄U SZW XY V = P̄U SZ P̄W |U P̄X|U W P̄Y |XS P̄V |W Y Z I(W ; U ) ≤ I(W ; Y Z) (40) R0 ≥ I(W ; U SXV |Y Z) Then the set Rin is the union over all the possible choices for W that satisfy the (40). Similarly, RPC is the union of all RPC (W ) with W that satisfies P̄U ZW XV = P̄U Z P̄W |U P̄X|U W P̄V |W XZ I(W, X; U ) ≤ H(X) + I(W ; Z|X) (41) R0 ≥ I(W ; U V |XZ) Let (P̄U ZXV , R0 ) ∈ RPC (W ) for some W ∈ W . Then W verifies the Markov chains Z − U − (X, W ) and V − W XZ − U and the information constraints for RPC . Note that (P̄U ZXV , R0 ) ∈ Rin (W 0 ), where W 0 = (W, X). The Markov chains are still valid and the information constraints in (41) imply the information constraints for Rin (W 0 ) since: I(W 0 ; U ) = I(W, X; U ) ≤ H(X) + I(W ; Z|X) = I(W, X; X) + I(W, X; Z|X) = I(W, X; XZ) = I(W 0 ; XZ), (42) R0 ≥ I(W ; U V |XZ) = I(W X; U V |XZ). Then (P̄U ZXV , R0 ) ∈ Rin (W 0 ) and if we consider the union over all suitable W , we have [ [ [ RPC (W ) ⊆ Rin (W, X) ⊆ Rin (W ). W W (W,X) Finally, RPC ⊆ Rin . Remark 10: In the case of perfect channel, [17, Section IV.A] characterizes the empirical coordination region and the information constraint is I(W, X; U ) ≤ H(X) + I(W ; Z|X) as in (38). 2) Converse: Consider a code (fn , gn ) that induces a distribution PU n S n Z n X n V n that is ε-close in total variational distance to the i.i.d. distribution P̄U⊗n SZXV . Let T be the random variable defined in Section IV-B. We would like to prove that 0 ≤ H(X) + I(W ; Z|X) − I(W, X; U ) = I(W, X; XZ) − I(W, X; U ). The following proof is inspired by [17]. We have 0 = H(X n , Z n ) − I(X n Z n ; U n C) − H(X n Z n |U n C) n n X (a) X n ≤ H(Xt , Zt ) − I(X n Z n ; Ut |Ut+1 C) − H(X n Z n |U n C) t=1 t=1 (b) n X t=1 t=1 (c) n X n X = = ≤ (d) = I(X n Z n C; Xt Zt ) − I(X n Z n C; Xt Zt ) − n X t=1 t=1 n X n X I(X n Z n C; Xt Zt ) − t=1 n X t=1 n I(X n Z n Ut+1 C; Ut ) + n X n I(Ut+1 C; Ut ) − H(X n Z n |U n C) t=1 n I(X n Z n Ut+1 C; Ut ) − H(X n Z n |U n C) I(X n Z n C; Ut ) − H(X n Z n |U n C) t=1 n X I(X n Z∼t C; Xt Zt ) + t=1 I(Zt ; Xt Zt |X n Z∼t C) − n X t=1 I(X n Z∼t C; Ut ) 15 − n X I(Zt ; Ut |X n Z∼t C) − H(X n Z n |U n C) t=1 n X = n X n I(X Z∼t C; Xt Zt ) − n X H(Zt |X n Z n C) − t=1 = n X (e) ≤ (f ) = n n n I(X Z∼t C; Ut ) − H(X Z |U C) + n X H(Zt |X n Z∼t C) + t=1 n X I(X n Z∼t C; Xt Zt ) − t=1 n X t=1 n X I(X n Z∼t C; Xt Zt ) − I(X n Z∼t C; Ut ) + t=1 n X n X I(X n Z∼t C; Xt Zt )− t=1 H(Zt |X n Z∼t C) H(Zt |Ut X n Z∼t C) t=1 n X I(X n Z∼t C; Ut ) + H(Zt |Ut X n Z∼t C) − H(X n Z n |U n C) t=1 n X H(Zt |Ut C) − H(Z n |U n C) t=1 t=1 n X n X t=1 t=1 t=1 − n I(X n Z∼t C; Ut ) t=1 = nI(X n Z∼T C; XT ZT |T ) − nI(X n Z∼T C; UT |T ) ≤ nI(X n Z∼T CT ; XT ZT ) − nI(X n Z∼T CT ; UT ) + nI(T ; UT ) (g) = nI(XT X∼T Z∼T CT ; XT ZT ) − nI(XT X∼T Z∼T CT ; UT ) where (a) and (b) follow from the properties of the mutual information and (c) comes from the independence between U n and C and the i.i.d. nature of the source. Then (d) comes from the chain rule, (e) from the properties of conditional entropy, (f ) from the independence between (U n , Z n ) and C and the i.i.d. nature of the source. Finally, (g) comes from the fact that I(T ; UT ) is zero due to the i.i.d. nature of the source. We identify the auxiliary random variable Wt with (C, X∼t , Z∼t ) for each t ∈ J1, nK and W with (WT , T ) = (C, X∼T , Z∼T , T ). Observe that with this identification of W the bound for R0 follows from Section IV-B1 with the substitution Y = X . Moreover, the following Markov chains are verified for each t ∈ J1, nK: Zt − Ut − (Wt , Xt ) Vt − (Wt , Xt , Zt ) − Ut The first one holds because the source is i.i.d. and Zt does not belong to Wt . The second Markov chain follows from the fact that V is generated using C , X n and Z n that are included in (Wt , Xt , Zt ) = (C, X∼t , Z∼t , Xt , Zt ). With a similar approach as in Section III-C3 and Section IV-B3, the Markov chains with T hold. Then since W = Wt when T = t, we also have Z − U − (W, X) and V − (W, X, Z) − U . The cardinality bound is proved in Appendix G. B. Lossless decoding Figure 5. Coordination of signals and actions for a two-node network with a noisy channel and a lossless decoder. Suppose that the decoder wants to reconstruct the source losslessly, i.e., V = U as in Figure 5. Then, we characterize the strong coordination region RLD . 16 Theorem 4: Consider the setting of Theorem 2 and suppose that P̄V |U SXY Z (v|u, s, x, y, z) = 1V =U {u = v}. Then the strong coordination region is   P̄U SZXY V = P̄U SZ P̄X|U P̄Y |XS 1V =U         ∃ W taking values in W       (P̄U SZXY , R0 ) P̄U SZW XY V = P̄U SZ P̄W |U P̄X|U W P̄Y |XS 1V =U RLD := (43) I(W ; U ) ≤ I(W ; Y Z)         R0 ≥ I(W ; U SX|Y Z)       |W| ≤ |U × S × Z × X × Y| + 3 Remark 11: Observe that the decomposition of the joint distributions P̄U SZXY V and P̄U SZW XY V is equivalently characterized in terms of Markov chains: ( ( Z − (U, S) − (X, Y, W ) Z − (U, S) − (X, Y ) . (44) , Y − (X, S) − (U, W ) Y − (X, S) − U 1) Achievability: We show that RLD ⊆ Rin and thus it is achievable. Similarly to the achievability proof in Theorem 3 , let (P̄U ZXV , R0 ) ∈ RLD (W ) for some W ∈ W . Then, W verifies the Markov chains Z −(U, S)−(X, Y, W ) and Y −(X, S)−(U, Z, W ) and the information constraints for RLD . We want to show that (P̄U ZXV , R0 ) ∈ Rin (W ). Observe that the Markov chains are still valid. Hence, the only difference is the bound on R0 , but I(W ; U SXV |Y Z) = I(W ; U SX|Y Z) when U = V . Then, (P̄U ZXV , R0 ) ∈ Rin (W ) and if we consider the union over all suitable W , we have [ [ RLD (W ) ⊆ Rin (W ). W W Finally, RLD ⊆ Rin . 2) Converse: Consider a code (fn , gn ) that induces a distribution PU n S n Z n X n Y n V n that is ε-close in total ⊗n variational distance to the i.i.d. distribution P̄U⊗n SZXY 1V =U . Let T be the random variable defined in Section IV-B. We have nR0 ≥ H(C) ≥ H(C|Y n Z n ) = H(CU n |Y n Z n ) − H(U n |CY n Z n ) (a) ≥ H(CU n |Y n Z n ) − nf (ε) ≥ I(U n S n X n ; CU n |Y n Z n ) − nf (ε) n X = I(Ut St Xt ; CU n|U t−1 S t−1 X t−1 Y∼t Z∼t Yt Zt ) − nf (ε) t=1 n (b) X ≥ I(Ut St Xt ; CU n Y∼t Z∼t U t−1 S t−1 X t−1 |Yt Zt ) − 2nf (ε) t=1 ≥ n X I(Ut St Xt ; CU n Y∼t Z∼t |Yt Zt ) − 2nf (ε) = nI(UT ST XT ; CU n Y∼T Z∼T |YT ZT T ) − 2nf (ε) t=1 = nI(UT ST XT ; CU n Y∼T Z∼T T |YT ZT ) − nI(UT ST XT ; T |YT ZT ) − 2nf (ε) = nI(UT ST XT ; CU n Y∼T Z∼T T |YT ZT ) − nI(UT ST XT YT ZT ; T ) + nI(YT ZT ; T ) − 2nf (ε) (c) ≥ nI(UT ST XT ; CU n Y∼T Z∼T T |YT ZT ) − 3nf (ε) where (a) follows Fano’s inequality which implies that H(U n |CY n Z n ) ≤ nf (ε) (45) 17 as proved in Appendix E. To prove (b) observe that I(Ut St Xt ; CU n|U t−1 S t−1 X t−1 Y∼t Z∼t Yt Zt ) =I(Ut St Xt ; CU n Y∼t Z∼t U t−1 S t−1 X t−1 |Yt Zt ) − I(Ut St Xt ; Y∼t Z∼t U t−1 S t−1 X t−1 |Yt Zt ) and I(Ut St Xt ; Y∼t Z∼t U t−1 S t−1 X t−1 |Yt Zt ) ≤ f (ε) by Lemma 7. Finally, (c) comes from the fact, proved in [12, Lemma VI.3], that I(UT ST XT YT ZT ; T ) vanishes since the distribution is ε-close to i.i.d. by hypothesis. With the identifications Wt = (C, U n , Y∼t , Z∼t ) for each t ∈ J1, nK and W = (WT , T ) = (C, U n , Y∼T , Z∼T , T ), we have R0 ≥ I(W ; U SX|Y Z). For the second part of the converse, we have nI(U ; W ) ≤ nH(U ) = H(U n ) = H(U n |C) = I(U n ; Y n Z n C) + H(U n |Y n Z n C) n n X (d) X ≤ I(U n ; Yt Zt |Y t−1 Z t−1 C) + nf (ε) ≤ I(U n Y t−1 Z t−1 C; Yt Zt ) + nf (ε) t=1 ≤ n X t=1 I(U n Y∼t Z∼t C; Yt Zt ) + nf (ε) = nI(U n Y∼T Z∼T C; YT ZT |T ) + nf (ε) t=1 (e) ≤ nI(U n Y∼T Z∼T CT ; YT ZT ) + nf (ε) = nI(W ; Y Z) + nf (ε) where (d) comes from Fano’s inequality and (e) comes from the identification W = (C, U n , Y∼T , Z∼T , T ). In order to complete the converse, we show that the following Markov chains hold for each t ∈ J1, nK: Yt − (Xt , St ) − (Ut , Zt , Wt ), Zt − (Ut , St ) − (Xt , Yt , Wt ). The first one is verified because the channel is memoryless and Yt does not belong to Wt and the second one holds because of the i.i.d. nature of the source and because Zt does not belong to Wt . With a similar approach as in Section III-C3 and Section IV-B3, the Markov chains with T hold. Then, since W = Wt when T = t, we also have Y − (X, S) − (U, Z, W ) and Z − (U, S) − (X, Y, W ). The cardinality bound is proved in Appendix G. Remark 12: An equivalent characterization of the region is:   P̄U SZXY = P̄U SZ P̄X|U P̄Y |XS         ∃ W taking values in W       (P̄U SZXY , R0 ) P̄U SZW XY = P̄U SZ P̄W |U P̄X|U W P̄Y |XS (46) RLD := H(U ) ≤ I(W U ; Y Z)        R0 ≥ I(W ; U SX|Y Z) + H(U |W Y Z)        |W| ≤ |U × S × Z × X × Y| + 1 The region in (46) is achievable since with the choice of the auxiliary random variable W 00 = (W, U ), the constraints in (43) become I(W U ; U ) = H(U ) ≤ I(W U ; Y Z) (47) R0 ≥ I(W U ; U SX|Y Z) = I(W ; U SX|Y Z) + I(U ; U SX|W Y Z) = I(W ; U SX|Y Z) + H(U |W Y Z) − H(U |U SXW Y Z) (48) = I(W ; U SX|Y Z) + H(U |W Y Z). Moreover, the converse in the proof of Theorem 4 is still valid with the identification W = (C, U∼T , Y∼T , Z∼T , T ). Note that [17, Section IV.B] gives a characterization of the empirical coordination region and the constraint for the mutual information is 0 ≤ I(W U ; Y Z) − H(U ) = I(W U ; Y Z) − H(U ) − I(W ; S|U ) which is the same as in (47) because of the Markov chain SZ − U − W . 18 C. Separation between source and channel Suppose that the channel state PS n is independent of the source and side information PU n Z n , and that the target ⊗n joint distribution is of the form P̄U⊗n ZV P̄SXY . For simplicity, we will suppose that the encoder has perfect state information (see Figure 6). Then we characterize the strong coordination region RSEP . Note that in this case the coordination requirements are three-fold: the random variables (U n , Z n , V n ) should be coordinated, the random variables (S n , X n , Y n ) should be coordinated and finally (U n , Z n , V n ) should be independent of (S n , X n , Y n ). We introduce two auxiliary random variables W1 and W2 , where W2 is used to accomplish the coordination of (U n , Z n , V n ), while W1 has the double role of ensuring the independence of source and state as well as coordinating (S n , X n , Y n ). Figure 6. Coordination of signals and actions for a two-node network with a noisy channel where the source is separated from the channel. Theorem 5: Consider the setting of coordination region is         (P̄U SZXY , R0 ) RSEP :=        Theorem 2 and suppose that P̄U SXY ZV = P̄U ZV P̄SXY . Then, the strong  P̄U SZXY V = P̄U Z P̄V |U Z P̄S P̄X|S P̄Y |XS     ∃ (W1 , W2 ) taking values in W1 × W2    P̄U SZW1 W2 XY V = P̄U Z P̄W2 |U P̄V |ZW2 P̄S P̄X|S P̄W1 |SX P̄Y |XS I(W1 ; S) + I(W2 ; U ) ≤ I(W1 ; Y ) + I(W2 ; Z)     R0 ≥ I(W1 ; SX|Y ) + I(W2 ; U V |Z)    (|W1 |, |W2 |) ≤ |U × S × Z × X × Y × V| + 3. (49) Remark 13: Observe that the decomposition of the joint distribution P̄U SZW1 W2 XY V is equivalently characterized in terms of Markov chains:   Z − U − W2 (50) Y − (X, S) − W1 .   V − (Z, W2 ) − U 1) Achievability: We show that RSEP is contained in the achievable region Rin in (12) specialized to this specific setting. In this case we are also supposing that the encoder has perfect state information, i.e. the input of the encoder is the pair (U n , S n ) as in Figure 6 as well as common randomness C . The joint distribution P̄U SZXY V becomes P̄U Z P̄V |U Z P̄S P̄X|S P̄Y |XS since (U, Z, V ) is independent of (S, X, Y ) and the Markov chains are still valid. Observe that the set Rin is the union over all the possible choices for W that satisfy the joint distribution, rate and information constraints in (12). Similarly, RSEP is the union of all RSEP (W1 , W2 ) with (W1 , W2 ) that satisfies the joint distribution, rate and information constraints in (49). Let (P̄U SZXY , R0 ) ∈ RSEP (W1 , W2 ) for some (W1 , W2 ) taking values in W1 × W2 . Then, (W1 , W2 ) verifies the Markov chains Z − U − W2 , V − (W2 , Z) − U and Y − (S, X) − W1 , and the information constraints for RSEP . We will show that (P̄U SZXY , R0 ) ∈ Rin (W 0 ), where W 0 = (W1 , W2 ). The information constraints in (49) imply the information constraints for Rin (W 0 ) since: I(W1 W2 ; Y Z) − I(W1 W2 ; U S) = I(W1 ; Y Z) + I(W2 ; Y Z|W1 ) − I(W1 ; U S) − I(W2 ; U S|W1 ) = I(W1 ; Y ) + I(W2 ; Y ZW1 ) − I(W1 ; S) − I(W2 ; U SW1 ) = I(W1 ; Y ) + I(W2 ; Z) − I(W1 ; S) − I(W2 ; U ) ≥ 0 I(W1 W2 ; U SXV |Y Z) = I(W1 ; U SXV |Y Z) + I(W2 ; U SXV |Y ZW1 ) 19 = I(W1 ; U SXV Z|Y ) + I(W2 ; U SXV Y |ZW1 ) = I(W1 ; SX|Y ) + I(W2 ; U SXV Y |Z) = I(W1 ; SX|Y ) + I(W2 ; U V |Z) ≤ R0 because by construction W1 and W2 are independent of each other and W1 is independent of (U, Z, V ) and W2 is independent of (S, X, Y ) . Then (P̄U SZXY , R0 ) ∈ Rin (W1 , W2 ) and if we consider the union over all suitable (W1 , W2 ), we have [ [ [ RSEP (W1 , W2 ) ⊆ Rin (W1 , W2 ) ⊆ Rin (W ). (W1 ,W2 ) W (W1 ,W2 ) Finally, RSEP ⊆ Rin . 2) Converse: Let T be the random variable defined in Section IV-B. Consider a code (fn , gn ) that induces a ⊗n distribution PU n S n Z n X n Y n V n that is ε-close in total variational distance to the i.i.d. distribution P̄U⊗n ZV P̄SXY . Then, we have ⊗n V(PS n X n Y n Z n U n V n , P̄U⊗n ZV P̄SXY ) < ε. If we apply Lemma 6 to A = S n X n Y n and B = Z n U n V n , we have I(S n X n Y n ; Z n U n V n ) < f (ε). Then, we have (a) nR0 ≥ H(C) ≥ I(U n S n X n V n ; C|Y n Z n ) = I(S n X n ; C|Y n Z n U n V n ) + I(U n V n ; C|Y n Z n ) = I(S n X n ; CZ n U n V n |Y n ) − I(S n X n ; Z n U n V n |Y n ) + I(U n V n ; CY n |Z n ) − I(U n V n ; Y n |Z n ) (b) ≥ I(S n X n ; CZ n U n V n |Y n ) + I(U n V n ; CY n |Z n ) − 2f (ε) n n X (c) X n n n n n = I(St Xt ; CZ U V |St+1 Xt+1 Yt Y∼t ) + I(Ut Vt ; CY n |U t−1 V t−1 Zt Z∼t ) − 2f (ε) = t=1 t=1 n X n X n n I(St Xt ; CZ n U n V n St+1 Xt+1 Y∼t |Yt ) − t=1 + t=1 n X I(Ut Vt ; CY n U t−1 V t−1 Z∼t |Zt ) − t=1 (d) ≥ n X t=1 n n I(St Xt ; St+1 Xt+1 Y∼t |Yt ) n X I(Ut Vt ; U t−1 V t−1 Z∼t |Zt ) − 2nf (ε) t=1 n n I(St Xt ; CZ U V n n n St+1 Xt+1 Y∼t |Yt ) + n X I(Ut Vt ; CY n U t−1 V t−1 Z∼t |Zt ) − 2f (ε) − 2nf (ε) t=1 = nI(ST XT ; CU n STn +1 Y∼T |YT T ) + nI(UT VT ; CY n U T −1 V T −1 Z∼T |ZT T ) − 2(n + 1)f (ε) ≥ nI(ST XT ; CU n STn +1 Y T −1 |YT T ) + nI(UT VT ; CY n U T −1 Z∼T |ZT T ) − 2(n + 1)f (ε) = nI(ST XT ; CU n STn +1 Y T −1 T |YT ) − nI(ST XT ; T |YT ) + nI(UT VT ; CY n U T −1 Z∼T T |ZT ) − nI(UT VT ; T |ZT ) − 2(n + 1)f (ε) = nI(ST XT ; CU n STn +1 Y T −1 T |YT ) − nI(ST XT YT ; T ) + nI(YT ; T ) + nI(UT VT ; CY n U T −1 Z∼T T |ZT ) − nI(UT VT ZT ; T ) + nI(ZT ; T ) − 2(n + 1)f (ε) (e) ≥ nI(ST XT ; CU n STn +1 Y T −1 T |YT ) + nI(UT VT ; CY n U T −1 Z∼T T |ZT ) − 2(2n + 1)f (ε) where (a) follows from basic properties of entropy and mutual information. To prove (b), note that I(S n X n ; Z n U n V n |Y n ) ≤ I(S n X n Y n ; Z n U n V n ) I(U n V n ; Y n |Z n ) ≤ I(S n X n Y n ; Z n U n V n ) (51) 20 and I(S n X n Y n ; Z n U n V n ) < f (ε) by (51). Then (c) comes from the chain rule for mutual information, (d) follows from Lemma 7 and (e) from [12, Lemma VI.3] since the distributions are close to i.i.d. by hypothesis. The lower bound on R0 follows from the identifications n W1,t = (C, U n , St+1 , Y t−1 ) n W2,t = (C, Y , U t−1 , Z∼t ) t ∈ J1, nK t ∈ J1, nK W1 = (W1,T , T ) = (C, U , STn +1 , Y T −1 , T ) n W2 = (W2,T , T ) = (C, Y n , U T −1 , Z∼T , T ). Following the same approach as [17, 33], we divide the second part of the converse in two steps. First, we have the following upper bound: I(CU n ; Y n ) = n X I(CU n ; Yt |Y t−1 ) ≤ t=1 = n X (f ) = = (g) = n X I(CU n Y t−1 ; Yt ) t=1 n I(CU n Y t−1 St+1 ; Yt ) − t=1 n X t=1 n X n I(CU n Y t−1 St+1 ; Yt ) − n I(CU Y t=1 n X n X t−1 n St+1 ; Yt ) − n I(CU n Y t−1 St+1 ; Yt ) − t=1 n I(St+1 ; Yt |CU n Y t−1 ) t=1 n X n I(St ; Y t−1 |CU n St+1 ) t=1 n X t−1 I(St ; CY t=1 n X n U n St+1 ) + (52) n X n I(St ; CU n St+1 ) t=1 n I(St ; CY t−1 U n St+1 ) t=1 n n X (h) X = I(Yt ; W1,t ) − I(St ; W1,t ) t=1 t=1 n ) is zero because the where (f ) comes from Csiszár’s Sum Identity [29], (g) from the fact that I(St ; CU n St+1 source and the common randomness are independent of the state, which is i.i.d. by hypothesis. Finally, (h) comes from the identification of the auxiliary random variable W1,t for t ∈ J1, nK. Then, we show a lower bound: (i) (j) I(CU n ; Y n ) ≥ I(U n ; Y n |C) = I(U n ; CY n ) = I(U n Z n ; CY n ) n X n n n ≥ I(U ; CY |Z ) = I(Ut ; CY n |Z n U t−1 ) t=1 = (k) = n X n I(Ut ; CY Z∼t U t=1 n X t−1 |Zt ) − n X I(Ut ; Z∼t U t−1 |Zt ) t=1 I(Ut ; CY n Z∼t U t−1 |Zt ) (53) t=1 = n X I(Ut Zt ; CY n Z∼t U t−1 ) − t=1 (l) = n X I(Zt ; CY n Z∼t U t−1 ) t=1 I(Ut ; CY n Z∼t U t−1 ) − t=1 n X (m) = n X t=1 n X I(Zt ; CY n Z∼t U t−1 ) t=1 I(Ut ; W2,t ) − n X t=1 I(Zt ; W2,t ) 21 where (i) comes from the fact that I(U n ; C) is zero because U n and C are independent, (j) from the Markov chain Z n − U n − Y n C , (k) from the fact that U n and Z n are i.i.d. by hypothesis, (l) follows from the the Markov chain Zt − Ut − (Y n , Z∼t , U t−1 , C) for t ∈ J1, nK and finally (m) comes from the identification of the auxiliary random variable W2,t for t ∈ J1, nK. By combining upper and lower bound, we have (n) 0 ≤ n X t=1 I(Yt , W1,t ) − n X I(St ; W1,t ) + t=1 n X I(Zt ; W2,t ) − t=1 n X I(Ut ; W2,t ) t=1 = nI(YT , W1,T |T ) − nI(ST ; W1,T |T ) + nI(ZT ; W2,T |T ) − nI(UT ; W2,T |T ) ≤ nI(YT , W1,T T ) − nI(ST ; W1,T T ) + nI(ST ; T ) + nI(ZT ; W2,T T ) − nI(UT ; W2,T T ) + nI(UT ; T ) (o) = nI(YT , W1,T T ) − nI(ST ; W1,T T ) + nI(ZT ; W2,T T ) − nI(UT ; W2,T T ) (p) = nI(Y ; W1 ) − nI(S; W1 ) + nI(Z; W2 ) − nI(U ; W2 ) where (n) comes from (52) and (53) and (o) follows from the i.i.d. nature of the source and state. Finally (p) follows from the identifications for W1 and W2 . With the chosen identification, the Markov chains are verified for each t ∈ J1, nK: Yt − (Xt , St ) − W1,t Zt − Ut − W2,t Vt − (W2,t , Zt ) − Ut . The first Markov chain holds because the channel is memoryless and Yt does not belong to W1,t . The second one holds because Z n is i.i.d. and Zt does not belong to W2,t . Finally, the third one is verified because the decoder is non causal and Vt is a function of (Y n , Z n ) that is included in (W2,t , Zt ) = (Y n , U t−1 , Z∼t , Zt ). With a similar approach as in Section III-C3 and Section IV-B3, the Markov chains with T hold. Then since W1 = W1,t and W2 = W2,t when T = t, we also have Y − (X, S) − W1 , Z − U − W2 and V − (W2 , Z) − U . The cardinality bound is proved in Appendix G. Remark 14: Note that even if in the converse proof W1 and W2 are correlated, from them we can define two new variables W10 and W20 independent of each other, with the same marginal distributions PW10 SXY = PW1 SXY and PW20 U V Z = PW2 U V Z , such that the joint distribution PW10 W20 SXY U V Z splits as PW10 SXY PW20 U V Z . Since we are supposing (U, V, Z) and (S, X, Y ) independent of each other and the constraints only depend on the marginal distributions PW1 SXY and PW2 U V Z , the converse is still satisfied with the new auxiliary random variables W10 and W20 . Moreover the new variables still verify the the cardinality bounds since they also depend only on the marginal distributions (as shown in Appendix G). D. Coordination under secrecy constraints Figure 7. Wiretap channel: strong coordination implies secrecy. In this section we briefly discuss how in the separation setting of Section V-C, strong coordination offers additional security guarantees “for free”. In this context, the common randomness is not only useful to coordinate signals and actions of the nodes but plays the role of a secret key shared between the two legitimate users. For simplicity, we do not consider channel state and side information at the decoder. Suppose there is an eavesdropper who observes the signals sent over the channel. We will show that not knowing the common randomness, the eavesdropper cannot infer any information about the actions. 22 Lemma 12: In the setting of Theorem 5, without state and side information at the decoder, suppose that there is an eavesdropper that receives the same sequence Y n as the decoder but has no knowledge of the common randomness. There exists a sequence (fn , gn ) of strong coordination codes achieving the pair (P̄U V P̄X , R0 ) ∈ RSEP such that the induced joint distribution PU n V n X n Y n satisfies the strong secrecy condition [34]: lim D(PU n V n Y n kPU n V n PY n ) = lim I(U n V n ; Y n ) = 0. n→∞ n→∞ (54) ⊗n Proof: Observe that in this setting the target joint distribution is of the form P̄U⊗n V P̄XY . Therefore achieving ⊗n ⊗n strong coordination means that V(PU n V n Y n , P̄U V P̄Y ) vanishes. By the upperbound on the mutual information in ⊗n Lemma 1, we have secrecy if V(PU n V n Y n , P̄U⊗n V P̄Y ) goes to zero exponentially. But we have proved in Section IV-A that there exists a sequence of codes such that V(P̄U n S n Z n X n Y n V n , PU n S n Z n X n Y n V n ) goes to zero exponentially ⊗n (26). Hence, so does V(PU n V n Y n , P̄U⊗n V P̄Y ). E. Is separation optimal? Figure 8. Coordination of the actions U n and V n for a two-node network with an error-free link of rate R. Strong coordination over error-free channels was investigated in [3, 35]. When extending this analysis to noisy channels, it is natural to ask whether some form of separation theorem holds between coding for coordination and channel coding. In this section, we show that unlike the case of empirical coordination, separation does not hold for strong coordination. If the separation principle is still valid for strong coordination, by concatenating the strong coordination of the source and its reconstruction with the strong coordination of the input and output of the channel we should retrieve the same mutual information and rate constraints. In order to prove that separation does not hold, first we consider the optimal result for coordination of actions in [3, 35] and than we compare it with our result on joint coordination of signals and actions. In particular, since we want to compare the result in [3, 35] with an exact region, we consider the case in which the channel is perfect and the target joint distribution is of the form ⊗n P̄U⊗n V P̄X . The choice of a perfect channel might appear counterintuitive but it is motivated by the fact that we are trying to find a counterexample. As a matter of fact, if the separation principle holds for any noisy link, it should in particular hold for a perfect one. We start by considering the two-node network with fixed source P̄U and an error-free link of rate R (Figure 8). For this setting, [3, 35] characterize the strong coordination region as   P̄U V = P̄U P̄V |U         ∃ W taking values in W       (P̄U W V , R, R0 ) P̄U W V = P̄U P̄W |U P̄V |U W RCuff := . (55) R ≥ I(U ; W )         R + R0 ≥ I(U V ; W )       |W| ≤ |U × V| + 1 The result in [3, 35] characterizes the trade-off between the rate R0 of available common randomness and the required description rate R for simulating a discrete memoryless channel for a fixed input distribution. We compare this region to our results when the requirement to coordinate the signals X n and Y n in addition to the actions U n and V n is relaxed. We consider, in the simpler scenario with no state and no side information, the intersection RU V ⊗X := RPC ∩ RSEP . The following result characterizes the strong coordination region (proof in Appendix F). Proposition 2: Consider the setting of Theorem 1 and suppose that P̄Y |X (y|x) = 1X=Y {x = y} and P̄U XV = P̄U V P̄X . Then, the strong coordination region is 23 RU V ⊗X  P̄U XV = P̄U P̄V |U P̄X     ∃ W taking values in W    (P̄U XV , R0 ) P̄U W XV = P̄U P̄W |U P̄V |W P̄X := I(W ; U ) ≤ H(X)         R0 ≥ I(U V ; W )       |W| ≤ |U × V| + 1         (56) To compare RCuff and RU V ⊗X , suppose that in the setting of Figure 8 we use a codebook to send a message to coordinate U n and V n . In order to do so we introduce an i.i.d. source X n with uniform distribution PX in the model and we use the entropy typical sequences of X n as a codebook. Note that in the particular case where X n is generated according to the uniform distribution, all the sequences in X n are entropy-typical and PX n is equal in total variational distance to the i.i.d. distribution P̄X⊗n . Hence, we identify R = H(X) and we rewrite the information contraints in (55) as H(X) ≥ I(U ; W ) R0 ≥ I(U V ; W ) − H(X). Since in [35] the request is to induce a joint distribution PU n V n that is ε-close in total variational distance to n the i.i.d. distribution P̄U⊗n V , by imposing X generated according to the uniform distribution, we have coordinated n n n separately X and (U , V ). Observe that, while the information constraint is the same in the two regions (55) and (56), the rate of common randomness R0 required for strong coordination region in (56) is larger than the rate of common randomness in (55). In fact, in the setting of Figure 8 both X n and the pair (U n , V n ) achieve coordination separately (i.e. PXn is close to P̄X⊗n and PU n V n is close to P̄U⊗n V in total variational distance), but there is no extra constraint on the joint distribution PU n X n V n . On the other hand, the structure of our setting in (56) is different and requires the control of the joint distribution PU n X n V n which has to be ε-close in total variational distance to the i.i.d. distribution ⊗n P̄U⊗n V P̄X . Since we are imposing a more stringent constraint, it requires more common randomness. Remark 15: We found RU V ⊗X as the intersection of two regions, but we can give it the following interpretation starting from RCuff . By identifying R = H(X) in RCuff , we find that the rate of common randomness has to be greater than I(U V ; W ) − H(X). But this is not enough to ensure that X n is independent of (U n , V n ). In order to guarantee that, we apply a one-time pad on X n (which requires an amount of fresh randomness equal to H(X)) and we have R0 ≥ I(U V ; W ) − H(X) + H(X) = I(U V ; W ) which is the condition on the rate of common randomness in (56). The following example shows that, unlike the case of empirical coordination [14], separation does not hold for strong coordination. Example 1: The difference in terms of rate of common randomness R0 is better shown in an example: when separately coordinating the two blocks X n and (U n , V n ) without imposing a joint behavior PU n V n X n , the same bits of common randomness can be reused for both purposes, and the required rate R0 is lower. We consider the case, already analyzed in [12, 35], of a Bernoulli-half source U , and V which is an erasure with probability pe and is equal to U otherwise. In [12] the authors prove that the optimal choice for the joint distributed PU W V is the concatenation of two erasure channels P̄W |U and P̄V |W with erasure probability p1 and p2 respectively. Then we have 1 − pe p2 ∈ [0, min{1/2; pe }], p1 = 1 − 1 − p2 and therefore we obtain I(U ; W ) = 1 − p1 , I(U V ; W ) = h(pe ) + (1 − p1 )(1 − h(p2 )) where h is the binary entropy function. Figure 9 shows the boundaries of the regions (55) (blue) and (56) (green) for pe = 0.75 and a Bernoulli-half input. The dotted bound R ≥ I(U ; V ) comes directly from combining R ≥ I(U ; W ) with the Markov chain U − W − V . At the other extreme, if R0 = 0 in (55), R + R0 ≥ I(U V ; W ) ≥ C(U ; V ) where C(U ; V ) := minU −W −V I(U, V ; W ) is Wyner’s common information [35]. On the other hand, in our setting 24 Figure 9. Comparison of the joint coordination region RU V ⊗X with RCuff [12, 35]: boundaries of the regions for a binary erasure channel with erasure probability pe = 0.75 and a Bernoulli-half input. (56), R0 ≥ I(U V ; W ) ≥ C(U ; V ) for any value of R = H(X). Moreover, note that as R = H(X) tends to infinity, there is no constraint on the auxiliary random variable W (aside from the Markov chain U − V − W ) and similarly to [36] the minimum rate of common randomness R0 needed for strong coordination is Wyner’s common information C(U ; V ). In particular to achieve joint strong coordination of (U, X, V ) a positive rate of common randomness is required. The boundaries of the rate regions only coincide on one extreme, and RU V ⊗X is strictly contained in RCuff . VI. P OLAR CODING SCHEMES FOR STRONG COORDINATION WITH NO STATE AND SIDE INFORMATION Although our achievability results shed some light on the fundamental limits of coordination over noisy channels, the problem of designing practical codes for strong coordination in this setting is still open. In this section we focus on channels without state and side information for simplicity, and we show that the coordination region of Theorem 1 is achievable using polar codes, if an error-free channel of negligible rate is available between the encoder and decoder. We note that polar codes have already been proposed for coordination in other settings: [19] proposes polar coding schemes for point-to-point empirical coordination with error free links and uniform actions, while [21] generalizes the polar coding scheme to the case of non uniform actions. Polar coding for strong point-to-point coordination has been presented in [20, 37]. In [22] the authors construct a joint coordination-channel polar coding scheme for strong coordination of actions. We present a joint source-channel polar coding scheme for strong coordination and we require joint coordination of signals and actions over a noisy channel. For brevity, we only focus on the set of achievable distributions in R0in for which the auxiliary variable W is binary. The scheme can be extended to the case of a non-binary random variable W using non-binary polar codes [38]. Theorem 6: The subset of the region R0in defined in (3) for which the auxiliary random variable W is binary is achievable using polar codes, provided there exists an error-free channel of negligible rate between the encoder and decoder. To convert the information-theoretic achievability proof of Theorem 1 into a polar coding proof, we use source polarization [39] to induce the desired joint distribution. Inspired by [23], we want to translate the random binning scheme into a polar coding scheme. The key idea is that the information contraints and rate conditions found in the random binning proof directly convert into the definition of the polarization sets. In the random binning scheme we reduced the amount of common randomness F by having the nodes to agree on an instance of F , here we recycle some common randomness using a chaining construction as in [24, 25]. 25 Consider random vectors U n , W n , X n , Y n and V n generated h i i.i.d. according to P̄U W XY V that satisfies the 1 0 ⊗m m inner bound of (3). For n = 2 , m ∈ N, we note Gn := 1 1 the source polarization transform defined in β [39]. Let Rn := W n Gn be the polarization of W n . For some 0 < β < 1/2, let δn = 2−n and define the very high entropy and high entropy sets:  V W : = j ∈ J1, nK : H(Rj |Rj−1 ) > 1 − δn ,  V W |U : = j ∈ J1, nK : H(Rj |Rj−1 U n ) > 1 − δn ,  (57) V W |Y : = j ∈ J1, nK : H(Rj |Rj−1 Y n ) > 1 − δn ,  HW |Y : = j ∈ J1, nK : H(Rj |Rj−1 Y n ) > δn . Now define the following disjoint sets: A1 := V W |U ∩ HW |Y , A2 := V W |U ∩ HcW |Y , A3 := V cW |U ∩ HW |Y , A4 := V cW |U ∩ HcW |Y . Remark 16: We have: |HW |Y \ V W |Y | • V W |Y ⊂ HW |Y and limn→∞ = 0 [39], n |V W |U | • limn→∞ = H(W |U ) [40], n |HW |Y | • limn→∞ = H(W |Y ) [39]. n Since H(W |U ) − H(W |Y ) = I(W ; Y ) − I(W ; U ), for sufficiently large n the assumption I(W ; Y ) ≥ I(W ; U ) directly implies that |A2 | ≥ |A3 |. n n , . . . , U n ) and generates for each Encoding: The encoder observes k blocks of the source U(1:k) := (U(1) (k) en following the procedure described in Algorithm 1. Similar to [2], the block i ∈ J1, kK a random variable R (i) chaining construction proceeds as follows: • let A01 := VW |U XY V , observe that A01 is a subset of A1 since VW |U XY V ⊂ VW |U and VW |U XY V ⊂ VW |Y ⊂ HW |Y . The bits in A01 ⊂ V W |U in block i ∈ J1, kK are chosen with uniform probability using a uniform randomness source C̄ 0 shared with the decoder, and their value is reused over all blocks; • the bits in A1 \A01 ⊂ V W |U in block i ∈ J1, kK are chosen with uniform probability using a uniform randomness source C̄i shared with the decoder; • in the first block the bits in A2 ⊂ V W |U are chosen with uniform probability using a local randomness source M; • for the following blocks, let A03 be a subset of A2 such that |A03 | = |A3 |. The bits of A3 in block i are sent to A03 in the block i + 1 using a one time pad with key Ci . Thanks to the Crypto Lemma [34, Lemma 3.1], if we choose Ci of size |A3 | to be a uniform random key, the bits in A03 in the block i + 1 are uniform. The bits in A2 \ A03 are chosen with uniform probability using the local randomness source M ; • the bits in A3 and in A4 are generated according to the previous bits using successive cancellation encoding as in [39]. Note that it is possible to sample efficiently from P̄Ri |Ri−1 U n given U n [39]. As in [23], to deal with unaligned indices, chaining also requires in the last encoding block to transmit R(k) [A3 ] to the decoder. Hence the coding scheme requires an error-free channel between the encoder and decoder which has negligible rate since |R(k) [A3 ]| ≤ |HW |Y | and lim n→∞ k→∞ |HW |Y | H(W |Y ) = lim = 0. k→∞ kn k fn = R en Gn for i = 1, . . . , k and generates X n symbol by symbol from W fn The encoder then computes W (i) (i) (i) (i) n and U(i) using the conditional distribution P̄Xj,(i) |W ej,(i) , uj,(i) ) = P̄X|W U (x|wj,(i) , uj,(i) ) fj,(i) Uj,(i) (x|w n over the channel. and sends X(i) 26 Figure 10. Chaining construction for block Markov encoding Algorithm 1: Encoding n n Input : (U(1) , . . . , U(k) ), M local randomness (uniform random bits), common randomness (C̄ 0 , C̄1:k , C1:k−1 ) shared 0 0 0 with the decoder,   where C̄ has size |A1 |, C̄1:k has size k|A1 \ A1 |, C1:k−1 has size (k − 1)|A3 |. en , . . . , R en Output: R (1) (k) if i = 1 then e(1) [A1 \ A0 ] ←− C̄1 e(1) [A2 ] ←− M e(1) [A0 ] ←− C̄ 0 R R R 1 1 for j ∈ A3 ∪ A4 do n ej,(1) according to Given U(1) , successively choose the bits R   ej,(1) | R ej−1 U n P̄Rj |Rj−1 U n R (58) (1) (1) end end for i = 2, . . . , k do e(i) [A0 ] ←− C̄ 0 e(i) [A1 \ A0 ] ←− C̄i R R 1 1 0 e e e(i) [A2 \ A0 ] ←− M R(i) [A3 ] ←− R(i−1) [A3 ] ⊕ Ci−1 R 3 for j ∈ A3 ∪ A4 do n ej,(i) according to Given U(i) , successively choose the bits R   n ej,(i) | R ej P̄Rj |Rj−1 U n R (i−1) U(i) (59) end end Decoding: The deconding procedure described in Algorithm 2 proceeds as follows. The decoder observes n , . . . , Y n ) and R [A ] which allows it to decode in reverse order. We note R bn the estimate of Rn at the (Y(1) (k) 3 (k) (i) (i) b(i) [A1 ∪ A3 ] = R b(i) [HW |Y ]: decoder, for i ∈ J1, kK. In block i ∈ J1, kK, the decoder has access to R • • the bits in A1 in block i correspond to shared randomness C̄ 0 and C̄i for A01 and A1 \ A01 respectively; in block i ∈ [1, k − 1] the bits in A3 are obtained by successfully recovering A2 in block i + 1. Rate of common randomness: The rate of common randomness is I(W ; U XV |Y ) since: k|A1 | − (k − 1)|A01 | + (k − 1)|A3 | |A1 | + |A3 | − |A01 | = lim n→∞ n→∞ kn n = H(W |Y ) − H(W |U XY V ) = I(W ; U XV |Y ). lim 27 Algorithm 2: Decoding n n Input : (Y(1) , . . . , Y(k) ), R(k) [A3 ] shared with the encoder, common randomness (C̄ 0 , C̄1:k−1 , C1:k−1 ) shared with the encoder, where C̄ 0 has size |A01 |, C̄1:k has size k|A1 \ A01 | and C1:k−1 has size (k − 1)|A3 |. bn , . . . , R bn ) Output: (R (1) (k) for i = k, . . . , 1 do b(i) [A0 ] ←− C̄ 0 b(i) [A1 \ A0 ] ←− C̄i R R 1 1 if i = k then b(i) [A3 ] shared with the decoder R end else b(i) [A3 ] ←− R b(i+1) [A0 ] R 3 end for j ∈ A2 ∪ A4 do ( j n bj,(i) = 0 if Ln (Y(i) , R(i−1) ) ≥ 1 Successively choose the bits according to R 1 else where   n bj Y P̄Rj,(i) |Rj Y n 0 | R (i−1) (i) (i−1) (i) j n   Ln (Y(i) , R(i−1) )= n bj P̄Rj,(i) |Rj Y n 1 | R (i−1) Y(i) (i−1) (i) end end Proof of Theorem 6: We note with P̃ the joint distribution induced by the encoding and decoding algorithm of the previous sections. The proof requires a few steps, here presented as different lemmas. The proofs are in Appendix H. First, we want to show that we have strong coordination in each block. Lemma 13: In each block i ∈ J1, kK, we have   ⊗n V PeU n W ≤ δn(1) (60) f n X n Y n V n , P̄U W XY V (i) (i) (i) (i) (i) n o √ √ (1) c n 6= W f n + 2 log 2 nδn . where δn := 2P W (i) (i) Now, we want to show that two consecutive blocks are almost independent. To simplify the notation, we set L := U n X n Y n W n n Xn Y n V n Li := U(i) i ∈ J1, kK (i) (i) (i) n Xn Y n V n La:b := U(a:b) Ja, bK ⊂ J1, kK (a:b) (a:b) (a:b) Lemma 14: For i ∈ J2, kK, we have   V PeLi−1:i C̄ 0 , PeLi−1 C̄ 0 PeLi ≤ δn(3) q √ (3) (1) (1) (1) where δn := 2 log 2 nδn + 2δn (log |U × X × W × Y × V| − log δn ) and δn is defined in Lemma 13. Now that we have proven the asymptotical independence of two consecutive blocks, we use Lemma 14 to prove the asymptotical independence of all blocks. First we need an intermediate step. Lemma 15: We have V PeL1:k , k Y ! PeLi ≤ √ k − 1δn(3) i=1 where (3) δn is defined in Lemma 14. Finally, we prove the asymptotical independence of all blocks. 28 Lemma 16: We have (5) where δn := √ (3)   (5) V PeL1:k , P̄U⊗nk XY V ≤ δn (2) (2) (3) k(δn + δn ) and δn and δn are defined in (71) and Lemma 14 respectively. VII. C ONCLUSIONS AND PERSPECTIVES In this paper we have developed an inner and an outer bound for the strong coordination region when the input and output signals have to be coordinated with the source and reconstruction. Despite the fact that we have fully characterized the region in some special cases in Section V, inner and outer bound differ in general on the information constraint. Closing this gap is left for future study. The polar coding proof in Section VI, though it provides an explicit coding scheme, relies on a chaining construction over several blocks, which is not practical for delay-constrained applications. This is another issue that may be studied further. Some important questions have not been addressed in this study and are left for future work. By coordinating signals and actions, the synthesized sequences would appear to be statistically indistinguishable from i.i.d. to an outside observer. As suggested in the example in Section V-D, this property could be exploited in a more general setting where two legitimate nodes wish to coordinate while concealing their actions from an eavesdropper who observes the signals sent over the channel. Moreover, our results could be extended to a strategic coordination setting. This represents a scenario where the objectives of the two agents are not necessarily aligned, and has been investigated for empirical coordination in [41, 42]. A PPENDIX A P ROOF OF PRELIMINARY RESULTS Proof of Lemma 6: We have I(At ; A∼t ) = H(At ) − H(A) + H(A) − H(At |A∼t ) and we prove separately that H(A) − H(At |A∼t ) ≤ f (ε), H(At ) − H(A) ≤ f (ε). First, we need two results. Lemma 17 ([43, Lemma 2.7]): Let P and Q two distributions on A such that V(P, Q) = ε and ε ≤ 1/2, then |A| |H(P ) − H(Q)| ≤ ε log . ε Lemma 18 ([28, Lemma 3.2]): If V(PA PB|A , QA QB|A ) ≤ ε then √ √ P{A ∈ A| V(PB|A=a , QB|A=a ) ≤ ε} ≥ 1 − 2 ε. √ √ Now, consider the set E := {a ∈ An−1 | V(PAt |A∼t =a , P̄A ) ≤ ε}. By Lemma 18, P{E} ≥ 1 − 2 ε. Then, we have X X H(A) − H(At |A∼t ) = H(A) − PA∼t (a)H(At |A∼t = a) = (PA∼t (a)H(A)−PA∼t (a)H(At |A∼t = a)) a∈An−1 = X (PA∼t (a)H(A) − PA∼t (a)H(At |A∼t = a)) + a∈E (a) ≤ X a∈E a∈An−1 X a∈E √ (PA∼t (a)H(A) − PA∼t (a)H(At |A∼t = a)) c PA∼t (a)δ + P{E c } (H(At ) + H(A)) ≤ δ + 2 ε (2H(A) + δ) (61) 29 where (a) comes from the fact that by Lemma 17 for a ∈ E |H(At |A∼t = a) − H(A)| ≤ ε log |A| := δ. ε Lemma 17 also implies that |H(At ) − H(A)| ≤ δ. √ Hence by (61) and (62), we have I(At ; A∼t ) ≤ 2 ε(2H(A) + δ) + 2δ . (62) Proof of Lemma 7: The proof of (1) comes directly from Lemma 6: n X I(At ; A t−1 B∼t |Bt ) ≤ t=1 n X I(At ; A∼t B∼t |Bt ) ≤ t=1 n X I(At Bt ; A∼t B∼t ) ≤ nf (ε). (63) t=1 To prove (2), we have H(C|B n ) ≥ I(An ; C|B n ) = n X I(At ; C|At−1 B∼t Bt ) t=1 = n X I(At ; CAt−1 B∼t |Bt ) − t=1 ≥ (a) ≥ n X n X I(At ; At−1 B∼t |Bt ) t=1 I(At ; CB∼t |Bt ) − t=1 n X n X I(At ; At−1 B∼t |Bt ) t=1 I(At ; CB∼t |Bt ) − nf (ε) = nI(AT ; CB∼T |BT T ) − nf (ε) t=1 = nI(AT ; CB∼T T |BT ) − nI(AT ; T |BT ) − nf (ε) ≥ nI(AT ; CB∼T T |BT ) − nI(AT BT ; T ) − nf (ε) where (a) comes from Lemma 7. A PPENDIX B P ROOF OF R EMARK 7 We want to prove that there exists a fixed binning that satisfy both the conditions in Section IV-A2 and Section IV-A3. If we denote with Eϕ1 ϕ2 and Eϕ2 the expected value with respect to the random binnings, for all ε, there exists n̄ such that ∀n ≥ n̄  ε  Eϕ1 ϕ2 V P̄Uϕn1 ϕS2n Z n F C , QF QC P̄U n S n Z n < 2 ε ϕ2 Eϕ2 [V(P̄U n S n Z n X n Y n V n F , QF P̄U n S n Z n X n Y n V n )] < 2 which implies by Markov’s inequality   1 Pϕ1 ϕ2 V P̄Uϕn1 ϕS2n Z n F C , QF QC P̄U n S n Z n < ε > 2 1 ϕ2 Pϕ2 {V(P̄U n S n Z n X n Y n V n F , QF P̄U n S n Z n X n Y n V n ) < ε} > . (64) 2 In Section IV-A2 and IV-A3 we have chosen the binnings (ϕ01 , ϕ02 ) and ϕ002 respectively such that  0 0  ϕ ϕ lim V P̄U n1 S2n Z n F C , QF QC P̄U n S n Z n = 0 n→∞ ϕ00 lim V(P̄U n2 S n Z n X n Y n V n F , QF P̄U n S n Z n X n Y n V n ) = 0. n→∞ It follows from (64) that the intersection of the two sets is non-empty, therefore there exists a binning ϕ∗2 that satisfies both conditions. 30 A PPENDIX C C OMPARISON BETWEEN I(XU S; Y Z) AND I(XS; Y ) + I(U ; Z) Observe that I(XU S; Y Z) = I(XS; Y Z) + I(U ; Y Z|XS) (a) = I(XS; Y ) + I(U ; Z) + I(SXY ; Z) − I(Y ; Z) + I(U Z; SXY ) − I(SXY ; Z) − I(U ; XS) (b) = I(XS; Y ) + I(U ; Z) − I(Y ; Z) + I(U Z; SX) − I(U ; XS) = I(XS; Y ) + I(U ; Z) − I(Y ; Z) + I(Z; SX|U ) + I(U ; XS) − I(U ; XS) (c) = I(XS; Y ) + I(U ; Z) − I(Y ; Z) + I(Z; S|U ) where (a) follows from basic properties of the mutual information, (b) and (c) from the Markov chains Y −XS−U Z and X −U S −Z respectively. If we note ∆ := I(Z; S|U )−I(Y ; Z), then I(XU S; Y Z) = I(XS; Y )+I(U ; Z)+∆ where ∆ may be either positive or negative, for instance: • in the special case where S − U − Z holds and Y = Z , ∆ = −H(Y ) ≤ 0, • if we suppose Y independent of Z , ∆ = I(Z; S|U ) ≥ 0. A PPENDIX D P ROOF OF L EMMA 11. To prove that I(Yt Zt ; C, X∼t U∼t S∼t Y∼t Z∼t |Xt Ut St ) = 0, we have I(Yt Zt ; CX∼t S∼t U∼t Y∼t Z∼t |Xt St Ut ) = I(Zt ; CX∼t S∼t U∼t Y∼t Z∼t |Xt St Ut ) + I(Yt ; CX∼t S∼t U∼t Y∼t Z∼t |Xt St Ut Zt ) = I(Zt ; CXt X∼t S∼t U∼t Y∼t Z∼t |St Ut ) − I(Zt ; Xt |St Ut ) + I(Yt ; CUt Zt X∼t S∼t U∼t Y∼t Z∼t |Xt St ) − I(Yt ; Ut Zt |Xt St ) ≤ I(Zt ; CX n S∼t U∼t Y∼t Z∼t |St Ut ) + I(Yt ; CU n Z n X∼t S∼t Y∼t |Xt St ) ≤ I(Zt ; CX n Y n S∼t U∼t Z∼t |St Ut ) + I(Yt ; CU n Z n X∼t S∼t Y∼t |Xt St ) where both I(Zt ; CX n Y n S∼t U∼t Z∼t |St Ut ) and I(Yt ; CU n Z n X∼t S∼t Y∼t |Xt St ) are equal to zero because by (14) the following Markov chains hold: Zt − (Ut , St ) − (C, X n , Y n , U∼t , S∼t , Z∼t ), Yt − (Xt , St ) − (C, Z n , U n , X∼t , S∼t , Y∼t ). A PPENDIX E P ROOF OF (45) Define the event of error E as follows: ( 0 E := 1 if if Un = V n U n 6= V n . We note pe := P{U n 6= V n } and recall that by hypothesis the distribution PU n S n Z n X n Y n V n is ε-close in total ⊗n n variational distance to the i.i.d. distribution P̄U⊗n SZXY V where the decoder is lossless. Then V(PV , 1V =U ) < ε and therefore pe vanishes. By Fano’s inequality [44], we have H(U n |C, Y n , Z n ) ≤ H2 (pe ) + pe log (|U n | − 1). (65) Since pe vanishes, H2 (pe ) is close to zero and the right-hand side of (65) goes to zero. Hence, we have that H(U n |C, Y n , Z n ) ≤ nf (ε), where f (ε) denotes a function which tends to zero as ε does. 31 A PPENDIX F P ROOF OF P ROPOSITION 2 A. Achievability We show that RU V ⊗X is contained in the region RPC ∩ RSEP and thus it is achievable. We consider the subset of RSEP when P̄Y |X (y|x) = 1X=Y {x = y} as the union of all RSEP (W ) with W = (W1 , W2 ) that satisfies P̄U W1 W2 XV = P̄U P̄W2 |U P̄V |W2 P̄X P̄W1 |X , I(W1 ; X) ≥ I(W2 ; U ), (66) R0 ≥ I(W2 ; U V ). Similarly, RPC is the union of all RPC (W ) with W that satisfies P̄U W XV = P̄U P̄W |U P̄X|U W P̄V |W X , H(X) ≥ I(W X; U ), (67) R0 ≥ I(W ; U V |X). If we choose W = (W1 , W2 ) and we add the hypothesis that (W2 , U, V ) is independent of (W1 , X), (67) becomes P̄U W1 W2 XV = P̄U P̄W2 |U P̄V |W2 P̄W1 P̄X|W1 , H(X) ≥ I(W1 W2 X; U ) = I(W2 ; U ), (68) R0 ≥ I(W1 W2 ; U V |X) = I(W2 ; U V ). Note that if we identify X = W1 , we have H(X) = I(W1 ; X) and P̄W1 P̄X|W1 = P̄X P̄W1 |X = P̄X 1X=W1 . Then, there exists a subset of RSEP and RPC defined as the union over all W2 such that P̄U W2 XV = P̄U P̄W2 |U P̄V |W2 P̄X , H(X) ≥ I(W2 ; U ), (69) R0 ≥ I(W2 ; U V ). Finally, observe that, by definition of the region (56), RU V ⊗X is the union over all the possible choices for W2 that satisfy (69) and therefore RU V ⊗X ⊆ RPC ∩ RSEP . B. Converse Consider a code (fn , gn ) that induces a distribution PU n X n V n that is ε-close in total variational distance to the ⊗n i.i.d. distribution P̄U⊗n V P̄X . Let T be the random variable defined in Section IV-B. Then, we have (a) nR0 ≥ H(C) ≥ I(U n V n ; C|X n ) = I(U n V n ; CX n ) − I(U n V n ; X n ) n X (b) n n n ≥ I(U V ; CX ) − nf (ε) = I(Ut Vt ; CX n |U t−1 V t−1 ) − nf (ε) t=1 = (c) ≥ n X t=1 n X n I(Ut Vt ; CX U t−1 V t−1 )− n X t=1 n I(Ut Vt ; CX U t−1 V t−1 ) − 2nf (ε) ≥ t=1 n X I(Ut Vt ; CX n U t−1 ) − 2nf (ε) t=1 n = nI(UT VT ; CX U (d) I(Ut Vt ; U t−1 V t−1 ) − nf (ε) T −1 |T ) − 2nf (ε) = nI(UT VT ; CX n U T −1 T ) − nI(UT VT ; T ) − 2nf (ε) ≥ nI(UT VT ; CX n U T −1 T ) − 3nf (ε) 32 where (a) follows from basic properties of entropy and mutual information and (b) from the upperbound on the ⊗n mutual information in Lemma 1 since we assume V(PU n V n X n , P̄U⊗n V P̄X ) ≤ ε and |U × V| ≥ 4. Finally, since the distributions are close to i.i.d. by hypothesis, (c) and (d) come from Lemma 6 and [12, Lemma VI.3] respectively. For the second part of the converse, observe that n n n n n 0 = H(X ) − I(X ; U C) − H(X |U C) ≤ n X H(Xt ) − t=1 ≤ (e) = n X H(Xt ) − t=1 n X H(Xt ) − n X n I(X ; Ut |U t=1 n X t−1 C) = n X n X I(X n ; Ut |U t−1 C) − H(X n |U n C) t=1 H(Xt ) − n X n I(X U t−1 C; Ut ) + t=1 t=1 n X I(U t−1 C; Ut ) t=1 I(X n U t−1 C; Ut ) = nH(XT |T ) − nI(X n U T −1 C; UT |T ) t=1 t=1 ≤ nH(XT ) − nI(X n U T −1 CT ; UT ) + nI(T ; UT ) = nH(XT ) − nI(X n U T −1 CT ; UT ). where (e) follows from the i.i.d. nature of the source P̄U . Then, we identify the auxiliary random variable Wt with (C, X n , U t−1 ) for each t ∈ J1, nK and W with (WT , T ) = (C, X n , U T −1 , T ). A PPENDIX G P ROOF OF CARDINALITY BOUNDS Here we prove separately the cardinality bound for all the outer bounds in this paper. Note that since the proofs are basically identical we will prove it in the first case and then omit most details in all the other cases. First, we state the Support Lemma [29, Appendix C]. Lemma 19: Let A a finite set and W be an arbitrary set. Let P be a connected compact subset of probability mass functions on A and PA|W be a collection of conditional probability mass functions on A. Suppose that hi (π), i = 1, . . . , d, are real-valued continuous functions of π ∈ P . Then for every W defined on W there exists a random variable W 0 with |W 0 | ≤ d and a collection of conditional probability mass functions PA|W 0 ∈ P such that X X PW (w)hi (PA|W (a|w)) = PW 0 (w)hi (PA|W 0 (a|w)) i = 1, . . . , d. w∈W 0 w∈W Proof of cardinality bound of Theorem 1: We consider the probability distribution P̄U P̄W |U P̄X|U W P̄Y |X P̄V |W Y that is ε-close in total variational distance to the i.i.d. distribution. We identify A with {1, . . . , |A|} and we consider P a connected compact subset of probability mass functions on A = U × X × Y × V . Similarly to [14], suppose that hi (π), i = 1, . . . , |A| + 4, are real-valued continuous functions of π ∈ P such that:  π(i) for i = 1, . . . , |A| − 1      H(U ) for i = |A|    H(U XV |Y ) for i = |A| + 1 hi (π) = .  H(Y |U X) for i = |A| + 2     H(V |Y ) for i = |A| + 3    H(V |U XY ) for i = |A| + 4 Then by Lemma 19 there exists an auxiliary random variable W 0 taking at most |U × X × Y × V| + 4 values such that: X X H(U |W ) = PW (w)H(U |W = w) = PW 0 (w)H(U |W 0 = w) = H(U |W 0 ), w∈W 0 w∈W H(U XV |Y W ) = X w∈W H(Y |U XW ) = X w∈W X PW (w)H(U XV |Y W = w) = PW (w)H(Y |U XW = w) = PW 0 (w)H(U XV |Y W 0 = w) = H(U XV |Y W 0 ), w∈W 0 X w∈W 0 PW 0 (w)H(Y |U XW 0 = w) = H(Y |U XW 0 ), 33 H(V |Y W ) = X PW (w)H(V |Y W = w) = PW 0 (w)H(V |Y W 0 = w) = H(V |Y W 0 ), w∈W 0 w∈W H(V |U XY W ) = X X w∈W PW (w)H(V |U XY W = w) = X PW 0 (w)H(V |U XY W 0 = w) = H(V |U XY W 0 ). w∈W 0 Then the constraints on the conditional distributions, the information constraints and the Markov chains are still verified since we can rewrite the inequalities in (4) and the Markov chains in (5) as H(U ) − H(U |W ) ≤ I(X; Y ), R0 ≥ H(U XV |Y ) − H(U XV |W Y ), I(Y ; U W |X) = H(Y |X) − H(Y |U XW ) = 0, I(V ; U X|Y W ) = H(V |Y W ) − H(V |U XY W ) = 0. Note that we are not forgetting any constraints: to preserve H(U ) − H(U |W ) ≤ I(X; Y ) we only need to fix H(U |W ) because the other quantities depend only on the joint distribution PU XY V (which is preserved). Similarly, once the distribution P̄U XY V is preserved, the difference H(U XV |Y ) − H(U XV |W Y ) only depends on the conditional entropy H(U XV |W Y ) and the difference H(Y |X) − H(Y |U XW ) only depends on H(Y |U XW ). Proof of cardinality bound of Theorem 2: Here let A = U × S × Z × X × Y × V and suppose that hi (π), i = 1, . . . , |A| + 5, are real-valued continuous functions of π ∈ P such that:   π(i) for i = 1, . . . , |A| − 1      H(U ) for i = |A|      H(U SXV |Y Z) for i = |A| + 1 hi (π) = H(Y |U SX) . for i = |A| + 2    H(V |Y Z) for i = |A| + 3      H(V |Y ZU SX) for i = |A| + 4    H(Z|Y U SX) for i = |A| + 5 By the Markov chain Z −(U, S)−(X, Y, W ), the mutual information I(Z; XY W |U S) is zero and once the distribution P̄U SZXY V is preserved, the mutual information I(Z; XY W |U S) = H(Z|U S)−H(Z|U SXY W ) only depends on H(Z|Y U SX). Therefore there exists an auxiliary random variable W 0 taking at most |U ×S ×Z ×X ×Y ×V|+5 values such that the constraints on the conditional distributions and the information constraints are still verified. Proof of cardinality bound of Theorem 3: Similarly, here let A = U × Z × X × V and suppose that hi (π), i = 1, . . . , |A| + 4, are real-valued continuous functions of π ∈ P such that:  for i = 1, . . . , |A| − 1  π(i)    H(U |XZ) for i = |A|    H(U V |XZ) for i = |A| + 1 hi (π) = .  H(V |XZ) for i = |A| + 2      H(V |ZU X) for i = |A| + 3    H(Z|U X) for i = |A| + 4 The information constraint in Theorem 3 can be written as H(X) + I(W ; Z|X) − I(W X; U ) = H(X) + I(W X; Z) − I(Z; X) − I(W X; U ) (a) = H(X) − I(Z; X) + I(W X; Z) − I(W X; U Z) = H(X) − I(Z; X) + I(W X; U |Z) = H(X) − I(Z; X) + H(U |Z) − H(U |W XZ) ≥ 0 where (a) follows from the fact that I(W X; U Z) = I(W X; U ) by the Markov chain Z − U − (W, X). By fixing H(U V |XZ) the constraint on the bound for R0 is satisfied and similarly to the previous cases the Markov chains 34 are still verified. Thus there exists an auxiliary random variable W 0 taking at most |U × Z × X × V| + 4 values. Proof of cardinality bound of Theorem 4: For the lossless decoder, we rewrite the constraints in the equivalent characterization of the region (46) as: H(U ) ≤ H(Y Z) − H(Y Z|U W ), R0 ≥ I(W ; U SX|Y Z) + H(U |W Y Z) = H(U SX|Y Z) − H(U SX|W Y Z) + H(U |W Y Z) = H(U SX|Y Z) − H(U SX) + H(U ) + H(SX|U ) − H(SX|U W Y Z). Then let A = U × S × Z × X × Y and suppose that hi (π), of π ∈ P such that:   π(i)      H(Y Z|U ) hi (π) = H(SX|U Y Z)   H(Y |U SX)     H(Z|Y U SX) i = 1, . . . , |A| + 3, are real-valued continuous functions for for for for for i = 1, . . . , |A| − 1 i = |A| . i = |A| + 1 i = |A| + 2 i = |A| + 3 and therefore there exists an auxiliary random variable W 0 taking at most |U × S × Z × X × Y| + 3 values. Proof of cardinality bound of Theorem 5: For case of separation between channel and source, we consider the following equivalent characterization of the information constraints: 0 ≤ H(Y Z) − H(Y Z|W1 W2 ) − H(U S) + H(U S|W1 W2 ), R0 ≥ H(U SXV |Y Z) − H(U SXV |Y ZW1 W2 ) In this case we have W = (W1 , W2 ). Let A = U × S × Z × X × Y × V and suppose that hi (π), i = 1, . . . , |A| + 3, are real-valued continuous functions of π ∈ P such that:   π(i) for i = 1, . . . , |A| − 1      for i = |A| H(U S) . hi (π) = H(U SXV |Y Z) for i = |A| + 1    H(V |Z) for i = |A| + 2     H(V |U Z) for i = |A| + 3 Then there exists an auxiliary random variable W 0 = (W10 , W20 ) taking at most |U × S × Z × X × Y × V| + 3 values. A PPENDIX H P OLAR CODING ACHIEVABILITY PROOFS Here we prove the results used in the achievability proof of Theorem 6. Proof of Lemma 13: Similarly to [2, Lemma 5], we first prove that in each block i ∈ J1, kK w   we P = nδn . D P̄U⊗n w n n f W U W (i) (i) In fact, we have w  we D P̄U⊗n W wP U n (i) fn W (i) w (a)  we = D P̄U⊗n R wPU n (i) (c) = n X en R (i) w  (b)  w = D P̄Rn |U n wPeRen (i) n |U(i) P̄U n  w   w D P̄Rj |Rj−1 U n wPeRe(i),j |Rej−1 U n P̄Rj−1 U n (i) (i) j=1 (d) = X w   w D PRj |Rj−1 U n wPeRe(i),j |Rej−1 U n P̄Rj−1 U n (i) j∈A1 ∪A2 (i) (70) 35 (e)  (f ) 1 − H(Rj | Rj−1 U n ) < δn |VW |U | ≤ nδn , X = j∈A1 ∪A2 where (a) comes from the invertibility of Gn , (b) and (c) come from the chain rule, (d) comes from (58) and (59), (e) comes from the fact that the conditional distribution PeRe(i),j |Rej−1 U n is uniform for j in A1 and A2 and (i) (i) (f ) from (57). Therefore, applying Pinsker’s inequality to (70) we have  p  p ⊗n 2 log 2 nδn := δn(2) → 0. (71) , P̄ V PeU n W fn UW ≤ (i) (i) n is generated symbol by symbol from U n and W f n via the conditional distribution P̄X|U W and Y n Note that X(i) (i) (i) (i) n and then Y n and we obtain is generated symbol by symbol via the channel P̄Y |X . By Lemma 3, we add first X(i) (i) that for each i ∈ J1, kK,     ⊗n e f n , P̄ ⊗n ≤ δn(2) V PeU n W (72) f n X n Y n , P̄U W XY = V PU n W UW (i) (i) (i) (i) (i) (i) and therefore the left-hand side of (72) vanishes. n is generated using W c n (i.e. the estimate of W n at Observe that we cannot use Lemma 3 again because V(i) (i) (i) f n . By the triangle inequality for all i ∈ J1, kK the decoder) and not W (i)       ⊗n ⊗n e e e (73) ≤ V P , P + V P , P̄ V PeU n W , P̄ cn Xn Y n fn Xn Y n fn Xn Y n cn Xn Y n U W XY . U W XY Un W Un W Un W (i) (i) (i) (i) (i) (i) (i) (i) (i) (i) (i) (i) (i) (i) (i) (i) We have proved in (72) that the second term of the right-hand side in (73) goes to zero, we show that the first term tends to zero as well. To do so, we apply Proposition 1 to n W c n X n Y n A0 = U n W fn n n A = U(i) (i) (i) (i) (i) (i) X(i) Y(i) P = PeU n W P 0 = PeU n W cn Xn Y n fn Xn Y n (i) (i) (i) (i) (i) (i) (i) (i) on A = U × W × X × Y . Since it has been proven in [39] that o n c n 6= W f n = O(δn ) pe := P W (i) (i)   e f n n n ≤ 2pe and therefore we find that V PeU n W c n X n Y n , PU n W (i) (i) (i) (i) (i) (i) X(i) Y(i)   ⊗n V PeU n W ≤ 2pe + δn(2) = δn(1) → 0. c n X n Y n , P̄U W XY (i) (i) (i) (i) c n and Y n , we apply Lemma 3 again and find Since Vin is generated symbol by symbol from W i i   ⊗n ≤ δn(1) → 0. V PeU n W c n X n Y n V n , P̄U W XY V (i) (i) (i) (i) (74) (i) Proof of Lemma 14: For i ∈ J2, kK, we have w   (a) w D PeLi−1:i C̄ 0 wPeLi−1 C̄ 0 PeLi = I(Li−1 C̄ 0 ; Li ) = I(Li ; C̄ 0 ) + I(Li−1 ; Li |C̄ 0 ) (b) ei [A01 ])(c) ei [A01 ]|Li ) =I(Li ; C̄ 0 ) = I(Li ; R =|A01 | − H(R X (e) (d) 0 = |A1 | − H(R[A01 ]|W ) + δn(4) ≤|A01 | − H(Rj |Rj−1 L) + δn(4) (75) 0 1 j∈A (f ) ≤ |A01 | − |A01 |(1 − δn ) + δn(4) ≤ nδn + δn(4) where (a) comes from the chain rule, (b) from the Markov chain Li−1 − C̄ 0 − Li , (c) from the fact that the bits in A01 are uniform. To prove (d) observe that ei [A01 ]|Li ) − H(R[A01 ]|L) = H(R e(i) [A01 ]Li ) − H(R[A01 ]L) − H(Li ) + H(L) H(R 36 (g) ≤ δn(1) log |U × X × W × Y × V| (1) δn +δn(1) log |U × X × Y × V| (1) δn (1) (1) ≤ 2δn (log |U × X × W × Y × V| − log δn ) := δn(4) where (g) comes from Lemma 17 since     e f n , P̄ ⊗n V PeLi , P̄U⊗n ≤ V P ≤ δn(1) XY V U W XY V Li W (i) that vanishes as n goes to infinity. Finally (e) is true because conditioning does not increase entropy and (f ) comes by definition of the set A01 . Then from Pinsker’s inequality q   p (4) e e e (76) V PLi−1:i C̄ 0 , PLi−1 C̄ 0 PLi ≤ 2 log 2 nδn + δn = δn(3) → 0. Proof of Lemma 15: We have k k k wY X (a) X w D(PeL1:k w PeLi ) = I(Li ; L1:i−1 ) ≤ I(Li ; L1:i−1 C̄ 0 ) i=1 i=2 i=2 k X =  I(Li ; Li−1 C̄ 0 ) + i=2  I(Li ; Li−1 C̄ 0 ) + i=2 k (b) X =  I(Li ; Li−j−1 |Li−j:i−1 C̄ 0 ) j=1 k X ≤ i−2 X i−2 X  I(Li ; Li−j−1:i−2 |Li−1 C̄ 0 ) j=1 (c) I(Li ; Li−1 C̄ 0 ) ≤(k − 1)(nδn + δn(4) ) i=2 where (a) comes from [37, Lemma 15], (b) is true because the dependence structure of the blocks gives the Markov chain Li−j−1:i−2 − Li−1 C̄ 0 − Li and (c) follows from (75). We conclude with Pinsker’s inequality. Proof of Lemma 16: By the triangle inequality  V PeL1:k , P̄U⊗nk XY V  ≤ V PeL1:k , k Y ! PeLi +V i=1 √ k Y ! PeLi , P̄U⊗nk XY V (3) k − 1δn by Lemma 15. To bound the second term, observe that ! ! k k k k w wY  w  X Y Y w w w ⊗n ⊗nk e e D PLi wP̄U XY V = D PLi w P̄U XY V = D PeLi wP̄U⊗n XY V . where the first term is smaller than (77) i=1 i=1 i=1 i=1 (78) i=1 w    w  w ⊗n n n n eLi W n w P̄ By the chain rule we have that D PeLi wP̄U⊗n ≤ D P w U W XY V . Since X(i) , Y(i) and V(i) are XY V (i) generated symbol by symbol via the conditional distributions P̄X|U W , P̄Y |X and P̄V |W Y respectively, by Lemma 4 we have that w w     w ⊗n eU n W n w n wP̄ P̄ . (79) D PeLi W(i) = D P w U W U W XY V (i) (i) Hence, we have D k Y i=1 w w PeLi wP̄U⊗kn XY V ! = k X i=1 k w w  (a) X   w ⊗n w ⊗n (b) e n n wP̄ D PLi wP̄U XY V ≤ D PeU(i) W(i) U W =knδn  i=1 where (a) follows from the chain rule and (79) and (b) comes from (70). 37 Then, by Pinsker’s inequality, (77) becomes:   √ √ √ V PeL1:k , P̄U⊗nk k − 1δn(3) + kδn(2) ≤ k(δn(3) + δn(2) ) = δn(5) → 0. XY V ≤ R EFERENCES [1] G. Cervia, L. Luzzi, M. L. Treust, and M. R. Bloch, “Strong coordination of signals and actions over noisy channels,” in Proc. of IEEE International Symposium on Information Theory (ISIT), 2017. [2] G. Cervia, L. Luzzi, M. R. Bloch, and M. L. Treust, “Polar coding for empirical coordination of signals and actions over noisy channels,” in Proc. of IEEE Information Theory Workshop (ITW), 2016, pp. 81–85. [3] P. W. Cuff, H. H. Permuter, and T. M. Cover, “Coordination capacity,” IEEE Transactions on Information Theory, vol. 56, no. 9, pp. 4181–4206, 2010. [4] C. H. Bennett, P. W. Shor, J. A. Smolin, and A. V. Thapliyal, “Entanglement-assisted capacity of a quantum channel and the reverse Shannon theorem,” IEEE Transactions on Information Theory, vol. 48, no. 10, pp. 2637–2655, 2002. [5] E. Soljanin, “Compressing quantum mixed-state sources by sending classical information,” IEEE Transactions on Information Theory, vol. 4, no. 8, pp. 2263–2275, 2002. [6] G. Kramer and S. A. Savari, “Communicating probability distributions,” IEEE Transactions on Information Theory, vol. 53, no. 2, pp. 518–525, 2007. [7] A. Winter, “Compression of sources of probability distributions and density operators,” 2002. [Online]. Available: http://arxiv.org/abs/quant-ph/0208131 [8] O. Gossner, P. Hernandez, and A. Neyman, “Optimal use of communication resources,” Econometrica, pp. 1603–1636, 2006. [9] B. Larrousse, S. Lasaulce, and M. Bloch, “Coordination in distributed networks via coded actions with application to power control,” 2015. [Online]. Available: http://arxiv.org/abs/1501.03685 [10] M. H. Yassaee, A. Gohari, and M. R. Aref, “Channel simulation via interactive communications,” IEEE Transactions on Information Theory, vol. 61, no. 6, pp. 2964–2982, 2015. [11] F. Haddadpour, M. H. Yassaee, S. Beigi, A. Gohari, and M. R. Aref, “Simulation of a channel with another channel,” IEEE Transactions on Information Theory, vol. 63, no. 5, pp. 2659–2677, 2017. [12] P. Cuff, “Distributed channel synthesis,” IEEE Transactions on Information Theory, vol. 59, no. 11, pp. 7071–7096, 2013. [13] P. Cuff and C. Schieler, “Hybrid codes needed for coordination over the point-to-point channel,” in Proc. of Allerton Conference on Communication, Control and Computing, 2011, pp. 235–239. [14] M. Le Treust, “Joint empirical coordination of source and channel,” IEEE Transactions on Information Theory, vol. 63, no. 8, pp. 5087–5114, 2017. [15] S. Satpathy and P. Cuff, “Secure cascade channel synthesis,” IEEE Transactions on Information Theory, vol. 62, no. 11, pp. 6081–6094, 2016. [16] M. Le Treust, “Correlation between channel state and information source with empirical coordination constraint,” in Proc. of IEEE Information Theory Workshop (ITW), 2014, pp. 272–276. [17] ——, “Empirical coordination with two-sided state information and correlated source and state,” in Proc. of IEEE International Symposium on Information Theory (ISIT), 2015, pp. 466–470. [18] B. Larrousse, S. Lasaulce, and M. Wigger, “Coordinating partially-informed agents over state-dependent networks,” in Proc. of IEEE Information Theory Workshop (ITW), 2015, pp. 1–5. [19] R. Blasco-Serrano, R. Thobaben, and M. Skoglund, “Polar codes for coordination in cascade networks,” in Proc. of International Zurich Seminar on Communications, 2012, pp. 55–58. [20] M. R. Bloch, L. Luzzi, and J. Kliewer, “Strong coordination with polar codes,” in Proc. of Allerton Conference on Communication, Control and Computing, 2012, pp. 565–571. [21] R. A. Chou, M. R. Bloch, and J. Kliewer, “Polar coding for empirical and strong coordination via distribution approximation,” in Proc. of IEEE International Symposium on Information Theory (ISIT), 2015, pp. 1512–1516. [22] S. A. Obead, J. Kliewer, and B. N. Vellambi, “Joint coordination-channel coding for strong coordination over noisy channels based on polar codes,” in Proc. of Allerton Conference on Communication, Control and Computing, 2017. [23] R. A. Chou and M. R. Bloch, “Polar coding for the broadcast channel with confidential messages: A random binning analogy,” IEEE Transactions on Information Theory, vol. 62, no. 5, pp. 2410–2429, 2016. [24] S. H. Hassani and R. Urbanke, “Universal polar codes,” in Proc. of IEEE International Symposium on Information Theory (ISIT), 2014, pp. 1451–1455. [25] M. Mondelli, S. H. Hassani, I. Sason, and R. Urbanke, “Achieving Marton’s region for broadcast channels using polar codes,” IEEE Transactions on Information Theory, vol. 61, no. 2, pp. 783–800, 2015. [26] I. Csiszár, “Almost independence and secrecy capacity,” Problems of Information Transmission, vol. 32, no. 1, pp. 48–57, 1996. 38 [27] P. Cuff, “Communication in networks for coordinating behavior,” Ph.D. dissertation, Stanford University, 2009. [28] M. H. Yassaee, M. R. Aref, and A. Gohari, “Achievability proof via output statistics of random binning,” IEEE Transactions on Information Theory, vol. 60, no. 11, pp. 6760–6786, 2014. [29] A. El Gamal and Y. H. Kim, Network information theory. Cambridge University Press, 2011. [30] R. Ahlswede and I. Csiszár, “Common randomness in information theory and cryptography - Part II: CR capacity,” IEEE Transactions on Information Theory, vol. 44, no. 1, pp. 225–240, 1998. [31] A. J. Pierrot and M. R. Bloch, “Joint channel intrinsic randomness and channel resolvability,” in Proc. of IEEE Information Theory Workshop (ITW), 2013, pp. 1–5. [32] T. Lindvall, Lectures on the Coupling Method. John Wiley & Sons, Inc., 1992. Reprint: Dover paperback edition, 2002. [33] M. Le Treust, “Coding theorems for empirical coordination,” Tech. Rep., 2015. [Online]. Available: https: //cloud.ensea.fr/index.php/s/X9e5x8EzJfI7I4Q [34] M. R. Bloch and J. Barros, Physical-layer security: from information theory to security engineering. Cambridge University Press, 2011. [35] P. Cuff, “Communication requirements for generating correlated random variables,” in Proc. of IEEE International Symposium on Information Theory (ISIT), 2008, pp. 1393–1397. [36] A. Lapidoth and M. Wigger, “Conditional and relevant common information,” in IEEE International Conference on the Science of Electrical Engineering (ICSEE), 2016, pp. 1–5. [37] R. A. Chou, M. R. Bloch, and J. Kliewer, “Empirical and strong coordination via soft covering with polar codes,” to appear in IEEE Transactions on Information Theory. [Online]. Available: http://arxiv.org/abs/1608.08474 [38] E. Şaşoğlu, “Polar codes for discrete alphabets,” in Proc. of IEEE International Symposium on Information Theory (ISIT), 2012, pp. 2137–2141. [39] E. Arıkan, “Source polarization,” in Proc. of IEEE International Symposium on Information Theory (ISIT), 2010, pp. 899–903. [40] R. A. Chou, M. R. Bloch, and E. Abbe, “Polar coding for secret-key generation,” IEEE Transactions on Information Theory, vol. 61, no. 11, pp. 6213–6237, 2015. [41] M. Le Treust and T. Tomala, “Information design for strategic coordination of autonomous devices with non-aligned utilities,” in Proc. of Allerton Conference on Communication, Control and Computing, 2016, pp. 233–242. [42] ——, “Persuasion with limited communication capacity,” 2017. [Online]. Available: http://arxiv.org/abs/1711.04474 [43] I. Csiszár and J. Körner, Information theory: coding theorems for discrete memoryless systems. Cambridge University Press, 2011. [44] R. M. Fano, Transmission of Information: A Statistical Theory of Communications. The M.I.T. Press and John Wiley & Sons, Inc., 1961.
7cs.IT
National Research Council Canada Conseil national de recherches Canada Institute for Information Technology Institut de technologie de l’information ERB-1099 NRC-44953 JohnnyVon: Self-Replicating Automata in Continuous Two-Dimensional Space Arnold Smith, National Research Council Canada Peter Turney, National Research Council Canada Robert Ewaschuk, University of Waterloo August 29, 2002 Note: This report originally contained colour figures. If you have a black-and-white copy of the report, you are missing important information. © Copyright 2002 by National Research Council of Canada Permission is granted to quote short excerpts and to reproduce figures and tables from this report, provided that the source of such materials is fully acknowledged. NRC/ERB-1099. JohnnyVon: Self-Replicating Automata in Continuous 2D Space Table of Contents Abstract........................................................................................................................... 3 1 Introduction ............................................................................................................. 3 2 Related Work .......................................................................................................... 4 3 4 2.1 Self-Replicating Cellular Automata .................................................................. 4 2.2 Mobile Automata.............................................................................................. 5 2.3 Physical Models of Self-Replication ................................................................. 5 JohnnyVon .............................................................................................................. 5 3.1 Informal Description......................................................................................... 6 3.2 Definitions........................................................................................................ 6 3.3 Fields............................................................................................................... 7 3.4 Physics ............................................................................................................ 9 3.4.1 Brownian Motion .................................................................................... 10 3.4.2 Viscosity ................................................................................................ 10 3.4.3 Attractive Force...................................................................................... 10 3.4.4 Repulsive Force ..................................................................................... 10 3.4.5 Straightening Force................................................................................ 11 3.4.6 Spring Dampening ................................................................................. 11 3.5 Splitting.......................................................................................................... 11 3.6 States ............................................................................................................ 12 3.7 Time .............................................................................................................. 13 3.8 Implementation .............................................................................................. 14 Experiments .......................................................................................................... 14 4.1 Seeded Replication........................................................................................ 14 4.2 Spontaneous Replication............................................................................... 21 5 Interpretation of Experiments................................................................................. 22 6 Limitations and Future Work.................................................................................. 23 7 Applications........................................................................................................... 24 8 Conclusion ............................................................................................................ 24 References ................................................................................................................... 25 Smith, Turney, Ewaschuk 2 NRC/ERB-1099. JohnnyVon: Self-Replicating Automata in Continuous 2D Space Abstract JohnnyVon is an implementation of self-replicating automata in continuous twodimensional space. Two types of particles drift about in a virtual liquid. The particles are automata with discrete internal states but continuous external relationships. Their internal states are governed by finite state machines but their external relationships are governed by a simulated physics that includes brownian motion, viscosity, and springlike attractive and repulsive forces. The particles can be assembled into patterns that can encode arbitrary strings of bits. We demonstrate that, if an arbitrary “seed” pattern is put in a “soup” of separate individual particles, the pattern will replicate by assembling the individual particles into copies of itself. We also show that, given sufficient time, a soup of separate individual particles will eventually spontaneously form self-replicating patterns. We discuss the implications of JohnnyVon for research in nanotechnology, theoretical biology, and artificial life. 1 Introduction John von Neumann is well known for his work on self-replicating cellular automata [10]. His ultimate goal, however, was to design self-replicating physical machines, and cellular automata were simply the first step towards the goal. Before his untimely death, he had sketched some of the other steps. One step was to move away from the discrete space of cellular automata to the continuous space of classical physics (pages 91-99 of [10]). Following the path sketched by von Neumann, we have developed JohnnyVon, an implementation of self-replicating automata in continuous two-dimensional space. JohnnyVon consists of a virtual “soup” of two types of particles that drift about in a simulated liquid. The particles are automata with discrete internal states that are regulated by finite state machines. Although the particles are internally discrete, the external relationships among the particles are continuous. Force fields mediate the interactions among the particles, enabling them to form and break bonds with one another. A pattern encoding an arbitrary string of bits can be assembled from these two types of particles, by bonding them into a chain. When a soup of separate individual particles is “seeded” with an assembled pattern, the pattern will replicate itself by assembling the separate particles into a new chain.1 The design of JohnnyVon was inspired by DNA and RNA. The individual automata are intended to be like codons and the assembled patterns are like strands of DNA or RNA. The simulated physics in JohnnyVon corresponds (very roughly) to the physics inside cells. The design was also influenced by our interest in nanotechnology. The automata in JohnnyVon can be seen as tiny nanobots, floating in a liquid vat, assembling structures in a manufacturing plant. Another source of guidance in our design was, of course, the research on self-replicating cellular automata, which has thrived and matured greatly since von Neumann's pioneering work. In particular, although the broad outline of JohnnyVon is derived from physics and biology, the detailed design of the system borrows much from automata theory. The basic entities in JohnnyVon are 1 The copies are mirror images; however, that is not a problem. This point is discussed in Section 5. Smith, Turney, Ewaschuk 3 NRC/ERB-1099. JohnnyVon: Self-Replicating Automata in Continuous 2D Space essentially finite automata, although they move in a continuous space and are affected by smoothly-varying force fields. We discuss related work in Section 2. JohnnyVon is most closely related to research on self-replicating cellular automata. A significant difference is that the automata in JohnnyVon are mobile. There is some related work on mobile automata that move in a two-dimensional space, but this work does not investigate self-replication and does not involve a continuous space. In many respects, JohnnyVon is most similar to the work of Lionel and Roger Penrose, who created self-replicating machines using pieces of plywood [4]. JohnnyVon is described in detail in Section 3. The motion of the automata is determined by a simulated physics that includes brownian motion, viscosity, and spring-like attractive and repulsive forces. The behaviours and interactions of the automata are determined by a small number of internal states and state transition rules. We present two experiments in Section 4. First, we show that an arbitrary seed structure can assemble copies of itself, using individual automata as building blocks. Second, we show that a soup of separate individual automata can spontaneously form selfreplicating structures, although we have deliberately designed JohnnyVon so that this is a relatively rare event. Section 5 is our interpretation of the experiments. Section 6 is concerned with limitations of JohnnyVon and future work. Some potential applications of this line of research are given in Section 7 and we conclude in Section 8. 2 Related Work JohnnyVon is related to research in self-replicating automata, mobile automata, and physical models of self-replication. 2.1 Self-Replicating Cellular Automata Since von Neumann’s pioneering work [10], after a hiatus, research in self-replicating cellular automata is now flourishing [2], [5], [7], [8], [9]. Most of this work has involved two-dimensional cellular automata. A two-dimensional grid of cells forms a discrete space, which is infinite and unbounded in the abstract, but is necessarily finite in a computer implementation. The cells are (usually identical) finite state machines, in which a cell’s state depends on the states of its neighbours, according to a set of (deterministic) state transition rules. The system begins with each cell in an initial state (chosen by the user) and the states change synchronously in discrete time steps. With carefully selected transition rules, it is possible to create self-replicating patterns. The initial states of the cells are “seeded” with a certain pattern (usually the pattern is a small loop). Over time, the pattern spreads from the seed to nearby cells, eventually filling the available space. Although this work has influenced and guided us, JohnnyVon is different in several ways. The automata in JohnnyVon are (essentially) finite state machines, but they are mobile, rather than being locked in a grid. The automata move in a continuous twodimensional space, rather than a discrete space (but time in JohnnyVon is still discrete). The states of the automata are mainly discrete and finite, but each automaton has a position and a velocity, and the force fields around the tips of each particle have smooth Smith, Turney, Ewaschuk 4 NRC/ERB-1099. JohnnyVon: Self-Replicating Automata in Continuous 2D Space gradients, all of which are represented with floating point numbers.2 The movements of the automata are governed by a simple simulated physics. We claim that these differences from self-replicating cellular automata make JohnnyVon more realistic, and thus more suitable for guiding work on self-replicating nanotechnology and research on the origins of life and related issues in theoretical biology. Aside from the increased realism, JohnnyVon is interesting simply because it is significantly different from cellular automata. 2.2 Mobile Automata There has been other research on mobile automata (e.g., bio-machines [3] and generalized mobile automata [11]), combining Turing machines with cellular automata. Turing machines move from cell to cell in an N-dimensional grid space, changing the states of the cells and possibly interacting with each other. However, unlike JohnnyVon, this work has used a discrete space. As far as we know, JohnnyVon is the first system that demonstrates self-replication with mobile automata in a continuous space. 2.3 Physical Models of Self-Replication Lionel Penrose, with the help of his son, Roger, made actual physical models of selfreplicating machines, using pieces of plywood [4]. His models are similar to JohnnyVon in several ways. Both involve simple units that can be assembled into self-replicating patterns. In both, the units move in a continuous space. Another shared element is the harnessing of random motion for replication. JohnnyVon uses simulated brownian motion and Penrose required the plywood units to be placed in a box that was then shaken back and forth. Penrose described both one-dimensional and two-dimensional models, in which motion is restricted to a line or to a plane. An obvious difference between the Penrose models and JohnnyVon is that the former are physical whereas the latter is computational. One advantage of a computational model is that experiments are perfectly repeatable, given the same initial conditions and the same random number seed. Another advantage is the ability to rapidly modify the computational model, to explore alternative models. A limitation of the Penrose models is that the basic units are all identical, so they cannot use binary encoding. They could encode information by length (the number of units in an assembled pattern), but the mechanism for ensuring that length is replicated faithfully is built in to the physical structure of the units. Thus altering the length involves building new units. On the other hand, JohnnyVon can encode an arbitrary binary string without making any changes to the basic units. 3 JohnnyVon We begin the description of JohnnyVon with an informal discussion of the model. We then define some terminology, followed with an outline of the attractive and repulsive fields that govern the interactions among the automata. The fourth subsection sketches the simulated physics and the fifth subsection explains how the automata decide when 2 We discuss in Section 3.5 the extent to which the automata in JohnnyVon are finite state machines. Smith, Turney, Ewaschuk 5 NRC/ERB-1099. JohnnyVon: Self-Replicating Automata in Continuous 2D Space to split apart. The sixth subsection considers the states of the automata and the seventh subsection discusses the treatment of time in JohnnyVon. The final subsection is concerned with the implementation of JohnnyVon. 3.1 Informal Description The design of JohnnyVon was based on the idea that strings (chains) of particles, of arbitrary length, should be capable of forming spontaneously, and once formed, they should be relatively stable. Each particle is a T-shaped structure. Particles form strings by bonding together at the tips of the horizontal arms of the T structures. Strings replicate by attracting randomly floating particles to the tips of the vertical arms of the T structures and holding them in place until they join together to form a replica of the original string. Bonds between particles in a string can be broken apart by brownian motion (due to random collisions with virtual molecules of the containing fluid) and by jostling from other particles. Particles can also bond to form a string by chance, without a seed string, if two T structures meet under suitable conditions. Strings that are randomly broken or formed can be viewed as mutations. We intentionally designed JohnnyVon so that mutations are relatively rare, although they are possible. Faithful replication is intended to be much more common than mutation. The attractive fields around particles have limited ranges, which can shrink or expand. This is one of the mechanisms that we use to ensure faithful replication. The fields shrink when we want to discourage bonding that could cause mutations and the fields expand when we want to encourage bonding that should lead to faithful replication. A mechanism is needed to recognize when a string has attracted and assembled a full copy of itself. Without this, each seed string would attract a single copy, but the seed and its copy would remain bonded together forever. Therefore the automata send signals to their neighbours in the string, to determine whether a full copy has been assembled. When the right signal is received, a particle releases the bond on the vertical arm of the T structure and pushes its corresponding particle away. 3.2 Definitions The following definitions will facilitate our subsequent discussion. To better understand these definitions, it may be helpful to look ahead to Table 1 and the figures in Section 4. Codon: a T-shaped object that can encode one bit of information. There are two types of codons, type 0 codons and type 1 codons. Container: the space that contains the codons. Codons move about in a twodimensional continuous space, bounded by a grey box. The centers of the codons are confined to the interior of the grey box. Liquid: a virtual liquid that fills the container. The trajectory of a codon is determined by brownian motion (random drift due to the liquid) and by interaction with other codons and the walls of the container. The liquid has a viscosity that dampens the momentum of the codons. Soup: liquid with codons in it. Field: an attractive or repulsive area associated with a codon. The range of a field is indicated by a coloured circle. In addition to attracting or repelling, a field can also exert Smith, Turney, Ewaschuk 6 NRC/ERB-1099. JohnnyVon: Self-Replicating Automata in Continuous 2D Space a straightening force, which twists the codons to align their arms linearly. The fields behave somewhat like springs. Arm: a black line in a codon that begins in the middle of the codon and ends in the center of a coloured field. Tip: the outer end of an arm, where the red, blue, green, and purple fields are centered. Middle: the inner ends of the arms, where the three arms join together. This is not the geometrical center of the codon, but it is treated as the center of mass in the physical simulation. Red (blue, purple, green) arm: an arm that ends in a red (blue, purple, green) field. Bond: two codons can bond together when the field of one codon intersects the field of another. Not all fields can bond. This is described in detail later. Red (blue, purple, green) neighbour: the codon that is bonded to the red (blue, purple, green) arm of a given codon. Single strand: a chain of codons that are red and blue neighbours of each other. Double strand: two single strands that are purple and green neighbours of each other. Small (large) field: a field may be in one of two possible states, small or large. These terms refer to the radius of the circle that delimits the range of the field. Free codon: a codon with no bonds. Time: the number of steps that have been executed since the initialization of JohnnyVon. The initial configuration is called step 0 (or time 0). 3.3 Fields The codons have attractive and repulsive fields, as shown in Table 1. These fields determine how codons interact with each other to form strands. There are five types of fields, which we have named according to the colours that we use to display the codons in JohnnyVon’s user interface (purple, green, blue, red, yellow). All five fields have two possible states, called large and small, according to the radius of the circle that delimits the range of the field. All fields in a free codon are small. Table 2 gives the state transition rules for the field states. Fields switch between small and large as bonds are formed and broken. The interactions among the fields are listed in Table 3. Fields can pull codons together, push them apart, or twist them to align their arms. Smith, Turney, Ewaschuk 7 NRC/ERB-1099. JohnnyVon: Self-Replicating Automata in Continuous 2D Space Table 1. The two types of codons and their field states. The fields of a free codon are always small. The fields become large only when codons bond together, as described in the next table. A codon’s fields may be in a mixture of states (one field may be small and another large). Note that the circles are not drawn to scale, since the small fields would be invisibly small at this scale. Type 0 codons (purple codons) Type 1 codons (green codons) All fields in their small states All fields in their large states Table 2. State transitions in fields. Fields can change from small to large or vice versa, but they never change colour. Current field state Next field state small red large red small blue large blue large red small red large blue small blue small green large green small purple large purple large green small green large purple small purple small yellow large yellow If a double strand is ready to split, then the yellow fields of all of the codons in the double strand become large (this is described in more detail later). large yellow small yellow If a yellow field has been large for 150 time units, then it returns to its small state. Smith, Turney, Ewaschuk Transition rules If a small blue field touches a small red field and the arms of their respective codons are aligned linearly to within ± /256 radians, then both fields switch to their large states and their codons are designated as being bonded together. As long as the two fields continue to intersect, at any angle, they remain in the bonded state, and any third field that intersects with the two fields will be ignored. If jostling causes a large red field to lose contact with its bonded large blue field, then both fields switch to their small states and their codons are no longer designated as being bonded. If a codon’s red or blue fields are bonded, then its green or purple field switches to its large state. If neither of a codon’s red or blue fields are bonded, then its green or purple field becomes small. 8 NRC/ERB-1099. JohnnyVon: Self-Replicating Automata in Continuous 2D Space Table 3. The behaviour of the fields. Fields have no effect on each other unless their circles intersect. If the behaviour of a pair of fields is not listed in this table, it means that pair of fields has no interaction (they ignore each other). The designations “Field 1” and “Field 2” in this table are arbitrary, since the relationships between the fields are symmetrical. Field 1 Field 2 Interaction between fields small red small blue If a small blue field touches a small red field and the arms of their respective codons are aligned linearly to within ± /256 radians, then both fields switch to their large states and their codons are designated as being bonded together. As long as the two fields continue to intersect, at any angle, they remain bonded, and any third field that intersects with the two fields will be ignored. large red large blue When a large red field is designated as bonded with a large blue field, an attractive force pulls the tip of the red arm towards the tip of the blue arm and a straightening force twists the codons to align their arms linearly. small purple small green small purple large green large purple small green When a purple field touches a green field and the arms of their respective codons are aligned linearly to within ± /3 radians, they are designated as being bonded. As long as the two fields continue to intersect, at any angle, they remain bonded, and any third field that intersects with the two fields will be ignored. An attractive force pulls the tip of the purple arm towards the tip of the green arm and a straightening force twists the codons to align their arms linearly. When a small purple field bonds with a small green field, their bond is typically quickly ripped apart by brownian motion. The bonds between two large fields or one large field and one small field are more robust; they can withstand interference from brownian motion. large purple large green A large purple field and a large green field cannot initiate a new bond; they can only maintain an existing bond. If they do not have an existing bond, carried over from before they became large, then they ignore each other. Otherwise, as long as the two fields continue to intersect, at any angle, they remain bonded, and any third field that intersects with the two fields will be ignored. An attractive force pulls the tip of the purple arm towards the tip of the green arm and a straightening force twists the codons to align their arms linearly. large yellow large yellow When two large yellow fields intersect, a repulsive force pushes them apart. The repulsive force stops acting when the fields no longer intersect or when the fields switch to their small states. However, when the repulsive force stops acting, the codons will continue to move apart, until their momentum has been dissipated by the viscosity of the liquid. For yellow fields, unlike the other fields, there is nothing that corresponds to designated bonded pairs. Thus, if there are three or more intersecting large yellow fields, they will all repel each other. 3.4 Physics JohnnyVon runs in a sequence of discrete time steps. Each codon has a position (x-axis location, y-axis location, and angle) and a velocity (x-axis velocity, y-axis velocity, and angular velocity) in two-dimensional space. Although time is measured in whole Smith, Turney, Ewaschuk 9 NRC/ERB-1099. JohnnyVon: Self-Replicating Automata in Continuous 2D Space numbers, position and velocity are represented with floating point numbers. (We discuss time in more detail in Section 3.7.) Each codon has one unit of mass. The internal state changes of a codon are triggered by the presence and state of neighbouring codons. One codon “senses” another when it comes within range of one of its force fields. It could be said that the force fields are also sensing fields, and when one of these fields expands, its sensing ability expands equally. We think of the container as holding a thin layer of liquid, so although the space is twodimensional, codons are allowed to slide over one another (it could be called a 2.5D space). This simplifies computation, since we do not need to be concerned with detecting collisions between codons. It also facilitates replication, since free codons can move anywhere in the container, so it is not possible for them to get trapped behind a wall of strands. It is interesting to note that strands are emergent structures that depend only on the local interactions of individual codons. There is no data structure that represents strands; each codon is treated separately and interacts only with its immediate neighbours. 3.4.1 Brownian Motion Codons move in a virtual liquid. Brownian motion is simulated by applying a random change to each codon’s (linear and angular) velocity at each time step. This random velocity change may be thought of as the result of a collision with a molecule of the liquid, but we do not explicitly model the liquid’s molecules in JohnnyVon. 3.4.2 Viscosity We implement a simple model of viscosity in the virtual liquid. With each time step, a codon’s velocity is adjusted towards zero by multiplying the velocity by a fractional factor. One factor is applied for x-axis and y-axis velocity (linear viscosity) and another factor is applied for angular velocity (angular viscosity). 3.4.3 Attractive Force When two codons are bonded, an attractive force pulls their bonded arms together. This force acts like a spring joining the tips of the bonded arms. The strength of the spring force increases linearly with the distance between the tips, until the distance is greater than the sum of the radii of the fields, at which point the bond is broken. The spring force modifies both the linear and angular velocities of the bonded codons. (The angular velocity is modified because the force acts on the codon tip, rather than on the center of mass.) 3.4.4 Repulsive Force The repulsive force also acts like a spring, joining the centers of the yellow fields, pushing the codons apart. The strength of the spring force decreases linearly with the distance between the centers of the yellow fields, until the distance is greater than the sum of the radii of the fields, at which point the force ceases. The spring force modifies both the linear and angular velocities of the bonded codons. Smith, Turney, Ewaschuk 10 NRC/ERB-1099. JohnnyVon: Self-Replicating Automata in Continuous 2D Space 3.4.5 Straightening Force When two codons are bonded, a straightening force twists them to align their bonded arms linearly. This force is purely rotational; it has no linear component. The two bonded codons rotate about their middles, so that their bonded arms lie along the line that joins their middles. The straightening force for a given codon is linearly proportional to the angle between the bonded arm of the given codon and the line joining the middle of the given codon to the middle of the other codon. 3.4.6 Spring Dampening The motion due to the attractive and straightening forces is dampened, in a way that is similar to the viscosity that is applied to brownian motion. The dampening prevents unlimited oscillation. No dampening is applied to the repulsive force, since oscillation is not a problem with repulsion. The linear velocities of a bonded pair of codons are dampened towards the average of their linear velocities, by a fractional factor (linear dampening). The angular velocities of a bonded pair of codons are dampened towards zero, by another fractional factor (angular dampening). 3.5 Splitting When a complete double strand forms, the yellow fields switch to their large states and split the double strand into two single strands. The decision to split is controlled by a purely local process. Each codon has an internal state that is determined by the states of its neighbours. When a codon enters a certain internal state, its yellow field switches to the large state. The splitting is determined by a combination of two state variables, the strand_location_state and the splitting_state. The strand_location_state has three possible values: 0= Initial state: I do not think I am at the end of a (possibly incomplete) double strand. 1= I think I might be located at the end of a (possibly incomplete) double strand. 2= My green or purple neighbour also thinks it might be at the end of a (possibly incomplete) double strand. An incomplete double strand occurs when a single strand has partially replicated. On one side, there is the original single strand, and, attached to it, there are one or more single codons or shorter single strands. The state transition rules for strand_location_state are designed so that a codon can only be in state 2 when it is at one of the two extreme ends of a (complete or incomplete) double strand. The splitting_state also has three possible values: x= Initial state: I am not ready to split. y= I am ready to split. z= I am now splitting. A codon’s yellow field switches to the large yellow state when splitting_state becomes z. The following tables give the rules for state transitions. Table 4 lists the rules for strand_location_state and Table 5 provides the rules for splitting_state. Smith, Turney, Ewaschuk 11 NRC/ERB-1099. JohnnyVon: Self-Replicating Automata in Continuous 2D Space Table 4. Transition rules for strand_location_state. When strand_location_state is 2, the given codon must actually be at one end of a (possibly incomplete) double strand. During the replication process, if a strand has not yet fully replicated, there will be gaps in the strand, and the codons situated at the edges of these gaps will be stuck in state 1 until the gaps are filled, at which time they will switch to state 0. Transition rules for strand_location_state Current state Next state 0 1 If (I have exactly one red or blue neighbour) and (I have a purple or green neighbour), then I switch from state 0 to state 1. 1 0 If (I do not have exactly one red or blue neighbour) or (I do not have a green or purple neighbour), then I switch from state 1 to state 0. 1 2 If (I have exactly one red or blue neighbour) and (I have a green or purple neighbour) and (my green or purple neighbour is in state 1 or 2), then I switch from state 1 to state 2. 2 0 If (I do not have exactly one red or blue neighbour) or (I do not have a green or purple neighbour) or (my green or purple neighbour is in state 0), then I switch from state 2 to state 0. Table 5. Transition rules for splitting_state. A strand begins with all codons in the x state. When the strand is complete, one end of the strand (the end with no red neighbour) enters the y state, and the y state then spreads down the strand to the other end (the end with no blue neighbour). If the double strand is incomplete, the codons next to the gap will have their strand_location_state set to 1, which will block the spread of the y state. When the y state spreads all the way to the other end, in either of the two single strands, the double strand must be complete. Therefore, when the y state reaches the other end (the end with no blue neighbour), the end codon enters the z state, and the z state spreads back down to the first end (the end with no red neighbour). Transition rules for splitting_state Current state Next state x y If [(my strand_location_state is 2) and (my green or purple neighbour’s strand_location_state is 2) and (I have no red neighbour)] or [(my strand_location_state is not 1) and (my green or purple neighbour’s strand_location_state is not 1) and (my red neighbour’s splitting_state is y)], then I switch from state x to state y. y z If [(my strand_location_state is 2) and (my green or purple neighbour’s strand_location_state is 2) and (I have no blue neighbour)] or [(my strand_location_state is not 1) and (my green or purple neighbour’s strand_location_state is not 1) and (my blue neighbour’s splitting_state is z)], then I switch from state y to state z. z x If [(I have no red neighbour) and (I have been in state z for 150 time units)] or [my red neighbour is in state x], then I switch from state z to state x. 3.6 States The state of a codon in JohnnyVon is represented by a vector, rather than a scalar. The state vector of a codon has 16 elements: • 3 floating point variables for position (x-axis location, y-axis location, angle) • 3 floating point variables for velocity (x-axis velocity, y-axis velocity, angular velocity) Smith, Turney, Ewaschuk 12 NRC/ERB-1099. JohnnyVon: Self-Replicating Automata in Continuous 2D Space • 5 binary variables for field size (blue, red, green, purple, and yellow field size) • 3 whole-number-valued variables (one for each arm of the codon) for “pointers” that identify the codon to which a given arm is bonded (if any) • 1 three-valued variable for strand_location_state • 1 three-valued variable for splitting_state The seven-dimensional finite-valued sub-vector, consisting of the five binary variables and the two three-valued variables, is the part of each codon that corresponds to the traditional notion of a finite state machine. This seven-dimensional sub-vector has a total of 25 × 32 = 288 possible states.3 Chou and Reggia demonstrated the emergence of self-replicating structures in twodimensional cellular automata, using 256 states per cell [1]. The state values were divided into “data fields”, which were treated separately. In other words, Chou and Reggia used state vectors, like JohnnyVon, rather than state scalars. We agree with Chou and Reggia that state vectors facilitate the design of state machines. The remaining nine variables in the state vector (position, velocity, bond pointers) represent information about external relationships among codons, rather than the internal states of the codons. For example, the absolute position of a codon is not important; the interactions of the codons are determined by their relative positions. These nine variables are analogous to the grid in cellular automata. As far as internal states alone are concerned, the codons are finite state machines. It is their external relationships that make the codons significantly different from cellular automata. 3.7 Time For the discrete elements in the state vector, there is a natural relation between changes in state and increments of time, when each unit of time is one step in the execution of JohnnyVon. For the continuous elements in the state vector (position and velocity), the time scale is somewhat arbitrary. The physical rules that are used to update the position and velocity are continuous functions of continuous time. In a computational simulation of a continuous process, it is necessary to sample the process at a succession of discrete intervals. In JohnnyVon, the parameter timestep_duration determines the temporal resolution of the simulation. The parameter may be seen as determining how finely continuous time is sliced into discrete intervals, or, equivalently, it may be seen as determining how much action takes place from one step of the simulation to the next. Changing the value of the parameter is equivalent to rescaling the magnitudes of the forces. A small value for timestep_duration yields a fine temporal resolution (i.e., a small amount of action between steps) and a large value yields a coarse temporal resolution. If the value is too small, the simulation will be computationally inefficient; many CPU cycles will be wasted on making the simulation unnecessarily precise. On the other hand, if the value is too large, the simulation may become unstable; the behaviour of the objects in the simulation may be a very poor approximation to the intended continuous physical dynamics. 3 Some combinations of states are not actually possible. See Tables 2 to 5. Smith, Turney, Ewaschuk 13 NRC/ERB-1099. JohnnyVon: Self-Replicating Automata in Continuous 2D Space The actual value that we use for timestep_duration has no meaning outside of the context of the (arbitrary) values that we chose for the magnitudes of the various physical parameters (force field strengths, viscosity, brownian motion, etc.). We set timestep_duration by adjusting it until it seemed that we had found a good balance between computational efficiency and physical accuracy. When comparing different runs of JohnnyVon, with different values for timestep_duration, we found it useful to normalize time by multiplying the number of steps by timestep_duration. For example, if you halve the value of timestep_duration, then half as much action takes place from one time step to the next, so it takes twice as many time steps for a certain amount of action to occur. Therefore, as JohnnyVon runs, it reports both the number of time steps and the normalized time (the product of the step number and timestep_duration). However, in the following experiments, we only report the number of steps, since the normalized time has no meaning when taken out of context. 3.8 Implementation JohnnyVon is implemented in Java. The source code is available under the GNU General Public License (GPL) at http://extractor.iit.nrc.ca/johnnyvon/. We originally implemented JohnnyVon in C++. The current version is in Java because we found it difficult to make the C++ version portable across different operating systems. Informal testing suggests that the Java version runs at about 75% of the speed of the C++ version. We believe that the slight loss of speed in the Java version is easily offset by the gain in portability and maintainability. 4 Experiments In our first experiment, we seed a soup of free codons with a pattern and show that the pattern is replicated. In the second experiment, we show that a soup of free codons, given sufficient time, will spontaneously generate self-replicating patterns. 4.1 Seeded Replication Figures 1 to 7 show a typical run of JohnnyVon with a seed strand of eight codons and a soup of 80 free codons. Over many runs, with different random number seeds, we have observed that the seed strand reliably replicates. Smith, Turney, Ewaschuk 14 NRC/ERB-1099. JohnnyVon: Self-Replicating Automata in Continuous 2D Space Figure 1. Step 250. This screenshot shows JohnnyVon near the start of a run, after 250 steps have passed. A soup of free codons (randomly located) has been seeded with a single strand of eight codons (placed near the center). The strand of eight codons encodes the binary string “00011001” (0 is purple, 1 is green). In the strand, the red fields are covering the corresponding blue fields of the red neighbours. Smith, Turney, Ewaschuk 15 NRC/ERB-1099. JohnnyVon: Self-Replicating Automata in Continuous 2D Space Figure 2. Step 6,325. Six codons have bonded with the seed strand, but they have not yet formed any red-blue bonds. Smith, Turney, Ewaschuk 16 NRC/ERB-1099. JohnnyVon: Self-Replicating Automata in Continuous 2D Space Figure 3. Step 18,400. Eight codons have bonded with the seed strand, but these eight codons have not yet formed a complete strand. One red-blue bond is missing. These bonds can only form when the red and blue arms meet linearly to within ± /256 radians. This happens very rarely when the codons are drifting freely, but it happens dependably when the codons are held in position by the purple-green bonds. Smith, Turney, Ewaschuk 17 NRC/ERB-1099. JohnnyVon: Self-Replicating Automata in Continuous 2D Space Figure 4. Step 22,000. The eight codons formed their red-blue bonds, making a complete strand of eight codons. This caused the yellow fields in the double strand to switch to their large states, breaking the bonds between the two single strands and pushing them apart. In this screenshot, the yellow fields are still large. After a few more time units have passed, they will return to their small states. Note that the seed strand encodes “00011001”, but the daughter strand encodes “01100111”. This is discussed in Section 5. Smith, Turney, Ewaschuk 18 NRC/ERB-1099. JohnnyVon: Self-Replicating Automata in Continuous 2D Space Figure 5. Step 25,950. We now have two single strands, and they have started to form bonds with the free codons. Smith, Turney, Ewaschuk 19 NRC/ERB-1099. JohnnyVon: Self-Replicating Automata in Continuous 2D Space Figure 6. Step 30,850. The daughter strand has replicated itself, producing a granddaughter. The original seed strand and the granddaughter encode the same bit string. Smith, Turney, Ewaschuk 20 NRC/ERB-1099. JohnnyVon: Self-Replicating Automata in Continuous 2D Space Figure 7. Step 127,950. There are only a few free codons left. Eventually they will bond with the strands, leaving a stable soup of partially completed double strands. The elapsed real-time from step 250 (Figure 1) to step 127,950 (Figure 7) was approximately 45 minutes. 4.2 Spontaneous Replication JohnnyVon was intentionally designed so that life (self-replicating patterns) can arise from non-life (free codons without a seed), but only rarely. It is difficult for red-blue bonds to form, due to the narrow angle at which the arms must meet (± /256 radians – see Table 2). These bonds are very unlikely to form unless the codons are held in position by green-purple bonds. However, given sufficient time, two free codons will eventually Smith, Turney, Ewaschuk 21 NRC/ERB-1099. JohnnyVon: Self-Replicating Automata in Continuous 2D Space come into contact in such a way that a red-blue bond is formed and a self-replicating strand of length two is created. Figure 8 shows an example. Figure 8. Step 164,450. A strand of length two has spontaneously formed from a soup of 88 free codons. Very shortly after forming, it replicated. The elapsed real-time from step 0 to step 164,450 was about 15 minutes. This is less real-time per step than the previous experiment because there are fewer calculations when there are no bonds between the codons. 5 Interpretation of Experiments The first experiment shows that a pattern containing arbitrary information can replicate itself. Note that all codon interactions in JohnnyVon are local; no global control system is needed. (This is also true of the various implementations of self-replicating cellular automata.) Smith, Turney, Ewaschuk 22 NRC/ERB-1099. JohnnyVon: Self-Replicating Automata in Continuous 2D Space It is apparent in Figure 7 that (approximately) half of the single strands are mirror images of the original seed strand (in Figure 1). More precisely, let X be an arbitrary sequence of 0s and 1s that we want to encode. Let n(X) be the string that results when every 0 in X is replaced with 1 and every 1 in X is replaced with 0. Let r(X) be the string that results when the order of the characters in X is reversed. When a strand with the pattern X replicates, the resulting new strand will have the pattern r(n(X)). Therefore, if we seed a soup of free codons with a pattern X, then the final result will consist of about 50% strands with the pattern X and 50% with the pattern r(n(X)). Penrose anticipated this problem [4]. He suggested it could be avoided by making the pattern symmetrical. Let c(X, Y) be the string that results when the string Y is concatenated to the end of string X. Let g(X) be c(X, r(n(X))). Note that g(X) is equal to its negative mirror image, r(n(g(X))). That is, if g(X) replicates, the resulting string is exactly g(X) itself. The function g(X) enables us to encode any arbitrary string X in such a way that replication will not alter the pattern. 100% of the final strands will be copies of g(X). The second experiment shows that self-replicating patterns can spontaneously arise. The strands in this case are of length two, but it is possible in principle for mutations to extend the length of the strands (although we have not observed this). Strands of length two have an evolutionary advantage over longer strands, since they can replicate faster. On rare occasions, when running JohnnyVon with a seed of length eight (as in Section 4.1), a strand of length two has spontaneously appeared. The length-two strand quickly out-replicates the length-eight strand and soon predominates. We have intentionally designed JohnnyVon so that its most likely behaviour is to faithfully replicate a given seed strand. However, we have allowed a small possibility of red-blue bonds forming without a seed pattern, which allows both spontaneous generation of life and mutation of existing strands. (The probability of mutation can be increased or decreased by adjusting the red-blue bonding angle above or below its current value of ± /256 radians.) Since there is selection (for rapid replication), JohnnyVon fully supports evolution: there is inheritance, mutation, and selection. Cellular automata can also support self-replication [2], [5], [8], [10], evolution [6], and spontaneous generation of life from non-life [1]. The novelty in JohnnyVon is that these three features appear in a computer simulation that includes continuous space and virtual physics. We believe that this is an important step towards building physical machines with these features. 6 Limitations and Future Work One area we intend to look at is the degree to which the internal codon states can be simplified while still exhibiting the basic features of stability and self-replication. We make no claim that we have found the simplest codon structure that will exhibit the intended behaviours. JohnnyVon contains only genotypes (genetic code) with no phenotypes (bodies). The only evolutionary selection that JohnnyVon currently supports is selection for shorter strands, since they can replicate faster than longer strands. In order to support more interesting selection, we would like to introduce phenotypes. In natural life, DNA can be read in two different ways. During reproduction, DNA is copied verbatim, but during growth, DNA is read as instructions for building proteins. We would like to introduce this Smith, Turney, Ewaschuk 23 NRC/ERB-1099. JohnnyVon: Self-Replicating Automata in Continuous 2D Space same distinction into a future version of JohnnyVon. One approach would be to add new “protein” particles to complement the existing codon particles. Free protein particles would bond to a strand of codons, which would act as a template for assembling the proteins. Once a string of proteins has been assembled, it would separate from the codon strand and then it would fold into a shape, analogous to the way that real proteins fold. To achieve interesting evolution, the environment could be structured so that certain protein shapes have an evolutionary advantage, which somehow results in increased replication for the corresponding codon strands. Another limitation of JohnnyVon is the simplistic virtual physics. Many of our simplifications were designed to make the computation tractable. For example, electrostatic attraction and repulsion in the real world have an infinite range, but all of the fields in JohnnyVon have quite limited ranges (relative to the size of the container). Our codons can only interact when their fields are in contact with one another, so it is not necessary to calculate the forces between every pair of codons. This significantly reduces the computation, especially when there are many free codons. The trajectory of a free codon is determined solely by brownian motion and viscosity. However, it is likely possible to significantly increase the realism of JohnnyVon without sacrificing speed. This is another area for future work. It may be that the direction taken will depend on the application. The changes that would make JohnnyVon more realistic for a biologist, for example, may be different from the changes that would be appropriate for a nanotechnologist. Finally, it may be worthwhile to develop a 3D version of JohnnyVon. The current 2.5D space might be insufficiently realistic for some applications. 7 Applications JohnnyVon was designed with nanotechnology in mind. We hope that it may some day be possible to implement the codons in JohnnyVon (or some distant descendant of JohnnyVon) as nanomachines. We imagine that the two types of codons could be mass produced by some kind of macroscopic manufacturing process, and then sprinkled in to a vat of liquid. A seed strand could be dropped in the vat, and the nanomachines would quickly replicate the seed. This imaginary scenario might never become reality, but the success of the experiments in Section 4 lends some plausibility to this project. JohnnyVon may also contribute to theoretical biology, by increasing our understanding of natural life. As Penrose mentioned, models of this kind may help us to understand the origins of life on Earth [4]. JohnnyVon was designed to allow life to arise from non-life (as we saw in Section 4.2). Of course, we have no idea whether this model is anything like the actual origin of life on Earth, but it seems possible. Finally, we should not overlook the entertainment value of JohnnyVon. We believe it would make a great screen saver. 8 Conclusion JohnnyVon includes the following features: • automata that move in a continuous 2.5D space • self-replication of seed patterns • spontaneous generation of life (self-replication) from non-life (free codons) Smith, Turney, Ewaschuk 24 NRC/ERB-1099. JohnnyVon: Self-Replicating Automata in Continuous 2D Space • evolution (inheritance, mutation, and selection) • virtual physics (brownian motion, viscosity, attraction, repulsion, dampening) • the ability to encode arbitrary bit strings in self-replicating patterns • local interactions (no global control structures) JohnnyVon is the first computational simulation to combine all of these features. Von Neumann sketched a path that begins with self-replicating cellular automata and ends with self-replicating physical machines. We agree with von Neumann that, at some point along this path, it is necessary to move away from discrete space models, towards continuous space models. JohnnyVon is such a step. References [1] Chou, H.-H., and Reggia, J.A. (1997). Emergence of self-replicating structures in a cellular automata space. Physica D, 110, 252-276. [2] Langton, C.G. (1984). Self-reproduction in cellular automata. Physica D, 10, 134144. [3] Lerena, P., and Courant, M. (1996). Bio-machines. In Proceedings of Artificial Life V (Poster), Nara, Japan. [4] Penrose, L.S. (1959). Self-reproducing machines. Scientific American, 200 (6), 105114. [5] Reggia, J.A., Lohn, J.D., and Chou, H.-H. (1998). Self-replicating structures: Evolution, emergence and computation. Artificial Life, 4 (3), 283-302. [6] Sayama, H. (1998). Constructing Evolutionary Systems on a Simple Deterministic Cellular Automata Space. Ph.D. Dissertation, Department of Information Science, Graduate School of Science, University of Tokyo. [7] Sayama, H. (1998). Introduction of structural dissolution into Langton's selfreproducing loop. In C. Adami, R.K. Belew, H. Kitano, and C.E. Taylor, eds., Artificial Life VI: Proceedings of the Sixth International Conference on Artificial Life, 114-122. Los Angeles, California: MIT Press. [8] Sipper, M. (1998). Fifty years of research on self-replication: An overview. Artificial Life, 4 (3), 237-257. [9] Tempesti, G., Mange, D., and Stauffer, A. (1998). Self-replicating and self-repairing multicellular automata. Artificial Life, 4 (3), 259-282. Smith, Turney, Ewaschuk 25 NRC/ERB-1099. JohnnyVon: Self-Replicating Automata in Continuous 2D Space [10] von Neumann, J. (1966). Theory of Self-Reproducing Automata. Edited and completed by A.W. Burks. Urbana, IL: University of Illinois Press. [11] Wolfram, S. (2002). A New Kind of Science. Champaign, IL: Wolfram Media. Smith, Turney, Ewaschuk 26
5cs.CE
Recurrent Autoregressive Networks for Online Multi-Object Tracking Kuan Fang1 , Yu Xiang2 , Xiaocheng Li1 , Silvio Savarese1 1 Stanford University, 2 University of Washington Abstract Tracking multiple objects in videos is an important problem and can be applied to various applications such as visual surveillance, activity analysis, autonomous driving and robot navigation. A common strategy to tackle multi-object tracking is to employ the “tracking-by-detection” framework, where the objects are first identified by an object detector in each video frame and then linked into trajectories across video frames. In this case, the core problem is to estimate the characteristics of trajectories over time and thus to determine their associations with new detections. The characteristics of an object trajectory can be depicted by features of the object’s appearance and location, which are usually represented by either hand-crafted features (e.g. color histogram, image gradients, optical flow, object coordinates) [3, 23, 6, 34] or neural network extracted features[12, 25]. In order to summarize and denoise these features across time, many previous methods [3, 23, 6, 34] store the features in recently tracked frames in templates and use the templates to determine the associations with new detections. Since the templates are constrained in a fixed time window, these models cannot learn 𝑡−2 𝑡−1 Internal Memory External Memory 𝑡−4 𝑡−3 𝑡−2 𝑡−1 Recurrent Cell Internal Memory External Memory 𝑡−4 𝑡−3 𝑡−2 𝑡−1 Recurrent Cell Internal Memory RAN 1. Introduction 𝑡−3 Recurrent Cell RAN The main challenge of online multi-object tracking is to reliably associate object trajectories with detections in each video frame based on their tracking history. In this work, we propose the Recurrent Autoregressive Network (RAN), a temporal generative modeling framework to characterize the appearance and motion dynamics of multiple objects over time. The RAN couples an external memory and an internal memory. The external memory explicitly stores previous inputs of each trajectory in a time window, while the internal memory learns to summarize long-term tracking history and associate detections by processing the external memory. We conduct experiments on the MOT 2015 and 2016 datasets to demonstrate the robustness of our tracking method in highly crowded and occluded scenes. Our method achieves top-ranked results on the two benchmarks. 𝑡−4 RAN arXiv:1711.02741v2 [cs.CV] 4 Mar 2018 {kuanfang, chengli1, ssilvio}@stanford.edu, [email protected] External Memory Figure 1. We introduce Recurrent Autoregressive Networks (RANs) for online multiple object tracking. RANs are generative models of object trajectories, which combine external memories of object appearance and motion and internal memories in recurrent cells of the network to facilitate data association in tracking. the information of long-term history and adjust the estimation accordingly. Recently, there have also been works trying to use recurrent neural networks (RNNs) to extract longterm temporal features for multiple object tracking [22, 25]. However, because the feature space of object appearance can be very complicated while the existing multi-object tracking datasets are relatively small, it is hard to train RNNs with enough representation capabilities to memorize and discriminate different objects on existing datasets without overfitting. In this work, we propose a recurrent autoregressive network (RAN) framework to learn a generative model for multiple object trajectories. Built upon standard RNN components, the RAN learns to extract long-term sequence history in an internal memory represented by the recurrent hidden layer. To enhance the memorizing power of the model while guaranteeing the generalization capability, we equip our RANs with an external memory as templates directly storing the previous input features. At each time step, the RAN estimates the probability distribution of new detections by using both internal and external memories in an autoregressive manner [4]. Thus the raw data are memorized by the external memory, while the internal memory focuses on learning to retrieve and process the data from the external memory. Our RAN model can be seen as a variant of memory networks [30, 8, 36]. Comparing with traditional memory networks, the RAN constantly updates the memory in a temporal sliding window according to the tracking decisions, instead of using an RNN to control the data reading procedure. The advantages of RANs are mainly two-folds. First, it enables us to maintain an external memory of the trajectories thus being more robust to occlusions and sudden changes of the targets. Second, the output space of the RAN is a set of parameters that are applied to the templates, which is much easier to train compared with directly estimating a high dimensional feature on smaller tracking datasets. To track multiple objects, we ensemble multiple RANs by attaching one RAN to each target. Furthermore, we design a data association algorithm based on the RAN multi-object tracking framework. The RANs update the hidden states and the templates according to the decisions of the data association algorithm. In this way, they memorize and update the feature representations of the objects in time. Fig. 1 illustrates an example of the RANs in tracking multiple targets in a video. We conducted experiments on the Multiple Object Tracking Benchmark [16] to evaluate our RANs for online MOT. From system analysis and comparison with state-ofthe-art online multi-object tracking methods, we demonstrate that our RANs are capable of learning a powerful generative model to improve the multi-object tracking performance. To summarize, our paper has these key contributions: • We propose a novel a temporal generative modeling framework: recurrent autoregressive networks (RANs), which couples internal memories (recurrent cells) and external memories (templates in temporal sliding window) to estimate the conditional probability of future sequence. The RAN framework can be potentially applied to various tasks in computer vision and sequential data modeling. • We design a multi-object tracking method by associating each object trajectory with an RAN. • Our method outperforms the state-of-the-art online tracking methods on the MOT benchmark for pedestrian tracking. 2. Related Work Batch Tracking vs. Online Tracking. Generally speaking, we can classify multi-object tracking methods into batch mode and online mode. For methods in the batch mode, video frames from future time steps can be utilized to solve the data association problem [26, 3, 23]. Batch methods are useful for offline video analysis applications. How- ever, they are not applicable to problems where immediate decisions have to be made for each video frame such as in robotics and autonomous driving. In contrast, for methods in the online mode, only the previous video frames and the current video frame can be used to solve the data association problem [2, 13, 38, 34]. In online tracking, the feature representation of the object is critical for reliable data association. While most of the previous online tracking methods use hand-crafted features, we propose to encode the feature representation of object into the memory of our recurrent autoregressive networks. Multi-Object Tracking with Neural Networks. Recently, a few methods have been proposed to employ deep neural networks in multi-object tracking. [17] learns a Siamese network to match a pair of object detections, and uses the output from the Siamese network as a similarity score for data association. Since the network is trained to match object detections, it is not able to capture long term history of the object. [21] introduces an online multi-object tracking method using a recurrent neural network, where the RNN is trained for data association of multiple objects endto-end. The end-to-end training requires significant amount of training trajectories, which limits the tracking performance of [21]. In contrast, we focus on learning a good feature representation of objects with RANs, which is used in a subsequent data association algorithm for online multiobject tracking. Deep Autoregressive Models. The idea of introducing autoregressive structure into deep generative models first appeared in NADE [15] and DARN [9], both of which essentially used autoregressive structure to specify the conditional dependencies and designed Bayesian networks accordingly to model the distribution of fixed-dimensional random variables. However, our RAN framework is aimed to model the temporal or sequential data, which better resonates the traditional applications of autoregressive models. 3. Our Model The primary goal of our model is to memorize the characteristics of multiple object trajectories over time and use the memory for data association in a tracking-by-detection manner. Our proposed architecture (see Figure 2) couples an internal memory and an external memory for each object trajectory, as representations of appearance and motion dynamics of the object. In this section, we describe our neural network design (Section 3.1), our multi-object tracking algorithm (Sections 3.2 and 3.3), and the training procedure of our method (Section 3.4). 3.1. Recurrent Autoregressive Networks We introduce our Recurrent Autoregressive Network (RAN) as a generative model for sequential data. AR Parameters External Memory 𝐱t−1 α1𝑡 𝐱 t−𝟐 α𝑡2 Mean and Covariance Estimation … … 𝛍t 𝒩 ∙ |𝛍t , 𝚺t α𝑡𝑘 𝐱t−K 𝛔t 𝐡 t−1 Internal Memory RAN CNN RAN RAN RAN CNN CNN Figure 2. Recurrent Autoregressive Network architecture. Here we explain how an RAN is associated with a specific object trajectory. The RAN takes appearance and motion features as inputs and updates both internal and external memories based on the data association results. Here the solid boxes represent the chosen detections while the dashed box is the predicted box position from RAN. By combining internal and external memories, the RAN estimates conditional distribution of the detection in future frames as explained in Section 3. Conditional probability distribution. Suppose an RAN receives input vectors x1:t−1 (xt ∈ RN ) through time step 1 to t − 1, then it estimates the conditional probability distribution Pr(xt |x1:t−1 ) of the incoming input vector xt . To model this conditional probability distribution, we utilize the autoregressive (AR) model which models the upcoming input xt as a weighted sum of the previous K input vectors plus a Gaussian noise: xt = K X αkt xt−k + εt , (1) k=1 t where αt = (α1t , . . . , αK ) are the parameters of the AR t t model, and ε = (ε1 , . . . , εtN ) is the Gaussian white noise. Suppose εtj ∼ N (0, (σjt )2 ) for j = 1, . . . , N is independently drew from a normal distribution with mean zero and standard deviation σjt , then Pr(xt |x1:t−1 ) = N (xt |µt , Σt ), (2) with predicted mean and variance matrix µt = K X αkt xt−k ,  t 2 Σ = diag((σ t )2 ) = diag (σ1t )2 , . . . , (σN ) . (α̂t , σ̂ t ) = f (ht−1 ), αkt = PK σjt = (3) k=1 t training phase and keep fixed during test time. While in our RAN model, we allow both variables to change over time. This enables us to adjust our estimation strategies according to newly received inputs when the characteristics of the sequence change. Recurrent parameter estimation. In order to capture the long-term trend of the sequence and estimate αt and σ t sequentially, we embed the Gate Recurrent Unit (GRU) [5] into our RAN model. GRU maintains and updates a hidden state h ∈ Rd as the internal memory in time, where d is the dimension of the hidden state. Given the hidden state ht−1 at time step t − 1, the parameters of the AR model are estimated by applying a mapping function f (·), which in our case is a fully-connected layer (i.e. linear transformation), followed by specific element-wise transformations: (4) Notice that in the traditional AR models, the parameters α and the standard deviations σ are usually optimized in a exp(α̂kt ) t k0 =1 , exp(α̂k0 ) t exp(σ̂j ), (5) , k = 1, . . . , K, (6) j = 1, . . . , N. (7) Equation (6) applies the softmax function on top of the fully connection mapping as a regularization to guarantee that the parameters αkt , i = 1, . . . , K sum to one. Equation (7) guarantees that the standard deviations are positive. Up to now, we are able to estimate the conditional probability distribution Pr(xt |x1:t−1 ) which will be used in our multi-object tracking algorithm. Hidden state update. At time step t, the GRU takes an input xt ∈ RN with dimension n and the hidden state from the previous time step ht−1 , and then generates a new hidden state ht for time t according to the following rules: zt = g(Wz xt + Uz ht−1 ) (8) rt = g(Wr xt + Ur ht−1 ) t t h̃ = tanh(Wx + U(r t t h = (1 − z ) t−1 h t +z (9) t−1 h t t )) h̃ , (10) (11) where g(·) denotes the logistic sigmoid function, tanh(·) denotes the hyperbolic tangent function and denotes element-wise multiplication. The GRU is parameterized by matrices Wz , Wr and W with dimension d×N and matrices Uz , Ur and U with dimension d × d. zt in Equation (8) is regarded as the update gate, which decides the degree of update the GRU performs. rt in Equation (9) is called the reset gate, which decides how much information from the previous time step should be forgotten. h̃t in Equation (10) is known as the candidate activation, which is used to compute the new hidden state in Equation (11). In training, the parameters of the GRU are learned in order to update its hidden state in an appropriate way. External and internal memories. We can see that our RANs maintain two types of memories about the tracked object at time t. The first type is an external memory that consists of K input vectors in the previous time steps E t = {xt−1 , . . . , xt−K }, which can be considered to be the templates of the object as in online single object tracking methods. The second type is an internal memory which is represented by the hidden state of RNNs ht−1 . The RNN hidden state encodes information about how these templates should be combined in order to predict the probability distribution of the next input. 3.2. Data Association with RANs Given a set of detections at time t, the data association problem for each object is to decide which detection (or none of them) the object should be associated to. We handle the data association problem using both the appearance information and the motion dynamics of the object. Let the detections be indexed by i = 1, . . . , M , we compute the motion dynamic features from the bounding boxes as t M {bti }M i=1 , and extract the appearance features {φi }i=1 from the image patches of the detections. For each object l, let the bounding boxes and appearance features of the previous chosen detections be b1:t−1 and φ1:t−1 respectively. Then l l we define the association score sti|l between detection i and object l as the conditional probability of bti and φti given bl1:t−1 and φl1:t−1 : sti|l = Pr(φti , bti |φl1:t−1 , bl1:t−1 ) = Pr(φti |φl1:t−1 ) Pr(bti |bl1:t−1 ) t = N (φ |µtφ , Σtφ )N (bt |µtb , Σtb ), (12) (13) where both Pr(φti |φl1:t−1 ) and Pr(bti |bl1:t−1 ) are modeled with RANs as in Equation (2). Here we assume the independence of bounding boxes and appearance features. After computing the association scores for all the detections, object l is associated to the detection i∗ with maximum score if sti∗ |l is larger than a predefined threshold. Otherwise, object l is not associated to any detection at time t, which is marked as lost. Appearance and motion are two very different modalities in terms of dimensions and updates. Therefore, we use two sibling internal memories htφ and htb with two sibling external memories Eφt and Ebt for appearance and motion respectively. During tracking, when a new detection is associated, the two types of memories are updated simultaneously. µtφ , σ tφ and µtb , σ tb are derived respectively as in Equation (5) (6) (7) and then combined together to compute the association score as in (12). When the target is lost, the htb and Ebt are updated with the predicted motion µtb , while the appearance counterparts remain the same. 3.3. Tracking Multiple Objects When tracking multiple objects, we assemble multiple RANs, where each RAN corresponds to an object. These RANs are used to compute association scores between tracked objects and detections. Following the practice of [34, 6], we implemented a multi-object tracking framework using bipartite matching as described in Algorithm 1. For notational simplicity, here we bind all object trajectories with their corresponding internal and external memories denoted as T . At each time step, after detections and feature extractions are finished, we first generate a set of candidate pairs P of trajectories and detections. For the concern of computation time, we only consider detection bounding boxes within a distance to the last detected bounding box in the trajectory. Then the association scores sti|l for each (i, l) ∈ P are computed as explained in section 3.2. And then we associate object trajectories with detections and initialize new trajectories with unassociated detections. At the end of each time step, we update all the trajectories in A with their internal and external memories. The initialization and termination of each trajectory are handled at the end of each time step. The unassociated detections in U are used to initialize new object trajectories. As in [34], we terminate a trajectory when it has been lost for more than tterminate = 20 time steps. To reduce the number of false positive detections, standard non-maximum suppression and thresholding of detection scores are applied as in previous works. In most cases a trajectory initialized by a false detection will fail to associate to detections in the following time steps. Therefore such a trajectory will usually be marked as lost later on and eventually be terminated. Algorithm 1 Our multi-object tracking approach. Input: video frames V = I1 , ..., IT Output: trajectories T 1: for t = 1, ..., T do 2: Detect boxes Dt with input image It 3: Extract motion features {bti }M i=1 4: Extract appearance features {φti }M i=1 on It 5: Generate candidate pairs P 6: for all (i, l) ∈ P do 7: Compute sti|l using RANs as in Section 3.2 Associate T with Dt using {sti|l }(i,l)∈P as in [34] Terminate trajectories lost for more than tterminate steps. 10: Initialize new trajectories with unassociated detections 11: Update T 8: 9: 3.4. Training RANs for Tracking During training, our goal is to learn the RAN parameters to discriminate ground truth associations and false associations. We formulate the training procedure as a maximum likelihood estimation problem for the conditional probability distribution of the RAN. In each training iteration, we sample a batch of object trajectories from the training videos. For each trajectory l, instead of using the ground truth bounding boxes, we sample bounding boxes b1:T l among the detections whose Intersection of Unions (IOUs) with a ground truth bounding box are larger than 0.5. Then, we extract the corresponding appearance features as φ1:T l . We feed the features into the RAN at each time step and estimate the conditional probability distribution as in Equation (12). We skip the time steps when the ground truth object is invisible or lost. Finally, the training loss L is defined as the sum of the negative log likelihood of b1:T and l φ1:T : l L=− XX l 1:t log Pr(φt+1 , bt+1 |φ1:t l , bl ). l l (14) t This loss function encourages the RANs to predict higher probability densities around the correctly associated detections than other detections in the feature space. 3.5. Implementation Details Feature Extraction. For the appearance features, we use the fc8 layer of an inception network [35] pretrained Model MOTA(↑) MT(↑) ML(↓) FP(↓) FN(↓) IDS(↓) A-GRU 43.3 21.4% 34.2% 1,482 11,501 107 A-AVE 67.8 50.9% 15.8% 2,156 5,135 138 A-TIV 68.9 51.0% 15.8% 2,170 4,884 108 A-RAN 69.9 53.8% 12.4% 2,189 4,684 80 M-GRU 56.7 48.7% 19.7% 2,481 7,419 108 M-AVE 68.5 47.4% 14.9% 2,078 5,043 158 M-TIV 68.6 47.9% 15.4% 2,054 5,036 149 M-RAN 68.9 54.3% 14.1% 2,752 4,309 118 (A+M)-GRU 57.7 42.3% 15.4% 3,323 6,362 85 (A+M)-AVE 68.6 50.4% 15.8% 2,126 4,991 142 69.3 50.1% 16.2% 1,992 4,981 109 (A+M)-TIV (A+M)-RAN 70.7 55.5% 14.1% 2,123 4,567 77 Table 1. Analysis of the RAN tracking framework on the validation set of the 2DMOT2015 dataset. Span MOTA(↑) MT(↑) ML(↓) FP(↓) FN(↓) IDS(↓) 1 69.7 58.1% 15.4% 2,133 4,752 120 2 70.2 54.7% 15.4% 2,111 46,78 100 3 70.4 56.0% 14.1% 2,117 46,31 86 70.4 55.6% 13.7% 2,110 4,645 84 4 5 70.6 56.4% 13.6% 2,155 4,540 83 70.6 55.1% 10.8% 2,066 4,645 84 6 7 70.6 56.4% 13.2% 2,123 4,577 85 8 70.6 55.1% 12.8% 2,112 4,584 81 70.7 55.1% 14.1% 2,116 4,568 77 9 10 70.7 55.5% 14.1% 2,123 4,567 77 70.5 54.7% 14.1% 2,114 4,610 79 11 70.6 55.6% 14.1% 2,058 4,575 77 12 Table 2. MOT performance on the validation set of the MOT2015 dataset according to different time spans of the external memory. on person re-identification datasets. The feature extraction takes 0.45 second in average for each frame during test time. The extracted appearance feature vector is 256dimensional. For motion features, we simply use a 4dimensional vector, where the first 2 dimensions are the x-y coordinates of the detection center relative to the previous box in the trajectory, and the last 2 dimensions are the width and height of the detection. In Section 4, we compare the tracking performance by directly using the features with that using our RANs. Network Architecture. We choose to use 128dimensional internal memories for appearance and 32dimensional internal memories for motion. For external memories, the dimensions are the same with the features. The time spans of the external memories are both 10. In Section 4, we discuss about the influence of varying time spans. Optimization. Our training batch consists of 64 object trajectories from multiple training videos. The trajectories are randomly subsampled and temporally cropped across time for data augmentation. We use Adam [14] for optimization with a learning rate of 1 × 10− 3 and set β1 = 0.9, β2 = 0.99. RnnDrop [24, 7] are used in recurrent layers to prevent overfitting. Method Mode MOTA(↑) MOTP(↑) MT(↑) ML(↓) FP(↓) FN(↓) IDS(↓) Frag(↓) CNNTCM [33] MHT DAM [12] NOMT [6] Batch Batch Batch 29.6 32.4 33.7 71.8 71.8 71.9 11.2% 16.0% 12.2% 44.0% 43.8% 44.0% 7,786 9,064 7,762 34,733 32,060 32,547 712 435 442 943 826 823 SCEA [37] Online 29.1 71.1 8.9% 47.3% 6,060 36,912 604 MDP [34] Online 30.3 71.3 13.0% 38.4% 9,717 32,422 680 AMIR15 [?] Online 37.6 71.7 15.8% 26.8% 7,933 29,397 1,026 Our Model (RAN) Online 35.1 70.9 13.0% 42.3% 6,771 32,717 381 Table 3. Tracking performance on the 2DMOT2015 dataset with DPM detections. 1,182 1,500 2,024 1,523 Method Mode MOTA(↑) MOTP(↑) MT(↑) ML(↓) FP(↓) FN(↓) IDS(↓) Frag(↓) JMC [31] NOMT [6] NLLMPa [19] Batch Batch Batch 46.3 46.4 47.6 75.7 76.6 78.5 15.5% 18.3% 17.0% 39.7% 41.4% 40.4% 6,373 9,753 5,844 90,914 87,565 89,093 657 359 629 1,114 504 768 965 381 648 1,657 1,404 1,992 EAMTT [28] oICF [11] Our Model (RAN) Online 38.8 75.1 7.9% 49.1% 8,114 102,452 Online 43.2 74.3 11.3% 48.5% 6,651 96,515 Online 45.9 74.8 13.2% 41.9% 6,871 91,173 Table 4. Tracking performance on the MOT16 dataset with DPM detections. 4. Experiments Datasets. We use the 2DMOT2015 [16] and MOT16 [20] datasets in our experiments. The two datasets are composed of 14 and 22 pedestrian tracking videos, with 1,221 and 1,276 object trajectories respectively. In each dataset, the videos are aggregated from multiple multi-object tracking benchmarks and equally divided into training and testing sets. We split the training set of 2DMOT2015 as 5 training videos and 6 validation videos as suggested by [34]. Evaluation Metrics. We use multiple metrics suggested by the MOT Benchmark to evaluate the multiple object tracking performance. These are Multiple Object Tracking Accuracy (MOTA) [10], Multiple Object Tracking Precision (MOTP) [10], the number of ID Switches (IDS), the percentage of Mostly Track targets (MT), the percentage of Mostly Lost targets (ML), the total number of False Positives (FP), the total number False Negatives (FN), the total number of times a trajectory is Fragmented (Frag) and the frame rate of the tracking phase (Hz). Among these, MOTA and IDS are the two metrics that most directly depict the quality of tracking and association. Detections. In order to compare the tracking performance on the MOT leaderboard, we run our RAN with both public detections provided by the MOT benchmark and Faster-RCNN detections [27] used by the current leading tracking algorithm. The public detections are computed by the DPM V5 detector [16]. The Faster-RCNN detections are from [34, 39] using Faster-RCNN with the VGG16 network architecture [29]. All of our analysis on the validation set use Faster-RCNN detections. 4.1. Analyze Internal and External Memories In this section, we analyze the effectiveness of our RAN model design by comparing with different control settings and baseline models. In Table 1, we compare the performance of three modality settings including using only appearance information (A), using only motion dynamics (M), and using both modalities (A + M). For each modality setting, we evaluate the baseline models explained below: • Gated Recurrent Unit (GRU): Instead of estimating the AR parameters and processing the external memory, we use a GRU model to directly predict the mean feature vectors along with the standard deviation variables of a multivariate Gaussian distribution. • Average (AVE): We only keep the temporal sliding window of each object trajectory. The features are directly predicted by averaging all the valid features in the sliding window. The standard deviation terms are trained as time invariant variables in this case. • Time Invariant AR (TIV): We train a traditional AR model with time invariant parameters and standard deviations on the training videos. • Our full model (RAN): Both internal and external memories are used as explained in Section 3. AVE and TIV estimate the conditional probability distribution of future detections by using the external memories only, while the GRU baseline only uses the internal memories in the recurrent cells. To have a fair comparison of the representation capability, the update rules, the recurrent cell dimensions and the time span of the sliding window in the baselines are chosen to be the same as in our full model. The association threshold for each trained model is chosen by an automatic random search. The tracking performance of the baselines and model variants are summarized in Table 1. Within each modality setting, the RAN models obtain the best MOTA and Method Mode MOTA(↑) MOTP(↑) MT(↑) ML(↓) FP(↓) FN(↓) IDS(↓) Frag(↓) TSML + CDE [32] NOMT + SDP [6] Batch Batch 49.1 55.5 74.3 76.6 30.4% 39.0% 26.4% 25.8% 5,204 5,594 25,460 21,322 637 427 1,034 701 SORT [1] Online 33.4 72.1 11.7% 30.9% 7,318 32,615 1,001 1,764 MDP + SubCNN [34] Online 47.5 74.2 30.0% 18.6% 8,631 22,969 628 1,370 EAMTT [28] Online 53.0 75.3 35.9% 19.6% 7,538 20,590 776 1,269 Our Model (RAN) Online 56.5 73.0 45.1% 14.6% 9,386 16,921 428 1,364 Table 5. Multi-object tracking performance on the test set of the 2DMOT2015 dataset with Faster-RCNN detections. Method Mode MOTA(↑) MOTP(↑) MT(↑) ML(↓) FP(↓) FN(↓) IDS(↓) Frag(↓) NOMT + SDP [6] MCMOT HDM [18] Batch Batch 62.2 62.4 79.6 78.3 32.5% 31.5% 31.1% 24.2% 5,119 9,855 63,352 57,257 406 1,394 642 1,318 EAMTT [28] Online 52.5 78.8 19.9% 34.9% 4,407 81,223 910 1,321 Online 59.8 79.6 25.4% 22.7% 8,698 63,245 1,423 1,835 SORT [1] POI [39] Online 66.1 79.5 34.0% 20.8% 5,061 55,914 805 3,093 Our Model (RAN) Online 63.0 78.8 39.9% 22.1% 13,663 53,248 482 1,251 Table 6. Multi-object tracking performance on the test set of the MOT16 dataset with Faster-RCNN detections. IDS while the GRU baselines have the worst results. The performance difference is most obvious for the appearance modality, since the high dimensional CNN appearance features require more representation power in the neural network memories. Comparing the three models with external memories, using a set of trainable parameters has comparable or better performance than directly averaging the templates. For TIVs, usually the weight of the most recent template in the sliding window is highest the weights decay exponentially for previous time steps. For RANs, the predicted weights also decay in time in most cases, but their values vary when occlusions and noisy detections happen. Among the three modalities, the best performance is achieved by using both appearance and motion. Between using only appearance or motion, the former achieves fewer IDS for each model design, since in most cases appearance is a more discriminative clue for different objects than bounding box motions. For the GRU baseline, using motions obtain higher MOTA than using appearance. When using motion only in our current setting, TIV and RAN can hardly do better than AVE, which is equivalent to a naive constant velocity motion prior widely used in previous tracking frameworks [34, 6]. A obtains much fewer ID switches and higher MOTA than M. This is consistent with our observations that both appearance and motion affects the tracking performance, while the appearance information is more discriminative when tracking targets have overlaps and occlusions with each other. 4.2. Analyze the Time Span of the External Memory For our full RAN model framework, we vary the time span of the external memory and analyze its influence on the tracking performance. Previous works [34] show that using longer sliding window is able to capture richer history information. In [34], the tracking performance fluctuates as the time span being extended and the peak is reached at certain length. In Table 2, we increase the time span from 1 time step to 12 time steps. The observed MOTA and IDS have a leap at the beginning, then constantly increase with small fluctuations until converging after 9 steps. This demonstrates the robustness of our RAN tracking framework in terms of architecture variants and trajectory length. RAN models with longer time span are harder to train since more GPU memory will be required during training. While at test time the majority time is spent on forwarding the CNN, while the time span has minor influence on the runtime. 4.3. Evaluation on Test Set In order to evaluate our method on the 2DMOT2015 and MOT16 test set, we submit our results to the MOT Benchmark evaluation server and compare with the state-of-theart multi-object tracking methods. As shown in Table 3 and Table 4, our RAN model achieves the competitive MOTA and IDS among all online methods using public detections. Table 5 shows that we achieved the new state-of-the-art performance in terms of the MOTA and IDS comparing with other online methods on 2DMOT2015. Our method even outperforms the batched methods in term of MT, ML and FN. On MOT16, our method achieves the best MT, FN and IDS among all online methods. As shown in Table 6, our MOTA performance reaches the state-of-the-art results [39]. For per video performance, our RAN tracking framework outperforms [39] in terms of MOTA in 5 of the 7 testing videos and in terms of IDS for all the testing videos. 4.4. Qualitative Analysis In this section, we show qualitative results of our RAN tracking framework in challenging scenes and demonstrate how our RAN predicts parameters changes over time. In Figure 3, we choose two highly crowded and occluded ETH-Linthescher@138 ETH-Linthescher@133 0.4 0.35 0.3 0.25 0.2 0.15 0.1 0.05 0 0.272 0.145 1 2 0.104 3 0.087 0.072 0.065 0.067 0.053 0.057 0.078 4 5 6 7 8 9 10 0.4 0.35 0.3 0.25 0.2 0.15 0.1 0.05 0 0.279 0.148 1 2 External Memory Position 1 2 0.11 3 0.088 4 3 0.088 0.07 0.063 0.065 0.05 0.053 4 5 6 7 8 9 0.079 0.4 0.35 0.3 0.25 0.2 0.15 0.1 0.05 0 10 0.133 1 2 0.074 0.069 0.058 0.05 0.05 0.074 5 6 7 8 9 10 External Memory Position 0.4 0.35 0.3 0.25 0.2 0.15 0.1 0.05 0 0.132 1 2 0.101 3 0.1 0.086 0.077 0.075 0.074 0.062 0.063 3 4 5 6 7 8 9 0.096 0.4 0.35 0.3 0.25 0.2 0.15 0.1 0.05 0 10 0.192 0.116 1 2 External Memory Position 0.09 0.084 0.081 0.074 0.061 0.062 4 5 6 7 8 9 External Memory Position 0.087 10 0.4 0.35 0.3 0.25 0.2 0.15 0.1 0.05 0 1 2 0.095 3 0.088 0.093 4 5 0.089 0.093 6 7 0.084 0.084 0.085 0.085 0.078 0.074 3 4 5 6 7 8 9 0.113 0.4 0.35 0.3 0.25 0.2 0.15 0.1 0.05 0 0.324 0.078 0.078 0.098 8 9 10 External Memory Position 0.4 0.35 0.3 0.25 0.2 0.15 0.1 0.05 0 2 1 0.046 0.045 0.051 0.061 0.069 0.087 3 4 5 6 7 8 9 10 TUD-Crossing@49 0.168 2 0.055 External Memory Position 0.202 0.088 0.146 0.116 1 10 TUD-Crossing@47 0.175 0.112 0.089 External Memory Position TUD-Crossing@45 0.228 ETH-Linthescher@152 ETH-Linthescher@148 0.234 TUD-Crossing@43 0.275 0.154 0.104 External Memory Position TUD-Crossing@41 0.4 0.35 0.3 0.25 0.2 0.15 0.1 0.05 0 ETH-Linthescher@141 0.055 0.054 0.062 0.072 0.085 0.099 3 4 5 6 7 8 External Memory Position 0.115 9 10 0.4 0.35 0.3 0.25 0.2 0.15 0.1 0.05 0 0.304 0.159 0.116 1 2 0.056 0.043 0.042 0.048 0.058 0.074 3 4 5 6 7 8 0.101 9 10 External Memory Position Figure 3. Visualization of the tracking results of multiple pedestrians with RANs in highly occluded scenes and the predicted RAN parameters over time. On the top row, we visualize the the 133, 138, 141, 148 and 152 frames in the ETH-Linthescher video. The predicted RAN parameters of object 25 for appearance features are visualized in histograms over time. In the bottom row, we visualize the the 41, 43, 45, 47, 49 frames in the TUD-Crossing video. The predicted RAN parameters of object 8 for appearance features are plotted. videos from the testing videos and show the tracking results and the predicted RAN parameters. The top row shows selected frames from the ETHLinthescher video, where complicated occlusions continuously happen when a group of people walk across a business street. The predicted parameters has an exponential decay across time with a rising tail at the end. When the object keep being visible in the video, the parameters rely more on the last feature. At time step 141 when the occlusion is about to happen and the chosen detection box becomes noisy, the updated parameters lean more towards memorized features in previous time steps in the external memory. When the object reappears in the video, the RAN chose to use a protective estimation strategy which is closer to averaging features in the external memory. Later the updated parameters choose to trust more on the most recent frame when the appearance became more stable. In the bottom row, we show another example from the TUD-Crossing video. This video is shot at a crossing where multiple people are walking opposite directions on a crosswalk. This video is challenging because all the pedestrians who are walking parallel in front of the camera have similar scales and velocities with each other, so the tracking algorithm needs to rely on objects’ appearance rather than bounding box motions to associate the objects. When object 8 enters the scene without occlusions, the predicted parameters are in a similar distribution with the previous example. As object 8 starting to overlap with object 4, the parameters lean to the previous frames in time step 43 and 45. Starting from time step 47, the two overlapped objects move away from each other. And the updated parameters gradually get back to the normal case. 5. Conclusion In this work, we propose a novel recurrent autoregressive network for online multi-object tracking. Our RAN maintains an external memory and an internal memory in order to capture the history and the characteristics of an object during tracking. In order to track multiple objects, we represent each object with a RAN, and solve the data association problem by computing likelihoods of object detections according to the distribution modeled by the RAN. Experiments are conducted on a commonly-used benchmark for multi-object tracking, which demonstrate the advantages of our method for online multi-object tracking. We believe the idea of RAN in combining external memories and internal memories can be useful in other sequential data modeling and video analysis tasks. Acknowledgement We acknowledge the support of ONR (1196026-1TDVWE), NISSAN (1188371-1-UDARQ) and NVIDIA. References [1] A. Bewley, Z. Ge, L. Ott, F. Ramos, and B. Upcroft. Simple online and realtime tracking. CoRR, abs/1602.00763, 2016. [2] M. D. Breitenstein, F. Reichlin, B. Leibe, E. KollerMeier, and L. Van Gool. Online multiperson trackingby-detection from a single, uncalibrated camera. TPAMI, 33(9):1820–1833, 2011. [3] A. A. Butt and R. T. Collins. Multi-target tracking by lagrangian relaxation to min-cost network flow. In CVPR, pages 1846–1853, 2013. [4] Z. Cai and J. Fan. Functional-coeecient regression models for nonlinear time series. 1998. [5] K. Cho, B. Van Merriënboer, D. Bahdanau, and Y. Bengio. On the properties of neural machine translation: Encoder-decoder approaches. arXiv preprint arXiv:1409.1259, 2014. [6] W. Choi. Near-online multi-target tracking with aggregated local flow descriptor. In ICCV, pages 3029– 3037, 2015. [7] Y. Gal and Z. Ghahramani. A theoretically grounded application of dropout in recurrent neural networks. In NIPS, 2016. [8] A. Graves, G. Wayne, and I. Danihelka. Neural turing machines. CoRR, abs/1410.5401, 2014. [9] K. Gregor, I. Danihelka, A. Mnih, C. Blundell, and D. Wierstra. Deep autoregressive networks. arXiv preprint arXiv:1310.8499, 2013. [10] B. Keni and S. Rainer. Evaluating multiple object tracking performance: the clear mot metrics. EURASIP Journal on Image and Video Processing, 2008:1:1–1:10, 2008. [11] H. Kieritz, S. Becker, W. Hubner, and M. Arens. Online multi-person tracking using integral channel features. In AVSS, 2016. [12] C. Kim, F. Li, A. Ciptadi, and J. M. Rehg. Multiple hypothesis tracking revisited. In 2015 IEEE International Conference on Computer Vision (ICCV), 2015. [13] S. Kim, S. Kwak, J. Feyereisl, and B. Han. Online multi-target tracking by large margin structured learning. In ACCV, pages 98–111. 2012. [14] D. P. Kingma and J. Ba. Adam: A method for stochastic optimization. CoRR, abs/1412.6980, 2014. [15] H. Larochelle and I. Murray. The neural autoregressive distribution estimator. In AISTATS, volume 1, page 2, 2011. [16] L. Leal-Taixé, A. Milan, I. Reid, S. Roth, and K. Schindler. MOTChallenge 2015: Towards a benchmark for multi-target tracking. arXiv:1504.01942 [cs], 2015. [17] L. Leal-Taix, C. Canton-Ferrer, and K. Schindler. Learning by tracking: siamese cnn for robust target association. Computer Vision and Pattern Recognition Conference Workshops (CVPR). DeepVision: Deep Learning for Computer Vision., 2016. [18] B. Lee, E. Erdenee, S. Jin, and P. K. Rhee. Multi-class multi-object tracking using changing point detection. arXiv preprint arXiv:1608.08434, 2016. [19] E. Levinkov, J. Uhrig, S. Tang, M. Omran, E. Insafutdinov, A. Kirillov, C. Rother, T. Brox, B. Schiele, and B. Andres. Joint graph decomposition & node labeling: Problem, algorithms, applications. In CVPR, 2017. [20] A. Milan, L. Leal-Taixé, I. D. Reid, S. Roth, and K. Schindler. Mot16: A benchmark for multi-object tracking. CoRR, abs/1603.00831, 2016. [21] A. Milan, S. H. Rezatofighi, A. Dick, K. Schindler, and I. Reid. Online multi-target tracking using recurrent neural networks. arXiv preprint arXiv:1604.03635, 2016. [22] A. Milan, S. H. Rezatofighi, A. R. Dick, K. Schindler, and I. D. Reid. Online multi-target tracking using recurrent neural networks. CoRR, abs/1604.03635, 2017. [23] A. Milan, S. Roth, and K. Schindler. Continuous energy minimization for multitarget tracking. TPAMI, 36(1):58–72, 2014. [24] T. Moon, H. Choi, H. Lee, and I. Song. Rnndrop: A novel dropout for rnns in asr. In ASRU, 2015. [25] P. Ondruska and I. Posner. Deep tracking: Seeing beyond seeing using recurrent neural networks. In AAAI, 2016. [26] H. Pirsiavash, D. Ramanan, and C. C. Fowlkes. Globally-optimal greedy algorithms for tracking a variable number of objects. In CVPR, pages 1201– 1208, 2011. [27] S. Ren, K. He, R. Girshick, and J. Sun. Faster RCNN: Towards real-time object detection with region proposal networks. In Neural Information Processing Systems (NIPS), 2015. [28] R. Sanchez-Matilla, F. Poiesi, and A. Cavallaro. Online multi-target tracking with strong and weak detections. In Proceedings of 2nd Workshop on Benchmarking Multi-target Tracking: MOTChallenge 2016, 2016. [29] K. Simonyan and A. Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556, 2014. [30] S. Sukhbaatar, A. Szlam, J. Weston, and R. Fergus. End-to-end memory networks. In NIPS, 2015. [31] S. Tang, B. Andres, M. Andriluka, and B. Schiele. Multi-person tracking by multicut and deep matching. In ECCV Workshops, 2016. [32] B. Wang, G. Wang, K. L. Chan, and L. Wang. Tracklet association by online target-specific metric learning and coherent dynamics estimation. CoRR, abs/1511.06654, 2015. [33] B. Wang, L. Wang, B. Shuai, Z. Zuo, T. Liu, K. L. Chan, and G. Wang. Joint learning of convolutional neural networks and temporally constrained metrics for tracklet association. In 2016 IEEE Conference on Computer Vision and Pattern Recognition Workshops (CVPRW), 2016. [34] Y. Xiang, A. Alahi, and S. Savarese. Learning to track: Online multi-object tracking by decision making. In International Conference on Computer Vision (ICCV), pages 4705–4713, 2015. [35] T. Xiao, H. Li, W. Ouyang, and X. Wang. Learning deep feature representations with domain guided dropout for person re-identification. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2016. [36] C. Xiong, S. Merity, and R. Socher. Dynamic memory networks for visual and textual question answering. In ICML, 2016. [37] J. H. Yoon, C.-R. Lee, M.-H. Yang, and K.-J. Yoon. Online multi-object tracking via structural constraint event aggregation. In 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2016. [38] J. H. Yoon, M.-H. Yang, J. Lim, and K.-J. Yoon. Bayesian multi-object tracking using motion context from multiple objects. In WACV, pages 33–40, 2015. [39] F. Yu, W. Li, Q. Li, Y. Liu, X. Shi, and J. Yan. Poi: Multiple object tracking with high performance detection and appearance feature. CoRR, abs/1610.06136, 2016.
2cs.AI
MINIMUM DISTANCE FUNCTIONS OF COMPLETE INTERSECTIONS arXiv:1601.07604v4 [math.AC] 24 Oct 2017 JOSÉ MARTÍNEZ-BERNAL, YURIKO PITONES, AND RAFAEL H. VILLARREAL Abstract. We study the minimum distance function of a complete intersection graded ideal in a polynomial ring with coefficients in a field. For graded ideals of dimension one, whose initial ideal is a complete intersection, we use the footprint function to give a sharp lower bound for the minimum distance function. Then we show some applications to coding theory. 1. Introduction Let S = K[t1 , . . . , ts ] = ⊕∞ d=0 Sd be a polynomial ring over a field K with the standard grading and let I 6= (0) be a graded ideal of S. The degree or multiplicity of S/I is denoted by deg(S/I). Fix a graded monomial order ≺ on S and let in≺ (I) be the initial ideal of I. The footprint of S/I or Gröbner éscalier of I, denoted ∆≺ (I), is the set of all monomials of S not in the ideal in≺ (I) [28, p. 13, p. 133]. This notion occurs in other branches of mathematics under different names; see [20, p. 6] for a list of alternative names. Given an integer d ≥ 1, let M≺,d be the set of all zero-divisors of S/in≺ (I) of degree d that are in ∆≺ (I), and let F≺,d be the set of all zero-divisors of S/I that are not zero and are a K-linear combination of monomials in ∆≺ (I) of degree d. The footprint function of I, denoted fpI , is the function fpI : N+ → Z given by  deg(S/I) − max{deg(S/(in≺ (I), ta )) | ta ∈ M≺,d } if M≺,d 6= ∅, fpI (d) := deg(S/I) if M≺,d = ∅, and the minimum distance function of I, denoted δI , is the function δI : N+ → Z given by  deg(S/I) − max{deg(S/(I, f ))| f ∈ F≺,d } if F≺,d 6= ∅, δI (d) := deg(S/I) if F≺,d = ∅. These two functions were introduced and studied in [24]. Notice that δI is independent of the monomial order ≺ (see Lemma 3.9). To compute δI is a difficult problem but to compute fpI is much easier. We come to the main result of this paper which gives an explicit lower bound for δI and a formula for fpI for a family of complete intersection graded ideals: Theorem 3.14 If the initial ideal in≺ (I) of I is a complete intersection of height s−1 generated by tα2 , . . . , tαs , with di = deg(tαi ) and 1 ≤ di ≤ di+1 for i ≥ 2, then  s P   (di − 1) − 1,  (dk+2 − ℓ)dk+3 · · · ds if d ≤ i=2 δI (d) ≥ fpI (d) = s P   if d ≥ (di − 1) ,  1 i=2 where 0 ≤ k ≤ s − 2 and ℓ are integers such that d = Pk+1 i=2 (di − 1) + ℓ and 1 ≤ ℓ ≤ dk+2 − 1. 2010 Mathematics Subject Classification. Primary 13P25; Secondary 94B60, 11T71. The first and third author were supported by SNI. The second author was supported by CONACyT. 1 2 JOSÉ MARTÍNEZ-BERNAL, YURIKO PITONES, AND RAFAEL H. VILLARREAL An important case of this theorem, from the viewpoint of applications, is when I is the vanishing ideal of a finite set of projective points over a finite field (see the discussion below about the connection of fpI and δI with coding theory). If I is a complete intersection monomial ideal of dimension 1, then δI (d) = fpI (d) for d ≥ 1 (see Proposition 3.11), but this case is only of theoretical interest because, by Proposition 2.9, a monomial ideal is a vanishing ideal only in particular cases. Let I ⊂ S be a graded ideal such that L = in≺ (I) is a complete intersection of dimension 1. We give a formula for the degree of S/(L, ta ) when ta is in M≺,d , that is, ta is not in L and is a zero-divisor of S/L. By an easy classification of the complete intersection property of L (see Lemma 3.1) there are basically two cases to consider. One of them is Lemma 3.4, and the other is the following: Lemma 3.3 If L = in≺ (I) is generated by td22 , . . . , tds s and ta = ta11 · · · tas s is in M≺,d , then deg(S/(L, ta )) = d2 · · · ds − (d2 − a2 ) · · · (ds − as ). To show our main result we use the formula for the degree of the ring S/(L, ta ), and then use Proposition 3.13 to bound the degrees uniformly. The proof of the main result takes place in an abstract algebraic setting with no reference to vanishing ideals or finite fields. The formulas for the degree are useful in the following setting. If I = I(X) is the vanishing ideal of a finite set X of projective points, and in≺ (I) is generated by td22 , . . . , tds s , then Lemma 3.3 can be used to give upper bounds for the number of zeros in X of homogeneous polynomials of S. In fact, if f ∈ F≺,d and in≺ (f ) = ta11 · · · tas s , then in≺ (f ) is in M≺,d , and by Corollary 3.8 one has: |VX (f )| ≤ d2 · · · ds − (d2 − a2 ) · · · (ds − as ), where VX (f ) is the set of zeros or variety of f in X. This upper bound depends on the exponent of the leading term of f . A more complex upper bound is obtained when the initial ideal of I(X) is as in Lemma 3.1(ii). In this case one uses the formula for the degree given in Lemma 3.4. The interest in studying fpI and δI comes from algebraic coding theory. Indeed, if I = I(X) is the vanishing ideal of a finite subset X of a projective space Ps−1 over a finite field K = Fq , then the minimum distance δX (d) of the corresponding projective Reed-Muller-type code is equal to δI(X) (d), and fpI(X) (d) is a lower bound for δX (d) for d ≥ 1 (see Theorem 2.6 and Lemma 3.10). Therefore, one has the formula: (2.2) δI(X) (d) = deg(S/I(X)) − max{|VX (f )| : f 6≡ 0; f ∈ Sd }, where f 6≡ 0 means that f is not the zero function on X. Our abstract study of the minimum distance and footprint functions provides fresh techniques to study δX (d). It is well-known that the degree of S/I(X) is equal to |X| [19, Lecture 13]. Hence, using Eq. (2.2) and our main result, we get the following uniform upper bound for the number of zeros of all polynomials f ∈ Sd that do not vanish at all points of X. Corollary 4.2 If the initial ideal in≺ (I(X)) is a complete intersection generated by tα2 , . . . , tαs , with di = deg(tαi ) and 1 ≤ di ≤ di+1 for i ≥ 2, then (4.1) |VX (f )| ≤ |X| − (dk+2 − ℓ) dk+3 · · · ds , for any f ∈ Sd that does not vanish at all point of X, where 0 ≤ k ≤ s − 2 and ℓ are integers P such that d = k+1 i=2 (di − 1) + ℓ and 1 ≤ ℓ ≤ dk+2 − 1. This result gives a tool for finding good uniform upper bounds for the number of zeros in X of polynomials over finite fields. This is a problem of fundamental interest in algebraic coding COMPLETE INTERSECTIONS 3 theory [31] and algebraic geometry [30]. We leave as an open question whether this uniform bound is optimal, that is, whether the equality is attained for some polynomial f . Tohǎneanu and Van Tuyl conjectured [33, Conjecture 4.9] that if the vanishing ideal I(X) is a complete intersection generated by polynomials of degrees d2 , . . . , ds and di ≤ di+1 for all i, then δX (1) ≥ (d2 − 1)d3 . . . ds . By Corollary 4.2 this conjecture is true if in≺ (I(X)) is a complete intersection. We leave as another open question whether Corollary 4.2 is true if we only assume that I(X) is a complete intersection (cf. Proposition 3.12). To illustrate the use of Corollary 4.2 in a concrete situation, consider the lexicographical order on S with t1 ≺ · · · ≺ ts and a projective torus over a finite field Fq with q 6= 2: T = {[(x1 , . . . , xs )] ∈ Ps−1 | xi ∈ F∗q for i = 1, . . . , s}, where F∗q = Fq \ {0}. As I(T) is generated by the Gröbner basis {tiq−1 − t1q−1 }si=2 , its initial ideal is a complete intersection generated by t2q−1 , . . . , tsq−1 . Therefore, noticing that deg(S/I(T)) is equal to (q − 1)s−1 and setting di = q − 1 for i = 2, . . . , s in Eq. (4.1), we obtain that any homogeneous polynomial f of degree d, not vanishing at all points of T, has at most (q − 1)s−1 − (q − 1)s−(k+2) (q − 1 − ℓ) zeros in T if d ≤ (q − 2)(s − 1) − 1, and k and ℓ are the unique integers such that k ≥ 0, 1 ≤ ℓ ≤ q − 2 and d = k(q − 2) + ℓ. This uniform bound was given in [29, Theorem 3.5] and it is seen that this bound is in fact optimal by constructing an appropriate polynomial f . If fpI (d) = δI (d) for d ≥ 1, we say that I is a Geil–Carvalho ideal. For vanishing ideals over finite fields, this notion is essentially another way of saying that the bound of Eq. (4.1) is optimal. The first interesting family of ideals where equality holds is due to Geil [13, Theorem 2]. His result essentially shows that fpI (d) = δI (d) for d ≥ 1 when ≺ is a graded lexicographical order and I is the homogenization of the vanishing ideal of the affine space As−1 over a finite field K = Fq . Recently, Carvalho [5, Proposition 2.3] extended this result by replacing As−1 by a cartesian product of subsets of Fq . In this case the underlying Reed-Muller-type code is called an affine cartesian code and an explicit formula for the minimum distance was first given in [14, 21]. In a very recent paper, Bishnoi, Clark, Potukuchi, and Schmitt give another proof of this formula [3, Theorem 5.2] using a result of Alon and Füredi [1, Theorem 5] (see also [4]). As the two most relevant applications of our main result to algebraic coding theory, we recover the formula for the minimum distance of an affine cartesian code given in [21, Theorem 3.8] and [14, Proposition 5], and the fact that the homogenization of the corresponding vanishing ideal is a Geil–Carvalho ideal [5] (see Corollary 4.4). Then we present an extension of a result of Alon and Füredi [1, Theorem 1]—in terms of the regularity of a vanishing ideal—about coverings of the cube {0, 1}n by affine hyperplanes, that can be applied to any finite subset of a projective space whose vanishing ideal has a complete intersection initial ideal (see Corollary 4.5 and Example 4.6). Finally, using Macaulay2 [17], we exemplify how some of our results can be used in practice, and show that the vanishing ideal of P2 over F2 is not Geil–Carvalho by computing all possible initial ideals (see Example 4.8). In Section 2 we introduce projective Reed-Muller-type codes and present some of the results and terminology that will be needed in the paper. For all unexplained terminology and additional information, we refer to [36] (for deeper advances on the knowledge of the degree), [8] (for the theory of Gröbner bases), [2, 11, 32] (for commutative algebra and Hilbert functions), and [23, 34] (for the theory of error-correcting codes and linear codes). 4 JOSÉ MARTÍNEZ-BERNAL, YURIKO PITONES, AND RAFAEL H. VILLARREAL 2. Preliminaries In this section, we present some of the results that will be needed throughout the paper and introduce some more notation. All results of this section are well-known. Let S = K[t1 , . . . , ts ] = ⊕∞ d=0 Sd be a graded polynomial ring over a field K with the standard grading and let (0) 6= I ⊂ S be a graded ideal. The Hilbert function of S/I is: HI (d) := dimK (Sd /Id ), d = 0, 1, 2, . . . where Id = I ∩ Sd . By the dimension of I we mean the Krull dimension of S/I. The degree or multiplicity of S/I is the positive integer ( (k − 1)! lim HI (d)/dk−1 if k ≥ 1, d→∞ deg(S/I) := dimK (S/I) if k = 0, and the regularity of the Hilbert function of S/I, or simply the regularity of S/I, denoted reg(S/I), is the least integer r ≥ 0 such that HI (d) is equal to hI (d) for d ≥ r, where hI is the Hilbert polynomial of S/I. Let ≺ be a monomial order on S and let (0) 6= I ⊂ S be an ideal. The leading monomial of f is denoted by in≺ (f ) and the initial ideal of I is denoted by in≺ (I). A monomial ta is called a standard monomial of S/I, with respect to ≺, if ta is not in the ideal in≺ (I). A polynomial f is called standard if f 6= 0 and f is a K-linear combination of standard monomials. The set of standard monomials, denoted ∆≺ (I), is called the footprint of S/I. If I is graded, then HI (d) is the number of standard monomials of degree d. Lemma 2.1. Let ≺ be a monomial order, let I ⊂ S be an ideal, and let f be a polynomial of S of positive degree. If in≺ (f ) is regular on S/in≺ (I), then f is regular on S/I. Proof. Let g be a polynomial of S such that gf ∈ I. It suffices to show that g ∈ I. Pick a Gröbner basis P g1 , . . . , gr of I. Then, by the division algorithm [8, Theorem 3, p. 63], we can write g = ri=1 ai gi + h, where h = 0 or h is a standard polynomial of S/I. We need only show that h = 0. If h 6= 0, then hf is in I and in≺ (h)in≺ (f ) is in in≺ (I). Therefore in≺ (h) is in in≺ (I), a contradiction.  Remark 2.2. Given an integer d ≥ 1, there is a map in≺ : F≺,d → M≺,d given by f 7→ in≺ (f ). This follows from Lemma 2.1. If I is a monomial ideal, then M≺,d ⊂ F≺,d . Projective Reed-Muller-type codes. Let K = Fq be a finite field with q elements, let Ps−1 be a projective space over K, and let X be a subset of Ps−1 . As usual, points of Ps−1 are denoted by [α], where 0 6= α ∈ K s . In this paragraph all results are valid if we assume that K is any field and X is a finite subset of Ps−1 , instead of assuming that K is finite. However, the interesting case for coding theory is when K is finite. The vanishing ideal of X, denoted I(X), is the ideal of S generated by the homogeneous polynomials that vanish at all points of X. In this case the Hilbert function of S/I(X) is denoted by HX (d). Let P1 , . . . , Pm be a set of representatives for the points of X with m = |X|. Fix a degree d ≥ 1. For each i there is fi ∈ Sd such that fi (Pi ) 6= 0. Indeed suppose Pi = [(a1 , . . . , as )], there is at least one k in {1, . . . , s} such that ak 6= 0. Setting fi (t1 , . . . , ts ) = tdk one has that fi ∈ Sd and fi (Pi ) 6= 0. There is a K-linear map:   f (Pm ) f (P1 ) ,..., . (2.1) evd : Sd = K[t1 , . . . , ts ]d → K |X| , f 7→ f1 (P1 ) fm (Pm ) COMPLETE INTERSECTIONS 5 The map evd is called an evaluation map. The image of Sd under evd , denoted by CX (d), is called a projective Reed-Muller-type code of degree d over X [10]. It is also called an evaluation code associated to X [15]. This type of codes have been studied using commutative algebra methods and especially Hilbert functions, see [9, 16, 26, 31] and the references therein. Definition 2.3. A linear code is a linear subspace of K m for some m. The basic parameters of the linear code CX (d) are its length |X|, dimension dimK CX (d), and minimum distance δX (d) := min{kvk : 0 6= v ∈ CX (d)}, where kvk is the number of non-zero entries of v. Lemma 2.4. [24, Lemma 2.13] (a) The map evd is well-defined, i.e., it is independent of the set of representatives that we choose for the points of X. (b) The basic parameters of the ReedMuller-type code CX (d) are independent of f1 , . . . , fm . The following summarizes the well-known relation between projective Reed-Muller-type codes and the theory of Hilbert functions. Notice that items (i) and (iv) follow directly from Eq. (2.1) and item (iii), respectively. Proposition 2.5. The following hold. (i) (ii) (iii) (iv) HX (d) = dimK CX (d) for d ≥ 1. [19, Lecture 13] deg(S/I(X)) = |X|. (Singleton bound) 1 ≤ δX (d) ≤ |X| − HX (d) + 1 for d ≥ 1. δX (d) = 1 for d ≥ reg(S/I(X)). The next result gives an algebraic formulation of the minimum distance of a projective ReedMuller-type code in terms of the degree and the structure of the underlying vanishing ideal. Theorem 2.6. [24, Theorem 4.7] If |X| ≥ 2, then δX (d) = δI(X) (d) ≥ 1 for d ≥ 1. This result gives an algorithm, that can be implemented in CoCoA [7], Macaulay2 [17], or Singular [18], to compute δX (d) for small values of q and s, where q is the cardinality of Fq and s is the number of variables of S (see the procedure of Example 4.6). Using SAGE [27] one can also compute δX (d) by finding a generator matrix of CX (d). As a direct consequence of Theorem 2.6 one has: (2.2) δI(X) (d) = deg(S/I(X)) − max{|VX (f )| : f 6≡ 0; f ∈ Sd }, where VX (f ) is the zero set of f in X and f 6≡ 0 means that f does not vanish at all points of X. The next lemma follows using the division algorithm [8] (cf. [12, Problem 1-17]). Lemma 2.7. Let X be a finite subset of Ps−1 , let [α] be a point in X, with α = (α1 , . . . , αs ) and αk 6= 0 for some k, and let I[α] be the vanishing ideal of [α]. Then I[α] is a prime ideal, I[α] = ({αk ti − αi tk | k 6= i ∈ {1, . . . , s}), deg(S/I[α] ) = 1, T ht(I[α] ) = s − 1, and I(X) = [β]∈X I[β] is the primary decomposition of I(X). Remark 2.8. If X is a finite set of projective points, then S/I(X) is a Cohen–Macaulay reduced graded ring of dimension 1. This is very well-known, and it follows directly from Lemma 2.7. In particular, the regularity of the Hilbert function of S/I(X) is the Castelnuovo–Mumford regularity of S/I(X). An ideal I ⊂ S is called unmixed if all its associated primes have the same height. The next result classifies monomial vanishing ideals of finite sets in a projective space. 6 JOSÉ MARTÍNEZ-BERNAL, YURIKO PITONES, AND RAFAEL H. VILLARREAL Proposition 2.9. Let X be a finite subset of Ps−1 . The following are equivalent: (a) I(X) is a monomial ideal. (b) I(X) = ∩m i=1 pi , where the pi ’s are generated by s − 1 variables. (c) X ⊂ {[e1 ], . . . , [es ]}, where ei is the i-th unit vector. Proof. (a) ⇒ (b): By Remark 2.8, I(X) is a radical Cohen–Macaulay graded ideal of dimension 1. Hence, I(X) is an unmixed square-free monomial ideal of height s − 1. Therefore, I(X) is equal to ∩m i=1 pi , where the pi ’s are face ideals (i.e., ideals generated by variables) of height s − 1. (b) ⇒ (c): Let X be the Zariski closure of X. As X is finite, one has X = X = V (I(X)) = (pi ). Thus it suffices to notice that V (pi ) = {[eij ]} for some ij . (c) ⇒ (a): This follows from Lemma 2.7.  ∪m i=1 V 3. Complete intersections Let S = K[t1 , . . . , ts ] = ⊕∞ d=0 Sd be a polynomial ring over a field K with the standard grading and s ≥ 2. An ideal I ⊂ S is called a complete intersection if there exist g1 , . . . , gr in S such that I = (g1 , . . . , gr ), where r is the height of I. In what follows by a monomial order ≺ we mean a graded monomial order in the sense that ≺ is defined first by total degree [8]. Lemma 3.1. Let L ⊂ S be an ideal generated by monomials. If dim(S/L) = 1, then L is a complete intersection if and only if, up to permutation of the variables t1 , . . . , ts , we can write (i) L = (td22 , . . . , tds s ) with 1 ≤ di ≤ di+1 for i ≥ 2, or dp c cp+1 dp+2 (ii) L = (td12 , . . . , tp−1 , tpp tp+1 , tp+2 , . . . , tds s ) for some p ≥ 1 such that 1 ≤ cp ≤ cp+1 and 1 ≤ di ≤ di+1 for 2 ≤ i ≤ s − 1, where dp+1 = cp + cp+1 . Proof. ⇒) Let tα1 , . . . , tαs−1 be the minimal set of generators of L consisting of monomials. These monomials form a regular sequence. Hence tαi and tαj have no common variables for i 6= j. Then, either all variables occur in tα1 , . . . , tαs−1 and we are in case (ii), up to permutation of the variables t1 , . . . , ts , or there is one variable that is not in any of the tαi ’s and we are in case (i), up to permutation of the variables t1 , . . . , ts . ⇐) In both cases L is an ideal of height s − 1 generated by s − 1 elements, that is, L is a complete intersection.  Proposition 3.2. [35, Propositions 3.1.33 and 5.1.11] Let A = R1 /I1 , B = R2 /I2 be two standard graded algebras over a field K, where R1 = K[x], R2 = K[y] are polynomial rings in disjoint sets of variables and Ii is an ideal of Ri . If R = K[x, y] and I = I1 R + I2 R, then (R1 /I1 ) ⊗K (R2 /I2 ) ≃ R/I and F (A ⊗K B, x) = F (A, x)F (B, x), where F (A, x) and F (B, x) are the Hilbert series of A and B, respectively. Lemma 3.3. Let L be the ideal of S generated by td22 , . . . , tds s . If ta = ta11 tar r · · · tas s , r ≥ 2, ar ≥ 1, and ai ≤ di − 1 for i ≥ r, then deg(S/(L, ta )) = deg(S/(L, tar r · · · tas s )) = d2 · · · ds − d2 · · · dr−1 (dr − ar ) · · · (ds − as ), where ai = 0 if 2 ≤ i < r. COMPLETE INTERSECTIONS 7 Proof. In what follows we will use the fact that Hilbert functions and Hilbert series are additive on short exact sequences [12, Chapter 2, Proposition 7]. If a1 ≥ 1, then taking Hilbert functions in the exact sequence a1 t 1 S/(L, ta ) −→ S/(L, ta11 ) −→ 0, 0 −→ S/(L, tar r · · · tas s )[−a1 ] −→ and noticing that dim(S/(L, ta11 )) = 0, the first equality follows. Thus we may assume that ta has the form ta = tar r · · · tas s and ai = 0 for i < r. We proceed by induction on s ≥ 2. Assume s = 2. Then r = 2, ta = ta22 , (L, ta ) = (ta22 ), and the degree of S/(L, ta ) is a2 , as required. Assume s ≥ 3. If ai = 0 for i > r, then (L, ta ) = (L, tar r ) is a complete intersection and the required formula follows from [32, Corollary 3.3]. Thus we may assume that ai ≥ 1 for some i > r. There is an exact sequence (3.1) tar a d d r r+1 r+1 r−1 0 −→ S/(td22 , . . . , tr−1 · · · tas s )[−ar ] −→ , . . . , tds s , tr+1 , trdr −ar , tr+1 d d r−1 r+1 S/(L, ta ) −→ S/(td22 , . . . , tr−1 , tar r , tr+1 , . . . , tds s ) −→ 0. Notice that the ring on the right is a complete intersection and the ring on the left is isomorphic to the tensor product (3.2) d d a r−1 r+1 r+1 K[t2 , . . . , tr ]/(td22 , . . . , tr−1 , trdr −ar ) ⊗K K[t1 , tr+1 , . . . , ts ]/(tr+1 , . . . , tds s , tr+1 · · · tas s ). Hence, taking Hilbert series in Eq. (3.1), and applying [32, Corollary 3.3], the theorem of Hilbert–Serre [32, p. 58], and Proposition 3.2, we can write the Hilbert series of S/(L, ta ) as F (S/(L, ta ), x) = xar (1 − xd2 ) · · · (1 − xdr−1 )(1 − xdr −ar ) g(x) + (1 − x)r−1 (1 − x) (1 − xd2 ) · · · (1 − xdr−1 )(1 − xar )(1 − xdr+1 ) · · · (1 − xds ) , (1 − x)s where g(x)/(1 − x) is the Hilbert series of the second ring in the tensor product of Eq. (3.2) and g(1) is its degree. By induction hypothesis g(1) = dr+1 · · · ds − (dr+1 − ar+1 ) · · · (ds − as ). Therefore, writing F (S/(L, ta ), x) = h(x)/(1−x) with h(x) ∈ Z[x] and h(1) > 0, and recalling that h(1) is the degree of S/(L, ta ), we get deg(S/(L, ta )) = h(1) = d2 · · · dr−1 (dr − ar )g(1) + d2 · · · dr−1 ar dr+1 · · · ds = d2 · · · ds − (d2 − a2 ) · · · (ds − as ). ✷ d c c d p p+1 p+2 , tpp tp+1 Lemma 3.4. (A) Let L be the ideal of S generated by td12 , . . . , tp−1 , tp+2 , . . . , tds s , where a1 a a p ≥ 1, 1 ≤ cp ≤ cp+1 and di ≥ 1 for all i. If t = t1 · · · ts s is not in L, dp+1 = cp + cp+1 , and ai ≥ 1 for some i, then the degree of S/(L, ta ) is equal to (i) d2 · · · ds − (cp+1 − ap+1 ) p−1 Y (ii.1) d2 · · · ds − (cp − ap ) (di+1 − ai ) s Y (di − ai ) if ap < cp , ap+1 ≥ cp+1 ; i=p+2 i=1 (ii.2) d2 · · · ds − (dp+1 − ap − ap+1 ) (di − ai ) if ap ≥ cp ; i=p+2 i=1 p−1 Y s Y (di+1 − ai ) p−1 Y (di+1 − ai ) i=1 s Y (di − ai ) if ap < cp , ap+1 < cp+1 . i=p+2 8 JOSÉ MARTÍNEZ-BERNAL, YURIKO PITONES, AND RAFAEL H. VILLARREAL (B) Let I be a graded ideal such that L = in≺ (I). If 0 ≤ k ≤ s − 2, ℓ are integers such that P d = k+1 i=2 (di − 1) + ℓ and 1 ≤ ℓ ≤ dk+2 − 1, then fpI (d) ≤ (dk+2 − ℓ)dk+3 · · · ds . a Proof. (A) Case (i): Assume ap ≥ cp . If ai = 0 for i 6= p, then ta = tpp , and by the first equality of Lemma 3.3, and using [32, Corollary 3.3], we get d a d d c d c c p p+2 p+1 , tpp , tp+2 deg(S/(L, ta )) = deg(S/(td12 , . . . , tp−1 , . . . , tds s , tpp tp+1 )) p p+2 = deg(S/(td12 , . . . , tp−1 , tpp , tp+2 , . . . , tds s )) = d2 · · · dp cp dp+2 · · · ds = d2 · · · dp (dp+1 − cp+1 )dp+2 · · · ds = d2 · · · ds − cp+1 d2 · · · dp dp+2 · · · ds , as required. We may now assume that ai ≥ 1 for some i 6= p. As ta ∈ / L and ap ≥ cp , one has ai < di+1 for i = 1, . . . , p − 1, ap+1 < cp+1 , and ai < di for i = p + 2, . . . , s. Therefore from the exact sequence c d d a −cp ap+1 tp+1 a p p+1 p+2 p−1 0 −→ S/(td12 , . . . , tp−1 , tp+1 , tp+2 , . . . , tds s , ta11 · · · tp−1 tp p d c d c tpp · · · tas s )[−cp ] −→ p p+2 , tpp , tp+2 S/(L, ta ) −→ S/(td12 , . . . , tp−1 , . . . , tds s ) −→ 0, and using Lemma 3.3 and [32, Corollary 3.3], the required equality follows. a Case (ii): Assume ap < cp . If ai = 0 for i 6= p, then ta = tpp and 0 = ap+1 < cp+1 . Hence, by [32, Corollary 3.3], we get a d d p p+2 deg(S/(L, ta )) = deg(S/(td12 , . . . , tp−1 , tpp , tp+2 , . . . , tds s )) = d2 · · · dp ap dp+2 · · · ds = d2 · · · ds − (dp+1 − ap )d2 · · · dp dp+2 · · · ds , as required. We may now assume that ai ≥ 1 for some i 6= p. Consider the exact sequence d c d a a c tpp p p+1 p+2 p−1 p+1 0 −→ S/(td12 , . . . , tp−1 , tp+1 , tp+2 , . . . , tds s , t1a1 · · · tp−1 tp+1 · · · tas s )[−cp ] −→ (3.3) d d c p p+2 S/(L, ta ) −→ S/(td12 , . . . , tp−1 , tpp , tp+2 , . . . , tds s , ta11 · · · tas s ) −→ 0. Subcase (ii.1): Assume ap+1 ≥ cp+1 . As ta ∈ / L, in our situation, one has ai < di+1 for i = 1, . . . , p − 1, ap < cp , and ai < di for i = p + 2, . . . , s. If ai = 0 for i 6= p + 1, then taking Hilbert series in Eq. (3.3), and noticing that the ring on the right has dimension 0, we get deg(S/(L, ta )) = d2 · · · dp cp+1 dp+2 · · · ds = d2 · · · ds − cp d2 · · · dp dp+2 · · · ds , as required. Thus we may now assume that ai ≥ 1 for some i 6= p + 1. Taking Hilbert series in Eq. (3.3), and using [32, Corollary 3.3], we obtain deg(S/(L, ta )) = d2 · · · dp cp+1 dp+2 · · · ds + d c d p p+2 , tpp , tp+2 deg(S/(td12 , . . . , tp−1 , . . . , tds s , ta11 · · · tas s )). Therefore, using Lemma 3.3, the required equality follows. Subcase (ii.2): Assume ap+1 < cp+1 . If ai = 0 for i 6= p + 1, taking Hilbert series in Eq. (3.3), and noticing that the ring on the right has dimension 0, by Lemma 3.3, we get deg(S/(L, ta )) = d2 · · · dp cp+1 dp+2 · · · ds − d2 · · · dp (cp+1 − ap+1 )dp+2 · · · ds = d2 · · · dp ap+1 dp+2 · · · ds = d2 · · · ds − (dp+1 − ap+1 )d2 · · · dp dp+2 · · · ds , COMPLETE INTERSECTIONS 9 as required. Thus we may now assume that ai ≥ 1 for some i 6= p + 1. Taking Hilbert series in Eq. (3.3), and applying Lemma 3.3 to the ends of Eq. (3.3), the required equality follows. (B) It suffices to find a monomial tb in M≺,d such that (3.4) deg(S/(in≺ (I), tb )) = (dk+2 − ℓ)dk+3 · · · ds . There are five cases to consider:  dk+1 −1 ℓ dp −1 cp cp+1 −1 dp+2 −1  td12 −1 · · · tp−1 tp tp+1 tp+2 · · · tk+1 tk+2    dp −1 cp cp+1 −1 ℓ d2 −1   · · · tp−1 tp tp+1 tp+2  t1 d −1 b d −1 2 t = · · · tkk+1 tℓk+1 t1   dp −1 cp ℓ−cp  td12 −1 · · · tp−1 tp tp+1     d2 −1 dp −1 ℓ t1 · · · tp−1 tp if if if if if k k k k k ≥ p + 1, = p, ≤ p − 2, = p − 1 and ℓ ≥ cp , = p − 1 and ℓ < cp . In each case, by the formulas for the degree of part (A), we get the equality of Eq. (3.4).  If f ∈ S, the quotient ideal of I with respect to f is given by (I : f ) = {h ∈ S| hf ∈ I}. Lemma 3.5. [24, Lemma 4.1] Let I ⊂ S be an unmixed graded ideal and let ≺ be a monomial order. If f ∈ S is homogeneous and (I : f ) 6= I, then deg(S/(I, f )) ≤ deg(S/(in≺ (I), in≺ (f ))) ≤ deg(S/I), and deg(S/(I, f )) < deg(S/I) if I is an unmixed radical ideal and f ∈ / I. Remark 3.6. Let I ⊂ S be an unmixed graded ideal of dimension 1. If f ∈ Sd , then (I : f ) = I if and only if dim(S/(I, f )) = 0. In this case deg(S/(I, f )) could be greater than deg(S/I). Lemma 3.7. [24, Lemma 3.2] Let X be a finite subset of Ps−1 over a field K and let I(X) ⊂ S be its graded vanishing ideal. If 0 6= f ∈ S is homogeneous, then the number of zeros of f in X is given by  deg S/(I(X), f ) if (I(X) : f ) 6= I(X), |VX (f )| = 0 if (I(X) : f ) = I(X). Corollary 3.8. Let I = I(X) be the vanishing ideal of a finite set X of projective points, let f ∈ F≺,d , and in≺ (f ) = ta11 · · · tas s . If in≺ (I) is generated by td22 , . . . , tds s , then there is r ≥ 2 such that ar ≥ 1, ai ≤ di − 1 for i ≥ r, ai = 0 if 2 ≤ i < r, and |VX (f )| ≤ d2 · · · ds − (d2 − a2 ) · · · (ds − as ). Proof. As f is a zero-divisor of S/I, by Lemma 2.1, ta = in≺ (f ) is a zero-divisor of S/in≺ (I). Hence, there is r ≥ 2 such that ar ≥ 1 and ai = 0 if 2 ≤ i < r. Using that ta is a standard monomial of S/I, we get that ai ≤ di − 1 for i ≥ r. Therefore, using Lemma 3.7 together with Lemmas 3.3 and 3.5, we get |VX (f )| = deg(S/(I(X), f )) ≤ deg(S/(in≺ (I(X)), in≺ (f ))) = d2 · · · ds − (d2 − a2 ) · · · (ds − as ). ✷ Lemma 3.9. Let I be a graded ideal and let ≺ be a monomial order. Then the minimum distance function δI is independent of ≺. Proof. Fix a positive integer d. Let Fd be the set of all homogeneous zero-divisors of S/I not in I of degree d and let f be an element of Fd . Pick a Gröbner basis P g1 , . . . , gr of I. Then, by the division algorithm [8, Theorem 3, p. 63], we can write f = ri=1 ai gi + h, where h is a 10 JOSÉ MARTÍNEZ-BERNAL, YURIKO PITONES, AND RAFAEL H. VILLARREAL homogeneous standard polynomial of S/I of degree d. Since (I : f ) = (I : h), we get that h is in F≺,d . Hence, as (I, f ) = (I, h), we get the equalities: δI (d) = deg(S/I) − max{deg(S/(I, f ))| f ∈ F≺,d } = deg(S/I) − max{deg(S/(I, f ))| f ∈ Fd }, that is, δI (d) does not depend on F≺,d .  Lemma 3.10. Let I be an unmixed graded ideal and ≺ a monomial order. The following hold. (a) δI (d) ≥ fpI (d) and δI (d) ≥ 0 for d ≥ 1. (b) fpI (d) ≥ 0 if in≺ (I) is unmixed. (c) δI (d) ≥ 1 if I is radical. Proof. If F≺,d = ∅, then clearly δI (d) = deg(S/I) ≥ 1, δI (d) ≥ fpI (d), and if in≺ (I) is unmixed, then fpI (d) ≥ 0 (this follows from Lemma 3.5). Thus, (a), (b), and (c) hold. Now assume that F≺,d 6= ∅. Pick a standard polynomial f ∈ Sd such that (I : f ) 6= I and δI (d) = deg(S/I) − deg(S/(I, f )). As I is unmixed, by Lemma 3.5, deg(S/(I, f )) ≤ deg(S/(in≺ (I), in≺ (f ))). On the other hand, by Lemma 2.1, in≺ (f ) is a zero-divisor of S/in≺ (I). Hence δI (d) ≥ fpI (d). Using the second inequality of Lemma 3.5 it follows that δI (d) ≥ 0, fpI (d) ≥ 0 if in≺ (I) is unmixed, and δI (d) ≥ 1 if I is radical.  Proposition 3.11. If I is an unmixed monomial ideal and ≺ is any monomial order, then δI (d) = fpI (d) for d ≥ 1, that is, I is a Geil–Carvalho ideal. Proof. The inequality δI (d) ≥ fpI (d) follows from Lemma 3.10. To show the reverse inequality notice that M≺,d ⊂ F≺,d because one has I = in≺ (I). Also notice that M≺,d = ∅ if and only if F≺,d = ∅, this follows from Lemma 2.1. Therefore one has fpI (d) ≥ δI (d).  Proposition 3.12. Let I ⊂ S be a graded ideal and let ≺ be a monomial order. Suppose that in≺ (I) is a complete intersection of height s − 1 generated by tα2 , . . . , tαs , with di = deg(tαi ) and di ≥ 1 for all i. The following hold. (a) [25, Example 1.5.1] I is a complete intersection and dim(S/I) = 1. P (b) ([25, Example 1.5.1], [6, Lemma 3.5]) deg(S/I) = d2 · · · ds and reg(S/I) = si=2 (di − 1). (c) 1 ≤ fpI (d) ≤ δI (d) for d ≥ 1. Proof. (a): The rings S/I and S/init≺ (I) have the same dimension. Thus dim(S/I) = 1. As ≺ is a graded order, there are f2 , . . . , fs homogeneous polynomials in I with in≺ (fi ) = tαi for i ≥ 2. Since in≺ (I) = (in≺ (f2 ), . . . , in≺ (fs )), the polynomials f2 , . . . , fs form a Gröbner basis of I, and in particular they generate I. Hence I is a graded ideal of height s − 1 generated by s − 1 polynomials, that is, I is a complete intersection. (b): Since I is a complete intersection generated by the fi ’s, then the degree and regularity of P S/I are deg(f2 ) · · · deg(fs ) and si=2 (deg(fi ) − 1), respectively. This follows from the formula for the Hilbert series of a complete intersection given in [32, Corollary 3.3]. (c) The ideal I is unmixed because, by part (a), I is a complete intersection; in particular Cohen–Macaulay and unmixed. Hence the inequality δI (d) ≥ fpI (d) follows from Lemma 3.10. Let ta be a standard monomial of S/I of degree d such that (in≺ (I) : ta ) 6= in≺ (I), that is, ta is in M≺,d . Using Lemma 3.1, and the formulas for deg(S/(in≺ (I), ta )) given in Lemma 3.3 and Lemma 3.4, we obtain that deg(S/(in≺ (I), ta )) < deg(S/I). Thus fpI (d) ≥ 1.  COMPLETE INTERSECTIONS 11 Proposition 3.13. [24, Proposition 5.7] Let 1 ≤ e1 ≤ · · · ≤ em and 0 ≤ bi ≤ ei − 1 for i = 1, . . . , m be integers. If b0 ≥ 1, then ! m k+1 m X X Y (ei − bi ) − (k − 1) − b0 − (ei − bi ) ≥ bi ek+2 · · · em (3.5) i=1 i=1 i=k+2 for k = 0, . . . , m − 1, where ek+2 · · · em = 1 and We come to the main result of this paper. Pm i=k+2 bi = 0 if k = m − 1. Theorem 3.14. Let I ⊂ S be a graded ideal and let ≺ be a graded monomial order. If the initial ideal in≺ (I) is a complete intersection of height s−1 generated by tα2 , . . . , tαs , with di = deg(tαi ) and 1 ≤ di ≤ di+1 for i ≥ 2, then δI (d) ≥ fpI (d) ≥ 1 for d ≥ 1 and  s P   (di − 1) − 1,  (dk+2 − ℓ)dk+3 · · · ds if d ≤ i=2 fpI (d) = s P   if d ≥ (di − 1) ,  1 i=2 where 0 ≤ k ≤ s − 2 and ℓ are integers such that d = Pk+1 i=2 (di − 1) + ℓ and 1 ≤ ℓ ≤ dk+2 − 1. Proof. Let ta be any standard monomial Ps of S/I of degree d which is a zero-divisorPofs S/in≺ (I), a that is, t is in M≺,d . Thus d = i=1 ai , where a = (a1 , . . . , as ). We set r = i=2 (di − 1). Ps P If we substitute −ℓ = k+1 i=1 ai in the expression (dk+2 − ℓ)dk+3 · · · ds , it follows i=2 (di − 1) − that for d < r the inequality fpI (d) ≥ (dk+2 − ℓ)dk+3 · · · ds is equivalent to show that ! s k+2 X X a ai dk+3 · · · ds (di − ai ) − k − a1 − (3.6) deg(S/I) − deg(S/(in≺ (I), t )) ≥ i=2 ta i=k+3 Ps for any in M≺,d , where by convention i=k+3 ai = 0 and dk+3 · · · ds = 1 if k = s − 2. Recall that, by Proposition 3.12, one has that fpI (d) ≥ 1 for d ≥ 1. By Lemma 3.1, and by permuting variables and changing I, ≺, and ta accordingly, one has the following two cases to consider. Case (i): Assume that in≺ (I) = (td22 , . . . , tds s ) with 1 ≤ di ≤ di+1 for i ≥ 2. Then, as ta is in M≺,d , we can write ta = ta11 · · · tar r · · · tas s , r ≥ 2, ar ≥ 1, ai = 0 if 2 ≤ i < r, and ai ≤ di − 1 for i ≥ r. By Lemma 3.3 we get (3.7) deg(S/(in≺ (I), ta )) = d2 · · · ds − (d2 − a2 ) · · · (ds − as ) d2 −1 for any ta in M≺,d . If d ≥ r, setting tc = td−r · · · tds s −1 , one has tc ∈ M≺,d . Then, using 1 t2 c Eq. (3.7), it follows that deg(S/(in≺ (I), t )) = d2 · · · ds − 1. Thus fpI (d) ≤ 1 and equality dk+1 −1 ℓ fpI (d) = 1 holds. We may now assume d ≤ r − 1. Setting tb = td22 −1 · · · tk+1 tk+2 , one has b t ∈ M≺,d . Then, using Eq. (3.7), we get deg(S/(in≺ (I), tb )) = d2 · · · ds − (dk+2 − ℓ)dk+3 · · · ds . Hence fpI (d) ≤ (dk+2 − ℓ)dk+3 · · · ds . Next we show the reverse inequality by showing that the inequality of Eq. (3.6) holds for any ta ∈ M≺,d . By Eq. (3.7) it suffices to show that the following equivalent inequality holds ! s k+2 X X ai dk+3 · · · ds (di − ai ) − k − a1 − (d2 − a2 ) · · · (ds − as ) ≥ i=2 i=k+3 12 JOSÉ MARTÍNEZ-BERNAL, YURIKO PITONES, AND RAFAEL H. VILLARREAL for any a = (a1 , . . . , as ) such that ta ∈ M≺,d . This inequality follows from Proposition 3.13 by making m = s − 1, ei = di+1 , bi = ai+1 for i = 1, . . . , s − 1 and b0 = 1 + a1 . c c d d p p+1 p+2 , tpp tp+1 Case (ii): Assume that in≺ (I) = (td12 , . . . , tp−1 , tp+2 , . . . , tds s ) for some p ≥ 1 such that 1 ≤ cp ≤ cp+1 and 1 ≤ di ≤ di+1 for all i, where dp+1 = cp + cp+1 . d −1 d−r+c −1 d c −1 p p p+1 p+2 If d ≥ r, setting tc = td12 −1 · · · tp−1 tp tp+1 tp+2 · · · tds s −1 , we get that tc ∈ M≺,d . Then, using the first formula of Lemma 3.4, it follows that deg(S/(in≺ (I), tc )) = d2 · · · ds − 1. Thus fpI (d) ≤ 1 and the equality fpI (d) = 1 holds. We may now assume d ≤ r − 1. The inequality fpI (d) ≤ (dk+2 − ℓ)dk+3 · · · ds follows from Lemma 3.4(B). To show that fpI (d) ≥ (dk+2 −ℓ)dk+3 · · · ds we need only show that the inequality of Eq. (3.6) holds for any ta in M≺,d . Take ta in M≺,d . Then we can write ta = ta11 · · · tas s with ai < di+1 for i < p and ai < di for i > p + 1. There are three subcases to consider. Subcase (ii.1): Assume ap ≥ cp . Then cp+1 > ap+1 because ta is a standard monomial of S/I, and by Lemma 3.4 we get deg(S/(in≺ (I), ta )) = d2 · · · ds − (cp+1 − ap+1 ) p−1 Y (di+1 − ai ) (cp+1 − ap+1 ) p−1 Y (di+1 − ai ) (di − ai ) i=p+2 i=1 ≥ s Y (di − ai ). i=p+2 i=1 Therefore the inequality of Eq. (3.6) is equivalent to s Y s k+2 X X (di − ai ) − k − a1 − ai i=2 i=k+3 ! dk+3 · · · ds , and this inequality follows at once from Proposition 3.13 by making m = s − 1, ei = di+1 for i = 1, . . . , m, bi = ai for P 1 ≤ i ≤ p − 1, Psbp = ap+1 + cp , bi = ai+1 for p < i ≤ m, and m b0 = ap − cp + 1. Notice that i=0 bi = 1 + i=1 ai . Subcase (ii.2): Assume ap < cp , ap+1 ≥ cp+1 . By Lemma 3.4 we get a deg(S/(in≺ (I), t )) = d2 · · · ds − (cp − ap ) p−1 Y (di+1 − ai ) (cp − ap ) p−1 Y (di+1 − ai ) (di − ai ) i=p+2 i=1 ≥ s Y (di − ai ). i=p+2 i=1 Therefore the inequality of Eq. (3.6) is equivalent to s Y s k+2 X X (di − ai ) − k − a1 − ai i=2 i=k+3 ! dk+3 · · · ds , and this inequality follows from Proposition 3.13 by making m = s−1, ei = di+1 for i = 1, . . . , m, bi = ai for 1P ≤ i ≤ p − 1, P bp = cp+1 + ap , bi = ai+1 for p < i ≤ m, and b0 = ap+1 − cp+1 + 1. m Notice that i=0 bi = 1 + si=1 ai . Subcase (ii.3): Assume ap < cp , ap+1 ≤ cp+1 − 1. By Lemma 3.4 we get a deg(S/(in≺ (I), t )) = d2 · · · ds − (dp+1 − ap − ap+1 ) p−1 Y i=1 (di+1 − ai ) s Y (di − ai ). i=p+2 COMPLETE INTERSECTIONS 13 Therefore the inequality of Eq. (3.6) is equivalent to (dp+1 − ap − ap+1 ) p−1 Y (di+1 − ai ) i=1 ≥ s Y (di − ai ) i=p+2 s k+2 X X (di − ai ) − k − a1 − ai i=2 i=k+3 ! dk+3 · · · ds , and this inequality follows from Proposition 3.13 by making m = s−1, ei = di+1 for i = 1, . . . , m, bi = ai forP1 ≤ i ≤ p − P 1, bp = ap + ap+1 , bi = ai+1 for p < i ≤ m, and b0 = 1. Notice that in s this case m b = 1 +  i i=0 i=1 ai . 4. Applications and examples This section is devoted to give some applications and examples of our main result. As the two most important applications to algebraic coding theory, we recover the formula for the minimum distance of an affine cartesian code [14, 21], and the fact that the homogenization of the corresponding vanishing ideal is a Geil–Carvalho ideal [5]. We begin with a basic application for complete intersections in P1 . Corollary 4.1. If X is a finite subset of P1 and I(X) is a complete intersection, then  |X| − d if 1 ≤ d ≤ |X| − 2, δI(X) (d) = fpI(X) (d) = 1 if d ≥ |X| − 1. Proof. Let f be the generator of I(X). In this case d2 = deg(f ) = |X| and reg(S/I(X)) = |X|− 1. By Proposition 2.5 and Theorem 3.14 one has δX (d) = δI(X) (d) ≥ fpI(X) (d) = |X| − d for 1 ≤ d ≤ |X| − 2, and δX (d) = 1 for d ≥ |X| − 1. Assume that 1 ≤ d ≤ |X| − 2. Pick [P1 ], . . . , [Pd ] points in P1 . By Lemma 2.7, the vanishing ideal I[Pi ] of [Pi ] is a principal ideal generated by a linear form hi . Notice that VX (hi ), the zero-set of hi in X, is equal to {[Pi ]}. Setting h = h1 · · · hd , we get a homogeneous polynomial of degree d with exactly d zeros. Thus δX (d) ≤ |X| − d.  As another application we get the following uniform upper bound for the number of zeroes of all polynomials f ∈ Sd that do not vanish at all points of X. Corollary 4.2. Let X be a finite subset of Ps−1 , let I(X) be its vanishing ideal, and let ≺ be a monomial order. If the initial ideal in≺ (I(X)) is a complete intersection generated by tα2 , . . . , tαs , with di = deg(tαi ) and 1 ≤ di ≤ di+1 for i ≥ 2, then (4.1) |VX (f )| ≤ deg(S/I(X)) − (dk+2 − ℓ) dk+3 · · · ds , for any f ∈ SdPthat does not vanish at all point of X, where 0 ≤ k ≤ s − 2 and ℓ are integers such that d = k+1 i=2 (di − 1) + ℓ and 1 ≤ ℓ ≤ dk+2 − 1. Proof. It follows from Corollary 2.6, Eq. (2.2), and Theorem 3.14.  We leave as an open question whether this uniform bound is optimal, that is, whether the equality is attained for some polynomial f . Another open question is whether Corollary 4.2 is true if we only assume that I(X) is a complete intersection. This is related to the following conjecture of Tohǎneanu and Van Tuyl. 14 JOSÉ MARTÍNEZ-BERNAL, YURIKO PITONES, AND RAFAEL H. VILLARREAL Conjecture 4.3. [33, Conjecture 4.9] Let X be a finite set of points in Ps−1 . If I(X) is a complete intersection generated by f1 , . . . , fs−1 , with ei = deg(fi ) for i = 1, . . . , s − 1, and 2 ≤ ei ≤ ei+1 for all i, then δX (1) ≥ (e1 − 1)e2 · · · es−1 . Notice that by Corollary 4.2 this conjecture is true if in≺ (I(X)) is a complete intersection, and it is also true for s = 2 (see Corollary 4.1). Affine cartesian codes and coverings by hyperplanes. Given a collection of finite subsets A2 , . . . , As of a field K, we denote the image of X ∗ = A2 × · · · × As under the map As−1 7→ Ps−1 , x 7→ [(1, x)], by X = [1 × A2 × · · · × As ]. The affine Reed-Mullertype code CX∗ (d) of degree d is called an affine cartesian code [21]. The basic parameters of the projective Reed-Muller-type code CX (d) are equal to those of CX∗ (d) [22]. A formula for the minimum distance of an affine cartesian code is given in [21, Theorem 3.8] and in [14, Proposition 5]. A short and elegant proof of this formula was given by Carvalho in [5, Proposition 2.3], where he shows that the best way to study the minimum distance of an affine cartesian code is by using the footprint. As an application of Theorem 3.14 we also recover the formula for the minimum distance of an affine cartesian code by examining the underlying vanishing ideal and show that this ideal is Geil–Carvalho. Corollary 4.4. [5, 14, 21] Let K be a field and let CX (d) be the projective Reed-Muller type code of degree d on the finite set X = [1 × A2 × · · · × As ] ⊂ Ps−1 . If 1 ≤ di ≤ di+1 for i ≥ 2, with di = |Ai |, and d ≥ 1, then the minimum distance of CX (d) is given by  s P   (dk+2 − ℓ) dk+3 · · · ds if d ≤ (di − 1) − 1,  i=2 δX (d) = s P   1 if d ≥ (di − 1) ,  i=2 and I(X) is Geil–Carvalho, that is, δI(X) (d) = fpI(X) (d) for d ≥ 1, where k ≥ 0, ℓ are the unique P integers such that d = k+1 i=2 (di − 1) + ℓ and 1 ≤ ℓ ≤ dk+2 − 1. Proof.QLet ≻ be the reverse lexicographical order on S with t2 ≻ · · · ≻ ts ≻ t1 . Setting fi = γ∈Ai (ti − γt1 ) for i = 2, . . . , s, one has that f2 , . . . , fs is a Gröbner basis of I(X) whose initial ideal is generated by td22 , . . . , tds s (see [21, Proposition 2.5]). By Theorem 2.6 one has the equality δX (d) = δI(X) (d) for d ≥ 1. Thus the inequality “≥” follows at once from Theorem 3.14. This is the difficult part of the proof. The rest of the argument reduces to finding an appropriate polynomial f where equality occurs, and to using that the minimum distance δX (d) is 1 for d greater than or equal to reg(S/I(X)). P We set r = si=2 (di − 1). By Propositions 2.5 and 3.12, the regularity and the degree of S/I(X) are r and |X| = d2 · · · ds , respectively. Assume that d < r. To show the inequality “≤” notice that there is a polynomial f ∈ Sd which is a product of linear forms such that |VX (f )|, the number of zeros of f in X, is equal to d2 · · · ds − (dk+2 − ℓ)dk+3 · · · ds , see [21, p. 15]. Hence δX (d) is less than or equal to (dk+2 − ℓ)dk+3 · · · ds . Thus the required equality holds. If d ≥ r, by Proposition 2.5, δX (d) = 1 for d ≥ r. Therefore, by Theorem 3.14, I(X) is Geil–Carvalho.  COMPLETE INTERSECTIONS 15 The next result is an extension of a result of Alon and Füredi [1, Theorem 1] that can be applied to any finite subset of a projective space whose vanishing ideal has a complete intersection initial ideal relative to a graded monomial order. Corollary 4.5. Let X be a finite subset of a projective space Ps−1 and let ≺ be a monomial order such that in≺ (I(X)) is a complete intersection generated by tα2 , . . . , tαs , with di = deg(tαi ) and 1 ≤ di ≤ di+1 for all i. If the hyperplanes H1 , . . . , Hd in Ps−1 avoid P a point [P ] in X but otherwise cover all the other |X| − 1 points of X, then d ≥ reg(S/I(X)) = si=2 (di − 1). Proof. LetPh1 , . . . , hd be the linear forms in S1 that define H1 , . . . , Hd , respectively. Assume that d < si=2 (di − 1). Consider the polynomial h = h1 · · · hd . Notice that h ∈ / I(X) because h(P ) 6= 0, and h(Q) = 0 for all [Q] ∈ X with [Q] 6= [P ]. By Theorem 3.14, δX (d) ≥ fpI(X) (d) ≥ 2. Hence, h does not vanish in at least two points of X, a contradiction.  Example 4.6. Let S be the polynomial ring F3 [t1 , t4 , t3 , t2 ] with the lexicographical order t1 ≺ t4 ≺ t3 ≺ t2 , and let I = I(X) be the vanishing ideal of X = {[(1, 0, 0, 0)], [(1, 1, 1, 0)], [(1, −1, −1, 0)], [(1, 1, 0, 1)], [(1, −1, 1, 1)], [(1, 0, −1, 1)], [(1, −1, 0, −1)], [(1, 0, 1, −1)], [(1, 1, −1, −1)]}. Using the procedure below in Macaulay2 [17] and Theorem 3.14, we obtain the following information. The ideal I(X) is generated by t2 − t3 − t4 , t33 − t3 t21 , and t34 − t4 t21 . The regularity and the degree of S/I(X) are 4 and 9, respectively, and I(X) is a Geil–Carvalho ideal whose initial ideal is a complete intersection generated by t2 , t33 , t34 . The basic parameters of the ReedMuller-type code CX (d) are shown in the following table. d |X| HX (d) δX (d) fpI(X) (d) 1 9 3 6 6 2 9 6 3 3 3 9 8 2 2 4 9 9 1 1 By Corollary 4.5, if the hyperplanes H1 , . . . , Hd in P3 avoid a point [P ] in X but otherwise cover all the other |X| − 1 points of X, then d ≥ reg(S/I(X)) = 4. S=ZZ/3[t2,t3,t4,t1,MonomialOrder=>Lex]; I1=ideal(t2,t3,t4),I2=ideal(t4,t3-t1,t2-t1),I3=ideal(t4,t1+t3,t2+t1) I4=ideal(t4-t1,t4-t2,t3),I5=ideal(t4-t1,t3-t1,t2+t1),I6=ideal(t2,t1-t4,t3+t1) I7=ideal(t3,t1+t4,t1+t2),I8=ideal(t2,t4+t1,t3-t1),I9=ideal(t1+t4,t3+t1,t2-t1) I=intersect(I1,I2,I3,I4,I5,I6,I7,I8,I9) M=coker gens gb I, regularity M, degree M h=(d)->degree M - max apply(apply(apply(apply (toList (set(0..q-1))^**(hilbertFunction(d,M))-(set{0})^**(hilbertFunction(d,M)), toList),x->basis(d,M)*vector x),z->ideal(flatten entries z)), x-> if not quotient(I,x)==I then degree ideal(I,x) else 0)--this --gives the minimum distance in degree d apply(1..3,h) Example 4.7. Let S be the polynomial ring S = F3 [t1 , t2 , t3 ] with the lexicographical order t1 ≻ t2 ≻ t3 , and let I = I(X) be the vanishing ideal of X = {[(1, 1, 0)], [(1, −1, 0)], [(1, 0, 1)], [(1, 0, −1)], [(1, −1, −1)], [(1, 1, 1)]}. 16 JOSÉ MARTÍNEZ-BERNAL, YURIKO PITONES, AND RAFAEL H. VILLARREAL As in Example 4.6, using Macaulay2 [17], we get that I(X) is generated by t22 t3 − t2 t23 , t21 − t22 + t2 t3 − t23 . The regularity and the degree of S/I(X) are 3 and 6, respectively, I is a Geil–Carvalho ideal, and in≺ (I) is a complete intersection generated by t22 t3 and t21 . The basic parameters of the Reed-Muller-type code CX (d) are shown in the following table. d |X| HX (d) δX (d) fpI(X) (d) 1 6 3 3 3 2 6 5 2 2 3 6 6 1 1 By Corollary 4.5, if the hyperplanes H1 , . . . , Hd in P2 avoid a point [P ] in X but otherwise cover all the other |X| − 1 points of X, then d ≥ reg(S/I(X)) = 3. Next we give an example of a graded vanishing ideal over a finite field, which is not Geil– Carvalho, by computing all possible initial ideals. Example 4.8. Let X = P2 be the projective space over the field F2 and let I = I(X) be the vanishing ideal of X. Using the procedure below in Macaulay2 [17] we get that the binomials t1 t22 −t21 t2 , t1 t23 −t21 t3 , t2 t23 −t22 t3 form a universal Gröbner basis of I, that is, they form a Gröbner basis for any monomial order. The ideal I has exactly six different initial ideals and δX 6= fpI for each of them, that is, I is not a Geil–Carvalho ideal. The basic parameters of the projective Reed-Muller code CX (d) are shown in the following table. d |X| HX (d) δX (d) fpI(X) (d) 1 7 3 4 4 2 7 6 2 1 3 7 7 1 1 load "gfaninterface.m2" S=ZZ/2[symbol t1, symbol t2, symbol t3] I=ideal(t1*t2^2-t1^2*t2,t1*t3^2-t1^2*t3,t2*t3^2-t2^2*t3) universalGroebnerBasis(I) (InL,L)= gfan I, #InL init=ideal(InL_0) M=coker gens gb init f=(x)-> if not quotient(init,x)==init then degree ideal(init,x) else 0 fp=(d) ->degree M -max apply(flatten entries basis(d,M),f) apply(1..regularity(M),fp) Acknowledgments. We thank the referee for a careful reading of the paper and for the improvements suggested. References [1] N. Alon and Z. Füredi, Covering the cube by affine hyperplanes, European J. Combin. 14 (1993), 79–83. [2] M. F. Atiyah and I. G. Macdonald, Introduction to Commutative Algebra, Addison-Wesley, Reading, MA, 1969. COMPLETE INTERSECTIONS 17 [3] A. Bishnoi, P. L. Clark, A. Potukuchi and J. R. Schmitt, On zeros of a polynomial in a finite grid, Combin. Probab. Comput., to appear. [4] A. Bishnoi, P. L. Clark, A. Potukuchi and J. R. Schmitt, On the Alon-Füredi bound, Electron. Notes Discrete Math. 54 (2016), 57–62. [5] C. Carvalho, On the second Hamming weight of some Reed-Muller type codes, Finite Fields Appl. 24 (2013), 88–94. [6] M. Chardin and G. Moreno-Socı́as, Regularity of lex-segment ideals: some closed formulas and applications, Proc. Amer. Math. Soc. 131 (2003), no. 4, 1093–1102 (electronic). [7] CoCoATeam, CoCoA: a system for doing Computations in Commutative Algebra. Available at http://cocoa.dima.unige.it. [8] D. Cox, J. Little and D. O’Shea, Ideals, Varieties, and Algorithms, Springer-Verlag, 1992. [9] P. Delsarte, J. M. Goethals and F. J. MacWilliams, On generalized Reed-Muller codes and their relatives, Information and Control 16 (1970), 403–442. [10] I. M. Duursma, C. Renterı́a and H. Tapia-Recillas, Reed-Muller codes on complete intersections, Appl. Algebra Engrg. Comm. Comput. 11 (2001), no. 6, 455–462. [11] D. Eisenbud, Commutative Algebra with a view toward Algebraic Geometry, Graduate Texts in Mathematics 150, Springer-Verlag, 1995. [12] W. Fulton, Algebraic curves, Advanced Book Classics, Addison-Wesley Publishing Company, Advanced Book Program, Redwood City, CA, 1989, An introduction to algebraic geometry, Notes written with the collaboration of Richard Weiss, Reprint of 1969 original. [13] O. Geil, On the second weight of generalized Reed-Muller codes, Des. Codes Cryptogr. 48 (2008), 323–330. [14] O. Geil and C. Thomsen, Weighted Reed–Muller codes revisited, Des. Codes Cryptogr. 66 (2013), 195–220. [15] L. Gold, J. Little and H. Schenck, Cayley-Bacharach and evaluation codes on complete intersections, J. Pure Appl. Algebra 196 (2005), no. 1, 91–99. [16] M. González-Sarabia, C. Renterı́a and H. Tapia-Recillas, Reed-Muller-type codes over the Segre variety, Finite Fields Appl. 8 (2002), no. 4, 511–518. [17] D. Grayson and M. Stillman, Macaulay2, 1996. Available via anonymous ftp from math.uiuc.edu. [18] G. M. Greuel and G. Pfister, A Singular Introduction to Commutative Algebra, 2nd extended edition, Springer, Berlin, 2008. [19] J. Harris, Algebraic Geometry. A first course, Graduate Texts in Mathematics 133, Springer-Verlag, New York, 1992. [20] M. Kreuzer and L. Robbiano, Computational Commutative Algebra 2, Springer-Verlag, Berlin, 2005. [21] H. H. López, C. Renterı́a and R. H. Villarreal, Affine cartesian codes, Des. Codes Cryptogr. 71 (2014), no. 1, 5–19. [22] H. H. López, E. Sarmiento, M. Vaz Pinto and R. H. Villarreal, Parameterized affine codes, Studia Sci. Math. Hungar. 49 (2012), no. 3, 406–418. [23] F. J. MacWilliams and N. J. A. Sloane, The Theory of Error-correcting Codes, North-Holland, 1977. [24] J. Martı́nez-Bernal, Y. Pitones and R. H. Villarreal, Minimum distance functions of graded ideals and ReedMuller-type codes, J. Pure Appl. Algebra 221 (2017), 251–275. [25] J. C. Migliore, Introduction to liaison theory and Deficiency Modules, Progress in Mathematics 165, Birkhäuser Boston, Inc., Boston, MA, 1998. [26] C. Renterı́a, A. Simis and R. H. Villarreal, Algebraic methods for parameterized codes and invariants of vanishing ideals over finite fields, Finite Fields Appl. 17 (2011), no. 1, 81–104. [27] SAGE Mathematical Software, http://www.sagemath.org. [28] M. Sala, T. Mora, L. Perret, S. Sakata and C. Traverso (eds.), Gröbner Bases, Coding, and Cryptography, RISC Book Series, Springer, Heidelberg, 2009. [29] E. Sarmiento, M. Vaz Pinto and R. H. Villarreal, The minimum distance of parameterized codes on projective tori, Appl. Algebra Engrg. Comm. Comput. 22 (2011), no. 4, 249–264. [30] W. M. Schmidt, Equations over finite fields, An elementary approach, Lecture Notes in Mathematics 536, Springer-Verlag, Berlin-New York, 1976. [31] A. Sørensen, Projective Reed-Muller codes, IEEE Trans. Inform. Theory 37 (1991), no. 6, 1567–1576. [32] R. Stanley, Hilbert functions of graded algebras, Adv. Math. 28 (1978), 57–83. [33] S. Tohǎneanu and A. Van Tuyl, Bounding invariants of fat points using a coding theory construction, J. Pure Appl. Algebra 217 (2013), no. 2, 269–279. [34] M. Tsfasman, S. Vladut and D. Nogin, Algebraic geometric codes: basic notions, Mathematical Surveys and Monographs 139, American Mathematical Society, Providence, RI, 2007. 18 JOSÉ MARTÍNEZ-BERNAL, YURIKO PITONES, AND RAFAEL H. VILLARREAL [35] R. H. Villarreal, Monomial Algebras, Second Edition, Monographs and Research Notes in Mathematics, Chapman and Hall/CRC, 2015. [36] W. Vogel, Lectures on results on Bezout’s theorem, Tata Institute of Fundamental Research Lectures on Mathematics and Physics 74, Springer-Verlag, Berlin, 1984. Departamento de Matemáticas, Centro de Investigación y de Estudios Avanzados del IPN, Apartado Postal 14–740, 07000 Mexico City, D.F. E-mail address: [email protected] Departamento de Matemáticas, Centro de Investigación y de Estudios Avanzados del IPN, Apartado Postal 14–740, 07000 Mexico City, D.F. E-mail address: [email protected] Departamento de Matemáticas, Centro de Investigación y de Estudios Avanzados del IPN, Apartado Postal 14–740, 07000 Mexico City, D.F. E-mail address: [email protected]
0math.AC
Logical Methods in Computer Science Vol. 9(3:20)2013, pp. 1–19 www.lmcs-online.org Submitted Published Mar. 16, 2013 Sep. 17, 2013 INDUCTION IN ALGEBRA: A FIRST CASE STUDY ∗ PETER SCHUSTER Pure Mathematics, University of Leeds, Leeds LS2 9JT, England e-mail address: [email protected] Abstract. Many a concrete theorem of abstract algebra admits a short and elegant proof by contradiction but with Zorn’s Lemma (ZL). A few of these theorems have recently turned out to follow in a direct and elementary way from the Principle of Open Induction distinguished by Raoult. The ideal objects characteristic of any invocation of ZL are eliminated, and it is made possible to pass from classical to intuitionistic logic. If the theorem has finite input data, then a finite partial order carries the required instance of induction, which thus is constructively provable. A typical example is the well-known theorem “every nonconstant coefficient of an invertible polynomial is nilpotent”. 1. Introduction Many a concrete theorem of abstract algebra admits a short and elegant proof by contradiction but with Zorn’s Lemma (ZL). A few of these theorems have recently turned out to follow in a direct and elementary way from the Principle of Open Induction (OI) distinguished by Raoult [42]. A proof of the latter kind may be extracted from a proof of the former sort. If the theorem has finite input data, then a finite partial order carries the required instance of induction, which thus is provable by mathematical induction—or, if the size of the data is fixed, by fully first-order methods. But what is Open Induction? In a nutshell, OI is transfinite induction for subsets of a directed-complete partial order that are open with respect to the Scott topology. While OI was established [42] as a consequence of ZL, by complementation these two principles are actually equivalent [21] with classical logic but in a natural way. Hence OI is the fragment of transfinite induction of which the corresponding minimum principle just is ZL. Our approach is intended as a contribution to a partial realisation in algebra [13] of the revised Hilbert Programme à la Kreisel and Feferman (see [17] for a recent account including references), and was motivated by related work in infinite combinatorics [8, 11, 14, 42] as well as by the methods of dynamical algebra [16, 39, 51] and formal topology [30, 44, 46]. In Hilbert’s terminology, the “ideal objects” characteristic of any invocation of ZL are eliminated by passing to OI, and it is made possible to work with “finite methods” only, e.g. to pass from classical to intuitionistic logic. 2012 ACM CCS: [Theory of computation]: Logic—Proof theory / Constructive mathematics. Key words and phrases: constructive algebra; Hilbert’s Programme; intuitionistic logic; open induction; Zorn’s Lemma. ∗ This is a revised and extended journal version of the author’s LICS 2012 conference paper [48]. l LOGICAL METHODS IN COMPUTER SCIENCE c DOI:10.2168/LMCS-9(3:20)2013 CC P. Schuster Creative Commons 2 P. SCHUSTER A typical example, studied before [41, 43] and taken up in this paper, is the well-known theorem “every nonconstant coefficient of an invertible polynomial is nilpotent”. More formally, this can be put as f g = 1 → ∃e (ue = 0) (1.1) where f and g are polynomials with coefficients in an arbitrary commutative ring m n X X bj T j ai T i , g = f= i=0 i=0 and u = ai0 where 1 ≤ i0 ≤ n. The customary short and elegant proof of (1.1) works by reduction to the case of polynomials over an integral domain fg = 1 → u = 0 or, equivalently, by reduction modulo any prime ideal P of the given ring: f g = 1 → ∀P (u ∈ P ) . (1.2) ∀P (u ∈ P ) → ∃e (ue = 0) . (1.3) This special case is readily settled by looking at the degrees, or more explicitly by a polynomial trick due to Gauß [15, 29]. In order to reduce (1.1) to (1.2), it is natural to invoke But the latter, a variant of Krull’s Lemma, is normally deduced from ZL by a proof by contradiction, which is anything but an argument using only finite methods. In addition, a universal quantification over prime ideals P occurs, which are ideal objects (see e.g. [17]). These foundational issues aside, there is a practical problem. By decomposing (1.1) into (1.2) and (1.3) one virtually loses the computational information the hypothesis of (1.1) is made of; in particular [41, 43] the proof falls short of being an algorithm for computing an exponent e under which the nilpotent u vanishes. However, we can still extract a proof that is based on induction over a finite partial order; and the proof tree one can grow alongside the induction encodes an algorithm which computes the desired exponent. That our method does work may seem less surprising if one takes into account that the theorem has already seen constructive proofs before [41, 43], and that an entirely down-toearth proof is possible anyway [4, Chapter 1, Exercise 2]. Needless to say, each of those proofs embodies an algorithm; one of them [41] has even been partially implemented in Agda, a proof assistant based on Martin–Löf type theory. Just as the proof in [41], our constructive proof is gained from a given classical one, the one by reduction to the case of integral domains we have mentioned above. As compared with [41], we keep somewhat closer to the classical proof. The price we have to pay is that we have to suppose certain decidability hypotheses, which need to—and can—be eliminated afterwards by a variant of the Gödel–Gentzen and Dragalin–Friedman translations. In [41] a simpler instance of this elimination method is built directly into the proof. To be slightly more specific, we we first turn the indirect proof of (1.3) with ZL into a direct deduction from OI; and then transform the latter into a constructive proof of (1.1) by induction over a finite poset. This is possible because the hypothesis of (1.1)—unlike the one of (1.3)—consists of computationally relevant information about a finite amount of elementary data: of nothing but the finitely many equations a0 b0 = 1, a0 b1 + a1 b0 = 0 , . . . , an bm = 0 . Heuristics aside, all this makes redundant the reduction, and the prime ideals disappear. INDUCTION IN ALGEBRA: A FIRST CASE STUDY 3 1.1. Preliminaries. 1.1.1. Foundations. The overall framework of this note is constructive algebra à la Kronecker and Bishop [31, 35]. Due to the corresponding choice of intuitionistic logic, one or the other assumption needs to be made explicit that would be automatic in classical algebra, by which we mean algebra as carried out within ZFC set theory and thus, in particular, with classical logic. For example, we say that an assertion A is decidable whenever A ∨ ¬A holds; and that a subset S of a set T is detachable if t ∈ S is decidable for each t ∈ T . As moreover the principle of countable choice will not occur, let alone the one of dependent choice, our constructive reasoning can be carried out within (a suitable elementary fragment of) the Constructive Zermelo–Fraenkel Set Theory CZF which Aczel [1, 2, 3] has interpreted within Martin-Löf’s [34] Intuitionistic Theory of Types. Unlike Friedman’s [19] impredicative Intuitionistic Zermelo–Fraenkel Set Theory IZF, this CZF does not contain the axiom of power set. Hence in CZF an unrestricted quantification over subsets—such as the one crucial for this paper, over all prime ideals of an arbitrary ring—in general is a quantification over the members of a class. 1.1.2. Rings. Throughout this paper, R will denote a commutative ring (with unit). We briefly recall some related concepts [4]. An ideal of R is a subset I that contains 0, is closed under addition, and satisfies s ∈ I → rs ∈ I for all r, s ∈ R. We write (S) for the ideal generated by a subset S of R: that is, (S) consists of the linear combinations r1 s1 + . . . + rn sn of elements s1 , . . . , sn of S with coefficients r1 , . . . , rn from R. A radical ideal of R is an ideal I such that for all r ∈ R. The radical r2 ∈ I → r ∈ I √ I = {r ∈ R : ∃e ∈ N (r e ∈ I)} √ of an√ideal I is a radical √ ideal with I ⊆ I. An ideal I is a radical ideal if and only if I = I. The radical 0 of the zero ideal 0 = {0} is the nilradical, and its elements are the nilpotents. An ideal P is a prime ideal if 1 ∈ / P and ab ∈ P → a ∈ P ∨ b ∈ P (1.4) ab = 0 → a = 0 ∨ b = 0 (1.5) for all a, b ∈ R. Clearly, every prime ideal is a radical ideal. A ring R is an integral domain—for short, a domain—if 1 6= 0 in R and for all a, b ∈ R. A quotient ring R/P is a domain if and only if P is a prime ideal. 4 P. SCHUSTER 1.1.3. Induction. Let (X, ≤) be a partial order. We do not specify from the outset whether X is a set in the sense of CZF, which in the case of our definite interest will anyway be the case, but during heuristics will depend on the choice of a more generous set theory such as IZF. Unless specified otherwise every quantification over the variables x, x′ , y, and z is understood as over the elements of the partial order X under consideration. Let U be a predicate on X. We say that U is progressive if ∀x (∀y > x U (y) → U (x)), (1.6) where y > x is understood as the conjunction of y ≥ x and y 6= x. About the antecedent of (1.6), note that y > x is used rather than y < x, as is common in other contexts; our choice allows us to avoid reversing the naturally given order (i.e., inclusion) later on. Also, in the relevant instantiations below, the predicate U will define—and be identified with—a subset of the set X; and ≤ will be a decidable relation (that is, for all x, y ∈ X, the assertion x ≤ y is decidable). By induction for U and X we mean the following: If U is progressive, then ∀x U (x). Classically, induction holds for every U precisely when X is well-founded in the sense that every inhabited predicate on X has a maximal element—or, in classically equivalent terms, that there is no strictly increasing sequence in X. We will use induction in cases in which X has a least element ⊥, in which U (⊥) is equivalent to ∀x U (x) whenever U is monotone: that is, if x ≤ y, then U (x) implies U (y). Note finally that if U is progressive, then U is satisfied by every maximal element of X, and thus by the greatest element ⊤ of X whenever this exists. 2. Noetherian Rings As a warm-up we first revisit the perhaps historically first—albeit implicit—occurrence of induction in algebra: Krull’s proof [27, pp. 8–9] of the Lasker–Noether decomposition theorem for Noetherian rings. According to one of the constructively meaningful variants of this concept [23], a ring is Noetherian if induction holds for the partial order consisting of the finitely generated ideals, which by the way is a set in CZF. We now prove, using this instance of induction, the following corollary of the Lasker–Noether Theorem: √ LN: The radical I of every finitely generated ideal I of a commutative Noetherian ring is the intersection of finitely many finitely generated prime ideals. Constructive proofs given before [39] with related notions of “Noetherian” have motivated our choice of this example; see also [40]. Before proving LN we recall a well-known fact (see e.g. the proof of [4, Proposition 1.8]), which however will be crucial for a large part of this paper. Lemma 2.1. Let R be a commutative ring. If I is an ideal of R, and a, b ∈ R, then √ √ √ I + Ra ∩ I + Rb = I + Rab. √ √ Proof. Since ⊇ is clear, we only verify ⊆. Let x ∈ I + Ra and x ∈ I + Rb, which is to say that xk = u + sa and xℓ = v + tb where k, ℓ ∈ N, u, v ∈ I, and s, t ∈ R. Then xk xℓ = uv {z + sav} +st ab | + utb ∈I and thus xk+ℓ ∈ I + Rab as required. INDUCTION IN ALGEBRA: A FIRST CASE STUDY 5 In addition to this, and the aforementioned instance of induction, we need to employ a distinction-by-cases that is known as Strong Primality Test (SPT) [39]. This says that for every finitely generated ideal I of R one of the following three conditions is fulfilled: (i) I = R, which is to say that 1 ∈ I; (ii) for all a, b ∈ R, if ab ∈ I, then either a ∈ I or b ∈ I; (iii) there are a, b ∈ R for which ab ∈ I but neither a ∈ I nor b ∈ I. In other words, the SPT tells us whether I is a prime ideal; and moreover if the answer is in the negative, then the SPT provides us with witnesses for this fact. Clearly SPT is classically valid, but it also holds constructively whenever R is a fully Lasker–Noether ring [39]. √ To prove LN by induction, consider “ I is the intersection of finitely many prime ideals” as a predicate U of the finitely generated ideals I of R. To show that U is progressive, let I be a finitely√generated ideal of R. If I = R, then clearly U (I); if I is a prime ideal, then in particular I = I, and thus U (I). If however a, b ∈ R are as in case (iii) of SPT, then I $ I + Ra and I $ I + Rb but I = I + Rab; whence U (I + Ra) and U (I + Rb) hold by induction, and U (I) follows with Lemma 2.1 at hand. This proof of LN can be carried over in a relatively easy way to the full Lasker–Noether theorem, and as such can be viewed as an “unwinding” not only of Krull’s proof, but also of the better-explicated proofs given in [4, 37]. We refrain from doing this transfer to the full theorem, for no further insight into the method would be gained. 3. Some Induction Principles When does induction hold more in general, regardless of the specific partial order under consideration? A fairly general induction principle has been coined by Raoult [42] as W follows. A partial order X is chain-complete if every chain Y in X has a least upper bound Y ∈ X. A predicate U on X is open in the lower topology if, for every chain Y in X, _ U ( Y ) → ∃x ∈ Y U (x). W (Think of the elements x of Y as of “neighbourhoods” of the “limit” Y of Y .) Now Raoult’s Open Induction (OI) is induction for chain-complete X and open U . It is easy to see [42] that OI follows classically from Zorn’s Lemma (ZL), and thus holds in ZFC; moreover OI and ZL are classically equivalent [21], by complementation. Open Induction implies Well-Founded Induction (WI) which is induction for wellfounded X and arbitrary U .1 In fact, if X is well-founded, then every chain in X has a greatest element; whence X is chain-complete, and every U is open. Unlike OI, WI is provable in ZF, but most partial orders that are classically well-founded lack this property from a constructive perspective. For the notion of a Noetherian ring one can, as we have recalled above, circumvent this problem by simply defining a commutative ring to be Noetherian if one can perform induction on the finitely generated ideals [23]. We say that a partial order X is finite if X has finitely many elements (that is, X = {x1 , . . . , xn } for some n ≥ 0, which includes the case n = 0 of X = ∅), and if, in addition, 1This principle is also known as Noetherian Induction and, in the case of a well-ordered X, as Transfinite Induction; see e.g. [10, p. 21]. 6 P. SCHUSTER ≤ is a decidable relation. In this case, X is a discrete set, which is to say that equality = is decidable;2 whence so is < too. Classically, every finite X is well-founded; whence WI implies Finite Induction (FI): that is, induction for finite X and for arbitrary U . Unlike WI, this FI is even constructively provable, as in CZF, by means of mathematical induction. To see this note first that if X is finite, then one can exhibit a maximal element x of X, for which U (x) anyway. In fact, if X has only finitely many elements, then ¬∀x∃y (x < y), which is to say that ∃x¬∃y (x < y) if, in addition, ≤ is decidable. 4. A Proof Pattern In all cases considered later in this paper, X consists in certain ideals of a commutative ring, with the partial order given by inclusion, for which ∧ simply is ∩. Following the terminology which is standard for this special case, we also say for a general partial order X that x ∈ X is reducible if there are y, z ∈ X such that x < y, x < z, and x = y ∧ z. Here x = y ∧ z is to be understood as that x is the greatest lower bound of y and z: that is, ∀x′ (x′ ≤ x ←→ x′ ≤ y ∧ x′ ≤ z). In the following, let again U be a predicate on a partial order X. We say that U is good if, for every x ∈ X, either U (x) or x is reducible. Also, we say that U is meet-closed whenever if x = y ∧ z in X, then U (x) follows from U (y) ∧ U (z). Lemma 4.1. Let U be a predicate on a partial order X. If U is meet-closed and good, then U is progressive. All this allows us to state a proof pattern that has been prompted by [20]: Theorem 4.2. Assume that induction holds for U and X. If U is meet-closed and good, then ∀x U (x). We will next look into applications of this proof pattern. 5. Krull’s Lemma with Open Induction Let R again be a commutative ring. For heuristic purposes we first look at the contrapositive of a variant of Krull’s Lemma: √ KL: If r ∈ P for all prime ideals P of R, then r ∈ 0. As is well known (see, for example, the proof of [4, Proposition 1.8]), with ZL at hand one can give a proof by contradiction of KL: if r e 6= 0 for all e ∈ N, which is to say that 0 ∈ /S for the multiplicative set S = {r e : e ∈ N}, then by ZL there is a prime ideal P of R with P ∩ S = ∅ and, in particular, r ∈ / P . If R is Noetherian in the sense of [23], then KL is an instance of LN, which we have already reproved by induction, without any talk of ZL. For an arbitrary ring R, KL can be deduced from OI in a direct way, by Theorem 4.2 and as follows. As OI requires a chain-complete X, this time we have √ to let X consist of all the radical ideals of R. This X actually is a frame with ⊥ = 0 and ⊤ = R, and a 2For any such X, in particular, there is no need to distinguish between “X is finite” and “X is finitely enumerable”, as is customary in constructive mathematics: these two variants of the notion of a finite set coincide in the case of a discrete set [35, p. 11]. INDUCTION IN ALGEBRA: A FIRST CASE STUDY 7 set in IZF. Accordingly, we need a strong primality test for arbitrary (radical) ideals, but remember that we are still doing heuristics. √ Now, let r ∈ P for all prime ideals P of R. To prove r ∈ 0 we define the predicate U on X by U (F ) ≡ r ∈ F whenever F ∈ X, for which clearly U (⊤). Further, U is meet-closed and monotone. In particular, √ to show that U (F ) holds for all F ∈ X is tantamount to showing that U (⊥), i.e. r ∈ 0, which is exactly what √ we are after. To see that U is good, let F ∈ X: that is, F = I for some ideal I of R. If F = R, then trivially U (F ); if F is a prime ideal, then U (F ) by hypothesis; √ if however there√are a, b ∈ R such that ab ∈ F but neither a ∈ F nor b ∈ F , then F $ I + Ra and F $ I + Rb but √ I + Rab = F ; whence F is reducible by Lemma 2.1. In all, Theorem 4.2 applies. 6. Nilpotent Coefficients with Finite Induction We now can proceed to our principal example. Once more let R be a commutative ring, which we now suppose to be a set in CZF. Recall that r ∈ R is said to be a unit or invertible if there is s ∈ R such that rs = 1. As usual let R[T ] stand for the ring of polynomials with P indeterminate T and coefficients from R. Pick an arbitrary f ∈ R[T ] and write it as f = ni=0 ai T i . We consider the following statement about nilpotent coefficients: √ NC: If f is a unit of R[T ], then ai ∈ 0 for i > 0. This is well-known, and can be put as or equivalently as ∃g ∈ R[T ] (f g = 1) → ∀i ∈ {1, . . . , n}∃e ∈ N (aei = 0) ∀g ∈ R[T ] ∀i ∈ {1, . . . , n} (f g = 1 → ∃e ∈ N (aei = 0) ) . Pick g ∈ R[T ] and i0 ∈ {1, . . . , n}, and set u = ai0 . Hence the essence of NC is f g = 1 → ∃e ∈ N (ue = 0) . Write f , g as f= n X i ai T , fg = n+m X bj T j . i=0 i=0 Since then g= m X ck T k , k=0 ck = X ai bj , i+j=k the hypothesis f g = 1 can be expressed as c0 = 1 ∧ c1 = 0 ∧ . . . ∧ cn+m = 0 (6.1) a0 b0 = 1 ∧ a0 b1 + a1 b0 = 0 ∧ . . . ∧ an bm = 0 . (6.2) or even more explicitly as In particular f g = 1 is a finite conjunction of atomic formulas of the language of rings. By swapping f and g one could also take u from the b1 , . . . , bm rather than from the a1 , . . . , an . We do not follow this option, but note for later use that under the hypothesis f g = 1 we have ∀i > 0 (ai ∈ F ) ↔ ∀j > 0 (bj ∈ F ) (6.3) 8 P. SCHUSTER for every ideal F of R; in the particular case F = 0 this means ∀i > 0 (ai = 0) ↔ ∀j > 0 (bj = 0) . (6.4) As for (6.3), let i ∈ {1, . . . , n}. If bj ∈ F for all j ∈ {1, . . . , min{i, m}}, then F ∋ ci = a0 bi + . . . + ai−1 b1 +ai b0 {z } | ∈F by (6.1) and thus ai b0 ∈ F , from which we get ai ∈ F because a0 b0 = 1 by (6.2). A similar argument deals with the converse implication in (6.3). As Richman has observed [43], the statement NC above . . . admits an elegant proof upon observing that each ai with i ≥ 1 must be in every prime ideal of R, and that the intersection of the prime ideals of R consists of the nilpotent elements of R. This proof gives no clue as to how to calculate n such that ani = 0, while such a calculation can be extracted from the proof that we present. Richman’s fairly short proof [43] is in fact a clever “nontrivial use of trivial rings”, and of course is fully constructive. The elementary character of NC anyway suggests an equally elementary proof, by mathematical induction, as indicated in [4, Chapter 1, Exercise 2]. Just as for the approach [41] via point-free topology, the point of our subsequent considerations is that we “unwind” the classical proof that Richman has rightly deemed “elegant”, and thus get a constructive one from which the required exponent can equally be extracted. 6.1. A Classical Proof with Krull’s Lemma. We next review the “elegant” proof of NC which works by reduction to the case of a domain. Since in a domain every nilpotent is zero, NC for domains reads as NCint : Let R be a domain. If f is a unit of R[T ], then ai = 0 for i > 0. With the notation from before, the essence of NCint is fg = 1 → u = 0 . A quick proof goes as follows. Let R be a domain. Then the degree of non-zero polynomials (remember that we are in a classical setting) satisfies deg (f g) = deg (f ) + deg (g) . (6.5) Now if f g = 1, then deg (f g) = 0 in view of (6.1) and of 1 6= 0 (recall that R is a domain); whence deg (f ) = 0 and thus in particular u = 0 as required. Note that the special case deg (f g) = 0 → deg (f ) = 0 (6.6) of (6.5) is sufficient for proving NCint . Alternatively one can prove NCint by means of a trick that has been ascribed to Gauß [15, 29], and which is nothing but an explicit version of (6.6). To this end let again R be a domain, and suppose that f g = 1. Now assume towards a contradiction that ai 6= 0 for some i > 0; whence by (6.4) also bj 6= 0 for some j > 0. Pick i, j both maximal with these properties, for which X X a p bq (6.7) 0 = ci+j = ap bq +ai bj + q>j p>i | {z } | {z } =0 =0 and thus ai bj = 0; whence either ai = 0 or bj = 0, a contradiction. INDUCTION IN ALGEBRA: A FIRST CASE STUDY 9 Following a time-honoured tradition, the case of NC for an arbitrary ring R is handled by working modulo a generic prime ideal P of R, for which the quotient ring R/P is indeed a domain. Hence if P is a prime ideal, then we can apply NCint with R/P in place of R. This yields that for all prime ideals P of R we have u = 0 in R/P , which is to say that u ∈ P . In all, u is nilpotent by KL, which we have deduced from OI before. 6.2. Discussion and Outline. In the classical proof above one first aims at the implication f g = 1 → ∀P (u ∈ P ) , and then combines it with the appropriate instance of KL: ∀P (u ∈ P ) → ∃e (ue = 0) . The corresponding invocation of ZL or OI aside, there is another foundational problem with this classical proof: it rests upon a universal quantification over all the prime ideals of R, which are ideal objects in Hilbert’s sense. This is reflected by the practical problem that the computational information of f g = 1 is virtually lost when passing to ∀P (u ∈ P ). However, in the given situation one can do better. Before following our own route, we briefly sketch the dual of the translation [41] of the “elegant” proof into point-free terms.3 The key move is to rewrite the classical proof by reduction to R/P where P is any prime ideal, by replacing every occurrence of x ∈ P by one of D (x) = 0. Here one considers the bounded distributive lattice [25]—see also, for instance, [6, 24]—that is generated by the symbolic expressions D (x) indexed by the x ∈ R and subject to the relations D(1) = 1 , D(xy) = D(x) ∧ D(y) , D(0) = 0 , D(x + y) ≤ D(x) ∨ D(y) , which are dual to the characteristic properties of a prime ideal P : 1 6∈ P , xy ∈ P ↔ x ∈ P ∨ b ∈ P , 0∈ P , x∈P ∧y ∈P →x+y ∈P . Having shown by rewriting that D (u) = 0, the key observation is that one can realise this lattice by definining D (x1 ) ∨ . . . ∨ D (xn ) as the radical of the ideal generated √ by x1 , . . . , xn . In particular the least√ element 0 of the lattice is turned into the nilradical 0, and D (u) = 0 is interpreted as u ∈ 0. The resulting proof [41] is fully constructive, and works without any of the decidability assumptions we will have to make—and to eliminate eventually by a combination of the Gödel–Gentzen and Dragalin–Friedman proof translations. In [41] only the essence of this elimination method occurs, already within the proof and at a lower level. In our own constructive proof of NC we still follow the lines along which we have deduced KL from OI, but since the hypothesis of NC is computationally more informative than the one of KL, we can get by with much less: with FI in place of OI. For short, we pass from the top to the bottom side of the following square: OI → KL ↓ ↓ FI → NC Yet we have to make a move that in the first place may seem nonconstructive: as we had to assume (a variant of) SPT before, we now employ another type of a classically valid distinction-by-cases, which has occurred in constructive and computable algebra [31, 35, 49]. 3This has kindly been pointed out to us by one of the anonymous referees. 10 P. SCHUSTER However, as we have hinted at above and will sketch below (Section 6.4.7), this use of fragments of the Law of Excluded Middle can be eliminated by proof theory. 6.3. Constructive Proofs by Induction. 6.3.1. With the Proof Pattern. To deduce NC from FI, let X be the partial order that consists of the radical ideals of the ideals generated by some of the√nonconstant coefficients of f and g. In other words, an element F of X is of the form F = I where I = (D) is the ideal generated by a detachable subset D of the set E of the nonconstant coefficients of f and g: that is, E = {a1 , . . . , an , b1 , . . . , bm }. p √ This X, ordered by inclusion, possesses ⊥ = 0 and ⊤ = (E), corresponding to D = ∅ and D = E. We assume that r ∈ F is decidable for all r ∈ E and F ∈ X;√whence √ in particular the partial order X is finite in the sense coined before (recall that I ⊆ J if √ and only if I ⊆ J). Now define the predicate U on X by U (F ) ≡ u ∈ F . Both X and U are sets in CZF. Again U (⊤), and U is meet-closed and monotone. Once more our goal is to show U (⊥), and to apply the proof pattern from Theorem 4.2 we prove that U is good. Let F ∈ X. By our decidability assumption we can distinguish the following two cases. Case 1. If ai ∈ F for all i > 0, then u ∈ F and thus U (F ). Case 2. If ai ∈ / F for some i > 0, then by (6.3) also bj ∈ / F for some j > 0. In this case—following Gauß’s trick again—we pick i, j that are maximal of this kind, for which (where in each sum p + q = i + j) X X ap bq (6.8) F ∋ ci+j = ap bq +ai bj + q>j p>i | {z } | {z } ∈F ∈F and thus ai bj ∈ F . Pretty much as√in the deduction of KL from OI, one can now see that F is reducible. In detail, let F = I where I = (D) for a detachable subset D of E, and set p p (6.9) G = I + Rai , H = I + Rbj , for which G, H √ ∈ X, and F $ G and F $ H according to the particular choice of i and j. √ Moreover, F = F since F is a radical ideal; and F = G ∩ H by Lemma 2.1 and because ai bj ∈ F . Hence F = G ∩ H is the required decomposition of F . 6.3.2. An Alternative Proof. We now give an alternative deduction of NC from FI in which the exponents are moved from X to U . This allows for a conceptually simpler X, and for a better understanding of the corresponding tree and algorithm (see below). However we can no longer follow the proof pattern encapsulated in Theorem 4.2, because Lemma 2.1 fails once the radicals are removed. The modified predicate can still be proved to be progressive, and induction is possible. Here let X be the partial order that consists of all the ideals generated by some of the nonconstant coefficients of f and g: that is, an element of X is of the form I = (D) where INDUCTION IN ALGEBRA: A FIRST CASE STUDY 11 D is a detachable subset of E as before. Again, X has finitely many elements, and we may assume that ⊆ is a decidable relation on X, which is to say that ∀r ∈ E ∀F ∈ X (r ∈ F ∨ r ∈ / F) . (6.10) In all, X ordered by inclusion is a finite partial order. Now we define the predicate U on X in a slightly different way by U (I) ≡ ∃e ∈ N (ue ∈ I) . Once more both X and U are sets in CZF, and U is monotone. To prove U (0) by induction, or equivalently that U (I) for all I ∈ X, let I ∈ X. As before yet with I in place of F , we distinguish two cases. Case 1. If ai ∈ I for all i > 0, then u ∈ I, and e = 1 witnesses U (I). Case 2. If ai ∈ / I for some i > 0, then by (6.3) also bj ∈ / I for some j > 0. Pick i, j that are maximal of this kind. As before, still with I in place of F , one can show that ai bj ∈ I. Set K = I + Rai , L = I + Rbj (6.11) Now K, L ∈ X, and I $ K and I $ L. By induction, U (K) and U (L): that is, there are k, ℓ ∈ N such that uk ∈ K and uℓ ∈ L. Hence uk uℓ ∈ I + Rai bj (see the proof of Lemma 2.1), and thus uk+ℓ ∈ I because ai bj ∈ I; so e = k + ℓ witnesses U (I). 6.4. Tree and Algorithm. 6.4.1. Growing a Tree. It is well-known how a tree can be grown along a proof by induction. We next instantiate this method for the preceding proof, the notations and hypotheses of which we adopt. In parallel to creating the nodes, we label them by elements of X. To start the construction, we label the root by 0. If a node N labelled by I ∈ X has just been constructed, then we proceed according to the distinction-by-cases made during the proof, as follows: Case 1. Declare N to be a leaf. Case 2. Endow N with two children labelled by K and L as in (6.11). We thus get a full binary tree: every node either is a leaf or else is a parent with exactly two children. Moreover the labelling is strictly increasing: if a parent is labelled by I, and any one of its children by J, then I $ J. In particular, the tree is finite. By construction, the label I of a node N satisfies U whenever either N is a leaf or else N is a parent both children of which have labels satisfying U . In fact, in Case 1 we have U (I) anyway; in Case 2 if U (K) and U (L), then U (I) as shown in the proof. Climbing down from the leaves to the root—that is, doing induction on the height of a node, i.e. its distance from the nearest leaf—one can thus show U (I) for every I that occurs as the label of a node. In particular, the label 0 of the root satisfies U : that is, U (I) for all I ∈ X. 12 P. SCHUSTER 6.4.2. About Size. To get an idea of the size of the tree we review its construction in terms of the generators of the labels. First, the label 0 of the root is generated by the empty set ∅. Secondly, the label of a child is obtained by adding a single element to the generators of the label I of the parent: an element ai of {a1 , . . . , an } \ I for the one child and an element bj of {b1 , . . . , bm } \ I for the other child, where both i and j are maximal among the remaining indices. Thirdly, a node is a leaf whenever either all the a1 , . . . , an or equivalently all the b1 , . . . , bm belong to the generators of the label. This said, what are the extremal lengths of the paths from the root to the leaves? The height of the tree, i.e. the length of the longest path, is at most n + m − 1. In fact, the longest paths have to be taken whenever for the choice of new generators one keeps switching between the a1 , . . . , an and the b1 , . . . , bm . This is the case, for example, if one adds first an , secondly bm , thirdly an−1 , next bm−1 , and so on. From the root this requires adding all the a2 , . . . , an and all the b2 , . . . , bm , and thus possibly n − 1+ m − 1 nodes, before one arrives at a leaf by eventually adding either a1 or b1 . However there are shorter paths, which have length ≤ min{n, m}: the path along which only the a1 , . . . , an (respectively, only the b1 , . . . , bm ) are successively added to the generators has length ≤ n (respectively, length ≤ m). Even shorter paths are possible whenever the a1 , . . . , an and b1 , . . . , bm fulfil additional conditions; some of these coefficients may indeed be equal or otherwise related in an appropriate way. In general however the tree is uniform in the given data. We henceforth assume the generic situation in which the a0 , . . . , an and b0 , . . . , bm do not satisfy any further algebraic dependence relation apart from (6.2), and accordingly can be seen as indeterminate coefficients [31, p. 82] only subject to (6.2). 6.4.3. Removing Redundancy. The tree is repetitive inasmuch as some subtrees occur several times. To remove this redundancy, one can identify all subtrees of the same form, and rearrange the arrows accordingly. One thus transforms the tree into a simple acyclic digraph with the source and the sinks coming from the root and the leaves, respectively: 0 ↓ (an ) ↓ .. . → → (bm ) ↓ (an , bm ) ↓ .. . → ... → → ... → (b2 , . . . , bm ) ↓ (an , b2 , . . . , bm ) ↓ .. . → (b1 , . . . , bm ) → (an , b1 , . . . , bm ) .. . ↓ ↓ ↓ (a2 , . . . , an ) → (a2 , . . . , an , bm ) → . . . → (a2 , . . . , an , b2 , . . . , bm ) → (a2 , . . . , an , b1 , . . . , bm ) ↓ ↓ ↓ (a1 , . . . , an ) (a1 , . . . , an , bm ) ... (a1 , . . . , an , b2 , . . . , bm ) While the only source is in the top left corner, the n + m sinks form the rightmost column and the bottom row. There are nm + n + m vertices; and if we removed the sinks, then we would get a square grid graph with n rows and m columns. 6.4.4. Computing Witnesses. In the foregoing we have proved constructively, with FI, that ue = 0 for some e ∈ N. Hence the tree grown alongside the induction encodes an algorithm to compute a witness for this existential statement: that is, an exponent e under which ue = 0. This algorithm terminates since, as we have observed before, the tree is finite. INDUCTION IN ALGEBRA: A FIRST CASE STUDY 13 Proof, tree, and algorithm are furthermore independent of the choice of u among the a1 , . . . , an ; and thus only depend on n and m. In fact the e produced by the algorithm works for each of the u from the a1 , . . . , an , though—as in the example below—a smaller exponent may suffice for some. One could also have shortened proof, tree, and algorithm by stopping already when the given u belongs to the ideal I under consideration; for the sake of uniformity we have disregarded this option. We now look back to see where the exponents come from and how they grow during the course of the algorithm.4 For any node N labelled by I ∈ X, we say that e witnesses U (I) whenever ue ∈ I. If N is a leaf (Case 1), then 1 witnesses U (I). If N is a parent (Case 2) labelled by I, with children labelled by K and L, and k and ℓ witness U (K) and U (L), respectively, then k + ℓ witnesses U (I), as we see from the proof. Hence U (0) is witnessed by the number of leaves, which in turn is bounded by 2n+m−1 (recall that the height of the tree is at most n + m − 1). To get a sharper bound, one may switch to the digraph, this time labelled by the exponents and with reversed arrows: .. .. .. . ↑ 1 ··· .. . ← ↑ 1 . ← ↑ 4 ↑ 1 ← . ← ↑ ... ← 1 .. . .. . ← 1 ↑ 4 ↑ ← 1 6 ↑ ← 3 ↑ ← 1 3 ↑ 1 ← 2 ↑ 1 ← 1 This in fact is a finite fragment of Pascal’s triangle; whence standard theory can be used to calculate the number in the top left corner: that is, the e under which ue = 0. Note in this context that the construction of the tree and thus the design of the algorithm are not affected by the relations expressing the hypothesis f g = 1. This information is only used for proving that the algorithm meets its specification: that is, ue = 0 whenever e is the exponent present at the root. More specifically, (6.1) and (6.2) are invoked for proving (6.3) and (6.8), and thus for proving that in Case 2 above the certificate for e witnessing U (I) is bestowed from the children to the parent. 6.4.5. A Concrete Example. Let n = 2 and m = 1, and set G = (b1 ) , F = (a2 ) , L = (a2 , b1 ) , K = (a1 , a2 ) . The digraphs labelled by finitely generated ideals and exponents are as follows: 0 → F → K ↓ ↓ G L 3 ← 2 ← 1 ↑ ↑ 1 1 4The author is indebted to Ulrich Berger for prompting these investigations. 14 P. SCHUSTER In particular, e = 3 is the output exponent under which ue = 0 for any choice of u. Now, for the sake of simplicity, assume that a0 = 1 and b0 = 1. Apart from a0 b0 = 1, which in this case is trivial, (6.2) then contains the following information: a 1 + b1 = 0 , a 1 b1 + a 2 = 0 , With these equations at hand, the certificates for {K, L, F, G, 0} are achieved as follows: Case u = a1 . a1 ∈ K a1 = −b1 ∈ L a21 = −a1 b1 = a2 ∈ F a1 = −b1 ∈ G a31 = a21 a1 = −a2 b1 = 0 ue a 2 b1 = 0 . ∈ I where u ∈ {a1 , a2 } and I ∈ Case u = a2 . a2 ∈ K a2 ∈ L a2 ∈ F a2 = −a1 b1 ∈ G a22 = −a2 a1 b1 = 0 Note that e = 2 suffices for u = a2 , whereas e = 3 is required for u = a1 . Finally, let R = Z/(8), and set a1 = 2, a2 = 4, b1 = 6. In this case, f = 4T 2 + 2T + 1 , g = 6T + 1 , for which indeed, as we are doing integer arithmetic modulo 8, f g = 24T 3 + 16T 2 + 8T + 1 = 1 . Here e = 2 suffices for u = a2 = 4, whereas e = 3 is required for u = a1 = 2. 6.4.6. A Representation. For any implementation on a computer, a more concrete representation of the elements of X may be required: that is, of the ideals generated by a detachable subset of E. Especially in view of the independence assumption made above, a natural choice is to represent any element I of X by a pair (λ, µ) of increasing binary lists λ = (λ1 . . . λn ) and µ = (µ1 . . . µm ) of length n and m. Here λi = 1 and µj = 1 indicate that ai and bj , respectively, belong to the generators of I. The inclusion order on X is then represented by the pointwise order of binary sequences. With this representation at hand the tree can be described as follows. The root is labelled by (0n , 0m ). A generic node is labelled by (0k 1ℓ , 0p 1q ) where k+ℓ = n and p+q = m; and has two children with labels (0k−1 1ℓ+1 , 0p 1q ) and (0k 1ℓ , 0p−1 1q+1 ), unless either k = n or ℓ = m, in which case this node is a leaf. If we write 0 and 1 for finite lists 0 . . . 0 and 1 . . . 1, respectively, of variable but appropriate lengths, then the corresponding digraph is as follows: (0, 0) → (0, 01) → . . . → (0, 01) → (0, 1) ↓ ↓ ↓ (01, 0) → (01, 01) → . . . → (01, 01) → (01, 1) ↓ ↓ ↓ .. .. .. .. . . . . ↓ ↓ ↓ (01, 0) → (01, 01) → . . . → (01, 01) → (01, 1) ↓ ↓ ↓ (1, 01) ... (1, 01) (1, 0) INDUCTION IN ALGEBRA: A FIRST CASE STUDY 15 6.4.7. Elimination of Decidability. We roughly sketch, as promised before, how we can eliminate the classically valid decidability assumptions, such as (6.10), used in the constructive proofs. Those assumptions form a finite set ∆ of instances of the Law of Excluded Middle. Let Γ consist of the finitely many equations listed in (6.2); and let ⊢i and ⊢c stand for deducibility with intuitionistic and classical logic, respectively. If we neglect technical details, then with our constructive proof above—of NC with FI—we have established Γ, ∆ ⊢i C where C ≡ ∃e (ue = 0) . Since, clearly, ⊢c ∆, we thus have Γ ⊢c C. Now, since both C and the elements of Γ are of a sufficiently simple logical form, e.g. geometric formulas, by proof–theoretic techniques such as syntactic versions of Barr’s Theorem—see e.g. [22, 36, 38]—we arrive at Γ ⊢i C. The logical form of the formulas in ∆ is irrelevant for this argument; and a similar method [50] applies if C is seen as an infinite disjunction rather than as an existential formula. One possible road from Γ ⊢c C to Γ ⊢i C is via the generalisation (see e.g. [22, 38]) of the Gödel–Gentzen negative translation for which, in the spirit of the Dragalin–Friedman A–translation, the falsum ⊥ is replaced by an arbitrary formula A. This A typically is the conclusion of the deduction under consideration.5 In particular, one sets ⊥A ≡ A, and an atomic formula B 6≡ ⊥ is assigned to B A ≡ (B → A) → A ; the existential quantifier moreover is translated as follows:  (∃x B)A ≡ ∀x B A → A → A . Hence if B 6≡ ⊥ is atomic, then and thus  ⊢i B A → A ↔ (B → A) ⊢i (∃x B)A ↔ (∃xB → A) → A (6.12) provided that the variable x does not occur freely within the formula A. With this translation, and for Γ and C as above, one can prove that Γ ⊢c C implies ΓA ⊢i C A . In view of the simple form of the elements of Γ, we further have Γ ⊢i ΓA . Hence Γ ⊢c C implies Γ ⊢i C A , which in the specific case A ≡ C yields Γ ⊢i C. In fact, we have ⊢i C C ↔ (C → C) → C by (6.12), and thus ⊢i C C ↔ C. 7. Conclusion Our choices of the partial orders X and the predicates U were crucial to make induction work. In particular, the objects X from the constructive proofs are finite partial orders, as required for FI, and, by the way, are sets in the sense of CZF. Moreover, we thus have eventually kept close to the data of the given problem: that is, the coefficients ai and bj of the polynomials f and g. We could have done so much earlier, and perhaps more efficiently: by the method of indeterminate coefficients [31, p. 82]. This would have meant to pass from the arbitrary given R to the ring R0 = Z[a0 , . . . , an , b0 , . . . , bm ]/(a0 b0 − 1, a0 b1 + a1 b0 , . . . , an bm ) . 5Thierry Coquand has kindly pointed us toward this method. As we have learned from Christoph-Simon Senjak, the proof translation at use is related—via the Curry-Howard isomorphism—to the continuationpassing style in programming. 16 P. SCHUSTER with generators a0 , . . . , an , b0 , . . . , bm and relations (6.2). This R0 indeed encodes all the data and information we would have needed for phrasing and proving NC. For its simple structure, moreover, R0 is Noetherian [23]; and SPT holds constructively for R0 since this is a fully Lasker–Noether ring [39]. Hence LN for R0 is constructively provable [39], and KL for R0 follows without any talk of OI, let alone of ZL. The universal quantification required for KL, over all possible prime ideals of R, could then be replaced by the more manageable one over the finitely many finitely generated prime ideals of R0 as produced by LN. Modulo each of the latter prime ideals we could have followed Gauß’s argument for the case of a domain, yet replacing—as we have done anyway—the proof by contradiction by an appropriate distinction-by-cases. In all, we would have got a perfectly constructive proof of NC. This avenue, however, might not have forced us to seek an invocation of FI, and thus to keep close to the given data. In particular, we would not have made explicit a tree and an algorithm as simple as they have resulted from the constructive proofs with FI. With hindsight, the proof pattern coined with Theorem 4.2, including the crucial notion of reducibility, stands already behind many a post-war textbook proof of the Lasker–Noether theorem [4, 37], and more implicitly behind Krull’s proof [27]. It is not yet clear however whether any constructive “unwinding” of this type of classical proof can be brought under that pattern. We have anyway seen how the pattern can be applied to NC, a lemma in polynomial algebra, and yet another application of the pattern has proved possible in the area of inversion problems for Banach algebras [20]. A further case study will be undertaken about Gauß’s lemma “the product of two primitive polynomials is primitive”, which leads over its generalisation, ascribed to Joyal, to the so-called Dedekind Prague Theorem [5, 15, 29, 12]. We have conceived the constructive proofs of NC along the lines of the classical proof with Gauß’s trick that we have recalled earlier. In particular, (6.3) and (6.8) are nothing but (6.4) and (6.7), respectively, with “= 0” replaced by “∈ F ”. Now if “= 0” is considered within a domain, as in the classical proof, then it actually corresponds to “∈ P ” where P is a prime ideal of an arbitrary ring. Hence the move from “= 0” to “∈ F ” is in accordance with a paradigm that goes back to the so-called D5 philosophy of dynamic evaluation in computer algebra [18]: to handle the prime ideals P by way of their incomplete specifications F [16, 28, 29], which are (radicals of) finitely generated ideals but not necessarily prime. In all, we have carried out a case study for a further potentially systematic way to gain finite methods from ideal objects in algebra. As discussed above (Section 6.2), our main competitor [41] has studied the same case but with a different method taken from point-free topology. We thus have started yet another attempt to make constructive sense of the notion of prime ideals, which “. . . play a central role in the theory of commutative rings” [26, p. 1]. In constructive algebra the notion of prime ideals has seen a revival [9] after it was considered problematic in general: “If an ideal P in a commutative ring is not detachable, it is is not clear just what it should mean for P to be prime” [35, p. 77]. Our work may further give evidence for the practicability of the recent proposals of a controlled use of ideal objects in constructive mathematics [45, 47] on the basis of a twolevel foundations with forget-restore option [33, 32]. Last but not least, we have put some mathematical flesh on Bell’s conjecture that ZL is “constructively neutral” [7]. INDUCTION IN ALGEBRA: A FIRST CASE STUDY 17 Acknowledgements Useful hints came from many participants of the 2011 Oberwolfach Workshop on Proof Theory and Constructive Mathematics, such as Ulrich Berger, Thierry Coquand, Erik Palmgren, and Per Martin-Löf. The author is further grateful to many others—especially to Martin Hofmann, Henri Lombardi, Davide Rinaldi, Pedro Francisco Valencia Vizcaı́no, and Olov Wilander—for stimulating discussions; to Jean-Claude Raoult, Bernhard Reus, and Fred Richman for commenting on draft versions; to the anonymous referees for their constructive critique; and last but not least to Matthew Hendlass, who first asked for a proof pattern. This paper was first written during a fellowship at the Isaac Newton Institute for Mathematical Sciences, programme “Semantics and Syntax: A Legacy of Alan Turing”. It was revised later during a visit to the University of Stockholm funded by the European Science Foundation Research Networking Programme “New frontiers of infinity: mathematical, philosophical, and computational prospects”; and during a visit to Swansea University with a Computer Science Small Grant of the London Mathematical Society. This line of research was started when the author had a Feodor Lynen Research Fellowship for Experienced Researchers granted by the Alexander von Humboldt Foundation from sources of the German Bundesministerium für Bildung und Forschung; and when he was a visiting professor supported by a grant from the Italian Istituto Nazionale di Alta Matematica—Gruppo Nazionale per le Strutture Algebriche, Geometriche e le loro Applicazioni. The author is particularly grateful to Andrea Cantini, Giovanni Sambin, and various colleagues at Padua and Florence for their most welcoming hospitality. References [1] Peter Aczel. The type theoretic interpretation of constructive set theory. In Logic Colloquium ’77 (Proc. Conf., Wroclaw, 1977), volume 96 of Stud. Logic Foundations Math., pages 55–66. North-Holland, Amsterdam, 1978. [2] Peter Aczel. The type theoretic interpretation of constructive set theory: choice principles. In The L. E. J. Brouwer Centenary Symposium (Noordwijkerhout, 1981), volume 110 of Stud. Logic Found. Math., pages 1–40. North-Holland, Amsterdam, 1982. [3] Peter Aczel. The type theoretic interpretation of constructive set theory: inductive definitions. In Logic, methodology and philosophy of science, VII (Salzburg, 1983), volume 114 of Stud. Logic Found. Math., pages 17–49. North-Holland, Amsterdam, 1986. [4] Michael F. Atiyah and Ian G. Macdonald. Introduction to Commutative Algebra. Addison-Wesley Publishing Co., 1969. [5] B. Banaschewski and J. J. C. Vermeulen. Polynomials and radical ideals. J. Pure Appl. Algebra, 113(3):219–227, 1996. [6] Bernhard Banaschewski. Radical ideals and coherent frames. Comment. Math. Univ. Carolin., 37(2):349–370, 1996. [7] John L. Bell. Zorn’s lemma and complete Boolean algebras in intuitionistic type theories. J. Symbolic Logic, 62(4):1265–1279, 1997. [8] Ulrich Berger. A computational interpretation of open induction. In F. Titsworth, editor, Proceedings of the Ninetenth Annual IEEE Symposium on Logic in Computer Science, pages 326–334. IEEE Computer Society, 2004. [9] Douglas S. Bridges. Prime and maximal ideals in constructive ring theory. Commun. Algebra, 29:2787– 2803, 2001. [10] Paul M. Cohn. Universal Algebra. Harper & Row Publishers, New York, 1965. [11] Thierry Coquand. Constructive topology and combinatorics. In Constructivity in computer science (San Antonio, TX, 1991), volume 613 of Lecture Notes in Comput. Sci., pages 159–164. Springer, Berlin, 1992. [12] Thierry Coquand. Space of valuations. Ann. Pure Appl. Logic, 157:97–109, 2009. 18 P. SCHUSTER [13] Thierry Coquand and Henri Lombardi. A logical approach to abstract algebra. Math. Struct. in Comput. Science, 16:885–900, 2006. [14] Thierry Coquand and Henrik Persson. Gröbner bases in type theory. In Types for proofs and programs (Irsee, 1998), volume 1657 of Lecture Notes in Comput. Sci., pages 33–46. Springer, Berlin, 1999. [15] Thierry Coquand and Henrik Persson. Valuations and Dedekind’s Prague theorem. J. Pure Appl. Algebra, 155(2–3):121–129, 2001. [16] Michel Coste, Henri Lombardi, and Marie-Françoise Roy. Dynamical method in algebra: Effective Nullstellensätze. Ann. Pure Appl. Logic, 111(3):203–256, 2001. [17] Laura Crosilla and Peter Schuster. Finite Methods in Mathematical Practice. In G. Link and M. Detlefsen, editors, Formalism and Beyond, Mathematical Logic. Ontos, Heusenstamm, 201x. [18] Jean Della Dora, Claire Dicrescenzo, and Dominique Duval. About a new method for computing in algebraic number fields. In European Conference on Computer Algebra (2), pages 289–290, 1985. [19] Harvey Friedman. Set theoretic foundations for constructive analysis. Ann. of Math. (2), 105(1):1–28, 1977. [20] Matthew Hendtlass and Peter Schuster. A direct proof of Wiener’s theorem. In S. B. Cooper, A. Dawar, and B. Löwe, editors, How the World Computes. Turing Centenary Conference and Eighth Conference on Computability in Europe, volume 7318 of Lect. Notes Comput. Sci., pages 294–303, Berlin and Heidelberg, 2012. Springer. Proceedings, CiE 2012, Cambridge, UK, June 2012. [21] Simon Huber and Peter Schuster. Maximalprinzipien und Induktionsbeweise. Technical report, University of Leeds, 2013. In preparation. [22] Hajime Ishihara. A note on the Gödel-Gentzen translation. MLQ Math. Log. Q., 46(1):135–137, 2000. [23] Carl Jacobsson and Clas Löfwall. Standard bases for general coefficient rings and a new constructive proof of Hilbert’s basis theorem. J. Symb. Comput., 12(3):337–372, 1991. [24] Peter T. Johnstone. Stone Spaces. Number 3 in Cambridge Studies in Advanced Mathematics. Cambridge etc.: Cambridge University Press, 1982. [25] André Joyal. Les théoremes de Chevalley-Tarski et remarques sur l’algèbre constructive. Cah. Topol. Géom. Différ. Catég., 16:256–258, 1976. [26] Irving Kaplansky. Commutative Rings. The University of Chicago Press, Chicago and London, 1974. Revised edition. [27] Wolfgang Krull. Idealtheorie. Ergebnisse der Mathematik und ihrer Grenzgebiete, vol. 4, no. 3. Springer, Berlin, 1935. [28] Henri Lombardi. Dimension de Krull, Nullstellensätze et évaluation dynamique. Math. Zeitschrift, 242:23–46, 2002. [29] Henri Lombardi. Hidden constructions in abstract algebra. I. Integral dependance. J. Pure Appl. Algebra, 167:259–267, 2002. [30] Henri Lombardi. Algèbre dynamique, espaces topologiques sans points et programme de Hilbert. Ann. Pure Appl. Logic, 137:256–290, 2006. [31] Henri Lombardi and Claude Quitté. Algèbre commutative. Méthodes constructives. Modules projectifs de type fini. Calvage & Mounet, Paris, 2012. [32] Maria Emilia Maietti. A minimalist two-level foundation for constructive mathematics. Ann. Pure Appl. Logic, 160(3):319–354, 2009. [33] Maria Emilia Maietti and Giovanni Sambin. Toward a minimalist foundation for constructive mathematics. In L. Crosilla and P. Schuster, editors, From Sets and Types to Topology and Analysis, volume 48 of Oxford Logic Guides, pages 91–114. Oxford: Oxford University Press, 2005. [34] Per Martin-Löf. Intuitionistic type theory, volume 1 of Studies in Proof Theory. Lecture Notes. Bibliopolis, Naples, 1984. Notes by Giovanni Sambin. [35] Ray Mines, Fred Richman, and Wim Ruitenburg. A Course in Constructive Algebra. Springer, New York, 1988. Universitext. [36] Sara Negri. Contraction-free sequent calculi for geometric theories with an application to Barr’s theorem. Arch. Math. Logic, 42(4):389–401, 2003. [37] Douglas G. Northcott. Ideal Theory. Cambridge University Press, 1953. [38] Erik Palmgren. An intuitionistic axiomatisation of real closed fields. MLQ Math. Log. Q., 48(2):297–299, 2002. [39] Hervé Perdry. Strongly Noetherian rings and constructive ideal theory. J. Symb. Comput., 37(4):511– 535, 2004. INDUCTION IN ALGEBRA: A FIRST CASE STUDY 19 [40] Hervé Perdry and Peter Schuster. Noetherian orders. Math. Structures Comput. Sci., 21:111–124, 2011. [41] Henrik Persson. An application of the constructive spectrum of a ring. In Type Theory and the Integrated Logic of Programs. Chalmers University and University of Göteborg, 1999. PhD thesis. [42] Jean-Claude Raoult. Proving open properties by induction. Inform. Process. Lett., 29(1):19–23, 1988. [43] Fred Richman. Nontrivial uses of trivial rings. Proc. Amer. Math. Soc., 103(4):1012–1014, 1988. [44] Giovanni Sambin. Intuitionistic formal spaces—a first communication. In Mathematical Logic and its Applications, Proc. Adv. Internat. Summer School Conf., Druzhba, Bulgaria, 1986, pages 187–204. Plenum, 1987. [45] Giovanni Sambin. Steps towards a dynamic constructivism. In P. Gärdenfors et al., editor, In the Scope of Logic, Methodology and Philosophy of Science, volume 315 of Synthese Library, pages 263–286, Dordrecht, 2002. Kluwer. 11th International Congress of Logic, Methodology and Philosophy of Science. Krakow, Poland, August 1999. [46] Giovanni Sambin. Some points in formal topology. Theoret. Comput. Sci., 305(1-3):347–408, 2003. [47] Giovanni Sambin. Real and ideal in constructive mathematics. In Epistemology versus ontology, volume 27 of Log. Epistemol. Unity Sci., pages 69–85. Springer, Dordrecht, 2012. [48] Peter Schuster. Induction in algebra: a first case study. In 2012 27th Annual ACM/IEEE Symposium on Logic in Computer Science, pages 581–585. IEEE Computer Society Publications, 2012. Proceedings, LICS 2012, Dubrovnik, Croatia, June 2012. [49] Viggo Stoltenberg-Hansen and John V. Tucker. Computable rings and fields. In Handbook of computability theory, volume 140 of Stud. Logic Found. Math., pages 363–447. North-Holland, Amsterdam, 1999. [50] Pedro Francisco Valencia Vizcaı́no. Some Uses of Cut Elimination. Phd thesis, University of Leeds, 2013. [51] Ihsen Yengui. Making the use of maximal ideals constructive. Theoret. Comput. Sci., 392:174–178, 2008. This work is licensed under the Creative Commons Attribution-NoDerivs License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nd/2.0/ or send a letter to Creative Commons, 171 Second St, Suite 300, San Francisco, CA 94105, USA, or Eisenacher Strasse 2, 10777 Berlin, Germany
0math.AC
On Notions of Distortion and an Almost Minimum Spanning Tree with Constant Average Distortion arXiv:1609.08801v1 [cs.DS] 28 Sep 2016 Yair Bartal1 , Arnold Filtser2 , and Ofer Neiman2 1 2 School of Engineering and Computer Science, Hebrew University. Email: [email protected] Department of Computer Science, Ben-Gurion University of the Negev. Email: {arnoldf,neimano}@cs.bgu.ac.il Abstract Minimum Spanning Trees of weighted graphs are fundamental objects in numerous applications. In particular in distributed networks, the minimum spanning tree of the network is often used to route messages between network nodes. Unfortunately, while being most efficient in the total cost of connecting all nodes, minimum spanning trees fail miserably in the desired property of approximately preserving distances between pairs. While known lower bounds exclude the possibility of the worst case distortion of a tree being small, it was shown in [ABN15] that there exists a spanning tree with constant average distortion. Yet, the weight of such a tree may be significantly larger than that of the MST. In this paper, we show that any weighted undirected graph admits a spanning tree whose weight is at most (1 + ρ) times that of the MST, providing constant average distortion O(1/ρ). The constant average distortion bound is implied by a stronger property of scaling distortion, i.e., improved distortion for smaller fractions of the pairs. The result is achieved by first showing the existence of a low weight spanner with small prioritized distortion, a property allowing to prioritize the nodes whose associated distortions will be improved. We show that prioritized distortion is essentially equivalent to coarse scaling distortion via a general transformation, which has further implications and may be of independent interest. In particular, we obtain an embedding for arbitrary metrics into Euclidean space with optimal prioritized distortion. 1 Introduction One of the fundamental problems in graph theory is that of constructing a Minimum Spanning Tree (MST) of a given weighted graph G = (V, E). This problem and its variants received much attention, and has found numerous applications. In many of these applications, one may desire not only minimizing the weight of the spanning tree, but also other desirable properties, at the price of losing a small factor in the weight of the tree compared to that of the MST. Define the lightness of T to be the total weight of T (the sum of its edge weights) divided by the weight of an MST. One well known example is that of a Shallow Light Tree (SLT) [KRY93, ABP92], which is a rooted spanning tree having near optimal (1 + ρ) lightness, while approximately preserving all distances from the root to the other vertices. It is natural to ask that the spanning tree will preserve well all pairwise distances in the graph. However, it is easy to see that no spanning tree can maintain such a requirement. In particular, 1 even in the case of the unweighted cycle graph on n vertices, for every spanning tree there is a pair of neighboring vertices whose distance increases by a factor of n − 1. A natural relaxation of this demand is that the spanning tree approximates all pairwise distances on average. Formally, the distortion of the pair u, v ∈ V in T is defined as ddGT (u,v) (u,v) , and the average distortion is P dT (u,v) 1 , where dG (respectively dT ) is the shortest-path metric in G (resp. T ).1 In V (n2 ) {u,v}∈( 2 ) dG (u,v) [ABN15], it was shown that for every weighted graph, it is possible to find a spanning tree which has constant average distortion. In this paper, we devise a spanning tree of optimal (1 + ρ) lightness that has O(1/ρ) average distortion over all pairwise distances. We show that this result is tight by exhibiting a lower bound on the tradeoff between lightness and average distortion, that in order to get 1 + ρ lightness the average distortion must be Ω(1/ρ) (this holds even if the spanning subgraph is not necessarily a tree), and in particular, the average distortion for an MST is as bad as Ω(n). Our main result may be of interest for network applications. It is extremely common in the area of distributed computing that an MST is used for communication between the network nodes. This allows easy centralization of computing processes and an efficient way of broadcasting through the network, allowing communication to all nodes at a minimum cost. Yet, as already mentioned above, when communication is required between specific pairs of nodes, the cost of routing through the MST may be extremely high, even when their real distance is small. However, in practice it is the average distortion, rather than the worst-case distortion, that is often used as a practical measure of quality, as has been a major motivation behind the initial work of [KSW09, ABN11, ABN15]. As noted above, the MST still fails even in this relaxed measure. Our result overcomes this by promising small routing cost between nodes on average, while still possessing the low cost of broadcasting through the tree, thereby maintaining the standard advantages of the MST. Our main result on a low average distortion embedding follows from analyzing the scaling distortion of the embedding. This notion, first introduced in [KSW09]2 , requires that for every 0 < ǫ < 1, the distortion of all but an ǫ-fraction of the pairs is bounded by the appropriate function of ǫ. In [ABN11] it was shown that one may obtain bounds on the average distortion, as well as on higher moments of the distortion function, from bounds on the scaling distortion. Our √ scaling distortion bound for the constructed spanning tree is3 Õ(1/ ǫ)/ρ, which is nearly tight as a function of ǫ [ABN15]. We also obtain a probabilistic embedding devising a distribution over (light) spanning trees with polylog(1/ǫ)/ρ scaling distortion, thus providing constant bounds on all fixed moments of the distortion (i.e., the lq -distortion [ABN11] for fixed q). Our main technical contribution, en route to this result, may be of its own interest: We devise a spanner (a subgraph of G) with 1+ρ lightness and low prioritized distortion. This notion, introduced recently in [EFN15a], means that for every given ranking v1 , . . . , vn of the vertices of the graph, there is an embedding where the distortion of pairs including vj is bounded as a function of the rank j. Here we show a light spanner construction with prioritized distortion at most Õ(log j)/ρ. We then show a connection between the notions of prioritized distortion and scaling distortion (discussed further below), and use this to argue that our spanner has scaling distortion Õ(log(1/ǫ))/ρ, and thus average distortion O(1/ρ). Although we do not obtain a spanning tree here, this result has a few advantages, as we get constant bounds on all fixed moments of the distortion function (also 1 Distortion is sometimes referred to as stretch. Originally coined gracefully degrading embedding. 3 By Õ(f (n)) we mean O(f (n) · polylog(f (n))). 2 2 called the ℓq -distortion). Moreover, the worst-case distortion is only logarithmic in n. We note that all of our results admit deterministic polynomial time algorithms. Another technical contribution is a general, black-box reduction, that transform constructions of spanners with distortion t and lightness ℓ into spanners with distortion t/δ and lightness 1 + δℓ (here 0 < δ < 1). This reduction can be applied in numerous settings, and also for many different special families of graphs. In particular, this reduction allows us to construct prioritized spanners with lightness arbitrarily close to 1. Prioritized vs. Scaling Distortion As mentioned above, one of the ingredients of our work is a general reduction relating the notions of prioritized distortion and scaling distortion. In fact, we show that prioritized distortion is essentially equivalent to a strong version of scaling distortion called coarse scaling distortion, in which for every point, the 1 − ǫ fraction of the farthest points from it are preserved with the desired distortion. We prove that any embedding with a given prioritized distortion α has coarse scaling distortion bounded by O(α(8/ǫ)). This result could be of independent interest; in particular, it shows that the results of [EFN15a] on distance oracles and embeddings have their scaling distortion counterparts (some of which were not known before). We further show a reduction in the opposite direction, informally, that given an embedding with coarse scaling distortionPγ there exists an embedding with prioritized distortion γ(µ(j)), where µ 6 is a function such that i µ(i) = 1 (e.g. µ(j) = (π·j) 2 ). This result implies that all existing coarse scaling distortion results have priority distortion counterparts, thus improving few of the results of [EFN15a]. In particular, by applying a theorem of [ABN11] we obtain prioritized embedding of arbitrary metric spaces into lp in dimension O(log n) and prioritized distortion O(log j), which is best possible. Outline and Techniques. Our proof has the following high level approach; Given a graph and a ranking of its vertices, we first find a low weight spanner with prioritized distortion Õ(log j)/ρ. We then apply the general reduction from prioritized distortion to scaling distortion to find a spanner with scaling distortion Õ(log(1/ǫ))/ρ. Finally, we use the result of [ABN15] to find a spanning tree √ of this spanner with scaling distortion O(1/ ǫ). We then conclude that the scaling distortion of the concatenated embeddings is roughly their product, which implies our main result of a spanning √ tree with lightness 1 + ρ and scaling distortion Õ(1/ ǫ)/ρ. Similarly, we can apply the probabilistic embedding of [ABN15] to get a light counterpart, devising a distribution over spanning trees, each with lightness 1 + ρ, with (expected) scaling distotion polylog(1/ǫ)/ρ. The main technical part of the paper is finding a light prioritized spanner. In a recent result [CW16] (following [ENS14, CDNS92]), it was shown that any graph on n vertices admits a spanner with (worst-case) distortion O(log n) and with constant lightness. However, these constructions have no bound on the more refined notions of distortion. To obtain a prioritized distortion, we use a technique similar in spirit to [EFN15a]: group the vertices into log log n sets according to their i priority, the set Ki will contain vertices with priority up to 22 . We then build a low weight spanner for each of these sets. As prioritized distortion guarantees a bound for every pair containing a high ranking vertex, we must augment the spanner of Ki with shortest paths to all other vertices. Such a shortest path tree may have large weight, so we use an idea from [CDG06] and apply an SLT rooted at Ki , which balances between the weight and the distortion from Ki . The main issue with the construction described above is that the weight of the spanner in each 3 phase can be proportional to that of the MST, but we have log log n of those. Obtaining constant lightness, completely independent of n, requires a subtler argument. We use the fact that the weight of the light spanners in each phase come ”mostly” from the MST, and then some additional weight. We ensure that all the spanners will have the same MST. Then we select the parameters carefully, so that the additional weights will be small enough to form converging sequences, without affecting the distortion by too much. 1.1 Related Work Partial and scaling embeddings4 have been studied in several papers [KSW09, ABC+ 05, ABN11, CDG06, ABN15, ABNS14]. Some of the notable results are embedding arbitrary metrics into a distribution over trees [ABC+ 05] or into Euclidean space [ABN11] with tight O(log(1/ǫ)) scaling distortion. These results imply constant average distortion and O(q) bound on the ℓq -distortion. In √ [ABN15], an embedding into a single spanning tree with tight O(1/ ǫ) scaling distortion is shown, which implies constant average distortion, but there is no guarantee on the weight of the tree. Prioritized distortion embeddings were studied in [EFN15a], for instance they give an embedding of arbitrary metrics into a distribution over trees with prioritized distortion O(log j) and into Euclidean space with prioritized distortion Õ(log j). Probabilistic embedding into trees [Bar96, Bar98, Bar04, FRT03] and spanning trees [AKPW95, EEST08, ABN08, AN12] has been intensively studied, and found numerous applications to approximation and online algorithms, and to fast linear system solvers. While our distortion guarantee does not match the best known worst-case bounds, which are O(log n) for arbitrary trees and Õ(log n) for spanning trees, we give the first probabilisitc embeddings into spanning trees with polylogarithmic scaling distortion in which all the spanning trees in the support of the distribution are light. The paper [CDG06] considers partial and scaling embedding into spanners, and show a general transformation from worst-case distortion to partial and scaling distortion. In particular, they show a spanner with O(n) edges and O(log(1/ǫ)) scaling distortion. For a fixed ǫ > 0, they also obtain a spanner with O(n) edges, O(log(1/ǫ)) partial distortion and lightness O(log(1/ǫ)).5 Note that these results fall short of achieving both constant average distortion and constant lightness. 2 Preliminaries All the graphs G = (V, E, w) we consider are undirected and weighted with nonnegative weights. We shall assume w.l.o.g that all edge weights are different. If it is not the case, then one can break ties in an arbitrary (but consistent) way. Note P that under this assumption, the MST T of G is unique. The weight of a graph G is w(G) = e∈E w(e). Let dG be the shortest path metric on G. For a subset K ⊆ V and v ∈ V let dG (v, K) = minu∈K {dG (u, v)}. For r ≥ 0 let BG (v, r) = {u ∈ V : dG (u, v) ≤ r} (we often omit the subscript when clear from context). For a graph G = (V, E) on n vertices, a subgraph H = (V, E ′ ) where E ′ ⊆ E (with the induced weights) is called a spanner of G. We say that a pair u, v ∈ V has distortion at most t if dH (v, u) ≤ t · dG (v, u) , 4 A partial embedding (introduced by [KSW09] under the name embedding with slack) requires that for a fixed 0 < ǫ < 1, the distortion of all but an ǫ-fraction of the pairs is bounded by the appropriate function of ǫ. 5 The original paper claims lightness O(log2 (1/ǫ)), but their proof in fact gives the improved bound. 4 (note that always dG (v, u) ≤ dH (v, u)). If every pair u, v ∈ V has distortion at most t, we say that the spanner H has distortion t. Let T be the (unique) MST of G, the lightness of H is the ratio between the weight of H and the weight of the MST, that is Ψ(H) = w(H) w(T ) . We sometimes abuse notation and identify a spanner or a spanning tree with its set of edges. Prioritized Distortion. Let π = v1 , . . . , vn be a priority ranking (an ordering) of the vertices of V , and let α : N → R+ be some monotone non-decreasing function. We say that H has prioritized distortion α (w.r.t π), if for all 1 ≤ j < i ≤ n, the pair vj , vi has distortion at most α(j). Scaling Distortion. For v ∈ V and ǫ ∈ (0, 1) let R(v, ǫ) = min {r : |B(v, r)| ≥ ǫn}. A vertex u is called ǫ-far from v if d(u, v) ≥ R(v, ǫ). Given a function γ : (0, 1) → R+ , we say that H has scaling distortion γ, if for every ǫ ∈ (0, 1), there are at least (1 − ǫ) |V2 | pairs that have distortion at most γ(ǫ). We say that H has coarse scaling distortion γ, if every pair v, u ∈ V such that both u, v are ǫ/2-far from each other, has distortion at most γ(ǫ).6 Moments of Distortion. For 1 ≤ q ≤ ∞, define the ℓq -distortion of a spanner H of G as: distq (H, G) = E  dH (u, v) dG (u, v) q 1/q ,  where the expectation is taken according to the uniform distribution over V2 . The classic notion of distortion is expressed by the ℓ∞ -distortion and the average distortion is expressed by the ℓ1 distortion. The following was proved in [ABN15]. Lemma 1. ([ABN15]) Given a weighted graph G = (V, E) on n vertices, if a spanner H has scaling distortion γ then !1/q Z 1 q distq (H, G) ≤ 2 γ(x) dx . 1 n −1 ( ) 2 2 These notions of distortion apply for embedding of general metric spaces as well. 3 Light Spanner with Prioritized Distortion In this section we prove that every graph admits a light spanner with bounded prioritized distortion. Theorem 1 (Prioritized Spanner). Given a graph G = (V, E), a parameter 0 < ρ < 1 and any priority ranking v1 , v2 , . . . , vn of V , there exists a spanner H with lightness 1 + ρ and prioritized distortion Õ (log j) /ρ. The main technical lemma is the following. Lemma 2. Given a graph G = (V, E), a subset K ⊆ V of size k, and a parameter 0 < δ < 1, there exists a spanner H that 1) contains the MST of G, 2) has lightness 1 + δ, and 3) every pair in K × V has distortion O((log k)/δ). 6 It can be verified that coarse scaling distortion γ implies scaling distortion γ. 5 Before proving this lemma, we use it to prove Theorem 1. Proof. (of Theorem 1) For every 1 ≤ i ≤ ⌈log log n⌉ let Ki = o n i vj : j ≤ 22 . Let Hi be the to the set Ki and the parameter δi = ρ/i2 . Hence Hi has spanner given by Lemma 2 with respect  S log |K | i 1 + ρ/i2 lightness and O = O(2i · i/ρ) distortion for pairs in Ki × V . Let H = i Hi δi be the union of all these spanners (that is, the graph containing every edge of every one of these spanners). As each Hi contains the unique MST of G, it holds that X Ψ(H) ≤ 1 + ρ/i2 = 1 + O (ρ) . i≥1 To see the prioritized distortion, let vj , vr ∈ V be such that j < r, and let 1 ≤ i ≤ ⌈log log n⌉ i−1 ≤ j, and in particular 2i−1 ≤ log j (with be the minimal index such that vj ∈ Ki . Note that 22 the exception of j = 1, which holds by the virtue of j = 2, say). This implies that dH (vj , vr ) ≤ dHi (vj , vr ) ≤ O(2i · i2 /ρ) · dG (vj , vr ) ≤ Õ (log j) /ρ · dG (vj , vr ) . as required. 3.1 Proof of Lemma 2 The construction of the spanner that fulfills the properties promised in Lemma 2 is as follows. First, we use the spanner of [CW16] to get a spanner with lightness O(1) and distortion O(log k) over pairs in K × K. Then, by combining this spanner with the SLT by [KRY93], we expand the O(log k) distortion guarantee to all pairs in K ×V , while the lightness is still O(1). Finally, we use a general reduction (Theorem 2), that reduces the weight of a spanner while increasing its distortion. By applying the reduction, we get a spanner with 1 + ρ lightness while paying additional factor of 1/ρ in the distortion. We begin by describing the general reduction.  Theorem 2. Let G = (V, E) be a graph, 0 < δ < 1 a parameter and t : V2 → R+ some function. Suppose that for every weight function w : E → R+ there exists a spanner H with lightness ℓ such that every pair u, v ∈ V suffers distortion at most t(u, v). Then for every weight function w there exists a spanner H with lightness 1 + δℓ and such that every pair u, v suffers distortion at most t(u, v)/δ. Moreover, H contains the MST of G with respect to w. Proof. Fix some weight function w and let G = (V, E, w) be the graph associated with this weight function, and let T be the MST of G. Set w′ : E → R+ to be a new weight function ( w(e) e∈T ′ , w (e) = w(e)/δ e ∈ /T that is, we multiply the weight of all non-MST edges by 1/δ. Let G′ = (V, E, w′ ) be the graph G associated with the new weight function w′ . Note that T is also the MST of G′ (since the weight of any spanning tree is higher in G′ than in G except for T itself). By our assumption there exists a spanner H ′ = (V, EH ′ , w′ ) of G′ with distortion bounded by t and lightness ℓ. Set 6 H = (V, EH ′ ∪ T, w) as a spanner of G. The edge set of H consists of the edges of H ′ together with the MST edges, all with the original weight function w. As the weight of the non-MST edges are larger in G′ by 1/δ factor compared to their weight in G, we have w(EH ) = w(T ) + w (EH ′ \ T ) = w(T ) + δ · w′ (EH ′ \ T ) ≤ w(T ) + δ · w′ (EH ′ ) ≤ w(T ) + δℓ · w′ (T ) = (1 + δℓ) · w(T ) , concluding that the lightness of H is at most 1 + δℓ. To bound the distortion, consider an arbitrary pair of vertices u, v ∈ V . Let Pu,v be the shortest path from u to v in G. As for each edge e ∈ Pu,v , w′ (e) ≤ w(e)/δ we have that dG′ (u, v) ≤ X e∈Pu,v w′ (e) ≤ X 1 1 · w (e) = · dG (u, v) , δ δ e∈Pu,v Therefore: dH (u, v) ≤ dH ′ (u, v) ≤ t(u, v) · dG′ (u, v) ≤ t(u, v) dG (u, v) , δ as required. In a recent work, Chechik and Wulff-Nilsen achieved the following result: Theorem 3 ([CW16]). For every weighted graph G = (V, E, w) and parameters k ≥ 1 and 0 < ǫ < 1, there exist a polynomial time algorithm that constructs a spanner with distortion (2t − 1)(1 + ǫ) and lightness n1/t · poly( 1ǫ ). Note that for an n-vertex graph with parameters t = log n, ǫ = 1, they get a spanner with distortion O(log n) and constant lightness. However, their construction does not seem to provide lightness arbitrarily close to 1. A tree T = (V ′ , E ′ , w′ ) is called a Steiner tree for a graph G = (V, E, w) if (1) V ⊆ V ′ , and (2) for any pair of vertices u, v ∈ V it holds that dT (u, v) ≥ dG (u, v). The minimum Steiner tree T of G, denoted SM T (G), is a Steiner tree of G with minimum weight. It is well-known that for any graph G, w (SM T (G)) ≥ 21 M ST (G). (See, e.g., [GP68], Section 10.) We will use [CW16] spanner to construct  a spanner with O(1) lightness and distortion O(log k) K over pairs in K × K. Let Gk = (K, 2 , wk ) be the complete graph over the terminal set K with weights wk (u, v) = dG (u, v) (for u, v ∈ K) that are given by the shortest path metric in G. Let Tk be the MST of Gk . Note that the MST T of G is a Steiner tree of Gk , hence wk (Tk ) ≤ 2 · wk (SM T (Gk )) ≤ 2 · w(T ) . Using Theorem 3, let Hk = (K, Ek , wk ) be a spanner of Gk with weight O(wk (Tk )) = O(w(T )) (constant lightness) and distortion O(log k). For a pair of vertices u, v ∈ K, let Puv denote the shortest path between u and v in G. Let H ′ = (V, E ′ , w) be a subgraph of G with the set of edges E ′ = ∪{u,v}∈Ek Puv (i.e. for every edge {u, v} in Hk , we take the shortest path from u to v in G). It holds that, X X w(H ′ ) ≤ w(Puv ) = wk (e) = O(w(T )) . e∈Ek {u,v}∈Ek Moreover, for every pair u, v ∈ K, dH ′ (u, v) ≤ dHk (u, v) ≤ O(log k) · dGk (u, v) = O(log k) · dG (u, v) . 7 (1) Now we extend H ′ so that every pair in K × V will suffer distortion at most O(log k). To this end, we use the following lemma regarding shallow light trees (SLT), which is implicitly proved in [KRY93, ABP92]. Lemma 3. Given a graph G = (V, E), a parameter α > 1, and a subset K ⊆ V , there exists a 2 , and for any vertex u ∈ V , dS (u, K) ≤ α · dG (u, K). spanner S of G with lightness 1 + α−1 Let S be the spanner of Lemma 3 with respect to the set K and parameter α = 2. Define H” as the union of H ′ and S. As both H ′ and S have constant lightness, so does H”. It remains to bound the distortion of an arbitrary pair v ∈ K and u ∈ V . Let ku ∈ K be the closest vertex to u among the vertices in K with respect to the distances in the spanner S. By the assertion of Lemma 3, dS (u, ku ) = dS (u, K) ≤ 2 · dG (u, K) ≤ 2 · dG (u, v) . (2) Using the triangle inequality, (2) dG (v, ku ) ≤ dG (v, u) + dG (u, ku ) ≤ dG (v, u) + dS (u, ku ) ≤ 3 · dG (v, u) . (3) Since both v, ku ∈ K it follows that (3) (1) dH ′ (v, ku ) ≤ O(log k) · dG (v, ku ) ≤ O(log k) · dG (v, u) . (4) We conclude that dH” (v, u) ≤ dH ′ (v, ku ) + dS (ku , u) (2)∧(4) ≤ O(log k) · dG (v, u) . We showed a polynomial time algorithm, that given a weighted graph G = (V, E, w) and a subset K ⊆ V of size k, constructs a spanner H with lightness O(1), and such that every pair in K × V has distortion at most O(log k). Now Theorem 2 implies Lemma 2. 4 Prioritized Distortion vs. Coarse Scaling Distortion In this section we study the relationship between the notions of prioritized and scaling distortion. We show that there is a reduction that allows to transform embeddings with prioritized distortion into embeddings with coarse scaling distortion, and vice versa. We start with the direction that is used for our main result, showing that prioritized distortion implies scaling distortion. For two metric spaces (X, dX ), (Y, dY ) and a non-contractive embedding f : X → Y ,7 the (x),f (y)) . distortion of a pair x, y ∈ X under f is defined as dY (f dX (x,y) Theorem 4. Let (X, dX ), (Y, dY ) be metric spaces, then there exists a priority ranking x1 , . . . , xn of the points of X such that the following holds: If there exists a non-contractive embedding f : X → Y with (monotone non-decreasing) prioritized distortion α, then f has coarse scaling distortion O(α(8/ǫ)). 7 An embedding f is non-contractive if for every x, y ∈ X, dY (f (x), f (y)) ≥ dX (x, y). 8 The basic idea of the proof is to choose the priorities so that for every ǫ, every v ∈ X has a representative v ′ of sufficiently high priority within distance ≈ R(v, ǫ). Then for any u ∈ X which is ǫ-far from v, we can use the low distortion guarantee of v ′ with both v and u via the triangle inequality. To this end, we employ the notion of a density net due to [CDG06], who showed that a greedy construction provides such a net. Definition 1 (Density Net). Given a metric space (X, d) and a parameter 0 < ǫ < 1, an ǫ-densitynet is a set N ⊆ X such that: 1) for all v ∈ X there exists u ∈ N with d(v, u) ≤ 2R(v, ǫ) and 2) |N | ≤ 1ǫ . Proof. (of Theorem 4) We begin by describing the desired priority ranking of X. For every integer 1 ≤ i ≤ ⌈log n⌉ let ǫi = 2−i , and let Ni ⊆ X be an ǫi -density-net in X. Take any priority ranking Pi Si of X satisfying that every point v ∈ Ni has priority at most j=1 |Nj |. As for any j, j=1 Nj ≤ P P |Nj | ≤ ǫ1j = 2j , each point in Ni has priority at most ij=1 ǫ1j ≤ ij=1 2j < 2i+1 . Let f : X → Y be some non-contractive embedding with prioritized distortion α with respect to the priorities we defined. Fix some ǫ ∈ (0, 1) and a pair v, u ∈ V so that u is ǫ-far from v. Let i be the minimal integer such that ǫi ≤ ǫ (note that we may assume 1 ≤ i ≤ ⌈log n⌉, because there is nothing to prove for ǫ < 1/n). By Definition 1 we can take v ′ ∈ Ni such that d(v, v ′ ) ≤ 2R(v, ǫi ). As u is ǫ-far from v, it holds that dX (v, v ′ ) ≤ 2R (v, ǫi ) ≤ 2R (v, ǫ) ≤ 2dX (v, u) . (5) In particular, by the triangle inequality, (5) dX (u, v ′ ) ≤ dX (u, v) + dX (v, v ′ ) ≤ 3dX (u, v) . (6) The priority of v ′ is at most 2i+1 , hence dY (f (v), f (u)) ≤ dY (f (v), f (v ′ )) + dY (f (v ′ ), f (u)) ≤ α(2i+1 ) · dX (v, v ′ ) + α(2i+1 ) · dX (v ′ , u) ≤ 5α(2/ǫi ) · dX (v, u) . (5)∧(6) By the minimality of i it follows that 1/ǫi ≤ 2/ǫ, and since α is monotone dY (f (v), f (u)) ≤ 5α(2/ǫi ) · dX (v, u) ≤ 5α(4/ǫ) · dX (v, u) , as required. Since we desire distortion guarantee for pairs that are ǫ/2-far, the distortion becomes O(α(8/ǫ)). Combining Theorem 1 and Theorem 4 we obtain the following. Theorem 5. For any parameter 0 < ρ < 1, any graph contains a spanner with coarse scaling distortion Õ (log (1/ǫ)) /ρ and lightness 1 + ρ. 9 Remark 1. By Lemma 1 it follows that this spanner has ℓq -distortion Õ(q)/ρ for any 1 ≤ q < ∞. We can also obtain a spanner with both scaling distortion and prioritized distortion simultaneously, where the priority is with respect to an arbitrary ranking π = v1 , . . . , vn . To achieve this, one may define a ranking which interleaves π with the ranking generated in the proof of Theorem 4. We now turn to show that coarse scaling distortion implies prioritized distortion. P Theorem 6. Let µ : N → R+ be a non-increasing function such that i≥1 µ(i) = 1. Let Y be a family of finite metric spaces, and assume that for every finite metric space (Z, dZ ) there exists a non-contractive embedding fZ : Z → YZ , where (YZ , dYZ ) ∈ Y, with (monotone nonincreasing) coarse scaling distortion γ. Then, given a finite metric space (X, dX ) and a priority ranking x1 , . . . , xn of the points of X, there exists an embedding f : X → Y , for some (Y, dY ) ∈ Y, with (monotone non-decreasing) prioritized distortion γ(µ(i)). Proof. Given the metric space (X, dX ) and a priority ranking x1 , . . . , xn of the points of X, let δ = mini6=j dX (xi , xj )/2. We define a new metric space (Z, dZ ) as follows. For S every 1 ≤ i ≤ n, every point xi is replaced by a set Xi of |Xi | = ⌈µ(i)n⌉ points, and let Z = ni=1 Xi . For every u ∈ Xi andP v ∈ Xj define PndZ (u, v) = dX (xi , xj ) when i 6= j, and dZ (u, v) = δ otherwise. Observe n that |Z| = i=1 |Xi | ≤ i=1 (µ(i)n + 1) ≤ 2n. We now use the embedding fZ : Z → YZ with coarse scaling distortion γ, to define an embedding f : X → YZ , by letting for every 1 ≤ i ≤ n, f (xi ) = fZ (ui ) for some (arbitrary) point ui ∈ Xi . By construction of Z, for every j > i, we have that Xi ⊆ B(ui , dZ (ui , uj )) ∩ B(uj , dZ (ui , uj )). As |Xi | ≥ µ(i)n ≥ µ(i) 2 |Z|, it holds that ui , uj are ǫ/2-far from each other for ǫ = µ(i). This implies that dYZ (f (xi ),f (xj )) dX (xi ,xj ) = dYZ (fZ (ui ),fZ (uj )) dZ (ui ,uj ) ≤ γ(µ(i)). It follows from a result of [EFN15a] that the convergence condition on µ in the above theorem is necessary. We note that this reduction can also be applied to cases where the coarse scaling embedding is only known for a class of metric spaces (rather than all metrics), as long as the transformation needed for the proof can be made so that the resulting new space is still in the class. This holds for most natural classes, such as metrics arising from trees, planar graph, graphs excluding a fixed minor, etc. It can also be made to work with bounded degree graphs, albeit with a small change in the construction. The reduction implies that all existing coarse scaling distortion results have priority distortion counterparts, thus improving few of the results of [EFN15a]8 . In particular, by applying a theorem of [ABN11] we get the following: Theorem 7. For every 1 ≤ p ≤ ∞ and every finite metric space (X, dX ), and a priority ranking O(log |X|) of X, there exists an embedding with prioritized distortion O(log j) into lp . Remark 2. The proof of Theorem 4 provides an even stronger conclusion, that any pair u, v ∈ X such that one is ǫ/2-far from the other, has the claimed distortion bound. While in the original definition of coarse scaling both points are required to be ǫ/2-far from each other, it is often the case that we achieve the stronger property. Yet, in some of the cases in previous work the weaker definition seemed to be of importance. Combining Theorem 4 and Theorem 6, we infer that essentially any coarse scaling embedding can have such a one-sided guarantee, with a slightly worse dependence on ǫ, as claimed in the following corollary. 8 It is also worth noting that the reduction also implies that coarse partial embedding results can be translated into bounds on terminal distortion [EFN15b]. 10 Corollary 4. Fix a metric space (X, d) on n points. Let Y be a family of finite metric spaces as in Theorem 6. Then there exists an embedding f : X → Y , for some (Y, dY ) ∈ Y, with (monotone + non-decreasing) one-sided coarse P scaling distortion O(γ(µ(8/ǫ))), where µ : N → R is a nonincreasing function such that i≥1 µ(i) = 1. Proof. By the condition of Theorem 6, there exists (Y, dY ) ∈ Y so that X embeds to Y with coarse scaling distortion γ(ǫ). According to Theorem 6, there is an embedding f with prioritized distortion γ(µ(i))) (w.r.t to any fixed priority ranking π). We pick π to be the ordering required by Theorem 4, and conclude that f has one-sided coarse scaling distortion O(γ(µ(8/ǫ))). 5 A Light Tree with Constant Average Distortion Here we prove our main theorem on finding a light spanning tree with constant average distortion. Later on we show a probabilistic embedding into a distribution of light spanning trees with improved bound on higher moments of the distortion. Theorem 8.pFor any parameter 0 < ρ < 1, any graph contains a spanning tree with scaling distortion Õ( 1/ǫ)/ρ and lightness 1 + ρ. It follows from Lemma 1 that the average distortion of the spanning treeobtained is O(1/ρ). Moreover, the ℓq -distortion is O(1/ρ) for any fixed 1 ≤ q < 2, Õ log1.5 n /ρ for q = 2, and Õ(n1−2/q )/ρ for any fixed 2 < q < ∞. We will need the following simple lemma, that asserts the scaling distortion of a composition of two maps is essentially the product of the scaling distortions of these maps.9 Lemma 5. Let (X, dX ), (Y, dY ) and (Z, dZ ) be metric spaces. Let f : X → Y (respectively, g : Y → Z) be a non-contractive onto embedding with scaling distortion α (resp., β). Then g ◦ f has scaling distortion α(ǫ/2) · β(ǫ/2). Proof. Let n = |X|. Let distf (v, u) = dY (f (v),f (u)) be the distortion dX (v,u) dZ (g(f (v)),g(f (u))) . Fix some ǫ dY (f (v),f (u)) of the pair u, v ∈ X un- ∈ (0, 1). We would like der f , and similarly let distg (v, u) =  n to show ǫ · 2 pairs suffer n that at most o distortionngreater than α(ǫ/2) · β(ǫ/2) by go◦ f . Let X A = {v, u} ∈ 2 : distf (v, u) > α(ǫ/2) and B = {v, u} ∈ X2 : distg (v, u) > β(ǫ/2) . By the  bound on the scaling distortions of f and g, it holds that |A ∪ B| ≤ |A| + |B| ≤ ǫ · n2 . Note that if {v, u} ∈ / A ∪ B then dZ (g(f (v)), g(f (u))) dX (v, u) = distf (v, u) · distg (v, u) ≤ α(ǫ/2) · β(ǫ/2) , which concludes the proof. We will also need the following result, that was proved in [ABN15]. p Theorem 9 ([ABN15]). Any graph contains a spanning tree with scaling distortion O( 1/ǫ). 9 Note that this is not true for the average distortion – one may compose two maps with constant average distortion and obtain a map with Ω(n) average distortion. 11 Now we can prove the main result. Proof. (of Theorem 8) Let H be the spanner given by Theorem 5. Let T be a spanning p tree of H constructed according to Theorem 9. By Lemma 5, T has scaling distortion O( 1/ǫ) · p Õ(log(1/ǫ))/ρ = Õ( 1/ǫ)/ρ with respect to the distances in G. The lightness follows as Ψ(T ) ≤ Ψ(H) ≤ 1 + ρ. Random Tree Embedding. We also derive a result on probabilistic embedding into light spanning trees with scaling distortion. That is, the embedding construct a distribution over spanning tree so that each tree in the support of the distribution is light. In such probabilistic embeddings [Bar96] into a family Y, each embedding f = fY : X → Y (for some (Y, dY ) ∈ Y) in the support distribution is non-contractive, and the distortion of the pair u, v ∈ X is defined as  of the (u),f (v))  EY dY (f . The prioritized and scaling distortions are defined accordingly. We make use of dX (u,v) the following result from [ABN15].10 Theorem 10. ([ABN15]) Every weighted graph G embeds into a distribution over spanning trees with coarse scaling distortion Õ(log2 (1/ǫ)). We note that the distortion bound on the composition of maps in Lemma 5 also holds whenever g is a random embedding, and we measure the scaling expected distortion. Thus, following the same lines as in the proof of Theorem 8, (while using Theorem 10 instead of Theorem 9), we obtain the following. Theorem 11. For any parameter 0 < ρ < 1 and any weighted graph G, there is an embedding of G into a distribution over spanning trees with scaling distortion Õ(log3 (1/ǫ))/ρ, such that every tree T in the support has lightness 1 + ρ. It follows from Lemma 1 that the ℓq -distortion is O(1/ρ), for every fixed q ≥ 1. 6 Lower Bound on the Trade-off between Lightness and Average Distortion In this section, we give an example of a graph for which any spanner with lightness 1+ρ has average distortion Ω(1/ρ) (of course this bound holds for the ℓq -distortion as well). This shows that our results are tight 11 . Lemma 6. For any n ≥ 32 and ρ ∈ [1/n, 1/32], there is a graph G on n + 1 vertices such that any spanner H of G with lightness at most 1 + ρ has average distortion at least Ω (1/ρ).  Proof. We define the graph G = (V, E) as follows. Denote V = {v0 , v1 , . . . , vn }, E = V2 , and the weight function w is defined as follows. ( 1 if |i − j| = 1 w({vi , vj }) = 2 otherwise . 10 The fact the embedding yields coarse scaling distortion is implicit in their proof. We also mention that in general the average distortion of a spanner cannot be arbitrarily close to 1, unless the spanner is extremely dense. E.g., when G is a complete graph, any spanner with lightness at most n/2 will have average distortion at least 3/2. 11 12 I.e., G is a complete graph of size n + 1, where the edges {vi , vi+1 } have unit weight and induce a path of length n, and all non-path edges have weight 2. Clearly, the path is the MST of G of weight n. Let k = ⌈ρn⌉. Let H be some spanner of G with lightness at most 1 + ρ ≤ n+k n , in particular, w(H) ≤ n + k. Clearly H has at least n edges (to be connected). Let q be the number of edges of weight 2 contained in H. Then w(H) ≥ (n − q) · 1 + q · 2 = n + q. Therefore q ≤ k. Let S be the set of vertices which are incident on an edge of weight 2 in H. Then |S| ≤ 2q ≤ 2k. 1 . For any v ∈ S, let Nv ⊆ V be the set of vertices that are connected to v via a path of Let δ = 32ρ length at most δ in H, such for any v ∈ S, S that this path consists of weight 1 edges only. Necessarily, 1 |Nv | ≤ 2δ + 1. Let N = v∈S Nv , it holds that |N | ≤ 2k · (2δ + 1) ≤ 4ρn( 16ρ + 1) ≤ n4 + n8 = 3n 8 . Let N̄ = V \ N . Consider u ∈ N̄ . By definition of N every weight 2 edge is further than δ steps away from u in H. It follows that there are at most 2δ + 1 vertices within distance at most δ from u (in H). Let Fu = {v ∈ V : dH (u, v) > δ}. It follows that |Fu | ≥ n − 2δ − 1. Note that for any v ∈ Fu , the distortion of the pair {u, v} is at least 2δ . Hence, we obtain that X {v,u}∈(V2 ) dH (v, u) dG (v, u) ≥ ≥ ≥ 1 X X dH (v, u) 2 dG (v, u) u∈N̄ v∈Fu 5n δ · (n − 2δ − 1) · 16 2 5n 7n 1 · · . 16 8 64ρ Finally, dist1 (H, G) = ≥ ≥ 7 1 X n+1 2 {v,u}∈(V2 ) dH (v, u) dG (v, u) n 35 1 · · n + 1 64 64ρ 1 . 128ρ Acknowledgements We are grateful to Michael Elkin and Shiri Chechik for fruitful discussions. References [ABC+ 05] Ittai Abraham, Yair Bartal, Hubert T.-H. Chan, Kedar Dhamdhere, Anupam Gupta, Jon M. Kleinberg, Ofer Neiman, and Aleksandrs Slivkins. Metric embeddings with relaxed guarantees. In 46th Annual IEEE Symposium on Foundations of Computer Science (FOCS 2005), 23-25 October 2005, Pittsburgh, PA, USA, Proceedings, pages 83–100, 2005. [ABN08] Ittai Abraham, Yair Bartal, and Ofer Neiman. Nearly tight low stretch spanning trees. In Proceedings of the 49th Annual IEEE Symposium on Foundations of Computer Science, FOCS ’08, pages 781–790, Washington, DC, USA, 2008. IEEE Computer Society. 13 [ABN11] Ittai Abraham, Yair Bartal, and Ofer Neiman. Advances in metric embedding theory. Advances in Mathematics, 228(6):3026 – 3126, 2011. [ABN15] Ittai Abraham, Yair Bartal, and Ofer Neiman. Embedding metrics into ultrametrics and graphs into spanning trees with constant average distortion. SIAM J. Comput., 44(1):160–192, 2015. [ABNS14] Ittai Abraham, Yair Bartal, Ofer Neiman, and Leonard J. Schulman. Volume in general metric spaces. Discrete & Computational Geometry, 52(2):366–389, 2014. [ABP92] B. Awerbuch, A. Baratz, and D. Peleg. Efficient broadcast and light-weight spanners. Technical Report CS92-22, The Weizmann Institute of Science, Rehovot, Israel., 1992. [AKPW95] Noga Alon, Richard M. Karp, David Peleg, and Douglas West. A graph-theoretic game and its application to the k-server problem. SIAM J. Comput., 24(1):78–100, 1995. [AN12] Ittai Abraham and Ofer Neiman. Using petal-decompositions to build a low stretch spanning tree. In Proceedings of the Forty-fourth Annual ACM Symposium on Theory of Computing, STOC ’12, pages 395–406, New York, NY, USA, 2012. ACM. [Bar96] Yair Bartal. Probabilistic approximation of metric spaces and its algorithmic applications. In Proceedings of the 37th Annual Symposium on Foundations of Computer Science, pages 184–, Washington, DC, USA, 1996. IEEE Computer Society. [Bar98] Yair Bartal. On approximating arbitrary metrices by tree metrics. In Proceedings of the thirtieth annual ACM symposium on Theory of computing, STOC ’98, pages 161–168, New York, NY, USA, 1998. ACM. [Bar04] Yair Bartal. Graph decomposition lemmas and their role in metric embedding methods. In Algorithms - ESA 2004, 12th Annual European Symposium, Bergen, Norway, September 14-17, 2004, Proceedings, pages 89–97, 2004. [CDG06] T.-H. Hubert Chan, Michael Dinitz, and Anupam Gupta. Spanners with slack. In Proceedings of the 14th Conference on Annual European Symposium - Volume 14, ESA’06, pages 196–207, London, UK, UK, 2006. Springer-Verlag. [CDNS92] Barun Chandra, Gautam Das, Giri Narasimhan, and José Soares. New sparseness results on graph spanners. In Proceedings of the Eighth Annual Symposium on Computational Geometry, SCG ’92, pages 192–201, New York, NY, USA, 1992. ACM. [CW16] Shiri Chechik and Christian Wulff-Nilsen. Near-optimal light spanners. In Proceedings of the Twenty-Seventh Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2016, Arlington, VA, USA, January 10-12, 2016, pages 883–892, 2016. [EEST08] Michael Elkin, Yuval Emek, Daniel A. Spielman, and Shang-Hua Teng. Lower-stretch spanning trees. SIAM Journal on Computing, 38(2):608–628, 2008. [EFN15a] Michael Elkin, Arnold Filtser, and Ofer Neiman. Prioritized metric structures and embedding. In Proceedings of the 47th ACM Symposium on Theory of Computing, STOC, 2015. [EFN15b] Michael Elkin, Arnold Filtser, and Ofer Neiman. Terminal embeddings. In Approximation, Randomization, and Combinatorial Optimization. Algorithms and Techniques, APPROX/RANDOM 2015, August 24-26, 2015, Princeton, NJ, USA, pages 242–264, 2015. [ENS14] Michael Elkin, Ofer Neiman, and Shay Solomon. Light spanners. In Automata, Languages, and Programming - 41st International Colloquium, ICALP 2014, Copenhagen, Denmark, July 8-11, 2014, Proceedings, Part I, pages 442–452, 2014. [FRT03] Jittat Fakcharoenphol, Satish Rao, and Kunal Talwar. A tight bound on approximating arbitrary metrics by tree metrics. In Proceedings of the thirty-fifth annual ACM symposium on Theory of computing, STOC ’03, pages 448–455, New York, NY, USA, 2003. ACM. 14 [GP68] E. N. Gilbert and H. O. Pollak. Steiner minimal trees. SIAM Journal on Applied Mathematics, 16(1):1–29, Jan 1968. [KRY93] Samir Khuller, Balaji Raghavachari, and Neal E. Young. Balancing minimum spanning and shortest path trees. In SODA, pages 243–250, 1993. [KSW09] Jon Kleinberg, Aleksandrs Slivkins, and Tom Wexler. Triangulation and embedding using small sets of beacons. Journal of the ACM, 56(6):32:1–32:37, September 2009. 15
8cs.DS
A dynamical definition of f.g. virtually free groups Daniel Bennett and Collin Bleak January 19, 2016 arXiv:1510.02638v2 [math.GR] 18 Jan 2016 Abstract We show that the class of finitely generated virtually free groups is precisely the class of demonstrable subgroups for R. Thompson’s group V . The class of demonstrable groups for V consists of all groups which can embed into V with a natural dynamical behaviour in their induced actions on the Cantor space C2 := {0, 1}ω . There are also connections with formal language theory, as the class of groups with context-free word problem is also the class of finitely generated virtually free groups, while R. Thompson’s group V is a candidate as a universal coCF group by Lehnert’s conjecture, corresponding to the class of groups with context free co-word problem (as introduced by Holt, Rees, Röver, and Thomas). Our main result answers a question of Berns-Zieze, Fry, Gillings, Hoganson, and Matthews, and separately of Bleak and Salazar-Dı́az, and it fits into the larger exploration of the class of coCF groups as it shows that all four of the known closure properties of the class of coCF groups hold for the set of finitely generated subgroups of V. 1 Introduction There is a long history of determining classes of groups based on some external criteria. In the case of formal language theory, we mention in particular two classical results along these lines. Anisimov’s theorem [1] that the class of finitely generated groups with word problem a regular language is precisely the class of finite groups, and Muller and Schupp’s result [19, 20] that the class of finitely generated groups with word problem a context free language is precisely the class of finitely generated virtually free groups. Holt, Rees, Röver, and Thomas introduce in [13] the class coCF of co-context free groups. The coCF groups are a natural generalisation of the class of groups with context free word problem, and so one can hope for another classification of these groups as some particular natural class of groups. Presently, there is a conjecture of Lehnert [17, 6] that the class coCF is precisely the class of finitely generated groups that can embed in R. Thompson’s group V . The R. Thompson groups F < T < V have been known to be important essentially since their introduction in the mid 1960’s by Richard Thompson [9, 24]. However, while they are fundamental objects, they remain quite mysterious in many ways. Specific to V , we can highlight various investigations [3, 17, 2, 23, 4, 8, 11], which list is by no means comprehensive. One view of the group V , amongst others, is as a group of homeomorphisms of the standard “deleted middle thirds” Cantor space C2 := {0, 1}ω. Recently, it has become clear [7] that yet another view of V is natural and interesting. In this view, V can be thought of as an infinite generalisation of the finite alternating groups (our most basic examples of finite simple groups). From this view, V can be seen as a permutation group of “even” permutations “acting” on a poset structure of some partitions of Cantor space. This, perhaps, offers a new insight into why V arose as one of the first examples of finitely presented infinite simple groups. In any case, in [8] a class of subgroups of V were singled out as being particularly important. These are subgroups of V with induced actions on Cantor space that are naturally “Geometric”; the demonstrative subgroups of V . Groups (in general) which admit embeddings into V as demonstrative subgroups of V are known as demonstrable groups for V . We 1 note in passing that Question 3 of [8] requests a classification of these groups, which we will answer here in the finitely generated case. Thus, the main result of this paper from the point of view of the development of the dynamic theory of V is the following. Theorem 1. Let G be a finitely generated group. Then, G is a demonstrable group for V if and only if G is a virtually free group. In particular, as we noted before, this is precisely the class of context free groups. In passing, we comment that Q\Z is a known demonstrable subgroup for V (and even, for T , see [5]), so we need the “finitely generated” criterion. As mentioned above, Lehnert in his dissertation [16] conjectures that a group QAut(T2,c ) is a universal coCF group; that a group is a coCF group if and only if it embeds as a finitely generated subgroup of QAut(T2,c ). Lehnert also shows that V embeds in QAut(T2,c ). Lehnert and Schweitzer show by a separate argument in [17] that V is a coCF group. In response to the work in [8], Lehnert and Schweitzer [18] asked those authors whether V and QAut(T2,c ) are bi-embeddable. In [6], this question is answered affirmatively. Consequently, one can restate Lehnert’s conjecture as the following. Conjecture 2 (Lehnert). R. Thompson’s group V is a universal coCF group. The paper [2] investigates a class of groups which could provide possible counter-examples to Lehnert’s conjecture. We are not certain at this time whether or not those groups can embed in V , but part of the motivation for the work here was the request in [2] to embed the virtually free groups into V as demonstrative subgroups of V . Indeed, the authors of [2] ask in Question 1 whether non-abelian free groups can embed as demonstrative subgroups of V (from which it would follow that all countable virtually free groups could embed as demonstrative subgroups). Thus we answer that question here in the affirmative. Finally, concerning the main result of this article, we note that in [13] the class of coCF groups is shown to be closed under four operations: passing to finitely generated subgroup, or to finite index over-group, or to a finite direct product of coCF groups, or finally to a restricted wreath product of a coCF group with a context free top group. It was already known that the finitely generated subgroups of V are closed under the first three operations (see [21, 8]), but the last operation remained a mystery. However, it is shown in [8] that the subgroups of V are closed under passage to a restricted wreath product of a subgroup of V with a demonstrable group for V (for top group). Thus, a corollary of the main theorem of this paper is that the finitely generated subgroups of V are closed under this operation as well. Corollary 3. The finitely generated subgroups of V are closed under the following four properties: 1. passing to finitely generated subgroups, 2. passing to finite index over-groups, 3. taking finite direct products, and 4. taking wreath products with any CF top group. In fact, we have a stronger result. Theorem 4. Let G be a subgroup of V , and let T be any countable virtually free group. Then, G o T embeds as a subgroup of V . In particular, the finitely generated subgroups of V are closed under the four known closure properties of the coCF groups. 1.1 Languages and groups We now introduce classes of groups that are defined by properties found in Formal Language Theory. We begin by defining a formal language. Definition 5. Let Σ be a finite set of elements which we will call an alphabet. The free monoid of Σ, denoted Σ∗ , is the set of all finite strings made from the elements of Σ, under the operation of concatenation. We call any subset of Σ∗ a language over the alphabet Σ. 2 Many formal languages can be defined by mathematical machines called automata. An automaton is simple theoretical computation device that reads a string of symbols from a given alphabet and decides whether to accept that string or reject it. We will later define more formally what it means for automata to accept or reject a string. The set of all strings that are accepted by an automaton make a formal language. Definition 6 (Finite Automata). A finite automaton, is a 5-tuple, M = (Σ, Q, δ, q0 , F ), where Σ is a finite set called the alphabet, Q is a finite set of states, δ is the transition function between the states, q0 is a start state in Q, and F ⊂ Q is called the set of accept states. The transition function is defined as δ : Q × Σ → Q. Let M be a finite automaton as above and let w = w1 w2 . . . wn ∈ Σ∗ be a word in the alphabet Σ. We say M runs on w (or computes w) when we carry out the following process. We assume we are “in” the initial state q0 . Then we “read” the first letter w1 of w, and transition to a new state q = δ(q0 , w1 ). We then read the next letter (w2 ) and transition to the next state δ(q, w2 ). We continue this process until we have read the last letter wn and moved to a state z. If z ∈ F we say that M accepts w. Otherwise we say that M rejects w. Then, the language of words in Σ∗ which are accepted by M is called the language accepted by the automaton M . Now, a language L ⊂ Σ∗ is a regular language if and only if there is a finite automaton M so that L is precisely the language accepted by M . Definition 7. Let G be a group such that G = hΣ|Ri is a finite presentation for G and Σ is closed under taking inverses. Then there exits a homomorphism θ : Σ∗ → G from the free monoid Σ∗ to the group G, defined by θ(w) = (w)R for all w ∈ Σ∗ where (w)R is the element in G that w represents. We define the word problem of G to be W (G) = {w ∈ Σ∗ |θ(w) = id} where id is the identity element in G. We say that the co-word problem of G, or coW (G), is the complement of W (G), i.e. the set of elements in Σ∗ that do not evaluate to the identity under the relations R. We are now ready to state our first historical motivating theorem, given in [1], using slightly different language than in the original paper. Theorem 8 (Anisimov). Let G = hΣ | Ri be a finitely generated group. G is finite if and only if W (G) is a regular language. There are many different types of automata, each one producing a different sort of formal language. We will be mostly interested in push down automata which give rise to context free languages. Definition 9 (Push-down Automata). A push-down automaton, or PDA, is a 6-tuple, M = (Σ, Γ, Q, δ, q0 , F ), where Σ, Γ and Q are finite sets (which we call the input alphabet of M , the stack alphabet of M , and the set of states of M , respectively), δ is a transition relation, q0 ∈ Q is the start state, and F ⊂ Q the set of accept states. The transition relation is defined as δ : Q × Σ × Γ∗ → Q × Γ∗ where Γ∗ is the set of all finite strings over the alphabet Γ. The stack is an external memory device which uses it’s own alphabet Γ. It is a finite ordered set of elements from Γ, (γ0 , γ1 , γ2 , . . . , γn−1 , γn ), n ≥ 0, that the P DA has limited access to. In a P DA the transition relation uses a string of elements from the top of the stack, γk . . . γn for some k ≥ 1 as one of it’s arguments. A PDA computes as follows. We begin with a string of symbols in Σ, called the input string, and at the state q0 in the automaton. Initially the stack is empty. We read the first of the symbols in our input string. The transition function then uses the current state, the symbol that we read and the symbol on top of the stack (if any) to determine which state to move to next. After reading in the first input symbol we move to the state determined by δ and progess the reader to the second symbol in our input string. As δ is a relation, and not necessarily a function, It is possible that δ gives more than one option, in this case we have a choice as to which state we move to, this type of automaton is called non-determinitistic. Additionally the transition relation also deletes whatever it reads on the stack and replaces it with a new string of symbols from the stack alphabet. It is also possible for the automaton to change states even when no input symbol has been read, these are called  − moves and are determined solely by the current state and the stack. 3 Given an input string w ∈ Σ∗ and a PDA M , we denote by P(w) the set of all legal paths in M that are determined by w. If our automaton is non-deterministic then the set P(w) could be larger than one. If there exists some path p ∈ P(w) such that p ends at a state qf ∈ F , the set of final states, then we say the automaton accepts the string w. If none of the paths in P(w) end at a state in F then we say the automaton rejects the string w. The set of all words in Σ∗ that are accepted by the automata M is a context free language. Note that we could equivalently have changed our acceptance criteria to only accept a string w ∈ Σ∗ if there exists a legal path such that the stack finishes empty. For every language that is created by an automaton that accepts via final state we can always find an automaton that accepts the same language by the empty stack criteria, and vice versa. The proof of this is given by Theorem 5.1 and Theorem 5.2 in [15]. Definition 10. Let G be a finitely generated group such that W (G) is a context free language. Then we call G a context free group and say that G is CF. Equivalently, if coW (G) is a context free language then we say G is coCF. It is shown in [13] that the property of being coCF is independent of the choice of finite generating set. We note that every CF group is also a coCF group, but the converse is not true. The CF groups are completely classified by Muller and Schupp in [19] and [20] to be exactly the finitely generated virtually free groups. It is not too hard to see that the word problem of a finitely generated virtually free group is actually a deterministic context free language (see [12]). As the complement of a deterministic context free language is also a deterministic context free language, we see that such a group has its set of co-words also forming a deterministic context free language. However, the complement of a non-deterministic context free language need not be context free, hence the class of coCF groups is broader than the class of CF groups (as is witnessed, for instance, by R. Thompson’s group V , which is not virtually free). 1.2 Cantor space C2 As mentioned before R. Thomspon’s Group V is a group of automorphisms of the Cantor set, C2 . We therefore begin with a brief discussion to define the notation and language regarding the Cantor set that we will use throughout this note. We follow closely the description given in [8] but also make mention of other conventions as required. Let X = {0, 1} which we will call our alphabet and define X ∗ to be the set of all finite strings over X. We introduce T2 , the infinite rooted binary tree, as a non-directed graph that has vertex set X ∗ . We define edges in T2 as follows. If u, v ∈ X ∗ then there exists an edge between u and v if and only if u = vx or v = uy, where x, y ∈ X. We define the root of T2 to be empty word  ∈ X ∗ . A vertex n in T2 will also be referred to as a node of T2 and we define the address of a node n to be the path in X ∗ from the root of T2 to n. An infinite descending path in T2 is an infinite string of 0’s and 1’s. The boundary of T2 is the set of all such infinite descending paths which we denote by {0, 1}ω . We say two paths are near to each other if they share a long common prefix. Consider the paths pn1 and pn2 in Figure 1 which start from the root  and end at the vertices n1 and n2 respectively. Notice that from the root to the vertex k the two paths share the same route through T2 , we would therefore say that pn1 and pn2 share a prefix of length k. This induces a topology on the boundary of the tree that is equivalent to the product topology for {0, 1}ω = C2 . Suppose x ∈ {0, 1}ω = C2 , then we say that x underlies the vertex w ∈ X ∗ of T2 if there exists x̂ ∈ {0, 1}ω such that x = wx̂, or in other words w is a prefix of the infinite string defining x. The set of all such strings in {0, 1}ω that underly the vertex w in T2 is a clopen subset of {0, 1}ω which we will denote by [w], and is in fact a basic open set in the product topology on {0, 1}ω . Notice that C2 ∼ = [w]. In [8] the set [w] was denoted by Cw . 1.3 R. Thompson’s group V , barriers, and prefix replacements We now introduce some terminology used in [14] that will help us to define Thompson’s group V . We first define what Holt and Röver call a barrier. Let B be a finite set of finite strings in X ∗ such that every element in {0, 1}ω ∼ = C has a unique string in B as a prefix. We call B a barrier. For example B could be the set {0, 100, 101, 11} but not the sets {0, 100, 11} or {0, 100, 101, 11, 110}. 4  k pn1 pn2 n2 n1 Figure 1: Two paths in the infinite binary tree T2 with a common prefix of length k. Notice how we draw the tree with the root at the top. A barrier is equivalent to a complete finite antichain on the poset X ∗ under the relation x ≤ y ⇔ x is a prefix of y, as introducted by Birget [3]. A prefix replacement is a triple g = (D, R, σ) where D and R are barriers and σ is a bijection between them. This induces an action on C2 which we call a prefix replacement map, or prm for short (note that in [14] this was called a prefix replacement permutation). If g is a prefix replacement then the prm induced from g acts on w ∈ C2 by replacing the prefix d ∈ D by the prefix dσ ∈ R. Note that there are many different prefix replacements which will give the same prm. We then define Thomspon’s Group V as the set of all prm’s on {0, 1}ω , under composition. We can draw barriers as finite, rooted subtrees of the infinite rooted binary tree T2 . If T is a subtree of T2 then we draw T with the root at the top and the tree drawn “downwards” away from the root. Given a vertex u of T , we draw the child u0 of u to the left of u and the child u1 to the right. The vertices of T that do not have any children we call leaves. We can then describe unique paths through T from the root to the leaves by elements of X ∗ , where a 0 means travel down the next left hand edge, and 1 means travel down the next right hand edge. A barrier will then define a finite binary tree where each element of the barrier will describe a path from the root to a unique leaf. We can now use this construction to represent elements of V as pairs of binary trees. If the prefix replacement g = (D, R, σ) induces an element v ∈ V , then the two barriers D and R define two binary trees and the bijection σ is represented by a numerical labeling on the leaves of the trees. The tree pair representation of an example element g ∈ V , that will appear again later on the in paper, is given in Figure 2. We typically call the tree on the left the domain tree and the tree on the right the range tree. In our example the barriers that define the domain and range trees are {0, 100, 101, 11} and {0, 10, 110, 111} respectively. The numbering of the leaves represents the bijection between the two barriers, where the leaf labelled “1” in the domain tree is taken to the leaf labelled “1” in the range tree and so on. 3 1 g 4 2 2 3 1 4 Figure 2: The tree pair representation of an element g of Thompson’s group V 5 1.4 On “Geometrical” embeddings With the growth of Geometric Group Theory as an independent field, there have been many types of group actions and embeddings defined which can be called “geometrical.” For example, one common definition is that a group acts faithfully and co-compactly on a metric space. There is a theorem of Rubin we wish to briefly mention in relation to this context (see [22] for details). One version of the theorem roughly states that when a group G acts [effectively enough] on a [nice enough] space X (for discussion, let us assume G ≤ Homeo(X) and the action and space have other qualities as well), then any isomorphism θ of G induces a homeomorphism φ of X, and indeed, θ is realised as the topological conjugation g 7→ g φ in the larger group Homeo(X). We explore one way to interpret the ideas regarding “geometrical actions” specifically in the context of subgroups of a “Rubin group” acting on it’s corresponding “Rubin space.” As is well known in the community of researchers with interests in the R. Thompson groups, F < T < V are each “Rubin groups” with natural associated actions on the spaces (0, 1), S 1 , and the Cantor space C2 , respectively. For those familiar with the theory of F and T , we observe the spaces [0, 1] and S 1 are the quotients of C2 which transform the actions of the subgroups F and T on C2 to Rubin type actions on the quotient spaces (we are playing a bit “fast and loose” with the definitions here by adding the points 0 and 1 to (0, 1); the induced action of F on [0, 1] of course fixes these “extra” points). See [9] for a general survey of F , T and V . Taking a cue from the “co-compact” aspects from the example of a “geometrical action” mentioned above, given a group-space pair (H, X), the authors of [8] define the class Ḋ(H,X) of demonstrative subgroups of H (for X). Definition 11. Suppose H is a group that acts on a space X. We say that a subgroup G ≤ H is a demonstrative subgroup of H over X if there exists a non-empty open subset U ⊂ X such that for any two elements g1 , g2 ∈ G we have U g1 ∩ U g2 = ∅ if and only if g1 6= g2 . If a subgroup G has this property then we say G is in the set Ḋ(H,X) and all groups isomorphic to G are in the class D(H,X) of demonstrable groups for the group-space pair (H, X). We call the open set U a demonstration set. Suppose that G ≤ V is a demonstrative subgroup of V . By Lemma 3.1 of [8] there exists a vertex n ∈ {0, 1}∗ ⊂ T2 such that [n] ∩ [n]g = ∅ for all g 6= 1. We call n a demonstration node for G. Note that n will not be the unique demonstration node for G, any node that has an address with n as a prefix will also suffice. Implications: In [8] the authors show in Theorem 1.4 that if D1 , D2 are demonstrable groups for V , then one can find demonstrative embeddings D̂1 , D̂2 of D1 and D2 so that hD̂1 , D̂2 i ∼ = D1 ∗ D2 (while the free product so generated may not be demonstrative). They also show that if D is demonstrable for V , and A is any subgroup of V , then the restricted wreath product A o D embeds in V (Theorem 1.2 of [8]). It is this latter embedding result that combines with the main result of this paper to produce our Corollary 3 and Theorem 4 from the introduction. As Theorem 4 states that if G is a subgroup of V and T is any countable virtually free group then G o T embeds as a subgroup of V , we then have that all four of the known closure properties of the coCF groups hold for the finitely generated subgroups of V (see Corollary 3). 2 2.1 The Main Results The countable virtually free groups are in the class D(V,C2 ) The goal of this section is to prove that the countable virtually free groups are in the class D(V,C2 ) . We begin by introducing a new way of proving that a subgroup of V is demonstrative which is based on the work done in [8]. The following lemma follows easily from the definitions. Lemma 12. Let G ≤ V . If [0]∩[0]g = ∅ for all non-trivial g ∈ G, then G is a demonstrative subgroup of V . 6 By Lemma 3.4 in [8] we actually have a stronger result. Corollary 13. A group G is demonstrable for V if and only if there exists a subgroup e ≤ V such that G e∼ e G = G and [0] ∩ [0]g for all non-trivial g ∈ G. The rest of the section will be used to show that countable virtually free groups are demonstrable for V . This will be done by constructing a demonstrative embedding of the modular group Γ = C2 ∗ C3 ∼ = hx, y|x2 = y 3 = 1i into V . As the class of demonstrative groups is closed under passing to subgroups we will have then proven that any countable free group admits a demonstrative embedding into V . In [2] it is shown that the class of demonstrable groups for V is closed under passage to finite index overgroups, which will give us our final result. We begin by proposing an embedding ψ : G  V , where G = hα, β|α2 , β 3 i ∼ = Γ factors as the free product of its subgroups C2 = hαi and C3 = hβi. We will define the mapping ψ from G to V by determining where the generators α and β map to, and quoting von Dyck’s theorem. We now define ψ(α) 7→ a and ψ(β) 7→ b, where a and b are given by the tree-pairs below. 6 1 2 5 a 4 3 4 3 5 6 2 1 Figure 3: The image of α under ψ in Thompson’s group V 5 1 b 2 5 3 6 6 3 1 4 4 2 Figure 4: The image of β under ψ in Thompson’s group V An important property to notice is that ψ(α) = a maps the open set [10] to the open set [11110]. This dynamical property will be important later when we prove that the homomorphism ψ : G → V is an embedding. Similarly, we observe that both ψ(β) = b and (ψ(β))−1 = b−1 take the open set [111] and map it into the open set [10]. Remembering how the action of a maps [10] into [11110], we begin to see how a “back and forth” action could be produced by alternating non-trivial elements of ψ(C2 ) and ψ(C3 ). It is immediate that a has order two and b has order three, so by von Dyck’s theorem [25], the map ψ extends uniquely to a well defined group homomorphism from G to V , which we will still call ψ, below. Proposition 14. The group homomorphism ψ : C2 ∗ C3 → V induced by α 7→ a and β 7→ b is an embedding. 7 To prove Proposition 14 we use Fricke and Klein’s well known criterion, the Ping-Pong Lemma. The version we give here is based on the one found in [10]. Lemma 15 (Ping-Pong Lemma). Let G be a group acting on a set X and let H1 and H2 be two subgroups of G such that |H1 | ≥ 3 and |H2 | ≥ 2. Suppose there exists two non-empty subsets X1 and X2 such that the following three conditions hold 1. X2 6⊂ X1 2. for all non-trivial h1 ∈ H1 , h1 (X2 ) ⊂ X1 3. for all non-trivial h2 ∈ H2 , h2 (X1 ) ⊂ X2 Then hH1 , H2 i ∼ = H1 ∗ H2 . Lemma 16. The group Gψ = ha, bi ≤ V factors as hai ∗ hbi ∼ = Γ. Proof. To be able to use the Ping-Pong Lemma we have to find two sets X1 , X2 in C2 that satisfy the three properties given above. Let X1 = [10] and X2 = [111] be two open sets in C2 . Immediately we see that X2 6⊂ X1 and so the first condition is met. We now identify hbi and hai with the subgroups H1 and H2 given in lemma 15. Let a be the non-trivial element in hai as given in Figure 3. Observe (X1 )a = ([10])a = [11110] ⊂ [111] = X2 . This confirms the third requirement. For hbi we have two non-trivial elements, b and b−1 . Observe (X2 )b = ([111])b = [100] ⊂ [10] = X1 , and similarly for b−1 , (X2 )b−1 = ([111])b−1 = [1011] ⊂ [10] = X1 . Thus we have shown that all three of the requirements in lemma 15 are met and thus by the Ping-Pong Lemma Gψ = ha, bi factors as hai ∗ hbi ∼ = Γ. Before we proceed we define notation that will be used in the future. Suppose g ∈ Gψ where a and b are as before. Then g can be written in a unique normal form as g = g1 g2 g3 . . . gn where gi ∈ {a, b, b−1 } and if gj ∈ {a} then gj+1 ∈ {b, b−1 } and vice versa. This normal form is in fact geodesic, the shortest path from the identity to the element g in the cayley graph of Gψ . If we have two elements g, h ∈ Gψ written in normal form such that g = g1 g2 g3 . . . gn and h = h1 h2 . . . hm then gh = g1 g2 g3 . . . gn h1 h2 . . . hm ∈ Gψ is the concatenation of g and h. The element gh is also in normal form if and only if gn and h1 are not contained within the same subgroup, hai or hbi, of Gψ . For the rest of the paper, unless stated otherwise, we will assume that all our group elements are written in normal form. We define a function len : ha, bi → N0 by len(g) = n for any g = g1 g2 g3 . . . gn written in the normal form. This is the well defined geodesic length for g. We define the length of the identity to be zero. Lemma 17. Suppose g ∈ Gψ and len(g) ≥ 2. Then ( [111], if g ends with generator a [0]g ⊆ [10], if g ends with either of the generators b or b−1 (1) Proof. Let P(g) be the statement ( [111], if g ends with generator a [0]g ⊆ [10], if g ends with either of the generators b or b−1 for some g ∈ Gψ such that len(g) ≥ 2. We will proceed by induction on the length of g. Suppose g ∈ Gψ such that len(g) = 2. There are four options, namely, ab, ab−1 , ba and b−1 a. Suppose g = ab, then [0]g = [10011] and P(g) holds. Suppose g = ab−1 , then [0]g = [101111] and P(g) holds. Suppose g = ba, then [0]g = [1111010] and P(g) holds. Finally suppose g = b−1 a, then [0]g = [1110] and P(g) holds. Suppose P(g) is true for all g ∈ Gψ such that 2 ≤ len(g) ≤ n, n ∈ N. Now suppose h ∈ Gψ such that len(h) = n + 1. Let h0 be the prefix of length n of h when h is written in normal form. Suppose h0 ends with a, there are two options for h, either h = h0 b or h = h0 b−1 . As len(h0 ) = n, by our inductive assumption [0]h0 ⊆ [111]. Thus if h = h0 b, then [0]h = [0]h0 b ⊆ [111]b = [100] and P(h) is true. Suppose h = h0 b−1 , then [0]h = [0]h0 b−1 ⊆ [111]b−1 = [1011] and again P(h) is true. 8 Suppose instead that h0 ends with either b or b−1 . Then there is only one option for h, namely h = h0 a. As len(h0 ) = n, by our inductive assumption [0]h0 ⊆ [10]. Thus [0]h = [0]h0 a ⊆ [10]a = [11110] and P(h) is true. Therefore for all h ∈ Gψ such that len(h) = n + 1, the statement P(h) is true, and therefore by induction P(g) must be true for all g ∈ Gψ such that len(g) ≥ 2. Lemma 18. For every non-trivial g ∈ Gψ , [0] ∩ [0]g = ∅ Proof. Let Q(g) be the statement [0] ∩ [0]g = ∅, for some g ∈ Gψ . that len(g) = 1. There are three options, namely a, b and b−1 . [0]g = [11111] and Q(g) holds. Suppose g = b, then [0]g = [1010] Finally suppose g = b−1 , then [0]g = [110] and Q(g) holds. For all g ∈ Gψ such that len(g) ≥ 2, Q(g) is true by lemma 17. all non-trivial g ∈ Gψ . Suppose g ∈ Gψ such Suppose g = a, then and again Q(g) holds. Thus [0] ∩ [0]g = ∅ for Therefore, by lemma 12, we have the following corollary. ∼ Γ is a demonstrative subgroup of V Corollary 19. The group Gψ = The inclusion of the countable free groups in the class of demonstrative subgroups of V follows from part of Lemma 3.2 in [8] which is given below. Lemma 20 (3.2, Bleak, Salazar-Dı́az). Suppose that G is a demonstrative group with m serving as a demonstration node. Then given any subgroup H ≤ G, H is also demonstrative with demonstration node m. The free group on two generators F2 is isomorphic to the subgroup h[a, b], [a, b−1 ]i ≤ Gψ (where the bracket [x, y] represents the commutator x−1 y −1 xy), and therefore by Lemma 20 we have the following corollary. Corollary 21. The free group on two generators, F2 , is in the class D(V,C2 ) Virtually free groups are groups that contain a free group as a finite index subgroup. While it is known (see [21, 8]) that if a group G embeds in V , the any finite index over-group of G also embeds into V , the paper [2] extends this powerfully with Theorem 3.3, which we paraphrase below. Theorem 3.3 (Berns-Zieve et al) Suppose G is a group which embeds in R. Thompson’s group V . If G ≤ H where [H : G] = m, for some m ∈ N and G embeds as a demonstrative subgroup in V , then H also embeds as demonstrative subgroup of V . The theorem tells us that D(V,C2 ) is closed under taking finite index overgroups. As all countable free groups embed into F2 and since virtually free groups are, by definition, finite index overgroups of free groups, by Corollary 21 countable virtually free groups are contained within D(V,C2 ) . 2.2 Finitely generated demonstrable groups of V are virtually free In this section we prove a partial converse of our previous result. Lemma 22. If G is isomorphic to a demonstrative subgroup of Thompson’s Group V then G is virtually free. By the remarkable and well-known result of Muller and Schupp [19] [20] we know that the finitely generated virtually free groups are exactly those finitely generated groups that have a context free word problem, the CF-groups. To prove our lemma we must for any given finitely generated demonstrative group be able to construct a push-down automaton that accepts the word problem of that group. (See the Definition 9 for the definition of a push-down automaton) We begin with a motivating example and then generalise our method to encompass all the groups isomorphic to f.g. demonstrative subgroups of V . The example below is taken from [8] where they give a demonstrative embedding of Z generated by the element g given below in Figure 5. 9 3 1 g 4 2 2 3 1 4 Figure 5: The generator of a demonstrative copy of Z inside V . The demonstrative node is n = 0. ∼ Z be this demonstrative subgroup of V . A demonstrative node for G is Let G = hgi = at the address n = 0 ∈ {0, 1}∗ . It is already known that Z is a CF-group so our example gives us no new result, but the method we use to create the push-down automaton that accepts it’s word problem can be generalised for every f.g. demonstrative subgroup of V . Let A be our PDA that accepts the word problem of G. A has three states {q0 , qr , qa } where q0 is the start state and qa is the only accept state. Our stack alphabet is the set Γ = {#, 0, 1}, where # is a special bottom-of-the-stack symbol. We read in strings constructed from the generator g and it’s inverse g −1 . The PDA A is defined by the transition table given by Table 1 below. Current State q0 qa qa qr qr qr qr qr qr qr qr qr qr qr qr Input  g g −1 g g g g g g −1 g −1 g −1 g −1 g −1 g g −1 Stack Top ∅ 0 0 0 100 11 1010 1011 0 10 111 1100 1101 101# 110# Stack Replacement 0# 110 101 110 10 111 00 01 101 100 11 00 01 0# 0# New State qa qr qr qr qr qr qr qr qr qr qr qr qr qa qa Table 1: The transition table of the automaton accepting the word problem of G ∼ =Z We also provide a visual representation of A in Figure 6. The automata models the action of the generators on the demonstrative node 0. The stack will represent the location of the demonstrative node under the action of the word read so far. Whenever the automaton A processes a letter, it amends the stack according to the prefix replacement rules defined for the elements of V representing the letters g and g −1 . At all times, the top of the stack represents the beginning of the address in T2 of the node to which the previously processed word has moved the demonstration node n = 0. The automaton A begins with active state q0 by loading the stack with the address of the demonstrative node n = 0, and moving the active state to the accept state qa . Note that none of the input string is read at this time. Whenever the active state is qa , if A has finished reading the input then it accepts the word. However, if the active state is qa and there are still more letters to be read then A will process the next letter (which action will move the active state to qr and modify the stack according to the prefix replacement rules). From the state qr there are circumstances which allow the active state to return to 10 (g, 0, 110) (g, 100, 10) (g, 11, 111) (g, 1010, 00) (g, 1011, 01) q0 (, #, 0#) (g, 101#, 0#) (g −1 , 110#, 0#) qa (g −1 , 0, 101) (g −1 , 10, 100) (g −1 , 111, 11) (g −1 , 1100, 00) (g −1 , 1101, 01) qr (g, 0, 110) (g −1 , 0, 101) Figure 6: A graphical representation of the automata A that accepts the word problem of G. qa . Namely, whenever the active state is qr and A processes a letter and the resultant stack is “0#”, then the active state transitions to qa . By the definition of demonstration nodes, a demonstration node under the action of an element w of the demonstrative group is taken to itself if and only if w is the identity element. By construction, our automata has stack “0#” only when the previously processed word represents the trivial element. However, this is precisely at the times that the automaton’s active state is qa . We now generalise this method into a proof of Lemma 22. b is a finitely generated, demonstrable group, isomorphic to a demonstrative Proof. Suppose G subgroup G of Thompson’s Group V where G will be generated by elements {g1 , g2 , . . . , gm }. Suppose n ∈ {0, 1}∗ is a demonstrative node for G in T2 . Note that by Corollary 13 we can always find G such that n = 0. We describe and construct our automaton A below. −1 Let X = {g1 , g2 , . . . , gm } ∪ {g1−1 , g2−1 , . . . , gm }, the union of the set of generators of G and their inverses, be the input alphabet. Set Γ = {#, 0, 1} to be the stack alphabet. The new automaton A will also have three states q0 , qa and qr , where qa is the automaton’s only accept state. We will describe the transitions from each of these states. Transitions from q0 The automaton A begins in the state q0 . That state admits one transition, which loads the stack with the string n# ∈ Γ∗ , and transfers active state to the state qa , without reading any of the input. After this transition, the stack will contain the address of the demonstration node n and the bottom-of-the-stack symbol, with n written from top to bottom on the stack. For example if n = 100 then 1 would be at the top of the stack followed by two 0’s and finally #. We call this the loading phase. Transitions from qa After the loading phase, A enters the reading phase, where it begins to read the input string from X ∗ . Observe that the current stack is precisely “n#,” and this will be true whenever qa is the active state, by construction. From qa , there are transitions to the state qr , defined as follows. The transitions will be given by tuplets of the form (input letter, current top-of-stack, top-of-stack re-write): 1. Input letter: g ∈ X. 2. Current top of stack: the string “n”. 3. Stack re-write: The result of applying the prefix replacement determined by the element of V that the symbol g represents, to the string n. (Note: we will only list transitions of A which can actually arise. E.g., in our previous example we do not list transitions from qa with the top-of-stack beginning with a “1”.) Transitions from qr All transitions from qr take the active state to either qr or to qa . There is a finite list of pairs (stack, g) for stack representing the full stack, including the # symbol, and g a letter of our input alphabet, so that the result of applying the prefix replacement determined by the element αg ∈ V representing the input letter g to the whole 11 stack is “n#.” For such pairs, we add transitions as given by the tuple (g, stack, n#), which transitions move the active state to qa . We now discuss the transitions from qr to qr . For each g in our input alphabet, there is a set {s1 , s2 , . . . , sj } of minimal prefixes which determine the element αg of V corresponding to the letter g as a prefix replacement map, where we define the corresponding set of strings {t1 , t2 , . . . , tj } which are the replacement strings, so that si · αg = ti , for 1 ≤ i ≤ j indices. We add transitions given by the tuples (g, si , ti ) from qr to qr . Note that the non-determinism above allows poor choices that can result in the active state being qr at the end of reading the input, even though the stack will actually read “n#,” however, there will still be a path through the automaton which would have ended at qa for this input (literally, we could simply change the last choice taken). In our example, we removed the non-determinism by using the tuples (g, 1010, 00), (g, 1011, 01), (g −1 , 1100, 00), (g −1 , 1101, 01) instead of using the two tuples (g, 101, 0), (g −1 , 110, 0) that our process above produces. Note that we could force determinism in this general construction by using various carefully selected transitions, as in our example, but we felt our approach here was clearer. Termination. When we reach the end of the input string, if we are in qa , then the stack must be n# by construction, and the input string is equivalent to the identity in our group (by the definition of a demonstrative embedding). If the active state at end of input is qr then the word is rejected. If this happens, it means that either the stack is not “n#,” and so the element did not act as the identity, or if the stack is “n#,” then the automaton made poor choices in the face of non-determinism. Thus A accepts the word problem of G and rejects all other strings. References [1] Anatoly V. Anı̄sı̄mov. The group languages. Kibernetika (Kiev), 4:18–24, 1971. [2] Rose Berns-Zieze, Dana Fry, Johnny Gillings, Hannah Hoganson, and Heather Mathews. Groups with context-free co-word problem and embeddings into Thompson’s group V . arXiv:1407.7745v2, December 2014. [3] Jean-Camille Birget. The groups of Richard Thompson and complexity. Internat. J. Algebra Comput., 14(5-6):569–626, 2004. International Conference on Semigroups and Groups in honor of the 65th birthday of Prof. John Rhodes. [4] Collin Bleak, Hannah Bowman, Alison Gordon Lynch, Garrett Graham, Jacob Hughes, Francesco Matucci, and Eugenia Sapir. Centralizers in the R. Thompson group Vn . Groups Geom. Dyn., 7(4):821–865, 2013. [5] Collin Bleak, Martin Kassabov, and Francesco Matucci. Structure theorems for groups of homeomorphisms of the circle. Internat. J. Algebra Comput., 21(6):1007–1036, 2011. [6] Collin Bleak, Francesco Matucci, and Max Neunhöffer. Embeddings into Thompson’s group V and coCF groups. arXiv:1312.1855, December 2013. [7] Collin Bleak and Martyn Quick. On small presentations of R. Thompson’s group v. in preparation, 2015. [8] Collin Bleak and Olga Salazar-Dı́az. Free products in R. Thompson’s group V . Transactions of the American Mathematical Society, 365(11):5967–5997, November 2013. [9] Jim W. Cannon, William J. Floyd, and William R. Parry. Introductory notes on Richard Thompson’s groups. Enseign. Math. (2), 42(3-4):215–256, 1996. [10] Pierre de la Harpe. Topics in Geometric Group Theory, chapter II.B, page 25. University of Chicago Press, 2000. [11] Patrick Dehornoy. Geometric presentations for Thompson’s groups. J. Pure Appl. Algebra, 203(1-3):1–44, 2005. [12] Volker Diekert and Armin Weiß. Context-Free Groups and Bass-Serre Theory. ArXiv e-prints, 2013. [13] Derek F. Holt, Sarah Rees, Claas E. Röver, and Richard M. Thomas. Groups with context-free co-word problem. J. London Math. Soc. (2), 71(3):643–657, 2005. [14] Derek F. Holt and Claas E. Röver. Groups with indexed co-word problem. Internat. J. Algebra Comput., 16(no.5):985–1014, 2006. 12 [15] John E. Hopcroft and Jeffery D. Ullman. Introduction to Automata Theory, Languages and Computation, chapter 5 Push Down Automata, pages 114–115. Addison-Wesley Publishing Company, Reading, Massachusetts, 1979. [16] Jörg Lehnert. Gruppen von quasi-Automorphismen. PhD thesis, Goethe Universität, Frankfurt, 2008. [17] Jörg Lehnert and Paul Schweitzer. The co-word problem for the Higman-Thompson group is context-free. Bull. Lond. Math. Soc., 39(2):235–241, 2007. [18] Jörg Lehnert and Paul Schweitzer. personal e-mail communication. November 2009. [19] David E. Muller and Paul E. Schupp. Groups, the theory of ends, and context-free languages. Journal of Computer and System Sciences, 26:295–310, 1983. [20] David E. Muller and Paul E. Schupp. The theory of ends, pushdown automata, and second-order logic. Theoretical Computer Science, 37(1):51–75, 1985. [21] Claas Röver. Subgroups of finitely presented simple groups. PhD thesis, Pembroke College, University of Oxford, 1999. [22] Matatyahu Rubin. Locally moving groups and reconstruction problems. In Ordered groups and infinite permutation groups, volume 354 of Math. Appl., pages 121–157. Kluwer Acad. Publ., Dordrecht, 1996. [23] Olga Patricia Salazar-Dı́az. Thompson’s group V from a dynamical viewpoint. Internat. J. Algebra Comput., 20(1):39–70, 2010. [24] Richard J Thompson. Finitely presented groups of homeomorphisms. circulated handwritten notes, 1965. [25] Walther von Dyck. Gruppentheoretische studien. Mathematische Annalen, 20(1):1–44, 1882. 13
4math.GR
Coded Fourier Transform Qian Yu∗ , Mohammad Ali Maddah-Ali† , and A. Salman Avestimehr∗ Department of Electrical Engineering, University of Southern California † Nokia Bell Labs Abstract—We consider the problem of computing the Fourier transform of high-dimensional vectors, distributedly over a cluster of machines consisting of a master node and multiple worker nodes, where the worker nodes can only store and process a fraction of the inputs. We show that by exploiting the algebraic structure of the Fourier transform operation and leveraging concepts from coding theory, one can efficiently deal with the straggler effects. In particular, we propose a computation strategy, named as coded FFT, which achieves the optimal recovery threshold, defined as the minimum number of workers that the master node needs to wait for in order to compute the output. This is the first code that achieves the optimum robustness in terms of tolerating stragglers or failures for computing Fourier transforms. Furthermore, the reconstruction process for coded FFT can be mapped to MDS decoding, which can be solved efficiently. Moreover, we extend coded FFT to settings including computing general n-dimensional Fourier transforms, and provide the optimal computing strategy for those settings. I. I NTRODUCTION Discrete Fourier transform (DFT) is one of the fundamental operations, which has been broadly used in many applications, including signal processing, data analysis, and machine learning algorithms. Due to the increasing size and dimension of data, many modern applications require massive amount of computation and storage, which can not be provided by a single machine. Thus, finding efficient design of algorithms including DFT in a distributed computing environment has gained considerable attention. For example, several distributed DFT implementations, such as FFTW [1] and PFFT [2], have been introduced and used widely. A major performance bottleneck in distributed computing problems is the latency caused by “stragglers" [3], which are the small fraction of computing nodes at the high latency tail that prolongs the computation. Mitigating this effect involves creating certain types of “computation reduncancy”, such that the computation can be completed even without collecting the intermediate results assigned to the stragglers. For example, one can replicate the same computing task onto multiple nodes to provide this redundancy [4]. Recently, it has been shown that coding theoretic concepts that were originally developed for communication systems can also be useful in distributed computing systems, playing a transformational role by improving the performance of computation in various aspects. In this context, two “coded computing” concepts has been proposed: The first one, introduced in [5]–[7], injects computation redundancy in order to alleviate the communication bottleneck and accelerate distributed computing algorithms (e.g., Coded Terasort [8]). The second coded computing concept, introduced in [9], [10], utilizes coding to handle the straggler effects and speed up the computations for distributed matrix multiplication. This technique has been further extended to decentralized “masterless” architectures [11], distributed convolution [12], short dot linear transform [13] and gradient computation [14]. More recently, polynomial code [15] has been proposed for distributed massive matrix multiplication, for optimal straggler effect mitigation. It was shown that by designing a pair of codes, whose multiplicative product forms an Maximum Distance Separable (MDS) code, one can orderwise improve upon the prior arts in terms of the recovery threshold (i.e., the number of workers that the master needs to wait in order to be able to compute the final output), while optimizing other metrics including computation latency and communication load. This provides the first code that achieves the optimum recovery threshold. Furthermore, it allows mapping the reconstruction problem of the final output to polynomial interpolation, which can be solved efficiently, bridging the rich literature of algebraic coding and distributed matrix multiplication. Moreover, a variation of the polynomial code was applied to coded convolution, and its order-optimality has been proved. ... arXiv:1710.06471v1 [cs.DC] 17 Oct 2017 ∗ Fig. 1: Overview of the distributed Fourier transform framework. Coded data are initially stored distributedly at N workers according to data assignment. Each worker computes an intermediate result based on its stored vector and returns it to the master. By designing the computation strategy, the master can decode given the computing results from a subset of workers, without having to wait for the stragglers (worker 1 in this example). In this work, our focus is on mitigating the straggler effects for distributed DFT algorithms. Specifically, we consider a distributed Fourier transform problem where we aim to compute the discrete Fourier transform X = F{x} given an input vector x. As shown in Figure 1, the computation is carried out using a distributed system with a master node 1 and N worker nodes that can each store and process m ∗ fraction of the input vector, for some parameter m ∈ N . The vector stored at each worker can be designed as an arbitrary function of the input vector x. Each worker can also compute an intermediate result of the same length based on an arbitrary function of its stored vector, and return it to the master. By designing the computation strategy at each worker (i.e., designing the functions to store the vector and to compute the intermediate result), the master only need to wait for the fastest subset of workers before recovering the final output X, which mitigates the straggler effects. Our main result in this paper is the development of an optimal computing strategy, referred to as the coded FFT. This computing design achieves the optimum recovery threshold m, while allowing the the master to decode the final output with low complexity. Furthermore, we extend this technique to settings including computing multi-dimensional Fourier transform, and propose the corresponding optimal computation strategies. To develop coded FFT, we leverage two key algebraic properties of the Fourier transform operations. First due to its recursive structures, we can decompose the DFT into multiple identical and simpler operations (i.e., DFT over shorter vectors), which suits the distributed computing framework and can be potentially assigned to multiple worker nodes. Secondly, due to the linearity of Fourier transform, we can apply linear codes on the input data, which commutes with the DFT operation and translates to the computing results. These two properties allow us to develop a coded computing strategy where the outputs from the worker nodes has certain MDS properties, which can optimally mitigate straggler effects. II. S YSTEM M ODEL AND M AIN R ESULTS We consider a problem of computing the Discrete Fouier transform X = F{x} in a distributed computing environment with a master node and N worker nodes. The input x and the output X are vectors of length s over an arbitrary field F with a primitive sth root of unity, denoted by ωs .1 We want to compute the elements of the output vector, denoted by X0 , ..., Xs−1 , as a function of the elements of the input vector, denoted by x0 , ..., xs−1 , based on the following equations. Xi , s−1 X xj ωsij for i ∈ {0, . . . , s − 1}. (1) j=0 1 Each one of the N workers can store and process m fraction of the vector. Specifically, given a parameter m ∈ N∗ satisfying m|s, each worker i can store an arbitrary vector s ai ∈ F m as a function of the input x, compute an intermes diate result bi ∈ F m as a function of ai , and return bi to the server. The server only waits for the results from a subset of workers, before recovering the final output X using certain decoding functions, given these intermediate results returned from the workers. Given the above system model, we can design the functions to compute ai s’ and bi s’ for the workers. We refer to these functions as the encoding functions and the computing 1 When the base field F is finite, we assume it is sufficiently large. functions. We say that a computation strategy consists of N encoding functions and N computing functions, denoted by f = (f0 , f1 , ..., fN −1 ), (2) g = (g0 , g1 , ..., gN −1 ), (3) and that are used to compute the ai s’ and bi s’. Specifically, given a computation strategy, each worker i stores ai and computes bi according to the following equations: ai = fi (x), (4) bi = gi (ai ). (5) For any integer k, we say a computation strategy is krecoverable if the master can recover X given the computing results from any k workers using certain decoding functions. We define the recovery threshold of a computation strategy as the minimum integer k such that the computation strategy is k-recoverable. The goal of this paper is to find the optimal computation strategy that achieves the minimum possible recovery threshold, while allowing efficient decoding at the master node. This essentially provides the computation strategy with the maximum robustness against the straggler effect, which only requires a low additional computation overhead. We summarize our main results in the following theorems: Theorem 1. In a distributed Fourier transform problem of computing X = F{x} using N workers that each can store 1 and process m fraction of the input x, we can achieve the following recovery threshold K ∗ = m. (6) Furthermore, the above recovery threshold can be achieved by a computation strategy, referred to as the Coded FFT, which allows efficient decoding at the master node, i.e., with a complexity that scales linearly with respect to the size s of the input data. Moreover, we can prove the optimally of coded FFT, which is formally stated in the following theorem Theorem 2. In a distributed Fourier transform environment 1 with N workers that each can store and process m fraction of the input vector, the following recovery threshold K∗ = m (7) is optimal when the base field F is finite.2 Remark 1. The above converse demonstrates that our proposed coded FFT design is optimal in terms of recovery threshold. Moreover, we can prove that coded FFT is also optimal in terms of the communication load (see Section IV). Remark 2. While in the above results we focused on the developing the optimal coding technique for the one dimensional Fourier transform. The techniques developed in 2 Similar results can be generalized to the case where the base field is infinite, by taking into account of some practical implementation constrains (see Section IV). this paper can be easily generalized to the n-dimensional Fourier transform operations. Specifically, we can show that in a general n-dimensional Fourier transform setting, the optimum recovery threshold K ∗ = m can still be achieved, using a generalized version of the coded FFT strategy (see Section V). Similarly, this also generalized to the scenario where we aim to compute the Fourier transform of multiple input vectors. The optimum recovery threshold K ∗ = m can also be achieved (see Section VI). Remark 3. Although the coded FFT strategy was designed focusing on optimally handling the stragglers issues, it can also be applied to the fault tolerance computing setting (e.g., as considered in [16], [17], where a module can produce arbitrary error results under failure), to improve robustness to failures in computing. Specifically, given that the coded FFT produces computing results that are coded by an MDS code, it also enables detecting, or correcting maximum amounts errors even when the erroneous workers can produce arbitrary computing results. III. C ODED FFT: THE O PTIMAL C OMPUTATION S TRATEGY In this section, we prove Theorem 1 by proposing an optimal computation strategy, referred to as Coded FFT. We start by demonstrate this computation strategy and the corresponding decoding procedures through a motivating example. A. Motivating Example Consider a distributed Fourier transform problem with an input vector x = [x0 , x1 , x2 , x3 ] ∈ C4 , N = 4 workers, and a design parameter m = 2. We want to compute the Fourier transform X = F{x}, which is specified as follows.      1 1 x0 X0 √1 √1  x1  X1  1 − −1 −1 −1  .  = (8) X2  1 1 −1  x2  √−1 √ X3 1 −1 −1 − −1 x3 We aim to design a computation strategy to achieve a recovery threshold of 2. In order to design the optimal strategy, we exploit two key properties of the DFT operation. Firstly, DFT has the following recursive structure: Xi = 3 X √ xj (− −1)ij (9) j=0 = 1 X 1 X √ ik ik c0,k (−1) + (− −1)i c1,k (−1) , k=0 (10) k=0 where vectors c0 and c1 are the interleaved version of the input vector: c0 = [x0 , x2 ], (11) c1 = [x1 , x3 ]. (12) This structure decomposes the Fourier transform into two identical and simpler operations: the Fourier transform of c0 and c1 , defined as follows. Ci,j , 1 X jk ci,k (−1) . (13) k=0 Hence, computing the Fourier transform of a vector is essentially computing the Fourier transforms of its subcomponents. This property has been exploited in the context of single machine algorithms and led to the famous CooleyTukey algorithm [18]. On the other hand, we exploit the linearity of the DFT operation to inject linear codes in the computation to provide robustness against stragglers. Specifically, given that the Fourier transform of any linearly coded vector equals the linear combination of the Fourier transforms of the individual vectors, by injecting MDS code on the interleaved vectors c0 and c1 and computing their Fourier transforms, we obtain a coded version of the vectors C 0 and C 1 . This provides the redundancy to mitigate the straggler effects. Specifically, we encode c0 and c1 using a (3, 2)-MDS code, and let each worker store one of the coded vectors. I.e., a0 = c0 , (14) a1 = c1 , (15) a2 = c0 + c1 . (16) Each worker computes the Fourier transform bi = F{ai } of its assigned vector. Specifically, each worker i computes      bi,0 1 1 ai,0 = . (17) bi,1 1 −1 ai,1 To prove that this computation strategy gives a recovery threshold of 2, we need to design a valid decoding function for any subset of 2 workers. We demonstrate this decodability through a representative scenario, where the master receives the computation results from worker 1 and worker 2 as shown in Figure 2. The decodability for the other 2 possible scenarios can be proved similarly. According to the designed computation strategy, the server can first recover the computing result of worker 0 given the results from the other workers as follows: b0 = b2 − b1 . (18) After recovering b0 , we can verify that the server can then recover the final output X using b0 and b1 as follows:     b0,0√+ b1,0 X0 X1  b0,1 − −1 · b1,1    = (19) X2   b0,0 − b1,0  . √ X3 b0,1 + −1 · b1,1 B. General Description of Coded FFT Now we present an optimal computing strategy that achieves the optimum recovery threshold stated in Theorem 1, for any parameter values of N and m. First of all we s interleave the input vector x into m vectors of length m , Fig. 2: Example using coded FFT, with 3 workers that can each store and process half of the input. (a) Computation strategy: each worker i stores a linear combination of the interleaved version of the input according to an MDS code, and computes its DFT. (b) Decoding: master waits for results from any 2 workers, and recover the final output by first decoding the MDS code, then compute the transformed vector following the similar steps in the Cooley-Tukey algorithm. denoted by c0 , ..., cm−1 . Specifically, we let the jth element of each ci equal ci,j = xi+jm . (20) We denote the discrete Fourier transform of each interleaved vector ci , in the domain of Z ms , as C i . Specifically, s m −1 Ci,j , X ci,k ωsjkm for j ∈ {0, . . . , k=0 s − 1}. m (21) Note that if the master node can recover all the above Fourier transform C i of the interleaved vectors, the final output can be computed based on the following identities: Xi = m−1 X s m −1 X cj,k ωsi(j+km) (22) Cj, mod (i, ms ) ωsij , (23) j=0 k=0 = m−1 X j=0 s s ) denotes the remainder of i divided by m . where mod(i, m Based on this observation, we can naturally view the distributed Fourier transform problem as a problem of distributedly computing a list of linear transformations, i.e., computing the Fourier transform of ci ’s. We inject the redundancy as follows to provide robustness to the computation: We first encode the c0 , c1 , ..., cm−1 using an arbitrary (N, m)-MDS code, where the coded vectors are denoted a0 , ..., aN −1 and are assigned to the workers correspondingly. Then each worker i computes the Fourier of ai , and return it to the master. Given the linearity of Fourier transform, the computing results b0 , ..., bN −1 are essentially linear combinations of the Fourier transform C i ’s, which are coded by the same MDS code. Hence, after the master receives any m computing results, it can decode the message C i ’s, and proceed to recover the final result. This allows achieving the recovery threshold of m. Remark 4. The recovery threshold K ∗ = m achieved by coded FFT can not be achieved using computation strategies that were developed for generic matrix-by-vector multiplication in the literature [9], [13]. Specifically, the conventional uncoded repetition strategy requires a recovery threshold of N N − m 2 + 1, and the short-dot (or short-MDS) strategy N provided in [9], [13] requires N − m + m. Hence, by developing a coding strategy for the specific purpose of computing Fourier transform, we can achieve order-wise improvement in the recovery threshold. C. Decoding Complexity of Coded FFT Now we show that coded FFT allows an efficient decoding algorithm at the master for recovering the output. After receiving the computing results, the master needs to recover the output in two steps: decoding the MDS code and then computing X from the intermediate value C i ’s. For the first step, the master needs of decode an (N, m)s times. This can be computed efficiently, MDS code by m by selecting an MDS code with low decoding complexity for the coded FFT design. There has been various works on finding efficiently decodable MDS codes (e.g., [19], [20]). In general, an upper bound on the decoding complexity of (N, m)-MDS code is given by O(m log2 m log log m), which can be attained by the Reed-Solomon codes [21] and using fast polynomial interpolation [22] as the decoding algorithm. Consequently, the first step of the decoding algorithm has a complexity of at most O(s log2 m log log m), which scales linearly with respect to s. For the second step, the master node needs to evaluate equation (23) to recover the final result. Equivalently, the master needs to compute Xi+j ms = m−1 X s ik+jk m Ck,i ωs (24) k=0 s − 1} and j ∈ {0, ..., m − 1}. This for any i ∈ {0, 1, ..., m s is essentially the Fourier transform of m vectors of length m, where the kth element of the ith vector equals Ck,i ωsik . In most cases (e.g., F = C), the Fourier transform of a length m vector can be efficiently computed with a complexity of O(m log m), which is faster than the corresponding MDS decoding procedure used in the first step. In general, the computational complexity of Fourier transform is upper bounded by O(m log m log log m), which can be achieved by a combination of Bluestein’s algorithm and fast polynomial multiplication [23]. Hence, the complexity of the second step is at most O(s log m log log m). To conclude, our proposed coded FFT strategy allows efficient decoding with a complexity of at most O(s log2 m log log m), which is linear to the input size s. The decoding computation is bottlenecked by the first step of the algorithm, which is essentially decoding an (N, m)s times. To achieve the best performance, MDS code by m one can pick any MDS code with a decoding algorithm that requires the minimum amount of computation based on the problem scenatio [24]. IV. O PTIMALITY OF CODED FFT In this section, we prove Theorem 2 through a matching information theoretic converse. Specifically, we need to prove that for any computation strategy, the master needs to wait for at least m workers in order to recover the final output. Recall that Theorem 2 is stated for finite fields, we can let the input x be be uniformly randomly sampled from Fs . Given the invertibility of the Discrete Fourier transform, the output vector X given this input distribution must also be uniformly random on Fs . This means that the master node essentially needs to recover a random variable with entropy of H(X) = s log2 |F| bits. Note that each worker s s elements of F, providing at most m log2 |F| bits of returns m information. By applying a cut-set bound around the master, we can show that at least results from m workers need to be collected. Thus we have that the recovery threshold K ∗ = m is optimal. Remark 5. Besides the recovery threshold, communication load is also an important metric in distributed computing. The above cut-set converse in fact directly bounds the needed communication load for computing Fourier transform directly, proving that at least s log2 |F| bits of communication is needed. Note that our proposed coded FFT uses exactly this amount of communication to deliver the intermediate results to the server. Hence, it is also optimal in terms of communication. Remark 6. Although Theorem 2 focuses on the scenario where the base field F is finite, similar results can be obtained when the base field is infinite (e.g., F = C), by taking into account of the practical implementation constrains. For example, any computing device can only keep variables reliably with finite precision. This quantization requirement in fact allows applying the cut-set bound for the distributed Fourier transform problem, even when F is infinite, and enables proving the optimally of coded FFT in those scenarios. V. n- DIMENSIONAL C ODED FFT Fourier transform in higher dimensional spaces is a frequently used operation in image processing and machine learning applications. In this section, we consider the problem of designing optimal codes for this operation. We show that the coded FFT strategy can be naturally extended to this scenario, and achieves the optimum performances. We start by formulating the system model and state the main results. A. System Model and Main results We consider a problem of computing an n-dimensional Discrete Fourier transform T = F{t} in a distributed computing environment with a master node and N worker nodes. The input t and the output T are tensors of order n, with dimension s0 × s1 × ... × sn−1 . For brevity, we denote the total number of elements in each tensor by s, i.e., s , s0 s1 ...sn−1 . The elements of the tensors belong to a field F with a primitive sk th root of unity for each k ∈ {0, ..., n−1}, denoted by ωsk . We want to compute the elements of the output tensor T , denoted by {Ti0 i1 ...in−1 }i` ∈{0,...,si −1},∀`∈{0,...,n−1} , as a function of the elements of the input tensor, denoted by {ti0 i1 ...in−1 }i` ∈{0,...,si −1},∀`∈{0,...,n−1} , based on the following equations. Ti0 i1 ...in−1 , X tj0 j1 ...jn−1 j` ∈{0,...,si −1}, ∀`∈{0,...,n−1} n−1 Y ωsikkjk . (25) k=0 1 Each one of the N workers can store and process m fraction of the tensor. Specifically, given a parameter m ∈ N∗ satisfying m|s, each worker i can store an arbitrary vector s ai ∈ F m as a function of the input t, compute an intermedis ate result bi ∈ F m as a function of ai , and return bi to the server. The server only waits for the results from a subset of workers, before recovering the final output T using certain decoding functions, given these intermediate results returned from the workers. Similar to the one dimensional Fourier transform problem, we design the functions to compute ai s’ and bi s’ for the workers, and refer to them as the computation strategy. We aim to find an optimal computation strategy that achieves the minimum possible recovery threshold, while allowing efficient decoding at the master node. Our main results are summarized in the following theorems: Theorem 3. In an n-dimensional distributed Fourier transform problem of computing T = F{t} using N workers that 1 each can store and process m fraction of the input t, we can achieve the following recovery threshold K ∗ = m. (26) Furthermore, the above recovery threshold can be achieved by a computation strategy, referred to as the n-dimentional Coded FFT, which allows efficient decoding at the master node, i.e., with a complexity that scales linearly with respect to the size s of the input data. Moreover, we can prove the optimally of n-dimensional coded FFT, which is formally stated in the following theorem. Theorem 4. In an n-dimensional distributed Fourier transform environment with N workers that each can store and 1 process m fraction of the input vector from a finite field F, the following recovery threshold K∗ = m (27) is optimal.3 B. General Description of n-dimensional Coded FFT We first prove Theorem 3 by proposing an optimal computation strategy, referred to as n-dimensional Coded FFT, that achieves the recovery threshold K ∗ = m for any parameter values of N and m. First of all we interleave the input tensor t into m smaller s . Specifically, given tensors, each with a total size of m that m|s, we can find integers m0 , m1 , ..., mn−1 ∈ N, such that mk |sk for each k ∈ {0, 1, ..., n}, and for each tuple (i0 , i1 , ..., in−1 ) satisfying ik ∈ {0, 1, ..., mk − 1}, we define s1 s0 ×m × ... × msn−1 , a tensor ci0 i1 ...in−1 with dimension m 0 1 n −1 with the following elements: ci0 i1 ,...in−1 ,j0 j1 ,...jn−1 = t(i0 +j0 m)(i1 +j1 m)...(in−1 +jn−1 m) . (28) We denote the discrete Fourier transform of each interleaved tensor ci0 i1 ...in−1 by Ci0 i1 ...in−1 . Specifically, Ci0 i1 ,...in−1 ,j0 j1 ,...jn−1 , X (29) 0 ci0 i1 ,...in−1 ,j00 j10 ...jn−1 s j`0 ∈{0,..., mi −1}, i ∀`∈{0,...,n−1} n−1 Y j jk0 mk ωskk k=0 (30) si − 1}. for any j` ∈ {0, ..., m i Note that if the master node can recover all the above Fourier transform Ci0 i1 ...in−1 of the interleaved tensors, the final output can be computed based on the following identity: Ti0 i1 ...in−1 = X j` ∈{0,...,mi −1}, ∀`∈{0,...,n−1} Cj0 j1 ...jn−1 ,i00 i01 ...i0n−1 n−1 Y ωsikkjk , k=0 (31) i0` s` ). mod(i` , m ` Hence, we can view this distributed where = Fourier transform problem as a problem of computing a list of linear transformations, and we inject the redundancy using MDS code similar to the one dimensional coded FFT strategy. Specifically, we encode the ci0 i1 ...in−1 ’s using an arbitrary (N, m)-MDS code, where the coded tensors are denoted a0 , ..., aN −1 and are assigned to the workers correspondingly. Then each worker i computes the Fourier of tensor ai , and return it to the master. Given the linearity of Fourier transform, the computing results b0 , ..., bN −1 are essentially linear combinations of the Fourier transform Ci0 i1 ...in−1 ’s, which are coded by the same MDS code. Hence, after the master receives any m computing results, it can decode the message Ci0 i1 ...in−1 ’s, and proceed to recover the final result. This allows achieving the recovery threshold of m. In terms of the decoding complexity, n-dimensional coded FFT also requires first decoding an MDS code, and then recovering the final result by computing Fourier transforms of tensors with lower dimension. Similar to the one dimensional 3 Similar to the 1-dimensional case, this optimally can be generalized to base fields with infinite cardinally, by taking into account of some practical implementation constrains. FFT, the bottleneck of the decoding algorithm is also the first step, which requires decoding an (N, m)-MDS code by s m times. This decoding complexity is upper bounded by O(s log2 m log log m), which is linear with respect to the input size s. It can be further improved in practice by using any MDS code or MDS decoding algorithms with better computational performances. C. Optimally of n-dimensional Coded FFT The optimally of n-dimensional Coded FFT (i.e., Theorem 4) can be proved as follows. When the base field F is finite, let the input t be be uniformly randomly sampled from Fs . Given the invertibility of the n-dimensional Discrete Fourier transform, the output tensor T given this input distribution must also be uniformly random on Fs . Hence, the master node needs to collect at least H(T ) = s log2 |F| bits of information, where each worker can provide at most s m log2 |F| bits. By applying the cut-set bound around the master, we can prove that at least m worker needs to return their results to finish the computation. Moreover, the above converse can also be extended to prove that the n-dimensional Coded FFT is optimal in terms of communication. VI. C ODED FFT WITH MULTIPLE INPUTS Coded FFT can also be extended to optimally handle computation tasks with multiple inputs entries. In this section, we consider the problem of designing optimal codes for such scenario. A. System Model and Main results We consider a problem of computing the n-dimensional Discrete Fourier transform of q input tensors, in a distributed computing environment with a master node and N worker nodes. The inputs, denoted by t0 , t1 , ..., tq−1 , are q tensors of order n and dimension s0 × s1 × ... × sn−1 . For brevity, we denote the total number of elements in each tensor by s, i.e., s , s0 s1 ...sn−1 . The elements of the tensors belong to a field F with a primitive sk th root of unity for each k ∈ {0, ..., n − 1}, denoted by ωsk . We aim to compute the Fourier transforms of the input tensors, which are denoted by T0 , T1 , ..., Tq−1 . Specifically, we want to compute the elements of the output tensors according to the following equations. Th,i0 i1 ...in−1 , X j` ∈{0,...,si −1}, ∀`∈{0,...,n−1} th,j0 j1 ...jn−1 n−1 Y ωsikkjk . (32) k=0 1 Each one of the N workers can store and process m fraction of the entire input. Specifically, given a parameter m ∈ N∗ satisfying m|qs, each worker i can store an arbitrary qs vector ai ∈ F m as a function of the input tensors, compute qs an intermediate result bi ∈ F m as a function of ai , and return bi to the server. The server only waits for the results from a subset of workers, before recovering the final output using certain decoding functions. For this problem, we can find an optimal computation strategy that achieves the minimum possible recovery threshold, while allowing efficient decoding at the master node. We summarize this result in the following theorems: Theorem 5. For an n-dimensional distributed Fourier transform problem using N workers, if each worker can store 1 fraction of the q inputs, we can achieve the and process m following recovery threshold K ∗ = m. (33) Furthermore, the above recovery threshold can be achieved by a computation strategy, which allows efficient decoding at the master node, i.e., with a complexity that scales linearly with respect to the size s of the input data. Moreover, we prove the optimally of our proposed computation strategy, which is formally stated in the following theorem. Theorem 6. In an n-dimensional distributed Fourier transform environment with N workers that each can store and 1 fraction of the input vector, the following recovery process m threshold ∗ K =m (34) is optimal when the base field F is finite.4 B. General Description of Coded FFT with Multiple Inputs We prove Theorem 5 by proposing an optimal computation strategy that achieves the recovery threshold K ∗ = m. First of all we interleave the q inputs into smaller tensors. Specifically, given that m|qs, we can find integers m̃, m0 , m1 , ..., mn−1 ∈ N, such that m̃|q and mk |sk for each k ∈ {0, 1, ..., n}. For each input tensor th and each tuple (i0 , i1 , ..., in−1 ) satisfying ik ∈ {0, 1, ..., mk − 1}, we define s0 s1 a tensor ch,i0 i1 ...in−1 with dimension m ×m × ... × msn−1 , 0 1 n −1 with the following elements: ch,i0 i1 ,...in−1 ,j0 j1 ,...jn−1 = th,(i0 +j0 m)(i1 +j1 m)...(in−1 +jn−1 m) . (35) As explained in Section V-B, if the master node can obtain the Fourier transforms of all the interleaved tensors, then the final outputs can be computed efficiently. Hence, we can view this distributed Fourier transform problem as a problem of computing a list of linear transformations, and we inject the redundancy using MDS code similar to the single input coded FFT strategy. Specifically, we first bundle the q input tensors into m̃ disjoint subsets of same size. For convenience, we denote the set of indices for the ith subset by Si . Within each subset, we view all interleaved tensors with the same index parameter (i0 , i1 , ..., in−1 ) as one message symbol and we encode all the symbols using an arbitrary (N, m)-MDS code. More precisely, for each g ∈ {0, 1, ..., m̃ − 1} and each index parameter (i0 , i1 , ..., in−1 ), we create the following symbol 4 Similar to the single input case, this optimally can be generalized to base fields with infinite cardinally, by taking into account of some practical implementation constrains. {ch,i0 i1 ...in−1 }h∈Sg . There are m symbols in total and we encode them using an (N, m)-MDS code. We assign the N coded symbols to N workers, and each of them computes the Fourier transform of all coded tensors contained in the symbol. Given the linearity of Fourier transform, the computing results b0 , ..., bN −1 are essentially linear combinations of the Fourier transforms of the interleaved tensors, which are coded by the same MDS code. Hence, after the master receives any m computing results, it can decode all the needed intermediate values, and proceed to recover the final result. This allows achieving the recovery threshold of m. In terms of the decoding complexity, one can show that the bottleneck of the decoding algorithm is the decoding of s times, using similar arguments the (N, m)-MDS code by m mentioned in Section V. This decoding complexity is upper bounded by O(s log2 m log log m), which is linear with respect to the input size s. It can be further improved in practice by using any MDS code or MDS decoding algorithms with better computational performances. C. Optimally of Coded FFT with multiple inputs The optimally of our proposed Coded FFT strategy for multiple users (i.e., Theorem 6) can be proved as follows. When the base field F is finite, let the input tensors be be uniformly randomly sampled from Fq×s . Given the invertibility of the Discrete Fourier transform, the output tensors must also be uniformly random on Fq×s . Hence, the master node needs to collect at least qs log2 |F| bits of information, where each worker can provide at most qs m log2 |F| bits. By applying the cut-set bound around the master, we can prove that at least m worker needs to return their results to finish the computation. Moreover, the above converse also applies for proving the optimally of Coded FFT in terms of communication. VII. C ONCLUSIONS We considered the problem of computing the Fourier transform of high-dimensional vectors, distributedly over a cluster of machines. We propose a computation strategy, named as coded FFT, which achieves the optimal recovery threshold, defined as the minimum number of workers that the master node needs to wait for in order to compute the output. We also extended coded FFT to settings including computing general n-dimensional Fourier transforms, and provided the optimal computing strategy for those settings. There are several interesting future directions, including the practical demonstration of coded FFT over distributed clusters, generalization of coded FFT to more general master-less architectures, and extension of coded FFT to other computing architectures (e.g., edge and fog computing architectures [25]–[27]). VIII. ACKNOWLEDGEMENT This work is in part supported by NSF grant CIF 1703575, ONR award N000141612189, and a research gift from Intel. This material is based upon work supported by Defense Advanced Research Projects Agency (DARPA) under Contract No. HR001117C0053. The views, opinions, and/or findings expressed are those of the author(s) and should not be interpreted as representing the official views or policies of the Department of Defense or the U.S. Government. R EFERENCES [1] M. Frigo and S. G. Johnson, “The design and implementation of FFTW3,” Proceedings of the IEEE, vol. 93, no. 2, pp. 216–231, 2005. Special issue on “Program Generation, Optimization, and Platform Adaptation”. [2] M. Pippig, “Pfft: An extension of fftw to massively parallel architectures,” SIAM Journal on Scientific Computing, vol. 35, no. 3, pp. C213– C236, 2013. [3] J. Dean and L. A. Barroso, “The tail at scale,” Communications of the ACM, vol. 56, no. 2, pp. 74–80, 2013. [4] M. Zaharia, A. Konwinski, A. D. Joseph, R. H. Katz, and I. Stoica, “Improving MapReduce performance in heterogeneous environments,” OSDI, vol. 8, p. 7, Dec. 2008. [5] S. Li, M. A. Maddah-Ali, and A. S. Avestimehr, “Coded MapReduce,” 53rd Annual Allerton Conference on Communication, Control, and Computing, Sept. 2015. [6] S. Li, M. A. Maddah-Ali, Q. Yu, and A. S. Avestimehr, “A fundamental tradeoff between computation and communication in distributed computing,” to appear in IEEE Transactions on Information Theory, 2017. [7] Q. Yu, S. Li, M. A. Maddah-Ali, and A. S. Avestimehr, “How to optimally allocate resources for coded distributed computing?,” in 2017 IEEE International Conference on Communications (ICC), pp. 1–7, May 2017. [8] S. Li, S. Supittayapornpong, M. A. Maddah-Ali, and A. S. Avestimehr, “Coded terasort,” 6th International Workshop on Parallel and Distributed Computing for Large Scale Machine Learning and Big Data Analytics, 2017. [9] K. Lee, M. Lam, R. Pedarsani, D. Papailiopoulos, and K. Ramchandran, “Speeding up distributed machine learning using codes,” e-print arXiv:1512.02673, 2015. [10] K. Lee, C. Suh, and K. Ramchandran, “High-dimensional coded matrix multiplication,” in Information Theory (ISIT), 2017 IEEE International Symposium on, pp. 2418–2422, IEEE, 2017. [11] S. Li, M. A. Maddah-Ali, and A. S. Avestimehr, “A unified coding framework for distributed computing with straggling servers,” arXiv preprint arXiv:1609.01690, 2016. [12] S. Dutta, V. Cadambe, and P. Grover, “Coded convolution for parallel and distributed computing within a deadline,” arXiv preprint arXiv:1705.03875, 2017. [13] S. Dutta, V. Cadambe, and P. Grover, “Short-dot: Computing large linear transforms distributedly using coded short dot products,” in Advances In Neural Information Processing Systems, pp. 2100–2108, 2016. [14] R. Tandon, Q. Lei, A. G. Dimakis, and N. Karampatziakis, “Gradient coding,” arXiv preprint arXiv:1612.03301, 2016. [15] Q. Yu, M. A. Maddah-Ali, and A. S. Avestimehr, “Polynomial codes: an optimal design for high-dimensional coded matrix multiplication,” arXiv preprint arXiv:1705.10464, 2017. [16] J. Y. Jou and J. A. Abraham, “Fault-tolerant fft networks,” IEEE Transactions on Computers, vol. 37, pp. 548–561, May 1988. [17] S.-J. Wang and N. K. Jha, “Algorithm-based fault tolerance for fft networks,” IEEE Transactions on Computers, vol. 43, pp. 849–854, Jul 1994. [18] J. W. Cooley and J. W. Tukey, “An algorithm for the machine calculation of complex fourier series,” Mathematics of computation, vol. 19, no. 90, pp. 297–301, 1965. [19] F. Didier, “Efficient erasure decoding of reed-solomon codes,” arXiv preprint arXiv:0901.1886, 2009. [20] A. Soro and J. Lacan, “Fnt-based reed-solomon erasure codes,” in 2010 7th IEEE Consumer Communications and Networking Conference, pp. 1–5, Jan 2010. [21] R. Roth, Introduction to coding theory. Cambridge University Press, 2006. [22] K. S. Kedlaya and C. Umans, “Fast polynomial factorization and modular composition,” SIAM Journal on Computing, vol. 40, no. 6, pp. 1767–1802, 2011. [23] D. G. Cantor and E. Kaltofen, “On fast multiplication of polynomials over arbitrary algebras,” Acta Informatica, vol. 28, no. 7, pp. 693–701, 1991. [24] S. Baktir and B. Sunar, “Achieving efficient polynomial multiplication in fermat fields using the fast fourier transform,” in Proceedings of the 44th Annual Southeast Regional Conference, ACM-SE 44, (New York, NY, USA), pp. 549–554, ACM, 2006. [25] S. Li, Q. Yu, M. A. Maddah-Ali, and A. S. Avestimehr, “Edgefacilitated wireless distributed computing,” in Global Communications Conference (GLOBECOM), 2016 IEEE, pp. 1–7, IEEE, 2016. [26] S. Li, Q. Yu, M. A. Maddah-Ali, and A. S. Avestimehr, “A scalable framework for wireless distributed computing,” IEEE/ACM Transactions on Networking, 2017. [27] S. Li, M. A. Maddah-Ali, and A. S. Avestimehr, “Coding for distributed fog computing,” IEEE Communications Magazine, vol. 55, pp. 34–40, Apr. 2017.
7cs.IT
Efficient Similarity Search in Dynamic Data Streams Marc Bury, Chris Schwiegelshohn∗, Mara Sorella arXiv:1605.03949v2 [cs.DS] 23 Oct 2017 Sapienza, University of Rome, Italy The Jaccard index is an important similarity measure for item sets and Boolean data. On large datasets, an exact similarity computation is often infeasible for all item pairs both due to time and space constraints, giving rise to faster approximate methods. The |A∩B| algorithm of choice used to quickly compute the Jaccard index |A∪B| of two item sets A and B is usually a form of min-hashing. Most min-hashing schemes are maintainable in data streams processing only additions, but none are known to work when facing item-wise deletions. In this paper, we investigate scalable approximation algorithms for rational set similarities, a broad class of similarity measures including Jaccard. Motivated by a result of Chierichetti and Kumar [J. ACM 2015] who showed any rational set similarity S admits a locality sensitive hashing (LSH) scheme if and only if the corresponding distance 1 − S is a metric, we can show that there exists a space efficient summary maintaining a (1±ε) multiplicative approximation to 1−S in dynamic data streams. This in turn also yields a ε additive approximation of the similarity. The existence of these approximations hints at, but does not directly imply a LSH scheme in dynamic data streams. Our second and main contribution now lies in the design of such an LSH scheme maintainable in dynamic data streams. The scheme is space efficient, easy to implement and to the best of our knowledge the first of its kind able to process deletions. ∗ Supported by Deutsche Forschungsgemeinschaft within the Collaborative Research Center SFB 876, project A2 1 1. Introduction Similarity measures between two bit-vectors are a basic building block for many data analysis tasks. In this paper, we focus on the Jaccard similarity defined as |A∩B| |A∪B| for two item sets A and B, encountered in a wide range of applications such as clustering [22], plagiarism detection [8], association rule mining [12], collaborative filtering [15] and web compression [11]. Though many algorithms assume a fast, black-box access to similar items to be available, such an assumption is not realistic for large datasets encountered in web-applications. Instead of explicitly computing, storing, and repeatedly querying a similarity matrix, much work has been done on quickly finding the most interesting pairs, which typically are pairs of high similarity. The aim therefore is to produce high similarity pairs in subquadratic and ideally linear time. One of the major approaches in this direction is approximate nearest neighbor search schemes via locality sensitive hashing (LSH). Here, we design hash functions for which similar item sets collide with high probability and dissimilar items collide with low probability in order to filter out low similarities from a range of candidate pairs. Motivation and Contribution We study sketching methods for Jaccard based nearest neighbor search in the streaming setting. To be applicable in a big data setting, we will be contend to have an approximate solution with stringent storage constraints. More specifically, we assume that we are given n sets of items from a universe consisting of d items and process information on item membership in a streaming fashion. The widespread min-hashing approach introduced by Broder [5], which is also a specific example of locality sensitive hashing, can be implemented in insertiononly streams, with appealing properties from both a compression and running time perspective. A natural question is whether a similar approach can be developed for more general streaming models such as dynamic streams. Here, updates can also remove an item from a set. Such streams arise naturally when the sets evolve over time. For instance, when classifying web sites based on term occurrences or when measuring similarities via incoming and outgoing links, a nearest neighbor data structure ideally should be able to process deletions. In this paper, we initiate the study of dynamic locality sensitive hashing from a theoretical perspective and also outline how to efficiently implement an algorithm for this problem. In a first step, we show that the Jaccard distance 1 − |A∩B| |A∪B| can be (1 ± ε)-approximated in dynamic streams. Moreover, the compression used in this approximation is a black-box application of `0 sketches. This allows for extremely efficient algorithms from both a theoretical and practical point of view. Known lower bounds on space complexity of set intersection prevent us from achieving a compression with multiplicative approximation ratio for Jaccard similarity, see for instance [29]. From the multiplicative approximation for Jaccard distance we nevertheless get an ε-additive approximation to Jaccard similarity, which may be sufficient if the interesting similarities are assumed to exceed a given threshold. However, even with this assumption, such a compression falls short of the efficiency we are aiming for, as it is not clear that the relevant similarities can be found more quickly than by evaluating all similarities. Our main contribution lies now in developing a compression that simultaneously supports locality sensitive hashing while satisfying a weaker form of approximation ratio. The construction is inspired by bit-hashing techniques used both by `0 sketches and min-hashing. In addition, our approach can be extended to other similarities admitting LSHs other than min-hashing, such as Hamming, Anderberg, and Rogers-Tanimoto similarities. This approach has provable bounds that, despite being weaker than `0 sketches from an approximation point of view, is extremely simple to implement. Moreover, our experimental evaluation shows good practical compression rates. 2 1.1. Related Work Min-Hashing Min-hashing is the state of the art technique for fast approximate Jaccard similarity search. Roughly speaking, min-hashing computes a fingerprint of a binary vector by permuting the entries and storing the first non-zero entry. For two item sets A and B, the probability that the fingerprint is identical is equal to the Jaccard similarity of A and B. In practice, a random hash function satisfying certain conditions is sufficient instead of a random permutation of the entries. When looking for item sets similar to some set A, one can arrange multiple fingerprints to filter out sets of small similarity while retaining sets of high similarity, see Cohen et al. [12] and Section 2 for more details. The approach was pioneered by Broder et al. [5, 8, 6], and has since received much attention in both theory and practice. Many papers focused on the design and analysis of random hash functions, see for instance [7, 23, 19]. While min-wise independent hash functions give the best performance in theory, they are often considered infeasible to store. Thorup [32] showed that the more space efficient 2-wise independent hash functions work well. Other work focused on the efficiency of computing fingerprints. For instance, a faster estimation of similarity is possible by storing the k smallest non-zero entries, see Cohen and Kaplan [13, 14]. Li and König [27] introduced b-bit hashing to further reduce the size of fingerprints. From a more general perspective, min-hashing is a form of locality sensitive hashing introduced by Indyk and Motwani [24], see also the follow up paper by Gionis, Indyk and Motwani [21] and an overview by Andoni and Indyk [2]. The connection was first drawn by Charikar [9] who gave hashing constructions for related similarity measures. Moreover, he showed that if a similarity measure S admits an LSH, 1 − S is a metric. This condition was later shown to be sufficient for rational set similarities by Chierichetti and Kumar [10], see also Theorem 1. Min-hashing has also featured in other computational models such as parallel algorithms [31], sliding windows [17], and distributed frameworks like MapReduce [34]. Vector Sketching Sketching frequency moments and `p norms of vectors is arguably the most studied problem in theoretical streaming literature. The problem was formally posed in the seminal paper by Alon, Matias and Szegedy [1], which introduced the streaming model and gave upper and lower bounds for a variety of frequency moments and `p norms of vectors whose entries are continuously modified as the stream progresses. For an even earlier treatment of the related task of approximate counting in a stream we refer to Flajolet and Martin [20]. With respect to space, there exist optimal or nearly optimal algorithms for most values of p in the turnstile model, i. e., in particular for deletions. For the purpose of this paper, the number of non zero elements also known as the Hamming norm1 (`0 ) and the Euclidean norm (`2 ) are most relevant. In addition to the space requirements, the best known algorithms for these norms admit constant update times, see Kane, Nelson and Woodruff [26] for `0 and Thorup and Zhang [33] for `2 . The number of distinct elements, a quantity closely related to the Hamming norm, has been previously used by Beyer et al. [4] and Dasu et al. [16] to estimate Jaccard similarity but without being able to process deletions. Recently, Bachrach and Porat [3] reduced Jaccard similarity to the estimation of the second frequency moment (i. e., squared Euclidean norm) if the items are sufficiently similar. This approach can also process deletions with good update times and space bounds, but does not seem to admit a fast locality sensitive hashing scheme. 1.2. Approach and Techniques The most similar previous work is due to Bachrach and Porat [3]. For any given `p vector norm, they observed that `p (a − b)p = |A 4 B| = |A ∪ B| − |A ∩ B|, where a and b are the characteristic binary 1 `0 is strictly speaking not a norm but often referred to as such. 3 vectors of A and B respectively. Provided that |A∩B| |A∪B| ≥ t ≥ 1/2, a sufficiently good estimation p of `p (x − y) leads to a good estimation of the Jaccard similarity. In principle, any `p sketch could then be used to estimate the above quantity. By employing the most efficient `2 sketch available [33], Bachrach and Porat obtained a (1 ± ε)-approximation to the similarity of two items 2 with d dimensional features with O( (1−t) log d) bits of space and constant update time when the ε2 similarity is assumed to be at least 1/2. In this paper, we base our compression around `0 sketches instead of `2 . Motivated by the connection between LSHable rational set similarities S and properties of their distance functions [9, 10], we first study approximate estimations of distances 1 − S. It is not too difficult to show that all rational set similarities with metric distances can be (1 ± ε)-approximated based on `0 sketches. Moreover, other `p sketches do not seem to be able to provide similar guarantees. In a second step, we aim to provide compressions that can be inputted into an appropriate LSH. The characterization of Chierichetti and Kumar [10] (see also Theorem 1) does not imply that the sketched vectors produced by an `0 approximating algorithm admit an LSH, or even an approximate LSH, nor is this likely to be true. However, all known `0 sketches retain indexes akin to the fingerprints of min-hashing. These indexes themselves satisfy certain forms of sensitivity. Specifically, we can show that roughly log d appropriately chosen indexes have a lopsided sensitivity |A∩B| guarantee for the scaled Hamming similarity |A∩B| and Rogers-Tanimoto similarity d+|A4B| , among d others. For other rational set similarities (including Jaccard), the indexes themselves are only sensitive if they have been chosen depending on the cardinalities of two candidate sets A and B. We therefore independently retain indexes for various possible cardinalities for each item set. When we search for item sets similar to some set A, we first filter out all set with too large or too small cardinality and run a LSH on the set of indexes we know to be sensitive. Note that these indexes can be easily identified as we can maintain the exact cardinality of any set in dynamic data stream via counting. For the analysis, we only require Tchebycheff’s inequality. This allows us to employ 2-wise independent hash functions with many appealing properties (see also Thorup [32]). They can be evaluated quickly, are easy to implement and require little additional storage. Our experiments corroborate these findings and indicate (potential) applicability of our approach. 1.3. Preliminaries Our item sets are subsets of some universe U of cardinality d. The symmetric difference of two sets A, B ⊆ U is A 4 B = (A \ B) ∪ (B \ A). The complement is denoted by A = U \ A. A symmetric function S : U × U → [0, 1] with S(A, A) = 1 for all A ∈ U is a similarity. Given x, y ≥ 0 and 0 ≤ z ≤ z 0 , the rational set similarity Sx,y,z,z 0 between two non-empty item sets A and B is Sx,y,z,z 0 (A, B) = x · |A ∩ B| + y · |A ∪ B| + z · |A 4 B| x · |A ∩ B| + y · |A ∪ B| + z 0 · |A 4 B| α α for if it is defined and 1 otherwise. A root similarity is defined as Sx,y,z,z 0 := 1 − (1 − Sx,y,z,z 0 ) any 0 < α ≤ 1. We denote numerator and denominator of a rational set similarity by N (A, B) and D(A, B), respectively. For some arbitrary but fixed order of the elements, we represent A via its d d is defined as characteristic qP vector x ∈ {0, 1} with xi = 1 iff i ∈ A. The `p -norm of a vector x ∈ d p `p (x) = p i=1 |xi | . Taking the limit of p to 0, `0 (x) is exactly the number of non-zero entries, i. e., `0 (x) = |{i | xi 6= 0}|. An LSH for a similarity measure S : U ×U → [0, 1] is a set of hash functions H on U with an associated probability distribution such that Pr [h(A) = h(B)] = S(A, B) for h drawn from H and any two item sets A, B ⊂ U . We will state our results in a slightly different manner. A (r1 , r2 , p1 , p2 )-sensitive hashing scheme for a similarity measure aims to find a distribution over a family of hash functions H such that for h drawn from H and two item sets A, B ⊆ U we have R 4 Pr [h(A) = h(B)] ≥ p1 if S(A, B) ≥ r1 and Pr [h(A) = h(B)] ≤ p2 if S(A, B) ≤ r2 . The former definition due to Charikar [9] is a special case of the latter definition due to Indyk and Motwani [24], though the notions behind both are essentially the same. We choose to phrase our results via the second definition as the lopsided approximation bounds of our algorithms are more easy to present in terms of (r1 , r2 , p1 , p2 )-sensitivity. 2. Algorithm and Analysis We start off by showing that any rational set similarity with an LSH can be (1 ± )-approximated in dynamic streams. First, we require the following characterization of such similarity measures. Theorem 1. Let x, y, z, z 0 > 0. Then the following three statements are equivalent. 1. Sx,y,z,z 0 has an LSH. 2. 1 − Sx,y,z,z 0 is a metric. 3. z 0 ≥ max(x, y, z). (1)⇒(2) was shown by Charikar [9], (2)⇒(1) was shown by Chierichetti and Kumar [10] and (2)⇔(3) was proven by Janssens [25]. With this characterization, we are able to prove the following. Theorem 2. Given a constant 0 < ε ≤ 0.5, two item sets A, B ⊆ U and some rational set similarity Sx,y,z,z 0 with metric distance function 1 − Sx,y,z,z 0 , there exists a dynamic streaming algorithm that maintains a (1 ± ε) approximation to 1 − Sx,y,z,z 0 (A, B) with constant probability. The algorithm uses O( ε12 log d) space and each update and query requires O(1) time. Proof. We start with the observation that |A4B| = `0 (a−b) and |A∪B| = `0 (a+b), where a and b are the characteristic vectors of A and B, respectively. Since D(A, B) − N (A, B) = (z 0 − z) · |A 4 B| is always non-negative due to z 0 > z, we only have to prove that D(A, B) is always a non-negative linear combination of terms that we can approximate via sketches. First, consider the case x ≥ y. Reformulating D(A, B), we have D(A, B) = y · n + (x − y) · |A ∪ B| + (z 0 − x) · |A 4 B|. Then both numerator and denominator of 1 − Sx,y,z,z 0 can be written as a non-negative linear combination of n, |A 4 B| and |A ∪ B|. Given a (1 ± ε) of these terms, we have an upper bound of 1+ε 1−ε 2 1−ε ≤ (1 + ε) · (1 + 2ε) ≤ (1 + 5ε) and a lower bound of 1+ε ≥ (1 − ε) ≥ (1 − 2ε) for any ε ≤ 0.5. Now consider the case x < y. Using a different reformulation D(A, B) = (y − x) · (n − |A ∩ B|) + x · n + (z 0 − y) · |A 4 B| = (y − x) · |A ∪ B| + x · n + (z 0 − y) · |A 4 B|, we can write the denominator as a non-negative linear combination of |A 4 B|, n and |A ∪ B|. Dynamic updates can maintain an approximation of |A 4 B| and |A ∪ B|, leading to upper and lower bounds on the approximation ratio analogous to those from case x ≥ y. By plugging in the `0 sketch of Kane, Nelson, and Woodruff (Theorem 10 of [26]) and rescaling ε by a factor of 5, the theorem follows2 . Using a similar approach, we can approximate the distance of root similarity functions admitting a locality hashing scheme. We first repeat the following characterization. 2 The exact space bounds of the `0 sketch by Kane, Nelson and Woodruff depends on the magnitude of the entries of the vector. The stated space bound is sufficient for the purposes in this paper. 5 α Theorem 3 (Theorem 4.8 and 4.9 of [10]). The root similarity Sx,y,z,z 0 is LSHable if and only if α+1 0 0 z ≥ 2 max(x, y) and z ≥ z. Theorem 4. Given a constant 0 < ε ≤ 0.5, two item sets A, B ⊆ U and some LSHable root simiα larity Sx,y,z,z 0 , there exists a dynamic streaming algorithm that maintains a (1±ε) approximation to α 1 − Sx,y,z,z 0 (A, B) with constant probability. The algorithm uses O( ε12 log d) space and each update and query requires O(1) time. Proof. We consider the case x ≥ y, the case y ≥ x can be treated analogously. Again we will show that we can (1 ± ε)-approximate the denominator; the remaining arguments are identical to those of Theorem 2. Consider the following reformulation of the denominator D(A, B) = y · n + (x − z 0 ) · |A ∩ B| + (z 0 − y) · |A ∪ B|. We first note that we can obtain an estimate of |A ∩ B| in a dynamic data stream with additive \ \ approximation factor ε · |A ∪ B| by computing |A| + |B| − |A ∪ B|, where |A ∪ B| is a (1 ± ε)approximation of |A ∪ B|. 0 0 Due to Theorem 3, we have x − z 0 ≤ 2 · z 0 − z 0 ≤ z 0 and either z 0 − y ≥ z2 or y ≥ z2 . Hence ε · (x − z 0 ) ≤ ε · z 0 ≤ 2ε · max(z 0 , (z 0 − y)). Since further n ≥ |A ∪ B|, we then obtain a (1 ± 2ε)approximation to the denominator. Rescaling ε completes the proof. Remark 1. Theorems 2 and 4 are not a complete characterization of distance functions induced by similarities that can be (1 ± ε)-approximated in turnstile streams. Consider, for instance, the |A4B| Sørenson-Dice coefficient S2,0,0,1 = 2·|A∩B| |A|+|B| with 1 − S2,0,0,1 = |A|+|B| . Neither is 1 − S2,0,0,1 a metric, nor do we have z 0 ≥ α+1 2 x for any α > 0. However, both numerator and denominator can be approximated using `0 sketches. The probability of success can be further amplified to 1 − δ in the standard way by taking the median estimate of O(log(1/δ)) independent repetitions of the algorithm. For n item sets, we then get the following corollary. Corollary 1. Let S be a rational set similarity with metric distance function 1 − S. Given a dynamic data stream consisting of updates of the form (j, i, v) ∈ [n] × [d] × {−1, +1} meaning that (j) (j) xi = xi + v where x(j) ∈ {0, 1}d with j = 1, . . . , n, there is a streaming algorithm that can compute with constant probability for all pairs (j, j 0 ) 0 • a (1 ± ε) multiplicative approximation of 1 − S(xj , xj ) and 0 • an -additive approximation of S(xj , xj ). The algorithm uses O(n log n · ε−2 · log d) space and each update and query needs O(log n) time. We note that despite the characterization of LSHable rational set similarities of Theorem 1, Corollary 1 does not imply the existence of a locality sensitive hashing scheme or even an approximate locality sensitive hashing scheme on the sketched data matrix. In the following, we will present a simple dynamic streaming algorithm that possesses such a guarantee, albeit with weaker approximation ratios. While a black box reduction from any `0 sketch seems unlikely, we note that most `0 algorithm are based on bit-sampling techniques similar to those found in min-hashing. Our own algorithm is similarly based on sampling a sufficient number of item indexes from each item set. Given a suitably filtered set of candidates, these indexes are then sufficient to infer the similarity. Let Sk ⊆ U be a random set of elements where each element is included with probability 2−k . Further, for any item set A, denote Ak = A ∩ Sk . At the heart of the algorithm now lies the following technical lemma. 6 Lemma 1. Let 0 < ε, δ, r < 1 be constants. Let A and B be two item sets and let D(A, B) and N (A, B) denote the denominator and the numerator of a metric rational set similarity S(A, B) with parameters x, y, z, z 0 . Note that in S(Ak , Bk ) the value of n is replace by the size of Sk . Then the following two statements hold.   (ε/5)2 δrN (A, B) 1. If S(A, B) ≥ r and k ≤ log we have max{x + y, z 0 + y, z + y} (1 − ε)S(A, B) ≤ S(Ak , Bk ) ≤ (1 + ε)S(A, B) with probability at least 1 − 2δ. √ 2. The probability that S(Ak , Bk ) is by factor of 1/(δ(1 − ε/5 r) larger than S(A, B) is bounded from above by 2δ. Proof. Let Dk = D(Ak , Bk ), Nk = N (Ak , Bk ), and Xi = 1 iff i ∈ Sk . If S(A, B) ≥ r then D(A, B) ≥ rN (A, B). Thus, we have E [Dk ] = D(A, B)/2k ≥ rN (A, B)/2k and E [Nk ] = N (A, B)/2k . Moreover, we can bound Var [Dk ]: Var y|Sk | + (z − y) · |Ak 4 BP k |] P[(x − y) · |Ak ∩ Bk | +P = x2 i∈A∩B Var [Xi ] + y 2 i∈U \A∪B Var [Xi ] + z 2 i∈A4B Var [Xi ]  ≤ (x2 − y 2 )|A ∩ B| + y 2 n + (z 2 − y 2 )|A 4 B| /2k ≤ max{x + y, z + y, y} · E [Dk ] and Var [Nk ] ≤ max{x + y, z 0 + y, y} · E [Nk ] . Using Tchebycheff’s inequality we have Pr [|Dk − E [Dk ] | ≥ εE [Dk ]] ≤ max{x + y, z + y, y} · 2k max{x + y, z + y, y} ≤ , 2 ε E [Dk ] ε2 rN (A, B) Pr [|Nk − E [Nk ] | ≥ εE [Nk ]] ≤ max{x + y, z 0 + y, y} max{x + y, z 0 + y, y} · 2k ≤ . ε2 E [Nk ] ε2 N (A, B) and  ε2 δrN (A, B) If k ≤ log then both |Dk − E [Dk ] | ≤ εE [Dk ] and |Nk − E [Nk ] | ≤ max{x + y, z 0 + y, z + y, y} εE [Nk ] hold with probability at least 1 − 2δ. Then we can bound S(Ak , Bk ) = Dk /Nk from above by D(A, B)/2k + εD(A, B)/2k 1+ε = · S(A, B). k k 1−ε N (A, B)/2 − εN (A, B)/2  Analogously, we can bound S(Ak , Bk ) from below by 1−ε 1+ε · S(A, B). Applying a union bound on both events and rescaling ε as in the proof of Theorem 2 concludes the proof of the first statement. For the second statement, we can not use Tchebycheff’s inequality for bounding the probability that Dk is too large as the expectation of Dk can be very small because we have no lower bound on the similarity. But it is enough to bound the probability that Dk is greater than or equal to (1/δ) · E [Dk ] by δ using Markov’s inequality. With the same arguments as above, we have that 2 rδ √ the probability of Nk ≤ (1 − ε0 ) · E [Nk ] is bounded by (ε/5) which is equal to δ if ε0 = ε/5 · r. ε02 Putting everything together we have that S(Ak , Bk ) ≤ 1/δ √ · S(A, B) 1 − (ε/5) · r with probability at least 1 − 2δ. 7 For practical purposes, Sk does not have to be a fully random chosen set of items. Instead, we may use a universal hash function. The only parts of the analysis that could be affected are the bounds on the variances, which continue to hold if the hash function is pairwise independent. Applying this lemma on a few better known similarities gives us the following corollary. More examples of rational set similarities can be found in Naish, Lee and Ramamohanarao [28]. Corollary 2. For the following similarities the following values of k are sufficient to apply Lemma 1:  Jaccard x = 1, y = 0, z = 0, z 0 = 1 k = log ε2 δr|A|   2 ε δrd 0 Hamming x = 1, y = 1, z = 0, z = 1 k = log  2 2  ε δr|A| Anderberg x = 1, y = 0, z = 0, z 0 = 2 k = log  23  ε δrd Rogers-Tanimoto x = 1, y = 1, z = 0, z 0 = 2 k = log 3 For Hamming and Rogers-Tanimoto similarities, this is already sufficient to run a black box LSH algorithm if the number of sampled items are chosen via Corollary 2. For Jaccard and Anderberg similarities, the sample sizes depend on the cardinality of A, which requires an additional preprocessing step. The following algorithm and analysis has a particular focus on Jaccard, but can be generalized to work for any metric rational set similarity with x ≥ y. The case x < y requires further modifications. Since we are not aware of any metric rational set similarities with practical applications in which x < y, we omit this description. For each item, we maintain the cardinality, which can be done exactly in a dynamic stream via counting. If the sizes of two items A and B differ by a factor of at least r1 , i. e., |A| ≥ r1 · |B|, then the distance between these two sets has to be 1 − S(A, B) = |A 4 B| |A| − |B| ≥ ≥ 1 − 1/r1 . |A ∪ B| |A| As a first filter, we discard any item set with cardinality not in the range of [r1 ·|A|, r11 |A|]. Further, for each item set, we retain a sample of indexes for all values of k as described in Lemma 1. If k is too small, this might result in a large, i. e., infeasible number of indexes to store. However, if k is of order log |A| or larger, the number of non-zero sampled indexes will not exceed some constant c. Therefore, we use an additional hash function hashing the sampled indexes into [c2 ], buckets, where each bucket contains the sum of the entries hashed to it. For the interesting values of k, these entries will then be perfectly hashed and for the smaller values, the space is reduced to a constant. A similar technique was used by Kane, Nelson and Woodruff [26] to maintain a (rough) constant approximation to the `0 -norm of a vector over the entire stream. For a pseudocode of this approach, see Algorithms 1 and 2. Theorem 5. Let 0 < ε, δ, r1 , r2 < 1 be parameters. Given a dynamic data stream over n item sets from a universe of cardinality d, there exists an algorithm that maintains a (r1 , r2 , (1−ε)r1 , r2 /(δ(1− √ ε/5 r1 ))-sensitive LSH for Jaccard similarity with probability 1 − δ. The algorithm uses O(n · ε−3 · r1−6 · δ −2 · log d) space. Proof. Fix items sets A and B and let j, j 0 be the corresponding indices for set A and B, respectively. Set p = (ε/5)2 · r1 · δ. If sim(A, B) > r1 then r1 ≤ |A|/|B| ≤ 1/r1 . Let Sk be a subset of indices as determined by line 4 of Algorithm 1 and Ak = Sk ∩ Sk , Bk = Sk ∩ B. For some fixed k ≤ log(p · |A|), denote the event E that |Ak ∪ Bk | ≤ 1/(p · r1 ) + 1/(p · r12 ) which holds with probability 1 − 2δ, see also Lemma 1 and Corollary 2. By setting the number of buckets in the 2 order of c2 = √1δ 1/(p · r1 ) + 1/(p · r12 ) ∈ O(1/(δ · p2 · r14 )) and conditioning under E, the elements 8 Algorithm 1: Filter-Preprocessing input : Parameters c ∈ (j) output: Bk,l with j ∈ [n], k ∈ [0, . . . , log d], l ∈ [c2 ] N 1 2 3 4 (j) Initialize sj = 0 for all j ∈ [n], Bk,l = 0 for all j ∈ [n], k ∈ [0, . . . , log d], l ∈ [c2 ]. Let h : [d] → [d] be a universal hash function. Let hk : [d] → [c2 ] be independent universal hash functions with k = 0, . . . , log d. Let Sk = {i ∈ [n] | lsb(h(i)) = k} with k = 0, . . . , log d. On update (j, i, v): 5 k = lsb(h(i)) 6 Bk,hk (i) = Bk,hk (i) + v (j) (j) Algorithm 2: Filter candidates (j) 6 input : Thresholds 0 < r1 , p < 1, Bk,l from Algorithm 1 with k ∈ {0, log(1/r1 ), 2 log(1/r1 ), . . . , log d} output: Set of candidate pairs Let I = {0, log(1/r1 ), 2 log(1/r1 ), . . . , log d} Let Hj be an empty list for j ∈ I. foreach j ∈ [n] do s = `0 (x(j) ) foreach k ∈ [log(r12 · p · s), log(p · s)] ∩ I do (j) Add (j, M inHash(Bk,• )) to Hk . 7 return {(j, j 0 ) | ∃k : (j, h), (j 0 , h0 ) ∈ Hk and h = h0 } 1 2 3 4 5 of Ak ∪ Bk will be perfectly hashed by hk with probability 1 − δ (line 3 of Algorithm 1). Since deleting indices where both vectors are zero does not change the similarity, the similarity of the (j) (j 0 ) buckets Bk,• and Bk,• is equal to the similarity of Ak and Bk . Thus, we have h i (j) (j 0 ) Pr M inHash(Bk,• ) = M inHash(Bk,• ) = sim(Ak , Bk ). The theorem then follows by applying Lemma 1 and rescaling δ. Note that if sim(A, B) > r1 then log(|A| · p · r1 ) ≤ log(p · |B|) and log(p/r1 · |A|) ≤ log(p · |B|) which means there are hash values of both sets in some list Hk with k ∈ I (in Algorithm 2). The parameters in Theorem 5 can be chosen such that we are able to use Algorithm 1 and Algorithm 2 similar to the min-hashing technique in the non-dynamic scenario. This also means that we can use similar tricks to amplify the probability of selecting high similar items in Algorithm 2 and lower the probability in case of a small similarity: Let r, l ∈ N. Then we repeat the hashing part of Algorithm 2 r times and only add a pair to the output set iff all r hash values are equal. This procedure is repeated l times and the final output set contains all pairs which appear at least once in an output set of the l repetitions. The probability that a pair with similarity s is in the output set is √ 1 − (1 − pr )l with p = (1 − 2δ)(1 ± ε)s if s > c2 and p ≤ s/(δ(1 − ε/5 c2 ) otherwise. An example for some fixed parameters is given in Figure ??. Together with Theorem 2 we can approximately compute the distance (or similarity) of the pairs in the candidate set outputted by the described procedure and return a set of pairs with a distance at most T (or similarity of at least 1 − T ) for a known threshold T using O(n log n(ε−2 + log d) + c2 n log d) space where c2 = O(1/(δ · p2 · r14 )). 9 c2 = 128 c2 = 256 c2 = 512 c2 = 1024 ● ● 0.3 Average Deviation High ● ● Dimensions 0.2 ● ● ● ● 10000 ● 100000 ● 1000000 ● ● ● ● 0.1 ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● 0.1 ● ● ● ● ● ● 0.001 0.005 0.01 0.025 0.05 0.075 ● ● ● ● 0.001 0.005 0.01 0.025 0.05 0.075 ● ● ● ● ● 0.1 α ● ● ● ● ● ● ● 0.001 0.005 0.01 0.025 0.05 0.075 ● ● ● ● 0.1 ● ● ● ● ● ● 0.001 0.005 0.01 0.025 0.05 0.075 0.1 Figure 1: Mean deviation of high-similarity pairs (S ≥ 0.4) for various parameters of Algorithm 1. Each instance was repeated 10 times. 3. Experimental Evaluation The worst-case bounds given by Lemma 1 and Theorem 5 might be somewhat pessimistic, given that a union bound over all pairs suggest some similarities might be overly distorted. Here, we briefly report on the empirical performance Algorithms 1 and 2, a more thorough evaluation can be found in the appendix. In addition to a measurement of the distortion of similarities, we also aim to find good combinations of bucket size (c2 ) and sampling rates (α), which the analysis indicates cannot be chosen independently. Setup We used the following setup for our experiments on both compression and running time. All computations were performed on two identical machines with the same hardware configuration (2.8 Ghz Intel E7400 with 3 MB L2 Cache and 8 GB main memory). The implementation was done in C++ and compiled with gcc 4.8.4 and optimization level 3. Each run was repeated 10 times. Our universal hash functions were generated as in [18] by drawing a non-negative odd integer a and a non-negative integer b. For a given key x, we computed the hash values via a · x + b modulo an appropriate domain. Otherwise the implementation follows that of Algorithms 1 and 2 with various choices of parameters. All random coin tosses were obtained from the random library 3 . Datasets To accurately measure the distortion on large datasets, we require the exact similarities to be known. Since an exact computation on a large dataset was required an infeasible amount of computation, we used the synthetic benchmark by Cohen et al. [12]. Here we are given a large binary data-matrix consisting of 10, 000 rows and either 10, 000, 100, 000 or 1, 000, 000 columns. The rows corresponded to item sets and the columns to items, i. e., we compared the similarities of rows. Since large binary data sets encountered in practical applications are sparse, the number of non-zero entries of each row was between 1% to 5% chosen uniformly at random. Further, for every 100th row, we added an additional row of with higher Jaccard similarity in the range of {(0.35, 0.45), (0.45, 0.55), (0.55, 0.65), (0.65, 0.75), (0.75, 0.85), (0.85, 0.95)}. 3 http://www.cplusplus.com/reference/random/ 10 c2 = 128 1.00 c2 = 256 c2 = 512 c2 = 1024 ● ● ● ● Average Deviation Low 0.75 ● Dimensions ● ● ● ● 0.50 ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● 0.1 ● ● ● ● ● ● ● ● ● ● ● ● ● ● 0.00 0.001 0.005 0.01 0.025 0.05 0.075 1000000 ● ● ● ● 100000 ● ● ● ● ● ● 10000 ● ● ● 0.25 ● ● 0.001 0.005 0.01 0.025 0.05 0.075 0.1 α ● ● ● ● ● ● ● 0.001 0.005 0.01 0.025 0.05 0.075 ● ● 0.1 ● ● ● ● ● ● ● ● 0.001 0.005 0.01 0.025 0.05 0.075 ● ● ● 0.1 Figure 2: Mean deviation of low-similarity pairs for various parameters of Algorithm 1. Each instance was repeated 10 times. To obtain such a pair, we copied the preceding row (which was again uniformly chosen at random) and uniformly at random flipped an appropriate number of bits, e. g., for 10, 000 items, row sparsity of 5%, and similarity range (0.45, 0.55) we deleted an item contained in row i with probability 1/3 1 1 and added a new item with probability 19 · 13 = 57 . An evaluation on real-word data consisting of PE files from [30] can be found in the appendix. Results We measured the absolute deviation for high similarity (≥ 0.2) and low similarity (< 0.2) pairs separately. For a fixed bucket size, a larger value of α led to fewer items picked, while a smaller value of α led to many hash collisions. In the former case, the compression performed worse on high-similarity pairs, while in the latter case the compression rates for both high and low-similarity pairs deteriorated, more so for the latter than the former, see also Figures 1 and 2. The best combinations of c2 and α were different for high-similarity and low-similarity pairs. Good trade offs between both were achieved for 128 buckets with a sampling rate of α = 0.05, 256 buckets with a sampling rate of α = 0.025, 512 buckets with a sampling rate of α = 0.01, and 1024 buckets with a sampling rate of α = 0.005. On these average total deviation for these parameters was always below 0.1 and further decreased for larger bucket sizes. We note that these values of c2 are below the theoretical bounds of Theorem 5, while having little to acceptable deviation for appropriately chosen values of α. We further combined our sketches with a standard min-hashing approach to be evaluated on the PE files from [30]. Here, we aim to find similar pairs for various similarity thresholds. For various combinations of min-hashes, the probability of finding a pair of points follows an S-shaped curve. This S-shaped curve can be also observed when using our sketches as a pre-processing step, with the observed curves approaching the theoretical threshold for an appropriate parameterization. Again, we either fixed the number of buckets with varying sampling rates, or vice versa to determine the distorted similarity threshold. For more details, we refer to the appendix. 11 References [1] N. Alon, Y. Matias, and M. Szegedy. The space complexity of approximating the frequency moments. J. Comput. Syst. Sci., 58(1):137–147, 1999. [2] A. Andoni and P. Indyk. Near-optimal hashing algorithms for approximate nearest neighbor in high dimensions. Commun. ACM, 51(1):117–122, 2008. [3] Y. Bachrach and E. Porat. Fingerprints for highly similar streams. Inf. Comput., 244:113–121, 2015. [4] K. S. Beyer, P. J. Haas, B. Reinwald, Y. Sismanis, and R. Gemulla. On synopses for distinctvalue estimation under multiset operations. In Proc. ACM SIGMOD, pages 199–210, 2007. [5] A. Z. Broder. On the resemblance and containment of documents. In Proc. SEQUENCES, pages 21–, Washington, DC, USA, 1997. IEEE Computer Society. [6] A. Z. Broder. Identifying and filtering near-duplicate documents. In Proc. CPM, pages 1–10, 2000. [7] A. Z. Broder, M. Charikar, A. M. Frieze, and M. Mitzenmacher. Min-wise independent permutations. J. Comput. Syst. Sci., 60(3):630–659, 2000. [8] A. Z. Broder, S. C. Glassman, M. S. Manasse, and G. Zweig. Syntactic clustering of the web. Computer Networks, 29(8-13):1157–1166, 1997. [9] M. Charikar. Similarity estimation techniques from rounding algorithms. In Proc. ACM STOC, pages 380–388, 2002. [10] F. Chierichetti and R. Kumar. LSH-preserving functions and their applications. J. ACM, 62(5):33, 2015. [11] F. Chierichetti, R. Kumar, S. Lattanzi, M. Mitzenmacher, A. Panconesi, and P. Raghavan. On compressing social networks. In Proc. ACM KDD, pages 219–228, 2009. [12] E. Cohen, M. Datar, S. Fujiwara, A. Gionis, P. Indyk, R. Motwani, J. D. Ullman, and C. Yang. Finding interesting associations without support pruning. IEEE Trans. Knowl. Data Eng., 13(1):64–78, 2001. [13] E. Cohen and H. Kaplan. Bottom-k sketches: better and more efficient estimation of aggregates. In Proc. ACM SIGMETRICS, pages 353–354, 2007. [14] E. Cohen and H. Kaplan. Summarizing data using bottom-k sketches. In Proc. PODC, pages 225–234, 2007. [15] A. Das, M. Datar, A. Garg, and S. Rajaram. Google news personalization: scalable online collaborative filtering. In Proc. WWW, pages 271–280, 2007. [16] T. Dasu, T. Johnson, S. Muthukrishnan, and V. Shkapenyuk. Mining database structure; or, how to build a data quality browser. In Proc. ACM SIGMOD, pages 240–251, 2002. [17] M. Datar and S. Muthukrishnan. Estimating rarity and similarity over data stream windows. In Proc. ESA, pages 323–334, 2002. [18] M. Dietzfelbinger, T. Hagerup, J. Katajainen, and M. Penttonen. A reliable randomized algorithm for the closest-pair problem. Journal of Algorithms, 25(1):19 – 51, 1997. 12 [19] G. Feigenblat, E. Porat, and A. Shiftan. Exponential time improvement for min-wise based algorithms. In Proc. ACM-SIAM SODA, pages 57–66, 2011. [20] P. Flajolet and G. N. Martin. Probabilistic counting algorithms for data base applications. J. Comput. Syst. Sci., 31(2):182–209, 1985. [21] A. Gionis, P. Indyk, and R. Motwani. Similarity search in high dimensions via hashing. In Proc. VLDB, pages 518–529, 1999. [22] S. Guha, R. Rastogi, and K. Shim. ROCK: A robust clustering algorithm for categorical attributes. Inf. Syst., 25(5):345–366, 2000. [23] P. Indyk. A small approximately min-wise independent family of hash functions. J. Algorithms, 38(1):84–90, 2001. [24] P. Indyk and R. Motwani. Approximate nearest neighbors: Towards removing the curse of dimensionality. In Proc. ACM STOC, pages 604–613, 1998. [25] S. Janssens. Bell inequalities in cardinality-based similarity measurement. PhD thesis, Ghent University, 2006. [26] D. M. Kane, J. Nelson, and D. P. Woodruff. An optimal algorithm for the distinct elements problem. In Proc. ACM PODS, pages 41–52, 2010. [27] P. Li and A. Christian König. Theory and applications of b-bit minwise hashing. Commun. ACM, 54(8):101–109, 2011. [28] L. Naish, H. J. Lee, and K. Ramamohanarao. A model for spectra-based software diagnosis. ACM Trans. Softw. Eng. Methodol., 20(3):11, 2011. [29] R. Pagh, M. Stöckel, and D. P. Woodruff. Is min-wise hashing optimal for summarizing set intersection? In Proc. ACM PODS, pages 109–120, 2014. [30] K. Rieck, P. Trinius, C. Willems, and T. Holz. Automatic analysis of malware behavior using machine learning. J. Comp. Sec., 19(4):639–668, 2011. [31] N. Sundaram, A. Turmukhametova, N. Satish, T. Mostak, P. Indyk, S. Madden, and P. Dubey. Streaming similarity search over one billion tweets using parallel locality-sensitive hashing. PVLDB, 6(14):1930–1941, 2013. [32] M. Thorup. Bottom-k and priority sampling, set similarity and subset sums with minimal independence. In Proc. ACM STOC, pages 371–380, 2013. [33] M. Thorup and Y. Zhang. Tabulation-based 5-independent hashing with applications to linear probing and second moment estimation. SIAM J. Comput., 41(2):293–331, 2012. [34] R. B. Zadeh and A. Goel. Dimension independent similarity computation. Journal of Machine Learning Research, 14(1):1605–1626, 2013. 13 Similarity Number of pairs Similarity Number of pairs 0.0 0 0.4 861799 0.05 0 0.45 593181 0.1 995 0.5 549257 0.15 33864 0.55 144769 0.2 364496 0.6 33093 0.25 206572 0.65 27777 0.3 233303 0.7 42181 0.35 576286 0.75 23185 Table 1: Distribution of similarity values from the G DATA data set. c2 = 128 c2 = 256 c2 = 512 c2 = 1024 4000 Dimensions Average Time 3000 ● 10000 ● 100000 ● 1000000 Algorithm 2000 ● Streaming Exact 1000 ● ● 0 ● ● ● ● ● ● ● 0.001 0.005 0.01 0.025 0.05 0.075 ● 0.1 ● ● ● ● ● ● ● ● ● ● 0.001 0.005 0.01 0.025 0.05 0.075 ● 0.1 α ● ● ● ● ● ● ● ● 0.001 0.005 0.01 0.025 0.05 0.075 ● 0.1 ● ● ● ● ● ● ● 0.001 0.005 0.01 0.025 0.05 0.075 ● 0.1 Figure 3: Runtime comparisons of the exact evaluation of the similarities on our summary and on original data set. The summary running times are the mean values of 10 repetitions. A. Additional Experimental Evaluation Datasets The real-world data consists of features extracted from so-called PE files donated to us from G DATA 4 . The dataset is based on 2781 PE file samples from [30] where they were used for clustering to detect malware. G DATA extracted 714 categorical features which we converted to 18359 binary features. Each row in the final matrix has a support of 100-200 entries each. The distribution of similarities for this data set can be found in Table 1. Results The time required to compute the sketch and thereafter evaluate the similarities was usually faster by a large magnitude (up to a factor of 10) compared to the original data set, see Figure 3. Generally, the fewer buckets and the lower the sampling rate, the faster the computation was carried out on the sketch. It should be noted that this already holds for relatively sparse data and since the sketch size is independent of the density, we would expect the improvement in time to be more apparent for denser data. Lastly, we ran the LSH for the G DATA data set, again for various choices of parameters. Unlike for the synthetic data, there is no obvious correct threshold above which the relevant similarities lie. As a general rule, a large value of r moved the threshold towards 1, while a larger value of l 4 https://www.gdatasoftware.com/ 14 1.00 ● ● ● Fraction of Pairs Found ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● 0.75 ● ● ● Type ● Exact ● ● ● c2 = 128 0.50 ● c2 = 256 ● ● ● ● ● c2 = 512 ● c2 = 1024 ● ● ● 0.25 ● ● ● 0.00 ● ● ● ● ● ● 0.00 ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● 0.25 ● 0.50 0.75 1.00 Similarity Figure 4: Thresholding for similarities at r = 10, l = 40 and α = 0.025. With increasing bucket size, the theoretical curve marked in red was closer approximated by LSH computed on the sketch. 1.00 Fraction of Pairs Found ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● 0.75 ● Type ● Exact ● ● ● α = 0.01 0.50 ● α = 0.025 ● ● ● 0.25 ● α = 0.075 ● ● ● ● ● ● ● 0.00 ● 0.00 ● ● ● ● ● ● ● ● ● 0.25 ● ● ● ● ● ● ● ● ● ● ● α = 0.05 ● ● ● ● 0.50 0.75 1.00 Similarity Figure 5: Thresholding for similarities at r = 10, l = 40 and c2 = 256. The approximation tends to worsen with increasing α. moved the threshold to 0. By increasing both, the slope of the similarity curve increases. For a target threshold, i. e., fixed r and l and a fixed sampling rate α, the approximation to the theoretical similarity curve improved with an increasing number of buckets, see Figure 4. For a fixed bucket size, we made a similar observation when varying the sampling rates, see Figure 5. 15
8cs.DS
arXiv:1802.04742v1 [cs.LG] 13 Feb 2018 Quantifying Uncertainty in Discrete-Continuous and Skewed Data with Bayesian Deep Learning Thomas Vandal Evan Kodra Jennifer Dy Northeastern University, Civil and Environmental Engineering Boston, MA [email protected] risQ Inc. Cambridge, MA [email protected] Northeastern University, Electrical and Computer Engineering Boston, MA [email protected] Sangram Ganguly Ramakrishna Nemani Auroop R Ganguly Bay Area Environmental Research Institute / NASA Ames Research Center Moffett Field, CA [email protected] NASA Advanced Supercomputing Division/ NASA Ames Research Center Moffett Field, CA [email protected] Northeastern University, Civil and Environmental Engineering Boston, MA [email protected] ABSTRACT Deep Learning (DL) methods have been transforming computer vision with innovative adaptations to other domains including climate change. For DL to pervade Science and Engineering (S&E) applications where risk management is a core component, wellcharacterized uncertainty estimates must accompany predictions. However, S&E observations and model-simulations often follow heavily skewed distributions and are not well modeled with DL approaches, since they usually optimize a Gaussian, or Euclidean, likelihood loss. Recent developments in Bayesian Deep Learning (BDL), which attempts to capture uncertainties from noisy observations, aleatoric, and from unknown model parameters, epistemic, provide us a foundation. Here we present a discrete-continuous BDL model with Gaussian and lognormal likelihoods for uncertainty quantification (UQ). We demonstrate the approach by developing UQ estimates on “DeepSD”, a super-resolution based DL model for Statistical Downscaling (SD) in climate applied to precipitation, which follows an extremely skewed distribution. We find that the discrete-continuous models outperform a basic Gaussian distribution in terms of predictive accuracy and uncertainty calibration. Furthermore, we find that the lognormal distribution, which can handle skewed distributions, produces quality uncertainty estimates at the extremes. Such results may be important across S&E, as well as other domains such as finance and economics, where extremes are often of significant interest. Furthermore, to our knowledge, this is the first UQ model in SD where both aleatoric and epistemic uncertainties are characterized. KEYWORDS Bayesian Deep Learning, Uncertainty Quantification, Climate Downscaling, Super-resolution, Precipitation Estimation 1 INTRODUCTION Science and Engineering (S&E) applications are beginning to leverage the recent advancements in artificial intelligence through deep learning. In climate applications, deep learning is being used to make high-resolution climate projections [36] and detect tropical cyclones and atmospheric rivers [30]. Remote sensing models such as DeepSAT [3], a satellite image classification framework, also leverage computer vision technologies. Physicists are using deep learning for detecting particles in high energy physics [1] and in transportation deep learning has aided in traffic flow prediction [26] and modeling network congestion [27]. Scientists have even used convolutional neural networks to approximate the Navier-Stokes equations of unsteady fluid forces [29]. However, for many of these applications, the underlying data follow non-normal and discretecontinuous distributions. For example, when modeling precipitation, we see most days have no precipitation at all with heavily skewed amounts on the rainy days, as shown in Figure 1. Furthermore, climate is a complex nonlinear dynamical system, while precipitation processes in particular exhibit extreme space-time variability as well as thresholds and intermittence, thus precipitation data cannot be assumed to be Gaussian. Hence, for deep learning to be harnessed to it’s potential in S&E applications, our models must be resilient to non-normal and discrete-continuous distributions. Uncertainty quantification is another requirement for wide adoption of deep learning in S&E, particularly for risk management decisions. Twenty years ago, Jaeger et al. stated, “uncertainties in climate change are so pervasive and far reaching that the tools for handling uncertainty provided by decision analysis are no longer sufficient [18].” As expected, uncertainty has been a particular interest of climate and computer scientists scientists to inform social and infrastructure adaptation to increasing weather extremes and natural disasters [19, 25]. For example, Kay et al. studied six different sources of uncertainty of climate change impacts on a flood frequency model [20]. These uncertainties included future greenhouse gas scenarios, global climate models (GCMs) structure and parameters, downscaling GCMs, and hydrological model structure and parameters. Hence, quantifying the uncertainty from each of these processes is critical for understanding the system’s uncertainty. This provides us with the problem of quantifying uncertainty in discrete-continuous and non-normal distributions. Recent work in Bayesian Deep Learning (BDL) provides a foundation for modeling uncertainty in deep networks which may be applicable to many S&E applications [10, 12, 22, 39]. The simplicity Figure 1: Histogram of daily precipitation on the Contiguous United States from 2006 to 2015. A) All precipitation data points. B) Precipitation distribution on rainy days only. C) Log distribution of precipitation on rainy days. 16km Resolution of implementing BDL on an already defined deep neural network makes it an attractive approach. With a well-defined likelihood function, BDL is able to capture both aleatoric and epistemic uncertainty [22]. Epistemic uncertainty comes from noise in the model’s parameters which can be reduced by increasing the dataset size. On the other side, Aleatoric uncertainty accounts for the noise in the observed data, resulting in uncertainty which cannot be reduced. Examples of aleatoric uncertainty are measurement error and sensor malfunctions. Aleatoric uncertainty can either be homoscedastic, constant uncertainty for different inputs, or heteroscedastic, uncertainty depending on the input. Heteroscedastic is especially important in skewed distributions, where the tails often contain orders of magnitude increased variability. Variants of these methods have already been successfully applied to applications such as scene understanding [21] and medical image segmentation [37]. While BDL has been applied to few domains, these models generally assume a Gaussian probability distribution on the prediction. However, as we discussed in S&E applications, such an assumption may fail to hold. This motivates us to extend BDL further to aperiodic non-normal distributions by defining alternative density functions based on domain understanding. In particular, we focus on a precipitation estimation problem called statistical downscaling, which we will discuss in Section 2. In section 3, we review “DeepSD”, our statistical downscaling method [36], and Bayesian Deep Learning Concepts. In section 4, we present two BDL discretecontinuous (DC) likelihood models, using Gaussian and lognormal distributions, to model categorical and continuous data. Following in Section 5, we compare predictive accuracy and uncertainty calibration in statistical downscaling. Lastly, Section 6 summarizes results and discusses future research directions. 1.1 4km Resolution 40°N 40°N W 75° W 70° W 75° W 70° Figure 2: Prism Observed Precipitation: Left) Low resolution at 16km. Right) High resolution at 4km. (2) We show that a discrete-continuous model with a lognormal likelihood can model fat-tailed skewed distributions, which occur often in science and engineering applications. (3) The first model to capture heteroscedastic, and epistemic, uncertainties in statistical downscaling is presented. 2 2.1 PRECIPITATION ESTIMATION Statistical Downscaling Downscaling, either statistical or dynamical, is a widely used process for producing high-resolution projections from coarse GCMs. Dynamical downscaling, often referred to as regional climate models, are physics based numerical models encoding localized subgrid processes within GCM boundary conditions to generate highresolution projections. Similar to GCMs, dynamical downscaling are computational expensive and simply cannot scale to ensemble modeling. Statistical downscaling is a relatively efficient solution which aims to use observed data to learn a functional mapping between low- and high-resolution GCMs, illustrated in Figure 2. Uncertainty in GCMs is exacerbated by both observational data and Key Contributions (1) A discrete-continuous bayesian deep learning model is presented for uncertainty quantification in science and engineering. 2 parameters in the functional mapping, motivating a probabilistic approach. Global climate models (GCMs) through the Fifth Coupled Model Intercomparison Project (CMIP5) provides scientist with valuable data to study the effects of climate change under varying greenhouse gas emission scenarios [34]. GCMs are complex non-linear dynamical systems that model physical processes governing the atmosphere up to the year 2200 (some to 2300). GCMs are gridded datasets with spatial resolutions around 100km and contain a range of variables including temperature, precipitation, wind, and pressure at multiple pressure levels above the earth’s surface. More than 20 research groups around the world contributed to CMIP5 by developing their own models and encoding their understanding of the climate system. Within CMIP5, each GCM is simulated under three or four emission scenarios and multiple initial conditions. This suite of climate model simulations are then used to get probabilistic forecasts of variables of interest, such as precipitation and temperature extremes [31]. While the suite of models gives us the tools to study large scale climate trends, localized projections are required for adaptation. Many statistical models have been explored for downscaling, from bias correction spatial disaggregation (BCSD) [6] and automated statistical downscaling (ASD) [15] to neural networks [33] and nearest neighbor models [16]. Multiple studies have compared different sets of statistical downscaling approaches on various climate variables and varying temporal and spatial scales showing that no approach consistently outperforms the others [5, 14, 35]. Recently, Vandal et al. presented improved results with an alternative approach to downscaling by representing the data as "images" and adapting a deep learning based super-resolution model called DeepSD [36]. DeepSD showed superior performance in downscaling daily precipitation in the contiguous United States (CONUS) when compared to ASD and BCSD. Even though uncertainty is crucial in statistical downscaling, it is rarely considered in downscaling studies. For instance, all the downscaled climate projections used in the latest US National Climate Assessment report (CSSR), produced on the NASA Earth Exchange, come with no uncertainty estimates. Though widely used in climate impact assessments, a recurrent complaint from the users is a lack of uncertainty characterization in these projections. What users often request are estimates of geographic and seasonal uncertainties such that the adaptation decisions can be made with robust knowledge [38]. Khan et al. presented one study that assessed monthly uncertainty from confidence based intervals of daily predictions [23]. However, this approach only quantifies epistemic uncertainty and therefore cannot estimate a full probability distribution. To the best of the authors’ knowledge, no studies have modeled aleatoric (heteroscedastic) uncertainty in statistical downscaling, presenting a limitation to adaptation. 2.2 downscale GCMs, we must first learn a statistical function to apply a low- to high-resolution mapping. Fortunately, one can use observed datasets that are widely available and directly transfer the trained model to GCMs. Such observation datasets stem from gauges, satellite imagery, and radar systems. In downscaling, one typically will use either in-situ gauge estimates or a gridded data product. As we wish to obtain a complete high-resolution GCM, a gridded data product is required. Such gridded-data products are generally referred to as reanalysis datasets, which use a combination of data sources with physical characteristics aggregated to a well estimated data source. For simplicity, the remainder of this paper we will refer to reanalysis datasets as observations. In SD, it is important for our dataset to have high spatial resolution at a daily time temporal scale spanning as many years as possible. Given these constraints, we choose to use precipitation from the Prism dataset made available by Oregon State University with a 4km spatial resolution at a daily temporal scale [8]. The underlying data in Prism is estimated from a combination of gauges measuring many climate variables and topographical information. To train our model, the data is upscaled from 4km to the desired low-resolution. For example, to train a neural network to downscale from 64km to 16km, we upscale Prism to 16km and 64km and learn the mapping between the two (see Figure 2). For the reader, it may be useful to think about this dataset as an image where precipitation is a channel analogous to traditional RBG channels. Similarly, more variables can be added to our dataset which therefore increases the number of channels. However, it is important to be aware that the underlying spatio-temporal dynamics in the chaotic climate system makes this dataset more complex than images. In our experiments with DeepSD, we included an elevation from the Global 30 Arc-Second Elevation Data Set (GTOPO30) provided by the USGS. 3 BACKGROUND 3.1 DeepSD The statistical downscaling approach taken by DeepSD differs from more traditional approaches, which generally do not capture spatial dependencies in both the input and output. For example Automated Statistical Downscaling (ASD) [15] learns regression models from low-resolution to each high-resolution point independently, failing to preserve spatial dependencies in the output and requiring substantial computational resources to learn thousands of regression models. In contrast, DeepSD represents the data as low- and high-resolution image pairs and adapts super-resolution convolutional neural networks (SRCNN) [9] by including high-resolution auxiliary variables, such as elevation, to correct for biases. These auxiliary variables allows one to use a single trained neural network within the training domain. This super-resolution problem is essentially a pixel-wise regression such that Y = F (X; Θ) where Y is high-resolution with input X = [Xlr , Xaux ] and F a convolutional neural network parameterized by weights Θ. F can then be learned by optimizing the loss function: Climate Data A wide variety of data sources exists for studying the earth’s climate, from satellite and observations to climate models. Above we discussed some of the complexities and uncertainty associated with ensembles of GCMs as well as their corresponding storage and computational requirements. While the end goal is to statistically L= 1 Õ ∥F (Xi ; W) − Yi ∥22 2N i ∈S where S is a subset n examples. 3 (1) divergence between q Θ (ω) to the true posterior, p(ω|X, Y). The optimization objective of the variational interpretation can be written as [11]: As discussed above, the resolution enhancement of 8x or more needed in statistical downscaling is much greater than the 2-4x enhancements used for images. DeepSD uses stacked SRCNNs, each improving resolution by 2x allowing the model to capture regional and local weather patterns, depending on the level. For instance, to downscale from 100km to 12.5km, DeepSD first trains models independently (or with transfer learning) to downscale from 100km to 50km, 50km to 25km, and 25km to 12.5km. During inference, these models are simply stacked on each other where the output of one plus the next corresponding auxiliary variables are inputs to the next. In the case of downscaling precipitation, inputs may include LR precipitation and HR elevation to predict HR precipitation. In this work, we focus on uncertainty quantification for a single stacked network which can then be translated to stacking multiple bayesian neural networks. L̂(Θ) = − 512x3x3 Conv (2) i ∈S 1 KL(q Θ (ω)|| (3) N where S is a set of M data points. To obtain well calibrated uncertainty estimates, it is crucial to select a well estimated pl . Rather than setting pl to be constant, we can learn it by learning it by using a concrete distribution prior which gives us a continuous approximation of the Bernoulli distribution [12]. As presented by Gal et al., the KL divergence term is then written as: = L̂x (Θ) + Precip Identity 512x9x9 Conv 1 1 Õ logp(yi | f ω (xi )) + KL(q Θ (ω)||p(ω)) M N KL(q Θ (ω)||p(ω)) = 1x3x3 Conv KL(q Ml (W)||p(W)) ∝ L Õ KL(q Ml (Wl )||p(Wl )) l =1 l 2 (1 − p) 2 ||Ml || − KH (p) (4) (5) where H (p) = −p log p − (1 − p) log (1 − p) is the entropy of a Bernoulli random variable with probability p. We note that given this entropy term, the learning dropout probability cannot exceed 0.5, a desired effect. For brevity, we encourage the reader to refer to [12] for the concrete dropout optimization. In the remainder of this paper, we will use this Concrete dropout formulation within all presented models. Figure 3: Residual SRCNN Architecture used for DeepSD. 3.2 (6) Bayesian Deep Learning In the early 1990’s Mackay [28] introduced a Bayesian neural networks (BNNs) by replacing deterministic weights with distributions. However, as is common with many Bayesian modeling problems, direct inference on BNNs is intractable for networks of more than a one or two hidden layers. Many studies have attempted to reduce the computational requirements using various approximations [2, 13, 17]. Most recently, Gal and Ghahramani recently presented a practical variational approach to approximate the posterior distribution in deep neural networks using dropout and monte carlo sampling [10, 11]. Kendall and Gal then followed this work for computer vision applications to include both aleatoric and epistemic uncertainties in a single model [22]. To begin, we define weights of our neural network as ω = {W1 , W2 , ..., WL } such that W ∼ N (0, I ) and L being the number of layers in our network. Given random outputs of a BNN denoted by f ω (x), the likelihood can be written as p(y| f ω (x)). Then, given data X and Y, as defined above, we infer the posterior p(ω|X, Y) to find a distribution of parameters that best describe the data. For a regression task assuming a predictive Guassian posterior, p(y| f ω (x)) = N (ŷ, σ̂ 2 ) with random outputs: 4 BAYESIAN DEEP LEARNING FOR SKEWED DISTRIBUTIONS In this section we describe three candidate Bayesian deep learning models to quantify uncertainty in super-resolution based downscaling. We begin by formalizing the use of BDL within the SRCNN architecture assuming a normal predictive distribution, similar to the pixel-wise depth regression in [22]. This approach is further extended to a discrete-continuous model that conditions the amount of precipitation given an occurrence of precipitation. This leverages the domain knowledge that the vast majority of data samples are non-rainy days which are easy to predict and contain little information for the regression. Such a technique was used by Sloughter el al. using a discrete-continuous gamma distribution [32]. Lastly, we show that a lognormal distribution can be applied directly in BDL and derive its corresponding log-likelihood loss and unbiased parameter estimates. 4.1 [ŷ, σ̂ 2 ] = f ω (x). Gaussian Likelihood Super-resolution is an ill-posed pixel-wise regression problem such that BDL can be directly applied, as Kendall and Gal showed for predicting depth in computer vision [22]. As discussed in previous sections, it is crucial to capture both aleatoric and epistemic uncertainties in downscaling. As shown in section 3.1 of [22], we must measure the aleatoric uncertainty by estimating the variance, σ 2 , in the predictive posterior while also sampling weights via dropout Applying variational inference to the weights, we can define Í an approximate and tractable distribution q Θ (ω) = lL=1 q Ml (Wl )   where q Ml (Wl ) = Ml × diag Bernoulli(1 − pl )Kl parameterized by Θl = {Ml , pl } containing the weight mean of shape Kl × Kl +1 , Kl being the number of hidden units in layer l, and dropout probability pl . Following, we aim to minimize the Kullback-Leibler (KL) 4 b ∼ q Θ (W). As before, we defined from the approximate posterior, W our Bayesian convolutional neural network f: to Equation 4):    1 Õ log 1yi >0 · p̂i · N yi ; ŷi , σ̂i2 + 1yi =0 · (1 − p̂i ) D i  1 Õ  =− log p̂i + log N yi ; ŷi , σ̂i2 D i,y >0 i 1 Õ log(1 − p̂i ) − D i,y =0 i  1 Õ = yi · p̂i + (1 − yi ) · (1 − p̂i ) D i 1 Õ −2 − σ̂ ||yi − ŷi || 2 + log σi2 2D i,y >0 i Lx (Θ) = − [ŷ, σ̂ 2 ] = f W (X). b (7) and make the assumption that Y ∼ N (ŷ, σ̂ 2 ). The Gaussian loglikelihood can then be written as: Lx (Θ) = 1 Õ −2 1 σ̂ ||yi − ŷi || 2 + log σ̂i2 2D i i 2 (8) where pixel i in y corresponds to input x and D being the number of output pixels. The KL term is identical to that in Equation 4. Given this formulation, σ̂i , the variance for pixel i is implicitly learned from the data without the need for uncertainty labels. We also note that during training the substiution si := log σ̂i2 is used for stable learning using the Adam Optimization algorithm [24], a first-order gradient based optimization of stochastic objective functions. Unbiased estimates of the first two moments can the be obtained b with T Monte Carlo samples, {ŷt , σ̂i2 }, from f W (x) with masked ct ∼ q(W): weights W E[Y] ≈ Var[Y] ≈ T 1Õ ŷt T t =1 i (14) where the first term is the cross entropy of a rainy day and the second term is the conditional Gaussian loss. Furthermore, we can write the unbiased estimates of the first two moments as: E[Y] ≈ (9) T T T 1 Õ 2 1 Õ 2  1 Õ 2 µ̂ t − σ̂t + µ̂ t . T t =1 T t =1 T t =1 Var[Y] ≈ (10) 4.3 Discrete-Continuous Gaussian Likelihood Rather than assuming a simple Gaussian distribution for all output variables, which may be heavily biased from many non-rainy days in our dataset, we can condition the model to predict whether rain occurred or not. The BNN is now formulated such that the mean, variance, and probability of precipitation are sampled respectively from f: b ˆ = fW [ŷ, σ̂ 2 , ϕ] (X) ˆ p̂ = Sigmoid(ϕ). (15) T T 2  1 Õ 1Õ 2 2 p̂t ŷt + σ̂t2 − p̂t µ̂ t . T t =1 T t =1 (16) Discrete-Continuous Lognormal Likelihood Precipitation events, especially extremes, are known to follow fattailed distributions, such as lognormal and Gamma distributions [7, 32]. For this reason, as above, we aim to model precipitation using a discrete-continuous lognormal distribution. It should be noted that the lognormal distribution is undefined at 0 so a conditional is required for downscaling precipitation. To do this, we slightly modify our BNN: These first two moments provide all the necessary information to easily obtain prediction intervals with both aleatoric and epistemic uncertainties. For further details, we encourage the reader to refer to [22]. 4.2 T 1Õ p̂t ŷt T t =1 ˆ = f W (X) [µ̂, σ̂ 2 , ϕ] (17) b ˆ p̂ = Sigmoid(ϕ). (18) where µ̂ and σ̂ are sampled parameters of the lognormal distribution. Following the same steps as above, we can define a piece-wise probability density function: (11)  (1 − p̂)      (log(y) − µ̂)2  1 p y| f ω (x) =  √ exp −  p̂ · 2σ̂ 2 yσ̂ 2π  (12) Splitting the distribution into discrete and continuous parts gives us:   (1 − p̂) y=0  p y| f ω (x) = (13) p̂ · N y; ŷ, σ̂ 2 y>0 y=0 y>0 (19) This gives us the modified log-likelihood objective: Lx (Θ) = Plugging this in to 2 and dropping the constants gives us the loss function (for brevity, we ignore the KL term which is identical  1 Õ yi · p̂i + (1 − yi ) · (1 − p̂i ) D i 1 Õ −2 − σ̂ ||log yi − µ̂ i || 2 + log σi2 2D i,y >0 i i 5 (20) In practice, we optimize ŝ := exp(σ̂ ) for numerical stability. And lastly, the first two moments are derived as: E[y] ≈ T 1 1Õ p̂t exp(µ̂ + σ̂ 2 ) T t =1 2 (21) Var[Y] ≈ T 1Õ 2 p̂ exp(2µ̂ + 2σ̂ 2 ) T t =1 t (22) 5.1 (1) R20 - Very heavy wet days ≥ 20mm (2) SDII - Daily intensity index = (Annual total) / (precip days ≥ 0.5 mm). Given these first two moments, we can derive unbiased estimates of µ and σ : s   1 4Var[Y] σ̂ = log 1 + +1 (23) 2 2 E[y] µ̂ = E[y] − σ̂ 2 2 In our analysis, we compute each index for the test set as well as observations.Then the difference between the predicted indices and observed indices are computed, ie. (SDIImodel - SDIIobs ). These results can be seen in Table 1. We see a clear trend of the DC models performing much better than a regular Gaussian distribution on all computed metrics. In particular, DC-Gaussian shows the lowest RMSE, R20 error, and SDII error and a competitive bias. DCLognormal has slightly higher errors but less bias. Furthermore, we study the predictability over space in Figure 4 by computing the pixel-wise RMSEs. Each model performs well in the mid-west and worse in the southeast, a region with large numbers of convective precipitation events. We see that the DC models, DC-Lognormal in particular, have lower bias than a regular Gaussian distribution. Similarly for RMSE, DC models, lead by a DC-Gaussian, have the lowest errors. Looking more closely, we see improved performance along the coasts which are generally challenging to estimate. The convolutional operation with a 5x5 kernel in the last layer reconstructs the image using a linear combination of nearby points acting as a smoothing operation. However, when this is applied to the conditional distributions, the gradient along this edge can be increased by predicting high and low probabilities of precipitation in a close neighborhood. This insight is particularly important when applied to coastal cities. Lastly, we look at each conditional model’s ability to classify precipitous days with precision recall curves (Figure 5). We see that recall does not begin to decrease until a precision of 0.8 which indicates very strong classification performance. It was assumed that classification of precipitation would be easy for such a dataset. (24) that can be used to compute pixel-wise probabilistic estimates. In the next section, we will apply each of the three methods to downscaling precipitation, compare their accuracies, and study their uncertainties. 5 Predictive Ability We begin by comparing each model’s ability to predict the ground truth observations. Root Mean Square Error (RMSE) and bias are compared to understand the average daily effects of downscaling. To analyze extremes, we select two metrics from Climdex (http:// www.clim-dex.org) which provides a suite of extreme precipitation indices and is often used for evaluating downscaling models [4, 35]: PRECIPITATION DOWNSCALING For our experimentation, we define our problem to downscale precipitation from 64km to 16km, a 4x resolution enhancement in a single SRCNN network. We begin with precipitation from the PRISM dataset, as presented in Section 2.2, at 4km which is then upscaled to 16km. This 16km dataset are our labels and are further upscaled to 64km, generating training inputs. Furthermore, we use elevation from the Global 30 Arc-Second Elevation Datset (GTOPO30) provided by the USGS as an auxilary variable, also upscaled to 16km. In the end, our dataset is made up of precipitation at 64km and elevation at 16km as inputs where precipitation at 16km are the labels. In the discrete-continuous models, precipitation >0.5mm is considered a rainy day. Precipitation measured in millimeters (mm) is scaled by 1/100 for training when optimizing the Gaussian models. Elevation is normalized with the overall mean and variance. The training data is taken from years 1980 to 2005 and the test set from 2006 to 2015. Sub-images selected of size 64x64 with stride 48 are used for generating training examples. Our super-resolution architecture is defined with two hidden layers of 512 kernels using kernel sizes 9, 3, and 5. Concrete dropout is used to optimize the dropout probability with parameters τ =1e-5 and prior length scale as l = 1. For a pixel-wise regression the number of samples N is set as Days × Height × Width. These parameters were found to provide a good trade-off between likelihood and regularization loss terms. The model is trained for 1e6 iterations using a learning rate of 1e-4 and a batch size of 10. Three models are optimized using each of the three log-likelihood loss’s defined above, Gaussian distribution as well as discrete-continuous Gaussian and lognormal distributions conditioned on a rainy day. 50 Monte Carlo passes during inference are used to measure the first two moments which then estimates the given predictive distribution’s parameters. Validation is an important task for choosing a highly predictive and well calibrated downscaling model. In our experiments, we study each model’s ability to predict daily precipitation, calibration of uncertainty, and width of uncertainty intervals. 5.2 Uncertainty Quantification The remainder of our analysis focuses on each model’s performance in estimating well calibrated uncertainty quantification. We limit our analysis of uncertainty to only days with precipitation (≥ 0.5mm) as uncertainty on non-rainy days is not of interest. The calibration metric used computes the frequency of observations occurring within a varying probability range of the predictive distribution. Ideally the frequency of observations will be equal to the probability. This can be seen in Figure 6 where we present a calibration plot of each model. Right away we see that the Gaussian distribution over-estimates uncertainty for most of the range. While DC-Gaussian analytically produces the least calibration error, DC-Lognormal slightly overestimates uncertainty for much of the domain but still performs well. The DC-Lognormal and Gaussian models show are better calibrated at the tails. However, one could calibrate the tails by simply forcing the variance to explode. In 6 Figure 4: Daily Root Mean Square Error (RMSE) computed at each location for years 2006 to 2015 (test set) in CONUS. Left) Gaussian, Middle) Conditional-Gaussian, and Right) Conditional-Lognormal. Red corresponds to high RMSE while blue corresponds to low RMSE. Gaussian DC-Gaussian DC-Lognormal Bias RMSE R20 Error SDII Error -0.23 ± 0.45 -0.17 ± 0.31 -0.16 ± 0.35 2.34 ± 1.44 2.09 ± 1.29 2.11 ± 1.33 -1.23 ± 2.62 -0.75 ± 1.84 -0.79 ± 2.00 -1.30 ± 1.34 -0.19 ± 0.82 -0.69 ± 0.97 Table 1: Predictive accuracy statistics computed pixel-wise and aggregated. Daily intensity index (SDII) and yearly precipitation events greater than 20mm (R20) measure each model’s ability to capture precipitation extremes. R20-Err and SDII-Err measures the difference between observed indicies and predicted indicies (closer to 0 is better). Figure 5: Precision recall curve of classifying rainy days for conditional models. Figure 6: Calibration is computed as the frequency of predictions within a given probability range. This probability is varied on the x-axis with the corresponding frequency on the y-axis. The dashed is the ideal calibration. Figure 8 we aim to better understand these uncertainties for increasingly intense precipitation days. At these high rainfall days our models generally under-predict precipitation, but the Gaussian models often fail to capture these extremes. While the lognormal has wider uncertainty intervals, it is able to produce a well calibrated distribution at the extremes. Furthermore, these wide intervals indicate that the model becomes less confident with decreasing domain coverage at higher intensities. Taking this a step further, we present calibration RMSEs per pixel in Figure 7 to visualize spatial patterns of UQ. In the Gaussian model we find weakened and more variable results at the highelevations in the west. Each of the DC models perform well as we know from above. 6 CONCLUSION In this paper we present Bayesian Deep Learning approaches incorporating discrete-continuous and skewed distributions targeted at S&E applications. The discrete-continuous models contain both a classifier to categorize an event and conditional regressor given an event’s occurrence. We derive loss functions and moments for Gaussian and lognormal DC regression models. Using precipitation as an example, we condition our model on precipitous days and predict daily precipitation on a high-resolution grid. Using the lognormal distribution, we are able to produce well-calibrated uncertainties for skewed fat-tailed distributions. To our knowledge, 7 Figure 7: Root Mean Square Error (RMSE) of calibration (probability-frequency) computed at each location for years 2006 to 2015 (test set) in CONUS. Left) Gaussian, Middle) DC-Gaussian, and Right) DC-Lognormal. Figure 8: Uncertainty widths based on quantiles from their predictive distributions. The points are observations versus the expected value. The bands correspond to 50%, 80%, and 90% predictive intervals. this is the first model for uncertainty quantification in statistical downscaling. Through experiments, we find that this DC approach increases predictive power and uncertainty quantification performance, reducing errors with well calibrated intervals. In addition, we find that this conditional approach improves performance at the extremes, measured by daily intensity index and number of extreme precipitation days from ClimDex. Visually, we found that the DC models perform better than a regular Gaussian on the coasts, a challenge in statistical downscaling. These edge errors appear during reconstruction when the kernel partially overlaps with the coastal edge, acting as a smoothing operation. However, the DC models reduce this smoothing by increasing the expected value’s gradients. Overall, we find that the DC distribution approaches provides strong benefits to deep super-resolution based statistical downscaling. Furthermore, while the lognormal distribution uncertainty was slightly less calibrated, it was able to produce well understood uncertainties at the extremes. This presents a strong point, Bayesian Deep Neural Networks can well fit non-normal distributions when motivated by domain knowledge. In the future we aim to extend this work to stacked superresolution networks, as used in DeepSD [36], which requires sampling of between networks. Some other extensions could be the addition of more variables, extension to other skewed distributions, and larger network architectures. Finally, incorporating these theoretical advances in uncertainty characterization, the NEX team plans to use DeepSD to produce and distribute next generation of climate projections for the upcoming congressionally mandated national climate assessment. ACKNOWLEDGMENTS This work was supported by NASA Earth Exchange (NEX), National Science Foundation CISE Expeditions in Computing under grant number: 1029711, National Science Foundation CyberSEES under grant number: 1442728, and National Science Foundation BIGDATA under grant number: 1447587. The GTOPO30 dataset was distributed by the Land Processes Distributed Active Archive Center (LP DAAC), located at USGS/EROS, Sioux Falls, SD. http: //lpdaac.usgs.gov. We thank Arindam Banerjee for valuable comments. REFERENCES [1] P. Baldi, P. Sadowski, and D. Whiteson. Searching for exotic particles in highenergy physics with deep learning. Nature communications, 5:4308, 2014. [2] D. Barber and C. M. Bishop. Ensemble learning in bayesian neural networks. NATO ASI SERIES F COMPUTER AND SYSTEMS SCIENCES, 168:215–238, 1998. [3] S. Basu, S. Ganguly, S. Mukhopadhyay, R. DiBiano, M. Karki, and R. Nemani. Deepsat: a learning framework for satellite imagery. In Proceedings of the 23rd SIGSPATIAL International Conference on Advances in Geographic Information Systems, page 37. ACM, 2015. 8 [4] G. Bürger, T. Murdock, A. Werner, S. Sobie, and A. Cannon. Downscaling extremesâĂŤan intercomparison of multiple statistical methods for present climate. Journal of Climate, 25(12):4366–4388, 2012. [5] G. Bürger, T. Q. Murdock, a. T. Werner, S. R. Sobie, and a. J. Cannon. Downscaling extremes-an intercomparison of multiple statistical methods for present climate. Journal of Climate, 25(12):4366–4388, June 2012. [6] A. J. Cannon and P. H. Whitfield. Downscaling recent streamflow conditions in british columbia, canada using ensemble neural network models. Journal of Hydrology, 259(1):136–151, 2002. [7] H.-K. Cho, K. P. Bowman, and G. R. North. A comparison of gamma and lognormal distributions for characterizing satellite rain rates from the tropical rainfall measuring mission. Journal of Applied Meteorology, 43(11):1586–1597, 2004. [8] C. Daly, M. Halbleib, J. I. Smith, W. P. Gibson, M. K. Doggett, G. H. Taylor, J. Curtis, and P. P. Pasteris. Physiographically sensitive mapping of climatological temperature and precipitation across the conterminous united states. International journal of climatology, 28(15):2031–2064, 2008. [9] C. Dong, C. C. Loy, K. He, and X. Tang. Learning a deep convolutional network for image super-resolution. In European Conference on Computer Vision, pages 184–199. Springer, 2014. [10] Y. Gal. Uncertainty in Deep Learning. PhD thesis, Ph. D. thesis, University of Cambridge, 2016. [11] Y. Gal and Z. Ghahramani. Dropout as a bayesian approximation: Representing model uncertainty in deep learning. In international conference on machine learning, pages 1050–1059, 2016. [12] Y. Gal, J. Hron, and A. Kendall. Concrete dropout. arXiv preprint arXiv:1705.07832, 2017. [13] A. Graves. Practical variational inference for neural networks. In Advances in Neural Information Processing Systems, pages 2348–2356, 2011. [14] E. Gutmann, T. Pruitt, M. P. Clark, L. Brekke, J. R. Arnold, D. A. Raff, and R. M. Rasmussen. An intercomparison of statistical downscaling methods used for water resource assessments in the united states. Water Resources Research, 50(9):7167– 7186, 2014. [15] M. Hessami, P. Gachon, T. B. Ouarda, and A. St-Hilaire. Automated regressionbased statistical downscaling tool. Environmental Modelling & Software, 23(6):813– 834, 2008. [16] H. Hidalgo, M. Dettinger, and D. Cayan. Downscaling with constructed analogues: Daily precipitation and temperature fields over the united states. 2008. [17] G. E. Hinton and D. Van Camp. Keeping the neural networks simple by minimizing the description length of the weights. In Proceedings of the sixth annual conference on Computational learning theory, pages 5–13. ACM, 1993. [18] C. C. Jaeger, O. Renn, E. A. Rosa, and T. Webler. Decision analysis and rational action. Human choice and climate change, 3:141–216, 1998. [19] R. W. Katz. Techniques for estimating uncertainty in climate change scenarios and impact studies. Climate Research, 20(2):167–185, 2002. [20] A. Kay, H. Davies, V. Bell, and R. Jones. Comparison of uncertainty sources for climate change impacts: flood frequency in england. Climatic Change, 92(1-2):41– 63, 2009. [21] A. Kendall, V. Badrinarayanan, and R. Cipolla. Bayesian segnet: Model uncertainty in deep convolutional encoder-decoder architectures for scene understanding. arXiv preprint arXiv:1511.02680, 2015. [22] A. Kendall and Y. Gal. What uncertainties do we need in bayesian deep learning for computer vision? 2017. [23] M. S. Khan, P. Coulibaly, and Y. Dibike. Uncertainty analysis of statistical downscaling methods. Journal of Hydrology, 319(1):357–382, 2006. [24] D. Kingma and J. Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014. [25] D. B. Lobell, M. B. Burke, C. Tebaldi, M. D. Mastrandrea, W. P. Falcon, and R. L. Naylor. Prioritizing climate change adaptation needs for food security in 2030. Science, 319(5863):607–610, 2008. [26] Y. Lv, Y. Duan, W. Kang, Z. Li, and F.-Y. Wang. Traffic flow prediction with big data: a deep learning approach. IEEE Transactions on Intelligent Transportation Systems, 16(2):865–873, 2015. [27] X. Ma, H. Yu, Y. Wang, and Y. Wang. Large-scale transportation network congestion evolution prediction using deep learning theory. PloS one, 10(3):e0119044, 2015. [28] D. J. MacKay. A practical bayesian framework for backpropagation networks. Neural computation, 4(3):448–472, 1992. [29] T. P. Miyanawala and R. K. Jaiman. An efficient deep learning technique for the navier-stokes equations: Application to unsteady wake flow dynamics. arXiv preprint arXiv:1710.09099, 2017. [30] E. Racah, C. Beckham, T. Maharaj, S. Kahou, M. Prabhat, and C. Pal. Extremeweather: A large-scale climate dataset for semi-supervised detection, localization, and understanding of extreme weather events. In Advances in Neural Information Processing Systems, pages 3405–3416, 2017. [31] M. A. Semenov and P. Stratonovitch. Use of multi-model ensembles from global climate models for assessment of climate change impacts. Climate research (Open Access for articles 4 years old and older), 41(1):1, 2010. [32] J. M. L. Sloughter, A. E. Raftery, T. Gneiting, and C. Fraley. Probabilistic quantitative precipitation forecasting using bayesian model averaging. Monthly Weather Review, 135(9):3209–3220, 2007. [33] J. W. Taylor. A quantile regression neural network approach to estimating the conditional density of multiperiod returns. Journal of Forecasting, 19(4):299–311, 2000. [34] K. E. Taylor, R. J. Stouffer, and G. A. Meehl. An overview of cmip5 and the experiment design. Bulletin of the American Meteorological Society, 93(4):485–498, 2012. [35] T. Vandal, E. Kodra, and A. R. Ganguly. Intercomparison of machine learning methods for statistical downscaling: The case of daily and extreme precipitation. arXiv preprint arXiv:1702.04018, 2017. [36] T. Vandal, E. Kodra, S. Ganguly, A. Michaelis, R. Nemani, and A. R. Ganguly. Deepsd: Generating high resolution climate change projections through single image super-resolution. In 23rd ACM SIGKDD Conference on Knowledge Discovery and Data Mining, 2017. [37] G. Wang, W. Li, M. A. Zuluaga, R. Pratt, P. A. Patel, M. Aertsen, T. Doel, A. L. David, J. Deprest, S. Ourselin, et al. Interactive medical image segmentation using deep learning with image-specific fine-tuning. IEEE Transactions on Medical Imaging, 2018. [38] D. Wuebbles, D. Fahey, K. Hibbard, D. Dokken, B. Stewart, and T. Maycock. Climate science special report: Fourth national climate assessment, volume i. 2017. [39] Y. Zhu and N. Zabaras. Bayesian deep convolutional encoder-decoder networks for surrogate modeling and uncertainty quantification. arXiv preprint arXiv:1801.06879, 2018. 9
2cs.AI
Attentive Semantic Video Generation using Captions Tanya Marwah∗ IIT Hyderabad Gaurav Mittal∗ [email protected] arXiv:1708.05980v3 [cs.CV] 21 Oct 2017 [email protected] Abstract This paper proposes a network architecture to perform variable length semantic video generation using captions. We adopt a new perspective towards video generation where we allow the captions to be combined with the long-term and short-term dependencies between video frames and thus generate a video in an incremental manner. Our experiments demonstrate our network architecture’s ability to distinguish between objects, actions and interactions in a video and combine them to generate videos for unseen captions. The network also exhibits the capability to perform spatio-temporal style transfer when asked to generate videos for a sequence of captions. We also show that the network’s ability to learn a latent representation allows it generate videos in an unsupervised manner and perform other tasks such as action recognition.1 1. Introduction What does the mention of a video evoke in a listener’s mind? A long sequence of images (frames) with multiple changing scenes which are temporally and spatially linked to each other. Making a machine generate such an entity is a highly involved task as it requires the machine to learn how to coordinate between the long-term and short-term correlations existing between the various elements of a video. This is the primary motivation behind our work where we take the first steps towards semantic video generation with captions generating variable length videos one frame at a time. There have been efforts in the recent past which attempt to perform unsupervised video generation [26, 16] in general, without any specific conditioning on captions. However, from an application perspective, it may not be very useful as there doesn’t exist any semantic control over what will be generated at run time. In this work, we propose an approach that attempts to provide this control and streamlines video generation by using captions. Since a video can be arbitrarily long, generation of such ∗ Equal Contribution at International Conference on Computer Vision (ICCV) 2017 to be held at Venice, Italy. 1 Accepted Vineeth N. Balasubramanian IIT Hyderabad [email protected] videos necessitates a step-by-step generation mechanism. Therefore, our model approaches video generation iteratively by creating one frame at a time, and conditioning the generation of the subsequent frames by the frames generated so far. Also, every frame is itself an amalgamation of several objects moving and interacting with each other. In order to generate such frames, we follow a recurrent attentive approach similar to [3], which focuses on one part of the frame at each time step for generation, and completes the frame generation over multiple time steps. By iteratively generating the frame over a number of time-steps in response to a given caption, our network adds captiondriven semantics to the generated video. A key advantage of following such an approach is the possibility to generate videos with multiple captions and thus change the contents of the video midway according to the new caption. In order to achieve the aforementioned objectives, the proposed network is required to not only account for the local correlations between any two consecutively generated frames but also has to ensure that the long-term spatiotemporal nature of the video is preserved so that the generated video is not just a loosely coupled set of frames but exhibits a holistic portrayal of the given caption. In this work, we adopt a fresh perspective in this direction, by devising a network that learns these long-term and short-term video semantics separately but simultaneously. To create a frame based on a caption, instead of trivially conditioning the generation on the caption text, we introduce a soft-attention over the captions separately for the long-term and shortterm contexts. This attention mechanism serves the crucial role of allowing the network to selectively combine the various parts of the caption with these two contexts and hence, significantly improves the quality of the generated frame. Experiments show that the network, when given multiple captions, is even able to transition between scenes transferring the spatio-temporal semantics it has learned thus far, dynamically during generation. This paper makes the following contributions: (1) A novel methodology that can perform variable length semantic video generation with captions by separately and simultaneously learning the long-term and short-term context of the video; (2) A methodology for selectively combining information for conditioning at various levels of the architecture using appropriate attention mechanisms; and (3) A network architecture which learns a robust latent representation of videos and is able to perform competently on tasks such as unsupervised video generation and action recognition. The results obtained on standard datasets that earlier efforts have used for such efforts are very promising, and support the claims of this work. 2. Related Work Recent years have witnessed the emergence of generative models like Variational Autoencoders (VAEs) [8], Generative Adversarial Networks (GANs) [1] and other methods such as using autoregression [25]. Earlier generative models based on methods such as Boltzmann Machines (RBMs) [19, 17] and Deep Belief Nets [4] were always constrained by issues such as intractability of sampling. Recent methods have enabled learning a much more robust latent representation of the given data [12, 13, 3, 30] and are helping improving the performance of several supervised learning tasks [10, 29, 28]. Previous approaches for image generation have extended VAEs and GANs to generate images based on captions by conditioning them with textual information [11, 15]. Our approach also constitutes a variant of Conditional VAE [20] but differs in that in our paper, we use it to generate videos (earlier efforts only generated images) from captions with the capability to generate videos of arbitrary lengths. Further, our approach is distinct in that it incorporates captions by learning an attention-based embedding over them by leveraging long-term and short-term dependencies within the video to generate coherent videos based on captions. The proposed methodology draws some similarity with past methods [26, 16] that perform unsupervised video generation (but without captions), with all of them using GANs. Vondrick et al. [26] use a convolutional network with a fractional stride as the generator and a spatio-temporal convolutional network as a discriminator in a two-stream approach where the background and the foreground of a scene are processed separately. Saito et al. [16] introduced a network called Temporal GAN where they use a 1D deconvolutional network to output a set of latent variables, each corresponding to a separate frame and an image generator which translates them to a 2D frame of the video. However, in addition to not incorporating caption-based video generation, these approaches suffer from the drawback of not being scalable in generating arbitrarily long videos. Our approach, by approaching video generation frame-by-frame and utilizing the long-term and short-term context separately, effectively counters these limitations of earlier work. Besides, our approach learns to focus on separate objects/glimpses in a frame unlike [6] where the focus is on individual pix- els, and [26] where network’s attention is divided into just background and foreground. In addition to generative modeling of videos, learning their underlying representations has been used to assist several supervised learning tasks such as future prediction and action recognition. [22] is one of the earliest efforts in learning deep representations for videos and utilizes Long ShortTerm Memory units (LSTMs) [5] to predict future frames given a set of input frames. More recent efforts on video prediction have attempted to factorize the joint likelihood of the video to predict the future frames [6] or use the first image of the video with Conditional VAE to predict the motion trajectories and use them to generate subsequent frames[27]. We later demonstrate that in addition to the primary application of semantically generating videos with attentive captioning, it is possible to make small changes to our network which enable it to even predict future frames given an input video sequence. 3. Methodology The primary focus of our work is to allow video generation to take place semantically via captions. Generating a video with variable number of frames given a caption is very different from generating a single image for a caption, due to the need to model the temporal context in terms of the actions and interactions among the objects. Consider, for example, the caption – “A man is walking on the grass.” Generating a single image for this caption, ideally, will simply show a man in a walking stance on top of a grassy ground. However, if we want to generate a sequence of frames corresponding to this caption, it necessitates the network to understand how the structure of man on the grass will transition from one frame to the other in relation to the motion of walking. In other words, it means that the network should be able to decouple the fundamental building blocks of any video, i.e., objects, actions and interactions, and have the ability to combine them semantically given a stimulus, which in this case, is a caption. We now explain how we model our approach to generate variable length videos conditioned on captions and later discuss the network architecture. 3.1. Model Let the random variable Y = {Y1 , Y2 , · · · , Yn } denote the distribution over videos with Y1 , Y2 , · · · , Yn being the ordered set of n frames comprising the videos. Let X = {X1 , X2 , · · · , Xm } be the random variable for the distribution over text captions with X1 , X2 , · · · , Xm being the ordered set of m words constituting the caption. P (Y |X) then captures the conditional distribution of generating some video in Y for a given caption in X. Our objective is to maximize the likelihood of generating an appropriate video for a given caption. Since we would like to generate a video for a caption one frame at a time, we Long-Term Context Yk-1,Yk-2,...,Y1 Caption X X1,X2,...,Xm hvideo value of z. So, we can define P (Y |U, V ) in terms of z as (similar to [8]), using normal distribution (denoted by N ): Short-Term Context Yk-1 P (Y |U, V ) = N (f (z, U, V ), σ 2 ∗ I) rk-1 hlang Soft-Attention (Long-Term) Soft-Attention (Short-Term) sl (5) Using variational inference, a distribution Q(z|Y, U, V ) is introduced that takes values for Y , U and V in the training phase, and outputs an approximate posterior distribution over z that is likely to generate the appropriate video given the long-term and short-term contexts derived from a given caption. Hence the variational lower bound is: ss z Next Frame Yk log P (Y |U, V ) = Figure 1. Illustration of the proposed model. KL(Q(z|U, V, Y )||P (z|U, V, Y )) + Ez∼Q(z|U,V,Y ) [log P (Y, z|U, V ) redefine P (Y |X) as: n Y P (Y |X) = P (Yi |Yi−1 , · · · · · · , Y1 , X) − log Q(z|U, V, Y )] ≥ (1) i=1 = where n is the total number of frames in the video. Generation of the k th frame, Yk , can therefore be expressed as: P (Yk |X) = P (Yk |Yk−1 , · · · , Y1 , X) (2) thus allowing the generation of a given frame to depend on all the previously generated frames. The generation can hence model both short-term and long-term spatio-temporal context. Yk gathers short-term context, which consists of the local spatial and temporal correlations existing between any two consecutive frames, from Yk−1 . Yk also obtains its long-term context from all the previous frames combined to understand the overall flow of the video. This ensures that that the overall consistency of the video is maintained while generating the frame. In order to model this when generating the kth frame, we define two functions: Uk and Vk : Uk = g(Yk−1 , X) (3) Vk = h(Yk−1 , · · · , Y1 , X) (4) where U and V model the short-term and long-term stimulus respectively for generating Yk . These two functions are implemented as new layers in our architecture, which is discussed in subsequent sections. Qn Therefore, we now model P (Y |X) as P (Y |U, V ) = i=1 P (Yi |Ui , Vi ). P (Y |U, V ) is a complex multi-modal distribution that models the various possibilities of generating a video given a caption. For example, the same caption “Man walking on grass” can be generated with a man differing in height, face and other physiological attributes. Even the way the man walks can exhibit a wide range of variations. In order to capture this complex distribution P (Y |U, V ) and avoid an ‘averaging effect’ over the various possibilities, we use a variational auto-encoder (VAE) [8]. The VAE introduces a latent variable z such that the likelihood of any given possibility is governed by the likelihood of sampling a particular Ez∼Q(z|U,V,Y ) [log P (Y |U, V, z) + log P (z|U, V ) − log Q(z|U, V, Y )] Ez∼Q(z|U,V,Y ) [log P (Y |U, V, z)) − KL(Q(z|U, V, Y )||P (z|U, V )] (6) where Q(z|U, V, Y ) approximates the intractable posterior P (z|U, V ). z is conditionally independent of U and V with P (z|U, V ) = P (z) and P (z) is assumed to be N (0, I). One way to model P (Y |U, V ) for video generation is to introduce separate latent variables for each of the frames to be generated. Such an approach does not allow the model to scale and generate videos with arbitrary number of frames (since the number of latent variables will then be arbitrary). Therefore, we propose our model with just a single latent variable, z to model P (Y |U, V ); the same latent variable is sampled recurrently to generate every subsequent frame. Figure 1 shows an illustration of the proposed model. During testing, we sample z ∼ N (0, I) to get a sample (one video frame) from the distribution P (Y |U, V ). This is then continued recurrently, allowing us to generate videos with any user-defined number of frames. 3.2. Latent Representation and Soft Attention for Captions Similar to [11], we first pass the given caption through a bi-directional LST M lang , as shown in Figure 2, to generate a word-level latent representation for the caption, lang hlang = [hlang , hlang , · · · , hlang denoting the m ] with hi 1 2 th latent representation for the i word in the caption (m being the total number of words in the caption). Since U and V model different kinds of context for a video, it is reasonable to say that a caption can trigger U and V differently. For instance, in the example caption discussed so far, words like ‘grass’ and ‘walking’ that correspond to elements like background and motion in a video can trigger its long-term characteristics; while ‘man’ whose posture changes in every frame can be responsible for the video’s short-term characteristics. Therefore, we propose the network architecture to have a separate soft attention mechanism for each of the Conv-LSTM LSTMvideo Ŷk hvideo Conv-LSTM LSTMvideo Write Soft-Attention (Long-Term) Y1,Y2,...,Yk-1 sl LSTMdec Ŷk hvideo Write Soft-Attention (Long-Term) Y1,Y2,...,Yk-1 sl z BiDirectional LSTMlang hlang Soft-Attention (Short-Term) X = {X1,X2,...,Xm} sst + × μ σ ε∼ N(0,I) LSTMenc LSTMdec z BiDirectional LSTMlang hlang ∼ N(0,I) Soft-Attention (Short-Term) X = {X1,X2,...,Xm} sst Read Read rk-1t Training rk-1t Read Ykt Testing Yk-1 Yk-1 Figure 2. Proposed network architecture for attentive semantic video generation with captions. Y = {Y1 , Y2 , · · · , Yk } denotes the video frames generated by the architecture, while X = {X1 , X2 , · · · , Xm } denotes the set of words in the caption. contexts over hlang , the latent representation of the caption. This is described in the next few sections. 3.3. Modeling Long-Term Context using Attention To model the long-term context, Vk , to generate the video frame Yk , our network architecture consists of a convolutional LSTM, which we call LST M video as shown in Figure 2. We feed the frames Yk−1 , · · · , Y1 , generated so far by the network to LST M video , and compute hvideo which is the final latent representation learned by LST M video after processing all the previous frames. This hvideo is then combined with hlang from the caption via a soft-attention layer to create the long-term context representation sl as shown in Figure 2. The soft-attention mechanism receives hlang and hvideo as input, and works by learning a set of probabilities, A = {α1 , α2 , · · · , αm } corresponding to each word in the caption. The output of the soft-attention layer is then given by: sl = attention(hlang , hvideo ) = α1 hlang + α2 hlang + · · · + αm hm lang 1 2 (7) where:   video exp v T tanh(uhlang + wh + b) i   αi = P m lang T video + b) exp v tanh(uh + wh j j=1 center, variances and stride are learnt by the network (as in [3]). For every timestep t, we read a glimpse, rk−1 , from the previous frame, Yk−1 , pass it through a small convolutional network (2 convolutional layers with one fully connected layer) and combine it with hlang via soft-attention (similar to Section 3.3) to create the short-term context representation sst . Simultaneously, we also read a glimpse, rt , from Ykt−1 (also passed through a similar convolutional network), denoting the frame Yk generated after t−1 timesteps. rt and sst along with sl Section 3.3 are encoded by LST M enc to learn the approximate posterior Q. z is then sampled from Q and decoded using LST M dec , whose output is sent to a similar deconvolutional network before passing to a write function to generate content in a region of interest (learned by the attention mechanism) on the current frame of interest, Yk . This is different from [3], and we found this to be important in generating videos of better quality. The use of such an LSTM autoencoder architecture in our model ensures that the region to be attended to next is conditioned on the regions that have been attended so far. The information written on different regions in the frame is accumulated over T timesteps to generate a single frame Yk . The following equations explain these steps: rk−1t = conv(read(Yk−1 )) (8) rt = conv(read(Ykt−1 )) (9) sst = enc = attention(hlang , [rk−1t , hdec t−1 )] enc dec LST M (r, ss , sl , ht−1 ) enc where v, u, w and b are the network parameters. 3.4. Modeling Short-Term Context using Attention and Frame Generation When a frame is generated in a single pass, even though the model might be able to preserve the overall motion in the frame, the various objects in the scene suffer from blurriness and distortion. In order to overcome this drawback of one-shot frame generation, we model Uk and propose our frame generator to have a differentiable recurrent attention mechanism resembling [2] and [3] to generate frame Yk in T timesteps (as shown in Figure 2). The attention mechanism comprises of a grid of Gaussian filters, whose grid h z ∼ Q(z|h (10) (11) ) (12) dec (13) hdec t = LST M Ykt = Ykt−1 + (z, ss , sl , hdec t−1 ) write(deconv(hdec t )) (14) A major advantage of such a recurrent attention mechanism, in the context of this work, is that the network learns a single distribution that can distinguish between different elements of a frame, and attend to them in each time step. This further enables the network to dynamically combine these elements during inference to effectively generate frames. allowed us to introduce a sense of ‘direction’ in the video context, and study the proposed model. We uniformly 3.5. Loss Function sampled from the given video sequence and generated our As mentioned in the previous sections, we take dataset with each video having 10 frames of size 120 × 120. P (z|U, V ) = P (z) ∼ N (0, I). This simplifies the empiriFor each of these videos, we manually created captions such cal variational bound to (note that we minimize the negative as ‘person 1 is walking left-to-right’ or ’person 3 is runof the bound, as in VAEs [8]): ! ning right-to-left’. The information on person number is S obtained from the metadata accompanying the dataset. The 1X log P (Y |U, V, z s )−KL(Q(z|U, V, Y )||P (z|U, V )) L=− advantage of using the KTH dataset in our context is that S s=1 the same set of people perform all the actions as opposed to (15) other action datasets (such as UCF-101) where the people with ! performing the actions changes. This allows us to add apT 1 X 2 2 µt +σt −log σt2 −T /2 propriate captions to the dataset, and study and validate the KL(Q(z|U, V, Y )||P (z|U, V )) = 2 t=1 performance of our model. (16) We further performed experiments for unsupervised where t denotes the time-step over which the frames are video generation using our model without captions. As generated as before, and z s denotes the sth sample taken it is related to earlier efforts, we show results on UCFfrom the z distribution among a set of total S samples which 101 dataset [21] to be able to compare with earlier efforts. are used to compute the likelihood term. The negative likeWe uniformly sampled the videos from UCF-101 dataset to lihood term, which is also the reconstruction loss, is comgenerate video sequences for our training dataset with each puted as the binary pixel-wise cross-entropy loss between video having 10 frames each of size 120 × 120 × 3. Importhe original video frame and the generated frame. All the tant thing to note here is that although we are training our losses here are calculated frame-wise. network over videos of 10 frames, we can generate videos with any number of frames (shown in Section 4.4). 4. Experiments and Results We note that in order to generate the first frame of the We evaluated the proposed model on datasets of increas2 video for a caption, we prefixed videos from all datasets ing complexity . We first created a variant of Moving with a start-of-video frame. This frame marks the beginning MNIST dataset (similar to [22, 6]) with videos depicting of every given video. It contains all 0s resembling the starta single digit moving across the frame. Each video has of-sentence tag used to identify the beginning of a sentence a set of 10 frames, each of size 64 × 64. We added the in Natural Language Processing [23]. 28 × 28 sized images of digit from the original MNIST dataset to each of the frames and varied the initial positions to make the digit move either up-and-down or left-and-right across the frames. We then captioned each video based on the digit and its motion. For instance, a video with caption ‘digit 2 is going up and down’ contains a sample of 2 from MNIST moving up and down in the video. We similarly created a Two-Digit Moving MNIST dataset similar to [22, 6] where each video contains two randomly chosen digits moving across the frames going either left-and-right or up-and-down independently, giving us a dataset containing 400 combinations. Examples of the captions in this dataset are ‘digit 1 is moving up and down and digit 3 is moving left and right’. To evaluate the proposed network’s performance on a more realistic dataset, we used the KTH Human Action Database [18] which consists of over 2000 video sequences comprised of 25 persons performing 6 actions (walking, running, jogging, hand-clapping, hand-waving and boxing). We used the video sequences of walking, running and jogging for our evaluation because in each of these actions, a person was going either right-to-left or left-to-right which 2 All the codes, videos and other resources are available at https: //github.com/Singularity42/cap2vid 4.1. Results on Generation with Captions The results on the Moving MNIST and KTH datasets are shown in Figure 3, and illustrate the rather smooth generations of the model. (The results of how one frame of the video is generated over T time-steps is included in the supplementary material due to space constraints.) In order to test that the network is not memorizing, we split the captions into a training and test set. Therefore, if the training set contains the video having caption as ‘digit 5 is moving up and down’, the model at test-time is provided with ‘digit 5 is moving left and right’. Similarly, in the KTH dataset, if the video pertaining to the caption ‘person 1 is walking from left-to-right’ belongs to the training set, the caption ‘person 1 is walking right-to-left’ is included at test time. We thus ensure that the network makes a video sequence from a caption that it has never seen before. The results show that the network is indeed able to generate good quality videos for unseen captions. We infer that it is able to dissociate the motion information from the spatial information. In natural datasets where the background is also prominent, the network selectively attends to the object over the background information. The network achieves this without the need of externally separating the object information from Figure 3. The results of our network for different datasets to generate videos for a single caption. Number of frames generated is 15. the background information [26] or external motion trajectories [27]. Another observation is that the object consistency is maintained and the long-term fluidity of the motion is preserved. This shows that the long-term and the shortterm context is effectively captured by the network architecture and they both work in ‘coordination’ to generate the frames. Also, as mentioned earlier, methodology ensures that a video can be generated with any number of frames. An example of a generation with variable length of frames is shown in Figure 4. Figure 4. Variable length video generation for caption ‘digit 0 is going up and down’. 4.2. Results with Spatio-Temporal Style Transfer We further evaluated the capability of the network architecture to generate videos where the captions are changed in the middle. Here, we propose two different settings: (1) Action Transfer, where the information of the motion that the object (i.e, digit/person) is performing is changed midway during the generation; and (2) Object Transfer, where the object information (i.e, digit/person) is changed midway during the generation. During action transfer, we expect that the object information remains intact but the motion that is being performed by the object changes; and during object transfer, we expect a change in the object information with respect to what has been generated so far. Results for action and object transfer can be seen in Figures 5(a) and 5(b) respectively. We also go a step ahead and perform both Action Transfer and Object Transfer together as shown in Figure 5(c). To test the robustness of the network, we ensured that the second caption used in this setup was not used for training the network. Captioning Experiment LL KL Total Loss Without Captioning on 65.76 17.97 83.73 Long-Term Context Without Captioning on 72.53 13.56 86.09 Short-term Context With Captioning on Long63.55 11.84 75.39 and Short-Term Context Table 1. Quantitative comparison of loss at the end of training for different ablation experiments on captioning. We note here that when the spatio-temporal transfer happens, the object position remains the same in all the results, and the object from the second caption continues its action from exactly the same position. This is different from the case when the video is freshly generated using a caption since then the object can begin its motion from any arbitrary position. Moreover, the network maintains the context of the video while changing the object or action. For example, in Figure 5(c), the digit 5 with a certain stroke width and orientation changes to a digit 8 with the same stroke width and orientation. Similarly, in the natural dataset the type of the background and its illumination remains the same. The preservation of motion and context as well as the position is a crucial result in showcasing the ability of the network to maintain the long-term and short-term context in generating videos even when the caption is changed in the middle. 4.3. Ablation Studies The key contribution of this work has been to condition the generation of the videos using long-term context (sl ) and short-term context (ss ). We perform an ablation study over the importance of each of these contexts, by removing them one at a time and training the network. We ensure that all the other parameters between the two networks remain the same. The results of removing long-term context are shown in Figure 6 (a), where the caption is ‘digit 9 moving up and down’. Compared to Figure 3(a), there are two dis- Figure 5. Spatio-Temporal style transfer. First caption generates for 7 frames. Second caption continues the generation from the 8th frame. Figure 6. (a) shows videos when generated without captioning on Long-term context. (b) shows videos when generated without captioning on Short-term context. tinct effects that can be observed: (1) either the object characteristics (such as the shape of the digit 9) changes over time; or (2) the object starts to oscillate (instead of following the specified motion) because it has failed to capture the long-term fluid motion over the video, thus supporting the need for sl in maintaining coherence between the frames. The results of removing short-term context are shown in Figure 6 (b). Here we notice a significant deterioration in the object quality. We infer that as the frame generation takes place over a number of time-steps, it is essential that the model, while generating a frame in a given time-step, receives a strong local temporal stimulus from glimpses of the previous frame. Table 1 further shows a quantitative analysis of these experiments, which corroborate that the proposed approach of using a long-term and short-term context together helps learn a better model for video generation. In order to further study the usefulness of the attention Figure 7. Videos generated using different approaches of conditioning over test-set caption ‘digit 5 is going up and down’ mechanism we have on the caption representation, we compared our approach with other ways to condition on the caption information. We first trained our network where we conditioned the frame generation directly on one-hot vectors created separately from the action and object information present in the captions. We also performed an experiment where we conditioned on latent vectors obtained by passing the caption through a pre-trained model of skipthought vectors [9]. The results of the comparison are shown in Figure 7. It can be observed that the onehot vector approach did not respond to the caption at all and generated random video samples. The approach with pre-trained skipthought vectors did match the object information but couldn’t associate it with the correct motion. In comparison, our methodology is able to perform extremely well for the unseen caption. Figure 8. Results of unsupervised video generation and comparison with results from Temporal-GAN [16]. Experiment Accuracy (%) Training: Generated, Testing: Original 62.36 Training: Original, Testing: Generated 68.24 Training: Both, Testing: Both 70.95 Table 2. Accuracy on action classification performed with feature vectors from original and generated videos on the KTH dataset. 4.4. Unsupervised Video Generation The proposed architecture also allows videos to be generated in an unsupervised manner without captions by making some modifications. In order to do this,we remove ss and sl and the frame generation is conditioned directly on rk−1t and hvideo changing equations 11 and 13 to: henc t = LST M enc (r, rk−1t , hvideo , hdec t−1 ) hdec t = LST M dec (z, rk−1t , hvideo , hdec t−1 ) (18) (17) We show the effectiveness of our architecture to generate unsupervised videos by training our network on Two-Digit Moving MNIST dataset and UCF-101 datasets. As mentioned earlier, we used UCF-101 in this experiment to be able to compare with earlier work. (Also, UCF-101 was not used in other experiments, since it does not have captions and it’s not trivial to add captions for this dataset.) Results can be seen in Figure 8 along with a few generations presented by [16] in their paper for comparison. We can infer that even in the unsupervised setting, our method preserves the object information throughout the video, whereas in [16], all the generated videos seem to lose the objectness towards the later part of the video. 4.5. Quantitative Results Data programming: Since our network can generate caption based videos, it can even be employed to artificially create a labeled dataset [14]. So, we evaluated the real and generated videos of KTH dataset for action recognition. We first trained an SVM on features extracted from the generated videos with action labels corresponding to the captions, and tested the model on the real videos. We then performed the experiment vice versa. To ensure an independent unbiased analysis, we extracted feature vectors using a 3D spatio-temporal convolutional network [24] trained on Sports 1M Dataset [7]. As shown in Table 2, we can observe that the accuracy for the two settings is comparable. In fact, the highest is achieved on mixing the two datasets. We infer that the generated videos are able to fill up the gaps in the manifold and thus oversampling the original set of video with them can help improve the training on a supervised learning task. (We note that these models were not finetuned to achieve the best possible accuracy on the dataset, but only used for comparison against each other.) User Study: In order to assess how people perceive our generated results, we performed a user study. 10 generated and 10 real videos having the same captions for each dataset were shown to 24 subjects who were asked to rate the videos as generated or real. The results are shown in Table 3. It can be clearly observed that the percentage of generated videos considered real is very close to that of real videos. This suggests that our network is able to generate new videos highly similar to the real ones. One Digit MNIST Two Digit MNIST KTH Dataset Datasets Video Type Gen. Real Gen. Real Gen. Real % videos 83.33% 93.75% 78.53% 89.15% 75.94% 92.45% considered real Table 3. User Study Results showing the percentage of videos considered real by people. (We also performed studies on the task of future frame prediction, but are unable to include it due to space constraints. These are included in the supplemental material.) 5. Conclusion In summary, we proposed a network architecture that enables variable length semantic video generation using captions, which is the first of its kind. Through various experiments, we conclude that our approach, which combines the use of short-term and long-term spatiotemporal context, is able to effectively to generate videos on unseen captions maintaining a strong consistency between consective frames. Moreover, the network architecture is robust in transferring spatio-temporal style across frames when generating multiple frames. By learning using visual context, the network is even able to learn a robust latest representation over parts of videos, which is useful for tasks such as video prediction and action recognition. We did observe in our experiments that our network does exhibit some averaging effect when filling up the background occasionally. We infer that since the recurrent attention mechanism focuses primarily on objects, the approach may need to be extended with a mechanism to handle the background via a separate pathway. Future efforts in this direction will assist in bridging this gap as well as extending this work to address the broader challenge of learning with limited supervised data. References [1] I. Goodfellow, J. Pouget-Abadie, M. Mirza, B. Xu, D. Warde-Farley, S. Ozair, A. Courville, and Y. Bengio. Generative adversarial nets. In Advances in neural information processing systems, pages 2672–2680, 2014. [2] A. Graves, G. Wayne, and I. Danihelka. Neural turing machines. arXiv preprint arXiv:1410.5401, 2014. [3] K. Gregor, I. Danihelka, A. Graves, D. J. Rezende, and D. Wierstra. Draw: A recurrent neural network for image generation. 2015. [4] G. E. Hinton, S. Osindero, and Y.-W. Teh. A fast learning algorithm for deep belief nets. Neural computation, 18(7):1527–1554, 2006. [5] S. Hochreiter and J. Schmidhuber. Long short-term memory. Neural computation, 9(8):1735–1780, 1997. [6] N. Kalchbrenner, A. v. d. Oord, K. Simonyan, I. Danihelka, O. Vinyals, A. Graves, and K. Kavukcuoglu. Video pixel networks. arXiv preprint arXiv:1610.00527, 2016. [7] A. Karpathy, G. Toderici, S. Shetty, T. Leung, R. Sukthankar, and L. Fei-Fei. Large-scale video classification with convolutional neural networks. In CVPR, 2014. [8] D. P. Kingma and M. Welling. Auto-encoding variational bayes. Proceedings of the 2nd International Conference on Learning Representations (ICLR), 2014. [9] R. Kiros, Y. Zhu, R. R. Salakhutdinov, R. Zemel, R. Urtasun, A. Torralba, and S. Fidler. Skip-thought vectors. In Advances in neural information processing systems, pages 3294–3302, 2015. [10] C. Ledig, L. Theis, F. Huszár, J. Caballero, A. Cunningham, A. Acosta, A. Aitken, A. Tejani, J. Totz, Z. Wang, et al. Photo-realistic single image super-resolution using a generative adversarial network. arXiv preprint arXiv:1609.04802, 2016. [11] E. Mansimov, E. Parisotto, J. L. Ba, and R. Salakhutdinov. Generating images from captions with attention. International Conference on Learning Representations, 2016. [12] A. Radford, L. Metz, and S. Chintala. Unsupervised representation learning with deep convolutional generative adversarial networks. International Conference on Learning Representations, 2015. [13] A. Radford, L. Metz, and S. Chintala. Unsupervised representation learning with deep convolutional generative adversarial networks. arXiv preprint arXiv:1511.06434, 2015. [14] A. J. Ratner, C. M. De Sa, S. Wu, D. Selsam, and C. Ré. Data programming: Creating large training sets, quickly. In Advances in Neural Information Processing Systems, pages 3567–3575, 2016. [15] S. Reed, Z. Akata, X. Yan, L. Logeswaran, B. Schiele, and H. Lee. Generative adversarial text to image synthesis. In Proceedings of The 33rd International Conference on Machine Learning, volume 3, 2016. [16] M. Saito and E. Matsumoto. Temporal generative adversarial nets. arXiv preprint arXiv:1611.06624, 2016. [17] R. Salakhutdinov and G. E. Hinton. Deep boltzmann machines. In AISTATS, volume 1, page 3, 2009. [18] C. Schuldt, I. Laptev, and B. Caputo. Recognizing human actions: A local svm approach. In Pattern Recognition, 2004. ICPR 2004. Proceedings of the 17th International Conference on, volume 3, pages 32–36. IEEE, 2004. [19] P. Smolensky. Information processing in dynamical systems: Foundations of harmony theory. Technical report, DTIC Document, 1986. [20] K. Sohn, H. Lee, and X. Yan. Learning structured output representation using deep conditional generative models. In Advances in Neural Information Processing Systems, pages 3483–3491, 2015. [21] K. Soomro, A. R. Zamir, and M. Shah. Ucf101: A dataset of 101 human actions classes from videos in the wild. arXiv preprint arXiv:1212.0402, 2012. [22] N. Srivastava, E. Mansimov, and R. Salakhutdinov. Unsupervised learning of video representations using lstms. In ICML, pages 843–852, 2015. [23] I. Sutskever, O. Vinyals, and Q. V. Le. Sequence to sequence learning with neural networks. In Advances in neural information processing systems, pages 3104–3112, 2014. [24] D. Tran, L. Bourdev, R. Fergus, L. Torresani, and M. Paluri. Learning spatiotemporal features with 3d convolutional networks. In Proceedings of the IEEE International Conference on Computer Vision, pages 4489–4497, 2015. [25] A. van den Oord, S. Dieleman, H. Zen, K. Simonyan, O. Vinyals, A. Graves, N. Kalchbrenner, A. Senior, and K. Kavukcuoglu. Wavenet: A generative model for raw audio. CoRR abs/1609.03499, 2016. [26] C. Vondrick, H. Pirsiavash, and A. Torralba. Generating videos with scene dynamics. In Advances In Neural Information Processing Systems, pages 613–621, 2016. [27] J. Walker, C. Doersch, A. Gupta, and M. Hebert. An uncertain future: Forecasting from static images using variational autoencoders. In European Conference on Computer Vision, pages 835–851. Springer, 2016. [28] K. Xu, J. Ba, R. Kiros, K. Cho, A. Courville, R. Salakhudinov, R. Zemel, and Y. Bengio. Show, attend and tell: Neural image caption generation with visual attention. In Proceedings of the 32nd International Conference on Machine Learning (ICML-15), pages 2048–2057, 2015. [29] R. Yeh, C. Chen, T. Y. Lim, M. Hasegawa-Johnson, and M. N. Do. Semantic image inpainting with perceptual and contextual losses. arXiv preprint arXiv:1607.07539, 2016. [30] H. Zhang, T. Xu, H. Li, S. Zhang, X. Huang, X. Wang, and D. Metaxas. Stackgan: Text to photo-realistic image synthesis with stacked generative adversarial networks. arXiv preprint arXiv:1612.03242, 2016. 6. Supplementary Material We herewith present additional results using the proposed methodology, which could not be included in the main paper due to space constraints. Future frame prediction We evaluated our approach on the task of next frame prediction. We took the Two-Digit Moving MNIST dataset that we used for other experiments and fed the first few frames to the model, asking it to predict the next set of frames. We trained our network in two settings: (1) When the number of input video frames is 10 and the network is allowed to predict the subsequent 10 frames; and (2) When the number of input video frames is 5 and the network is allowed to predict the subsequent 15 frames (in order to showcase the network’s ability to generate variable lengths of frames). The results are shown in Figure 9. It can be observed that our model performs well on this task. Although there are minor distortions observed when the two digits overlap, the network is robust enough not to perpetuate these distortions and it maintains the overall spatio-temporal consistency across the frames generated. We note that earlier efforts on future frame prediction (such as [6, 22]) only predict a pre-defined fixed number of frames. Variable length video generation Figure 10 demonstrates the ability of the network to generate videos containing a relatively large number of frames by generating a video containing 30 frames. Example of video formation over T timesteps Figure 11 shows how the network generates the various frames of the video over T timesteps. Here we have taken T = 10 and the number of frames generated, n = 15. The frames are generated one at a time conditioned on all the previously generated frames. Figure 11 shows them together to make it easier to visualize the motion in the video. It is evident that the model gradually generates each video, by conditioning the content on each frame on previously generated content. An interesting observation in the generation on the KTH dataset is that towards the end, the video shows a person leaving the field of view of the camera. This happens because the training data for person 10 has such frames towards the end of certain videos too (as seen in Figure 12). Analysis of results on the KTH dataset In order to assert that our network architecture is indeed able to generate the correct person given the person index in case of the KTH dataset, we show in Figure 12, three rows of videos. The top row depicts videos from the dataset of different persons. The second row shows videos from person 10, and the third row shows the generation of our model in the action transfer setting. It is evident that the generated video, conditioned on the captions including person 10, indeed corresponds to person 10, and not of any other person. More results on the UCF dataset Figure 13 shows more results on the UCF dataset, which were generated in an unsupervised manner. The videos generated consist of 15 frames, and show the effectiveness of the proposed framework despite the UCF dataset being very difficult to model. Figure 9. Next frame prediction on Moving MNIST with variable number of frames specified for input and prediction. Figure 10. Video generated for Moving MNIST for caption ’digit 1 is going up and down’ for 30 frames, showing the ability of the network to generate a video with an arbitrary number of frames. Figure 11. Video generation for Moving MNIST and KTH dataset. Here T = 10 and n = 15. The frames are generated one at a time conditioned on all the previously generated frames. Figure 12. To demonstrate that the network understands the object information, the top row shows the generated video belonging to persons 25 and 6. The second row shows videos of person 10. In the third row, we show the video generated for the captions ‘person 10 is walking left to right’ and ‘person 10 is running right to left’ (action transfer during the video). Figure 13. Unsupervised video generation for the UCF dataset. The first two rows show videos where people are brushing their teeth, while the next two rows show people playing violin.
1cs.CV
A Deterministic Almost-Tight Distributed Algorithm for Approximating Single-Source Shortest Paths∗ arXiv:1504.07056v4 [cs.DC] 7 Oct 2016 Monika Henzinger† Sebastian Krinninger‡ Danupon Nanongkai§ Abstract We present a deterministic (1 + o(1))-approximation O(n1/2+o(1) + D1+o(1) )-time algorithm for solving the single-source shortest paths problem on distributed weighted networks (the CONGEST model); here n is the number of nodes in the network and D is its (hop) diameter. This is the first non-trivial deterministic algorithm for this problem. It also improves (i) the running time of the randomized (1+o(1))-approximation Õ(n1/2 D1/4 + D)-time1 algorithm of Nanongkai [STOC 2014] by a factor of as large as n1/8 , and (ii) the O(−1 log −1 )-approximation factor of Lenzen and Patt-Shamir’s Õ(n1/2+ + D)-time algorithm [STOC 2013] within the same running time. Our running time matches the known time lower bound of Ω(n1/2 / log n + D) [Das Sarma et al. STOC 2011] modulo some lower-order terms, thus essentially settling the status of this problem which was raised at least a decade ago [Elkin SIGACT News 2004]. It also implies a (2 + o(1))-approximation O(n1/2+o(1) +D1+o(1) )-time algorithm for approximating a network’s weighted diameter which almost matches the lower bound by Holzer et al. [PODC 2012]. In achieving this result, we develop two techniques which might be of independent interest and useful in other settings: (i) a deterministic process that replaces the “hitting set argument” commonly used for shortest paths computation in various settings, and (ii) a simple, deterministic, construction of an (no(1) , o(1))-hop set of size O(n1+o(1) ). We combine these techniques with many distributed algorithmic techniques, some of which from problems that are not directly related to shortest paths, e.g. ruling sets [Goldberg et al. STOC 1987], source detection [Lenzen, Peleg PODC 2013], and partial distance estimation [Lenzen, Patt-Shamir PODC 2015]. Our hop set construction also leads to single-source shortest paths algorithms in two other settings: (i) a (1 + o(1))approximation O(no(1) )-time algorithm on congested cliques, and (ii) a (1 + o(1))approximation O(no(1) log W )-pass O(n1+o(1) log W )-space streaming algorithm, when edge weights are in {1, 2, . . . , W }. The first result answers an open problem in [Nanongkai, STOC 2014]. The second result partially answers an open problem raised by McGregor in 2006 [sublinear.info, Problem 14]. ∗ A preliminary version of this paper appears in Symposium on Theory of Computing (STOC) 2016. University of Vienna, Faculty of Computer Science, Austria. The research leading to this work has received funding from the European Union’s Seventh Framework Programme (FP7/2007-2013) under grant agreement no. 317532 and from the European Research Council under the European Union’s Seventh Framework Programme (FP7/2007-2013)/ERC Grant Agreement number 340506. This work was done in part while visiting the Simons Institute for Theory of Computing. ‡ Max Planck Institute for Informatics, Saarland Informatics Campus, Germany. This work was done while at the University of Vienna, Austria, and in part while visiting the Simons Institute for the Theory of Computing. § KTH Royal Institute of Technology, Sweden. Support by Swedish Research Council grant 2015-04659 “Algorithms and Complexity for Dynamic Graph Problems” 1 Õ hides polylogarithmic factors. † 1 Contents 1 Introduction 3 2 Preliminaries 2.1 Notation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2 The CONGEST Model and the Problem . . . . . . . . . . . . . . . . . . . . . 2.3 Toolkit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 7 7 8 3 Deterministic Hop Set Construction 3.1 Deterministic Clusters . . . . . . . . . 3.1.1 Computing Priorities A . . . . 3.1.2 Computing Clusters . . . . . . 3.2 Hop Reduction with Additive Error . . 3.3 Hop Reduction without Additive Error 3.4 Computing the Hop Set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 Distributed Single-Source Shortest Paths Algorithm on Networks Arbitrary Topology 4.1 Computing an Overlay Network Deterministically . . . . . . . . . . . . . 4.1.1 Types of Nodes . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.1.2 Selecting Centers via Ruling Sets . . . . . . . . . . . . . . . . . . 4.1.3 Computing Distances to Centers . . . . . . . . . . . . . . . . . . 4.1.4 Completing the Proof of Theorem 4.1 . . . . . . . . . . . . . . . 4.2 Computing a Hop Set on an Overlay Network . . . . . . . . . . . . . . . 4.2.1 Computing Bounded-Distance Single-Source Shortest Paths . . . 4.2.2 Computing Priorities . . . . . . . . . . . . . . . . . . . . . . . . . 4.2.3 Computing Clusters . . . . . . . . . . . . . . . . . . . . . . . . . 4.2.4 Computing the Hop Reduction with Additive Error . . . . . . . 4.2.5 Computing the Hop Reduction without Additive Error . . . . . . 4.2.6 Computing the Hop Set . . . . . . . . . . . . . . . . . . . . . . . 4.2.7 Routing via the Hop Set . . . . . . . . . . . . . . . . . . . . . . . 4.3 Final Steps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 11 11 13 13 20 21 with . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 23 25 26 27 27 28 28 29 30 31 31 31 32 32 5 Algorithms on Other Settings 33 5.1 Congested Clique . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 5.2 Streaming Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 6 Conclusion and Open Problems 34 References 35 A Proof of Lemma 2.2 42 B Proof of Lemma 3.1 42 C Ruling Set Algorithm 43 2 1 Introduction In the area of distributed graph algorithms we study the complexity for a network to compute its own topological properties, such as minimum spanning tree, maximum matching, or distances between nodes. A fundamental question in this area that has been studied for many years is how much time complexity is needed to solve a problem in the so-called CONGEST model (e.g. [GKP98, PR00, Elk06, DHK+ 12, LPS13]). In this model (see Section 2 for details), a network is modeled by a weighted undirected graph G, where each node represents a processor that initially only knows its adjacent edges and their weight, and nodes must communicate with each other to discover global topological properties of the network. The communication between nodes is carried out in rounds, where in each round each node can send a small message to each neighbor. The time complexity is measured as the number of rounds needed to finish the task. It is usually measured by n, the number of nodes in the network, and D, the diameter of the communication network (when edge weights are omitted). Typically, D  n. In this paper, we consider the problem of approximating single-source shortest paths (SSSP). In this problem, a node s is marked as the source node, and the goal is for every node to know how far it is from s. The unweighted version – the breadth-first search tree computation – is one of the most basic tools in distributed computing, and is well known to require Θ(D) time (e.g. [Pel00]). In contrast, the only available solution for the weighted case is the distributed version of the Bellman-Ford algorithm [Bel58, For56], which requires O(n) time to compute an exact solution. In 2004, Elkin [Elk04] raised the question whether distributed approximation algorithms can help improving this time complexity and showed that any α-approximation algorithm requires Ω((n/α)1/2 / log n + D) time [Elk06]. Das Sarma et al. [DHK+ 12] (building on [PR00, KKP13]) later strengthened this lower bound by showing that any poly(n)-approximation (randomized) algorithm requires Ω(n1/2 / log n + D) time. This lower bound was later shown to hold even for quantum algorithms [EKN+ 14]. Since running times of the form2 Õ(n1/2 + D) show up in many distributed algorithms (e.g. MST [KP98, PR00], connectivity [Thu97, PT11], and minimum cut [NS14, GK13]) it is natural to ask whether the lower bound of [DHK+ 12] can be matched. The first answer to this question is a randomized O(−1 log −1 )-approximation Õ(n1/2+ + D)-time algorithm by Lenzen and Patt-Shamir [LPS13]3 . The running time of this algorithm is nearly tight if we are satisfied with a large approximation ratio. For a small approximation ratio, Nanongkai [Nan14] presented a randomized (1 + o(1))-approximation Õ(n1/2 D1/4 + D)-time algorithm. The running time of this algorithm is nearly tight when D is small, but can be close to Θ̃(n2/3 ) even when D = o(n2/3 ). This created a rather unsatisfying situation: First, one has to sacrifice a large approximation factor in order to achieve the near-optimal running time, and to achieve a (1 + o(1)) approximation factor, one must pay an additional running time of D1/4 which could be as far from the lower bound as n1/8 when D is large. Because of this, the question whether we can close the gap between upper and lower bounds for the running time of (1 + o(1))-approximation algorithms was left as the main open problem in [Nan14, Problem 7.1]. Secondly, and more importantly, both these algorithms are randomized. 2 3 Throughout, we use Õ to hide polylogarithmic factors. Note that the result of Lenzen and Patt-Shamir in fact solves a more general problem. 3 Given that designing deterministic algorithms is an important issue in distributed computing. This leaves an important open problem whether there is a deterministic algorithm that is faster than Bellman-Ford’s algorithm, i.e. that runs in sublinear-time. Our Results. In this paper, we resolve the two issues above. We present a deterministic (1 + o(1))-approximation O(n1/2+o(1) + D1+o(1) )-time algorithm for this problem (the o(1) term in the approximation ratio hides a 1/ polylog n factor and the o(1) term in the running p time hides an O( log log n/ log n) factor). Our algorithm almost settles the status of this problem as its running time matches the lower bound of Das Sarma et al. up to an O(no(1) ) factor. Since an α-approximate solution to SSSP gives a 2α-approximate value of the network’s weighted diameter (cf. Section 2), our algorithm can (2 + o(1))-approximate the weighted diameter within the same running time. Previously, Holzer et al. [HW12] showed that for any  > 0, a (2 − )-approximation algorithm for this problem requires Ω̃(n) time. Thus, the approximation ratio provided by our algorithm cannot be significantly improved without increasing the running time. The running time of our algorithm also cannot be significantly improved because of the lower bound of Ω(n1/2 / log n + D) [DHK+ 12] for approximate SSSP which holds for any poly(n)-approximation algorithm. Using the same techniques, we also obtain a deterministic (1 + o(1))-approximation O(no(1) )-time algorithm for the special case of congested clique, where the underlying network is fully-connected. This gives a positive answer to Problem 7.5 in [Nan14]. Previous algorithms solved this problem exactly in time Õ(n1/2 ) [Nan14] and Õ(n1/3 ) [CKK+ 15], respectively, and (1+o(1))-approximately in time O(n0.158 ) [CKK+ 15]4 . We can also compute a (2 + o(1))-approximation of the weighted diameter within the same running time. Holzer and Pinsker proved that computing a (2 − o(1))-approximation of the diameter requires Ω̃(n) time in the worst case [HP15] in the congested clique. Our techniques also lead to a (non-distributed) streaming algorithm for (1 + o(1))approximate SSSP where the edges are presented in an arbitrary-order stream, and an algorithm with limited space (preferably Õ(n log W ), when edge weights are in {1, 2, . . . W }) reads the stream in passes to determine the answer (see, e.g., [McG14] for a recent survey). It was known that Õ(n log W ) space and one pass are enough to compute an O(log n/ log log n)spanner and therefore approximate all distances up to a factor of O(log n/ log log n) [FKM+ 08] (see also [FKM+ 05, Bas08, EZ06, Elk11]). This almost matches a lower bound which holds even for the s-t-shortest path problem (stSP), where we just want to compute the distance between two specific nodes s and t [FKM+ 08]. On unweighted graphs one can compute (1 + , β)-spanners in β passes and O(n1+1/k ) space [EZ06], and get (1 + )-approximate SSSP in a total of O(β/) passes. In 2006, McGregor raised the question whether we can solve stSP better with a larger number of passes (see [Sub]). Very recently Guruswami and Onak [GO16] showed that a p-pass algorithm on unweighted graphs requires Ω̃(n1+Ω(1/p) /O(p)) space. This does not rule out, for example, an O(log n)-pass Õ(n)-space algorithm. Our algorithm, which solves the more general SSSP problem, gets close to this: it takes O(no(1) log W ) passes and O(n1+o(1) log W ) space. 4 With this running time, [CKK+ 15] can in fact solve the all-pairs shortest paths problem. Also see [LG16] for further developments in the direction of [CKK+ 15]. 4 Overview of Techniques. Our crucial new technique is a deterministic process that can replace the following “path hitting” argument: For any c, if we pick Θ̃(c) nodes uniformly at random as centers (typically c = n1/2 ), then a shortest path containing n/c edges will contain a center with high probability. This allows us to create shortcuts between centers – where we replace each path of length n/c between centers by an edge of the same length – and focus on computing shortest paths between centers. This argument has been repetitively used to solve shortest paths problems in various settings (e.g. [UY91, HK95, DI06, BHS07, RZ11, San05, DFI05, DFR09, Mąd10, Ber16, LPS13, Nan14]). In the sequential model a set of centers of size Θ̃(c) can be found deterministically with the greedy hitting set heuristic once the shortest paths containing n/c edges are known [Zwi02, Kin99]. We are not aware of any non-trivial deterministic process that can achieve the same effect in the distributed setting. The main challenge is that the greedy process is heavily sequential as the selection of the next node depends on all previous nodes, and is thus hard to implement efficiently in the distributed setting5 . In this paper, we develop a new deterministic process to pick Θ̃(c) centers. The key new idea is to carefully divide nodes into Õ(1) types. Roughly speaking, we associate each type t with a value wt and make sure that the following properties hold: (i) every path π with Ω(n/c) edges and weight Θ(wt ) contains a node of type t, and (ii) there is a set of O(n/c) centers of type t such that every node of type t has at least one center at distance o(wt ). We define the set of centers to be the collection of centers of all types. The two properties together guarantee that every long path will be almost hit by a center: for every path π containing at least n/c edges, there is a center whose distance to some node in π is o(w(π)) where, w(π) is the total weight of π. This is already sufficient for us to focus on computing shortest paths only between centers as we would have done after picking centers using the path hitting argument. To the best of our knowledge, such a deterministically constructed set of centers that almost hits every long path was not known to exist before. The process itself is not constrained to the distributed setting and thus might be useful for derandomizing other algorithms that use the path hitting argument. To implement the above process in the distributed setting, we use the source detection algorithm of Lenzen and Peleg [LP13] to compute the type of each node. We then use the classic ruling set algorithm of Goldberg et al. [GPS88] to compute the set of centers of each type that satisfies the second property above. (A technical note: we also need to compute a bounded-depth shortest-path tree from every center. In [Nan14], this was done using the random delay technique. We also derandomize this step by adapting the partial distance estimation algorithm of Lenzen and Patt-Shamir [LP15].) Another tool, which is the key to the improved running time, is a new hop set construction. An (h, )-hop set of a graph G = (V, E) is a set F of weighted edges such that the distance between any pair of nodes in G can be (1 + )-approximated by their h-hop distance (given by a path containing at most h edges) on G0 = (V, E ∪ F ) (see Section 2 for details). The notion of hop set was defined by Cohen [Coh00] in the context of parallel computing, although it has been used implicitly earlier, e.g. [UY91, KS92] (see [Coh00] for a detailed discussion). The previous SSSP algorithm [Nan14] was able to construct an (n/k, 0)-hop set of size kn, 5 We note that the algorithm of King [Kin99] for constructing a blocker can be viewed as an efficient way to greedily pick a hitting set by efficiently computing the scores of nodes. The process is as highly sequential like other greedy heuristics. 5 for any integer k ≥ 1, as a subroutine (in [Nan14] this was called shortest paths diameter reduction6 ). In this paper, we show that this subroutine can be replaced by the construction of an (no(1) , o(1))-hop set of size O(n1+o(1) ). Our hop set construction is based on computing clusters which is the basic subroutine of Thorup and Zwick’s distance oracles [TZ05] and spanners [TZ05, TZ06]. It builds on a line of work in dynamic graph algorithms. In [Ber09], Bernstein showed that clusters can be used to construct an (no(1) , o(1))-hop set of size O(n1+o(1) ). Later in [HKN14], we showed that the same kind of hop set can be constructed by using a structure similar to clusters while restricting the shortest-path trees involved to some small distance and use such a construction in the dynamic (more precisely, decremental) setting. The construction is, however, fairly complicated and heavily relies on randomization. In this paper, we build on the same idea, i.e., we construct a hop set using bounded-distance clusters. However, our construction is significantly simplified, to the point that we can treat the cluster computation as a black box. This makes it easy to apply on distributed networks and to derandomize. To this end, we derandomize the construction simply by invoking the deterministic clusters construction of Roditty, Thorup, and Zwick [RTZ05] and observe that it can be implemented efficiently on distributed networks7 . We note that it might be possible to use Cohen’s hop set construction instead. However, Cohen’s construction heavily relies on randomness and derandomizing it seems significantly more difficult. Updates. After the preliminary version of this paper appeared ([HKN16]), [BKK+ 16] showed that the no(1) term in our bounds can be eliminated. Elkin and Neiman showed the first construction of sparse hop sets with a constant number of hops [EN16a], and showed an application in computing approximate shortest paths from s sources. In particular, using our hop set and a modification of the framework in [Nan14] and this paper8 , this problem can be solved in O((sn)1/2+o(1) + Do(1) ) rounds. Elkin and Neiman showed a hop set which can be used to reduce the bound to Õ((sn)1/2 + D) when s = nΩ(1) . In [EN16b], they also showed further applications of hop set in the distributed construction of routing schemes. It was pointed out by Patt-Shamir (see [Tse15]) that using our algorithm as a black box, one can simplify and obtain improved running time in the construction of compact routing tables in [LP15]. (On the other hand, we note that our construction is based on many ideas from [LP15].) Our hop set construction also found applications in metric-tree embeddings [FL16]. Organization. We start by introducing notation and the main definition in Section 2. Then in Section 3 we explain the deterministic hop set construction in, which is based on a variation of Thorup and Zwick’s clusters [TZ05] In Section 4, we give our main result, namely the (1 + o(1))-approximation O(n1/2+o(1) + D1+o(1) )-time algorithm. In that section we explain the deterministic process for selecting centers mentioned above, as well as how to implement the hop set construction in the distributed setting. Finally, our remaining results are proved in Section 5. 6 This follows the notion of shortest paths diameter used earlier in distributed computing [KP08] We note that Thorup-Zwick’s distance oracles and spanners were considered before in the distributed setting (e.g. [LP15, DSDP15]) √ 8 More precisely, following Elkin and Neiman [EN16a], one constructs an overlay network of size sn √ instead of n as done in this paper. 7 6 2 2.1 Preliminaries Notation In this paper we consider weighted undirected graphs. For a set of edges E, the weight of each edge (u, v) ∈ E is given by a function w(u, v, E). If (u, v) ∈ / E, we set w(u, v, E) = ∞. For a graph G = (V, E), we define w(u, v, G) = w(u, v, E). Whenever we define a set of edges E as the union of two sets of edges E1 ∪ E2 , we set the weight of every edge (u, v) ∈ E to w(u, v, E) = min(w(u, v, E1 ), w(u, v, E2 )). We denote the weight of a path π in a graph G by w(π, G) and the number of edges of π by |π|. Given a graph G = (V, E) and a set of edges F ⊆ V 2 , we define G ∪ F as the graph that has V as its set of nodes and E ∪ F as its set of edges. The weight of each edge (u, v) is given by w(u, v, G ∪ F ) = w(u, v, E ∪ F ) = min(w(u, v, E), w(u, v, F )). We denote the distance between two nodes u and v, i.e., the weight of the shortest path between u and v, by d(u, v, G). We define the distance between a node u and a set of nodes A ⊆ V by d(u, A, G) = minv∈A d(u, v, G). For every pair of nodes u and v we define distance up to range R by ( d(u, v, G) if d(u, v, G) ≤ R d(u, v, R, G) = ∞ otherwise . and for a node v and set of nodes A ⊆ V by d(u, A, R, G) = minv∈A d(u, v, R, G). For any positive integer h and any nodes u and v, we define the bounded-hop distance between u and v, denoted by dh (u, v, G), as the weight of the shortest among all u-v paths containing at most h edges. More precisely, let Πh (u, v) be the set of all paths between u and v such that each path π ∈ Πh (u, v) contains at most h edges. Then, dh (u, v, G) = minπ∈Πh (u,v) w(π, G) if Πh (u, v) 6= ∅, and dh (u, v, G) = ∞ otherwise. We denote the hop-distance between two nodes u and v, i.e., the distance between u and v when we treat G as an unweighted graph, by hop(u, v, G). The hop diameter of graph G is defined as D(G) = maxu,v∈V (G) hop(u, v, G). When G is clear from the context, we use D instead of D(G). We note that this is different from the weighted diameter, which is defined as WD(G) = maxu,v∈V (G) d(u, v, G). Throughout this paper we use “diameter” to refer to the hop diameter (as it is typically done in the literature). Given any graph G = (V, E), any integer h, and  ≥ 0, we say that a set of weighted edges F is an (h, )-hop set of G if d(u, v, G) ≤ dh (u, v, H) ≤ (1 + )d(u, v, G) , where H = (V, E ∪ F ). In this paper we are only interested in (no(1) , o(1))-hop sets of size O(n1+o(1) ). We refer to them simply as “hop sets” (without specifying parameters). 2.2 The CONGEST Model and the Problem A network of processors is modeled by an undirected weighted n-node m-edge graph G, where nodes model the processors and edges model the bounded-bandwidth links between the processors. Nodes are assumed to have unique IDs in the range {1, 2, . . . , poly(n)} and infinite computational power. We denote by λ the number of bits used to represent each ID, i.e., λ = O(log n). Each node has limited topological knowledge; in particular, every node u 7 only knows the IDs of each neighbor v and w(u, v, G). As in [Nan14], we assume that edge weights are integers in {1, 2, . . . , W }, and W = poly log n. This is a typical assumption as it allows to encode the weight of an edge in one (or a constant number of) messages. The distributed communication is performed in rounds. At the beginning of each round, all nodes wake up simultaneously. Each node u then sends an arbitrary message of B = O(log n) bits through each edge (u, v), and the message will arrive at node v at the end of the round. The running time of a distributed algorithm is the worst-case number of rounds needed to finish a task. It is typically analyzed based on n (the number of nodes) and D (the network diameter). Definition 2.1 (Single-Source Shortest Paths (SSSP)). In the single-source shortest paths problem (SSSP), we are given a weighted network G and a source node s (the ID of s is known to every node). We want to find the distance between s and every node v in G, denoted by d(s, v, G). In particular, we want every node v to know the value of d(s, v, G). Recovering shortest paths. We note that although we define the problem to be computing the distances, we can easily recover the shortest paths in the sense that every node u knows its neighbor v that is in the shortest path between u and s. This is because our algorithm computes the distance approximation that satisfies the following property every node u 6= s has a neighbor v such that d0 (s, v) + w(u, v, G) ≤ d0 (s, u), (1) where d0 (s, v) is the approximate distance between s and v. For any distance approximation d0 that satisfies Equation (1), we can recover the shortest paths by assigning v as the intermediate neighbor of u in the shortest paths between u and s. It can be easily checked throughout that the approximate distance function that we compute satisfies Equation (1). This is simply because our algorithm always rounds an edge weight w(u, v, G) up to some weight w0 (u, v), and computes the approximate distances based on this rounded edge weight. For this reason, we can focus only on computing the approximate distances in this paper. 2.3 Toolkit In the following we review known results used for designing our algorithm. The first is a weight-rounding technique [Coh98, Zwi02, Ber09, Mąd10, Ber16, Nan14] that we repeatedly use to scale down edge weights at the cost of approximation. As we will use this technique repeatedly, we give a proof in Appendix A for completeness Lemma 2.2 ([Nan14]). Let h ≥ 1 and let G be a graph with integer edge weights from 1 i to W . For every integer 0 ≤ i ≤ bnW c, set ρi = 2h and let Gi be the graph with the same nodes and edges as G and weight w(u, v, Gi ) = d w(u,v,G) e for every edge (u, v). Then for all ρi pairs of nodes u and v and every 0 ≤ i ≤ bnW c ρi · d(u, v, Gi ) ≥ d(u, v, G) . (2) Moreover, if 2i ≤ dh (u, v, G) ≤ 2i+1 , then d(u, v, Gi ) ≤ (1 + 2/)h and ρi · d(u, v, Gi ) ≤ (1 + )dh (u, v, G) . 8 (3) (4) An important subroutine in our algorithm is a procedure for solving the source detection problem [LP13] in which we want to find the σ nearest “sources” in a set S for every node u, given that they are of distance at most γ from u. Ties are broken lexicographically. The following definition is from [LP15] Definition 2.3 ((S, γ, σ)-detection). Consider a graph G, a set of “sources” S ⊆ V (G), and parameters γ, σ ∈ N. For any node u let L(u, S, γ, σ, G) denote the list resulting from ordering the set {(d(u, v, G), v)|v ∈ S ∧ d(u, v, G) ≤ γ} lexicographically in ascending order, i.e., where ((d(u, v, G), v) < (d(u, v 0 , G), v 0 ) ⇐⇒ (d(u, v, G) < d(u, v 0 , G)) ∨ (d(u, v, G) = d(u, v 0 , G) ∧ v < v 0 ) , and restricting the resulting list to the first σ entries. The goal of the (S, γ, σ)-detection problem is to compute L(u, S, γ, σ, G) for every node u ∈ V (G). In the distributed setting we assume that each node knows γ, σ, and whether it is in S or not and the goal is that every node u ∈ V (G) knows its list L(u, S, γ, σ, G), Lenzen and Peleg designed a source detection algorithm for unweighted networks [LP13]. One can also run the algorithm on weighted networks, following [LP15, proof of Theorem 3.3], by simulating each edge of some weight L with an unweighted path of length L. Note that nodes in the paths added in this way are never sources. Theorem 2.4 ([LP13]). In the CONGEST model there is an algorithm for solving the (S, γ, σ)-detection problem in min (γ, WD) + min (σ, |S|) rounds on weighted networks, where WD is the weighted diameter. We also use another source detection algorithm: Roditty, Thorup, and Zwick [RTZ05] also solve a variant of the source detection problem with γ = ∞ in their centralized algorithm for computing distances oracles and spanners deterministically. They reduce the source detection problem to a sequence of single-source shortest paths computations on graphs with some additional nodes and edges. Their algorithm can easily be generalized to arbitrary γ. Theorem 2.5 (implicit in [RTZ05]). In the sequential model, the (S, γ, σ)-detection problem in directed graphs with positive edge weights can be solved by performing σ single-source shortest paths computations up to distance γ on graphs with at most O(n) nodes and O(m) edges. Here we give a short sketch of the algorithm. The algorithm works in phases, in the j-th phase it finds for every node v ∈ V the j-th source node of S of distance at most γ (with ties broken arbitrarily). In the first phase we find for each node v ∈ V its closest source node of distance at most γ as follows: We add an artificial super-source s∗ to G with a 0-length edge from every node in S to s∗ . Then we perform a single-source shortest path computation with source s∗ up to distance at most γ, resulting in a shortest-path tree rooted at s∗ . For each node v ∈ V its ancestor in this tree that is a child of s∗ is its closest source. We use Uj (v) to denote the (up to) j closest sources for v that the algorithm found in the first j phases for 1 ≤ j ≤ σ. In phase j > 1 we construct a graph Gj with the following node set: We add to V a new super-source node s∗ and a copy ū of every node u ∈ Ai . The 9 graph Gj contains the following edges: For each new node ū it contains a 0-length edge to s∗ . Additionally for each edge (y, v) ∈ E, we add the edge (with length w(y, v, G)) to Gj if Uj−1 (v) = Uj−1 (y) and otherwise we add the edge (y, ū) with length w(y, v, G) + d(v, u, G), where u is the source in Uj−1 (v) \ Uj−1 (y) with smallest distance from v (with ties broken lexicographically). This edge is a “shortcut” that replaces all possible paths from y through the edge (y, v) to a source not in Uj−1 (y) by an edge to the node ū representing the closest such source u. Then we perform a single-source shortest path computation with source s∗ up to distance at most γ in Gj . The j-th closest source for each node v is its ancestor that is a child of s∗ in the resulting shortest-path tree. Note that each graph Gj consists of at most n + |S| + 1 nodes and m + |S| edges and, as there are σ phases, the algorithm requires σ single-source shortest path computations. Another subproblem arising in our algorithm is the computation of ruling sets The following definition was adapted from the recent survey of Barenboim and Elkin [BE13, Section 9.2]. Definition 2.6 (Ruling Set). For a (possibly weighted) graph G, a subset U ⊆ V (G) of nodes, and a pair of positive integers α and β, a set T ⊂ U is an (α, β)-ruling set for U in G if 1. for every pair of distinct nodes u, v ∈ T , it holds that d(u, v, G) ≥ α, and 2. for every node u ∈ U \ T , there exists a “ruling” node v ∈ T , such that d(u, v, G) ≤ β. The classic result of Goldberg et al. [GPS88] shows that in the distributed setting, for any c ≥ 1, we can compute a (c, cλ)-ruling set deterministically in O(c log n) rounds, where λ is the number of bits used to represent each ID in the network. Since it was not explicitly stated that this algorithm works in the CONGEST model, we sketch an implementation of this algorithm in Appendix C (see [BE13, Chapter 9.2] and [Pel00, Chapter 22] for more detailed algorithm and analysis). Theorem 2.7 (implicit in [GPS88]). In the CONGEST model there is an algorithm that, for every c ≥ 1, computes a (c, cλ)-ruling set in O(c log n) rounds, where λ is the number of bits used to represent each ID in the network. 3 Deterministic Hop Set Construction In this section we present an deterministic algorithm for constructing an (no(1) , o(1))-hop set. In Section 3.2 we give an algorithm that computes a set of edges F that reduces the number of hops between all pairs of nodes in the following way for some fixed ∆ ≥ 1: if the shortest path has weight R, then using the edges of F , we can find a path with Õ(R/∆) edges at the cost of a multiplicative error of o(1) and an additive error of no(1) ∆. Our algorithm obtains F by computing the clusters of the graph. We explain clusters and their computation in Section 3.1. In Section 3.3, we show how to repeatedly apply the first algorithm for different edge weight modifications to obtain a set of edges F providing the following stronger hop reduction for all pairs of nodes: if the shortest path has h hops, then, using the edges of F , we can find a path with Õ(h/∆) hops at the cost of a multiplicative error of o(1) and no additive error. Finally, in Section 3.4, we obtain the hop set by repeatedly applying the hop reduction. 10 3.1 Deterministic Clusters The basis of our hop set construction is a structure called cluster introduced by Thorup and Zwick [TZ05] who used it, e.g., to construct distance oracles [TZ05] and spanners [TZ06] of small size. Consider an integer p such that 2 ≤ p ≤ log n and a hierarchy of sets of nodes (Ai )0≤i≤p such that A0 = V , Ap = ∅, and A0 ⊇ A1 ⊇ . . . ⊇ Ap . We say that a node v has priority i if v ∈ Ai \ Ai+1 (for 0 ≤ i ≤ p − 1). For every node v ∈ V the cluster of v in G is defined as C (v, A, G) = {u ∈ V | d(u, v, G) < d(u, Ai+1 , G)} , where i is the priority of v. To get efficient algorithms in the models of computation we want to consider, we do not know how to efficiently compute clusters as defined above, but will compute the following restricted clusters up to distance R instead. For any node v of priority i, let C (v, A, R, G) = {u ∈ V | d(u, v, G) < d(u, Ai+1 , G) and d(u, v, G) ≤ R} . 3.1.1 Computing Priorities A The performance of our algorithms relies on the total size of the clusters, which in turn depends on how we compute nodes’ priorities. If randomization is allowed, we can use the following algorithm due to Thorup and Zwick [TZ05, TZ06]: set A0 = V and Ap = ∅, and for 1 ≤ i ≤ p − 1 obtain Ai by picking each node from Ai−1 with probability (ln n/n)1/p . P It can be argued that for A = (Ai )0≤i≤p the size of all clusters, i.e., v∈V |C (v, A, G)|, is O(pn1+1/p ) in expectation. We now explain how to deterministically compute the priorities of nodes (given by a hierarchy of sets of nodes A = (Ai )0≤i≤p ) such that the total size of the resulting clusters is O(pn1+1/p ). Thorup and Zwick [TZ05] introduced the notion of bunches to analyze the sizes of clusters. For every node u ∈ V , we define the bunch and, for every 0 ≤ i ≤ p − 1, the i-bunch, both restricted to distance R, as follows: Bi (u, A, R, G) = {v ∈ Ai \ Ai+1 | d(u, v, G) < d(u, Ai+1 , G) and d(u, v, G) ≤ R} B(u, A, R, G) = [ Bi (u, A, R, G) 0≤i≤p−1 The crucial insight is that v ∈ B(u, A, R, G) if and only if u ∈ C (v, A, R, G). Thus, it suffices to choose a hierarchy of sets Ai such that |Bi (u, A, R, G)| ≤ O(n1/p ) for every u ∈ V and 0 ≤ i ≤ p − 1. Our algorithm for deterministically computing this hierarchy of sets of nodes follows the main idea of Roditty, Thorup, and Zwick [RTZ05]. Its pseudocode is given in Procedure 1. As a subroutine this algorithm solves a weighted source detection problem, i.e., for suitable parameters q, A, and R, it computes for every node v the set L(v, A, R, q, G) containing the q nodes of A that are closest to v – up to distance R; if there are fewer than q nodes of A in distance R to v, L(v, A, R, q, G) contains all of them. Our algorithm for constructing the hierarchy of sets (Ai )0≤i≤p is as follows. We set A0 = V and Ap = ∅ and to construct the set Ai+1 given the set Ai for 0 ≤ i ≤ p − 2 we first find for each node v ∈ V the set L(v, Ai , R, q, G) using a source detection algorithm. Then we view the collection of sets {L(v, Ai , R, q, G)}v∈V as an instance of the hitting set problem over the universe Ai , where 11 we want to find a set Ai+1 ⊆ Ai of minimal size such that each set L(v, Ai , R, q, G) contains at least one node of Ai+1 . We let Ai+1 be a hitting set of approximately minimum size9 determined by the deterministic greedy heuristic (always adding the element “hitting” the largest number of “un-hit” sets) to produce a hitting set within a factor of 1 + ln n of the optimum [Joh74, ADP80]. In the following we prove the desired bound on the size of the bunches, which essentially requires us to argue that setting q = Õ(n1/p ) is sufficient. Procedure 1: Priorities(G, p, R) Input: Weighted graph G = (V, E) with positive integer edge weights, number of priorities p ≥ 2, distance range R ≥ 1 Output: Hierarchy of sets (Ai )0≤i≤p q ← d2n1/p ln (3n)(1 + ln n)e A0 ← V for i = 0 to p − 2 do Compute L(v, Ai , R, q, G) for every node v ∈ V using a source detection algorithm C←∅ foreach v ∈ V do if |L(v, Ai , q, R, G)| = q then C ← C ∪ {L(v, Ai , R, q, G)} 1 2 3 4 5 6 7 Compute an approximately minimum hitting set Ai+1 ⊆ Ai using a greedy heuristic 8 Ap ← ∅ return A = (Ai )0≤i≤p 9 10 Lemma 3.1 (Implicit in [RTZ05]). Given a finite collection of sets C = {S1 , . . . , Sq } over a universe U and a parameter x ≥ 1 such that |Si | ≥ 2x ln 3q for all 1 ≤ i ≤ q, there exists a hitting set T ⊆ U of size |T | ≤ |U |/x such that T ∩ Si 6= ∅ for all 1 ≤ i ≤ q. We give a proof of Lemma 3.1 in Appendix B for completeness. Lemma 3.2. Procedure 1 computes a hierarchy A = (Ai )0≤i≤p of sets of nodes such that X u∈V C (u, A, R, G) = X B(u, A, R, G) = O(pn1+1/p ) . u∈V Proof. We first show by induction that |Ai | ≤ n1−i/p for all 0 ≤ i ≤ p − 1. If i = 0 the claim is trivially true because we set A0 = V . We now assume that |Ai | ≤ n1−i/p and argue that |Ai | ≤ n1−(i+1)/p . Our algorithm approximately computes a minimum hitting set of the collection of sets C containing each set L(v, Ai , q, R, G) of size q. By Lemma 3.1 we know that there is a hitting set A0 for C of size at most |Ai |/(n1/p (1 + ln n)) ≤ n1−i/p /(1 + ln n) and thus the minimum hitting set Ai+1 computed by the greedy heuristic has size at most (1 + ln n)|A0 | ≤ n1−i/p . Note that each set L(v, Ai , q, R, G) might have been empty and in this case the algorithm would have computed Ai+1 = ∅, the trivial hitting set. 9 In principle, local computation is free in the models considered in this paper and we could thus compute a minimum hitting set exactly. However, we decided to present the algorithm in a way that avoids solving NP-complete problems by local compuation. 12 We now show that for every node u ∈ V and every 0 ≤ i ≤ p − 1, Bi (u, A, R, G) ≤ q = O(n1/p log n), which immediately implies the desired bound on the total size of the bunches and clusters. We argue by a simple case distinction that Bi (u, A, R, G) ⊆ L(u, Ai , R, q, G) and thus, by the definition of the set of the q closest nodes in Ai , |Bi (v, A, R, G)| ≤ |L(u, Ai , R, q, G)| ≤ q. If |L(u, Ai , R, q, G)| < q, then clearly L(u, Ai , R, q, G) = {v ∈ Ai | d(u, v, G) ≤ R} ⊇ Bi (v, A, R, G). Otherwise we have |L(u, Ai , R, q, G)| = q and, as the algorithm computed a suitable hitting set, we have Bi (u, A, R, G) ⊆ L(u, Ai , R, q, G). As an alternative to the algorithm proposed above, the hitting sets can also by computed with the deterministic algorithm of Roditty, Thorup, and, Zwick [RTZ05] which produces so-called “early hitting sets”. For this algorithm we have to set q = O(n1/p log n), and obtain slightly smaller clusters of total size O(pn1+1/p ). However, since the logarithmic factors are negligible for our purpose, we have decided to present the simpler algorithm above. 3.1.2 Computing Clusters Given the priorities of the nodes, the clusters can be computed by finding a shortest-path tree that is “pruned” at nodes whose distance to the root is more than (or equal to) their distance to nodes of higher priority than the root. In the pseudocode of Procedure 2 we formulate this algorithm as a variant of weighted breadth-first search. We will not analyze the performance of this algorithm at this point since it depends on the models of computation that simulate it (see Section 3.1.1 and Section 5 for implementations of the algorithm). We summarize our guarantees with the following theorem. Theorem 3.3. Given a weighted graph G with positive integer edge weights and parameters p and R, Procedure 2 computes a hierarchy of sets A = (Ai )0≤i≤p , where V = A0 ⊆ A1 ⊆ P · · · ⊆ Ap = ∅, such that v∈V |C (v, A, R, G)| = Õ(pn1+1/p ). It also computes for every node v the set C (v, A, R, G) and for each node w ∈ C (v, A, R, G) the value of d(v, w, G). 3.2 Hop Reduction with Additive Error Consider the following algorithm for computing a set of edges F . First, deterministically p compute clusters with p = b log n/ log (9/)c priorities (determined by a hierarchy of sets A = (Ai )0≤i≤p ) up to distance R = n1/p ∆. Let F be the set containing an edge for every pair (u, v) ∈ V 2 such that v ∈ C (u, A, R, G) and set the weight of such an edge (u, v) ∈ F to w(u, v, F ) = d(u, v, G), where the distance is returned by the algorithm for computing the clusters. Procedure 3 gives the pseudocode of this algorithm. Lemma 3.4. Let F ⊆ V 2 be the set of edges computed by Procedure 3 for a weighted graph G=p (V, E) and parameters ∆ ≥ 1 and 0 <  ≤ 1. Then F has size Õ(pn1+1/p ), where p = b (log n)/(log (9/))c, and in the graph H = G ∪ F , for every pair of nodes u and v, we have d(p+1)dd(u,v,G)/∆e (u, v, G) ≤ (1 + )d(u, v, G) + n1/p ∆/(p + 2) , i.e., there is a path π 0 in H of weight w(π 0 , H) ≤ (1 + )d(u, v, G) + n1/p ∆/(p + 2) consisting of |π 0 | ≤ (p + 1)dd(u, v, G)/∆e edges. 13 Procedure 2: Clusters(G, p, R) Input: Weighted graph G = (V, E) with positive integer edge weights, number of priorities p ≥ 2, distance range R ≥ 1 Output: Clusters of G as specified in Theorem 3.3 1 2 (Ai )0≤i≤p ← Priorities(G, p, R) For each 1 ≤ i ≤ p − 1 and every node v ∈ V compute d(v, Ai , R, G) 14 foreach u ∈ V do // Compute cluster of every node // Initialization Let i be the priority of u, i.e., u ∈ Ai \ Ai+1 foreach v ∈ V do δ(u, v) ← ∞ δ(u, u) ← 0 C (u) ← ∅ // Iteratively add nodes to cluster for L = 0 to R do foreach node v with δ(u, v) = L do // Check if v joins cluster of u at current level if δ(u, v) < d(v, Ai+1 , R, G) then C (u) ← C (u) ∪ {v} foreach (v, w) ∈ E do // Update neighbors of v δ 0 (u, w) ← (w(v, w, G) + δ(u, v)) if δ 0 (u, w) < δ(u, w) then δ(u, w) ← δ 0 (u, w) 15 return (C (v), δ(v, ·))v∈V 3 4 5 6 7 8 9 10 11 12 13 Procedure 3: HopReductionAdditiveError(G, ∆, ) Input: Graph G = (V, E) with non-negative integer edge weights, ∆ ≥ 1, 0 <  ≤ 1 Output: Hop-reducing set of edges F ⊆ V 2 as specified in Lemma 3.4 jq log n log (9/) n1/p ∆ k 1 p← 2 8 R← F ←∅ (C(v), δ(v, ·))v∈V ← Clusters(G, p, R) foreach u ∈ V do foreach v ∈ C (u) do F ← F ∪ {(u, v)} w(u, v, F ) = δ(u, v) 9 return F 3 4 5 6 7 14 We devote the rest of this section to proving Lemma 3.4. The bound on the size of F immediately follows from Theorem 3.3. We analyze the hop-reducing properties of F by showing the following. Let π be a shortest path from u to v in G. Then there is a node w on π and a path π 0 from u to w in H = G ∪ F with the following properties: (1) The distance from u to w in G is at least ∆. (2) The path π 0 consists of at most p edges of F and at most one edge of G. (3) The ratio between the weight of π 0 in H and the distance from u to w in G is at most (1 + ) if w 6= v and if w = v then the weight of π 0 in H is at most β (for some β that we set later). When we go from u to w using the path π 0 instead of the subpath of π we are using a “shortcut” of at most p + 1 hops that brings us closer to v by a distance of at least ∆ at the cost of some approximation. Conditions (1) and (2) guarantee that by repeatedly applying this shortcutting we can find a path π 00 from u to v that has at most (p + 1)dd(u, v, G)/∆e hops (as we replace subpaths of π with weight at least ∆ by paths with at most p + 1 hops). Condition (3) guarantees that the multiplicative error introduced by using the shortcut is at most 1 + , except possibly for the last time such a shortcut is used, where we allow an additive error of β. We will show that we can guarantee a value of β that is bounded by n1/p /(p + 2). This type of analysis has been used before by Thorup and Zwick [TZ06] to obtain a spanner for unweighted graphs defined from the partial shortest path trees of the clusters, but without considering the hop-reduction aspect. Bernstein [Ber09] also used a similar analysis to obtain a hop set for weighted graphs using clusters with full distance range. We previously used this type of analysis to obtain a randomized hop set which is not based on clusters, but on a similar notion [HKN14]. To carry out the analysis as explained above we define a value ri for every 0 ≤ i ≤ p − 1 as follows: r0 = ∆ P (4 + 2) 0≤j≤i−1 rj ri = .  The intuition is that a node u of priority i tries to take an edge of F to shortcut the way to v by at least ri . If this fails it will find an edge in F going to a node v 0 of higher priority. Thus, to fulfill Condition (3), v 0 has to try and shortcut even more “aggressively”. Consequently, the values of ri grow exponentially with the priority i. We have chosen the range of the clusters large enough such that nodes of the highest priority will always find the desired shortcut edge in F . We will show that the additive error incurred by this strategy is at most β= X 0≤i≤p−1 This value can in turn be bounded as follows. Lemma 3.5. β ≤ n1/p ∆/(p + 2). 15 2ri . Proof. We first show that, for all 0 ≤ i ≤ p − 1, 0≤j≤i rj ≤ 7i ∆/i . The proof is by induction on i. For i = 0 we have r0 = ∆ = 70 ∆ by the definition of r0 and for i ≥ 1 we use the inequality  ≤ 1 and the induction hypothesis as follows: P X 0≤j≤i rj = X X rj + ri = 0≤j≤i−1 rj + (4 + 2) P 0≤j≤i−1 rj  0≤j≤i−1 P ≤ 0≤j≤i−1 rj  + 6 P 0≤j≤i−1 rj  ≤ 7 P 0≤j≤i−1 rj  ≤ 7 · 7i−1 ∆ 7i ∆ ≤ i . i−1 ·  Using this inequality and the fact that (2p + 7)7p−1 ≤ 9p for all p ≥ 0 we get (p + 2) (p + 2)β =  P 0≤j≤p−1 2rj  ≤ (2p + 4)7p−1 ∆ 9p ∆ ≤ p ≤ n1/p ∆ p   p The last inequality holds as by our choice of p = b log n/ log (9/)c: (9/)p = 2p·log (9/) ≤ 2 √ log n √ ·log (9/) log (9/) √ =2 log n· √ log (9/) =2 √ log (9/) √ ·log n log n = 2log n·(1/p) = n1/p . In the following we fix some values of  and ∆ and let F denote the set of edges computed by Procedure 3. We now show that F has a certain structural property before we carry out the hop-reduction proof. Lemma 3.6. Let u and v be nodes such that u ∈ Ai \ Ai+1 has priority i and d(u, v, G) ≤ ri . Either (1) F contains an edge (u, v) of weight w(u, v, F ) = d(u, v, G) or (2) F contains an edge (u, v 0 ) to a node v 0 ∈ Ai+1 of priority j ≥ i+1 of weight w(u, v 0 , F ) ≤ 2ri . Proof. Consider first the case v ∈ C (u, A, R, G). Then F contains the edge (u, v) of weight w(u, v, F ) = d(u, v, G). Consider now the case v ∈ / C (u, A, R, G). Note that by the definition of β we have ri ≤ β/2 < β and by Lemma 3.5 we have β ≤ n1/p ∆. As the algorithm sets R = n1/p ∆ we have ri ≤ R by Lemma 3.5 and thus d(u, v, G) ≤ R. From the definition of C (u, A, R, G) it now follows that d(v, u, G) ≥ d(v, Ai+1 , G). Thus there exists some node v1 ∈ Ai+1 of priority p1 ≥ i + 1 such that d(v, v1 , G) ≤ d(u, v, G). By the triangle inequality we get d(u, v1 , G) ≤ d(u, v, G) + d(v, v1 , G) ≤ 2d(u, v, G) ≤ 2ri ≤ R. If u ∈ C (v1 , A, R, G) then we are done as F contains the edge (u, v1 ) of weight w(u, v1 , F ) = d(u, v1 , G) ≤ 2ri . Otherwise it follows from the definition of C (v1 , A, R, G) that there is some node v2 ∈ Ap1 +1 of priority p2 ≥ p1 + 1 ≥ i + 1 such that d(u, v2 , G) ≤ d(u, v1 , G) ≤ 2ri ≤ R. By repeating the argument above we want to find some node vj ∈ Ai+1 of priority pj ≥ i + 1 such that d(u, vj , G) ≤ d(u, v, G) ≤ 2ri . As for every node v 0 ∈ Ap−1 of priority p − 1, C (v 0 , A, R, G) contains all nodes that are at distance at most R from v 0 in G this repeated argument stops eventually and we find such a node. 16 To finish the proof of Lemma 3.4 we show in the next lemma that F has the properties we demanded, i.e., in the shortcut graph H which consists of G and the additional edges of F , we can approximate shortest paths using a reduced number of hops. Lemma 3.7. For every pair of nodes u, v ∈ V such that d(u, v, G) < ∞, the graph H = G∪F contains a path π 0 from u to v of weight w(π 0 , H) ≤ (1 + )d(u, v, G) + β consisting of |π 0 | ≤ (p + 1)dd(u, v, G)/∆e edges. Proof. The proof is by induction on the distance from u to v in G. The claim is trivially true for the base case d(u, v, G) = 0 in which u = v. Thus, we only need to consider the induction step in which d(u, v, G) ≥ 1. Let π denote the shortest path from u to v in G. We now define a sequence of nodes u0 , u1 , . . . , ul . For every 0 ≤ j ≤ l, we denote by pj the priority of uj . We set u0 = u and, given uj , we define uj+1 as follows. Let w be the node on π closest to v that is at distance at most rpj from uj in G (this node might be v itself). If H contains the edge (uj , w) we stop (and set l = j). Otherwise we know by Lemma 3.6 that H contains an edge (uj , u0 ) to a node u0 of priority at least pj + 1. In that case we set uj+1 = u0 . We know further by Lemma 3.6 that d(uj , uj+1 , G) ≤ 2rpj+1 −1 . Having defined the sequence u0 , u1 , . . . , ul , we denote by w the node on π closest to v that is at distance at most rpl from ul in G (again, this node might be v itself). Figure 1 illustrates the definition of this sequence. increasing priority ul u2 u2 u0 w v decreasing distance to v Figure 1: Schematic illustration of the definition of the sequence of nodes u0 , u1 , . . . , ul , w. The bottom line represents the shortest path from u to v. The thick, blue edges are the edges of F used to shorten the distance to v. The dashed, blue edges are not contained in F and imply the existence of edges to nodes of increasing priority. The dotted lines indicate repetitions that are omitted in the picture. Consider first the case that w = v. Let π 0 denote the path hu0 , . . . , ul , wi. This path has at most p hops and since d(u, v, G) ≥ 1 we trivially have p ≤ (p + 1)dd(u, v, G)/∆e. Furthermore we can bound the weight of π 0 as follows: w(π 0 , H) = X w(uj , uj+1 , H) + w(ul , w, H) ≤ 0≤j≤l−1 X d(uj , uj+1 , G) + d(ul , w, G) 0≤j≤l−1 ≤ X 0≤j≤l−1 17 2rpj+1 −1 + rpl X ≤ 2rj 0≤j≤p−1 = β ≤ (1 + )d(u, v, G) + β . Consider now the case w 6= v. Let w0 be the neighbor of w on π (that in G is closer to v than w is). We will define the path π 0 from u to v as the concatenation of two paths π1 and π2 . Let π1 be the path hu0 , . . . , ul , w, w0 i. We will define the path π2 from w0 to v later on. Note that π1 consists of |p1 | ≤ p + 1 hops. We will now show that w(π1 , H) ≤ (1 + )d(u, w0 , G) . (5) In order to get this bound we will need some auxiliary inequalities. By Lemma 3.6 we have, for all 0 ≤ j ≤ l − 1, d(uj , uj+1 , G) ≤ 2rpj+1 −1 (6) and by the definition of rpl we have rpl = (4 + 2) X rj . (7) 0≤j≤pl −1 Remember that w is the node on π closest to v that is at distance at most rpj from ul in G. Since the neighbor w0 of w is closer to v then w is, this definition of w guarantees that d(ul , w0 , G) > rpj . As d(ul , w0 , G) ≤ d(ul , w, G) + d(w, w0 , G) by the triangle inequality, we have d(ul , w, G) + d(w, w0 , G) > rpj . (8) By the triangle inequality we also have d(ul , w, G) ≤ X d(uj , uj+1 , G) + d(u, w, G) . 0≤j≤l−1 and thus d(ul , w, G) − X d(uj , uj+1 , G) ≤ d(u, w, G) . (9) 0≤j≤l−1 We now obtain Inequality (5) as follows: w(π1 , H) = w(uj , uj+1 , H) + w(ul , w, H) + w(w, w0 , H) X 0≤j≤l−1 = d(uj , uj+1 , G) + d(ul , w, G) + d(w, w0 , G) X 0≤j≤l−1 X = (2 + ) d(uj , uj+1 , G) + d(ul , w, G) + d(w, w0 , G) − (1 + ) 0≤j≤l−1 (6) ≤ (2 + ) X d(uj , uj+1 , G) 0≤j≤l−1 2rpj+1 −1 + d(ul , w, G) + d(w, w0 , G) − (1 + ) 0≤j≤l−1 ≤ (2 + ) X X X d(uj , uj+1 , G) 0≤j≤l−1 2rj + d(ul , w, G) + d(w, w0 , G) − (1 + ) 0≤j≤pl −1 X 0≤j≤l−1 (7) = rpl + d(ul , w, G) + d(w, w0 , G) − (1 + ) X 0≤j≤l−1 18 d(uj , uj+1 , G) d(uj , uj+1 , G) (8) < (d(ul , w, G) + d(w, w0 , G)) + d(ul , w, G) + d(w, w0 , G) − (1 + ) X d(uj , uj+1 , G) 0≤j≤l−1   X = (1 + ) d(ul , w, G) − d(uj , uj+1 , G) + (1 + )d(w, w0 , G) 0≤j≤l−1 (9) ≤ (1 + )d(u, w, G) + (1 + )d(w, w0 , G) ≤ (1 + )(d(u, w, G) + d(w, w0 , G)) = (1 + )d(u, w0 , G) Note that d(w0 , v, G) < d(u, v, G). Therefore we may apply the induction hypothesis on and get that the graph H contains a path π2 of weight w(π2 , H) ≤ (1 + )d(w0 , v, G) + β that has |π2 | ≤ (p + 1)dd(w0 , v, G)/∆e hops. Let π 0 denote the concatenation of π1 and π2 . Then π 0 is a path from u to v in H of weight w0 w(π 0 , H) = w(π1 , H) + w(π2 , H) ≤ (1 + )d(u, w0 , G) + (1 + )d(w0 , v, G) + β = (1 + )(d(u, w0 , G) + d(w0 , v, G)) + β = (1 + )d(u, v, G) + β . It remains to bound the number of hops of π 0 . To get the desired bound we first show that d(u, w0 , G) ≥ ∆. By the triangle inequality we have d(ul , w0 , G) ≤ X d(uj , uj+1 , G) + d(u, w0 , G) . 0≤j≤l−1 As argued above, we have d(ul , w0 , G) > rpj and By the definition of rpl we therefore get: d(u, w0 , G) ≥ d(ul , w0 , G) − X P 0≤j≤l−1 d(uj , uj+1 , G) ≤ P 0≤j≤pl −1 2rj . d(uj , uj+1 , G) 0≤j≤l−1 ≥ rpl − X 2rj = (4/) 0≤j≤pl −1 X rj ≥ r0 = ∆ . 0≤j≤pl −1 Now that we know that d(u, w0 , G) ≥ ∆, or equivalently d(u, w0 , G)/∆ ≥ 1, we get the following for counting the number of hops of π 0 by adding the number of hops of π1 to the number of hops of π2 : |π 0 | = |π1 | + |π2 | ≤ p + 1 + (p + 1)dd(w0 , v, G)/∆e = (p + 1)(1 + dd(w0 , v, G)/∆e) = (p + 1)d1 + d(w0 , v, G)/∆e ≤ (p + 1)dd(u, w0 , G)/∆ + d(w0 , v, G)/∆)e = (p + 1)d(d(u, w0 , G) + d(w0 , v, G))/∆e = (p + 1)dd(u, v, G)/∆e Thus, π 0 has the desired number of edges. 19 3.3 Hop Reduction without Additive Error Consider a shortest path π from u to v with h hops and weight R ≥ ∆. With the hop reduction of Procedure 3 we can compute a set of edges F such that in G ∪ F we find a path from u to v with Õ(R/∆) hops of weight approximately R. We now use the weight-rounding technique of Lemma 2.2 and repeatedly apply this algorithm to obtain a set of edges F such that in G ∪ F there is a path from u to v with O(h/∆) hops and weight approximately R. As in general R can only be upper-bounded by nW (where W is the maximum edge weight of G) and h can be upper-bounded by n, it is clear that the second type of hop reduction is more desirable. Additionally, if h is sufficiently larger than ∆, then the additive error inherent in the hop reduction of Procedure 3 can be counted as an additional multiplicative error of . The second hop reduction algorithm roughly works as follows. For every possible distance range of the form 2j . . . 2j+1 we scale down the edge weights of G by a certain factor and run b j to compute a set of edges Fbj . We the algorithm of Procedure 3 on the modified graph G then simply return the union of all these edge sets (with the weights scaled back to normal again). Procedure 4 shows the pseudocode of this algorithm. Procedure 4: HopReduction(G, ∆, h, , W ) Input: Weighted graph G = (V, E) with integer edge weights from 1 to W , ∆ ≥ 1, h ≥ 1, 0 <  ≤ 1 Output: Hop-reducing set of edges F ⊆ V 2 as specified in Lemma 3.8 11 0 ← /6 ∆0 ← 3∆/0 F ←∅ for j = 0 to blog(nW )c do b j ← (V, E) G ρj ← 0 2j /h b j ) ← dw(u, v, E)/ρj e foreach (u, v) ∈ E do w(u, v, G b b j , ∆0 , 0 ) Fj ← HopReductionAdditiveError(G foreach (u, v) ∈ Fbj do F ← F ∪ {(u, v)} w(u, v, F ) ← min(w(u, v, Fbj ) · ρj , w(u, v, F )) 12 return F 1 2 3 4 5 6 7 8 9 10 Lemma 3.8. Let F ⊆ V 2 be the set of edges computed by Procedure 4 for a weighted graph G = (V, E) and parameters p ∆ ≥ 1, h ≥ 1, and 0 <  ≤ 1. Then F has size Õ(pn1+1/p log nW ), where p = b (log n)/(log (54/))c, and if h ≥ n1/p ∆/(p + 2), then in the graph H = G ∪ F we have, for every pair of nodes u and v, d(p+2)h/∆ (u, v, H) ≤ (1 + )dh (u, v, G) . Proof. Let u and v be a pair of nodes and set j = blog dh (u, v, G)c, i.e., 2j ≤ dh (u, v, G) ≤ 2j+1 . Let π be a shortest ≤ h hop path in G, i.e., π has weight w(π, G) = dh (u, v, G) and 20 b j which has π consists of |π| ≤ h hops. The algorithm sets 0 = /6 and uses a graph G the same nodes and edges as G, but in which every edge weight is first scaled down by a factor of ρj = 0 2j /h and then rounded up to the next integer. By Lemma 2.2 we have b j ) · ρj ≤ (1 + 0 )dh (u, v, G) and d(u, v, G b j ) ≤ (1 + 2/0 )h ≤ 3h/0 . d(u, v, G h Since d (u, v, G) ≤ nW the algorithm has computed a set of edges Fbj . By Lemma 3.4, bj = G b j ∪ Fbj of weight at most (1 + 0 )d(u, v, G b j ) + 0 n1/p ∆0 /(p + 2) and there is a path π 0 in H b j )/∆0 e hops. Since d(u, v, G b j ) ≤ 3h/0 and the algorithm with at most |π 0 | ≤ (p + 1)dd(u, v, G 0 0 sets ∆ = 3∆/ we have ' & bj ) d(u, v, G 3h h h |π | ≤ (p + 1) · ≤ (p + 1) · 0 0 = (p + 1) · ≤ (p + 1) +1 0 ∆ ∆ ∆ ∆  0 =      (p + 1)h (p + 1)h (p + 1)h (p + 1)h h (p + 2)h + (p + 1) ≤ + 4p ≤ + n1/p ≤ + = . ∆ ∆ ∆ ∆ ∆ ∆ The algorithm “scales back” the edge weights of Fbj when adding them to F and thus w(u, v, F ) ≤ w(u, v, Fbj ) · ρj . We now argue that d(p+1)dh/∆e (u, v, H) ≤ (1 + 0 )dh (u, v, G) by bounding the weight of π 0 in H = G ∪ F . For every edge (u, v) of π 0 we have w(u, v, H) ≤ b j ) · ρj w(u, v, F ) ≤ w(u, v, Fbj ) · ρj if (u, v) ∈ Fbj and w(u, v, H) ≤ w(u, v, G) ≤ w(u, v, G 0 0 1/p b otherwise. Thus, w(π , H) ≤ w(π , Hj ) · ρj and together with the assumption h ≥ n ∆/(p + 2) we get (p+2)h/∆ d 0 0 b j ) · ρj ≤ (u, v, H) ≤ w(π , H) ≤ w(π , H 0 1/p 0 bj ) +  n ∆ (1 +  )d(u, v, G p+2 0 ! · ρj 0 n1/p ∆0 ρj p+2 0 j 1/p b j ) · ρj + 3 2 n ∆ = (1 + 0 )d(u, v, G h(p + 2) b j ) · ρj + = (1 + 0 )d(u, v, G b j ) · ρj + 30 2j ≤ (1 + 0 )d(u, v, G ≤ (1 + 0 )2 dh (u, v, G) + 30 dh (u, v, G) ≤ (1 + 60 )dh (u, v, G) = (1 + )dh (u, v, G) . 3.4 Computing the Hop Set We finally explain how to repeatedly use the hop reduction of Procedure 4 to obtain an (no(1) , o(1))-hop set. Procedure 4 computes a set of edges F that reduces the number of hops needed to approximate the distance between any pair of nodes by a factor of 1/∆ (where ∆ is a parameter). Intuitively we would now like to use a large value of ∆ to compute a hop set. However, we want to avoid large values of ∆ for two reasons. The first reason is that F only reduces the number of hops if the shortest path has h ≥ ∆no(1) hops. Thus, for shortest paths that already have h < ∆ hops the hop reduction is not effective. The second reason is efficiency. The algorithm requires us to compute clusters for distances up to ∆no(1) and, in the models of computation we consider later on, we do not know how to do this fast enough for our purposes. 21 We therefore use the following iterative approach in which we repeatedly apply the hop reduction of Procedure 4 with ∆ = no(1) . We first compute a set of edges F1 that reduces the number of hops in G by a factor of 1/∆. We then add all these edges to G and consider the graph H1 = G ∪ F1 . We apply the algorithm again on H1 to compute a set of edges F2 that reduces the number of hops in H1 by a factor of 1/∆. Now observe that the set of edges F1 ∪ F2 reduces theqnumber of hops in G by a factor of 1/∆2 . We show that by repeating √ this process p = Θ( log n/ log ( log n/)) times we can compute a set F that reduces the number of hops to n1/p . Procedure 5 shows the pseudocode of this algorithm. Procedure 5: HopSet(G, , W ) Input: Weighted graph G = (V, E) with integer edge weights from 1 to W , 0 <  ≤ 1 Output: (n1/p , )-hop set F ⊆ V 2 as specified in Theorem 3.9 1 0 ← 2 W 0 ← (1 + )nW 3 p← 4 11 ∆ ← (p F ←∅ H0 ← G for i = 0 to p − 1 do hi ← n1−i/p Fi+1 ← HopReduction(Hi , ∆, hi , 0 , W 0 ) F ← F ∪ Fi+1 Hi+1 ← Hi ∪ Fi+1 12 return F 5 6 7 8 9 10 √ 2 log n jq k log n log (54/0 ) + 2)n1/p Theorem 3.9. Let F ⊆ V 2 be the set of edges computed by Procedure 5 for a weighted graph G = (V, E) and a parameter Then F is an (n1/p , )-hop set of size q 0 <  ≤ 1. √ Õ(p2 n1+1/p log nW ), where p = b (log n)/(log (108 log n/))c. p √ Proof. The algorithm sets 0 = /(2 log n) and p = b (log n)/(log (54/0 ))c and uses a parameter hi = n1−i/p for each graph Hi . For every 0 ≤ i ≤ p − 2 we set hi = n1−i/p ≥ n2/p = n1/p ∆/(p + 2) and thus, by Lemma 3.8, for every pair of nodes u and v we have dhi+1 (u, v, Hi+1 ) = dhi /n 1/p (u, v, Hi+1 ) = d(p+2)hi /∆ (u, v, Hi+1 ) ≤ (1 + 0 )dhi (u, v, Hi ) . By iterating this argument we get dhi (u, v, Hi ) ≤ (1 + 0 )i dh0 (u, v, H0 ) = (1 + 0 )i dn (u, v, G) = (1 + 0 )i d(u, v, G) for every 1 ≤ i ≤ p − 1 and now in particular for i = p − 1 we have 1/p dn (u, v, Hp−1 ) = dhp−1 (u, v, Hp−1 ) ≤ (1 + 0 )(p−1) d(u, v, G) . 22 Finally, since p − 1 ≤ √ 0 p−1 (1 +  ) log n we have, by Lemma 3.10 below,  = 1+ √ 2 log n  1/p As Hp−1 = G∪F it follows that dn is an (n1/p , )-hop set. p−1  ≤ 1+ √ 2 log n  √log n ≤ 1 + . (u, v, G∪F ) ≤ (1+)d(u, v, G) and thus F = S 1≤i≤p−1 Fi Lemma 3.10. For all 0 ≤ x ≤ 1 and all y > 0,  x 1+ 2y y ≤ 1 + x. Proof. Let e denote Euler’s constant. We will use the following well-known inequalities: (1 + 1/z)z ≤ e (for all z > 0), ez ≤ 1/(1 − z) (for all z < 1), and 1/(1 − z) ≤ 1 + 2z (for all 0 ≤ z ≤ 1/2). We then get:  x 1+ 2y y  = x 1+ 2y  2y ! x2 x x ≤ e2 ≤ 1 1− x 2 ≤ 1 + x. The main computational cost for constructing the hop set comes from computing the clusters in Procedure 3, which is used as a subroutine repeatedly. Observe that in total it q will perform O(p log nW ) calls to Procedure 2 to compute clusters, each with p = √ √ Θ( (log n)/(log ( log n/))) priorities and distance range R = O(p log nn2/p /) on a weighted graph of size Õ(m + p2 n1+1/p log (nW )). Note that if 1/ ≤ polylog n, then n1/p = no(1) . Thus, Procedure 5 will then compute an (no(1) , o(1))-hop p set of size O(n1+o(1) log W ) and it will perform Õ(log W ) cluster computations with p = Θ( log n/ log log n) priorities up to distance range O(no(1) ) on graphs of size O(m1+o(1) log W ) each. 4 Distributed Single-Source Shortest Paths Algorithm on Networks with Arbitrary Topology In this section we describe a deterministic distributed algorithm for computing distances from a source node s. It consists of two parts. The first part is constructing a suitable overlay network. A randomized construction algorithm was given in [Nan14] such that it was sufficient to solve SSSP on the resulting overlay network in order to solve the same problem on the whole network. We give a deterministic version of this result in Section 4.1. The second part is a more efficient algorithm for computing SSSP on an overlay network using Procedures 2 to 5 from before (see Section 4.2). In Section 4.3, we show how to finish the computation following [Nan14]. 4.1 Computing an Overlay Network Deterministically An overlay network (also known as landmark or skeleton [Som14, LPS13]) as defined in [Nan14] is a virtual network G0 of nodes and “virtual edges” that is built on top of an underlying real network G; i.e., V (G0 ) ⊆ V (G) and E(G0 ) = V (G0 ) × V (G0 ) such that the 23 2 2 2 2 1 1 2 4 3 2 5 1 2 1 1 3 2 1 2 1 1 Figure 2: An overview of the main steps of our algorithm. The left picture depicts the input graph. Thick edges and nodes (in black) in the middle picture depicts a possible overlay network. Dashed edges (in red) in the right picture depicts a possible hop set of the overlay network. weight of an edge in G0 is an approximation of the distance of its endpoints in G and is ∞ if no path exists between them in G. The nodes in V (G0 ) are called centers. Computing G0 means that after the computation every node in G0 knows whether it is a center and knows all virtual edges to its neighbors in G0 and the corresponding weights. We show in √ this subsection that there is a Õ( n)-time algorithm that constructs an overlay network G0 √ of Õ( n/) nodes such that a (1 + )-approximation to SSSP in G0 , can be converted to a (1 + 7)-approximation to SSSP in G, as stated formally below. Theorem 4.1. Given any weighted undirected network G with source node s and any √ parameter 0 <  ≤ 1, there is a Õ( n)-time deterministic distributed algorithm that computes an overlay network G0 and some additional information for every node with the following properties. √ • Property 1: |V (G0 )| = Õ( n/) and s ∈ V (G0 ). • Property 2: For every node u ∈ V (G), as soon as u receives a (1 + )-approximation ˜ v) of d(s, v, G0 ) for all centers v ∈ V (G0 ), it can infer a (1 + 7)-approximation of d(s, d(s, u, G) without any additional communication. Before proving the above theorem, we first recall how it was achieved with a randomized algorithm in [Nan14]10 (see Theorem 4.2 of the arXiv version11 of [Nan14] for details). • In the first step of [Nan14], the algorithm selects each node to be a center with √ probability Θ̃(1/ n) and also makes s a center. By a standard “hitting set” argument √ (e.g. [UY91, DFI05]), any shortest path containing n edges will contain a center with √ high probability. Also, the number of centers is Θ̃( n) with high probability. √ • In the second step, the algorithm makes sure that every node v knows the Θ̃( n)-hop distances between v and all centers using a light-weight bounded-hop single-source shortest paths algorithm from all centers in parallel combined with the random delay technique to avoid congestion. 10 We note that [Nan14] proved this theorem for general parameters λ and α but we will only need it for √ λ = α = n. 11 http://arxiv.org/pdf/1403.5171v2.pdf 24 We derandomize the first step as follows: In Section 4.1.1 we assign to each node u a type, denoted by t(u). (To compute these types, we invoke the source detection algorithm of Lenzen and Peleg [LP13], as we will explain in Section 4.1.1.) The special property of nodes’ √ types is that every path π containing n edges contains a node u of a “desired” type; in particular, t(u) is not too big compared to w(π, G) (see Lemma 4.2 for details). This is comparable to the property obtained from the hitting set argument, which would be achieved if we made the special node of every path a center. However, this may create too many √ centers (we want the number of centers to be Õ( n/)). Instead we select some nodes to be centers using the ruling set algorithm, as described in Section 4.1.2. After this, we get a small set of centers such that every node u of type t(u) is not far from one of the centers. Thus, while we cannot guarantee that the path π contains a center, we can guarantee that it contains a node that is not far from a center (see Lemma 4.3 for details). To derandomize the second step, we use the recent algorithm of Lenzen and Patt-Shamir [LP15] for the Partial Distance Estimation (PDE) problem together with the above Procedures 2 to 5, as we will explain in Section 4.1.3. Parameters. The parameters used by our algorithm in the following are 0 = /(18λ), √ √ √ √ h = b0 nc, h0 = (1 + 2/0 )h ≤ 3 n, h∗ = 9λ n, k = 2h∗ + 2 n, and k 0 = (1 + 2/0 )k. Recall that λ is the number of bits used to represent each ID in the network. 4.1.1 Types of Nodes 0 i For any integer i, we let ρi =  h2 and let Gi be the graph with the same nodes and edges as G and weight w(u, v, Gi ) = d w(u,v,G) e for every edge (u, v). Note that we have chosen h0 ρi such that d(u, v, Gi ) ≤ h0 by Equation (3) of Lemma 2.2. For any node u, let the ball of u in Gi be B(u, Gi , h0 ) = {v ∈ V (Gi ) | d(u, v, Gi ) ≤ h0 }. Note that for any index i and nodes u and v, d(u, v, Gi+1 ) ≤ d(u, v, Gi ); thus, B(u, Gi , h0 ) ⊆ B(u, Gi+1 , h0 ). Let the type t(u) of u be the smallest index i such that |B(u, Gi , h0 )| ≥ h. We crucially exploit the following structural property. √ Lemma 4.2. For every path π of G consisting of |π| = n edges there is a node u on π such that 2t(u) ≤ 20 w(π, G). Proof. Let l = d|π|/he ≥ 1/ and let x and y denote the endpoints of π. Partition π into the path πx consisting of the (l − 1)h edges closest to x and the path πy consisting of the |π| − (l − 1)h edges closest to y. Further partition πu into l − 1 non-overlapping subpaths of exactly h edges, and expand the path πy by adding edges of πx to it until it has h edges. Thus, there are now l paths of exactly h edges each and total weight at most 2w(π, G). It follows that there exists a subpath π 0 of π consisting of exactly h edges and weight at most 2w(π, G)/l ≤ 20 w(π, G). Let u and v be the two endpoints of π 0 and let i be the index such that 2i ≤ dh (u, v, G) ≤ 2i+1 . By Equation (3) of Lemma 2.2 it follows that d(u, v, Gi ) ≤ h0 , which implies that B(u, Gi , h0 ) contains π 0 . Hence |B(u, Gi , h0 )| ≥ h and t(u) ≤ i. This shows that 2t(u) ≤ 2i ≤ dh (u, v, G) ≤ w(π 0 , G) ≤ 20 w(π, G). Computing Types of Nodes. To compute t(u) for all nodes u, it is sufficient for every node u to know, for each i, whether |B(u, Gi , h0 )| ≥ h. We do this by solving the (S, γ, σ)detection problem on Gi with S = V (G), γ = h0 and σ = h, i.e., we compute the list 25 L(u, S, γ, σ, G) for all nodes u, which contains the σ nodes from S that are closest to u, provided their distance is at most γ. By Theorem 2.4 this requires O(γ + σ) = O(h + h0 ) = √ O( n) rounds. For any node u, |L(u, V (G), h0 , h, G)| = h if and only if |B(u, Gi , h0 )| ≥ h. √ Thus, after we solve the (S, γ, σ)-detection problem on all Gi , using Õ( n) rounds, every node u can compute its type t(u) without any additional computation. 4.1.2 Selecting Centers via Ruling Sets Having computed the types of the nodes, we compute ruling sets for the nodes of each type to select a small subset of nodes of each type as centers. Remember the two properties of an (α, β)-ruling set T of a base set U : (1) all nodes of T are at least distance α apart and (2) each node in U \ T has at least one “ruling” node of T in distance β. We use the algorithm of Theorem 2.7 to compute a (2h0 + 1, (2h0 + 1)λ)-ruling set Ti for each graph Gi where the input set Ui consists of all nodes of type i. The number of rounds for this computation is √ S Õ(h0 ) = Õ( n). We define the set of centers as V 0 = ( i Ti ) ∪ {s}. Property (1) allows us to bound the number of centers and by property (2) the centers “almost” hit all paths with √ n edges. √ Lemma 4.3. (1) The number of centers is |V 0 | = Õ( n/). (2) For any path π containing √ ∗ exactly n edges, there is a node u in π and a center v ∈ V 0 such that dh (u, v, G) = √ w(π, G)), where h∗ = 9 nλ. Proof. (1) For each i, consider any two nodes u and v in Ti . Since d(u, v, Gi ) > 2h0 by Property (1) of the ruling set, B(u, Gi , h0 ) ∩ B(v, Gi , h0 ) = ∅. As every node u ∈ Ti is of type i, |B(u, Gi , h0 )| ≥ h for every u ∈ Ti . We can therefore uniquely assign h nodes to every √ node u ∈ Ti and thus |Ti | ≤ n/h = O( n/). (2) By Lemma 4.2, there is a node u in π such that 2t(u) = 20 w(π, G). Moreover, there is a center v in the ruling set Tt(u) such that d(u, v, Gt(u) ) ≤ (2h0 + 1)λ ≤ 3h0 λ ≤ h∗ . (The √ last inequality is because h0 ≤ 3 n.) Let π 0 be the shortest path between u and v in Gt(u) . Then w(π 0 , Gt(u) ) = d(u, v, Gt(u) ) ≤ h∗ , and as a consequence π 0 contains at most h∗ edges. It follows that ∗ dh (u, v, G) ≤ w(π 0 , G) = X w(x, y, G) (x,y)∈E(π 0 ) ≤ X ρt(u) · w(x, y, Gt(u) ) (x,y)∈E(π 0 ) ≤ ρt(u) · w(π 0 , Gt(u) ) = ρt(u) · d(u, v, Gt(u) ) 0 2t(u) d(u, v, Gt(u) ) h 0 2t(u) 0 ≤ 3h λ h = 9λ2t(u) = ≤ 18λ0 w(π, G) 26 (recall that w(x, y, Gt(u) ) = d w(x,y,G) e) ρ t(u) = w(π, G)) . 4.1.3 Computing Distances to Centers √ Recall that we use parameters defined above Section 4.1.1. Let k = 2h∗ + 2 n, where √ h∗ = 9 nλ (as in Lemma 4.3). In this step, we compute for every node u and every center ˆ v) that is a (1 + )-approximation of dk (u, v, G) such that each node u knows v a value d(u, ˆ ˆ v) for all pairs of centers u and d(u, v) for all centers v. In particular we also compute d(u, v. To do this we follow the idea of partial distance estimation [LP15]. As in Section 4.1.1, we do this by solving the source detection problem on a graph with rounded weights.12 For i any integer i, let ϕi = 2k . Let Ĝi be the weighted graph such that w(u, v, Ĝi ) = d w(u,v,G) e ϕi for every edge (u, v) in G. We solve the (S, γ, σ)-detection problem on Ĝi for all 0 ≤ i ≤ blog nW c, with parameters √ S = V 0 , γ = k 0 , and σ = |V 0 | (where |V 0 | = Õ( n/) by Lemma 4.3). Using the algorithm √ of Theorem 2.4 repeatedly this takes Õ(γ + σ) = Õ( n) rounds. At termination, every node u knows the distances up to k 0 to all centers in all Ĝi ; i.e., it knows d(u, v, k 0 , Ĝi ) for all i ˆ v) = mini {ϕi · d(u, v, k 0 , Ĝi )}. and all centers v. For every node u and center v we set d(u, ˆ v) without any additional communication as soon as the Every node u can compute d(u, ∗ source detection algorithm is finished. Now, observe that for the index i∗ such that 2i ≤ ∗ dh (u, v, G) ≤ 2i +1 , it follows from Equation (3) of Lemma 2.2 that d(u, v, Gi∗ ) ≤ k 0 which implies that d(u, v, k 0 , Gi∗ ) = d(u, v, Gi∗ ). With Equations (2) and (4) it then follows that ˆ v) ≤ ϕi∗ · d(u, v, k 0 , Gi∗ ) = ϕi∗ · d(u, v, Gi∗ ) ≤ (1 + )dk (u, v, G) . d(u, v, G) ≤ d(u, ˆ v) is the desired (1 + )-approximation of dk (u, v, G). Hence d(u, 4.1.4 Completing the Proof of Theorem 4.1 We define our final overlay network to be the graph G0 where the weight between any two ˆ v) (as computed in Section 4.1.3). Additionally, for every node centers u, v ∈ V (G0 ) is d(u, ˆ v) to all centers v ∈ V (G0 ). We now show that all u ∈ V (G) we store the value of d(u, √ properties stated in Theorem 4.1 hold for G0 . Since we need Õ( n) rounds in Sections 4.1.1 √ √ and 4.1.3 and Õ( n) rounds in Section 4.1.2, the running time to construct G0 is Õ( n). √ Moreover, |V (G0 )| = Õ( n) as shown in Lemma 4.3. This is as claimed in the first part of Theorem 4.1. It is thus left to prove the following statement in Theorem 4.1: “for every node ˜ v) of d(s, v, G0 ) for all centers u ∈ V (G), as soon as u receives a (1 + )-approximation d(s, v ∈ V (G0 ), it can infer a (1 + 7)-approximate value of d(u, s, G) without any additional communication.” Consider any node u and let π be the shortest path between s and u in G. If π contains √ ˆ s) known by u is less than n edges, then dk (u, s, G) = d(u, s, G) and thus the value d(u, √ already a (1 + )-approximate value of d(u, s, G). If π contains at least n edges, then partition π into subpaths π0 , π1 , . . . , πt (for some t) where π0 contains s, πt contains u, π0 √ √ contains at most n edges, and every subpath except π0 contains exactly n edges. By 12 We note that the algorithm and analysis described in this subsection is essentially the same as the proof of [LP15, Theorem 3.3]. We cannot use the result in [LP15] directly since we need a slightly stronger guarantee, which can already be achieved by the same proof. (We thank Christoph Lenzen for a communication regarding this.) 27 Lemma 4.3, for every 1 ≤ i ≤ t, there is a node ui and a center vi such that (i) ui is in πi and ∗ (ii) dh (ui , vi , G) = w(πi , G)). Additionally since ui and ui+1 lie on π, their shortest path is √ the√ subpath of π between them and, thus, it consists of at most 2 n edges. It follows that √ d2 n (ui , ui+1 , G) = d(ui , ui+1 , G). By our choice of k = 2h∗ + 2 n the triangle inequality gives √ ∗ dk (vi , vi+1 , G) ≤ dh (vi , ui , G) + d2 n ∗ (ui , ui+1 , G) + dh (ui+1 , vi+1 , G) ≤ d(ui , ui+1 , G) + w(πi , G) + w(πi+1 , G). By the same argument, dk (s, v1 , G) ≤ d(s, u1 , G) + w(π1 , G) and dk (u, vt , G) ≤ d(u, ut , G) + ˆ y), we get w(πt , G). As every edge (x, y) in G0 has weight d(x, ˜ vt ) + d(u, ˆ vt ) ≤ (1 + )d(s, vt , G0 ) + d(u, ˆ vt ) d(s, 0 ≤ (1 + ) d(s, v1 , G ) + t−1 X ! 0 ˆ vt ) d(vi , vi+1 , G ) + d(u, i=1 ˆ v1 ) + ≤ (1 + ) d(s, t−1 X ! ˆ i , vi+1 ) + d(u, ˆ vt ) d(v i=1 ≤ (1 + ) ≤ (1 + ) ≤ (1 + ) 2 2 2 k t−1 X k i=1 t−1 X d (s, v1 , G) + d (s, v1 , G) + d(s, u, G) +  ! k d (vi , vi+1 , G) + (1 + )dk (u, vt ) ! k k d (vi , vi+1 , G) + d (u, vt , G) i=1 t X ! w(πi , G) i=0 = (1 + )2 (d(s, u, G) + d(s, u, G)) ≤ (1 + )3 d(s, u, G) ≤ (1 + 7)d(s, u, G) . ˜ v 0 ) for all centers v ∈ V (G0 ), it can compute minv∈V (G0 ) (d(s, ˜ v) + Thus, when u receives d(s, ˆ v)), which, as we just argued, is a (1 + 7)-approximation of d(s, u, G). d(u, 4.2 Computing a Hop Set on an Overlay Network We now show how to simulate the hop set algorithm presented in Section 3 on an overlay network G0 and how to compute approximate shortest paths from s in G0 using the hop set. Throughout the algorithm we will work on overlay networks whose node set is the set of centers V (G0 ), but which might have different edge weights as, e.g., Procedure 4 calls Procedure 3 on overlay networks with modified edge weights. Thus, we will use G00 to refer to an overlay network on which Procedures 2 to 5 run to emphasize the fact that they might not equal G0 . We let N be the number of centers in G0 and G00 . Thus N = Θ̃(n1/2 ). 4.2.1 Computing Bounded-Distance Single-Source Shortest Paths We will repeatedly use an algorithm for computing a shortest-path tree up to distance R rooted at s on an overlay network G00 , where R = O(no(1) ). At the end of the algorithm every 28 node knows this tree. We do this in a breadth-first search manner, in R + 1 iterations. Like in Dijkstra’s algorithm, every node keeps a tentative distance δ(s, u) from s and a tentative parent in the shortest-path tree, i.e., a node v such that δ(s, u) = δ(s, v) + w(u, v, G00 ). Initially, δ(s, s) = 0 and δ(s, v) = ∞ for every node v 6= s. In the Lth iteration, for L from 0 up to R, all nodes in G00 whose tentative distance δ(s, u) is exactly L broadcast13 to all other nodes a message (u, δ(s, u), v) where v is the parent of u. Using this information, every node u will update (“relax”) its tentative distance δ(s, u) and its tentative parent. Clearly, after the Lth iteration, centers that have distance L + 1 from s (i.e., that are at level L in the shortest-path tree) will already know their correct distance. Thus, at the end of the last iteration every center knows the shortest-path tree rooted at s up to distance R in G00 . To analyze the running time, note that over R rounds we broadcast N messages in total, and if mL messages are broadcast in the Lth iteration, then this iteration takes O(mL + D) rounds. (We emphasize that the number of rounds depends on the diameter D of the original network, and not of G00 .) The total number of communication rounds used P over all iterations is thus O(RD + L mL ) = O(RD + N ). 4.2.2 Computing Priorities We will simulate Procedure 1. All necessary parameters can be computed beforehand and thus do not require any communication. Initially every center knows that it is contained in A0 = V . To compute Ai+1 given that Ai is known (i.e., every center knows whether it is in Ai or not), we compute the list L(v, Ai , R, q, G00 ) for every center v using a source detection algorithm and distribute each list to every center. Then every center runs the same deterministic greedy hitting set approximation algorithm to compute Ai+1 . We will obtain (Ai )0≤i≤p by repeating this for p iterations. Thus, we only have to solve the (S, γ, σ)-source detection problem with S = Ai , γ = R, and σ = q on an overlay network G00 . For this purpose we simulate the source detection algorithm of Roditty, Thorup, and Zwick [RTZ05] (see Theorem 2.5). 14 Recall that in the first phase of this algorithm, we add an artificial source s∗ to G with a 0-length edge between s∗ and every center in S and perform a single-source shortest paths computation from s∗ up to distance γ. We do this in the same way as the boundeddistance shortest-path tree algorithm described in Section 4.2.1, except that we initially set δ(s∗ , u) = 0 for every center u ∈ S. The subsequent iterations in this phase are exactly as described in Section 4.2.1. Note that due to the broadcast messages every center knows that shortest-path tree from s∗ in G00 at the end of the first phase. In the next phase, we have to compute a shortest-path tree on the graph G001 . We observe the following from the construction of G001 described in Section 3.1. Observation 4.4. Every center u in G00 will know all edges incident to it in G001 if it knows, for every center v in G00 , (1) U1 (v) and (2) the distance (in G00 ) from v to all centers in 13 More precisely, there is a designated node (e.g. the node with lowest ID) that aggregates and distributes the messages (via upcasting and downcasting on the breadth-first search tree of the network G), and tells other nodes when the iteration starts and ends. 14 Although the algorithm of Lenzen and Peleg [LP13] (see Theorem 2.4) was designed for the distributed setting, we do not know how to simulate it on the overlay network with the running time guarantees we require. In particular we have no guarantee that in O(D) rounds each node of the overlay network can send a message to all its neighbors, which is allowed in one round of the original algorithm. The reason is the congestion we obtain by individual nodes being part of many paths used for hop set edges. 29 U1 (v). In particular, it will know this information if it knows the shortest-path tree obtained in the previous phase. Since the shortest-path tree obtained in the previous phase is known to every center, we can assume that every center u in G00 knows all its incident edges in G001 at the beginning of the phase. Now we compute the shortest-path tree up to distance R in a similar manner as in Section 4.2.1. The only exceptions are that (1) initially every center u in G00 knows that v̄ has distance 0 to s∗ , for every center v̄ in G001 , and they use this information to initialize the value of δ(s∗ , u) and (2) that they use the adjacent edges in G001 and not in G00 to update their distance to s∗ . The subsequent phases are simulated in the same manner; i.e., using the shortest-path tree computed in the previous phases, every center knows its incident edges in G00j . This allows us to compute the shortest-path tree in G00j in the breadth-first search manner. After we finish all σ phases, every center in G00 will know L(v, S, γ, σ, G00 ) for all v. Using the aforementioned analysis of the bounded-distance shortest-path tree, it follows that every phase takes O(γD + N ) rounds and as there are σ rounds the whole source detection algorithm takes O(σγD + σN ) rounds For computing the priorities we repeat this for all p priorities and thus get the following. Lemma 4.5. The above algorithm deterministically computes a hierarchy (Ai )0≤i≤p as in Lemma 3.2 in O(pq(RD + N )) rounds. With our choice of parameters (N = Õ(n1/2 ), p ≤ log n, q = O(N o(1) ), and R = O(N o(1) )), the running time of the above algorithm is O(n1/2+o(1) + Dno(1) ). 4.2.3 Computing Clusters We now describe how to compute clusters in G00 . At the end of the cluster computation every center will know the cluster C(u) of every center u. We do this by simulating Procedure 2. First, we need to compute d(v, Ai+1 , R, G), for every 1 ≤ i ≤ p. This can be done in exactly the same way as in the first phase of computing the hierarchy (Ai )i ; i.e., we simply add a virtual source s∗ and edges of weight zero between s∗ and centers in Ai , and compute the shortest-path tree up to distance R rooted at s∗ . Since such a tree can be computed in Õ(RD + N ) rounds and we have to compute p ≤ log n such trees, the total time we need here is Õ(RD + N ). Next, we compute a shortest-path tree up to distance R from every center u in G00 , as described in Procedure 2. That is, at Iteration L (starting with L = 0 and ending with L = R), every center v having (a) δ(u, v) (the tentative distance from u to v) equal to L and (b) additionally δ(u, v) < d(v, Ai+1 , R, G) will broadcast15 its distance to u to all other centers so that every other center, say w, can (1) update its tentative distance δ(u, w) and (2) add v and δ(u, v) to its locally stored copy of C(u). It thus follows that for every center u the number of messages broadcast during the computation of C(u) is |C(u)|. Thus, P there are u∈V (G00 ) |C(u)| messages broadcast in total, which is bounded from above by Õ(pN 1/p ) = O(n1/2+o(1) ) due to Theorem 3.3. Note that this procedure computes C(v), for all centers v, in parallel. Each Iteration L P requires O(D + v∈V (G00 ) mv,L ) rounds, where mv,L is the number of messages needed to be 15 We note again that to do this, there is a designated center that aggregates and distributes the messages (via upcasting and downcasting), and tells other centers when the iteration starts and ends. 30 broadcast at Iteration L in order to compute C(v). The total number of rounds over all R iterations is thus O(RD + X X mv,L ) = O(RD + 0≤L≤R v∈V (G00 ) X v∈V |C(v)|) = O(no(1) D + n1/2+o(1) ) . (10) (G00 ) Note that since the computation is done by broadcasting messages, every center knows cluster C(v) for all v at the end of this computation. Lemma 4.6. For any overlay network G00 with Õ(n1/2 ) centers, the above algorithm deterministically computes clusters up to distance R = no(1) (where every center knows C(u) for all centers u) that satisfies Theorem 3.3 in O(no(1) D + n1/2+o(1) ) rounds. 4.2.4 Computing the Hop Reduction with Additive Error We will simulate Procedure 3. All necessary parameters can be computed beforehand and thus do not require any communication. We can then execute Clusters(G, p, R) using the above algorithm to get (C(v), δ(v, ·))v∈V . With this information the set F can be computed without any additional communication. Thus, executing Clusters(G, p, R) is the only part for computing F that requires communication. By Lemma 4.6 the total time needed to execute Procedure 3 is therefore O(no(1) D + n1/2+o(1) ) . 4.2.5 (11) Computing the Hop Reduction without Additive Error We will simulate Procedure 4. All necessary parameters can be computed beforehand and thus do not require any communication. Moreover, every center knows about the edges incident b 0 by scaling down edge weights without any communication. to it and can thus compute G r We then execute Procedure 3 to compute Fbr0 . Knowing Fbr we can compute F without any additional communication. Thus, executing Procedure 3 is the only part for computing F that requires communication and it is executed O(log nW ) times. As simulating Procedure 3 takes time O(no(1) D + n1/2+o(1) ), as argued above (cf. Equation (11)), the total time needed to execute Procedure 4 is O(no(1) D log (nW ) + n1/2+o(1) log (nW )) . 4.2.6 (12) Computing the Hop Set We will simulate Procedure 5. All necessary parameters can be computed beforehand. Computing Fi+1 is done by simulating Procedure 4 on the graph Hi , which, as argued above (cf. Equation (12)), takes time O(no(1) D log (nW ) + n1/2+o(1) log (nW )). As every center knows its incident edges, the graph Hi+1 can be computed from Fi+1 without any additional communication. As we execute Procedure 4 p ≤ log n times, the total time needed to simulate Procedure 5 is O(pno(1) D log (nW ) + pn1/2+o(1) log (nW )) = O(no(1) D log (nW ) + n1/2+o(1) log (nW )) . By running this algorithm on G0 (which, as pointed out, involves performing hop reductions and computing clusters on some other overlay networks), we obtain the following theorem. 31 Theorem 4.7. There is a deterministic algorithm that computes a hop set of G0 in O(no(1) D log (nW ) + n1/2+o(1) log (nW )) rounds. In the end of the process, every center knows every edge in the hop set. 4.2.7 Routing via the Hop Set Remember that the overlay network is computed using the source detection algorithm of Lenzen and Peleg [LP13]. If a node x of the overlay network wants to send a message to one of its neighbors y in the overlay network it can do so by routing the message along a path in the original network whose length is upper-bounded by the weight of the overlay edge (x, y). This routing can be obtained by modifying the source detection algorithm to additionally construct BFS trees rooted at the sources (see [LP13]), which in our case are the nodes of the overlay network. When we compute the hop set on the overlay network we broadcast all computed clusters to all nodes in the network. In this way the clusters, the corresponding partial shortest path trees of the clusters, as well as the hop set edges become global knowledge. Therefore every node in the overlay network learns for every hop set edge (x, y) to which path from x to y in the overlay network it corresponds. Thus, also for every hop set edge (x, y) of the overlay network, x can send a message to y by routing the message along a path in the original network whose length is upper-bounded by the weight of the overlay edge (x, y). This means that the hop set computed by our algorithm has the following awareness property, as introduced in the full version of [EN16b]: A hop set F for a graph G is called aware if for every hop-set edge (x, y) ∈ F of weight b there exists a corresponding path π in G between x and y of length b. Furthermore, every node v on π knows dπ (v, x) and dπ (v, y), and its neighbors on π. 4.3 Final Steps Let H be the graph obtained by adding to G0 the edges of the (no(1) , o(1))-hop set computed above. To (1 + o(1))-approximate d(s, v, G0 ) for every center v in G0 , it is sufficient to (1 + o(1))-approximate the h-hop distance dh (s, v, H), for some h = no(1) . The latter task can be done in O(hD + |V (G0 )|) = O(no(1) D + n1/2+o(1) ) rounds by the same method as in Lemma 4.6 in the full version of [Nan14]. We give a sketch here for completeness. Let  = 1/ log n. For any 1 ≤ i ≤ log(nW ), let Hi0 be the graph obtained by rounding edge 0) weights in H 0 as in Section 4.1.1; i.e., for every edge (u, v) we set w(u, v, Hi0 ) = d w(u,v,H e, ρi i where ρi = 2h . For each Hi , we compute the shortest-path tree rooted at s up to distance R = O(h/), which can be done in O(RD + n1/2+o(1) ) = O(no(1) D + n1/2+o(1) ) rounds, using the procedure described in Section 4.2. This gives d(s, v, R, Hi0 ) for every center v. We then use the following value as (1 + o(1))-approximation of dh (s, v, H) (and thus of d(s, v, G0 )): ˜ v) = mini ρi d(s, v, R, H 0 ). The correctness of this algorithm follows from Lemma 2.2. d(s, i Once we have (1 + o(1))-approximate values of d(s, v, G0 ) for every center v ∈ V (G0 ), we can broadcast these values to the whole network in Õ(D + n1/2 ) rounds. Theorem 4.1 then implies that we have a (1 + o(1))-approximate solution to the single-source shortest paths problem on the original network. The total time spent is O(no(1) D + n1/2+o(1) ). By observing that the term no(1) D will show up in the running time only when D = ω(no(1) ), we can write the running time as O(D1+o(1) + n1/2+o(1) ), as claimed in the beginning. 32 We thus have obtained the following result. Theorem 4.8. There is a deterministic distributed algorithm that, on any weighted undirected network, computes (1 + o(1))-approximate shortest paths between a given source node s and every other node in O(n1/2+o(1) + D1+o(1) ) rounds. 5 5.1 Algorithms on Other Settings Congested Clique In the congested clique model, the underlying communication network is a complete graph. Thus, in each round every node can send a message to every other node. Apart from this topological constraint, the congested clique is similar to the CONGEST model. We compute an (no(1) , o(1))-hop set on a congested clique by simulating the hop set construction algorithm in the same way as on an overlay network as presented in Section 4.2. (However, we do not compute an overlay network here.) The only difference is the number of rounds needed for nodes to broadcast messages to all other nodes. Consider the situation that m0 messages are to be broadcast by some nodes. On a network of arbitrary topology, we will need O(D + m0 ) rounds. On a congested clique, however, we only need O(m0 /n) rounds using the routing scheme of Dolev et al. [DLP12, Lemma 1] (also see [Len13]): If each node is source and destination of up to n messages of size O(log n) (initially only the sources know destinations and contents of their messages), we will need O(1) rounds to route the messages to their destinations. In particular, we can broadcast n messages in O(1) rounds, and thus m0 messages in O(m0 /n) rounds. Using this fact, the number of rounds needed for P the algorithm in Section 4.2 reduces from O(RD + v∈V (G00 ) |C(v)|) (cf. Equation (10)) to P O(R + v∈V (G00 ) |C(v)|/n) = Õ(R + pn1/p ) = O(no(1) ) on a congested clique.16 Once we have an (no(1) , o(1))-hop set, we proceed as in Section 4.3. Let H be the graph obtained by adding to the input graph G the edges of the (no(1) , o(1))-hop set. We can treat H as a congested clique network with different edge weights from G. (H can be computed without any communication since every node already knows the hop set.) To (1 + o(1))-approximate d(s, v, G) for every node v in G, it is sufficient to compute the h-hop distance dh (s, v, H), for some h = no(1) . To do this, we follow the same approach for this problem as in [Nan14, Section 5.1], where we execute the distributed version of the Bellman-Ford algorithm for h rounds. That is, every node u maintains a tentative distance from the source s, denoted by δ(s, u) and in each round every node u broadcasts δ(s, u) to all other nodes. It can be shown that after k rounds every node v knows the k-hop distance (i.e., δ(s, u) = dk (s, v, H)) correctly, and thus after h rounds we will get the h-hop distances as desired.17 16 Instead of relying on the result of Dolev et al., we can use the following algorithm to broadcast m0 messages in O(m0 /n) rounds as follows. We assign an order to the messages, where messages sent by a node with smaller ID appears first in the order and messages sent by the same node appear in any order (a node can learn the order of its messages after it knows how many messages other nodes have). We then broadcast the first n messages according to this order, say M1 , . . . , Mn , where message Mi is sent to a node with the ith smallest ID, and such a node sends Mi to all other nodes. This takes only two rounds. The next messages are handled similarly. This algorithm broadcasts each n messages using 2 rounds, and thus the total number of rounds is O(m0 /n). 17 Note that instead of the Bellman-Ford algorithm, one can also follow the steps in Section 4.3 instead. 33 Theorem 5.1. There is a deterministic distributed algorithm that, on any weighted congested clique, computes (1 + o(1))-approximate shortest paths between a given source node s and every other node in O(no(1) ) rounds. 5.2 Streaming Algorithm In the graph streaming model, the edges of the input graph are presented to the algorithm in an arbitrary order. The goal is to desing algorithms that process this “stream” of edges using as little space as possible. In the multipass streaming model we are allowed to read the stream several times and want to keep both the number of passes and the amount of space used as small as possible. Our streaming algorithm for constructing an (no(1) , o(1))-hop set proceeds in almost the same way as in Section 4.2. First observe that a shortest-path tree up to distance R can be computed in O(R) passes and with Õ(n) space: We use the space to remember the tentative distances of the nodes to s, and the shortest-path tree computed so far. At the end of the Lth pass we add nodes having distances exactly L to the shortest-path tree, and update the distance of their neighbors in the (L + 1)th pass. We compute the priorities, as described in Section 4.2.2, the algorithm proceeds in q = no(1) phases where in the Lth phase we compute a shortest-path tree rooted at s∗ up to distance R = no(1) on graph Gi−1 (where G0 = G). As in 4.4, we can construct Gi if we know the shortest-path tree rooted at s∗ up to distance R. Thus, after computing such a tree, the algorithm can construct Gi and proceed to the next phase without reading the stream. The algorithm therefore needs O(qR) = no(1) passes and O(qn) = O(n1+o(1) ) space. To compute clusters, we compute n shortest-path trees up to distance R rooted at different nodes in parallel. The number of passes is clearly O(R). The space is bounded P by the sum of the sizes of the shortest-path trees. This is O( v∈V (G00 ) |C(v)|) which, by Theorem 3.3, is Õ(pn1+1/p ) = O(n1+o(1) ). To compute the hop set we only have to compute clusters Õ(log W ) times. So, we need O(no(1) log W ) passes and O(n1+o(1) log W ) space in total. By considering the edges of the hop set in addition the edges read from the stream it suffices to compute approximate single-source shortest paths up to no(1) hops. Using the rounding technique this can be done in O(no(1) ) additional passes. Theorem 5.2. There is a deterministic streaming algorithm algorithm that, given any weighted directed graph, computes (1 + o(1))-approximate shortest paths between a given source node s and every other node in O(no(1) log W ) passes with O(n1+o(1) log W ) space. 6 Conclusion and Open Problems We present deterministic distributed (1 + o(1))-approximation algorithms for solving the single-source shortest paths problem on distributed weighted networks and other settings. The efficiencies of our algorithms match the known lower bounds up to an no(1) factor. Important tools consist of a construction the hop set and a deterministic process that replaces the well-known (randomized) hitting set argument. Our understanding of these tools This gives a (1 + o(1))-approximate value for dh (s, v, H) for every node v, which is sufficient for computing a (1 + o(1))-approximate value for d(s, v, G). This algorithm is however more complicated. 34 is still limited. We leave as a major open problem whether we can improve our understanding of these tools in the following aspects. First, the main reason that the no(1) factor shows up in the bounds of our algorithms is because we rely on a (no(1) , o(1))-hop set of size O(n1+o(1) ). To use the same approach to get similar bounds but without the no(1) term, we need efficient algorithms to construct a (polylog(n), o(1))-hop set of size Õ(n). However, such hop set is not known to exist. We leaving the existence of such hop set (ignoring the efficiency in constructing it) as the first open question.18 Secondly, our deterministic replacement of the hitting set argument works only when the input graph is undirected. Our second open problem is thus how to derandomize algorithms on directed graphs (where edge directions do not affect the communication; see [Nan14, Nan16] for more details). In particular, it is known that single-source shortest paths can be (1 + )-approximated on directed weighted graphs in Õ(n1/2 D1/2 + D) time [Nan14], and single-source reachability can be computed in Õ(n1/2 D1/4 + D) time [GU15]. However, these results are obtained by randomized algorithms, and whether there are sublinear-time deterministic algorithms for these problems is still open. Finally, while our paper essentially settles the running time for computing single-source shortest paths approximately, the best running time for solving this problem exactly is still linear (by the Bellman-Ford algorithm). Whether there is a sublinear algorithm is a major open problem. In fact, in the past few years we have much better understood how to approximately solve basic graph problems, such as minimum cut, single-source shortest paths, all-pairs shortest paths, and maximum flows, on distributed networks (e.g. [NS14, GK13, GKK+ 15]). However, when it comes to solving these problems exactly, almost nothing is known. Understanding the complexity of exact algorithms is an important open problems. We refer to [Nan14, Nan16] for further open problems. Acknowledgment We thank Michael Elkin, Stephan Friedrichs, and Christoph Lenzen for their comments and questions on the previous version of this paper. D. Nanongkai thanks Michael Elkin for bringing the notion of hop set to his attention. References [ADP80] Giorgio Ausiello, Alessandro D’Atri, and Marco Protasi. “Structure Preserving Reductions among Convex Optimization Problems”. In: Journal of Computer and System Sciences 21.1 (1980). Announced at ICALP’77, pp. 136–153 (cit. on p. 12). [Bas08] Surender Baswana. “Streaming algorithm for graph spanners—single pass and constant processing time per edge”. In: Information Processing Letters 106.3 (2008), pp. 110–114 (cit. on p. 4). We note that recently [BKK+ 16] showed how to eliminate the no(1) term from our results by bypassing the hop set. Nevertheless, the question whether a (polylog(n), o(1))-hop set of size Õ(n) exists is interesting on its own and potentially has other applications. 18 35 [BE13] Leonid Barenboim and Michael Elkin. Distributed Graph Coloring: Fundamentals and Recent Developments. Synthesis Lectures on Distributed Computing Theory. Morgan & Claypool Publishers, 2013. isbn: 9781627050180 (cit. on p. 10). [Bel58] Richard Bellman. “On a Routing Problem”. In: Quarterly of Applied Mathematics 16.1 (1958), pp. 87–90 (cit. on p. 3). [Ber09] Aaron Bernstein. “Fully Dynamic (2 + ) Approximate All-Pairs Shortest Paths with Fast Query and Close to Linear Update Time”. In: Symposium on Foundations of Computer Science (FOCS). 2009, pp. 693–702 (cit. on pp. 6, 8, 15). [Ber16] Aaron Bernstein. “Maintaining Shortest Paths Under Deletions in Weighted Directed Graphs”. In: SIAM Journal on Computing 45.2 (2016). Announced at STOC’13, pp. 548–574 (cit. on pp. 5, 8). [BHS07] Surender Baswana, Ramesh Hariharan, and Sandeep Sen. “Improved decremental algorithms for maintaining transitive closure and all-pairs shortest paths”. In: Journal of Algorithms 62.2 (2007). Announced at STOC’02, pp. 74–92 (cit. on p. 5). [BKK+ 16] Ruben Becker, Andreas Karrenbauer, Sebastian Krinninger, and Christoph Lenzen. “Approximate Undirected Transshipment and Shortest Paths via Gradient Descent”. In: CoRR abs/1607.05127 (2016) (cit. on pp. 6, 35). [CKK+ 15] Keren Censor-Hillel, Petteri Kaski, Janne H. Korhonen, Christoph Lenzen, Ami Paz, and Jukka Suomela. “Algebraic Methods in the Congested Clique”. In: Symposium on Principles of Distributed Computing (PODC). 2015, pp. 143–152 (cit. on p. 4). [Coh00] Edith Cohen. “Polylog-Time and Near-Linear Work Approximation Scheme for Undirected Shortest Paths”. In: Journal of the ACM 47.1 (2000). Announced at STOC’94, pp. 132–166 (cit. on p. 5). [Coh98] Edith Cohen. “Fast Algorithms for Constructing t-Spanners and Paths with Stretch t”. In: SIAM Journal on Computing 28.1 (1998). Announced at FOCS’93, pp. 210–236 (cit. on p. 8). [DFI05] Camil Demetrescu, Irene Finocchi, and Giuseppe F. Italiano. “Handbook on Data Structures and Applications”. In: CRC Press, 2005. Chap. 36: Dynamic Graphs (cit. on pp. 5, 24). [DFR09] Camil Demetrescu, Irene Finocchi, and Andrea Ribichini. “Trading Off Space for Passes in Graph Streaming Problems”. In: ACM Transactions on Algorithms 6.1 (2009). Announced at SODA’06 (cit. on p. 5). [DHK+ 12] Atish Das Sarma, Stephan Holzer, Liah Kor, Amos Korman, Danupon Nanongkai, Gopal Pandurangan, David Peleg, and Roger Wattenhofer. “Distributed Verification and Hardness of Distributed Approximation”. In: SIAM Journal on Computing 41.5 (2012). Announced at STOC’11, pp. 1235–1265 (cit. on pp. 1, 3, 4). 36 [DI06] Camil Demetrescu and Giuseppe F. Italiano. “Fully dynamic all pairs shortest paths with real edge weights”. In: Journal of Computer and System Sciences 72.5 (2006). Announced at FOCS’01, pp. 813–837 (cit. on p. 5). [DLP12] Danny Dolev, Christoph Lenzen, and Shir Peled. ““Tri, Tri Again”: Finding Triangles and Small Subgraphs in a Distributed Setting”. In: International Symposium on Distributed Computing (DISC). 2012, pp. 195–209 (cit. on p. 33). [DSDP15] Atish Das Sarma, Michael Dinitz, and Gopal Pandurangan. “Efficient distributed computation of distance sketches in networks”. In: Distributed Computing 28.5 (2015). Announced at SPAA’12, pp. 309–320 (cit. on p. 6). [EKN+ 14] Michael Elkin, Hartmut Klauck, Danupon Nanongkai, and Gopal Pandurangan. “Can Quantum Communication Speed Up Distributed Computation?” In: Symposium on Principles of Distributed Computing (PODC). 2014, pp. 166–175 (cit. on p. 3). [Elk04] Michael Elkin. “Distributed approximation: a survey”. In: SIGACT News 35.4 (2004), pp. 40–57 (cit. on pp. 1, 3). [Elk06] Michael Elkin. “An Unconditional Lower Bound on the Time-Approximation Trade-off for the Distributed Minimum Spanning Tree Problem”. In: SIAM Journal on Computing 36.2 (2006). Announced at STOC’04, pp. 433–456 (cit. on p. 3). [Elk11] Michael Elkin. “Streaming and Fully Dynamic Centralized Algorithms for Constructing and Maintaining Sparse Spanners”. In: ACM Transactions on Algorithms 7.2 (2011). Announced at ICALP’07, 20:1–20:17 (cit. on p. 4). [EN16a] Michael Elkin and Ofer Neiman. “Hopsets with Constant Hopbound, and Applications to Approximate Shortest Paths”. In: Symposium on Foundations of Computer Science (FOCS). 2016 (cit. on p. 6). [EN16b] Michael Elkin and Ofer Neiman. “On Efficient Distributed Construction of Near Optimal Routing Schemes: Extended Abstract”. In: Symposium on Principles of Distributed Computing (PODC). 2016, pp. 235–244 (cit. on pp. 6, 32). [EZ06] Michael Elkin and Jian Zhang. “Efficient algorithms for constructing (1 + , β)spanners in the distributed and streaming models”. In: Distributed Computing 18.5 (2006), pp. 375–385 (cit. on p. 4). [FKM+ 05] Joan Feigenbaum, Sampath Kannan, Andrew McGregor, Siddharth Suri, and Jian Zhang. “On graph problems in a semi-streaming model”. In: Theoretical Computer Science 348.2-3 (2005). Announced at ICALP’04, pp. 207–216 (cit. on p. 4). [FKM+ 08] Joan Feigenbaum, Sampath Kannan, Andrew McGregor, Siddharth Suri, and Jian Zhang. “Graph Distances in the Data-Stream Model”. In: SIAM Journal on Computing 38.5 (2008). Announced at SODA’05, pp. 1709–1727 (cit. on p. 4). 37 [FL16] Stephan Friedrichs and Christoph Lenzen. “Parallel Metric Tree Embedding based on an Algebraic View on Moore-Bellman-Ford”. In: Symposium on Parallelism in Algorithms and Architectures (SPAA). 2016, pp. 455–466 (cit. on p. 6). [For56] Lester R. Ford. Network Flow Theory. Tech. rep. P-923. The Rand Corporation, 1956 (cit. on p. 3). [GK13] Mohsen Ghaffari and Fabian Kuhn. “Distributed Minimum Cut Approximation”. In: International Symposium on Distributed Computing (DISC). 2013, pp. 1–15 (cit. on pp. 3, 35). [GKK+ 15] Mohsen Ghaffari, Andreas Karrenbauer, Fabian Kuhn, Christoph Lenzen, and Boaz Patt-Shamir. “Near-Optimal Distributed Maximum Flow: Extended Abstract”. In: Symposium on Principles of Distributed Computing (PODC). 2015, pp. 81–90 (cit. on p. 35). [GKP98] Juan A. Garay, Shay Kutten, and David Peleg. “A Sublinear Time Distributed Algorithm for Minimum-Weight Spanning Trees”. In: SIAM Journal on Computing 27.1 (1998). Announced at FOCS’93, pp. 302–316 (cit. on p. 3). [GO16] Venkatesan Guruswami and Krzysztof Onak. “Superlinear Lower Bounds for Multipass Graph Processing”. In: Algorithmica 76.3 (2016). Announced at CCC’13, pp. 654–683 (cit. on p. 4). [GPS88] Andrew V. Goldberg, Serge A. Plotkin, and Gregory E. Shannon. “Parallel Symmetry-Breaking in Sparse Graphs”. In: SIAM Journal on Discrete Mathematics 1.4 (1988). Announced at STOC’87, pp. 434–446 (cit. on pp. 1, 5, 10). [GU15] Mohsen Ghaffari and Rajan Udwani. “Brief Announcement: Distributed SingleSource Reachability”. In: Symposium on Principles of Distributed Computing (PODC). 2015, pp. 163–165 (cit. on p. 35). [HK95] Monika Henzinger and Valerie King. “Fully Dynamic Biconnectivity and Transitive Closure”. In: Symposium on Foundations of Computer Science (FOCS). 1995, pp. 664–672 (cit. on p. 5). [HKN14] Monika Henzinger, Sebastian Krinninger, and Danupon Nanongkai. “Decremental Single-Source Shortest Paths on Undirected Graphs in Near-Linear Total Update Time”. In: Symposium on Foundations of Computer Science (FOCS). 2014, pp. 146–155 (cit. on pp. 6, 15). [HKN16] Monika Henzinger, Sebastian Krinninger, and Danupon Nanongkai. “A Deterministic Almost-Tight Distributed Algorithm for Approximating SingleSource Shortest Paths”. In: Symposium on Theory of Computing, (STOC). 2016, pp. 489–498 (cit. on p. 6). [HP15] Stephan Holzer and Nathan Pinsker. “Approximation of Distances and Shortest Paths in the Broadcast Congest Clique”. In: International Conference on Principles of Distributed Systems (OPODIS). 2015 (cit. on p. 4). 38 [HW12] Stephan Holzer and Roger Wattenhofer. “Optimal Distributed All Pairs Shortest Paths and Applications”. In: Symposium on Principles of Distributed Computing (PODC). 2012, pp. 355–364 (cit. on pp. 1, 4). [Joh74] David S. Johnson. “Approximation Algorithms for Combinatorial Problems”. In: Journal of Computer and System Sciences 9.3 (1974). Announced at STOC’73, pp. 256–278 (cit. on p. 12). [Kin99] Valerie King. “Fully Dynamic Algorithms for Maintaining All-Pairs Shortest Paths and Transitive Closure in Digraphs”. In: Symposium on Foundations of Computer Science (FOCS). 1999, pp. 81–91 (cit. on p. 5). [KKP13] Liah Kor, Amos Korman, and David Peleg. “Tight Bounds for Distributed Minimum-Weight Spanning Tree Verification”. In: Theory of Computing Systems 53.2 (2013). Announced at STACS’11, pp. 318–340 (cit. on p. 3). [KP08] Maleq Khan and Gopal Pandurangan. “A fast distributed approximation algorithm for minimum spanning trees”. In: Distributed Computing 20.6 (2008). Announced at DISC’06, pp. 391–402 (cit. on p. 6). [KP98] Shay Kutten and David Peleg. “Fast Distributed Construction of Small kDominating Sets and Applications”. In: Journal of Algorithms 28.1 (1998). Announced at PODC’95, pp. 40–66 (cit. on p. 3). [KS92] Philip N. Klein and Sairam Sairam. “A Parallel Randomized Approximation Scheme for Shortest Paths”. In: Symposium on Theory of Computing (STOC). 1992, pp. 750–758 (cit. on p. 5). [Len13] Christoph Lenzen. “Optimal Deterministic Routing and Sorting on the Congested Clique”. In: Symposium on Principles of Distributed Computing (PODC). 2013, pp. 42–50 (cit. on p. 33). [LG16] François Le Gall. “Further Algebraic Algorithms in the Congested Clique Model and Applications to Graph-Theoretic Problems”. In: International Symposium on Distributed Computing (DISC). 2016, pp. 57–70 (cit. on p. 4). [LP13] Christoph Lenzen and David Peleg. “Efficient Distributed Source Detection with Limited Bandwidth”. In: Symposium on Principles of Distributed Computing (PODC). 2013, pp. 375–382 (cit. on pp. 1, 5, 9, 25, 29, 32). [LP15] Christoph Lenzen and Boaz Patt-Shamir. “Fast Partial Distance Estimation and Applications”. In: Symposium on Principles of Distributed Computing (PODC). 2015, pp. 153–162 (cit. on pp. 1, 5, 6, 9, 25, 27). [LPS13] Christoph Lenzen and Boaz Patt-Shamir. “Fast Routing Table Construction Using Small Messages”. In: Symposium on Theory of Computing (STOC). 2013, pp. 381–390 (cit. on pp. 1, 3, 5, 23). [McG14] Andrew McGregor. “Graph Stream Algorithms: A Survey”. In: SIGMOD Record 43.1 (2014), pp. 9–20 (cit. on p. 4). [Mąd10] Aleksander Mądry. “Faster Approximation Schemes for Fractional Multicommodity Flow Problems via Dynamic Graph Algorithms”. In: Symposium on Theory of Computing (STOC). 2010, pp. 121–130 (cit. on pp. 5, 8). 39 [Nan14] Danupon Nanongkai. “Distributed Approximation Algorithms for Weighted Shortest Paths”. In: Symposium on Theory of Computing (STOC). 2014, pp. 565– 573 (cit. on pp. 1, 3–6, 8, 23, 24, 32, 33, 35). [Nan16] Danupon Nanongkai. “Some Challenges on Distributed Shortest Paths Problems, A Survey - (Invited Talk)”. In: SIROCCO. 2016 (cit. on p. 35). [NS14] Danupon Nanongkai and Hsin-Hao Su. “Almost-Tight Distributed Minimum Cut Algorithms”. In: International Symposium on Distributed Computing (DISC). 2014, pp. 439–453 (cit. on pp. 3, 35). [Pel00] David Peleg. Distributed Computing: A Locality-Sensitive Approach. Philadelphia, PA, USA: Society for Industrial and Applied Mathematics, 2000. isbn: 0-89871-464-8 (cit. on pp. 3, 10). [PR00] David Peleg and Vitaly Rubinovich. “A Near-Tight Lower Bound on the Time Complexity of Distributed Minimum-Weight Spanning Tree Construction”. In: SIAM Journal on Computing 30.5 (2000). Announced at FOCS’99, pp. 1427– 1442 (cit. on p. 3). [PT11] David Pritchard and Ramakrishna Thurimella. “Fast Computation of Small Cuts via Cycle Space Sampling”. In: ACM Transactions on Algorithms 7.4 (2011). Announced at ICALP’08, 46:1–46:30 (cit. on p. 3). [RTZ05] Liam Roditty, Mikkel Thorup, and Uri Zwick. “Deterministic Constructions of Approximate Distance Oracles and Spanners”. In: International Colloquium on Automata, Languages and Programming (ICALP). 2005, pp. 261–272 (cit. on pp. 6, 9, 11–13, 29). [RZ11] Liam Roditty and Uri Zwick. “On Dynamic Shortest Paths Problems”. In: Algorithmica 61.2 (2011). Announced at ESA’04, pp. 389–401 (cit. on p. 5). [San05] Piotr Sankowski. “Subquadratic Algorithm for Dynamic Shortest Distances”. In: International Computing and Combinatorics Conference (COCOON). 2005, pp. 461–470 (cit. on p. 5). [Som14] Christian Sommer. “Shortest-Path Queries in Static Networks”. In: ACM Computing Surveys 46.4 (2014), 45:1–45:31 (cit. on p. 23). [Sub] List of Open Problems in Sublinear Algorithms: Problem 14. http://sublinear. info/14 (cit. on pp. 1, 4). [Thu97] Ramakrishna Thurimella. “Sub-Linear Distributed Algorithms for Sparse Certificates and Biconnected Components”. In: Journal of Algorithms 23.1 (1997). Announced at PODC’95, pp. 160–179 (cit. on p. 3). [Tse15] Lewis Tseng. “PODC 2015 Review”. In: SIGACT News 46.4 (2015), pp. 94–102 (cit. on p. 6). [TZ05] Mikkel Thorup and Uri Zwick. “Approximate Distance Oracles”. In: Journal of the ACM 52.1 (2005). Announced at STOC’01, pp. 74–92 (cit. on pp. 6, 11). [TZ06] Mikkel Thorup and Uri Zwick. “Spanners and emulators with sublinear distance errors”. In: SODA. 2006, pp. 802–809 (cit. on pp. 6, 11, 15). 40 [UY91] Jeffrey D. Ullman and Mihalis Yannakakis. “High-Probability Parallel TransitiveClosure Algorithms”. In: SIAM Journal on Computing 20.1 (1991). Announced at SPAA’90, pp. 100–125 (cit. on pp. 5, 24). [Zwi02] Uri Zwick. “All Pairs Shortest Paths using Bridging Sets and Rectangular Matrix Multiplication”. In: Journal of the ACM 49.3 (2002). Announced at FOCS’98, pp. 289–317 (cit. on pp. 5, 8). 41 A Proof of Lemma 2.2 To prove Inequality (2), let πi be a shortest path between u and v in Gi . Observe that if we consider this path in G (with the corresponding edge weights), then its total weight is at most the distance between u and v in G, i.e. w(πi , G) ≥ d(u, v, G), because no path in G can have weight less than the shortest path in G. We therefore get ρi · d(u, v, Gi ) = ρi · X w(x, y, Gi ) = (x,y)∈πi w(x, y, G) ρi · ρi  X (x,y)∈πi X ≥  w(x, y, G) = w(πi , G) ≥ d(u, v, G) . (x,y)∈πi To prove Inequality (3), let π be a shortest h-hop path in G. Observe that w(π, Gi ) ≥ d(u, v, Gi ), as again no path has smaller weight then the shortest path in Gi . By additionally exploiting the assumption dh (u, v, G) ≥ 2i , we get d(u, v, Gi ) · ρi ≤ w(π, Gi ) · ρi = X w(x, y, Gi ) · ρi (x,y)∈π = X  w(x, y, G)  ρi (x,y)∈π ≤ X · ρi (w(x, y, G) + ρi ) (x,y)∈π = w(π, G) + |π| · ρi = dh (u, v, G) + |π| · ρi ≤ dh (u, v, G) + h · ρi = dh (u, v, G) + 2j ≤ dh (u, v, G) + dh (u, v, G) = (1 + )dh (u, v, G) . To prove Inequality (3), we combine Inequality (4) with the assumption dh (u, v, G) ≤ 2i+1 : d(u, v, Gi ) ≤ B (1 + )dh (u, v, G) (1 + )hdh (u, v, G) (1 + )h2j+1 = ≤ = (1 + 2/)h . ρi 2j 2j Proof of Lemma 3.1 We prove the claim by the probabilistic method. Consider a sampling process that determines a set T ⊆ U by adding each element of U to T independently with probability 1/(2x). Let E0 denote the event that |T | > |U |/x and for every 1 ≤ i ≤ k let Ei denote the event that T ∩ Si = ∅. First, observe that the size of T is |U |/(2x) in expectation. By Markov’s inequality, we can bound the probability that the size of T is at most twice the expectation by at least 1/2 and thus Pr[E0 ] = Pr[|T | > |U |/x] ≤ 1/2. Furthermore, for every 1 ≤ i ≤ k, the probability that Si contains no node of T is 1 Pr[Ei ] = 1 − 2x  |Si | 1 ≤1− 1− 2x  42 2x ln 3k ≤ 1 eln 3k = 1 . 3k The set T fails to have the desired properties of a small hitting set if at least one of the events Ei occurs. By the union bound we have Pr[ [ 0≤i≤k Ei ] ≤ X Pr[Ei ] ≤ 0≤i≤k 1 1 1 1 +k· = + < 1. 2 3k 2 3 It follows that the sampling process constructed a hitting set T for C = {S1 , . . . , Sk } of size at most |T | ≤ |U |/x with non-zero probability. Therefore a set T with these properties must really exist. This finishes the proof of Lemma 3.1. C Ruling Set Algorithm For each node v, we represent its ID by a binary number v1 v2 . . . vλ . Initially, we set T0 = U . The algorithm proceeds for b iterations. In the j th iteration, we consider uj for every node u ∈ Tj−1 . If uj = 0, v remains in Tj and sends a “beep” message to every node within distance c − 1. This takes c − 1 rounds as beep messages from different nodes can be combined. If uj = 1, it remains in Tj if there is no node v ∈ Tj−1 such that d(u, v, G) ≤ c and vj = 0; in other words, it remains in Tj if it does not hear any beep after c − 1 rounds. The output is T = Tλ . The running time of the above algorithm is clearly O(cλ) = O(c log n). Also, the distance between every pair of nodes in T is at least c since for every pair of nodes u and v of distance less than c, there is a j such that uj = 6 vj , and in the j th iteration if both u and v are in Tj−1 , then one of them will send a beep and the other one will not be in Tj . Finally, it can be shown by induction that after the j th round every node in U is at distance at most jc from some node in Tj ; thus it follows that every node in U is at distance at most cλ from some node in T . 43
8cs.DS
Phase Transitions, Optimal Errors and Optimality of Message-Passing in Generalized Linear Models Jean Barbier†,♦,⊗ , Florent Krzakala? , Nicolas Macris† , Léo Miolane∗,⊗ and Lenka Zdeborová∪ arXiv:1708.03395v2 [cs.IT] 3 Nov 2017 Abstract We consider generalized linear models (GLMs) where an unknown n-dimensional signal vector is observed through the application of a random matrix and a non-linear (possibly probabilistic) componentwise output function. We consider the models in the high-dimensional limit, where the observation consists of m points, and m/n → α where α stays finite in the limit m, n → ∞. This situation is ubiquitous in applications ranging from supervised machine learning to signal processing. A substantial amount of theoretical work analyzed the model-case when the observation matrix has i.i.d. elements and the components of the ground-truth signal are taken independently from some known distribution. While statistical physics provided number of explicit conjectures for special cases of this model, results existing for non-linear output functions were so far non-rigorous. At the same time GLMs with non-linear output functions are used as a basic building block of powerful multilayer feedforward neural networks. Therefore rigorously establishing the formulas conjectured for the mutual information is a key open problem that we solve in this paper. We also provide an explicit asymptotic formula for the optimal generalization error, and confirm the prediction of phase transitions in GLMs. Analyzing the resulting formulas for several non-linear output functions, including the rectified linear unit or modulus functions, we obtain quantitative descriptions of information-theoretic limitations of high-dimensional inference. Our proof technique relies on a new version of the interpolation method with an adaptive interpolation path and is of independent interest. Furthermore we show that a polynomial-time algorithm referred to as generalized approximate message-passing reaches the optimal generalization error for a large set of parameters. Contents 1 Introduction 2 2 Setting and main results 2.1 Generalized linear estimation: Problem statement . . . . . . . . . . . . 2.2 Two scalar inference channels . . . . . . . . . . . . . . . . . . . . . . . 2.3 Replica-symmetric formula and mutual information . . . . . . . . . . . 2.4 The case of discrete channels . . . . . . . . . . . . . . . . . . . . . . . . 2.5 Optimality of the generalized approximate message-passing algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 4 6 7 8 10 † Laboratoire de Théorie des Communications, Faculté Informatique et Communications, Ecole Polytechnique Fédérale de Lausanne, Suisse. ♦ Probability and Applications Group, School of Mathematical Sciences, Queen Mary University of London, United-Kingdom. ? Laboratoire de Physique Statistique, CNRS & Université Pierre et Marie Curie & École Normale Supérieure & PSL Université, Paris, France. ∗ Département d’Informatique de l’ENS, École Normale Supérieure & CNRS & PSL Research University & Inria, Paris, France. ∪ Institut de Physique Théorique, CNRS & CEA & Université Paris-Saclay, Saclay, France. ⊗ Corresponding authors: [email protected], [email protected] 1 3 Optimal errors in supervised learning 3.1 Teacher-student scenario . . . . . . . . . . . . . . . . . . . . 3.2 Generalization error . . . . . . . . . . . . . . . . . . . . . . . 3.3 Computing the generalization error . . . . . . . . . . . . . . 3.4 Computing the optimal errors with (small) side information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 11 12 12 13 4 Application to concrete situations 15 4.1 Generic observations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 4.2 Phase diagrams of perfect learning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 4.3 Examples of optimal generalization error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 5 Proof of the replica formula by the adaptive interpolation method 5.1 Interpolating estimation problem . . . . . . . . . . . . . . . . . . . 5.2 Free entropy variation along the interpolation path . . . . . . . . . 5.3 Overlap concentration . . . . . . . . . . . . . . . . . . . . . . . . . 5.4 Canceling the remainder . . . . . . . . . . . . . . . . . . . . . . . . 5.5 Lower and upper matching bounds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 23 25 26 27 28 Appendix A Some technicalities A.1 The Nishimori identity . . . . . . . . . A.2 Some properties of the scalar channels A.3 Proof of Theorem 2 . . . . . . . . . . . A.4 Proof of Proposition 1 . . . . . . . . . . A.5 Boundedness of an overlap fluctuation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 29 29 32 34 35 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Appendix B Proofs of the limits of optimal errors 36 B.1 Computation of the denoising error: Proof of Corollary 3 . . . . . . . . . . . . . . . . . . . . . 36 B.2 Optimal generalization error with side information: Proof of Proposition 2 . . . . . . . . . . . 37 Appendix C Proof of Proposition 4 37 C.1 Proof of (114) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 C.2 Proof that An vanishes as n → ∞ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 Appendix D Approximation 41 D.1 Relaxing the hypotheses on P0 and Φ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 D.2 Relaxing the hypotheses on ϕ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 Appendix E A sup-inf formula 45 Appendix F Concentration of free entropy and overlaps 48 F.1 Concentration of the free entropy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 F.2 Concentration of the overlap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 1 Introduction Modern statistical analysis and signal processing require solving very high-dimensional estimation problems with a very large number of parameters. This paradigm arises in problems as diverse as learning with neural networks [54] and regression problems [22] or compressed sensing in signal processing [24, 30]. Developing algorithms up to these tasks, and understanding their limitations, has become a major challenge in computer science, machine learning and statistics. 2 In many examples, it has been empirically observed that both the inference and learning tasks appear to have intrinsic limitations when the available data becomes too scarce or too noisy. In some cases these apparent thresholds are related to information-theoretic phenomena: There is simply not enough information in the dataset. This is the case, as famously discussed by Shannon in his seminal paper on communication theory [74], for the task of reconstructing a noisy signal when the noise is beyond the so-called Shannon capacity of the communication channel. In many situations, including communications, there also seem to exist jumps in the computational hardness, beyond which the most sophisticated known algorithms take exponential time to solve the task: In this case the problem has become too complicated to be solved efficiently. A substantial amount of work suggests that one can understand and locate these fundamental barriers in a range of statistical models by thinking of them as phase transitions in the sense of physics. In fact, over the last three decades or so, a large body of interdisciplinary work in the statistical physics community has been applied to such problems [32,34,35,59,60,65,73,81,84] considering random instances, generated by given statistical models, and then locating these phase transitions. Such models are in fact being widely used in fields as diverse as (without any pretension of exhaustivity) statistical learning [3,17,28,33,38], compressed sensing and signal processing [9, 11, 21, 29, 31, 55, 56, 62, 70, 84], communication theory [6, 12, 15, 41, 77], community detection in networks [2, 23, 27, 51], combinatorial optimization problems [7, 50, 59] or to model the behavior of neurons or neural nets [4, 5, 73, 81]. Many of these works, especially in the context of compressed sensing and machine learning, relied however on non-rigorous methods, using instead powerful heuristics like the replica and cavity approaches [60]. In the present contribution we leverage on these pioneering works and provide instead rigorous asymptotic predictions in the case of generalized linear estimation models [64]. This includes a range of statistical models of interest in many scientific fields such as random linear estimation in statistics, the teacher-student singlelayer perceptron problem, probit classification or quantized compressed sensing. For all these estimation and learning problems our results completely vindicate the physics results —closing in some cases conjectures open since almost three decades [16, 36, 42]— and considerably extend them. We also establish the value of the generalization error after an optimal learning, which gives a bound on how accurately any algorithm is able to predict outcome values for previously unseen data. We compare the optimal results with the algorithmic ones provided by message-passing algorithms [31,70, 84] and observe that, while optimal performances are often thought to be intractable, in the present setting they can actually be obtained using a polynomial-time scheme for a large set of parameters. There exists, however, an interesting region of parameters where all so far known algorithms fail to provide a satisfactory answer to the estimation and learning problems, while it is nevertheless information-theoretically possible to do so. In this case there is a significant gap between what currently known polynomial algorithms can do and what should be expected from the information-theoretic point of view. Finally, our proof technique has an interest on its own. It exploits a powerful new technique called the adaptive1 interpolation method [13] that is applicable to many other open problems in statistical estimation. We informally summarise our main contributions here: • We consider generalized linear estimation models where, given an unknown signal vector X∗ , one is  given the measurement vector Y = ϕ √1n ΦX∗ , with Φ a known random matrix with i.i.d. entries of zero mean, and where ϕ (that can be probabilistic) acts componentwise. • Our first main result is the rigorous determination of the expression of the (conditional) entropy H(Y|Φ) of the observation variable, a quantity often called “the averaged free energy” in the statistical physics literature, in the “high-dimensional regime” where the signal dimensionality n as well as the number of In [13] the method involves a discrete time stochastic process and is called “stochastic interpolation method.” For dense graphical problems one can easily take a continuum limit in which the stochastic process does not appear explicitly and the method is better called “adaptive interpolation method.” 1 3 observations m are jointly growing such that m/n → α > 0. As we shall see, many statistical quantities of interest, such as the mutual information between the observation and the unknown signal or the Bayes-optimal generalization error, can be computed from this expression. We provide the proof of this expression —which is our main technical contribution— in the last section. Only the simple linear case was known rigorously so far [10, 14, 71], whereas including the non-linearity is an absolutely key element towards building more powerful multilayer neural networks. In fact, our results cover a number of cases discussed in the literature, often anticipated by statistical physics techniques, and allow to rigorously prove many predictions obtained by the heuristic replica method. The expression for the entropy was first famously conjectured in 1989 in [36] for the particular case of ϕ(x) = sgn(x), a work that is at the basis of many significant developments. The generic formula was also recently conjectured on the same heuristic basis [84]. Our proof yields a spectacular confirmation of the cavity and replica methods. • We demonstrate (with the technical assumption of the presence of small side-information, which is equivalent to the presence of a small vanishing magnetic field in physics) the formula for the minimum mean-square-error (MMSE) for the reconstruction of the unknown signal in the generalized linear estimation model. • We also compute (under the same technivcal assumption) the Bayes-optimal generalization error in the context of a supervised learning task of a rule used by the model (the so-called teacher-student setting). This estimator is optimal in the sense that it minimizes the label (the value of the output of ϕ) mean-square-error among all possible student estimators. Again, this formula was anticipated with the heuristic cavity and replica methods, and was proposed, for the restricted case ϕ(x) = sgn(x) (the so-called perceptron problem), in pioneering works in the statistical physics community [42, 66, 73]. • While these results are information-theoretic, we also consider the performance of a well-known algorithm to solve random instances of generalized linear estimation problems, called generalized approximate message-passing (GAMP [31, 70, 84]). This algorithm, which also originated from statistical physics [5, 46, 58, 78], is expected to be particularly powerful on these random instances, as proven for instance for compressed sensing [14, 31, 52, 79]. Indeed we show that, for a large set of problems and a large region of parameters, GAMP yields an optimal generalization error. There exists, however, a region of parameters where GAMP does not reach the optimal results. It remains a challenging open problem whether a polynomial algorithm that outperforms GAMP in this region exists. • Finally, we study in depth the situation for many given choices of the function ϕ, and identify sharp phase transitions and novel phase diagrams. By locating these transitions we clarify the difficulties and challenges in solving complex non-linear high-dimensional statistical problems in many modelsituations, and characterize these problems in terms of optimal information-theoretical reconstruction. 2 Setting and main results 2.1 Generalized linear estimation: Problem statement We now give a generic description of the observation model. Note that we describe here an estimation (or inference) problem. In the title of the paper, we refer to generalized linear models. This is a very general setting that will allow us to consider supervised learning problems (see Sec. 3). Precise hypotheses are given below in Sec. 2.3. 4 Let n, m ∈ N∗ . Let P0 be a probability distribution over R and let (Xi∗ )ni=1 i.i.d. ∼ P0 be the components i.i.d. ∗ ∗ of a signal vector X (this is also denoted X ∼ P0 ). We fix a function ϕ : R × RkA → R and consider i.i.d. kA (Aµ )m µ=1 ∼ PA , where PA is a probability distribution over R , kA ∈ N. We acquire m measurements through  √  1 Yµ = ϕ √ [ΦX∗ ]µ , Aµ + ∆Zµ , n (1) 1 ≤ µ ≤ m, i.i.d. where (Zµ )m µ=1 ∼ N (0, 1) is an additive Gaussian noise, ∆ > 0, and Φ is a m × n measurement matrix with i.i.d. Φµi ∼ N (0, 1) entries (this hypothesis will actually be relaxed, see Sec. 2.3). The estimation problem is to recover X∗ from the knowledge of Y = (Yµ )m of the random µ=1 , ϕ, Φ, ∆, P0 and PA (the realization Pn ∗ stream A itself, if present in the model, is unknown). We use the notation [ΦX ]µ = i=1 Φµi Xi∗ . When ϕ(x, A) = ϕ(x) = x we have a random linear estimation problem, whereas if, say, ϕ(x) = sgn(x) we have a noisy single layer perceptron. Sec. 3 discusses various examples related to non-linear estimation and supervised learning. It is also fruitful to think of the measurements as the outputs of a “channel”,   1 Yµ ∼ Pout · √ [ΦX∗ ]µ n (2) where the transition density, with respect to (w.r.t.) Lebesgue’s measure, is Z  1 1 2 Pout y x = √ dPA (a)e− 2∆ (y−ϕ(x,a)) . 2π∆ (3) Our hypotheses ensure that this is a well defined density. In fact (3) is sometimes called a “random function representation” of a transition kernel. Our analysis uses both representations (1) and (2). Throughout this paper we often adopt the language of statistical mechanics. In particular the random variables Y (and also Φ, X∗ , A, Z) are called quenched variables because once the measurements are acquired they have a “fixed realization.” An expectation taken w.r.t. all quenched random variables appearing in an expression will simply be denoted by E without subscript. Subscripts are only used when the expectation carries over a subset of random variables appearing in an expression or when some confusion could arise. A fundamental role is played by the joint posterior distribution of (the signal) x and of (the random stream) a given the quenched measurements Y (recall that X∗ , A and Z are unknown). The prior over the signal is Q Q denoted dP0 (x) = ni=1 dP0 (xi ), and similarly dPA (a) = m µ=1 dPA (aµ ). According to the Bayes formula this joint posterior is given by m dP (x, a|Y, Φ) = Y 1 1 − 1 √ dP0 (x)dPA (a) e 2∆ Z(Y, Φ) 2π∆ µ=1 2 Yµ −ϕ( √1n [Φx]µ ,aµ ) , (4) where the partition function (the normalization factor) is defined as Z Z(Y, Φ) := m Y 1 − 1 √ dP0 (x)dPA (a) e 2∆ 2π∆ µ=1 5 2 Yµ −ϕ( √1n [Φx]µ ,aµ ) . (5) Marginalizing (4) w.r.t. a yields the posterior of x, namely 1 dP0 (x)e−H(x;Y,Φ) , Z(Y, Φ) Z Z(Y, Φ) = dP0 (x)e−H(x;Y,Φ) , dP (x|Y, Φ) = (6) (7) where the Hamiltonian is defined as H(x; Y, Φ) := − m X   1 ln Pout Yµ √ [Φx]µ . n µ=1 (8) From the point of view of statistical mechanics (6) is a Gibbs distribution and the integration over dP0 (x) in the partition function is best thought as a “sum over annealed or fluctuating degrees of freedom” (note that in the representation (5), (aµ )m µ=1 also play the role of annealed variables). Let us introduce a standard statistical mechanics notation for the expectation w.r.t. the joint posterior (4), the so called Gibbs bracket h−i defined as Z hg(x, a)i := dP (x, a|Y, Φ)g(x, a) (9) for any continuous bounded function g. The main quantity of interest here is the associated averaged free entropy (or minus the averaged free energy) fn := 1 E ln Z(Y, Φ) . n (10) It is perhaps useful to stress that Z(Y, Φ) is nothing else than the density of Y conditioned on Φ so we have the explicit representation (used later on) Z 1 fn = EΦ dYZ(Y, Φ) ln Z(Y, Φ) n Z Z 1 ∗ (11) = EΦ dYdP0 (X∗ )e−H(X ;Y,Φ) ln dP0 (x) e−H(x;Y,Φ) , n Q where dY = m µ=1 dYµ . Thus fn is minus the conditional entropy −H(Y|Φ)/n of the measurements. One of the main contributions of this paper is the derivation, thanks to the adaptive interpolation method, of the thermodynamic limit limn→∞ fn in the “high-dimensional regime”, namely when n, m → ∞ while m/n → α > 0 (α is sometimes referred to as the “measurement rate” in compressed sensing terminology). 2.2 Two scalar inference channels An important role in our proof of the asymptotic expression of the free entropy is played by simple scalar inference channels. As we will see, the free entropy is expressed in terms of the free entropy of these channels. This “decoupling property” results from the mean-field approach in statistical physics, used through in the replica method to perform a formal calculation of the free entropy of the model [59,60]. Let us now introduce these two scalar denoising models. The first one is an additive Gaussian channel. Let r ≥ 0, which plays the role of a signal-to-noise ratio (snr). Suppose that X0 ∼ P0 and that we observe Y0 = √ r X 0 + Z0 , (12) where Z0 ∼ N (0, 1) independently of X0 . Consider the inference problem consisting of retrieving X0 from 6 the observations Y0 . The associated posterior distribution is √ 2 dP0 (x)e r Y0 x−rx /2 √ . dP (x|Y0 ) = R dP0 (x)e r Y0 x−rx2 /2 (13) In this expression all the x-independent terms have been simplified between the numerator and the normalization. The free entropy associated with this channel is just the expectation of the logarithm of the normalization factor Z √ 2 ψP0 (r) := E ln dP0 (x)e r Y0 x−rx /2 . (14) The basic properties of ψP0 are presented in Appendix A.2.1. The second scalar channel that appears naturally in the problem is linked to the transition kernel Pout through the following inference model. Suppose that V, W ∗ i.i.d. ∼ N (0, 1) where V is known while the inference ∗ problem is to recover the unknown W from the following observation  √ √ Ye0 ∼ Pout · | q V + ρ − q W ∗ , (15) where ρ > 0, q ∈ [0, ρ] and Pout is the transition density defined in (3). The free entropy for this model, again related to the normalization factor of the posterior dP (w|Ye0 , V ), is Z  √ √ (16) ΨPout (q; ρ) = ΨPout (q) := E ln DwPout Ye0 | q V + ρ − q w , 2 where Dw = dw(2π)−1/2 e−w /2 is the standard Gaussian measure. We prove in Appendix A.2.2 that this function is convex, differentiable and non-decreasing w.r.t. its first argument. √ √ √ Recall that we consider here Pout to be of the form (3), so that Ye0 = ϕ( q V + ρ − q W ∗ , A) + ∆Z, where A ∼ PA and Z ∼ N (0, 1), independently of any other random variable. In the sequel, the joint posterior distribution of (W ∗ , A) given (V, Ye0 ) will be particularly useful, so we define the Gibbs bracket for the scalar channel (15) by: 1 e− 2∆ Z hg(w, a)isc = DwdPA (a) R 2 √ √ Ye0 −ϕ( q V + ρ−q w,a) 2 √ √ 1 − 2∆ Ye0 −ϕ( q V + ρ−q w,a) g(w, a) , (17) DwdPA (a)e for any continuous bounded function g. 2.3 Replica-symmetric formula and mutual information Let us now introduce our first main result, a single-letter replica-symmetric formula for the asymptotic free entropy of model (1), (2). The result holds under the following rather general hypotheses. We will consider two cases: The case where the entries of Φ are i.i.d. standard Gaussian random variables and the case of general distributions. This leads to two sets of hypotheses. (h1) The prior distribution P0 admits a finite second moment and has at least two points in its support. (h2) There exists γ > 0 such that the sequence (E[|ϕ( √1n [ΦX∗ ]1 , A1 )|2+γ ])n≥1 is bounded. (h3) (Φµi ) i.i.d. ∼ N (0, 1). In the non-Gaussian case, the hypothesis (h3) has to be replaced by the following hypotheses: (h3.a) The prior distribution P0 admits a finite third moment. 7 (h3.b) The random variables (Φµi ) are independent with zero mean, unit variance and finite third moment that is bounded with n. (h3.c) For almost-all values of a ∈ RkA (w.r.t. PA ), the function x 7→ ϕ(x, a) is continuous almost everywhere. Let us define the replica-symmetric potential (or just potential). Call ρ := E[(X ∗ )2 ] where X ∗ ∼ P0 . Then the potential is fRS (q, r; ρ) = fRS (q, r) := ψP0 (r) + αΨPout (q; ρ) − rq . 2 (18) We define also fRS (ρ, +∞) = limr→∞ fRS (ρ, r). From now on denote ψP0 0 (r) and Ψ0Pout (q) = Ψ0Pout (q; ρ) the derivatives of ψP0 (r) and ΨPout (q; ρ) w.r.t. their first argument. We need also to define the set of the critical points of fRS : ( ) q = 2ψP0 0 (r) Γ := (q, r) ∈ [0, ρ] × (R+ ∪ {+∞}) , (19) r = 2αΨ0Pout (q; ρ) where, with a slight abuse of notation, we define ψP0 0 (+∞) = limr→∞ ψP0 0 (r) and Ψ0Pout (ρ) = limq→ρ Ψ0Pout (q). These limits are well defined by convexity of ψP0 and ΨPout . The elements of Γ are called “fixed points of the state evolution”. The main theorem of this paper is Theorem 1 (Replica-symmetric formula). Suppose that hypotheses (h1) and (h2) hold. Suppose that either (h3) or (h3.a)-(h3.b)-(h3.c) hold. Then, for the generalized linear estimation model (1), (2) the thermodynamic limit of the free entropy (10) verifies f∞ := lim fn = sup inf fRS (q, r) = sup fRS (q, r) . n→∞ q∈[0,ρ] r≥0 (20) (q,r)∈Γ Moreover, the “sup inf” and the supremum over Γ in (20) are achieved over the same couples. An immediate corollary of Theorem 1 is the limiting expression of the mutual information between the observations and the hidden variables. Corollary 1 (Single-letter formula for the mutual information). The thermodynamic limit of the mutual information for model (1), (2) between the observations and the hidden variables verifies in := 1 α I(X∗ , A; Y |Φ) −−−→ i∞ := −f∞ − (1 + ln(2π∆)) . n→∞ n 2 (21) Proof. This follows from a simple calculation: 1 P (Y, X∗ , A|Φ) 1 1 I(X∗ , A; Y|Φ) = E ln = − E ln P (Y|Φ) + E ln P (Y|X∗ , A, Φ) ∗ n P (Y|Φ)P (X , A|Φ) n n m X 1 m = −fn − (Yµ − ϕ([ΦX∗ ]µ , Aµ ))2 − E ln(2π∆) 2n∆ 2n µ=1 m m = −fn − − ln(2π∆) . 2n 2n 2.4 (22) The case of discrete channels A natural question to ask now is: Can we extend the previous results without the Gaussian noise in (1)? This question seems to be non-trivial for various reasons. First, without the “regularizing” Gaussian noise, the 8 transition kernel Pout may not have a density w.r.t. Lebesgue’s measure: How should we define the “entropylike” quantities that we study? Second, even in the situation where the transition kernel admits a density, it seems not totally obvious to justify the ∆ → 0 limit in Theorem 1. This is mostly due to the fact that Shannon’s entropy is not continuous w.r.t. the weak convergence, see for instance [69]. The results of [69] provide sufficient conditions that the densities should verify in order to have convergence of the entropies. So it should be possible to take the ∆ → 0 limit in Theorem 1 at the cost of additional technical assumptions, but we prefer for simplicity to only consider discrete transition kernels. Therefore, in this section we assume that ϕ takes its values in a finite set. We suppose also that hypotheses (h1) and (h2) hold, and that either (h3) or (h3.a)-(h3.b)-(h3.c) hold. We define ξn := 1 E ln n Z dP0 (x)dPA (a) m     1  Y 1 δ ϕ √ [ΦX∗ ]µ , Aµ − ϕ √ [Φx]µ , aµ , n n µ=1 (23) and for q ∈ [0, ρ], Z Ψϕ (q) = E ln  √ √ √ √ dPA (a)Dw δ ϕ( q V + ρ − q W, A) − ϕ( q V + ρ − q w, a) , (24) where V, W i.i.d. ∼ N (0, 1) and A ∼ PA are independent random variables. Theorem 2 (Replica-symmetric formula for discrete channels). Suppose that hypotheses (h1) and (h2) hold. Suppose that either (h3) or (h3.a)-(h3.b)-(h3.c) hold. Then, for the generalized linear estimation model (1) with ∆ = 0 and an output function ϕ taking values in a finite set, the thermodynamic limit of the free entropy (23) verifies n rq o . (25) ξn −−−→ sup inf ψP0 (r) + αΨϕ (q) − n→∞ q∈[0,ρ] r≥0 2 The proof of Theorem 2 is presented in Appendix A.3. As an application of Theorem 2 we can compute the free energy of the “planted perceptron” on the hypercube and the sphere. This perceptron model has already been studied in physics [36] and more recently in statistics, where it is known as “one-bit compressed sensing” [21, 83]. The limit of the free entropy follows from an application of Theorem 2 with ϕ(x) = sgn(x) and P0 = 21 δ−1 + 12 δ1 (for the hypercube) or P0 = N (0, 1) (for the sphere). For µ ∈ {1, . . . , m}, we define n o Sµ = x ∈ Rn sgn(x · Φµ ) = sgn(X∗ · Φµ ) . (26) We will use the notation N (x) = P(Z ≤ x) for Z ∼ N (0, 1). Let Sn be the unit sphere in Rn and µn the uniform measure on Sn . Corollary 2 (Free entropy of the planted perceptron). Let Z, V ∼ N (0, 1). m  \  1 E ln # Sµ ∩ {−1, 1}n n µ=1 n h  √q V   √q V i r(q + 1) o √ √ ln N √ − −−−→ ln(2) + sup inf E ln cosh( rZ + r) + 2αE N , (27) n→∞ 2 1−q 1−q q∈[0,1) r≥0 m \  n1 h  √q V   √q V i q o 1 E ln µn Sµ ∩ Sn −−−→ sup ln(1 − q) + 2αE N √ ln N √ + . (28) n→∞ q∈[0,1) 2 n 2 1 − q 1 − q µ=1 9 2.5 Optimality of the generalized approximate message-passing algorithm While the main results presented until now are information-theoretic, our next one concerns the performance of a popular algorithm to solve random instances of generalized linear problems, called generalized approximate message-passing (GAMP). We shall not re-derive its properties here, and instead refer to the original papers for details. This approach has a long history, especially in statistical physics [5, 46, 58, 78], error correcting codes [72], and graphical models [80]. For a modern derivation in the context of linear models, see [31, 52, 79]. The case of generalized linear models was discussed by Rangan in [70], and has been used for classification purpose in [85]. We first need to define two so-called threshold functions that are associated to the two scalar channels (12) and (15). The first one is the posterior mean of the signal in channel (12) with signal-to-noise ratio r: gP0 (y, r) = E[X0 |Y0 = y] . (29) The second one is the posterior mean of W ∗ in channel (15) with “noise level” η = ρ − q: √ gPout (e y , v, η) = E[W ∗ |Ye0 = ye, q V = v] . (30) These functions act componentwise when applied to vectors. Given initial estimates (b x0 , v0 ) for the means and variances of the elements of the signal vector X∗ , GAMP takes as input the observation vector Y and then iterates the following equations with initialization gµ0 = 0 for all µ = 1, . . . , m (we denote by u the average over all the components of the vector u and Φ| is the transpose of the matrix Φ): From t = 1 until convergence,   V t = vt    t = Φb t−1 /√n − V t gt−1  ω x    t t t   ∀ µ = 1, . . . m  gµ = gPout (Yµ , ωµ , V ) t 2 t t (31) λ = α gPout (Y, ω , V )  √  t t−1 t | t  b R = x +λ Φ g / n    t t t  x b = g (R ∀ i = 1, . . . n  P0 i i, λ )    vt = (λt )−1 ∂ g (R, λt )| ∀ i = 1, . . . n R P0 R=Rit i One of the strongest asset of GAMP is that its performance can be tracked rigorously in the limit n, m → ∞ via a procedure known as state evolution (SE), see [18, 19] for the linear case, and [45, 70] for the generalized one. In our notations, state evolution tracks the asymptotic value of the overlap between the true hidden bt defined as q t = limn→∞ X∗ · x bt /n (that is related to the asymptotic value X∗ and its estimate by GAMP x bt by E t = ρ − q t , where recall that ρ = E[(X ∗ )2 ] with mean-square error E t between X∗ and its estimate x ∗ X ∼ P0 ) via: ( q t+1 rt = 2ψP0 0 (rt ) , = 2αΨ0Pout (q t ; ρ) . (32) From Theorem 1 we realize that the fixed points of these equations correspond to the critical points of the asymptotic conditional entropy in (20). In fact, in the replica heuristic, the optimizer q ∗ of the potential is conjectured to give the optimal value of the overlap, a fact that was proven for the linear channel [10, 14]. If the minimizer of (20) is unique, or is attractive within the GAMP dynamics, then q t converges to q ∗ when t → +∞. Perhaps more surprisingly, one can use GAMP in the teacher-student scenario (that we precisely describe √ in Sec. 3.1) in order to provide an estimation of a new output Cnew = ϕ(Φnew ·X∗ / n, Anew ), where Φnew is 10 bt is the GAMP estimate of the expectation a new row of the matrix and Anew ∼ PA a new random source. As x of X∗ , with estimated variance vt , the natural heuristic is to consider for the posterior probability distribution √ √ bt / n and variance V t = E t = ρ − q t of the random variable Φnew · X∗ / n a Gaussian with mean Φnew · x (the fact that the variance and MSE are equal follows from the Nishimori identity of Proposition 9 applied to GAMP, see e.g. [84]). This allows to estimate the posterior mean of the output, which leads the GAMP prediction (recall the Pout definition (3)): b GAMP,t = C Z 1 e dy dw y Pout (y|w) p 2π(ρ − q t ) 1 − 2(ρ−q t) √1 Φnew ·b xt −w n 2 . (33) We show in Sec. 3.3.2 that this leads to a GAMP generalization error given by    GAMP,t b GAMP,t 2 := lim E Cnew − C Egen n→∞ p  √    p 2  = EV,A ϕ( ρ V, A)2 − EV EW,A ϕ( q t V + ρ − q t W, A) , (34) where V, W i.i.d. ∼ N (0, 1) and A ∼ PA . We will see in Sec. 3.2 that this formula matches the one for the Bayes-optimal generalization error, see (40), up to the fact that instead of q ∗ (a maximizer obtained from the replica formula (20)) appearing in the optimal error formula, here it is q t which appears. Thus clearly, when q t converges to q ∗ (we shall see that this is the case in many situations in the examples of Sec. 4) this yields a very interesting and non trivial result: GAMP achieves the Bayes-optimal generalization error in a plethora of models (a task again often believed to be intractable) and this for large sets of parameters. 3 Optimal errors in supervised learning 3.1 Teacher-student scenario Consider the following teacher-student scenario (also called planted model). We voluntarily employ terms coming from machine learning, instead of the signal processing terminology used in the previous sections. First the teacher randomly generates a classifier X∗ ∈ Rn (the signal in the estimation problem) with i.i.d. n X∗ i.i.d. ∼ P0 , an ensemble of m = αn patterns (row-vectors) Φµ ∈ R for µ = 1, . . . , m such that Φµ ∼ i.i.d. N (0, In ), and a stream A = (Aµ )m µ=1 ∼ PA . The teacher chooses a model ϕ(x, A). For deterministic models A is simply absent. Finally the teacher associates to each pattern a label Cµ ∈ R selected by the √ classifier, namely Cµ = ϕ(Φµ · X∗ / n, Aµ ) for µ = 1, . . . , m. Stacking the rows (Φµ )m µ=1 in a m × n m matrix Φ and denoting the vector of labels C = (Cµ )µ=1 , then the labels, patterns, source of randomness and classifier verify  1  C = ϕ √ ΦX∗ , A , n (35) where it is understood that ϕ acts in componentwise fashion on vectors. The student is given the distributions P0 , PA and the function ϕ and his task is to learn the classifier X∗ from the pattern-label pairs (Φµ , Cµ )m µ=1 . ∗ How does one use this estimation to perform prediction? The teacher, still using the same X , will create a new sample (and thus a new line of the matrix, or pattern, Φnew and a new random Anew ). The teacher √ will first compute the new value of the projection of X∗ , that we denote znew = Φnew · X∗ / n, and then generate the new random label Cnew = ϕ(znew , Anew ). He is now ready to evaluate the student generalization performance. 11 3.2 Generalization error An important quantity is the generalization error (or prediction error) which measures the performance of the b new , C, Φ) the estimator used by the student (which is thus a measurable function student. If we denote C(Φ of the observations), the generalization error is defined as h 2 i b = E Cnew − C(Φ b new , C, Φ) Egen (C) . (36) The optimal generalization error is then defined as the minimum of Egen over all estimators: h D  E2 i opt b = E Cnew − ϕ √1 Φnew · x, a := min Egen (C) Egen . n b C (37) where x is sampled according to the posterior distribution P (x = X∗ |C, Φ) and a ∼ PA . h−i denotes the joint expectation w.r.t. (x, a). 3.3 Computing the generalization error In order to express the limit of the generalization error, we introduce the following function:    √ 2   √ √ E : q 7→ E ϕ( ρ V, A)2 − E EW,A ϕ( q V + ρ − q W, A) (38) where V, W i.i.d. ∼ N (0, 1), A ∼ PA are independent random variables and EW,A denotes the expectation w.r.t. W and A only. We recall ρ = E[(X ∗ )2 ]. 3.3.1 Optimal generalization error opt The computation of the limit of Egen is not trivial and requires a good knowledge of the posterior distribution. In Sec. 3.4.1 we will show that under a small perturbation of the model (given some side information), one can compute it rigorously. Here we only show that if the overlap between the planted solution X∗ and a sample (a replica) x from the posterior distribution converges to some number q, then the optimal generalization error converges to E(q). Proposition 1. Assume that the overlap n1 x · X∗ converges in probability to some number 0 ≤ q < ρ. Then opt Egen −−−→ E(q) . n→∞ (39) The proof of Proposition 1 is presented in Appendix A.4. This result by itself does not tell us how to compute q. But in view of Proposition 2 we expect that q = q ∗ the maximizer of (20). Conjecture 1 (Optimal generalization error). For almost all ∆ > 0 we have opt Egen −−−→ E(q ∗ ) , n→∞ (40) where q ∗ is a maximizer of (20). The optimal generalization error is independent of the random function representation as long as both ϕ √ R R and PA are known. EX dY Y k Pout (Y |X) = EX,a dY Y k exp{−(Y − ϕ(X, a))2 /(2∆)}/ 2π∆ implies that the error (40) can be re-expressed equivalently as a function of the two first moments of the transition probability Pout , namely (again, q ∗ is a maximizer of (20)) Z h hZ i2 i p p √ opt −−−→ EV dY Y 2 Pout (Y | ρ V ) − EV Ew dY Y Pout (Y | q ∗ V + ρ − q ∗ w) − ∆ . (41) Egen n→∞ 12 3.3.2 Generalization error of the generalized approximate message-passing algorithm We now turn our attention to the generalization performance of the GAMP algorithm of Sec. 2.5. The following claim is from [70], where it is stated as a claim because some steps of the proof are missing. The paper [45] affirms in its abstract to prove the claim of [70], but without further details. For these reasons, we believe that the claim holds, however we prefer to state it here as a claim (instead of a theorem). Claim 1 ( [70]). We have almost surely for all t ∈ N, lim n→∞ 1 t 1 t 2 b · X∗ = lim kb x x k = qt . n→∞ n n (42) Provided that Claim 1 holds, we can deduce the generalization error of GAMP. b GAMP,t is given by (33). Then Claim 2 (GAMP generalization error). Recall that C    GAMP,t b GAMP,t 2 = E(q t ) . := lim E Cnew − C Egen n→∞ (43) Claim 2 is proved following the same proof strategy as for Proposition 1, see Appendix A.4. 3.3.3 Optimal denoising error Another interesting error measure to study is the following “denoising error”. Assume that the observations  are noisy, as in (1). The goal here is to denoise the observations Yµ and estimate the signal ϕ √1n [ΦX∗ ]µ , Aµ . The minimum denoising error (in L2 sense) is actually a simple corollary from the replica-symmetric formula of Theorem 1 and follows from a so-called “I-MMSE relation”, see [40]. Corollary 3 (Limit of the optimal denoising error). For almost every ∆ > 0, for any optimal couple (q ∗ , r∗ ) of (20) we have  D  1 E 2 i 1 h  1 E ϕ √ ΦX∗ , A − ϕ √ Φx, a n→∞ m n n p p     √ = E ϕ( ρ V, A)2 − E ϕ( q ∗ V + ρ − q ∗ w, a)i2sc , lim (44) where the Gibbs brackets are defined by (9) and (17) and V ∼ N (0, 1), (w, a) ∼ h−isc . The proof of Corollary 3 is presented in Appendix B.1. 3.4 3.4.1 Computing the optimal errors with (small) side information Optimal generalization error with side information As presented in Sec. 3.3.1, the computation of the optimal generalization error requires a good knowledge of the posterior distribution, typically that the overlap concentrates around a deterministic value. Proving this kind of result seems to be highly non-trivial. An easier strategy would be to proceed as in the previous section by using “I-MMSE relations”: Differentiating the free entropy fn w.r.t. the model parameters allows to access interesting quantities. However, in order to obtain an expression for the generalization error, we need to assume that the new “test label” Cnew is also observed by the student in the scenario of Sec. 3.1 but with a large amount of noise, so that we can differentiate fn w.r.t. this noise. For this reason we introduce the following “train-test” observation model. The set of rows of Φ and labels are divided into two sets by the teacher: The training set S tr of size βm, β ∈ [0, 1], that will be used by the student in order to learn the classifier, and the test set S te of size (1 − β)m that 13 will be used by the teacher in order to evaluate the performance of the student. For the training the √ set both βm tr tr patterns and associated noisy labels are given to the student, namely S = {(Yµ = Cµ + Zµ ∆ ; Φµ )}µ=1 where Zµ ∼ N (0, 1) (recall the labels are given by (35)). Here ∆tr is strictly positive (but typically small) and known by the student who can thus optimally tune its “confidence” in the training labels during the training/learning stage. For the test set, the previously unseen patterns to classify are given to the student √ te te te but the labels are (almost) not, namely S = {(Yµ = Cµ + Zµ ∆ ; Φµ )}m µ=βm+1 where ∆ is typically te very large. We are particularly interested in the case ∆ → ∞ when the student has no information about the labels of the test set but for the aforementioned technical reasons we will have to work with very large, but finite, ∆te . Define ∆µ = ∆tr if µ ≤ βm, ∆µ = ∆te else. Then the inference of the classifier X∗ from the noisy p labels Yµ = Cµ + Zµ ∆µ is a slight extension of model (1): This inference problem is nothing else than te = (Φ )m a supervised learning of the classifier by the student. Define Cte = (Cµ )m µ µ=βm+1 µ=βm+1 and Φ as the m(1 − β)-dimensional vector of labels and the m(1 − β) × n matrix, respectively, both restricted to te the test set and similarly for Ate = (Aµ )m µ=βm+1 . Then the optimal generalization error at finite ∆ in this “train-test” observation model is h D  1 E 2 i 1 side := Egen E Cte − ϕ √ Φte x, ate (1 − β)m n  D  1 E 2 i h  1 1 . (45) E ϕ √ Φte X∗ , Ate − ϕ √ Φte x, ate = (1 − β)m n n Here the Gibbs bracket h−i is associated to the joint posterior (4) but with ∆ replaced by ∆µ in order to take into account that the noise varies in the training and test sets. Moreover ate is the restriction of a to its components belonging to the test set, namely ate = (aµ )m µ=βm+1 . By a straightforward extension of the interpolation method presented in Sec. 5 one can generalize Theorem 1 to take into account that the noise variance ∆µ differs in the training and test sets. This leads to an asymptotic free entropy rigorously given by n rq o ts ts tr (q; ρ) + α(1 − β)ΨP te (q; ρ) − f∞ = sup inf fRS (q, r) = sup inf ψP0 (r) + αβΨPout . (46) out 2 q∈[0,ρ] r≥0 q∈[0,ρ] r≥0 tr and ∆ = ∆te respectively. tr and ΨP te are obtained from (16) using Pout given by (3) with ∆ = ∆ Here ΨPout out ts (inside Note that in the limit ∆te → ∞ (which means that the student has no access to the test set labels), fRS the brackets in (46)) collapses on fRS given by (18) up to a trivial additive constant which corresponds to 0 te and a rescaling of the measurement rate α = αβ. ΨPout Differentiating the free entropy w.r.t. ∆te , we deduce the limit of this optimal generalization error with side information: Proposition 2 (Optimal generalization error with side information). For almost every ∆te > 0 we have p p     √ side lim Egen = E ϕ( ρ V, A)2 − E ϕ( q ∗ (∆te ) V + ρ − q ∗ (∆te ) w, a)i2sc,∆te , n→∞ (47) where q ∗ (∆te ) is a maximizer of (46) and where h−isc,∆te is the Gibbs bracket associated with the posterior distribution of the second scalar channel (17) with ∆ = ∆te . The proof of Proposition 2 is presented in Appendix B.2. A natural continuation would be to show that for almost every value of ∆tr , q ∗ (∆te ) converges, as ∆te → ∞, to a maximizer q ∗ of the replica formula (20) from Theorem 1. Using theorems for limit-expectations permutation, it should not be difficult to show then side that lim lim Egen = E(q ∗ ). Then, provided we can justify the following permutation of limits we would ∆te →∞ n→∞ 14 obtain lim E opt n→∞ gen lim E side n→∞ ∆te →∞ gen = lim side lim Egen = E(q ∗ ) . = lim (48) ∆te →∞ n→∞ We conjecture this formula to be true, but we were however unable to provide the technical justifications mentioned above. 3.4.2 Optimal reconstruction error with side information Analogously to the previous section, one can add small side information to our statistical model (1) by supposing that one observes also Yi0 = Xi∗ + √ ∆side Zi0 , (49) 1 ≤ i ≤ n, side > 0 quantifies the noise level of the where (Zi0 )ni=1 i.i.d. ∼ N (0, 1) independently of everything else. Here ∆ side information and will typically be very large. The proof of Theorem 1 can be directly adapted to obtain that the new free energy converges to n  side side f∞ = sup inf fRS (q, r) = sup inf ψP0 r + q∈[0,ρ] r≥0 q∈[0,ρ] r≥0 1  ∆side + αΨPout (q; ρ) − rq o . 2 (50) By then taking the derivative w.r.t. (∆side )−1 , which is again a I-MMSE relation [40], one deduces the minimum mean-square-error (MMSE) for the reconstruction of X∗ : Proposition 3 (Reconstruction MMSE with side information). For almost all ∆side > 0, MMSEn := 1  ∗ 2 E X − hxi −−−→ ρ − q ∗ (∆side ), n→∞ n (51) where q ∗ (∆side ) is a maximizer of (50). 4 Application to concrete situations In this section, we show how our main results can be applied to several models of interest in fields ranging from machine learning to signal processing, and unveil several interesting new phenomena in learning of generalized linear models. For various specific cases of prior P0 and output Pout , we evaluate numerically the free entropy potential (18), its stationary points Γ and identify which of them gives the information-theoretic results, i.e. is the maximizer in (20). We also identify which of the stationary points corresponds to the result obtained asymptotically by the GAMP algorithm, i.e. the fixed point of the state evolution (32). Finally we compute the corresponding generalization error (43). We stress that in this section the results are based on numerical investigation of the resulting formulas: We do not aim at rigor that would involve precise bounds and more detailed analytical control for the corresponding integrals. 4.1 Generic observations Using the functions gPout and gP0 introduced in Sec. 2.5 we can rewrite the fixed point equations (19) as q = 2ψP0 0 (r) = E[gP0 (Y0 , r)2 ] , α √ E[gPout (Ye0 , q V, ρ − q)2 ] , r = 2αΨ0Pout (q) = ρ−q 15 (52) (53) where the expectation in (52) corresponds to the scalar channel (12) and the expectation in (53) corresponds to the second scalar channel (15). Non-informative fixed point and its stability: It is interesting to analyze under what conditions q ∗ = 0 is the optimizer of (20). Notice that q ∗ = 0 corresponds to the error on the recovery of the signal as large as it would be if we had no observations at our disposition. Theorem 1 gives that any optimal couple (q ∗ , r∗ ) of (20) should be a fixed point of the state evolution equations (52)-(53). A sufficient condition for (q, r) = (0, 0) to be a fixed point of (52)-(53) is that (a) The transition density Pout (y|z) is even in the argument z. (b) The prior P0 has zero mean. In order to see this, notice that if Pout (y|z) is even in z then from the definition (30) of the function gPout we have gPout (y, 0, ρ) = 0 and consequently from (53) we have Ψ0Pout (0) = 0. For the second point, notice that we have ψP0 0 (0) = 21 EP0 [X0 ]2 = 0. We assume now that the transition density Pout (y|z) is even in the argument z and that the prior P0 has zero mean. In order for q = 0 to be the global maximizer q ∗ of (20) or to be a relevant fixed point of the state evolution (32) (relevant in the sense that GAMP might indeed converge to it in a practical setting) we need q = 0 to be a numerically stable fixed point of the above equations (52)-(53). We therefore need to expand (52)-(53) around q = 0, and doing so, we obtain that q = 0 is stable if  2  2αΨ00Pout (0) × 2ψP00 0 (0) = αE hw2 isc − hwi2sc − 1 < 1, (54) where the expectation corresponds to the scalar channel (15) with q = 0 and the Gibbs bracket h−isc is given by (17). The expectation quantifies how the observation of Ye0 in the scalar channel (15) modifies the variance of W ∗ (which is 1 without any observation). Rewriting this condition more explicitly into a form that is convenient for numerical evaluation we get Z αρ  R 0 (y|√ρz) 2 DzzPout dy R < 1, √ DzPout (y| ρz) (55) 0 (y|ω) stands for the partial derivative where recall that Dz is a standard Gaussian measure and where Pout w.r.t. ω. We conjecture that the condition (54) (or equivalently (55) for differentiable models) delimits precisely the region where polynomial-time algorithms do not perform better than “random guessing” (see the discussion below, where we will make this stability condition explicit for several examples of symmetric output channels). Exact recovery fixed point: Another particular fixed point of (52)-(53) that we observe is the one corresponding to exact recovery q ∗ = ρ. A sufficient and necessary condition for this to be a fixed point is that limq→ρ Ψ0Pout (q) = +∞. Heuristically, this means that the integral of the Fisher information of the output channel should diverge: 2 Z −ω 0 (y|ω)2 e 2ρ Pout dydω √ = +∞ , (56) 2πρ Pout (y|ω) 0 (y|ω) denotes the partial derivative w.r.t. ω. This typically means that the channel should be where again Pout noiseless. For the Gaussian channel with noise variance ∆, the above expression equals 1/∆. For the probit √ √ channel where Pout (y|z) = erfc(−yz/ 2∆)/2 the above expression at small ∆ is proportional to 1/ ∆. Numerical stability of the exact recovery fixed point was also investigated, but we did not obtain any unified expression. The stability depends non-trivially on both the properties of the output channel, but also 16 on the properties of the prior. Below we give several examples where exact recovery either is or is not possible, or where there is a phase transition between the two regimes. 4.2 Phase diagrams of perfect learning In this section we consider deterministic (noiseless) output channels and ask: How many measurements are needed in order to perfectly recover the signal? Our crucial point is to compare with the well explored phase diagram of Bayesian (noiseless) compressed sensing in the case of the linear channel [52, 53]. As the number of samples (measurements) varies we encounter four different regimes of parameters: • The EASY phase: This is the region in the parameter space where GAMP achieves perfect reconstruction. • The IMPOSSIBLE phase: Region where perfect reconstruction is information-theoretically impossible. • The HARD phase: Region where the perfect reconstruction is information-theoretically possible, but where GAMP is unable to achieve it. However, in this region GAMP leads to a better generalization error than the one corresponding to the non-informative fixed point. It remains a challenging open question whether polynomial-time algorithms can achieve perfect reconstruction in this regime. • The HARD-RG phase: This “hard-random guess” phase corresponds to the region where perfect reconstruction is information-theoretically possible but where GAMP only achieves an error as bad as randomly guessing, given by the trivial fixed point. In this phase as well, the existence of polynomialtime exact recovery algorithms is an open question. This phase does not exist for the linear channel. Some of the codes used in this section can be consulted online on the github repository [1]. 4.2.1 The linear channel The case of exact recovery of a sparse signal after it passed trough a noiseless linear channel, i.e. ϕ(x) = x, is studied in the literature in great details, especially in the context of compressed sensing [24, 31]. For a signal with a fraction ρ of non-zero entries it is found that as soon as α > ρ, perfect reconstruction is theoretically possible, although it may remain computationally difficult. The whole field of compressed sensing builds on the realization that, using the `1 norm minimization technique, one can efficiently recover the signal for larger α values than the so-called Donoho-Tanner transition [29, 31]. In the context of the present paper, when the empirical distribution of the signal is known, one can fairly easily beat the `1 transition and reconstruct the signal up to lower values of α using the Bayesian GAMP algorithm [31, 52, 53, 70]. In this case, three different phases are present [52, 53]: i) For α < ρ, perfect reconstruction is impossible; ii) for ρ < α < αs reconstruction is possible, but not with any known polynomialcomplexity algorithm; iii) for α > αs , the so-called spinodal transition computed with state evolution, GAMP provides a polynomial-complexity algorithm able to reach perfect reconstruction. The line αs (ρ) depends on the distribution of the signal. For a Gauss-Bernoulli signal with a fraction ρ of non-zero (Gaussian) values we compare the GAMP performance to the optimal one in Fig. 1 (left and right). 4.2.2 The rectified linear unit (ReLU) channel Let us start by discussing the case of a generalized linear model with the ReLU output channel, i.e. ϕ(x) = √ max(0, x), with a signal coming from a Gauss-Bernoulli distribution P0 (x) = ρ exp(−x2 /2)dx/ 2π + (1 − ρ)δ(x) with a fraction ρ of non-zero (Gaussian) values. We are motivated by the omnipresent use of the ReLU activation function in deep learning, and explore its properties for GLMs that can be seen as a simple single layer neural network. 17 Absolute value channel, Gauss-Bernoulli X* Symmetric Door activation, width Κ, Rademacher X* 3 1.2 1 2.5 EASY EASY 1.5 IMPOSSIBLE 0 1 HARD IMPOSSIBLE 1 0.5 ρ 0.5 IMPOSSIBLE Perfect recovery Spinodal instability at q=0 Spinodal CS 0 HARD, RG 1.5 HARD HARD, RG 0.2 α=m/n 0.6 0.4 EASY 2 HARD α=m/n α=m/n 0.8 Relu activation, Gauss-Bernoulli signal 2 0.5 instability at q=0 Perfect recovery Spinodal 0 1 0 0.5 1 1.5 Κ Perfect recovery Spinodal Naive spinodal 0 2 2.5 0 0.5 ρ 1 Figure 1: Phase diagrams for several non-linear output channels showing the region where a perfect recovery is possible/hard/impossible. Left: The phase diagram for the signless output with ϕ(x) = |x| with a GaussBernoulli signal, as a function of α = m/n and the fraction of non-zero components ρ. We find that a perfect recovery is IMPOSSIBLE for α < ρ. Perfect recovery becomes possible starting from α > ρ, as for the linear channel. On the algorithmic side, GAMP is not able to perform better than a random guess as long as α < 0.5. We denote this region HARD-RG, for “not better than random guess”. For larger values, the inference using GAMP leads to better results than a purely random guess but cannot reach perfect recovery, so the problem remains HARD. GAMP can perfectly identify the hidden signal only for values of α larger than the so-called spinodal (or algorithmic threshold), when the problem becomes EASY. For comparison we also show the algorithmic transition for the linear output (the spinodal CS dashed line). Middle: Phase diagram for the door function problem, with ϕ(x) = sgn(|x| − K), for a Rademacher signal as a function of α and K. The same four regions of parameters are observed and depicted. Right: Phase diagram for the ReLU output, with ϕ(x) = max(0, x), again with the EASY, HARD and IMPOSSIBLE regions. Here it is always possible to generalize better than chance using GAMP. The so-called naive spinodal shows for comparison the algorithmic performance when using information only about the non-zero observations. Our analysis shows that a perfect generalization (and thus a perfect reconstruction of the signal as well) is possible whenever the number of samples per dimension (measurement rate) α > 2ρ, and impossible when α < 2ρ. This is very intuitive, since half of the measurements (those non-zero) are giving as much information as in the linear case, thus the factor 2. How hard is it to actually solve the problem with an efficient algorithm? The answer is given by applying the state evolution analysis to GAMP, which tells us that only for even larger values of α, beyond the spinodal transition, does GAMP reach a perfect recovery. Notice, however, that this spinodal transition occurs at a significantly lower measurement rate α than one would reach just keeping the non-zero measurements. This shows that, actually, these zero measurements contain a useful information for the algorithm. The situation is shown in the right side of Fig. 1: The zero measurements do not help information-theoretically but they, however, do help algorithmically. 4.2.3 The signless channel We now discuss the signless channel where only the absolute value of the linear mixture is observed, i.e. ϕ(x) = |x|. This case can be seen as the real-valued analog of the famous phase retrieval problem. We again consider the signal to come from a Gauss-Bernoulli distribution with a fraction ρ of non-zero (Gaussian) values. Sparse phase retrieval has been well explored in the literature in the regime where the number s of nonzeros is sub-leading in the dimension, s = O(n). This case is known to present a large algorithmic gap. While analogously to compressed sensing exact recovery is information-theoretically possible for a number of measurement O(s ln(n/s)), best known algorithms achieve it only with O(s2 / ln n) measurements [67], see also [75] and references therein for a good discussion of other related literature. This is sometimes referred 18 to as the s2 barrier. We are not aware of a study where, as in our setting, the sparsity is s = ρn and the number of measurements is αn with α = O(1). Our analysis in this regime hence sheds a new light on the hardness of the problem of recovering a sparse signal from signless measurements. Our analysis of the mutual information shows that a perfect reconstruction is information-theoretically possible as soon as α > ρ: In other words, the problem is –information-theoretically– as easy, or as hard as the compressed sensing one. This is maybe less surprising when one thinks of the following algorithm: Try all 2m choices of the possible signs for the m outputs, and solve a compressed sensing problem for each of them. Clearly, this should yields a perfect solution only in the case of the actual combination of signs. Algorithmically, however, the problem is much harder than for the linear output channel. As shown in the left side of Fig. 1, for small ρ one requires a much larger fraction α of measurements in order for GAMP to recover the signal. For the linear channel the algorithmic transition αs (ρ) → 0 as ρ → 0, while for the signless channel we get αs (ρ) → 1/2 as ρ → 0. In other words if one looses the signs one cannot perform recovery in compressed sensing with less than n/2 measurements. What we observe in this example for α < 1/2 is in the statistical physics literature on neural networks known as retarded learning [43]. This appears in problems where the ϕ(x) function is symmetric, as seen at the beginning of this section: There is always a critical point of the mutual information with an overlap value q = 0. For this problem, this critical point is actually “stable” (meaning that it is actually a local minimum in q) for all α < 1/2 independently of ρ. To see that, we have to go back to (54). For the absolute value channel, √ the posterior distribution of W ∗ given Ye0 = ρ |W ∗ | in the second scalar channel (15) is a mean of two Dirac masses on −W ∗ and W ∗ . Thus, the posterior variance is hw2 isc − hwi2sc = (W ∗ )2 . Consequently, (54) leads to the stability condition α < 1/2. This has the two following implications: i) In the IMPOSSIBLE phase, when α < 1/2 and ρ > α, the minimum at q = 0 is actually the global one. In this case, the MMSE and the generalization error are the ones given by using 0 as a guess for each element of X∗ ; in other words, there is no useful information that one can exploit and no algorithmic approach can be better than a random guess. ii) In the POSSIBLE but HARD phase when α < 1/2, GAMP initialized at random, i.e. close to the q = 0 fixed point, will remain there. This suggests that in this region, even if a perfect reconstruction is possible, it will still be very hard to beat a random guess with a tractable algorithm. 4.2.4 The symmetric door channel The third output channel we study in detail is the symmetric door channel, where ϕ(x) = sgn(|x| − K). In case of channels with discrete set of outputs exact recovery is only possible when the prior is also discrete. In the present case we consider the signal to be Rademacher, where each element is chosen at random between 1 and −1, i.e. P0 (x) = (δ(x − 1) + δ(x + 1))/2. This channel was studied previously using the replica method in the context of optimal data compression [44]. This output channel is in the class of symmetric channels for which overlap q = 0 is a fixed point. This fixed point is stable for α < αc (K). Exact recovery is information-theoretically possible above αIT (K) and tractable with the GAMP algorithms above the spinodal transition αs (K). The values of these three transition lines are depicted in the center panel of Fig. 1. We note that αIT ≥ 1 is a generic bound on exact recovery for every K, required by a simple counting argument. While a-priori it is not clear whether this bound is saturated for some K, we observe that it is for K = 0.67449 such that half of the observed measurements are negative and the rest positive. This is, however, not efficiently achievable with GAMP. The saturation of the αIT ≥ 1 bound was remarked previously in the context of the work [44] on optimal data compression. Our work predicts that this information-theoretic result will not be achievable with known efficient algorithms. 19 Generalization error Perceptron, Rademacher X* Perceptron, Gauss-Bernoulli X*, ρ=0.2 Symmetric Door, Rademacher X* 1 1 0.8 0.8 0.6 0.6 0.6 0.4 0.4 0.4 0.2 0.2 SE Optimal AMP,N=1044 Logistic,N=10 0.2 0 0 0.5 1 Optimal and SE AMP, N=104 Logistic,N=104 SE Optimal AMP,N=104 0.8 1 2-layer NN 0 0 0 1 α 1.5 2 5 10 15 20 0 0 0.5 1 1.5 2 2.5 α 3 3.5 4 4.5 5 0 0.5 1 1.5 2 2.5 α Figure 2: Generalization error in three classification problems as a function of the number of data-samples per dimension α. The red line is the Bayes-optimal generalization error, while the green one shows the (asymptotic) performances of GAMP as predicted by the state evolution (SE), when different. For comparison, we also show the result of GAMP (black dots) and, in blue, the performance of a standard out-of-the-box solver, both tested on a single randomly generated instance. Left: Perceptron, with ϕ(x) = sgn(x) and a Rademacher (±1) signal. While a perfect generalization is information-theoretically possible starting from α = 1.249(1), the state evolution predicts that GAMP will allow such perfect prediction only from α = 1.493(1). The results of a logistic regression with fine-tuned ridge penalty with the software scikit-learn [68] are shown for comparison. Middle: Perceptron with Gauss-Bernoulli coefficients for the signal. No phase transition is observed in this case, but a smooth decrease of the error with α. The results of a logistic regression with fine-tuned `1 sparsity-enhancing penalty (again with [68]) are very close to optimal. Right: The symmetric door activation rule with parameter K = 0.67449 chosen in order to observe the same number of occurrence of the two classes. In this case there is a sharp phase transition at α = 1 from a situation where it is impossible to learn the rule, so that the generalization is not better than a random guess, to a situation where the optimal generalization error drops to zero. However, GAMP identifies the rule perfectly only starting from αs = 1.566 (GAMP error stays 1 up to αstab = 1.36, see the black dashed curve). Interestingly, this non-linear rule seems very hard to learn for other existing algorithms. Using Keras [26], a neural network with two hidden layers was able to learn approximately the rule, but only for much larger training set sizes (shown in inset). 4.3 Examples of optimal generalization error Besides the formula for the mutual information, the main result of this paper is the formula (40) (or (47) when ∆te → +∞) for the optimal generalization error, and formula (43) for the generalization error achieved by the GAMP algorithm. In this section we evaluate both these generalization errors for several cases of priors and output functions. We study both regression problems, where the output is real-valued, and classification problems, where the output is discrete. While in realistic regression and classification problems the matrix Φ corresponds to the data, and is thus not i.i.d. random, we view the practical interest of our theory as a benchmark for state-of-the art algorithms. Our work provides an exact asymptotic analysis of optimal generalization error and sample complexity for a range of simple rules where a teacher uses random data to generate labels. The challenge for state-of-the-art multi-purpose algorithms is to try to match as closely as possible the performance that can be obtained with GAMP that is fine-tuned to the specific form of the output and prior. 4.3.1 Threshold output: The perceptron The example of non-linear output that is the most widely explored in the literature is the threshold output, where the deterministic output (or “activation”) function is ϕ(x) = sgn(x). This output in the teacher-student setting of the present paper is known as the perceptron problem [36], or equivalently, the one-bit compressed sensing in signal processing [21]. Its solution has been discussed in details within the replica formalism (see for instance [16, 46, 66, 83]) and we confirm all of these heuristic computations within our approach. Let 20 V ∼ N (0, 1). The formula (40) for the generalization error then reduces to (recall q ∗ is a maximizer of (20)) lim E opt n→∞ gen Z =1−  2 Z V DV √ π 0 q q∗ 2(ρ−q ∗ ) −t2 /2 dt e 2 h  = 1 − E erf V s 2 i q∗ . 2(ρ − q ∗ ) (57) In Fig. 2 (left) we plot the optimal generalization error of the perceptron with a Rademacher signal, the state evolution prediction of the generalization error of the GAMP algorithm, together with the error actually achieved by GAMP on one randomly generated instance of the problem. We also compare these to the performance of a standard logistic regression. As expected from existing literature [36,73] we confirm that in this case the information-theoretic transition appears at a number of samples per dimension αIT = 1.249(1), while the algorithmic transition is at αs = 1.493(1). Logistic regression does not seem to be able to match the performance on GAMP in this case. In Fig. 2 (center) we plot the generalization error for a Gauss-Bernoulli signal with density ρ = 0.2. Cases as this one were studied in detail in the context of one-bit compressed sensing [83] and GAMP was found to match the optimal generalization performance with no phase transitions observed. In this case the logistic regression is rather close to the performance of GAMP. 4.3.2 Symmetric Door The next classification problem, i.e. discrete output rule, we study is the symmetric door function ϕ(x) = sgn(|x| − K). In this case the generalization error (40) becomes lim E opt n→∞ gen hn  K − √q ∗ V   K + √q ∗ V  o2 i = 1 − EV erf p − erf − p −1 . 2(ρ − q ∗ ) 2(ρ − q ∗ ) (58) In Fig. 2 (right) we plot the generalization error for K = 0, 67449 such that 1/2 of the outputs are 1 and 1/2 are −1. The symmetric door output is an example of function for which the optimal generalization error for α < αIT = 1 (for that specific value of K, see phase diagram in center of Fig. 1)) is as bad as if we were guessing randomly. The GAMP algorithm still achieves such a bad generalization until αstab = 1.36, and achieves perfect generalization only for α > αs = 1.566. Interestingly, labels created from this very simple symmetric door rule seem to be very challenging to learn for general purpose algorithms. We tried to optimize parameters of a two-layers neural network and only managed to get the performances shown in the inset of Fig. 2 (right). It is an interesting theoretical challenge whether a deeper neural network can learn this simple rule from fewer samples. 4.3.3 Linear regression The additive white Gaussian noise (AWGN) channel, or linear regression, is defined by ϕ(x, A) = x+σA with A ∼ N (0, 1). This models the (noisy) linear regression problem, as well as noisy random linear estimation and compressed sensing. In this case (40) leads to lim E opt n→∞ gen = ρ − q∗ + σ2 . (59) This result agrees with the generalization error analyzed heuristically in [73] in the limit σ → 0. Fig. 3 (left) depicts the generalization error for this example. Performance of GAMP in this case very close to the one of LASSO. 21 Generalization error AWGN σ= 0.032, Gauss-Bernoulli X*, ρ=0.2 ReLu, Gauss-Bernoulli X*, ρ=0.2 0.08 0.07 0.06 0.05 0.04 0.03 0.02 0.01 0 0.2 0.15 0.1 Optimal and SE AMP,N=104 LASSO,N=104 0.05 0 0 0.2 0.4 0.6 Absolute value, Gauss-Bernoulli X*, ρ=0.5 0.2 SE Optimal AMP, N=104 Keras,N=104 0.15 SE Optimal AMP,N=104 0.6 0.1 0.4 0.2 0.05 PM 0 0 1 2 3 4 0 0 0.2 0.4 0.6 α α 0.8 1 1.2 0 0.2 0.4 0.6 0.8 1 1.2 1.4 α Figure 3: The generalization error for three regression problems is plotted as a function of the number of samples per dimension α. The red line is again the Bayes-optimal generalization error, while the green one shows the (asymptotic) performances of GAMP as predicted by the state evolution (SE), when different. Again, we also show the result of GAMP on a particular instance (black dots) and, in blue, the performance of an out-of-the-box solver. Left: White Gaussian noise output and a Gauss-Bernoulli signal. For this choice of noise, there is no sharp transition (as opposed to what happens at smaller noises). The results of a LASSO with fine-tuned `1 sparsityenhancing penalty (with [68]) are very close to optimal. Middle: Here we analyze a ReLU output function ϕ(x) = max(0, x), still with a Gauss-Bernoulli signal. Now there is an information-theoretic phase transition at α = 2ρ = 0.4, but GAMP requires αs = 0.589 to reach perfect recovery. We show for comparison the result of a maximum likelihood estimation performed with Keras [26] and observe a sizeable gap in performance. Right: The signless output function ϕ(x) = |x|. The information-theoretic perfect recovery starts at α = ρ = 0.5, but the problem is again harder algorithmically for GAMP that succeeds only above αs = 0.90. Again, the problem appears to be hard for other solvers. In inset, we show the performance for the estimation problem using PhaseMax [37], which is able to learn the rule only using about four times as many measurement than needed information-theoretically. 4.3.4 Rectified linear unit (ReLU) In Fig. 3 (center) we analyze the generalization error for the ReLU output function, ϕ(x) = max(0, x). This channel models the behavior of a single neuron with the rectified linear unit activation [54] widely used in multilayer neural networks. In this case (40) becomes after simple algebra and Gaussian integration by parts (again V ∼ N (0, 1)), lim E opt n→∞ gen h  ρ q∗  1 + EV V 2 erf V = − 2 4 s 2 i (ρ − q ∗ )3/2  1 q∗ q∗ √ − + 2(ρ − q ∗ ) ρ + q ∗ 2π ρπ r ρ + q∗  . ρ − q∗ (60) For sparse Gauss-Bernoulli signals in Fig. 3 (center) we observe again the information-theoretic transition to perfect generalization to be distinct from the algorithmic one. At the same time our test with existing algorithms were not able to closely match the performance of GAMP. This hence also remains an interesting benchmark. 4.3.5 Signless channel In Fig. 3 (right) we analyze the generalization error for the signless output function where ϕ(x) = |x|. This models a situation similar to compressed sensing, except that the sign of the output has been lost. This is a real-valued analog of the phase retrieval problem as discussed in Sec. 4.2.3. In this case the generalization error (40) becomes p   opt lim Egen = ρ − EV b(V q ∗ , ρ − q ∗ )2 , n→∞ (61) where r b(x, y) =   2y − x2y2 x x  xn x o e + erfc − √ − 1 + erf − √ . π 2 2 2y 2y 22 (62) Our comparison with the performance of a state-of-the-art algorithm PhaseMax [37] suggests that also for this simple benchmark there is room for improvement in term of matching the performance of GAMP. 4.3.6 Sigmoid, or logistic regression Let us also consider an output function with auxiliary randomization. After having generated the classifier X∗ , the teacher randomly associates the label +1 to the pattern Φµ with probability fλ (n−1/2 Φµ ·X∗ ), where fλ (x) = (1 + exp(−λx))−1 ∈ [0, 1] is the sigmoid of parameter λ > 0, and the label −1 with probability 1 − fλ (n−1/2 Φµ · X∗ ). One of the (many) possible ways for the teacher to do so is by selecting ϕ(x, A) = I(A ≤ fλ (x)) − I(A > fλ (x)), where I(E) is the indicator function of the event E. He then generates a i.i.d. stream of uniform random numbers A i.i.d. ∼ U[0,1] and obtains the labels through (35). Let V, w ∼ N (0, 1). In this setting the error (40) becomes opt lim Egen = 2 − 4 EV n→∞ p p  Ew fλ ( q ∗ V + ρ − q ∗ w) 2 . (63) This fomula reduces to (57) when λ → ∞ as it should. 5 Proof of the replica formula by the adaptive interpolation method We now prove Theorem 1. Our main tool will be an interpolation method recently introduced in [13] and called “adaptive interpolation method”. Here we formulate the method as a direct evolution of the Guerra and Toninelli interpolation method developed in the context of spin glasses [39]. In constrast with the discrete and more pedestrian version of the adaptive interpolation method presented in [13] (and called in this case “stochastic interpolation method”), here we employ a continuous approach which is more straightforward (see [13] for the links between the discrete and continuous versions of the method) and that has also been recently used in [8] for studying non-symmetric tensor estimation. We will prove Theorem 1 under the following hypotheses: (H1) The prior distribution P0 has a bounded support. (H2) ϕ is a bounded C 2 function with bounded first and second derivatives w.r.t. its first argument. (H3) (Φµi ) i.i.d. ∼ N (0, 1). These assumptions will then be relaxed in Appendix D to the assumptions (h1), (h2) and (h3) or (h3.a)-(h3.b)(h3.c). Since the observations (1) are equivalent to the rescaled observations  1  Yeµ := ∆−1/2 Yµ = ∆−1/2 ϕ √ [ΦX∗ ]µ , Aµ + Zµ , n 1 ≤ µ ≤ m, (64) the variance ∆ of the Gaussian noise can be “incorporated” inside the function ϕ. Thus, it suffices to prove Theorem 1 for ∆ = 1 and we suppose, for the rest of the proof, that we are in this equivalent case. 5.1 Interpolating estimation problem We introduce an “interpolating estimation problem” that interpolates between the orginal problem (2) at t = 0, t ∈ [0, 1] being the interpolation parameter, and the two scalar problems described in Sec. 2.2 at t = 1 which are analytically tractable. For t ∈ (0, 1) the interpolating estimation problem is a mixture of the original and scalar problems. This interpolation scheme is inspired from the interpolation paths used by Talagrand to 23 study the perceptron, see [76]. There are two major differences between the “non-planted perceptron” studied by Talagrand, and the “planted perceptron” that we are investigating: • In the planted case, the presence of a planted solution forces (under small perturbations) the correlations to vanish for all values of the parameters, see [48,63]. In the non-planted case, proving such decorelation is much more involved, and is proved only in a limited region of the parameter space, see [76]. • However, in the planted case, there can be arbitrarily many (see Remark 21 in [82]) solutions to the state evolution equations (19), whereas in the region studied by [76], there is only one solution. For this reason, our interpolation method needs to be more sophisticated in order to interpolate with the “right fixed point”. Let q : [0, 1] → [0, ρ] be a continuous “interpolation function” and r ≥ 0. Define r St,µ := 1−t [ΦX∗ ]µ + n sZ sZ t t q(v)dv Vµ + 0 (ρ − q(v))dv Wµ∗ (65) 0 where Vµ , Wµ∗ i.i.d. ∼ N (0, 1). Consider the following observation channels, with two types of observations obtained through ( Yt,µ ∼ Pout ( · | St,µ ) , 1 ≤ µ ≤ m, √ (66) 0 Yt,i = r t Xi∗ + Zi0 , 1 ≤ i ≤ n, m where (Zi0 )ni=1 i.i.d. ∼ N (0, 1). We assume that V = (Vµ )µ=1 is known. Then the inference problem is to recover ∗ ∗ m ∗ ∗ n both unknowns W = (Wµ )µ=1 and X = (Xi )i=1 from the knowledge of V, Φ and the “time-dependent” 0 0 n observations Yt = (Yt,µ )m µ=1 and Yt = (Yt,i )i=1 . We now understand that rt appearing in the second set of measurements in (66), and the terms 1 − t, Rt Rt q(v)dv and 0 (ρ − q(v))dv appearing in the first set all play the role of signal-to-noise ratios in the in0 terpolating model, with t giving more and more “power” (or weight) to the scalar inference channels when increasing. Here is the first crucial and novel ingredient of our interpolation scheme. In the classical interpolation method, these signal intensities would all take a trivial form (i.e. would be linear in t) but here, the non-trivial (integral) dependency in t of the two latter intensities through the use of the interpolation function q allows for much more flexibility when choosing the interpolation path. This will allow us to actually choose the “optimal interpolation path” (this will become clear soon). Define uy (x) := ln Pout (y|x) and, with a slight abuse of notations, r st,µ = st,µ (x, wµ ) := 1−t [Φx]µ + n sZ sZ t 0 t (ρ − q(v))dv wµ . q(v)dv Vµ + (67) 0 We introduce the interpolating Hamiltonian Ht (x, w; Y, Y0 , Φ, V) := − m X n ln Pout (Yµ |st,µ ) + µ=1 =− m X 2 1X 0 √ Yi − t r xi 2 i=1 uYt,µ (st,µ ) + µ=1 n 1X √ 2 t r (Xi∗ − xi ) + Zi0 2 . (68) i=1 The dependence in Φ and V of the Hamiltonian is through the (st,µ )m µ=1 . We also introduce the corresponding Gibbs bracket h−it which is the expectation operator w.r.t. the t-dependent posterior distribution of (x, w) 24 given (Yt , Yt0 , Φ, V). It is defined as 1 hg(x, w)it := Zt (Yt , Yt0 , Φ, V) Z 0 dP0 (x)Dw g(x, w) e−Ht (x,w;Yt ,Yt ,Φ,V) , (69) Q 2 /2 −wµ for every continuous bounded function g on Rn × Rm . In (69) Dw = (2π)−m/2 m is the µ=1 dwµ e 0 m-dimensional standard Gaussian distribution and Zt (Yt , Yt , Φ, V) is the appropriate normalization: Z 0 0 Zt (Yt , Yt , Φ, V) := dP0 (x)Dw e−Ht (x,w;Yt ,Yt ,Φ,V) . (70) Finally the interpolating free entropy is fn (t) := 1 E ln Zt (Y, Y0 , Φ, V) . n (71) One verifies easily that ( fn (0) = fn − 21 , fn (1) = ψP0 (r) − 1+rρ 2 + R1 m n ΨPout ( 0 q(t)dt; ρ) , (72) where fn is given by (11). We emphasize a crucial property of the interpolating model: It is such that at t = 0 we recover the original model and thus fn (0) = fn − 1/2 (the trivial constant comes from the purely noisy measurements of the second channel in (66)), while at t = 1 we have the two scalar inference channels and thus the associated terms ψP0 and ΨPout discussed in Sec. 2.2 appear in fn (1). These are precisely the terms appearing in the potential (18). 5.2 Free entropy variation along the interpolation path From the understanding of the previous section, it is at this stage very natual to evaluate the variation of free entropy along the interpolation path, which allows to “compare” the original and purely scalar models thanks to the identity 1 fn = fn (0) + = fn (1) − 2 Z 0 1 1 dfn (t) dt + , dt 2 (73) where the first equality follows from (72). As discussed above, part of the potential (18) appears in fn (1). If the interpolation is properly done, the missing terms required to obtain the potential on the r.h.s. of (73) should naturally appear. Then by choosing the optimal interpolation path thanks to the non-trivial snr dependencies in t (i.e. by selecting the proper interpolating function q), we will be able to show the equality between the replica formula and the true entropy fn . We thus now compute the t-derivative of the free entropy along the interpolation path (see Appendix C for the proof). Let u0y (x) be the derivative (w.r.t. x) of uy (x). Then we have the following. Proposition 4 (Free entropy variation). For model (2), the derivative of the free entropy (71) verifies, for all t ∈ (0, 1), m  E dfn (t) 1 D 1 X 0 rq(t) rρ =− E uYt,µ (St,µ )u0Yt,µ (st,µ ) − r Q − q(t) + − + On (1) , dt 2 n 2 2 t µ=1 25 (74) where On (1) is a quantity that goes to 0 in the n, m → ∞ limit, uniformly in t ∈ [0, 1] and the overlap is n Q := 1X ∗ Xi xi . n (75) i=1 5.3 Overlap concentration The next lemma plays a key role in our proof. Essentially it states that the overlap concentrates around its mean, a behavior called “replica symmetric” in statistical physics. Similar results have been obtained in the context of the analysis of spin glasses [76]. Here we use a formulation taylored to Bayesian inference problems as developed in the context of LDPC codes, random linear estimation [14] and Nishimori symmetric spin glasses [47, 48, 57]. We introduce a “small” perturbation of the interpolating estimation problem by adding to the Hamiltonian (68) a term n  2  X √ x bi  i − xi Xi∗ − xi Z 2 (76) i=1 where (Zbi )ni=1 i.i.d. ∼ N (0, 1). This√term can be interpreted as having a set of extra observations coming from a Gaussian side-channel Ybi = Xi∗ + Zbi for i = 1, . . . , n and that preserves the Nishimori identity (see Appendix A.1). The new Hamiltonian Ht, (x, w; Y, Y0 , Φ, V) defines a new Gibbs bracket h−in,t, and free entropy fn, (t), and all the set up of Sec. 5.1 and Proposition 4 trivially extend. This perturbation induces only a small change in the free entropy, namely of the order of : Lemma 1 (Small free entropy variation under perturbation). Let S > 0 such that the support of P0 is included in [−S, S]. For all  > 0 and all t ∈ [0, 1], |fn, (t) − fn (t)| ≤  S2 . 2 (77) Proof. A simple computation gives ∂fn, (t) 1 S2 = EhQin,t, ≤ , ∂ 2 2 (78) which proves the lemma. Moreover, this small perturbation forces the overlap to concentrate around its mean: Lemma 2 (Overlap concentration). For any 0 < a < b < 1, b Z lim n→∞ a Z 1 dt E Q − EhQin,t, d 0 2 n,t, = 0. (79) In Appendix F.2 we briefly sketch the main steps of the proof for the convenience of the reader and refer to [13] for more details where the method has been streamlined. ∗ Lemma 2 implies that there exists a sequence (n )n≥1 ∈ (0, 1)N that converges to 0 such that Z lim n→∞ 0 1 dt E Q − EhQin,t,n 2 n,t,n = 0. (80) (n )n≥1 converges to 0, so Lemma 1 gives that fn,n (t) and fn (t) have the same limit (provided it exists). In 26 the rest of the section, in order to alleviate the notations, we abusively remove the perturbation subscript n since it makes no difference for the computation of the limit of the free entropy. 5.4 Canceling the remainder Note from (72) and (18) that the second and third terms appearing in (74) are precisely the missing ones that are required in order to obtain the expression of the potential on the r.h.s. of (73). Thus in order to prove Theorem 1 we would like to “cancel” the Gibbs bracket in (74), which is the so called remainder (once integrated over t). This is made possible thanks to the adaptive interpolating parameter q. We would like to choose q(t) = E hQit , which is approximately equal to Q because it concentrates, see Lemma 2. However, Rt E hQit depends on 0 q(v)dv (and on r too). The equation q(t) = E hQit is therefore a first order differential Rt equation over t 7→ 0 q(v)dv. Proposition 5 (Existence of the optimal interpolation function). For all r ≥ 0 the differential equation (81) q(t) = E hQit (r) admits a unique solution qn (t) on [0, ρ] and the mapping Z 1 r ≥ 0 7→ (82) qn(r) (v)dv 0 is continuous. Rt Proof. One verify easily that E hQit is a bounded C 1 function of ( 0 q(v)dv, r). The proposition follows then from an application of the parametric Cauchy-Lipschitz theorem. Using this optimal choice for the interpolating function allows then to relate the potential and free entropy. (r ) n Proposition 6. Let (rn )n≥1 ∈ RN be the solution of (81). Then + be a bounded sequence. For n ∈ N, let qn Z 1 fn = fRS qn(rn ) (v)dv, rn  + On (1) . (83) 0 (r ) Proof. qn n satisfies (81). Therefore by the Cauchy-Schwarz inequality m  D 1 X E u0Yt,µ (St,µ )u0Yt,µ (st,µ ) − rn Q − qn(rn ) (t) dt E n t 0 µ=1 m Z 1 D 1 X 2 E 1/2  Z 1 2 1/2 ≤ dt E u0Yt,µ (St,µ )u0Yt,µ (st,µ ) − rn dt E Q − qn(rn ) (t) t = On (1) . n t 0 0 Z 1 µ=1 The last equality uses that the first factor is bounded (independently of t) because we supposed that Pout is generated by (64) with assumptions (H1), (H2) and (H3) (see Appendix A.5 for proof details) and the second factor goes to 0 when n, m → ∞ by (80), (81). Therefore from (74) Z 0 1 rn dfn (t) dt = dt 2 Z 1 qn(rn ) (t)dt − 0 rn ρ + On (1) . 2 (84) When replacing this identity in (73) and combining this with (72) we reach  m fn = ψP0 (rn ) + ΨPout n Z 1  qn(rn ) (t)dt; ρ 0 27 rn − 2 Z 0 1 qn(rn ) (t)dt + On (1) . (85) Recalling that m/n → α as m, n → ∞ allows to recognize from (18) the claimed identity (83). 5.5 Lower and upper matching bounds We now possess all the necessary tools to prove Theorem 1 in three steps. (i) We prove that, under assumptions (H1), (H2) and (H3), limn→∞ fn = supr≥0 inf q∈[0,ρ] fRS (q, r). (ii) Under hypothesis (H2), the function ΨPout is convex, Lipschitz and non-decreasing (Proposition 11). We thus apply Corollary 5 of Appendix E to get supr≥0 inf q∈[0,ρ] fRS (q, r) = supq∈[0,ρ] inf r≥0 fRS (q, r). We then deduce from (i) that limn→∞ fn = supq∈[0,ρ] inf r≥0 fRS (q, r) under (H1)-(H2)-(H3). (iii) Finally, the approximation arguments given in Appendix D permit to relax (H1)-(H2) to the weaker hypotheses (h1)-(h2) and allow to replace the Gaussian assumption (H3) on Φ by (h3.a)-(h3.b)-(h3.c). This proves the first equality of Theorem 1. The last equality in (20) and the remaining part of Theorem 1 follow then from Lemma 13. It remains thus to tackle (i). Let us start by the lower bound. Proposition 7 (Lower bound). The free entropy (10) verifies lim inf fn ≥ sup inf fRS (q, r) . n→∞ r≥0 q∈[0,ρ] (86) Proof. By Proposition 6 we have that for any r ≥ 0, fn ≥ fRS 1 Z qn(r) (t)dt, r  + On (1) ≥ inf fRS (q, r) + On (1) q∈[0,ρ] 0 (87) and thus lim inf fn ≥ inf fRS (q, r) . n→∞ q∈[0,ρ] (88) This is true for all r ≥ 0 thus we obtain Proposition 7. We now turn our attention to the converse bound. Proposition 8 (Upper bound). The free entropy (10) verifies lim sup fn ≤ sup inf fRS (q, r) . r≥0 q∈[0,ρ] n→∞ (89) Proof. Let K = 2αΨ0Pout (ρ; ρ). The mapping from equation (82) is continuous, consequently the application [0, K] → [0, K]  R 1 (r) 0 r 7→ 2αΨPout 0 qn (t)dt; ρ (90) is continuous (recall that Ψ0Pout denotes the derivative of ΨPout w.r.t. its first argument, and is shown to be R 1 (r∗ ) continuous and bounded in Appendix A.2.2). It admits therefore a fixed point rn∗ = 2αΨ0Pout ( 0 qn n (t)dt; ρ). Proposition 6 gives then Z 1 ∗  fn = fRS qn(rn ) (t)dt, rn∗ + On (1) . (91) 0 28 We now remark that fRS Z 1  ∗ qn(rn ) (t)dt, rn∗ = inf fRS (q, rn∗ ) . q∈[0,ρ] 0 (92) Indeed, the function grn∗ : q ∈ [0, ρ] 7→ fRS (q, rn∗ ) is convex (because of Proposition 11) and its q-derivative is gr0 n∗ (q) = αΨ0Pout (q) − rn∗ . 2 (93) R 1 (r∗ ) R 1 (r∗ ) Since gr0 n∗ ( 0 qn n (t)dt) = 0 by definition of rn∗ , the minimum of grn∗ is necessarily achieved at 0 qn n (t)dt. Combining (91) with (92) we reach fn = inf fRS (q, rn∗ ) + On (1) ≤ sup inf fRS (q, r) + On (1) q∈[0,ρ] r≥0 q∈[0,ρ] (94) which allows to deduce Proposition 8. From the arguments given at the beginning of the section, this ends the proof of Theorem 1. Appendix A: Some technicalities A.1 The Nishimori identity Proposition 9 (Nishimori identity). Let (X, Y) ∈ Rn1 × Rn2 be a couple of random variables. Let k ≥ 1 and let X(1) , . . . , X(k) be k i.i.d. samples (given Y) from the conditional distribution P (X = · |Y), independently of every other random variables. Let us denote h−i the expectation operator w.r.t. P (X = · |Y) and E the expectation w.r.t. (X, Y). Then, for all continuous bounded function g we have Ehg(Y, X(1) , . . . , X(k) )i = Ehg(Y, X(1) , . . . , X(k−1) , X)i . (95) Proof. This is a simple consequence of Bayes formula. It is equivalent to sample the couple (X, Y) according to its joint distribution or to sample first Y according to its marginal distribution and then to sample X conditionally to Y from its conditional distribution P (X = · |Y). Thus the (k + 1)-tuple (Y, X(1) , . . . , X(k) ) is equal in law to (Y, X(1) , . . . , X(k−1) , X). A.2 A.2.1 Some properties of the scalar channels The additive Gaussian scalar channel We recall here some properties of the free entropy of the first scalar channel (12). Proposition 10. Let X0 ∼ P0 be a real random variable with finite second moment. Let r ≥ 0 and Y0 = √ rX0 + Z0 , where Z0 ∼ N (0, 1) is independent from X0 . Then the function Z √ 2 ψP0 : r 7→ E ln dP0 (x)e r Y0 x−rx /2 is convex, differentiable, non-decreasing and 12 E[X02 ]-Lipschitz on R+ . Moreover, ψP0 is strictly convex, if P0 is not a Dirac measure. Proof. Denote by h−ir the posterior distribution of X0 given Y0 in the channel (12). Using Gaussian integration by parts and the Nishimori property (Proposition 9), one verify easily that for all r ≥ 0 2ψP0 0 (r) = EhxX0 ir = Ehxi2r ∈ [0, E[X02 ]] , 29 where x ∼ h−ir , independently of everything else. ψP0 0 is non-decreasing because it is linked to the minimal mean square error mmse(r) of the channel (12) which is non-increasing with r: h 2 i mmse(r) = E X0 − E[X0 |Y0 ] = E[X02 ] − 2ψP0 0 (r) . It remains to show that ψP0 is strictly convex when P0 differs from a Dirac mass. When P0 admits a finite moment of order 4, one can compute the second derivative and again, using Gaussian integration by parts and the Nishimori identity one obtain: 2 i 1 h ψP00 0 (r) = E hx2 ir − hxi2r . 2 (N ) Without the 4th moment assumption, one can proceed by truncation. We consider now the distribution P0 (N ) of X0 = X0 I(−N ≤ X0 ≤ N ). h−ir,N will denote the corresponding posterior distribution. We apply the previous computation to obtain ψ 0 (N ) (t) P0 − ψ 0 (N ) (s) P0 1 = 2 t Z h hx2 ir,N − hxi2r,N E 2 i dr , (96) s for 0 < s < t. Now suppose that ψP0 0 is not strictly increasing. We can then find 0 < s < t such that ψP0 0 (s) = ψP0 0 (t). The sequence of convex functions (ψP (N ) )N converges to ψP0 which is differentiable. A 0 standard analysis lemma gives then that the derivatives (ψ 0 (N ) P0 )N converges to ψP0 0 . Therefore, equation (96) and Fatou’s Lemma lead to  Z t  Z t h 2 2 i 2 2 0≤ E lim inf hx ir,N − hxir,N dr ≤ lim inf E hx2 ir,N − hxi2r,N dr = 0 . s N →∞ N →∞ s It is not difficult to verify that hx2 ir,N − hxi2r,N −−−−→ hx2 ir − hxi2r almost surely. We conclude N →∞ Z t h E hx2 ir − hxi2r 2 i dr = 0 . s We can thus find r ∈ [s, t] such that hx2 ir − hxi2r = 0 almost surely. This means that h−ir is almost surely a Dirac distribution. This is absurd because h−ir admits almost surely a strictly positive density w.r.t. P0 , and P0 is assumed not to be a Dirac distribution. This concludes the proof. A.2.2 The non-linear scalar channel We prove here some properties of the free entropy of the second scalar channel (15). Proposition 11. Let Pout be as in (3) where ϕ : R × RkA → R is a measurable function. Suppose that for (Z, A) ∼ N (0, 1) ⊗ PA we have √ E[ϕ( ρZ, A)2 ] < ∞ . (97) Let V, W ∗ i.i.d. ∼ N (0, 1) and Y be the output of the scalar channel (15). Then for all q ∈ [0, ρ], Z ΨPout (q) = E ln w2  √ e− 2 √ dw √ Pout Y | q V + ρ − q w 2π is well define and the function ΨPout is convex, non-decreasing on [0, ρ] and differentiable on [0, ρ). Moreover, if ϕ is bounded and C 2 with respect to its first coordinate, with bounded first and second derivatives, then ΨPout is Lipschtitz on [0, ρ]. 30 Notice that (97) is for instance verified under hypotheses (h2). Proof. We have for all x, y ∈ R 1 Pout (y|x) = √ 2π∆ Z   1 1 2 exp − (y − ϕ(x, a)) dPA (a) ≤ √ . 2∆ 2π∆ Thus, using Jensen’s inequality √ 1 1 √ Ea,w (Y − ϕ( qV + ρ − qw))2 − ln(2π∆) − 2 2∆ w2 Z  √ 1 e− 2 √ ≤ ln dw √ Pout Y | q V + ρ − q w ≤ − ln(2π∆) , 2 2π (98) where Ea,w denotes the expectation w.r.t. (w, a) ∼ N (0, 1) ⊗ PA . By assumptions, the left-hand side is integrable, so that ΨPout (q) is well defined for all q ∈ [0, ρ]. Let us assume now that ϕ is bounded and C 2 w.r.t. its first coordinate, with bounded first and second derivatives. In that case, we will be able to use continuity and differentiation under the expectation, because all the domination hypotheses will be easily verified. It is thus easy to check that ΨPout is continuous on [0, ρ]. We compute now the first derivative. Recall that h−isc , defined in (17), denotes the posterior distribution of W ∗ given Y . We will use the notation uy (x) = ln Pout (y|x). For q ∈ (0, ρ) we have E √ √ 1 D √ √ Ψ0Pout (q) = E u0Y ( qV + ρ − qw)u0Y ( qV + ρ − qW ∗ ) 2 sc E2 √ 1 D 0 √ = E uY ( qV + ρ − qw) ≥ 0, 2 sc where w ∼ h−isc , independently of everything else. ΨPout is therefore non-decreasing. Using the boundedness assumption on ϕ, it is not difficult to check that Ψ0Pout is indeed bounded. ΨPout is thus Lipschtitz. √ √ We will now compute Ψ00Pout . To lighten the notations, we write u0Y (w) for u0Y ( qV + ρ − qw). We compute D E h 1  D E i 1 ∂q E u0Y (w)u0Y (W ∗ ) =E W ∗ u0Y (W ∗ ) u0Y (w)u0Y (W ∗ ) √ V − √ 2 q 2 ρ−q sc sc D 1  E 1 +2E W ∗ u00Y (W ∗ )u0Y (w) √ V − √ 2 q 2 ρ−q sc D 1  E 1 +E W ∗ u0Y (W ∗ )2 u0Y (w) √ V − √ 2 q 2 ρ−q sc D E D 1  E 1 −E u0Y (W ∗ )u0Y (w) w u0Y (w) √ V − √ 2 q 2 ρ−q sc sc (A) (B) (C) (D) (99) Notice that (A) = (C). We compute, using Gaussian integration by parts and the Nishimori identity (Pro- 31 position 9) D E i 1 h D E i 1 h (A) = E u0Y (W ∗ ) u0Y (W ∗ )u00Y (w) + E u0Y (W ∗ ) u0Y (W ∗ )u0Y (w)2 2 2 sc sc D E D E i 1 h 0 − E uY (W ∗ ) u0Y (W ∗ )u0Y (w) u0Y (w) 2 sc D E D D Esc D E − E u00Y (W ∗ )u0Y (w) + E u00Y (W ∗ )u0Y (w)2 (B) = E u00Y (W ∗ )u00Y (w) sc sc D 1  E 1 ∗ 0 ∗ 0 (1) 0 (2) √ V − W u (W )u (w )u (w ) (D) = −E √ Y Y Y 2 q 2 ρ−q sc sc (100) u0Y (w) E sc (101) = −Ehu0Y (W ∗ )u00Y (w(1) )u0Y (w(2) )isc − Ehu0Y (W ∗ )u0Y (w(1) )2 u0Y (w(2) )isc + Ehu0Y (W ∗ )u0Y (w(1) )u0Y (w(2) )isc hu0Y (w)isc (102) We now replace (100), (101) and (102) in (99): D E D E D E − E u0Y (W ∗ )2 u0Y (w(1) )u0Y (w(2) ) + E u0Y (W ∗ )2 u0Y (w)2 2Ψ00Pout (q) = E u0Y (W ∗ )2 u00Y (w) E sc E sc D D E sc D 00 ∗ 0 (1) 0 (2) 00 ∗ 0 2 00 ∗ 00 − E uY (W )uY (w )uY (w ) + E uY (W )uY (w) + E uY (W )uY (w) − sc 0 ∗ 00 (1) 0 EhuY (W )uY (w )uY (w(2) )isc Using the identity u00Y (x) + u0Y (x)2 = Ψ00Pout (q) 00 (Y |x) Pout Pout (Y |x) , − sc 0 ∗ 0 EhuY (W )uY (w(1) )2 u0Y (w(2) )isc + sc 0 4 EhuY (w)isc . this factorizes and gives E 2 2 i D 00 (Y |√q V + √ρ − qw) E √ 1 hD Pout √ √ = E ≥ 0. − u0Y ( q V + ρ − qw) √ 2 Pout (Y | q V + ρ − qw) sc sc (103) ΨPout is thus convex on [0, ρ]. It remains now to prove that ΨPout is convex without the boundedness and C 2 assumptions on ϕ. Using the same arguments than in Appendix D one see that we can approximate with arbitrary precision ΨPout with a function ΨP̂out , where P̂out can be represented by a couple (ϕ̂, ∆) and ϕ̂ is bounded and C 2 w.r.t. its first coordinate, with bounded first and second derivatives. This proves that ΨPout is convex. The fact that ΨPout is differentiable on [0, ρ) follows from differentiation under the expectation sign. In order to see it, we define √ √ X = q V + ρ − q W ∗ . Then, for all q ∈ [0, ρ): Z ΨPout (q) = E 1 − e dX p 2π(ρ − q) √ (X− q V )2 2(ρ−q) Z Z dY Pout (Y |X) ln dx p 1 2π(ρ − q) e − √ (x− q V )2 2(ρ−q) Pout (Y |x) . (104) We are now in a good setting to differentiate under the expectation sign. The domination follows by the same convexity argument than for (98). A.3 Proof of Theorem 2 Define for ∆ > 0, m ln(2π∆) fˆn (∆) = fn + 2n   Z m X √ 1 1 = E log  dP0 (x)dPa (a) exp − (ϕ([ΦX]µ , Aµ ) − ϕ([Φx]µ , aµ ) + ∆Zµ )2  n 2∆ µ=1 32 Lemma 3. m fˆn (∆) −−−→ ξn − ∆→0 2n Proof. This follows from two applications of the dominated convergence Theorem. Define    Z m X √ 1 (ϕ([ΦX]µ , Aµ ) − ϕ([Φx]µ , aµ ) + ∆Zµ )2  h(X, A, Z, ∆) = log  dP0 (x)dPa (a) exp − 2∆ µ=1 and  Z g(X, A, Z) = log  dP0 (x)dPa (a) m Y Z2 − 2µ δ (ϕ([ΦX]µ , Aµ ) − ϕ([Φx]µ , aµ )) e   µ=1 By the dominated convergence Theorem (the domination is here obvious), for all Φ, X, A, Z h(X, A, Z, ∆) −−−→ g(X, A, Z) . ∆→0 Now, for all Φ, X, A, Z, x, a we have m Y δ(ϕ([ΦX]µ , Aµ ) − ϕ([Φx]µ , aµ )) e− 2 Zµ 2 m   1 X √ (ϕ([ΦX]µ , Aµ )−ϕ([Φx]µ , aµ )+ ∆Zµ )2 ≤ 1 ≤ exp − 2∆ µ=1 µ=1 Consequently, g(X, A, Z) ≤ h(X, A, Z, ∆) ≤ 0 . Thus h is lower and upper bounded by integrable random variables (that do not depend on ∆). We can thus apply the dominated convergence Theorem to obtain the Lemma. (∆) We will need to write explicitely the dependence of Pout in ∆ by writting: Pout . We also define Ψ̂P (∆) (q) = ΨP (∆) (q) + out out 1 ln(2π∆) 2 Let (∆k )k≥0 be a sequence of positive numbers that converges to 0.   Lemma 4. The sequence Ψ̂ (∆k ) converges uniformly on [0, ρ] to Ψϕ − 21 . Pout k≥0 Proof. The pointwise convergence is proved using the same arguments as in the previous lemma. The uni form convergence follows from Dini’s second Theorem, Ψ̂ (∆k ) k≥0 is indeed a sequence of non-decreasing Pout functions on [0, ρ] that converges pointwise to Ψϕ − 12 , which is continuous over [0, ρ] (as a pointwise limit of convex functions, for instance). The uniform convergence implies then the convergence of the sup − inf : Corollary 4. n n rq o rq o α sup inf ψP0 (r) + αΨP (∆) (q) − −−−→ sup inf ψP0 (r) + αΨϕ (q) − − ∆→0 q∈[0,ρ] r≥0 out 2 2 2 q∈[0,ρ] r≥0 We have now all the tools needed for the proof of Theorem 2. Proof of Theorem 2. We extend by continuity (see Lemma 3) fˆn at ∆ = 0, to obtain a sequence of convex 33 functions on [0, 1]. Define for ∆ ∈ [0, 1]  o n supq∈[0,ρ] inf r≥0 ψP0 (r) + αΨ (∆) (q) − rq Pout n o2 fˆ∞ (∆) = rq sup − α2 q∈[0,ρ] inf r≥0 ψP0 (r) + αΨϕ (q) − 2 if ∆ > 0 , if ∆ = 0 . By Theorem 1, fˆ∞ is the pointwise limit of the sequence of convex functions (fˆn )n≥1 on (0, 1], it is thus continuous on (0, 1]. By Corollary 4 we obtain that fˆ∞ is continuous on [0, 1]. Moreover, fˆn is differentiable on (0, 1) and it is not difficult to check that its derivative is uniformly bounded in n: "  2 # m 1 0 ∀n ≥ 1, sup |fn (∆)| ≤ E ϕ √ [ΦX]1 , A1 n n ∆∈(0,1) which is bounded by assumption (h2). This implies that fˆn (0) → fˆ∞ (0), otherwise the derivative of fˆn would explode near 0. A.4 Proof of Proposition 1 In this section, we prove Proposition 1. In order to prove Proposition 1, we will need the following lemma. For k ≥ 1 we denote by Sk+ the set of positive semi-definite k × k matrices and by Sk+∗ the set of positive definite k × k matrices. Lemma 5. Let (Cn )n≥1 be a sequence of random variables in Sk+ , that converges in law to C, such that C is almost surely positive definite. Let f : Rk → R be a measurable function and Z ∼ N (0, Ik ) be independent from (Cn ). Assume that the sequence (f (Cn Z))n≥1 is uniformly integrable. Then E[f (Cn Z)] −−−→ E[f (CZ)] n→∞ Proof. By the uniform integrability assumption, it suffices to show that (f (Cn Z))n converges to f (CZ) in law. Let g : R → R be a continuous bounded function. Let EZ denote the expectation w.r.t. Z only. Then the function h : Sk+ → R M 7→ EZ [g(f (MZ))] is continuous over Sk+∗ . Indeed, for M ∈ Sk+∗ , 1 h(M) = k/2 (2π) |detM|k Z   1 | −2 exp − x M x g(f (x))dx . 2 The discontinuity points of h are thus in Sk+ \ Sk+∗ , which has 0 measure for the law of C (because C is a.s. positive definite). Consequently, by Portemanteau Theorem E[h(Cn )] → E[h(C)] which proves that (f (Cn Z))n converges to f (CZ) in law. We can now prove Proposition 1. Proof. We define 1 Cn = n kX∗ k2 x · X∗ x · X∗ kxk2 ! 34 P −−−→ n→∞ ρ q q ρ ! ∈ S2+∗ By the Nishimori property, one verify easily that *        2   2 + Φnew · X∗ Φnew · x Φnew · x 1 Φnew · X∗ √ √ √ √ E ϕ ,A − ϕ ,a ,A − ϕ ,a = E ϕ 2 n n n n n n *     2 + ∗ Φnew · X Φnew · x 1 √ √ ,A − ϕ ,a = E Ea,A ϕ 2 n n n Now, we remark that     2 Φnew · X∗ Φnew · x √ √ Ea,A ϕ ,A − ϕ ,a n n is simply a measurable function that we denote f of   Φnew · X∗ Φnew · x √ = C1/2 , √ n Z n n in law, where Z ∼ N (0, I2 ) is independent from Cn . We can thus apply Lemma 5 (the uniform integrability assumption follows from our hypothesis (h2)): *     2 + Φnew · X∗ Φnew · x √ √ lim E Ea,A ϕ ,A − ϕ ,a n→∞ n n n h 2 i √ √ √ √ 1/2 = E[f (C Z)] = E ϕ( qZ1 + ρ − qZ2 , A) − ϕ( qZ1 + ρ − qZ20 , a) for Z1 , Z2 , Z20 i.i.d. ∼ N (0, 1). By expanding the square of the right-hand side and applying Bayes rule, one obtains exactly twice the right-hand side of (39). This concludes the proof. A.5 Boundedness of an overlap fluctuation In this appendix we show that the “overlap fluctuation” m m D 1 X 2 E D 1 X 2 E 0 0 2 E uYt,µ (St,µ )uYt,µ (st,µ ) − rn ≤ 2rn + 2E u0Yt,µ (St,µ )u0Yt,µ (st,µ ) n n t t µ=1 (105) µ=1 is bounded uniformly in t under hypothesis (H2) on ϕ. From the representation (3) (recall we consider ∆ = 1 in Sec. 5) uYt,µ (s) = ln Pout (Yt,µ |s) Z 1 1 2 = ln dPA (aµ ) √ e− 2 (Yt,µ −ϕ(s,aµ )) 2π (106) and thus u0Yt,µ (s) R = 1 2 dPA (aµ )(Yt,µ − ϕ(s, aµ ))ϕ0 (s, aµ )e− 2 (Yt,µ −ϕ(s,aµ )) R 1 2 dPA (aµ )e− 2 (Yt,µ −ϕ(s,aµ )) (107) where ϕ0 is the derivative w.r.t. the first argument. From (1) at ∆ = 1 we get |Yt,µ | ≤ sup |ϕ| + |Zµ |, where the supremum is taken over both arguments of ϕ, and thus immediately obtain for all s ∈ R |u0Yt,µ (s)| ≤ (2 sup |ϕ| + |Zµ |) sup |ϕ0 | . 35 (108) From (108) and (105) we see that it suffices to check that 2  m2  E (2 sup |ϕ| + |Zµ |)2 (sup |ϕ0 |)2 ≤ C(ϕ) 2 n where C(ϕ) is a constant depending only on ϕ. This is easily seen by expanding all squares and using that m/n is bounded. Appendix B: Proofs of the limits of optimal errors B.1 Computation of the denoising error: Proof of Corollary 3 One can verify easily that in (defined by (21)) is a concave differentiable function of ∆−1 (see [40]). Thus its limit i∞ is also a concave function of ∆−1 . Therefore, a standard analysis lemma gives that the derivative of in w.r.t. ∆−1 converges to the derivative of i∞ at every point at which i∞ is differentiable (i.e. almost every points, by concavity). Let us now compute these two derivatives. Using the I-MMSE Theorem from [40], one obtain m  1  D  1 E 1 X ∂in ∗ √ √ = E ϕ [ΦX ] , A − ϕ [Φx] , a µ µ µ µ ∂∆−1 2n n n 2 . (109) µ=1 Second, define h(q, ∆) = n qr o α (1 + ln(2π∆)) + αΨPout (q) + inf ψP0 (r) − . r≥0 2 2 (110) Then i∞ = − supq∈[0,ρ] h(q, ∆). The computation of ∂ΨPout (q)/∂∆−1 follows from the I-MMSE theorem √ √ √ of [40]. Indeed, if we denote S = ϕ( qV + ρ − qW ∗ , A), notice that ΨPout (q) = −I(S; S + ∆Z | V ) − √ √ √ 1 2 log(2πe∆), because ΨPout (q) = −H(S + ∆Z | V ) and I(S + ∆Z; S | V ) = H(S + ∆Z | V ) − H(S + √ ∆Z | V, S) = −ΨPout (q) − 12 log(2πe∆). Therefore √ √ ∂ΨPout (q) ∆ ∂ ∆ 1 = − I(S + ∆Z; S | V ) = − MMSE(S + ∆Z | V, S) ∂∆−1 2 ∂∆−1 2 2  p p    ∆ 1  √ = − E ϕ( ρ V, A)2 − E ϕ( q ∗ V + ρ − q ∗ w, a)i2sc . 2 2 Consequently, p p    ∂h(q, ∆) α  √ 2 ∗V + ∗ w, a)i2 E ϕ( ρ V, A) − E ϕ( q ρ − q . = − sc ∂∆−1 2 Now, Theorem 1 from [61] gives that at every ∆−1 at which i∞ is differentiable p p    ∂i∞ ∂ α  √ 2 ∗V + ∗ w, a)i2 ρ V, A) − E ϕ( q ρ − q = − sup h(q, ∆) = E ϕ( . sc ∂∆−1 ∂∆−1 q∈[0,ρ] 2 where q ∗ ∈ [0, ρ] is a point where the supremum above is achieved, and thus correspond to an optimal couple in (20). As explained above, ∂in /∂∆−1 converges to ∂i∞ /∂∆−1 at every ∆−1 at which i∞ is differentiable, which concludes the proof. 36 B.2 Optimal generalization error with side information: Proof of Proposition 2 Here the arguments are the same as for the proof of Corollary 3, but we repeat them briefly for the reader. By a straightforward generalization of (22), fn is related to the mutual information I(X∗ , A; Y|Φ) between the noisy labels and the classifier and stream A through in := 1 α I(X∗ , A; Y|Φ) = −fn − − αβ ln(2π∆tr ) − α(1 − β) ln(2π∆te ) , n 2 (111) Now in order to access the generalization error we employ the classical I-MMSE relation [40] for Gaussian noise but restricted to the test set. It takes the following form in the present setting (1 − β)m side din = Egen . te −1 d(∆ ) 2n (112) Again we use that in is a sequence of concave functions in (∆te )−1 and thus its limit (which exists by Theorem 1) is concave too. Again, these concavity properties allow to permute limits and differentiation. Therefore from (111) and (112) we find that for almost every ∆te > 0 lim E side n→∞ gen = ∆te − 2 d sup inf f ts (q, r) . α(1 − β) d(∆te )−1 q∈[0,ρ] r≥0 RS (113) It remains to evaluate this derivative using (46) to finally assess the asymptotic generalization error. This is done as in the previous section using an envelope Theorem, see [61]. Appendix C: Proof of Proposition 4 0 (y|x) and P 00 (y|x) the first Recall u0y (x) is the x-derivative of uy (x) = ln Pout (y|x). Moreover denote Pout out and second x-derivatives, respectively, of Pout (y|x). We will first prove that for all t ∈ (0, 1) m n  1 X E dfn (t) 1 D 1 X 0 rq(t) rρ An =− E uYµ (St,µ )u0Yµ (st,µ ) − r Xi∗ xi − q(t) + − − , dt 2 n n 2 2 2 t µ=1 (114) i=1 where m n 1 i h 1 X 00 (Y |S )  Pout 1 X µ t,µ √ ((Xi∗ )2 − ρ) ln Zt . An := E √ n n µ=1 Pout (Yµ |St,µ ) n (115) i=1 Once this is done, we will prove that An goes to 0 as n → ∞ uniformly in t ∈ [0, 1], in order to obtain Proposition 4. C.1 Proof of (114) Recall definition (71) which becomes, when written as a function of the interpolating Hamiltonian (68), Z Z 1 0 0 ∗ ∗ −Ht (X∗ ,W∗ ;Y,Y 0 ,Φ,V) fn (t) = EΦ,V dYdY dP0 (X )DW e ln dP0 (x)Dw e−Ht (x,w;Y,Y ,Φ,V) . n (116) 37 We will need the Hamiltonian t-derivative Ht0 given by Ht0 (X∗ , W∗ ; Y, Y0 , Φ, V) =− m X dSt,µ µ=1 dt u0Yµ (St,µ ) 1 − 2 r n rX ∗ 0 √ Xi (Yi − t rXi∗ ) . t (117) i=1 The derivative of the interpolating free entropy thus reads, for 0 < t < 1,  1 dfn (t) 1  = − E Ht0 (X∗ , W∗ ; Y, Y0 , Φ, V) ln Zt − E Ht0 (x, w; Y, Y0 , Φ, V) t dt {z } |n {z } |n T1 (118) T2 where recall the definition of Zt = Zt (Y, Y0 , Φ, V) given by (70). Let us compute T1 . Let 1 ≤ µ ≤ m. Let us start with the following term  i h dS i 1 h [ΦX∗ ]µ ρ − q(t) q(t) t,µ 0 Vµ + qR Wµ∗ u0Yµ (St,µ ) ln Zt . E + qR uYµ (St,µ ) ln Zt = E − p t t dt 2 n(1 − t) 0 q(s)ds 0 (ρ − q(s))ds (119) Let us compute the first term of the right-hand side of the last identity. By Gaussian integration by parts w.r.t Φµi we obtain   1 p E [ΦX∗ ]µ u0Yµ (St,µ ) ln Zt n(1 − t) n hZ i X 1 ∗ ∗ 0 =p E dYdY0 e−Ht (X ,W ;Y,Y ,Φ,V) Φµi Xi∗ u0Yµ (St,µ ) ln Zt n(1 − t) i=1 = n    1 X  ∗ 2 00 E (Xi ) uYµ (St,µ ) + u0Yµ (St,µ )2 ln Zt + E Xi∗ xi u0Yµ (St,µ )u0Yµ (st,µ ) t n i=1 n n i D1 X E h1 X P 00 (Yµ |St,µ ) (Xi∗ )2 out ln Zt + E Xi∗ xi u0Yµ (St,µ )u0Yµ (st,µ ) , =E n Pout (Yµ |St,µ ) n t i=1 (120) i=1 where we used the identity u00Yµ (x) + u0Yµ (x)2 = 00 (Y |x) Pout µ . Pout (Yµ |x) (121) We now compute the second term of the right hand side of (119). Using again Gaussian integrations by parts but this time w.r.t Vµ , Wµ∗ i.i.d. ∼ N (0, 1) as well as the previous formula, we obtain similarly h  i q(t) ρ − q(t) E qR Vµ + qR Wµ∗ u0Yµ (Sµ,t ) ln Zt t t 0 q(s)ds 0 (ρ − q(s))ds  i hZ  q(t) ρ − q(t) ∗ ∗ 0 =E dYdY0 e−Ht (X ,W ;Y,Y ,Φ,V) qR Vµ + qR Wµ∗ u0Yµ (Sµ,t ) ln Zt t t 0 q(s)ds 0 (ρ − q(s))ds i h P 00 (Y |S ) µ µ,t ln Zt + E q(t)u0Yµ (Sµ,t )u0Yµ (sµ,t ) t . (122) = E ρ out Pout (Yµ |Sµ,t ) 38 Combining equations (119), (120) and (122) together, we have h dS i t,µ 0 −E uYµ (St,µ ) ln Zt dt n n h  i 1 D 1 X  E 00 1 P (Yµ |Sµ,t )  1 X ∗ 2 = E out (Xi ) − ρ ln Zt + E Xi∗ xi − q(t) u0Yµ (St,µ )u0yµ (st,µ ) . (123) 2 Pout (Yµ |Sµ,t ) n 2 n t i=1 i=1 As seen from (118) it remains to compute, recalling that for 1 ≤ j ≤ n, Yj0 − Gaussian integration by parts w.r.t Zj0 ∼ N (0, 1), √ t rXj∗ = Zj0 and then again a Z h i  ∗ 0 √   ∗ 0  0 ∗ ∗ 0 E Xj (Yj − t rXj ) ln Zt = E Xj Zj ln Zt = E Xj Zj ln dP0 (x)Dw e−Ht (x,w;Y,Y ,Φ,V) Z n m h n X √ 2 oi 1X √ ∗ 0 = E Xj Zj ln dP0 (x)Dw exp − uYµ (st,µ ) + trXi∗ + Zi0 − t r xi 2 µ=1 i=1   ∗ √ ∗ 0 t r(Xj − xj ) + Zj t = E Xj √  (124) = t r ρ − EhXj∗ xj it . Thus, by taking the sum, 1 − 2 r n n E i rρ r D 1 X r h1 X ∗ 0 √ E Xi (Yi − t rXi∗ ) ln Zt = − E Xi∗ xi . t n 2 2 n t i=1 (125) i=1 Therefore, for all t ∈ (0, 1), m n 1 i rρ rq(t) 00 (Y |S )  1 h 1 X Pout 1 X µ µ,t ∗ 2 √ √ T1 = E ((Xi ) − ρ) ln Zt + − 2 Pout (Yµ |Sµ,t ) n 2 2 n n µ=1 i=1 m n  1 X E 1 D 1 X 0 uYµ (St,µ )u0Yµ (st,µ ) − r + E Xi∗ xi − q(t) . 2 n n t µ=1 (126) i=1 To obtain (114), it remains to show that T2 = 0. This is a direct consequence of the Nishimori identity (see Appendix A.1): T2 = 1 E Ht0 (x, w; Y, Y0 , Φ) n t = 1 E Ht (X∗ , W∗ ; Y, Y0 , Φ) = 0 . n (127) For obtaining the Lemma, it remains to show that An goes to 0 uniformly in t ∈ [0, 1]. C.2 Proof that An vanishes as n → ∞ We now consider the final step, that is showing that An given by (115) vanishes in the n → ∞ limit uniformly in t ∈ [0, 1] under conditions (H1)-(H2)-(H3). First we show that m n h 1 X i 00 (Y |S )  Pout 1 X µ t,µ √ fn (t)E √ ((Xi∗ )2 − ρ) = 0 . n µ=1 Pout (Yµ |St,µ ) n (128) i=1 Once this is done, we use the fact that n1 ln Zt concentrates around fn (t) to prove that An converges to 0 R 00 as n → ∞. We start by noticing the simple fact that for all s ∈ R, Pout (y|s)dy = 0. Consequently, for 39 µ ∈ {1, . . . , m}, h P 00 (Y |S ) i Z out µ t,µ ∗ 00 E X , St = dYµ Pout (Yµ |St,µ ) = 0 . Pout (Yµ |St,µ ) (129) Thus, using the “tower property” of the conditionnal expectation: n m n m ii h X X h X  hX 00 (Y |S ) i 00 (Y |S ) Pout Pout µ t,µ µ t,µ X ∗ , St = 0 E ((Xi∗ )2 − ρ) =E ((Xi∗ )2 − ρ) E Pout (Yµ |St,µ ) Pout (Yµ |St,µ ) i=1 µ=1 µ=1 i=1 (130) which implies (128). We now show that An goes to 0 uniformly in t ∈ [0, 1] as n → ∞. Using successively (128) and the Cauchy-Schwarz inequality, we have m n h 1 X i  1 00 (Y |S )  Pout 1 X µ t,µ √ √ |An | = E ln Zt − fn (t) ((Xi∗ )2 − ρ) n n µ=1 Pout (Yµ |St,µ ) n i=1 m n h 1 X 2 i1/2 h 1 2 i1/2 00 (Y |S ) 2  Pout 1 X µ t,µ √ ≤ E √ E . ((Xi∗ )2 − ρ) ln Zt − fn (t) n n µ=1 Pout (Yµ |St,µ ) n (131) i=1 Using again the “tower property” of conditional expectations m n n m h X 2 i h X ii 2 h X 00 (Y |S ) 2  X 00 (Y |S ) 2 Pout Pout µ t,µ µ t,µ ∗ 2 ∗ 2 E ((Xi ) − ρ) =E X∗ , St . ((Xi ) − ρ) E Pout (Yµ |St,µ ) Pout (Yµ |St,µ ) µ=1 i=1 µ=1 i=1 (132) Now, using the fact that conditionally on St , the random variables we have  00 (Y |S Pout µ t,µ ) Pout (Yµ |St,µ ) 1≤µ≤m are i.i.d. and centered, m m h X i h X i h P 00 (Y |S ) 2 i 00 (Y |S ) 2 00 (Y |S ) 2 Pout Pout µ t,µ µ t,µ out 1 t,1 X∗ , St = E St = mE St . (133) E Pout (Yµ |St,µ ) Pout (Yµ |St,µ ) Pout (Y1 |St,1 ) µ=1 µ=1 Under condition (H2), it is not difficult to show that there exists a constant C > 0 such that h P 00 (Y |S ) 2 i out 1 t,1 E St ≤ C . Pout (Y1 |St,1 ) (134) Combining now (134), (133) and (132) we obtain that m n n h X 2 i h X 2 i 00 (Y |S ) 2  X  Pout µ t,µ ((Xi∗ )2 − ρ) ≤ mC E ((Xi∗ )2 − ρ) = mnC Var (X1∗ )2 . E Pout (Yµ |St,µ ) µ=1 i=1 i=1 Going back to (131), therefore there exists a constant C 0 > 0 such that 2 i1/2 h 1 |An | ≤ C 0 E ln Zt − fn (t) . n (135) By Theorem 4 we have E[(n−1 ln Zt − fn (t))2 ] → 0 as n → ∞ uniformly in t ∈ [0, 1]. Thus An goes to 0 uniformly in t ∈ [0, 1] as n → ∞. This ends the proof of Proposition 4. 40 Appendix D: Approximation In this section, we suppose that Theorem 1 holds for channels of the form (1) under the hypotheses (H1), (H2) and (H3). We show in this section that this imply that Theorem 1 holds under the hypotheses (h1), (h2), and either (h3) or (h3.a)-(h3.b)-(h3.c). Again, as explained at the beginning of Sec. 5, it suffices to consider the case where ∆ = 1. We start by relaxing the hypothesis (H1). D.1 Relaxing the hypotheses on P0 and Φ The goal of this section is to prove the following proposition: Proposition 12. Suppose that (h1) holds and that ϕ is C ∞ with compact support. Suppose that (h3) or (h3.a)(h3.b)-(h3.c) hold. Then Theorem 1 holds. Proposition 12 will follow from Lemma 6 and Lemma 7 below. Lemma 6. Suppose that (h1) (H2) and (h3) hold. Then Theorem 1 holds. Proof. The ideas are basically the same that in [55] (Sec. 6.2.2). We omit the details here for the sake of brevity. We now relax the Gaussian assumption on the “measurement matrix” Φ. Lemma 7. Suppose that (h1) holds, and that ϕ is C ∞ with compact support. Suppose that (h3.a)-(h3.b) hold. Then Theorem 1 holds. Proof. The proof is based on the Lindeberg generalization theorem (Theorem 2 from [49]) which is a variant of the generalized “Lindeberg principle” from [25]. Theorem 3 (Lindeberg generalization theorem). Let (Ui )1≤i≤n and (Vi )1≤i≤n be two collection of random variables with independent components and f : Rn → R a C 3 function. Denote ai = |EUi − EVi | and bi = |EUi2 − EVi2 |. Then n  X bi ai E|∂i f (U1:i−1 , 0, Vi+1:n )| + E|∂i2 f (U1:i−1 , 0, Vi+1:n )| |Ef (U) − Ef (V)| ≤ 2 i=1 Z Ui Z Vi  1 1 3 2 3 2 + E |∂ f (U1:i−1 , 0, Vi+1:n )|(Ui − s) ds + E |∂i f (U1:i−1 , 0, Vi+1:n )|(Vi − s) ds . 2 0 i 2 0 Let (Φ0µ,i ) i.i.d. ∼ N (0, 1) and let (Φµ,i ) be a family of independent random variables, with zero mean and unit variance. Let fn0 be the free entropy (10) with design matrix Φ0 and fn be the free entropy (10) with design matrix Φ. We will apply Theorem 3 to the function F : U ∈ Rm×n 7→ 1 E ln n Z − 12 dPA (a)dP0 (x) e m P      2 ϕ √1n [UX∗ ]µ ,Aµ −ϕ √1n [Ux]µ ,aµ +Zµ µ=1 x,a where the expectation E is taken w.r.t. X∗ , A and Z. We have fn = EF (Φ) and 41 fn0 = EF (Φ0 ) . It is not difficult to verify that F is a C 3 function and that for all 1 ≤ µ ≤ m and 1 ≤ i ≤ n: ∂3F 3 ∂Uµ,i ≤ ∞ C , n5/2 for some constant C that only depends on ϕ and the first three moments of P0 . Thus, an application of Theorem 3 gives C |fn − fn0 | ≤ √ . n By Proposition 6, we know that Theorem 1 holds for fn0 , thus it holds for fn . D.2 Relaxing the hypotheses on ϕ It remains to relax the hypotheses on ϕ. This section is dedicated to the proof of the following proposition, which is of course exactly the statement of Theorem 1. Proposition 13. Suppose that (h1) and (h2) hold. Suppose that (h3) or (h3.a)-(h3.b)-(h3.c) hold. Then, Theorem 1 holds for the output channel (1). To prove Proposition 13 we will approximate the function ϕ with a function ϕ̂ which is C ∞ with compact support. In the following, G is a standard Gaussian random variable, independent of everything else. Proposition 14. Suppose that (h1) and (h2) hold. Suppose that (h3) or (h3.a)-(h3.b)-(h3.c) hold. Then, for all  > 0, there exist ϕ̂ ∈ C ∞ (R × RkA ) with compact support, such that  √  √ E (ϕ( ρG, A) − ϕ̂( ρG, A))2 ≤  , and for n large enough, we have "  E ϕ 1 √ [ΦX∗ ]1 , A1 n   − ϕ̂ 1 √ [ΦX∗ ]1 , A1 n 2 # ≤ . Proof. We will distinguish the cases where (h3) holds and where (h3.a)-(h3.b)-(h3.c) holds. Case 1: The Gaussian case: (h3) holds. Notice that [ΦX∗ ]1 = kX∗ kG in law. Thus, if |X1∗ | is a constant random variable, then ϕ is in L2 (R × RkA ) √ with the measure induced by ( ρG, A1 ). The result follows by density of the C ∞ functions with compact support in L2 . We consider now the case where |X1∗ | is not constant. We start with a useful lemma. Lemma 8. Let f : R → R+ be a measurable function. Let G ∼ N (0, 1) and 0 < a ≤ b. Then √ r E[f ( aG)] ≤ √ b E[f ( bG)]. a √ √ In particular, if f ( bG) is integrable then f ( aG) is also integrable. R √ √ 2 Proof. For x ∈ [a, b], notice that: xE[f ( xG)] = (2π)−1/2 e−g /(2x) f (g)dg which is clearly non-decreasing in x. 42 |X1∗ | is not constant and ρ = E[(X1∗ )2 ], therefore there exists ρ < r < r0 such that P(r ≤ (X1∗ )2 ≤ r0 ) > 0. Consequently, using Lemma 8, √ √ P(r ≤ (X1∗ )2 ≤ r0 )E[ϕ( rG, A1 )2 ] = E[1r≤(X1∗ )2 ≤r0 ϕ( rG, A1 )2 ] |X ∗ | ≤ E[1r≤(X1∗ )2 ≤r0 √1 ϕ(|X1∗ |G, A1 )2 ] ≤ r r r0 E[ϕ(|X1∗ |G, A1 )2 ] < ∞. r √ Therefore E[ϕ( rG, A1 )2 ] < ∞. √ Let  > 0. We have just proved that ϕ ∈ L2 (R × RkA ) with the measure induced by ( rG, A1 ). There  √  √ exists a C ∞ function with compact support ϕ̂ such that E (ϕ( rG, A) − ϕ̂( rG, A))2 ≤ . Thus by Lemma 8 r r    √ √ r  √ r √ 2 2 E (ϕ( rZ, A) − ϕ̂( rZ, A)) ≤ . E (ϕ( ρZ, A) − ϕ̂( ρZ, A)) ≤ ρ ρ     2  1 1 √ √ . By the law of large numbers, n1 kXk2 It remains to bound E ϕ kXkG, A1 − ϕ̂ kXkG, A1 n n converges to ρ in probability as n → ∞. Thus P( n1 kXk2 ∈ / [ρ/2, r]) −−−→ 0. We now apply Hölder’s n→∞ inequality: "   2 #   1 1 E 1kXk2 /n∈[ρ/2,r] ϕ √ kXkG, A1 − ϕ̂ √ kXkG, A1 / n n 2 "    2+γ # 2+γ γ 1 1 ≤ P(kXk2 /n ∈ / [ρ/2, r]) 2+γ E ϕ √ kXkG, A1 − ϕ̂ √ kXkG, A1 n n γ ≤ C 2+γ , for some constant C > 0 and for n large enough. It remain to bound " E 1kXk2 /n∈[ρ/2,r] ϕ  1 √ kXkG, A1 n   !2 # 1 − ϕ̂ √ kXkG, A1 n   r  2 √ √ nr ≤ E 1kXk2 /n∈[ρ/2,r] ϕ rG, A1 − ϕ̂ rG, A1 kXk2 r  2 i √ √ 2r h ≤ E ϕ rG, A1 − ϕ̂ rG, A1 ρ r 2r . ≤ ρ  Case 2: The non-Gaussian case: (h3.a)-(h3.b)-(h3.c) hold. In that case, by the Central Limit Theorem (using the fact that the third moments of (Xi∗ Φ1,i ) are bounded with n, because of hypotheses (h3.a) and (h3.b))   [ΦX∗ ]1 √ (d) √ , A1 −−−→ ( ρG, A1 ) . (136) n→∞ n This implies that  ϕ [ΦX∗ ]1 √ , A1 n  √ (d) −−−→ ϕ( ρG, A1 ) . n→∞ (137) Indeed, let g : R → R be a continuous bounded function. We have, by Portemanteau Theorem, that for almost 43 all a ∈ RkA (with respect to PA )    [ΦX∗ ]1 √ √ ,a −−−→ E [g ◦ ϕ( ρG, a)] . E g◦ϕ n→∞ n because for almost all a, g◦ϕ(·, a) is continuous almost-everywhere and bounded. By dominated convergence, it follows that    [ΦX∗ ]1 √ √ E g◦ϕ −−−→ E [g ◦ ϕ( ρG, A1 )] . , A1 n→∞ n   ∗] √ 1 , A1 )n is by assumption (h2) bounded in L2 , thus That finishes the proof of (137). The sequence (ϕ [ΦX n √ by (137) we have that E[ϕ( ρG, A1 )2 ] < ∞. √ Let  > 0. We have just proved that ϕ ∈ L2 (R × RkA ) with the measure induced by ( ρG, A1 ). There   √ √ exists a C ∞ function with compact support ϕ̂ such that E (ϕ( ρG, A) − ϕ̂( ρG, A))2 ≤ . One deduce from (136) and (137) that   2   1 1 √ √ (d) ∗ ∗ −−−→ (ϕ( ρG, A) − ϕ̂( ρG, A))2 . ϕ √ [ΦX ]1 , A1 − ϕ̂ √ [ΦX ]1 , A1 n→∞ n n Now, hypothesis (h2) gives that the sequence above is uniformly integrable. This gives that     2 1 1 √ √ E ϕ √ [ΦX∗ ]1 , A1 − ϕ̂ √ [ΦX∗ ]1 , A1 −−−→ E(ϕ( ρG, A) − ϕ̂( ρG, A))2 ≤  . n→∞ n n Consequently, the left-hand side is smaller that 2 for n large enough. This concludes the proof. In the remaining of this section, we prove Proposition 13. Let  > 0. Let ϕ and ϕ̂ as in Proposition 14. Let fn be the free entropy associated to ϕ and fˆn the free entropy corresponding to ϕ̂. Lemma 9. There exists a constant C > 0 such that for n large enough √ |fn − fˆn | ≤ C  . Proof. Consider the observation channel given by   √  1  Yt,µ = tϕ √n [ΦX∗ ]µ , Aµ + Zµ   √  Ŷt,µ = 1 − tϕ̂ √1n [ΦX∗ ]µ , Aµ + Ẑµ for 1 ≤ µ ≤ m. Let fn (t) denote the interpolating free energy: 1 fn (t) = E ln n Z − 12 dPA (a)dP0 (x) e m P  √ Yt,µ − tϕ µ=1 √1 [Φx]µ ,aµ n  2  2  √ + Ŷt,µ − 1−tϕ̂ √1n [Φx]µ ,aµ . x,a (x,a) In order to shorten the notations, we will now write ϕµ We compute, for 0 < t < 1: fn0 (t)  i m h (X∗ ,A) 2 (X∗ ,A) 2 E (ϕ̂1 ) − (ϕ1 ) + = 2n i m h (X∗ ,A) 2 (X∗ ,A) 2 = E (ϕ̂1 ) − (ϕ1 ) + 2n (x,a) and ϕ̂µ     for ϕ √1n [Φx]µ , aµ and ϕ̂ √1n [Φx]µ , aµ . m E 1 X D (x,a) (X∗ ,A) ∗ ,A) − ϕ̂(x,a) ϕ̂(X E ϕµ ϕµ µ µ 2n t µ=1 D E m (x,a) (X∗ ,A) (X∗ ,A) (x,a) (x,a) (X∗ ,A) E ϕ1 (ϕ1 − ϕ̂1 ) + (ϕ1 − ϕ̂1 )ϕ̂1 . 2n t 44 We start by controlling the first term:   h i     1/2 (X∗ ,A) 2 (X∗ ,A) 2 (X∗ ,A) (X∗ ,A) 2 (X∗ ,A) (X∗ ,A) 2 ≤ E ϕ̂1 E (ϕ̂1 ) − (ϕ1 ) + ϕ1 E ϕ̂1 − ϕ1 √ ≤ C0  , by Proposition 14, for some constant C0 and n large enough. The two other terms can be bounded the same way: D E (x,a) (X∗ ,A) ϕ1 (ϕ1 − (X∗ ,A) ϕ̂1 )       1/2 (X∗ ,A) 2 (X∗ ,A) (X∗ ,A) 2 ≤ E ϕ1 E ϕ̂1 − ϕ1 E t √ ≤ C0  , by Proposition 14, for n large enough. Consequently, there exists a constant C > 0 such that for n large √ enough and for all 0 < t < 1, |fn0 (t)| ≤ C . Notice that t 7→ fn (t) is continuous over [0, 1], fn (0) = fˆn R1 √ and fn (1) = fn , hence |fn − fˆn | ≤ 0 |fn0 (t)|dt ≤ C . Let Pout denote the transition kernel associated to ϕ and P̂out the one associated to ϕ̂. Analogously to the previous Lemma, one can show: Lemma 10. There exists a constant C 0 > 0 such that for all q ∈ [0, ρ] √ |ΨPout (q) − ΨP̂out (q)| ≤ C 0  . From there we obtain that √ sup inf fRS (q, r) − sup inf fˆRS (q, r) ≤ C 0  . q∈[0,ρ] r≥0 q∈[0,ρ] r≥0 (138) Applying Theorem 1 for Pout , we obtain that for n large enough |fn − supq∈[0,ρ] inf r≥0 fRS (q, r)| ≤ . We now combine this with (138) and Lemma 9 we obtain that for n large enough √ √ fn − sup inf fRS (q, r) ≤ fˆn − sup inf fˆRS (q, r) + (C + C 0 )  ≤ (C + C 0 )  +  , q∈[0,ρ] r≥0 r≥0 q∈[0,ρ] which concludes the proof of Proposition 13. Appendix E: A sup-inf formula This appendix gathers some useful lemmas for the manipulations of “sup-inf” formulas like (20). We first need to indroduce some notations about convex functions. Let f be a convex function on some interval I ⊂ R. For t ∈ I we will denote respectlively by f 0 (t− ) and f 0 (t+ ) the left- and right-hand derivatives of f at t. We also define the subgradient of f at t as ∂f (t) = [f 0 (t− ), f 0 (t+ )]. If t is the right (resp. left) border of I, then we define ∂f (t) = [f 0 (t− ), +∞) (resp. ∂f (t) = (−∞, f 0 (t+ )]). Lemma 11. Let f and g be two convex, Lipschitz, non-decreasing functions on R+ . For q1 , q2 ∈ R+ we define ψ(q1 , q2 ) = f (q1 ) + g(q2 ) − q1 q2 . Then sup inf ψ(q1 , q2 ) = q1 ≥0 q2 ≥0 sup ψ(q1 , q2 ) = q1 ∈∂g(q2 ) q2 =f 0 (q1+ ) 45 sup q1 ∈∂g(q2 ) q2 ∈∂f (q1 ) ψ(q1 , q2 ) , (139) and these extremas are achieved at some (possibly many) couples. Moreover, if g is strictly convex, then the above extremas are achieved precisely on the same couples (q1 , q2 ) and f is differentiable at q1 . Corollary 5. Let f be a convex, Lipschitz, non-decreasing function on R+ . Define ρ = supx≥0 f 0 (x+ ). Let g : [0, ρ] → R be a convex, Lipschitz, non-decreasing function. For q1 ∈ R+ and q2 ∈ [0, ρ] we define ψ(q1 , q2 ) = f (q1 ) + g(q2 ) − q1 q2 . Then sup inf ψ(q1 , q2 ) = sup inf ψ(q1 , q2 ) . q2 ∈[0,ρ] q1 ≥0 q1 ≥0 q2 ∈[0,ρ] Proof. In order to apply Lemma 11 we need to extend g on R+ . We thus define for x ≥ 0 g̃(x) = ( g(x) if x ≤ ρ g(ρ) + (x − ρ)g 0 (ρ+ ) if x ≥ ρ g̃ is simply equal to g that we extend for x ≥ ρ using its tangent at ρ. Obviously g̃ is a convex, Lipschitz, non-decreasing function on R+ . One can thus apply Lemma 11: sup inf f (q1 ) + g̃(q2 ) − q1 q2 = sup inf f (q1 ) + g̃(q2 ) − q1 q2 q1 ≥0 q2 ≥0 q2 ≥0 q1 ≥0 and both “sup-inf” are achieved on [0, supx≥0 g̃ 0 (x+ )]×[0, supx≥0 f 0 (x+ )]. By definition, ρ = supx≥0 f 0 (x+ ), thus sup inf f (q1 ) + g̃(q2 ) − q1 q2 = sup inf f (q1 ) + g̃(q2 ) − q1 q2 q1 ≥0 q2 ≥0 q1 ≥0 q2 ∈[0,ρ] = sup inf f (q1 ) + g̃(q2 ) − q1 q2 = sup q2 ≥0 q1 ≥0 inf f (q1 ) + g̃(q2 ) − q1 q2 q2 ∈[0,ρ] q1 ≥0 which concludes the proof because g̃(q2 ) = g(q2 ) for q2 ∈ [0, ρ]. To prove Lemma 11 we will need the following lemma on the Fenchel-Legendre transform. Lemma 12. Let V ⊂ R be a non-empty interval and let g : V → R be a convex function. Define  g ∗ : x ∈ R 7→ sup xy − g(y) ∈ R ∪ {+∞} . (140) y∈V Let Dg∗ = {x ∈ R | g ∗ (x) < ∞}. Then g ∗ is a convex function on the interval Dg∗ 6= ∅. Moreover, Dg∗ = {a} if and only if g : x 7→ ax. For all x ∈ Dg∗ the set of maximizers of (140) is of the form [ax , bx ], where ax , bx ∈ R ∪ {±∞}. Then, the left-hand and right-hand derivatives of g ∗ at x are respectlively ax and bx . In particular, if g is strictly convex then g ∗ is differentiable around every point in the interior of Dg∗ . Proof. g is convex, so there exists an affine function h : x 7→ ax + b such that ∀x ∈ V, g(x) ≥ h(x). Compute   g ∗ (a) = sup ay − g(y) ≤ sup ay − h(y) = b < ∞ . y∈V y∈V Thus Dg∗ 6= ∅. It is easy to verify that Dg∗ is convex. g ∗ is then convex as a supremum of linear functions. For x ∈ R we define the function ϕx : y 7→ xy − g(y). Let x ∈ Dg∗ . Because of convexity, g ∗ is left- and right-hand differentiable at x. We are only going to show that the left-hand derivative of g ∗ at x is equal to ax , the result for the right-hand derivative is proved analogously. First of all, notice that if ax = −∞ then g ∗ (x0 ) = +∞ for any x0 < x, so the left-hand derivative of g ∗ is not defined. We will thus concentrate on the cases where ax ∈ R or ax = +∞. 46 Let us consider first the case where ax is finite. By definition, g ∗ (x) = ϕx (ax ). Let now x0 < x. We have ax (x − x0 ) = ϕx (ax ) − ϕx0 (ax ) ≥ g ∗ (x) − g ∗ (x0 ) , which implies that (g ∗ )0 (x− ) ≤ ax . Let now x0 < x in Dg∗ . Notice that, by convexity of g, bx0 ≤ ax . The fact that ax achieves the maximum in (140) implies that x ∈ ∂g(ax ). We have then, by convexity g(bx0 ) ≥ g(ax ) + (bx0 − ax )x which implies g ∗ (x) − g ∗ (x0 ) = ax x − g(ax ) − bx0 x0 + g(bx0 ) ≥ ax − g(a) − bx0 x0 + g(a) + (bx0 − ax )x ≥ bx (x − x0 ) . When x0 → x, it is not difficult to verify that bx0 → ax . We obtain therefore that (g ∗ )0 (x− ) ≤ ax . We conclude (g ∗ )0 (x− ) = ax . Suppose now that ax = +∞. Let x0 < x. Notice that ax0 is finite, because the converse would imply that g ∗ (x) = +∞. Using the result we just proved, we have ax0 = (g ∗ )0 (x0− ) ≤ (g ∗ )0 (x− ), where the last inequality is due to convexity. When x0 → x it is again not difficult to verify that ax0 → ax = +∞. We conclude (g ∗ )0 (x− ) = +∞. Proof of Lemma 11. By convexity of g, for all q1 , q2 ≥ 0 such that q1 ∈ ∂g(q2 ), we have ψ(q1 , q2 ) = inf q20 ≥0 ψ(q1 , q20 ). Consequently: sup inf ψ(q1 , q2 ) ≥ q1 ≥0 q2 ≥0 ψ(q1 , q2 ) ≥ sup q1 ∈∂g(q2 ) q2 ∈∂f (q1 ) sup ψ(q1 , q2 ) . q1 ∈∂g(q2 ) q2 =f 0 (q1+ ) Let us now prove the converse bound. Let Lg = supy≥0 g 0 (y + ). Lg is finite because g is Lipschitz. Notice that for 0 ≤ y < Lg , g ∗ (y) < ∞ while for y > Lg , g ∗ (y) = +∞. f is continuous on [0, Lg ] and g ∗ is convex on [0, Lg ] (g ∗ (Lg ) may be equal to +∞). Therefore f − g ∗ achieves its suppremum at some q1∗ ∈ [0, Lg ]. If 0 < q1∗ < Lg then the optimality condition at q1∗ gives f 0 (q1∗− ) − g ∗0 (q1∗− ) ≥ 0 and f 0 (q1∗+ ) − g ∗0 (q1∗+ ) ≤ 0. Thus (141) g ∗0 (q1∗− ) ≤ f 0 (q1∗− ) ≤ f 0 (q1∗+ ) ≤ g ∗0 (q1∗+ ) . We know by Lemma 12 that [g ∗0 (q1∗− ), g ∗0 (q1∗+ )] is the set of maximizers of q2 7→ q1∗ q2 − g(q2 ). Consequently q2∗ := f 0 (q1∗+ ) maximizes q2 7→ q1∗ q2 − g(q2 ). This gives q1∗ ∈ ∂g(q2∗ ). We conclude: sup inf ψ(q1 , q2 ) = f (q1∗ ) + g(q2∗ ) − q1∗ q2∗ ≤ q1 ≥0 q2 ≥0 sup f (q1 ) + g(q2 ) − q1 q2 . q1 ∈∂g(q2 ) q2 =f 0 (q1+ ) If now q1∗ = 0, the optimality condition is now: f 0 (0+ ) − g ∗0 (0+ ) ≤ 0. f is non-decreasing, hence 0 ≤ f 0 (0+ ) ≤ g ∗0 (0+ ). g is non-decreasing, thus the set of maxizers of g ∗ (0) is, by Lemma 12 [0, g ∗0 (0+ )]. Therefore q2∗ := f (0+ ) maximizes q2 7→ q1∗ q2 − g(q2 ) and we conclude similarly as before. If q1∗ = Lg , then the optimality condition is f 0 (q1∗− ) − g ∗0 (q1∗− ) ≥ 0. Therefore f 0 (q1+ ) ≥ f 0 (q1− ) ≥ g ∗0 (q1∗− ). Again by Lemma 12, q2∗ := f (q1∗+ ) maximizes q2 7→ q1∗ q2 − g(q2 ), we conclude similarly as before. The equalities (139) are now proved. Moreover, we have seen in the proof above that there exists a couple (q1∗ , q2∗ ) that achieves all three extremas. Suppose now that g is strictly convex. This means (by Lemma 12) that g ∗ is differentiable. 47 Let (q1 , q2 ) ∈ R2+ be a couple that achieves the supremum in one of the last two sup. This means in particular that q1 ∈ ∂g(q2 ). By convexity of g we have then ψ(q1 , q2 ) = inf q20 ≥0 ψ(q1 , q20 ). Since ψ(q1 , q2 ) = supq10 ≥0 inf q20 ≥0 ψ(q10 , q20 ), (q1 , q2 ) achieves the sup-inf. Let (q1 , q2 ) be a couple that achieves the sup-inf. It remains to show that q1 ∈ ∂g(q2 ) and q2 = f10 (q1+ ). First of all, the fact that ψ(q1 , q2 ) = inf q20 ≥0 ψ(q1 , q20 ) implies (by convexity) that q1 ∈ ∂g(q2 ). Now, as in the proof above we have to distiguish whenever q1 ∈ (0, Lg ), q1 = 0 or q1 = Lg . When q1 ∈ (0, Lg ), the strict convexity of g implies the differentiability of g ∗ , therefore the inequality (141) gives that f is differentiable at q1 and f 0 (q1 ) = g ∗0 (q1 ) = q2 . The case q1 = 0 goes the same way. It remains to see that q1 could not be equal to Lg . Indeed, by strict convexity, the infimum of q20 7→ ψ(Lg , q20 ) is only achieved when q20 → +∞. ∗ Lemma 12 gives then that g ∗ (L− g ) = +∞, which gives that the function q1 7→ f (q1 ) − g (q1 ) is decreasing on [Lg − , Lg ], for some  > 0. The supremum can therefore not be achieved at q1 = Lg . Lemma 13. Let g be a strictly convex, differentiable, Lipschitz non-decreasing function on R+ . Define ρ = supx≥0 g 0 (x). Let f be a convex, non-decreasing function on [0, ρ], differentiable on [0, ρ). For q1 , q2 ∈ R+ we define ψ(q1 , q2 ) = f (q1 ) + g(q2 ) − q1 q2 . Then sup inf ψ(q1 , q2 ) = q1 ∈[0,ρ] q2 ≥0 where sup ( Γ= (142) ψ(q1 , q2 ) , (q1 ,q2 )∈Γ (q1 , q2 ) ∈ [0, ρ] × (R+ ∪ {+∞}) q1 = g 0 (q2 ) q2 = f 0 (q1 ) ) , where all the function are extended by there limits at the points at which they may not be defined (for instance g 0 (+∞) = lim g 0 (q)). Moreover, the above extremas are achieved precisely on the same couples. q→∞ Proof. The proof goes almost exactly as for Lemma 11. The only difference with Lemma 11 and Corollary 5 above is that, without the Lipschitz assumption on f , the extremas in (142) can be achieved for (q1 , q2 ) = (ρ, +∞) ∈ Γ, when f 0 (ρ− ) = +∞. It remains only to deal with this case, because the others can be handled exactly as in the proof of Lemma 11. First, suppose that q1 = ρ maximizes q1 7→ inf q2 ≥0 ψ(q1 , q2 ) over [0, ρ]. In that case, the infimum in q2 is achieved for q2 → +∞, because by assumption q2 7→ g(q2 ) − ρq2 is strictly decreasing. Thus in that case we still have sup inf ψ(q1 , q2 ) = ψ(ρ, +∞) ≤ sup ψ(q1 , q2 ) . q1 ∈[0,ρ] q2 ≥0 (q1 ,q2 )∈Γ It remains now to show that ψ(ρ, +∞) ≤ supq1 inf q2 ψ(q1 , q2 ). Let q2 ≥ 0 and define q1 = g 0 (q2 ). By convexity ψ(q1 , q2 ) ≤ sup inf ψ(q10 , q20 ) . 0 q10 ∈[0,ρ] q2 ≥0 Now notice that f (q1 ) + g(q2 ) − ρq2 ≤ ψ(q1 , q2 ) and that the left-hand side of this last inequality goes to ψ(ρ, +∞) as q2 → ∞. This concludes the proof. Appendix F: Concentration of free entropy and overlaps F.1 Concentration of the free entropy The goal of this Appendix is to prove that the free entropy of the interpolating model studied in Sec. 5.1 concentrates around its expectation. To simplify the notations we use C(ϕ, S, α), for a generic strictly positive 48 constant depending only on ϕ, S and α (S the supremum over signal values). It is also understood that n and m are large enough and m/n → α. Theorem 4. Under assumptions (H1), (H2) and (H3) we can find a constant C(ϕ, S, α) > 0 such that " 2 #  C(ϕ, S, α) 1 1 ≤ E ln Zt − E ln Zt . n n n (143) The remaining of this Appendix is dedicated to the proof of Theorem 4. We first recall some set-up and notation for the convenience of the reader. The interpolating Hamiltonian (68)-(67) is (we indicate only the annealed variables in its arguments) − m X µ=1 n 1X 0 √ (Yi − trxi )2 ln Pout (Yµ |st,µ (x, wµ )) + 2 (144) i=1 where r st,µ (x, wµ ) = 1−t [Φx]µ + k1 (t)Vµ + k2 (t)wµ , n sZ sZ t q(v)dv, k1 (t) = 0 t (ρ − q(v))dv k2 (t) = 0 We find it convenient to use the random function representation (1) for the interpolating model, namely  q  1−t Y = ϕ ∗ ] + k (t)V + k (t)W ∗ , A [ΦX + Zµ , t,µ µ 1 µ 2 µ µ n √ Y 0 = rtX ∗ + Z 0 t,i i i i.i.d. In this representation the random variables (Aµ )1≤µ≤m i.i.d. ∼ PA are arbitrary, and (Zµ )1≤µ≤m ∼ N (0, 1). We have Z  1 2 1 Pout (Yt,µ |st,µ (x, w)) = dPA (aµ ) √ exp − Yt,µ − ϕ(st,µ (x, wµ ), aµ 2 2π   Z 1 1 2 (145) = dPA (aµ ) √ exp − (Γt,µ (x, wµ , aµ ) + Zµ ) 2 2π where, using the random function representation, Γt,µ (x, wµ , aµ ) (146) r 1 − t  r 1 − t  =ϕ [ΦX∗ ]µ + k1 (t)Vµ + k2 (t)Wµ∗ , Aµ − ϕ [Φx]µ + k1 (t)Vµ + k2 (t)wµ , aµ . n n From (144), (145), (146) we can express the free entropy of the interpolating model as Z 1 n m 1 ln Zt = ln dP0 (x)dPA (a)Dw e−Ht (x,w,a) − ln(2π) n n 2n (147) where Dw denote the standard m-dimensional Gaussian measure and where the Hamiltonian Ht is Ht (x, w, a) = m n µ=1 i=1 √ 1X 1X √ Γt,µ (x, wµ , aµ )2 + ( rtXi∗ + Zi0 − trxi )2 . 2 2 (148) The interpretation here is that x, w, a are annealed variables and Φ, V, A, Z, Z0 , X∗ , W∗ are quenched. The inference problem is to recover X∗ , W∗ given all other quenched variables. 49 Our goal is to show that the free energy (147) concentrates around its expectation. We will first show concentration w.r.t. all Gaussian variables Φ, V, Z, Z0 , W∗ thanks to the classical Gaussian Poincaré inequality, then the concentration w.r.t. A and finally the one w.r.t. X∗ using classical bounded differences arguments. The order in which we prove the concentrations matters. We recall here these two variances bounds. The reader can refer to [20] (Chapter 3) for detailled proofs of these statements. Proposition 15 (Gaussian Poncaré inequality). Let U = (U1 , . . . , UN ) be a vector of N independent standard normal random variables. Let g : RN → R be a continuously differentiable function. Then (149)   Var(g(U)) ≤ E k∇g(U)k2 . Proposition 16. Let U ⊂ R. Let g : U N → R a function that satisfies the bounded difference property, i.e., there exists some constants c1 , . . . , cN ≥ 0 such that sup u1 ,...uN ∈U N u0i ∈U |g(u1 , . . . , ui , . . . , uN ) − g(u1 , . . . , u0i , . . . , uN )| ≤ ci , for all 1 ≤ i ≤ N . Let U = (U1 , . . . , UN ) be a vector of N independent random variables that takes values in U. Then N 1X 2 Var(g(U)) ≤ ci . 4 (150) i=1 Before we proceed it is useful to remark m n µ=1 i=1 1 1 1 X 2 1 X 02 m ln Zt = ln Ẑt − Zµ − ln(2π) Zi − n n 2n 2n 2n (151) where 1 1  ln Ẑt = ln n n Z dP0 (x)dPA (a)Dw e−Ĥt (x,w,a)  (152) and m Ĥt (x, w, a) = o 1 Xn Γt,µ (x, wµ , aµ )2 + 2Zµ Γt,µ (x, wµ , aµ ) 2 µ=1 n o √ √ √ 1 Xn √ + ( rtXi∗ − trxi )2 + 2Zi0 ( rtXi∗ − trxi ) . 2 (153) i=1 In order Theorem 4 it remains to show that there exists a constant C(ϕ, S, α) > 0 such that  to prove  C(ϕ,S,α) 1 . This concentration property together with (151) implies (143). Var n ln Ẑt ≤ n F.1.1 Concentration with respect to Gaussian random variables Zµ , Zi0 , Vµ , Wµ∗ , Φµi In this section, we prove that n1 ln Ẑt is close to its expectation w.r.t. the Gaussian random variables Z, Z0 , V, W∗ , Φ. Lemma 14. Let EG denotes the expectation w.r.t. Z, Z0 , V, W∗ , Φ only. There exists an constant C(ϕ, S, α) > 0 such that "  2 # 1 1 C(ϕ, S, α) E ln Ẑt − EG ln Ẑt ≤ . (154) n n n 50 Lemma 14 follows, by Pythagorean theorem, from Lemmas 15 and 16 below. Lemma 15. Let EZ,Z0 denotes the expectation w.r.t. Z, Z0 only. There exists an constant C(ϕ, S, α) > 0 such that "  2 # 1 C(ϕ, S, α) 1 ≤ E ln Ẑt − EZ,Z0 ln Ẑt . (155) n n n Proof. We consider here g = random variables. We have 1 n ln Ẑt only as a function of Z and Z0 and work conditionnaly to all other m X ∂g k∇gk = ∂Zµ 2 µ=1 2 n X ∂g + ∂Zi0 2 . (156) i=1 Each of these partial derivatives are of the form ∂g = n−1 h∂ Ĥt iĤt where the Gibbs bracket h−iĤt pertains to the effective Hamiltonian (153). We find ∂g = n−1 hΓt,µ iĤt ≤ 2n−1 sup |∂x ϕ| ∂Zµ √ √ ∂g = n−1 h rtXi∗ − trxi iĤt ≤ 2n−1 S 0 ∂Zi and replacing in (156) we get k∇gk2 ≤ 2n−1 ( m n sup |∂x ϕ| + S). Applying Proposition 15 we have " EZ,Z0  2 # 1 1 C(ϕ, S, α) ln Ẑt − EZ,Z0 ln Ẑt ≤ n n n (157) almost surely. Taking the expectation in (157) gives the lemma. Lemma 16. There exists an constant C(ϕ, S, α) > 0 such that "    2 # 1 1 C(ϕ, S, α) E EZ,Z0 ln Ẑt − EG ln Ẑt . ≤ n n n (158) Proof. We consider here g = n−1 EZ,Z0 [ln Ẑt ] as a function of V, W∗ , Φ and we work conditionnaly to the other random variables. hD ∂Γt,µ E i ∂g = n−1 EZ,Z0 (Γt,µ + Zµ ) ∂Vµ ∂Vµ Ht r h i 2 −1 −1 )(2 sup |∂x ϕ|) ≤ n EZ,Z0 (2 sup |ϕ| + |Zµ |)(2 sup |∂x ϕ|) = n (2 sup |ϕ| + π The same inequality holds for ∂g ∂Wµ∗ . To compute the derivative w.r.t. Φµi we first remark r r 1 − t  n ∂Γt,µ 1−t ∗ = Xi − xi ∂x ϕ [ΦX∗ ]µ + k1 (t)Vµ + k2 (t)Wµ∗ , Aµ ∂Φµi n n r  1−t o − ∂x ϕ [Φx]µ + k1 (t)Vµ + k2 (t)wµ , aµ . n 51 Therefore hD ∂Γt,µ E i ∂g = n−1 EZ,Z0 (Γt,µ + Zµ ) ∂Φµi ∂Φµi Ht r h i 2 −3/2 −3/2 ≤n EZ,Z0 (2 sup |ϕ| + |Zµ |)(4S sup |∂x ϕ|) = n (2 sup |ϕ| + )(4S sup |∂x ϕ|) π Putting these inequalities together we find m m n X ∂g 2 X X + ∂Vµ µ=1 µ=1 µ=1 i=1 r m 2 ≤ 2 (2 sup |ϕ| + )(2 sup |∂x ϕ|) + n π k∇gk2 = m X ∂g ∂Vµ 2 + ∂g ∂Φµi 2 mn (2 sup |ϕ| + n3 r 2 )(4S sup |∂x ϕ|) . π We the lemma follows again from Proposition 15. F.1.2 Bounded difference with respect to Aµ The next step is an application of the variance bound of Lemma 16 to show that n1 EG [ln Ẑt ] concentrates w.r.t. A (we still keep X∗ fixed for the moment). Lemma 17. Let EA denotes the expectation w.r.t. A only. There exists an constant C(ϕ, S, α) > 0 such that "    2 # 1 1 C(ϕ, S, α) E EG ln Ẑt − EA EG ln Ẑt . (159) ≤ n n n Proof. Let us consider n1 EG [ln Ẑt ] as a function g of A only. Let ν ∈ {1, . . . , m}. We must estimate variations (ν) (ν) g(A) − g(A(ν) ) corresponding to two configurations A and A(ν) with Aµ = Aµ for µ 6= ν and Aν = Ãν . (ν) (ν) We will use the notations Ĥt and Γt,µ to denote respectively the quantities Ĥt and Γt,µ where A is replaced by A(ν) . By an application of Jensen’s inequality one finds 1 1 (ν) (ν) EG hĤt − Ĥt iĤ(ν) ≤ g(A) − g(A(ν) ) ≤ EG hĤt − Ĥt iĤt t n n (160) where the Gibbs brackets pertain to the effective Hamiltonians (153). From (153) we obtain (ν) Ht − Ht = m  1  1 X  (ν)2 (ν) (ν)2 (ν) Γt,µ − Γ2t,µ + 2Zµ (Γt,µ − Γt,µ ) = Γt,ν − Γ2t,ν + 2Zν (Γt,ν − Γt,ν ) . 2 2 µ=1 Consequently D E D E 1 1 (ν)2 (ν) (ν)2 (ν) EG Γt,ν − Γ2t,ν + 2Zν (Γt,ν − Γt,ν ) (ν) ≤ g(A) − g(A(ν) ) ≤ EG Γt,ν − Γ2t,ν + 2Zν (Γt,ν − Γt,ν ) . 2n 2n Ht Ht (161) (ν)2 (ν) Notice that Γt,ν − Γ2t,ν + 2Zν (Γt,ν − Γt,ν ) ≤ 4 sup |ϕ|2 + 4|Zν | sup |ϕ|. Thus we conclude by (161) that g satisfies a bounded difference property: r ! 2 2 |g(A) − g(A(ν) )| ≤ sup |ϕ| sup |ϕ| + 2 . (162) n π Lemma 17 follows then by an application of Proposition 16. 52 F.1.3 Bounded difference with respect to Xi∗ ∗ Let EΘ = EA EhG denotes i the expectation w.r.t. all quenched variables except X . It remains to bound the variance of EΘ n1 ln Ẑt (which only depends on X∗ ). Lemma 18. There exists an constant C(ϕ, S, α) > 0 such that "    2 # 1 1 C(ϕ, S, α) E EΘ ln Ẑt − E ln Ẑt ≤ . n n n (163) Proof. The lemma is proved using again a bounded difference argument. n1 EΘ [ln Ẑt ] is a function of X∗ that we denote by g. We will show that g satisfies a bounded difference property. Let j ∈ {1, . . . , n}. Let ∗(j) X∗ , X∗(j) ∈ [−S, S]n be two input signals such that Xi = Xi∗ for i 6= j. We are going to interpolate between g(X∗ ) and g(X∗(j) ). For s ∈ [0, 1] we define ψ(s) = g(sX∗ + (1 − s)X∗(j) ) Obviously ψ(1) = g(X∗ ) and ψ(0) = g(X∗(j) ). Using Gaussian integration by parts, it is not difficult to verify that for s ∈ [0, 1] C(ϕ, S, α) |ψ 0 (s)| ≤ . n This implies that |g(X∗ ) − g(X∗(j) )| ≤ F.1.4 C(ϕ,S,α) n and using Proposition 16 we obtain the lemma. Proof of Theorem 4   ln Ẑt ≤ From Lemmas 14, 17 and 18 above, we obtain using Pythagorean theorem that Var some constant C(ϕ, S, α) > 0. As mentioned before, this implies (thanks to (151)) Theorem 4. F.2 1 n C(ϕ,S,α) n for Concentration of the overlap In this appendix we give the main steps of the proof of Lemma 2. We denote by h−in,t, the Gibbs measure associated to the perturbed Hamiltonian n X  √ x2 Ht (x, w; Y, Y ) +  i − xi Xi∗ − xi Ẑi 2 0 i=1 i.e., the sum of (68) and (76). It is crucial that the second term is a perturbation which preserves the Nishimori identity of Appendix A.1. We note that the precise form of the first term does not matter and all subsequent arguments are generic as long as it is a Hamiltonian whose Gibbs distribution satisfies this Nishimori identity. The corresponding average free entropy is denoted fn, (t) and we call Fn, (t) the free entropy for a realization of the quenched variables, that is Fn, (t) = n−1 ln Zt (Y, Y0 ). Let n L := 1 X  x2i xi zbi  − xi si − √ . n 2 2  i=1 Up to the prefactor n−1 this quantity is the derivative of the perturbation term in (76). The fluctuations of the 53 overlap Q = n−1 Pn ∗ i=1 Xi xi E (L − EhL in,t, )2 and those of L are related through the remarkable identity n,t, 1 = Eh(Q − EhQin,t, )2 4 n,t, 1 + E[hQ2 in,t, − hQi2n,t, ] 2 n 1 X + 2 E[hXi2 in,t, − hXi i2n,t, ]. 4n  i=1 A detailed derivation can be found in Appendix IX of [13] and involves only some algebra using the Nishimori identity and integrations by parts w.r.t. the Gaussian Ẑi in the perturbation term. Lemma 2 is then a direct consequence of the following: Proposition 17 (Concentration of L on E [hL i] ). Under assumptions (H1), (H2) and (H3) we have for any 0 < a < b < 1, Z b d E (L − EhL in,t, )2 lim n→+∞ a n,t, = 0. (164) The proof of this proposition is broken in two parts. Notice that E (L − EhL in,t, )2 n,t, = E (L − hL in,t, )2 n,t,   + E (hL in,t, − EhL in,t, )2 . (165) Thus it suffices to prove the two following lemmas. The first lemma expresses concentration w.r.t. the posterior distribution (or “thermal fluctuations”) and is an elementary consequence of concavity properties of the free energy and the Nishimori identity. Lemma 19 (Concentration of L on hL i ). Under assumptions (H1), (H2) and (H3), we have for any 0 < a < b < 1, Z lim n→+∞ a b  d E (L − hL in,t, )2  n,t, =0 (166) The second lemma expresses the concentration of the average overlap w.r.t. the realizations of quenched disorder variables and is a consequence of the concentration of the free energy (more precisely equation (143) in Appendix F.1). Lemma 20 (Concentration of hL i on EhL i ). Under assumptions (H1), (H2) and (H3), we have for any 0 < a < b < 1, Z lim n→+∞ a b   d E (hL in,t, − E[hL in,t, ])2 = 0 (167) The reader is referred to Sec. V of [13] for the proof of these two Lemmas. We point out that the analysis gives a rate of decay O(n−1 ) for (166) which is optimal but a weaker decay rate for (167). However any decay rate will suit for the present proof of the replica formula. Acknowledgments Jean Barbier acknowledges funding from the Swiss National Science Foundation (grant 200021-156672). Florent Krzakala acknowledges funding from the ERC under the European Union 7th Framework Programme Grant Agreement 307087-SPARCS. Lenka Zdeborová acknowledges funding from the European Research Council (ERC) under the European Union’s Horizon 2020 research and innovation programme (grant agreement No 714608 - SMiLe). Part of this work was done while Léo Miolane was visiting EPFL. 54 References [1] Github repository of numerical experiments for the current paper. https://github.com/sphinxteam/ GeneralizedLinearModel2017, 2017. [2] E. Abbe. Community detection and stochastic block models: recent developments. ArXiv e-prints arxiv 1703.10146, March 2017. [3] Madhu Advani and Surya Ganguli. An equivalence between high dimensional bayes optimal inference and m-estimation. In Advances in Neural Information Processing Systems, pages 3378–3386, 2016. [4] Carlo Baldassi, Christian Borgs, Jennifer T. Chayes, Alessandro Ingrosso, Carlo Lucibello, Luca Saglietti, and Riccardo Zecchina. Unreasonable effectiveness of learning neural networks: From accessible states and robust ensembles to basic algorithmic schemes. Proceedings of the National Academy of Sciences, 113(48):E7655–E7662, 2016. [5] Carlo Baldassi, Alfredo Braunstein, Nicolas Brunel, and Riccardo Zecchina. Efficient supervised learning in networks with binary synapses. Proceedings of the National Academy of Sciences, 104(26):11079–11084, 2007. [6] J. Barbier, M. Dia, and N. Macris. Proof of threshold saturation for spatially coupled sparse superposition codes. In 2016 IEEE International Symposium on Information Theory (ISIT), pages 1173–1177, July 2016. [7] J. Barbier, F. Krzakala, L. Zdeborová, and P. Zhang. The hard-core model on random graphs revisited. In Journal of Physics Conference Series, volume 473 of Journal of Physics Conference Series, page 012021, December 2013. [8] J. Barbier, N. Macris, and L. Miolane. The Layered Structure of Tensor Estimation and its Mutual Information. In 47th Annual Allerton Conference on Communication, Control, and Computing (Allerton), September 2017. [9] Jean Barbier. Statistical physics and approximate message-passing algorithms for sparse linear estimation problems in signal processing and coding theory. PhD thesis, Université Paris Diderot, 2015. [10] Jean Barbier, Mohamad Dia, Nicolas Macris, and Florent Krzakala. The mutual information in random linear estimation. In 2016 54th Annual Allerton Conference on Communication, Control, and Computing (Allerton), 2016. [11] Jean Barbier, Mohamad Dia, Nicolas Macris, Florent Krzakala, Thibault Lesieur, and Lenka Zdeborová. Mutual information for symmetric rank-one matrix estimation: A proof of the replica formula. In Advances in Neural Information Processing Systems 29, page 424–432. 2016. [12] Jean Barbier and Florent Krzakala. Approximate message-passing decoder and capacity-achieving sparse superposition codes. [13] Jean Barbier and Nicolas Macris. The stochastic interpolation method: A simple scheme to prove replica formulas in bayesian inference. Arxiv preprints arxiv 1705.02780, 2017. [14] Jean Barbier, Nicolas Macris, Mohamad Dia, and Florent Krzakala. Mutual information and optimality of approximate message-passing in random linear estimation. arXiv preprint arXiv:1701.05823, 2017. [15] A. R. Barron and A. Joseph. Toward fast reliable communication at rates near capacity with gaussian noise. In 2010 IEEE International Symposium on Information Theory, pages 315–319, June 2010. [16] Eric B Baum and Yuh-Dauh Lyuu. The transition to perfect generalization in perceptrons. Neural computation, 3(3):386–401, 1991. 55 [17] M. Bayati and A. Montanari. The lasso risk for gaussian matrices. IEEE Transactions on Information Theory, 58(4):1997–2017, April 2012. [18] Mohsen Bayati, Marc Lelarge, and Andrea Montanari. Universality in polytope phase transitions and message passing algorithms. The Annals of Applied Probability, 25(2):753–822, 2015. [19] Mohsen Bayati and Andrea Montanari. The dynamics of message passing on dense graphs, with applications to compressed sensing. IEEE Transactions on Information Theory, 57(2):764–785, Feb 2011. [20] Stéphane Boucheron, Gábor Lugosi, and Olivier Bousquet. Concentration inequalities. In Advanced Lectures on Machine Learning, pages 208–240. Springer, 2004. [21] Petros T Boufounos and Richard G Baraniuk. 1-bit compressive sensing. In Information Sciences and Systems, 2008. CISS 2008. 42nd Annual Conference on, pages 16–21. IEEE, 2008. [22] Peter Bühlmann and Sara Van De Geer. Statistics for high-dimensional data: methods, theory and applications. Springer Science & Business Media, 2011. [23] F. Caltagirone, M. Lelarge, and L. Miolane. Recovering asymmetric communities in the stochastic block model. ArXiv e-prints, October 2016. [24] E. J. Candes and T. Tao. Near-optimal signal recovery from random projections: Universal encoding strategies? IEEE Transactions on Information Theory, 52(12):5406–5425, Dec 2006. [25] Sourav Chatterjee et al. A generalization of the lindeberg principle. The Annals of Probability, 34(6):2061– 2076, 2006. [26] François Chollet. keras. https://github.com/fchollet/keras, 2015. [27] A. Decelle, F. Krzakala, C. Moore, and L. Zdeborová. Inference and Phase Transitions in the Detection of Modules in Sparse Networks. Physical Review Letters, 107(6):065701, August 2011. [28] David Donoho and Andrea Montanari. High dimensional robust m-estimation: asymptotic variance via approximate message passing. Probability Theory and Related Fields, 166(3):935–969, Dec 2016. [29] David Donoho and Jared Tanner. Observed universality of phase transitions in high-dimensional geometry, with implications for modern data analysis and signal processing. Philosophical Transactions of the Royal Society of London A: Mathematical, Physical and Engineering Sciences, 367(1906):4273–4293, 2009. [30] David L. Donoho, Arian Maleki, and Andrea Montanari. Message-passing algorithms for compressed sensing. Proc. Natl. Acad. Sci., 106(45):18914–18919, 2009. [31] David L Donoho, Arian Maleki, and Andrea Montanari. Message-passing algorithms for compressed sensing. Proceedings of the National Academy of Sciences, 106(45):18914–18919, Nov 2009. [32] Viktor Dotsenko. An introduction to the theory of spin glasses and neural networks, volume 54. World Scientific, 1995. [33] Noureddine El Karoui, Derek Bean, Peter J. Bickel, Chinghway Lim, and Bin Yu. On robust regression with high-dimensional predictors. Proceedings of the National Academy of Sciences, 110(36):14557–14562, 2013. [34] Andreas Engel and Christian Van den Broeck. Statistical mechanics of learning. Cambridge University Press, 2001. [35] Konrad H Fischer and John A Hertz. Spin glasses, volume 1. Cambridge university press, 1993. 56 [36] Elizabeth Gardner and Bernard Derrida. Three unfinished works on the optimal storage capacity of networks. Journal of Physics A: Mathematical and General, 22(12):1983, 1989. [37] Tom Goldstein and Christoph Studer. Phasemax: Convex phase retrieval via basis pursuit. arXiv preprint arXiv:1610.07531, 2016. [38] Rémi Gribonval and Pierre Machart. Reconciling" priors" &" priors" without prejudice? In Advances in Neural Information Processing Systems, pages 2193–2201, 2013. [39] Francesco Guerra and Fabio Lucio Toninelli. The thermodynamic limit in mean field spin glass models. Communications in Mathematical Physics, 230(1):71–79, 2002. [40] Dongning Guo, S. Shamai, and S. Verdú. Mutual information and minimum mean-square error in gaussian channels. IEEE Transactions on Information Theory, 51(4):1261–1282, April 2005. [41] Dongning Guo and Sergio Verdú. Randomly spread cdma: Asymptotics via statistical physics. IEEE Transactions on Information Theory, 51(6):1983–2010, June 2005. [42] Géza Györgyi. First-order transition to perfect generalization in a neural network with binary synapses. Physical Review A, 41(12):7097, 1990. [43] D Hansel, G Mato, and C Meunier. Memorization without generalization in a multilayered neural network. EPL (Europhysics Letters), 20(5):471, 1992. [44] Tadaaki Hosaka, Yoshiyuki Kabashima, and Hidetoshi Nishimori. Statistical mechanics of lossy data compression using a nonmonotonic perceptron. Physical Review E, 66(6):066126, 2002. [45] Adel Javanmard and Andrea Montanari. State evolution for general approximate message passing algorithms, with applications to spatial coupling. Information and Inference: A Journal of the IMA, 2(2):115– 144, 2013. [46] Y Kabashima. Inference from correlated patterns: a unified theory for perceptron learning and linear vector channels. Journal of Physics: Conference Series, 95(1):012001, 2008. [47] S. B. Korada and N. Macris. Tight bounds on the capacity of binary input random cdma systems. IEEE Transactions on Information Theory, 56(11):5590–5613, Nov 2010. [48] Satish Babu Korada and Nicolas Macris. Exact solution of the gauge symmetric p-spin glass model on a complete graph. Journal of Statistical Physics, 136(2):205–230, 2009. [49] Satish Babu Korada and Andrea Montanari. Applications of the Lindeberg principle in communications and statistical learning. IEEE Transactions on Information Theory, 57(4):2440–2450, 2011. [50] F. Krzakala, A. Montanari, F. Ricci-Tersenghi, G. Semerjian, and L. Zdeborová. Gibbs states and the set of solutions of random constraint satisfaction problems. Proceedings of the National Academy of Science, 104:10318–10323, June 2007. [51] F. Krzakala, C. Moore, E. Mossel, J. Neeman, A. Sly, L. Zdeborová, and P. Zhang. Spectral redemption in clustering sparse networks. Proceedings of the National Academy of Science, 110:20935–20940, December 2013. [52] Florent Krzakala, Marc Mézard, François Sausset, YF Sun, and Lenka Zdeborová. Statistical-physicsbased reconstruction in compressed sensing. Phys. Rev. X, 2:021005(18), May 2012. [53] Florent Krzakala, Marc Mézard, Francois Sausset, Yifan Sun, and Lenka Zdeborová. Probabilistic reconstruction in compressed sensing: algorithms, phase diagrams, and threshold achieving matrices. Journal of Statistical Mechanics: Theory and Experiment, 2012(08):P08009(57), 2012. 57 [54] Yann LeCun, Yoshua Bengio, and Geoffrey Hinton. Deep learning. Nature, 521(7553):436–444, 2015. [55] M. Lelarge and L. Miolane. Fundamental limits of symmetric low-rank matrix estimation. ArXiv e-prints, November 2016. [56] T. Lesieur, L. Miolane, M. Lelarge, F. Krzakala, and L. Zdeborová. Statistical and computational phase transitions in spiked tensor estimation. ArXiv e-prints, January 2017. [57] N. Macris. Griffith-Kelly-Sherman correlation inequalities: A useful tool in the theory of error correcting codes. IEEE Transactions on Information Theory, 53(2):664–683, Feb 2007. [58] M Mézard. The space of interactions in neural networks: Gardner’s computation with the cavity method. Journal of Physics A: Mathematical and General, 22(12):2181–2190, 1989. [59] Marc Mezard and Andrea Montanari. Information, physics, and computation. Oxford University Press, 2009. [60] Marc Mézard, Giorgio Parisi, and Miguel-Angel Virasoro. Spin glass theory and beyond. 1987. [61] Paul Milgrom and Ilya Segal. Envelope theorems for arbitrary choice sets. Econometrica, 70(2):583–601, 2002. [62] L. Miolane. Fundamental limits of low-rank matrix estimation: the non-symmetric case. ArXiv e-prints, February 2017. [63] Andrea Montanari. Estimating random variables from random sparse observations. European Transactions on Telecommunications, 19(4):385–403, 2008. [64] John Ashworth Nelder and R Jacob Baker. Generalized linear models. Wiley Online Library, 1972. [65] Hidetoshi Nishimori. Statistical physics of spin glasses and information processing: an introduction, volume 111. Clarendon Press, 2001. [66] Manfred Opper and David Haussler. Generalization performance of bayes optimal classification algorithm for learning a perceptron. Physical Review Letters, 66(20):2677, 1991. [67] Samet Oymak, Amin Jalali, Maryam Fazel, Yonina C Eldar, and Babak Hassibi. Simultaneously structured models with application to sparse and low-rank matrices. IEEE Transactions on Information Theory, 61(5):2886–2908, 2015. [68] F. Pedregosa, G. Varoquaux, A. Gramfort, V. Michel, B. Thirion, O. Grisel, M. Blondel, P. Prettenhofer, R. Weiss, V. Dubourg, J. Vanderplas, A. Passos, D. Cournapeau, M. Brucher, M. Perrot, and E. Duchesnay. Scikit-learn: Machine learning in Python. Journal of Machine Learning Research, 12:2825–2830, 2011. [69] Francisco J Piera and Patricio Parada. On convergence properties of shannon entropy. Problems of Information Transmission, 45(2):75–94, 2009. [70] S. Rangan. Generalized approximate message passing for estimation with random linear mixing. In 2011 IEEE International Symposium on Information Theory Proceedings, pages 2168–2172, July 2011. [71] G. Reeves and H. D. Pfister. The replica-symmetric prediction for compressed sensing with gaussian matrices is exact. In 2016 IEEE International Symposium on Information Theory (ISIT), pages 665–669, July 2016. [72] Tom Richardson and Ruediger Urbanke. Modern coding theory. Cambridge university press, 2008. [73] H. S. Seung, H. Sompolinsky, and N. Tishby. Statistical mechanics of learning from examples. Phys. Rev. A, 45:6056–6091, Apr 1992. 58 [74] Claude E Shannon. A mathematical theory of communication, part i, part ii. Bell Syst. Tech. J., 27:623–656, 1948. [75] Mahdi Soltanolkotabi. Structured signal recovery from quadratic measurements: Breaking sample complexity barriers via nonconvex optimization. arXiv preprint arXiv:1702.06175, 2017. [76] Michel Talagrand. Mean field models for spin glasses: Volume I: Basic examples, volume 54. Springer Science & Business Media, 2010. [77] Toshiyuki Tanaka. A statistical-mechanics approach to large-system analysis of cdma multiuser detectors. IEEE Transactions on Information Theory, 48(11):2888–2910, Nov 2002. [78] David J Thouless, Philip W Anderson, and Robert G Palmer. Solution of‘solvable model of a spin glass’. Philosophical Magazine, 35(3):593–601, 1977. [79] Jeremy P Vila and Philip Schniter. Expectation-maximization gaussian-mixture approximate message passing. IEEE Transactions on Signal Processing, 61(19):4658–4672, 2013. [80] Martin J Wainwright, Michael I Jordan, et al. Graphical models, exponential families, and variational inference. Foundations and Trends® in Machine Learning, 1(1–2):1–305, 2008. [81] Timothy L. H. Watkin, Albrecht Rau, and Michael Biehl. The statistical mechanics of learning a rule. Rev. Mod. Phys., 65:499–556, Apr 1993. [82] Yihong Wu and Sergio Verdú. Optimal phase transitions in compressed sensing. IEEE Transactions on Information Theory, 58(10):6241–6263, Oct 2012. [83] Yingying Xu, Yoshiyuki Kabashima, and Lenka Zdeborová. Bayesian signal reconstruction for 1-bit compressed sensing. Journal of Statistical Mechanics: Theory and Experiment, 2014(11):P11015, 2014. [84] Lenka Zdeborová and Florent Krzakala. Statistical physics of inference: thresholds and algorithms. Advances in Physics, 65(5):453–552, 2016. [85] Justin Ziniel, Philip Schniter, and Per Sederberg. Binary linear classification and feature selection via generalized approximate message passing. In Information Sciences and Systems (CISS), 2014 48th Annual Conference on, pages 1–6. IEEE, 2014. 59
2cs.AI
arXiv:1710.02333v1 [stat.ME] 6 Oct 2017 Goodness-of-fit tests for complete spatial randomness based on Minkowski functionals of binary images Bruno Ebner, Norbert Henze, Michael A. Klatt∗ Institute of Stochastics, Karlsruhe Institute of Technology (KIT), Englerstr. 2, D-76131 Karlsruhe, Germany and Klaus Mecke Institute of Theoretical Physics 1, University Erlangen-Nürnberg, Staudtstr. 7, D-91058 Erlangen, Germany October 9, 2017 Abstract We propose a class of goodness-of-fit tests for complete spatial randomness (CSR). In contrast to standard tests, our procedure utilizes a transformation of the data to a binary image, which is then characterized by geometric functionals. Under a suitable limiting regime, we derive the asymptotic distribution of the test statistics under the null hypothesis and almost sure limits under certain alternatives. The new tests are computationally efficient, and simulations show that they are strong competitors to other tests of CSR. The tests are applied to a real data set in gamma-ray astronomy, and immediate extensions are presented to encourage further work. Keywords: Poisson point process, geometric functionals, nonparametric methods, thresholding procedure, astroparticle physics ∗ The author gratefully acknowledges funding by the German Research Foundation (DFG) via the Grants No. HU1874/3-2 and No. LA965/6-2 awarded as part of the DFG-Forschergruppe FOR 1548 “Geometry and Physics of Spatial Random Systems”. 1 1 Introduction The statistical analysis of spatial point pattern data in a given study area S (often called the observation window) is a classical task in many applications, including biostatistics (e.g. structure analysis, Dazzo et al. (2015)), astronomy (e.g. detection of gamma-ray sources, Göring et al. (2013)), military (e.g. mine field detection, Lake and Keenan (1995)) and medicine (e.g. cluster detection in leukemia incidence, Wheeler (2007)). A main objective is to characterize possible departures from so-called complete spatial randomness (CSR) of point patterns, which characterizes the absence of structure in data. CSR models the non-occurrence of dependence of point events within a given study area S, and it is synonymous with a homogeneous spatial Poisson point process (PPP). For an introduction to the concept of CSR we refer to Cressie (1993), Section 8.4, and Okabe et al. (1992), Chapter 8. To be precise, we model the observed data by P λ ∶= {X1 , . . . , XNλ }, where λ > 0, (Xj )j≥1 is a sequence of independent identically distributed random vectors taking values in S, and Nλ is a nonnegative integer-valued random variable, independent of (Xj )j≥1 , with a distribution that depends on some parameter λ > 0. All random elements are defined on the same probability space (Ω, A, P). For Pλ to be CSR the (Xj )j≥1 are uniformly distributed on S, and Nλ has a Poisson distribution with expectation λ. The assumption of CSR will be called the null hypothesis H0 , and our aim is to test H0 against general alternatives. The problem has been considered in the literature, for a good overview of the existing methods, see e.g. Cressie (1993); Illian et al. (2008); Møller and Waagepetersen (2003). Different approaches to construct a test of CSR include quadrat counts, distance methods (e.g. nearest neighbor and empty spaces), second-order characteristics like the K- or the 2 L-function, or other measures of dependence. The related problem of testing for uniformity of point patterns with a fixed number of points (i.e. if P(Nλ = n) = 1 for some n) has been extensively investigated in the univariate case (see Marhuenda et al. (2005) for a survey), but also in the multivariate setting, see Berrendero et al. (2012, 2006); Ebner et al. (2016); Justel et al. (1997); Liang et al. (2001); Tenreiro (2007). Our novel idea to test for CSR is to convert the point data within the observation window S into a binary image, and then to evaluate this random image by means of the so-called Minkowski functionals from integral geometry, see Schneider and Weil (2008). Such functionals encompass standard geometric parameters, such as volume, (surface) area, perimeter, and the Euler characteristic, which are robust and efficient shape descriptors that have already been successfully applied to a variety of applications, see Schröder-Turk et al. (2011); Klatt (2016) and the references therein. These data driven and hence random functionals are examined under the assumption of an homogeneous PPP. We determine the mean values and their variance-covariance structure, which opens the ground for different test statistics. Moreover, we analyze an experimental data set by the Fermi Gamma-ray Space Telescope, see Acero et al. (2015). The Fermi sky map includes features whose physical causes are still unknown. New statistical methods could help to clarify some of these open questions. The paper is organized as follows. In the next section we explain the transition of the data to a binary image using a binning and a threshold procedure. Section 3 deals with calculating the Minkowski functionals in an efficient way, while Section 4 provides the mean values and the variance structure under the hypothesis. In Section 5 we propose different test statistics and derive their H0 -asymptotics under some suitable limiting regime. The complete covariance structure between the functionals as well as statistics using more than one functional are presented in Section 6. Section 7 is devoted to questions of the behaviour 3 of the tests under an inhomogeneous Poisson Process alternative. In Section 8 and Section 9, simulation results as well as a data example illustrate the efficiency of the presented methods. We finally state possible extensions and open problems in Section 10. 2 Transition to a binary digital image We consider bivariate random point data X1 , . . . , XNλ in a square observation window that without loss of generality is taken to be the unit square S = [0, 1]2 . In a first step, we divide [0, 1]2 into m2 pairwise disjoint squares (m) Ci,j ∶= [ j−1 j i−1 i , :×[ , :, m m m m i, j ∈ {1, . . . , m}, (1) that are termed cells or bins. Here, the symbol ”7” stands for a closing round bracket if i < m and/or j < m and for a closing squared bracket if i = m and/or j = m. Here and (m) 2 in the sequel we assume m ≥ 3. We thus have ⋃m i,j=1 Ci,j = [0, 1] . Denote by 1{A} the indicator function of an event A, and let Y = (Yi,j )1≤i,j≤m be the random (m × m)-matrix having entries (m) Yi,j = Yi,j Nλ (m) ∶= ∑ 1{X` ∈ Ci,j }. (2) `=1 Realizations of Y can be visualized by a counts map, as seen in Figure 1 (left). In dependence of a threshold parameter c ∈ N, we introduce a random (m + 2) × (m + 2)matrix Z = (Zi,j )i,j=0,...,m+1 , which is called the digital or binary image. Here, (m) (m) Zi,j = Zi,j (c) ∶= 1{Yi,j ≥ c} if i, j ∈ {1, . . . , m} (m) and Z0,j = Zm+1,j = Zi,0 = Zi,m+1 = 0 for i, j = 1, . . . , m. If we color a cell Ci,j black or white according to whether Zi,j = 1 or Zi,j = 0, we obtain a binary (black and white) image, as (m) given in Figure 2. Notice that, by definition, there is a white border around the cells Ci,j , 4 35 Yij 40 25 30 Yij 30 20 20 10 15 4 10 8 i 12 16 20 4 16 12j 8 20 Figure 1: Counts map of a realization of a homogeneous Poisson process (left) and visualization of the threshold procedure (right) 1 ≤ i, j ≤ m, which is needed for the sake of comparability of the Minkowski functionals. The concept of binary images has wide applications in computer science and image analysis, see Klette and Rosenfeld (2004); Kong and Rosenfeld (1996). In this respect, many algorithmic tools have been developed which are useful in simulations, see for instance Legland et al. (2007). 3 Minkowski Functionals and Local Dependency The main idea underlying the new tests of CSR is to evaluate the resulting binary image by means of geometric functionals. In the bivariate case, there are three Minkowski functionals, namely the area, the perimeter, and the Euler characteristic. Knowledge of the values of these functionals does not characterize the binary image. Nevertheless, Hadwiger’s characterization theorem states that every functional acting on nonempty compact convex subsets of Rd , d ∈ N, that is additive, continuous and invariant under rigid motions can be written as a linear combination of the Minkowski functionals, for details see Schneider and 5 Figure 2: Two binary images of an underlying homogeneous Poisson process for different threshold parameters c (left c = 23, right c = 27) and fixed cell number parameter m = 20 Weil (2008), p. 628. A natural question is: Given a m × m binary image with white border, how can these functionals be computed in an efficient way? Obviously, we can calculate the area by simply counting the black cells, but the answer for the other functionals is more involved. However, results from image analysis allow to establish a look-up table like Table 1 (even in higher dimensions), see Gray (1971); Mantz et al. (2008); Mecke, K. and Stoyan, D. (Eds.) (2000) for early versions in two dimensions and Kong and Rosenfeld (1989) for a survey. Here, we move a small (2×2)-window over the whole digital image (from top left to bottom right) and sum up the values given in the table according to the observed configuration. A basic feature of the structure underlying the look-up table is that each cell can only have an effect on the 8 neighboring cells, which implies a local dependency structure. Given a random digital image Z, we thus define 1 m Am,c ∶= ∑ Zi,j m i,j=1 6 (3) Table 1: Look-up table for Minkowski functionals: the functional values of the area A, the perimeter P , and the Euler characteristic χ are assigned to each 2×2-combination of pixels. The unit of length is the edge-length of a pixel. Configuration A P χ Configuration A P χ 1 0 0 0 9 1/4 1 1/4 2 1/4 1 1/4 10 1/2 2 -1/2 3 1/4 1 1/4 11 1/2 1 0 4 1/2 1 0 12 3/4 1 -1/4 5 1/4 1 1/4 13 1/2 1 0 6 1/2 1 0 14 3/4 1 -1/4 7 1/2 2 -1/2 15 3/4 1 -1/4 8 3/4 1 -1/4 16 1 0 0 as the (scaled) total area covered by ’non-border’ cells, the counts of which exceed the threshold c, and the perimeter Pm,c ∶= 1 m ∑ ψ(Zi,j ), m i,j=1 (4) where, for i, j ∈ {1, . . . , m}, ⎧ ⎪ ⎪ 0, if Zi,j = 0, ⎪ ψ(Zi,j ) ∶= ⎨ ⎪ ⎪ 4 − (Zi−1,j + Zi+1,j + Zi,j−1 + Zi,j+1 ), if Zi,j = 1. ⎪ ⎩ Motivated by look-up Table 1, we finally study the (scaled) Euler characteristic χm,c ∶= 1 m ∑ Wi,j , m i,j=1 7 (5) where, putting Si,j ∶= Zi,j + Zi+1,j + Zi,j+1 + Zi+1,j+1 , Wi,j ⎧ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ∶= ⎨ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎩ 1/4, if Si,j = 1, −1/4, if Si,j = 3, −1/2, if Si,j = 2 and Zi,j Zi+1,j+1 = 1 or Zi+1,j Zi,j+1 = 1, 0, otherwise . (6) Each of these functionals is a sum of random variables that depend on the color of the (m) cells Ci,j . Notice that the summands figuring in (4) and (5) are neither independent nor identically distributed. In view of the (2 × 2) observation window that is moved over the binary picture, one can compute each functional as a weighted sum of indicators. As an example, the product (1 − Zi,j )(1 − Zi,j+1 )(1 − Zi+1,j )Zi+1,j+1 is the indicator of the occurrence of configuration 2 of the look-up Table 1 at (top left bin) position (i, j). Implementing the look-up table and summing up over all positions with the appropriate weights, one obtains an alternative representation of each of the functionals. For instance, the (scaled) Euler characteristic takes the form χm,c = 1 m 1 (m) (m) (m) (m) + Zi,j+1 + Zi+1,j + Zi+1,j+1 ) ∑ (Z m i,j=1 4 i,j 1 (m) (m) (m) (m) (m) (m) (m) (m) − (Zi,j Zi+1,j + Zi,j Zi,j+1 + Zi,j+1 Zi+1,j+1 + Zi+1,j Zi+1,j+1 2 (m) (m) (m) (m) (m) (m) (m) +2Zi,j Zi+1,j+1 + 2Zi,j+1 Zi+1,j ) + Zi,j Zi,j+1 Zi+1,j (m) (m) (m) (m) (m) (m) (m) (m) (m) (m) (m) (m) +Zi,j Zi,j+1 Zi+1,j+1 + Zi,j Zi+1,j Zi+1,j+1 + Zi,j+1 Zi+1,j Zi+1,j+1 (m) −Zi,j Zi,j+1 Zi+1,j Zi+1,j+1 . This representation will be used in the proof of Theorem 7.3. 8 (7) 4 Mean and Variance under H0 To establish a test statistic for CSR we need some characteristics like the mean, the variance and the covariance of the Minkowski functionals under the hypothesis H0 . In case of CSR the random variable Zi,j follows the binomial distribution Bin(1, pc ) where pc = P(Zi,j = 1) = P(Yi,j ≥ c), depends on the underlying known intensity λ of Pλ and the threshold c. Under H0 , we have ∞ pc ∶= pc (λ, m) = ∑ exp (− k=c λ c−1 (λ/m2 )k λ (λ/m2 )k ) = 1 − exp (− )∑ . m2 k! m2 k=0 k! (8) Clearly, if the parameter λ is unknown, we will have to estimate it with a good estimator. The natural way to estimate the intensity of a stationary planar Poisson process is to count the number of points falling into an observation window, and to divide this number by the area of the window which, in our case, is one. For more information on estimation techniques see for instance Gaetan and Guyon (2010), section 5.5.2.1, or for newer developments Coeurjolly (2017) and the references therein. By the extreme independence property of homogeneous Poisson processes, the Zi,j , i, j = 1, . . . , m, are independent, and it follows that m D ∑ Zi,j = Bin(m2 , pc ), i,j=1 D where ”=” means equality in distribution. Thus, the expected (scaled) total area covered by non-border cells is given by µA (pc ) ∶= E [Am,c ] = 1 m ∑ E [Zi,j ] = mpc . m i,j=1 9 Taking into account the boundary effects, we have ⎧ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ E [ψ(Zi,j )] = ⎨ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎩ pc (4 − 4pc ), if i, j ∈ {2, . . . , m − 1}, pc (4 − 3pc ), if i ∈ {1, m}, j ∈ {2, . . . , m − 1}, pc (4 − 3pc ), if j ∈ {1, m}, i ∈ {2, . . . , m − 1}, pc (4 − 2pc ), if i, j ∈ {1, m}, and the expected perimeter is given by µP (pc ) ∶= E [Pm,c ] = 1 m ∑ E [ψ(Zi,j )] = 4pc (m − (m − 1)pc ). m i,j=1 Moreover, the expected Euler characteristic is µχ (pc ) ∶= E [χm,c ] = = 1 m ∑ E [Wij ] m i,j=1 1 (pc + 2(m − 1)pc (1 − pc ) + (m − 1)2 pc (1 − pc )(p2c − 3pc + 1)) . m Thus, each of the mean values of the Minkowski functionals is a function of the probability pc , which in turns depends on m, the intensity λ, and the threshold parameter c. The variances are given in the next theorem. Theorem 4.1 Under H0 we have σA2 ∶= V(Am,c ) = pc (1 − pc ), 8 σP2 ∶= V(Pm,c ) = pc (1 − pc ) ((7m2 − 13m + 4)p2c − 7m(m − 1)pc + 2m2 ) , m2 1 σχ2 ∶= V(χm,c ) = pc (1 − pc ){ (9m2 − 30m + 25) p6c − (59m2 − 194m + 159) p5c m2 + (137m2 − 434m + 341) p4c − (139m2 − 406m + 291) p3c + (64m2 − 158m + 94) p2c − (12m2 − 18m + 6) pc + m2 }. 10 Proof: Since the method of computation is the same for each of these formulas, we only illustrate the reasoning by computing σP2 . To this end, observe that the perimeter can alternatively be written as Pm,c = 1 m ∑ Vi,j , m i,j=1 (9) where, putting Si,j ∶= Zi,j + Zi+1,j + Zi,j+1 + Zi+1,j+1 and invoking Table 1, ⎧ ⎪ 1, ⎪ ⎪ ⎪ ⎪ ⎪ ∶= ⎨ 2, ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎩ 0, Vi,j if Si,j ∈ {1, 3}, if Si,j = 2 and Zi,j Zi+1,j+1 = 1 or Zi+1,j Zi,j+1 = 1, (10) otherwise. Notice that Vi,j assigns one of the values 0, 1 or 2 to each (2 × 2)-window, where the upper left bin is at position (i, j) in the binary picture. We have ⎛ m 1 ⎜ V(Vi,j ) + V(Pm,c ) = 2 ⎜ ∑ m ⎜ ⎜i,j=1 ⎝ m+1 ∑ i, j, k, ` = 1 (i, j) = / (k, `) ⎞ ⎟ Cov(Vi,j , Vk,` )⎟ ⎟. ⎟ ⎠ To compute the sum of the variances, observe that V(V1,1 ) = pc (1 − pc ), V(V1,2 ) = pc (2 − pc )(1 − pc (2 − pc )), V(V2,2 ) = 4pc (1 − pc )(3p2c − 3pc + 1). By symmetry, we have m ∑ V(Vi,j ) = 4V(V1,1 ) + 4(m − 1)V(V1,2 ) + (m − 1)2 V(V2,2 ). i,j=1 The computation of the sum of covariances uses the methods presented in the proof of Theorem 6.1. Summing everything up and simplifying the results leads to the stated formulas. ◻ 11 5 Testing procedures and H0-asymptotics In view of the previous sections a natural way to define the new tests is to standardize the data driven Minkowski functionals under H0 in dependence of a fixed threshold parameter c. We thus propose 1 2 (Am,c − µA (pc )) , σA 1 2 TP (c; X1 , . . . , XNλ ) = (Pm,c − µP (pc )) , σP 1 2 Tχ (c; X1 , . . . , XNλ ) = (χm,c − µχ (pc )) . σχ TA (c; X1 , . . . , XNλ ) = (11) (12) (13) Observe that the variances given in Theorem 4.1 and the probability pc depend on c, m and λ. Rejection of H0 is for large values of TA , TP or Tχ . For the sake of simplicity we assume that λ is known, perhaps on the basis of previous experiments. If λ has to be estimated, the method of estimation will have effects on the asymptotic statements derived below, as pointed out in Heinrich (2015). Throughout this section we assume that H0 holds. To derive the limits in distribution of the Minkowski functionals we consider the limiting regime λ → ∞, m → ∞, λ →κ m2 (14) for some κ ∈ (0, ∞). Under this regime, lim E [Yi,j ] = κ for each pair (i, j) and the probability pc = pc (λ, m) figuring in (8) converges to c−1 κk , k=0 k! pc (κ) = 1 − e−κ ∑ where 0 < pc (κ) < 1. By the central limit theorem we obviously have Am,λ (c) ∶= 1 D (Am,c − µA (pc )) Ð→ N(0, 1) σA 12 (15) D under (14), where the symbol Ð→ means convergence in distribution of random variables and vectors. If c = 1 and m is fixed, the test based on Am,1 is related to the empty boxes test, see Viktorova and Chistyakov (1966) if P(Nλ = n) = 1. Notice that, by the multivariate central limit theorem, we have the convergence in distribution of (Am,λ (c1 ), . . . , Am,λ (cs ))′ to some centred s-variate normal distribution, for any choice of s ≥ 2 and c1 , . . . , cs > 0. Thus, in any conceivable space of random sequences, there is convergence of finitedimensional distributions of a random element Am,λ . However, at least for the separable Banach space of sequences converging to zero, equipped with the supremum norm, the double sequence (Am,λ )m,λ≥1 , where the limit is taken in respect of the limiting regime (14), is not tight. Because of the local geometric dependence of the random variables defining the perimeter and the Euler characteristic, we use tools from random geometric graphs, as stated in Penrose (2004). Let (I, E) be a graph with finite or countable vertex set I. For i, j ∈ I, write i ∼ j if {i, j} ∈ E, where E is the set of edges. For i ∈ I, let Ni ∶= {i} ∪ {j ∈ I ∶ j ∼ i} be the so-called adjacency neighbourhood of i. The graph (I, ∼) is called an dependency graph for a collection of random variables (ξi , i ∈ I), if for any disjoint subsets I1 , I2 of I such that there are no edges connecting I1 and I2 , the collection of random variables (ξi , i ∈ I1 ) is independent of (ξi , i ∈ I2 ). The following result (Penrose (2004), Theorem 2.4), plays a central role in proving the next two statements. Proposition 5.1 Suppose (ξi )i∈I is a finite collection of random variables with dependency graph (I, ∼) having maximum degree D − 1, where E(ξi ) = 0 for each i. Set W ∶= ∑i∈I ξi , and suppose E(W 2 ) = 1. Then sup ∣P(W ≤ t) − Φ(t)∣ ≤ t∈R √ 2 √ 2 3+6 D E∣ξ ∣ D3 ∑ E∣ξi ∣4 , ∑ i (2π)1/4 i∈I i∈I where Φ is the distribution function of a standard normal distribution N(0, 1). 13 The next result concerns the perimeter Pm,c . Theorem 5.2 For each fixed c ∈ N we have under the limiting regime (14) 1 D (Pm,c − µP (pc )) Ð→ N(0, 1). σP Proof: In view of Theorem 5.1 we choose the vertex set I ∶= {i ∶= (i1 , i2 , i1 − 1, i1 + 1, i2 − 1, i2 + 1) ∶ (i1 , i2 ) ∈ {1, . . . , m}2 } and define ξi ∶= 1 (ψ(Zi1 ,i2 ) − E [ψ(Zi1 ,i2 )]) , mσP i ∈ I. (16) ` Then E(ξi ) = 0 and E ∣ψ(Zi1 ,i2 ) − E [ψ(Zi1 ,i2 )]∣ < ∞ if ` ∈ {3, 4} and thus E∣ξi ∣` = (mσP )−` O(1). To construct a dependency graph we write i ∼ j ∶⇐⇒ ∣j1 − i1 ∣ + ∣j2 − i2 ∣ ≤ 2 if i ∈ I is as above and j ∶= (j1 , j2 , j1 − 1, j1 + 1, j2 − 1, j2 + 1) ∈ I. Notice that Ni has at most 13 elements, which shows that, in our case, the constant D figuring in the statement of Theorem 5.1 is 13. With this notation we have W ∶= ∑ ξi = i∈I 1 (Pm,c − E(Pm,c )) . σP Therefore, since σP2 → 8pc (κ)(1 − pc (κ)) (7pc (κ)2 − 7pc (κ) + 2) under the limiting regime (14), putting D = 13 and invoking Proposition 5.1 yields √ 2 √ 2 3+6 D E∣ξ ∣ D3 ∑ E∣ξi ∣4 ∑ i (2π)1/4 i∈I i∈I √ 3 2D 6 D √ = O(1) + O(1) → 0. mσP2 (2π)1/4 mσP3 sup ∣P(W ≤ t) − Φ(t)∣ ≤ t∈R 14 ◻ To handle the Euler characteristic, take I ∶= {i = (i1 , i2 , i1 + 1, i2 + 1) ∶ (i1 , i2 ) ∈ {1, . . . , m}2 } and for i ∈ I, put Si ∶= Zi1 ,i2 + Zi1 ,i2 +1 + Zi1 +1,i2 + Zi1 +1,i2 +1 . In this case, with i as above and j = (j1 , j2 , j1 + 1, j2 + 1) ∈ I, we construct a dependency graph via i ∼ j ∶⇐⇒ max(∣i1 − j1 ∣, ∣i2 − j2 ∣) ≤ 1. Theorem 5.3 Under the limiting regime (14), we have 1 D (χm,c − µχ (pc )) Ð→ N(0, 1) σχ for each fixed c ∈ N. Proof: With the dependency graph given above, the proof parallels that of Theorem 5.2, upon noting that, with ξi∗ ∶= Wi − E [Wi ] , mσχ we have E [∣ξi∗ ∣` ] = O((mσχ )−` ). ◻ The continuous mapping theorem now yields the following result. Corollary 5.4 For fixed c ∈ N, we have under the limiting regime (14) D Tj (c; X1 , . . . , XNλ ) Ð→ χ21 , 6 j ∈ {A, P, χ}. Combinations of more than one functional On the basis of promising results regarding the power of tests of H0 against specific alternatives (see Section 8), we also considered test statistics that make use of more than 15 one of the Minkowski functionals. Such an approach requires knowledge of the covariances σA,P ∶= Cov(Am,c , Pm,c ), σA,χ ∶= Cov(Am,c , χm,c ) and σP,χ ∶= Cov(Pm,c , χm,c ). These are given as follows. Theorem 6.1 Under H0 we have 1 pc (1 − pc )(4m2 (1 − 2pc ) + 8mpc ), m2 1 = pc (1−pc ) (−4(m−1)2 p3c + 12(m−1)2 p2c − 4(m−1)(2m−1)pc + m2 ) , m2 4 = pc (1 − pc ){ (6m2 − 16m + 10) p4c − (22m2 − 56m + 34) p3c m2 + (23m2 − 49m + 24) p2c − (9m2 − 13m + 4) pc + m2 }. σA,P = σA,χ σP,χ Proof: Since the proof is involved due to messy computations, we only show how to compute σP,χ for the case m ≥ 3. The other covariances are tackled in a similar fashion. From (5) and (9), we have σP,χ = m 1 Cov(Vi,j , Wk,` ), ∑ m2 i,j,k,`=1 where Vi,j and Wi,j are given in (10) and (6), respectively. Notice that, due to the underlying local dependence structure, the covariance Cov(Vi,j , Wk,` ) vanishes for each pair (i, j) and (k, `) of cells that are not neighbors in the sense that at least one bin of the respective (2 × 2)-windows overlaps. For neighboring cells, the resulting covariance depends on how the two cells overlap, giving rise to different ’covariance configurations’. To compute the covariances we have to address the following questions. • How many different types of covariance configurations appear in the sum? • What are the formulae for the different covariance configurations? • How often do we have to count each covariance configuration? 16 As for the first question, observe that, due to the white border of the observation window (see Figure 2) and the presence of neighboring cells that have joint bins with the border, we have to distinguish the 7 cases ’corners’, ’side-corners’, ’borders’, ’inner-corners’, ’inner-side-corners’, ’inner-borders’ and ’middle cells’: Each of theses cases gives rise to a separate covariance configuration. In the same order, the answer to the third question for these configurations is 4, 8, 4(m − 3), 4, 8, 4(m − 3), (m − 3)2 . As an example, we compute the covariance formula for two special cases, namely ’corner’ and ’side-corner’. For the case ’corner’, fixing V1,1 and invoking a symmetry argument gives Cov(V1,1 , W1,1 ) + 2Cov(V1,1 , W1,2 ) + Cov(V1,1 , W2,2 ), (17) since the upper left (2 × 2)-window has four neighboring (2 × 2)-windows with intersecting bins. Since, under H0 , the colorings of the single bins are independent, the summands above read 1 Cov(V1,1 , W1,1 ) = pc (1 − pc ), 4 1 Cov(V1,1 , W1,2 ) = pc (1 − pc )(1 − 2pc ), 4 and 1 Cov(V1,1 , W2,2 ) = − pc (1 − pc )(4p3c − 12p2c + 8pc − 1). 4 Thus, the sum figuring in (17) equals pc (1 − pc )4 , which is the contribution to the total covariance of each of the corners. For the case ’side-corner’ we fix V1,2 and, again due to symmetry, have to consider five summands, namely Cov(V1,2 , W1,1 ) + Cov(V1,2 , W1,2 ) + 2Cov(V1,2 , W1,3 ) +Cov(V1,2 , W2,2 ) + Cov(V1,2 , W2,3 ). Calculation of each summand and summing up gives the contribution pc (1−2pc )(2−pc )(1− pc )3 to the total covariance for each ’side-corner’-case of pairs of cells. Counting the number 17 of times that each of the different configurations that yield a non-vanishing contribution to the total covariance can occur and summing up, the final result follows from tedious calculations. ◻ The formulas figuring in Theorem 6.1 have been simplified using the CAS Maple 18, and they have been checked by Monte Carlo simulations in R. The complete covariance structure between the Minkowski functionals is given by the symmetric (3 × 3)-matrix ⎛ σA2 σA,P σA,χ ⎜ Σc,m,λ ∶= ⎜ ⎜ σA,P σP2 σP,χ ⎜ ⎝ σA,χ σP,χ σχ2 ⎞ ⎟ ⎟. ⎟ ⎟ ⎠ The index stresses the dependence of the covariance structure on the threshold parameter c, the underlying intensity λ of the PPP, and on m. The determinant of Σc,m,λ is given by det (Σc,m,λ ) = 8 5 p (1 − pc )3 { − (m2 − 3m + 4)3 p6c m6 c +2(2m2 − 5m + 6)(m2 − 3m + 4)(m2 − 5m + 8)p5c +(−4m6 + 50m5 − 280m4 + 878m3 − 1580m2 + 1552m − 704)p4c +(−4m6 + 22m5 − 302m3 + 828m2 − 880m + 384)p3c + (11m6 − 77m5 + 229m4 − 275m3 + 56m2 + 112m − 64) p2c −4m(m − 1)(2m4 − 9m3 + 20m2 − 18m + 4)pc + 2m3 (m − 1)3 }. According to Maple 18, there is an explicit representation of the inverse of Σc,m,λ , which shows that for 0 < pc < 1 the matrix Σc,m,λ is nonsingular for each pc ∈ (0, 1). This expression, however, is too complicated to be reproduced here. Letting m → ∞ we obtain 18 the asymptotic covariance matrix ⎧ ⎪ ⎛ 0 0 0 ⎪ ⎪ ⎪ ⎪ ⎜ ⎪ Σ ∶= pc (1 − pc ) ⎨diag(0, 0, 9)p6c + diag(0, 0, −59)p5c + ⎜ ⎜ 0 0 24 ⎪ ⎜ ⎪ ⎪ ⎪ ⎪ ⎝ 0 24 137 ⎪ ⎩ ⎛ 0 0 −4 ⎜ +⎜ 0 −88 ⎜ 0 ⎜ ⎝ −4 −88 −139 ⎪ ⎛ 1 4 1 ⎞⎫ ⎪ ⎪ ⎪ ⎜ ⎟⎪ ⎟⎪ . +⎜ ⎜ 4 16 4 ⎟⎬ ⎜ ⎟⎪ ⎪ ⎪ ⎪ ⎝ 1 4 1 ⎠⎪ ⎪ ⎭ ⎞ ⎛ 0 0 12 ⎟ 3 ⎜ ⎟ pc + ⎜ 0 56 92 ⎟ ⎜ ⎟ ⎜ ⎠ ⎝ 12 92 64 ⎞ ⎟ 4 ⎟ pc ⎟ ⎟ ⎠ ⎞ ⎛ 0 −8 −4 ⎟ 2 ⎜ ⎟ pc + ⎜ −8 −56 −36 ⎟ ⎜ ⎟ ⎜ ⎠ ⎝ −4 −36 −12 ⎞ ⎟ ⎟ pc ⎟ ⎟ ⎠ This is nonsingular if 0 < pc < 1, since the inverse matrix is given by −1 Σ−1 ∶= (p2c (1 − pc )4 (p2c − 2)) ⋅ {diag(−9, 0, 0)p6c ⎛ −87 27/2 0 ⎛ 43 −3 0 ⎞ ⎟ 5 ⎜ ⎜ ⎜ ⎟ +⎜ ⎜ −3 0 0 ⎟ pc + ⎜ 27/2 −7/8 0 ⎜ ⎟ ⎜ ⎝ 0 ⎝ 0 0 0 ⎠ 0 0 ⎛ 103 −22 4 ⎞ ⎟ 4 ⎜ ⎟ pc + ⎜ −22 15/4 0 ⎜ ⎟ ⎜ ⎟ ⎝ 4 ⎠ 0 0 ⎞ ⎟ 3 ⎟ pc ⎟ ⎟ ⎠ ⎛ −5 3/2 −1 ⎛ 30 −8 4 ⎞ ⎛ −76 35/2 −8 ⎞ ⎟ ⎜ ⎜ ⎟ 2 ⎜ ⎟ ⎜ ⎜ ⎟ +⎜ ⎜ 35/2 −41/8 1 ⎟ pc + ⎜ −8 5/2 −2 ⎟ pc + ⎜ 3/2 −1/2 1/2 ⎟ ⎜ ⎜ ⎜ ⎟ ⎝ −1 1/2 −1 ⎝ 4 −2 0 ⎠ ⎝ −8 1 0 ⎠ ⎪ ⎞⎫ ⎪ ⎪ ⎪ ⎟⎪ ⎟⎪ . ⎟⎬ ⎟⎪ ⎪ ⎪ ⎪ ⎠⎪ ⎪ ⎭ Since the mean, the variance, and the covariance structure have been computed under H0 , one may expect that, for each value of the threshold parameter c, the standardized vector −1 ⊺ 2 ((Am,c , Pm,c , χm,c ) − µc ) Σc,m,λ 19 −1 2 denotes the symmetric square does not deviate too much from the origin in R3 . Here, Σc,m,λ ⊺ root of Σ−1 c,m,λ , ⊺ stands for the transposition of vectors and matrices, and µc ∶= (µA , µP , µχ ) . Writing ∥ ⋅ ∥ for the Euclidean norm, we define a family of test statistics depending on c, namely −1 ⊺ 2 2 ((Am,c , Pm,c , χm,c ) − µc )∥ Tc (X1 , . . . , XNλ ) ∶= ∥Σc,m,λ ⊺ ⊺ ⊺ = ((Am,c , Pm,c , χm,c ) −µc ) Σ−1 c,m,λ ((Am,c , Pm,c , χm,c ) −µc ) . An asymptotic equivalent alternative to this statistic is ⊺ ⊺ ⊺ T̃c (X1 , . . . , XNλ ) ∶= ((Am,c , Pm,c , χm,c ) − µc ) Σ−1 ((Am,c , Pm,c , χm,c ) − µc ) . Rejection of H0 is for large values of Tc or T̃c . In what follows, we state the asymptotic distributions of Tc and T̃c under H0 . As in Section 5 our main problem is the local dependency structure of the vector (Am,c , Pm,c , χm,c ). Theorem 6.2 Under the limiting regime (14), we have for fixed c ∈ N D a) Tc Ð→ χ23 , D b) T̃c Ð→ χ23 . Proof: We use Theorem 2.2 of Rinott and Rotar (1996). To this end, fix (i, j) ∈ {1, . . . , m}2 , and let S(i,j) be the set of indices of the points that are neighbors of (i, j), enlarged by {(i, j)}. Moreover, put N(i,j) = ⋃(k,`)∈S(i,j) S(k,`) . The set S(i,j) has at most 9 elements, and the cardinality of N(i,j) is at most 81. Arguing as in the example on p. 338 of Rinott and Rotar (1996), we see that each of the constants χ1 , χ2 , χ3 figuring in formula (2.2) of Rinott and Rotar (1996) vanishes. Suppose H is a class of measurable functions from R3 to R 20 which is closed under affine transformation of the argument and satisfies the conditions on p. 335 of Rinott and Rotar (1996). Theorem 2.2 of Rinott and Rotar (1996) then states that, for constants α1 , α2 and W ∶= (Am,c , Pm,c , χm,c ), we have 3 sup{∣E(h(W ))−Φh∣ ∶ h∈H} ≤ 81α1 (α2 Bm + 9m2 α2 Bm (∣ log Bm ∣ + 2 log m)) . Here, Bm is o(1/m), and Φh = ∫R3 h(z)Φ(dz), where Φ denotes the multivariate standard normal distribution function. From the invariance of affine transformations of H, we therefore have under the limiting regime (14) D −1 2 (W − E(W )) Ð→ N3 (0, I3 ), Σc,m,λ where N3 (0, I3 ) denotes a centered three-dimensional normal distribution with unit covariance matrix. Assertion a) then follows from the continuous mapping theorem. Since Σc,mλ → Σ under the limiting regime (14), assertion b) is a consequence of a) and Slutzky’s Lemma. 7 ◻. Asymptotics under alternatives A feasible alternative could be the following: Let f be a continuous Lebesgue density over [0, 1]2 . Suppose Pλf ∶= {X1 , . . . , XNλ } is a Poisson process on [0, 1]2 with intensity function D λf , i.e., (Xj )j≥1 is a sequence of i.i.d. random variables with density f and Nλ = Po(λ), λ independent of (Xj )j≥1 . For a Borel subset A of [0, 1]2 , let Pλf (A) ∶= ∑N i=1 1{Xi ∈ A} be the number of points of Pλf in A. Then, putting pA ∶= ∫A f (x)dx, and conditioning D on Nλ , we have Pλf (A) = Po (λ ∫A f (x)dx). Moreover, for any pairwise disjoint Borel sets B1 , . . . , B` of [0, 1]2 , the random variables Pλf (B1 ), . . . , Pλf (B` ) are independent. Let Am,c , Pm,c and χm,c be defined as in (3), (4) and (5), respectively, where, for fixed c ∈ N, 21 (m) (m) (m) Zi,j ∶= 1{Pλf (Ci,j ) ≥ c} and Ci,j as in (1). Since f is continuous, we have under the limiting regime (14) i j (m) ai,j ∶= λ ∫ (m) f (x)dx ∼ κf ( , ) , m m C (18) i,j where ∼ means asymptotic equivalence under the limiting regime. Moreover, since [0, 1]2 is compact, f is uniformly continuous over [0, 1]2 by the Heine–Cantor theorem. Writing an unspecified integral for integration over the unit square, and denoting c−1 κk f (x)k e−κf (x) , k=0 k! qc,κ,f (x) ∶= ∑ c ≥ 1, κ > 0, x ∈ [0, 1]2 , (19) we have the following result. Theorem 7.1 Under Pλf and the limiting regime (14), we have for fixed c ∈ N 1 a.s. Am,c Ð→ 1 − ∫ qc,κ,f (x)dx. m Proof: Invoking (18) we have E [Am,c ] = = 1 m (m) ∑ P (Pλf (Ci,j ) ≥ c) m i,j=1 c−1 1 1 m (m) (m) k (ai,j ) ) ∑ (1 − ∑ exp (−ai,j ) m i,j=1 k! k=0 1 m 1 (m) (m) k exp (−ai,j ) (ai,j ) , ∑ k=0 k! i,j=1 m c−1 = m−∑ and thus, using the asymptotic equivalence in (18), lim E ( c−1 k 1 κ k −κf (x) Am,c ) = 1 − ∑ dx. ∫ f (x) e m k! k=0 Since V(m−1 Am,c ) ≤ m−2 , Tschebyshev’s inequality gives ∞ ∑ P( m=1 1 ∣Am,c − EAm,c ∣ ≥ ε) < ∞ m 22 (20) for each positive ε. The lemma of Borel-Cantelli yields 1 m (Am,c − EAm,c ) → 0 P-a.s. In view of (20), we are done. ◻ Putting u 1 e−t tc−1 dt, u > 0, (c − 1)! ∫0 for c ∈ N, monotone convergence and a well-known relation between probabilities of level Lc (u) ∶= exceedances of Poisson distributions and the lower incomplete Gamma function yield ∞ κk 1 − ∫ qc,κ,f (x)dx = ∫ ∑ f (x)k e−κf (x) dx k=c k! = ∫ P (Po(κf (x)) ≥ c) dx κf (x) 1 e−t tc−1 dt dx = ∫ (c − 1)! ∫0 = ∫ Lc (κf (x)) dx. If c = 1, Jensen’s inequality shows that this expression attains its maximum value 1 − e−κ if, and only if, f is the uniform density over [0, 1]2 . Such a result that characterizes the uniform distribution by an extremal property does no longer hold if c ≥ 2, since, as is readily seen, the function Lc is strictly convex on (0, c − 1) and strictly concave on (c, ∞). This observation is connected to a two-crossings theorem regarding mixtures from distributions that belong to exponential families, see Shaked (1980) or Karlis and Xekalaki (2005), p. 39. Theorem 7.2 Under Pλf and the limiting regime (14), we have for fixed c ∈ N 1 a.s. Pm,c Ð→ Ic,κ (f ), m where 2 Ic,κ (f ) ∶= 4 (∫ qc,κ,f (x)dx − ∫ qc,κ,f (x)dx) . 23 Proof: For the (scaled) perimeter Pm,c we have E [Pm,c ] = 1 m (m) (m) (m) (m) (m) ∑ E (Zi,j [4 − Zi−1,j − Zi+1,j − Zi,j−1 − Zi,j+1 ]) . m i,j=1 By the complete independence property of Pλf , (m) (m) (m) (m) E [Zi,j Zi−1,j ] = P (Pλf (Ci,j ) ≥ c, Pλf (Ci−1,j ) ≥ c) (m) (m) = P (Pλf (Ci,j ) ≥ c) P (Pλf (Ci−1,j ) ≥ c) , (m) (m) (m) and likewise for E [Zi,j Zi+1,j ] etc. With ai,j in (18) we have c−1 (m) (m) P (Pλf (Ci,j ) ≥ c) = 1 − ∑ exp (−ai,j ) k=0 1 (m) k (ai,j ) k! and thus (m) (m) c−1 (m) E [Zi,j Zi−1,j ] = 1− ∑ exp(−ai,j ) k=0 1 (m) ` 1 (m) k c−1 (m) (ai,j ) − ∑exp(−ai−1,j ) (ai−1,j) k! `! `=0 c−1 1 (m) (m) (m) k (m) ` exp (−ai,j − ai−1,j ) (ai,j ) (ai−1,j ) . k,`=0 k!`! + ∑ It follows that c−1 1 m 1 1 m (m) (m) (m) (m) k exp (−ai,j ) (ai,j ) ∑ E [Zi,j Zi−1,j ] = m − ∑ ∑ m i,j=1 k=0 k! i,j=1 m 1 m 1 (m) (m) ` exp(−ai−1,j)(ai−1,j) ∑ `=0 `! i,j=1 m c−1 −∑ 1 m 1 (m) (m) (m) k (m) ` ∑ exp(−ai,j −ai−1,j) (ai,j ) (ai−1,j) . k,`=0 k!`! i,j=1 m c−1 + ∑ In view of (18), the uniform continuity of f and a symmetry argument give lim c−1 k κ 1 m (m) (m) −κf (x) E [Z Z ] = 1 − 2 f (x)k dx ∑ ∑ ∫ e i,j i−1,j 2 m i,j=1 k! k=0 c−1 κk+` −2κf (x) f (x)k+` dx. ∫ e k!`! k,`=0 + ∑ 24 (21) The same limits arise if we consider 1 m 1 m 1 m (m) (m) (m) (m) (m) (m) E [Z Z ] , E [Z Z ] and ∑ ∑ ∑ E [Zi,j Zi,j+1 ] . i,j i−1,j i,j i,j−1 2 2 2 m i,j=1 m i,j=1 m i,j=1 Since, by Theorem 7.1, we have 1 m (m) ∑ E [Zi,j ] → 1 − ∫ qc,κ,f (x) dx 2 m i,j=1 almost surely, it follows that lim E(m−1 Pm,c ) = Ic,κ (f ). Since V(m−1 Pm,c ) ≤ C1 /m2 for some finite constant C1 , we have lim Pm,c = Ic,κ (f ) almost surely under the limiting regime (14). ◻ Theorem 7.3 Under Pλf and the limiting regime (14), we have for fixed c ∈ N 1 a.s. χm,c Ð→ Jc,κ (f ), m where 4 2 (x) dx. (x) dx) + 1 − ∫ qc,κ,f Jc,κ (f ) ∶= 1 − ∫ qc,κ,f (x) dx − 2 (1 − ∫ qc,κ,f Proof: In view of the techniques used in the previous proofs and formula (7), we have to compute (m) (m) (m) E [Zi,j Zi,j+1 Zi+1,j ] (m) (m) (m) (m) and E [Zi,j Zi,j+1 Zi+1,j Zi+1,j+1 ] . The details are omitted. ◻ Notice that if f is the uniform density on [0, 1]2 then ∫ qc,κ,f (x) dx = 1 − pc (κ), 2 2 ∫ qc,κ,f (x) dx = (1 − pc (κ)) and 4 4 ∫ qc,κ,f (x) dx = (1 − pc (κ)) , 25 where pc (κ) is given in (15). It is easily checked that the almost sure limits obtained are consistent with the formulas of the mean values under H0 , divided by m, with respect to the limiting regime (14). 8 Simulations In this section we compare the finite-sample power of the test based on a single Minkowski functional, i.e. Tj , j ∈ {A, P, χ}, as well as the tests based on Tc and T̃c that make use of all three functionals, with the power of several competitors. All simulations are performed using the statistical computing environment R, see Core Team (2016). Notice that, strictly speaking, the new procedures form a two-parametric class of tests, depending on the threshold parameter c, the mean number (under H0 ) of points in each bin κ and the number m2 of bins. The latter parameter is chosen to fulfill the limiting regime (14), and √ throughout this section we fix m ∶= m(λ, κ) =⌊ λ/κ⌋, where ⌊⋅⌋ is the floor function. Observe that no other choice of m has been considered, so that one might find combinations of m, c and κ that result in a better power performance. The intensity λ of the simulated processes has to be estimated in a prior independent experiment and is therefore considered to be known. In each scenario we consider the intensities λ ∈ {50, 100, 200, 500}, and the nominal level of significance is set to 0.05. Empirical critical values under H0 for Tj , j ∈ {A, P, χ}, Tc and T̃c have been simulated with 100 000 replications (see Tables 2 and 3), and each entry in Tables 4 and 5 referring to the power of the tests is based on 10 000 replications. Notice that the 95% quantile of χ21 is 3.84, and that of χ23 is 7.81. The parameter m is chosen in such a way that, under H0 , the average number of points that fall into one bin is one. Consequently, the fluctuation of the critical values for c = 5 may result from a too small number of black bins. 26 Table 2: Empirical 95% quantiles of Tj , j ∈ {A, P, χ}, for κ = 1 test TA TP Tχ λ/c 1 2 5 1 2 5 1 2 5 50 3.93 4.11 3.33 4.18 3.77 3.38 3.52 4.85 3.48 100 3.65 3.78 7.32 3.89 3.69 7.42 4.41 3.21 1.16 200 3.95 3.88 1.91 3.87 3.89 1.95 3.74 4.22 2.03 500 3.88 3.82 4.37 3.70 3.87 4.45 3.97 3.64 2.08 1000 3.70 3.85 3.58 3.83 3.84 3.67 3.94 4.00 3.89 10000 3.82 3.85 3.69 3.85 3.86 3.70 3.90 3.88 4.07 As competitors to the new tests we considered the following procedures, which are all standard methods included in the package spatstat. We chose these procedures to have representatives of the different approaches, namely quadrat counts, distance methods, and methods based on the K- or the L-function. (i) For the quadrat count χ2 -test, see Baddeley et al. (2015), one divides the observation window into disjoint squares B1 , . . . , Bk with equal area 1/k and counts the number of points U1 , . . . , Uk in each square. Under H0 the Uj are independent Poisson random variables with expected value λ/k. Given the total number of points Nλ = ∑kj=1 Uj the expected count in square Bj is Nλ /k. The test statistic is then (see Baddeley et al. (2015), p. 165, display (6.5)) k (Uj − Nλ /k)2 . Nλ /k j=1 Q=∑ Under the null hypothesis, the limit law of Q is a χ2k−1 distribution. Notice that one should choose k in order to obtain expected counts greater than 5 in each square. Otherwise the approximation of the critical values is too far away from the theoretical 27 Table 3: Empirical 95% quantiles of Tc and T̃c for κ = 1 test Tc T̃c λ/c 1 2 5 1 2 5 50 7.86 8.13 3.55 30.10 9.55 3.59 100 7.81 7.95 7.78 21.54 8.93 7.84 200 7.84 7.88 2.10 17.38 8.47 6.88 500 7.83 7.92 4.87 13.49 8.22 4.89 1000 7.79 7.83 26.54 11.65 8.03 25.68 10000 7.84 7.79 11.73 9.26 7.95 8.98 quantiles. Hence we chose √ √ 4 k ∶= ⌊ λ⌋ to guarantee sufficiently many points in each square. (ii) Hopkins and Skellam (see Hopkins (1954); Skellam (1954) and, for more details, Baddeley et al. (2015), p. 259) proposed a test based on the combination of nearest neighbor distances and empty space distances. Consider a subsample of size n of the data and compute the nearest neighbor distances Di , i = 1, . . . , n, and the emptyspace distances Ej , j = 1, . . . , n for an equal number n of uniformly sampled spatial locations. Then the Hopkins-Skellam index is given by H= n ∑i=1 Di . n ∑j=1 Ej Under the null hypothesis H is distributed according to an F2n,2n -distribution. As remarked in Byth and Ripley (1980) one should choose n ≤ Nλ /10 since the distributional theory is only known for a sparsely sampled homogeneous Poisson process, see Cressie (1993), section 8.2.5, for details. 28 (iii) The Diggle-Cressie-Loosmore-Ford test (see Loosmore and Ford (2006) and Baddeley et al. (2015), section 10.7.4) computes a Cramér-von Mises type test statistic R D=∫ ̂ (L(r) − L(r))2 dr. 0 ̂ Here, L(⋅) is the theoretical L-function of a homogeneous Poisson point process, L(⋅) is an estimator of L(⋅), and R is a chosen upper limit on the range of distances of interest. A Monte Carlo type test, see Baddeley et al. (2015), section 10.6, is then applied to D to obtain a suitable rejection region. For the simulation of alternative point processes we used the methods included in the R-package spatstat, as described in Baddeley et al. (2015). In view of the results in Section 7 we chose an inhomogeneous Poisson point process with intensity measure λf (x, y)d(x, y), where f ∶ [0, 1]2 → [0, ∞) is a bounded continuous function with ∫[0,1]2 f (x, y)d(x, y) = 1. We chose for x, y ∈ [0, 1] f1 (x, y) = 6 (x + y)2 , 7 2 sin(2x + y), sin(2) + sin(1) − sin(3) 240 ((x − 0.5)2 + (y − 0.5)4 ), f3 (x, y) = 23 240 (1 − (x − 0.5)2 − (y − 0.5)4 ). f4 (x, y) = 217 f2 (x, y) = We also considered a further alternative point process, namely the Baddeley-Silverman cell process BSP , as proposed in Baddeley and Silverman (1984). This process is designed to have the same second-order properties as an homogeneous PPP so that it cannot be detected by K- or L-function methods. It’s the standard counterexample to the claim that these functions completely characterize the point pattern. The BSP is generated by dividing the observation window into equally spaced quadrats in which either 0, 1 or 10 points are independently uniformly scattered with probabilities 1/10, 8/9 and 1/90 respectively. 29 Table 4: Empirical rejection rates for inhomogeneous Poisson point processes, κ = 1 TA Alt. Pλf1 Pλf2 Pλf3 Pλf4 BSP M CP TP 1 2 Tχ Tc λ/c 1 2 5 5 1 2 5 50 19 2 23 36 13 23 7 21 61 58 29 61 74 95 92 100 49 2 25 77 23 49 23 40 85 91 67 32 92 ∗ ∗ 200 72 2 73 92 70 73 55 71 57 ∗ 97 90 99 ∗ ∗ 500 99 2 93 ∗ 99 92 99 97 89 ∗ ∗ 98 ∗ ∗ ∗ 50 4 4 3 7 6 3 3 10 23 11 9 23 23 8 12 100 7 3 1 18 4 8 4 11 39 20 12 200 5 5 8 18 6 8 4 18 500 8 5 5 34 9 5 10 28 11 64 36 17 56 91 99 50 26 1 25 4 3 25 37 1 63 30 63 73 5 92 100 67 1 31 50 8 57 66 7 87 80 33 34 96 ∗ ∗ 200 92 2 80 86 55 80 91 48 75 ∗ 90 93 ∗ ∗ ∗ 500 ∗ 2 97 ∗ ∗ 97 ∗ 98 97 ∗ ∗ 99 ∗ ∗ ∗ 50 4 4 2 4 6 2 3 7 18 6 6 18 17 5 6 100 6 4 1 7 4 5 4 6 31 7 6 1 17 5 6 200 5 5 5 6 5 5 4 6 4 8 6 19 16 6 10 500 5 5 2 7 5 2 5 6 6 9 7 9 8 21 50 99 ∗ 10 80 ∗ 10 0 91 41 97 ∗ 42 88 10 80 100 ∗ ∗ 10 ∗ ∗ 29 0 98 66 ∗ ∗ 11 98 25 55 200 ∗ ∗ 37 ∗ ∗ 37 3 ∗ 35 ∗ ∗ 64 ∗ 15 46 500 ∗ ∗ 45 ∗ ∗ 45 49 ∗ 59 ∗ ∗ 64 ∗ 12 32 50 49 21 37 55 26 37 25 15 66 70 42 66 87 59 71 7 1 2 5 2 H Q D 28 16 28 35 17 28 37 40 67 4 17 100 59 31 34 80 33 51 45 31 78 84 70 39 94 89 93 200 59 43 55 78 49 54 58 48 46 91 86 72 96 95 99 500 64 52 52 81 60 51 76 61 55 95 96 67 96 30 ∗ ∗ Table 5: Empirical rejection rates for inhomogeneous Poisson point processes, κ = 3 TA Alt. Pλf1 Pλf2 Pλf3 Pλf4 TP Tχ Tc λ/c 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 50 57 51 4 1 4 7 12 37 4 0 16 6 1 0 1 77 60 18 12 25 100 94 82 46 10 0 17 3 51 71 31 25 7 10 0 0 96 96 88 57 37 200 99 97 36 16 25 23 98 91 3 9 30 8 8 65 ∗ ∗ 99 94 92 1 2 3 4 5 500 ∗ ∗ 99 16 9 77 12 ∗ ∗ 95 9 77 81 0 95 ∗ ∗ ∗ ∗ ∗ 50 7 9 3 6 6 3 2 6 3 2 9 2 3 1 3 15 9 5 7 9 100 20 6 4 4 3 3 2 16 12 5 9 4 4 1 2 38 25 18 10 10 200 11 10 3 3 6 3 2 16 12 5 2 5 3 13 13 45 49 34 22 19 500 33 20 9 4 6 7 8 52 52 6 1 23 7 7 50 3 0 11 81 9 1 0 1 64 58 39 15 18 66 63 100 98 91 60 8 0 98 67 0 2 0 70 46 87 6 200 ∗ ∗ 46 0 29 99 0 85 51 0 11 80 37 500 ∗ ∗ ∗ 14 19 ∗ 1 ∗ ∗ 71 8 50 3 6 3 6 5 4 2 4 4 4 100 8 3 3 5 4 3 3 8 5 200 3 5 4 4 4 3 4 7 500 5 4 5 5 5 5 6 9 62 64 43 70 85 80 63 42 7 0 15 2 92 94 65 3 0 0 8 ∗ ∗ 89 44 70 98 99 0 92 ∗ ∗ ∗ ∗ ∗ 12 3 5 2 4 7 6 4 6 7 6 11 7 6 3 3 14 7 6 6 7 7 4 2 4 4 6 5 9 10 9 8 9 10 6 1 8 4 4 10 11 13 12 11 10 31 Due to ongoing interest in the detection of clusters in point patterns we considered the special case of a Neyman-Scott cluster process (for details see Cressie (1993), p. 662), namely the Matérn cluster process M CP , see Baddeley et al. (2015), p. 139. In this model one first simulates a homogeneous PPP as parent points with fixed intensity ̃ λ. ̃ of independently uniformly In a second step, one generates a Poisson random number N distributed points in a disc of radius r center around each parent point. Discarding the parent process yields the M CP . We chose ̃ λ ∶= λ/m, r = 0.2 and set the parameter of the √ ̃ to m =⌊ λ/κ⌋. Poisson distribution of N Table 4 and Table 5 show the percentages (out of 10 000 replications) of rejections of H0 rounded to the nearest integer. In both tables, it is obvious that Tj , j ∈ {A, P, χ}, as well as Tc depend crucially on the choice of the threshold parameter c. The difference between Table 4 and Table 5 is the choice of κ, which is controlled by the number m2 of bins considered, and the simulation results clearly show the impact of a proper choice of c and m. Fixing κ = 1 as in Table 4 a natural choice of the threshold parameter is c = 1, for which T1 gives the best overall performance of the new methods and competes with the compared tests. In case of the BSP it outperforms the χ2 -quadrat-count-test as well as the Diggle-Cressie-Loosmore-Ford-test. Table 5 provides more insight into the power of the new tests and the dependence on the parameters. Since κ is the mean number of points falling into a single bin, one would expect the best performance for κ = c. Throughout the table, this assumption does not seem to hold. A slightly lower threshold parameter than κ results in higher power of the tests. The power of the testing procedure that combines more than one Minkowski functional outperforms overall the procedures based on a single functional. Notice that the presented simulation results are based on a naive choice of the parameters, so there is hope to find better performing tests by optimizing the choice of κ and c, preferably in a data driven way. 32 9 Data analysis of gamma-ray astronomy As an exemplary application, we analyze experimental observations from astroparticle physics, the gamma-ray sky map of the Fermi Gamma-ray Space Telescope. This space observatory explores extreme astrophysical phenomena, namely high-energetic radiation from both galactic and extragalactic sources. These sources may be fast rotating neutron stars or hot gas moving nearly at the speed of light. The satellite was launched in 2008 and detects the gamma-rays from a low Earth orbit. The energies of the singly detected photons range from 20 MeV to 300 GeV; for comparison, a photon with a visible wavelength has energies below 3 eV. Here we analyze a sky-map of gamma-rays observed by the so-called Large Area Telescope (LAT) Atwood et al. (2009). The directions of the incoming photons form a point pattern on the hemisphere. If the observation window is restricted to a small field of view, the curved space can be well approximated by a rectangular observation window in the Euclidean plane. If necessary, the analysis could easily be adapted from the plane to the sphere. Figure 3 shows a binned sky map, that is, the gray values represent the numbers of events detected within each bin. We here analyze a data set of 106 events (which were collected within about two months). The positions in the sky are given in galactic coordinates, that is, the galactic latitude B and the galactic longitude L. The supermassive black hole in the center of our galaxy is at L = 0 and B = 0. Above and below the black hole, there is an unresolved phenomenon, the so-called Fermi-Bubbles, as can be seen in Fig. 3. Its origin is still unknown, but it might be the result of a more active period of the supermassive black hole in the center of our galaxy, see Bordoloi et al. (2017). The null hypothesis is well-defined for any choice of the bin width, because the Poisson 33 Figure 3: A gamma-ray sky map as recorded by the Large Area Telescope. The binned map of the whole sky is based on single gamma-like events with energies above 2 GeV. Point-like sources of gamma-rays and a diffuse emission from our galactic plane are clearly visible. The events can be modeled by a inhomogeneous Poisson point process. point process does not assume an intrinsic length. However, for the application to real data, a reasonable choice of the bin width in accordance with the resolution of the detector improves the sensitivity of the analysis. A too coarse graining can hide distinct geometrical features of sources within a single pixel. If the mesh is too fine compared to the point spread function, the black and white image can easily be dominated by the random scattering of the signals. The resolution of the LAT depends strongly on the energies of the photons. It resolves the direction of the photons within a few degrees for 1 MeV gamma-rays but with a resolution of about 0.2 degrees for energies above 2 GeV, see Acero et al. (2015). The energy of the events analyzed here ranges from 1 GeV to 1 TeV. Accordingly, we choose a bin width 34 40 6 45 B[◦] B[◦] B[◦] 36 5 40 32 4 28 35 3 35.7 34.7 L[◦] 33.7 32.7 279 274 ◦ L[ ] 269 23 1 1 1 0.5 0.5 0.5 0 1 0.5 0 (1) 0 1 0.5 0 0 1 (2) 19 L[◦] 0.5 15 11 0 (3) Figure 4: Excerpts from the observed gamma-ray sky map (data sets 1-3): the point patterns formed by the single events (top) and the resulting binary images for c = 2 (bottom). of about 0.2 degrees or larger. There are four contributions of the events detected by the LAT: a) strong galactic point sources, like active galaxies of the blazar class or pulsars Acero et al. (2015), b) diffuse radiation from galactic gas clouds, that is produced by collisions of high energetic protons and particles in the gas clouds, c) an isotropic diffuse background from extragalactic sources, that cannot be resolved as single sources, but adds up to a homogeneous background, and 35 d) an isotropic background of high-energetic protons. A small fraction of the protons in the cosmic radiation are incorrectly but unavoidably classified as gamma-rays. They arrive homogeneously from all directions after a diffusion in the galactic magnetic fields. From a statistical point of view, these four contributions can be interpreted as: a) a strongly clustering (Matérn-type) point process, b) an inhomogeneous Poisson point process, c) and d) a homogeneous Poisson point process. Here we analyze field of views that contain point sources within a homogeneous background as well as inhomogeneous diffusive radiation from the galactic disc, see Fig. 4. The first data set (upper left picture in Figure 4) contains 1041 point events. We chose as parameters λ = 1041 and m = 18, which results in κ ≈ 3.213. The second data set (upper middle picture in Figure 4) contains 1339 point events (λ = 1339, m = 21 and κ ≈ 3.036) and the third data set (upper right picture in Figure 4) exhibits 3193 point events (λ = 3193, m = 32 and κ ≈ 3.118). For all three analysis the thresholding parameter c was fixed to 2 in accordance with the insight gained in section 8. The third data set is a region in the northern Fermi bubble with diffuse radiation from gas clouds, which causes a global gradient in the point pattern, and a point source, which is marked by the diamond symbol (◇). The latter is listed in the LAT 4-year Catalog as the source J1625.1—0021 Acero et al. (2015), which is likely to be a millisecond pulsar, e.g., see Dai et al. (2016). For computing the p-values in Table 6 we used the asymptotic χ2 distribution with 1 and 3, degrees of freedom, respectively. Table 6 shows that Tc rejects the hypothesis of CSR for all 3 data sets, while TP , Tχ and H clearly fail to detect the alternative in data set 1 even for a larger level α like 0.1. Data set 36 Table 6: Calculated p-values for the data sets of Figure 4 Dataset TA TP Tχ Tc H 1 2.560e-2 2.134e-1 4.260e-1 2.550e-2 2.616e-1 2 1.389e-3 2-927e-1 1.501e-2 2.900e-5 1.069e-1 3 2.225e-6 1.369e-3 4.507e-1 9.312e-8 2.474e-5 2 indicates the gain of power by considering the combination of 3 functionals, compared to the single functional. For data set 3 all tests, except Tχ , detect the inhomogeneous radiation in the region of the Fermi bubble. For reference we included the p-values of the Hopkins and Skellam test. The quadrat count and Diggle-Cressie-Loosmore-Ford tests reject the null hypothesis, but since their power depend on parameters and on the number of Monte Carlo replications the p-values are omitted since the comparability is questionable. To detect point sources, the diffuse background radiation is estimated based on maps of galactic gas clouds. These estimates are then subtracted from the data. However, because of limited observation of the gas clouds and the complex interactions between the highenergetic protons with the gas, systematic effects remain that may hide point sources in regions of strong diffuse emission. A new approach to distinguish the signals of such hidden point sources could detect currently undetected sources in the same data. Varying the threshold, we can in principle separate the detection of point sources and diffuse emission. Moreover, our test needs no a-priori assumptions about the complex shape of the gas clouds, but nevertheless the test statistic includes geometric information of the sources in the field of view. Here we have only applied our method as a proof of principle for a rigorous morphometric null-hypothesis test in gamma-ray astronomy. With further optimizations for applications in astroparticle physics, our approach could have the potential to detect new gamma-ray 37 sources and help to unravel some unknown phenomena. 10 Further Comments and Conclusions Our new tests are presented for 2-dimensional data sets due to the look-up Table 1 for Minkowski functionals. Nevertheless the table can straightforwardly be generalized to Minkowski functionals in higher dimensions in the following way. In d-dimensional Euclidean space (d > 2), the (2 × 2)-neighborhood must be extended to a 2d -neighborhood. d The total number of local configurations is therefore 22 . For each configuration, the corresponding entry in the look-up table of a Minkowski functional is given by an explicit limit of integrals. Starting with the Minkowski sum of the black pixels with a ball of radius ε, that is, the parallel body of the interior, an intersection with the interior of the 2d -neighborhood yields a smooth body for which the integral representation of the Minkowski functionals can be calculated, see Schröder-Turk et al. (2011). The limit ε → 0 yields the entry in the look-up table. For the volume, this is equal to the number of black pixels divided by 2d , and the contribution to the surface area is given by the number of neighboring pairs of black and white pixels, divided by 2d−1 . The mean width is determined by the opening angles of the edges of black pixels that are neighbors of white pixels. Similarly the local contributions to the Euler characteristic can be expressed by the corners between black and white pixels. Furthermore, our analysis can also be applied to real data that are distorted by detector effects, like a varying camera acceptance. Instead of an initially homogeneous Poisson point process, the recorded data then follows an inhomogeneous Poisson point process with a known intensity function. Such detector effects can easily be corrected by adding Monte Carlo Poisson events or by performing a Monte Carlo post-selection Göring (2012); Göring 38 et al. (2013). Under the null-hypothesis for the initial data, the resulting post-processed data is again a stationary Poisson point process. If the corrections are applied locally, we can compensate even a strong suppression of signals or subtract strong known point sources Klatt (2016). We want to indicate some open problems related to the tests. Throughout the article, we assume that the intensity λ of Pλ is known, so an interesting question is what effect an estimator ̂ λ has in the theoretical derivations of the tests. Section 7 describes the behaviour of the Minkowski functionals under fixed alternatives, but it is still unknown the results will lead to statements regarding consistency of the tests aigainst the inhomogeneous Poisson point process and is totally open for point process alternatives with inherent dependency structure. The simulation study suggests that finding a best (data dependent) choice of the parameters c and m is crucial to increase the power of the tests. The presented tests contain very nice features, like very fast computation time (even for big data) and flexibility with regard to the choice of parameters, which can lead to better power performance for special alternatives. Finally, we emphasize that the approach to analyze point patterns by means of Minkowski functionals of binary images might be the starting point of an rich and interesting path to follow for further research, and therefore give some examples. • Simulations show that one may obtain better performing procedures by looking at more than one threshold parameter c. We suggest to investigate maxc∈N Tc or ∑∞ c=1 Tc for which we expect procedures with distinctly higher power and a greater flexibility in detecting point-like or extended sources, for first simulations see Klatt (2016). • To detect a local deviation of CSR, we suggest to use the presented tests in a moving window approach, see Lloyd (2007). 39 • In view of Hadwiger’s characterization theorem one might find a linear combination of the Minkowski functionals that is most powerful against alternatives which are additive, continuous and invariant under rigid motions. • Tensorial Minkowski functionals are generalizations of Minkowski functionals (also called scalar Minkowski functionals), see Schneider and Weil (2008); Schröder-Turk et al. (2011). They directly quantify the degree of anisotropy and the preferred orientation in an anisotropic system. One can easily derive a corresponding look-up table Klatt (2016) and define analogous tests to better detect anisotropic deviations from a Poisson point process. • The formulae given in Theorem 4.1 and 6.1 can also be used to analyze the nonoccurrence of dependency in binary image (or boolean matrix) data directly by means of Minkowski functionals. Acknowledgements The authors want to thank M. Penrose for indicating the reference Rinott and Rotar (1996). We appreciate the data provided by the Fermi Gamma-Ray Spactelescope and thank Stefan Funk, director of the Erlangen Center for Astroparticle Physics (ECAP), for his insights into gamma-ray astronomy and the Fermi telescope, his assistance with the data of the Fermi space telescope, and very helpful discussions and advice. 40 References Acero, F. et al. (2015). Fermi Large Area Telescope third source catalog. The Astrophysical Journal Supplement Series, 218(2):23. Atwood, W. B. et al. (2009). The Large Area Telescope on the Fermi Gamma-Ray Space Telescope Mission. The Astrophysical Journal, 697(2):1071. Baddeley, A., Rubak, E., and Turner, R. (2015). Spatial Point Patterns: Methodology and Applications with R. Chapman and Hall/CRC Press, London. Baddeley, A. and Silverman, B. (1984). A cautionary example on the use of second-order methods for analyzing point patterns. Biometrics, 40:1089–1094. Berrendero, J., Cuevas, A., and Pateiro-López, B. (2012). Testing uniformity for the case of a planar unknown support. The Canadian Journal of Statistics, 40(2):378–395. Berrendero, J., Cuevas, A., and Vázquez-Grande, F. (2006). Testing Multivariate Uniformity: The Distance-to-Boundary Method. The Canadian Journal of Statistics, 34(4):693–707. Bordoloi, R. et al. (2017). Mapping the Nuclear Outflow of the Milky Way: Studying the Kinematics and Spatial Extent of the Northern Fermi Bubble. The Astrophysical Journal, 834(2):191. Byth, K. and Ripley, B. (1980). On sampling spatial patterns by distance methods. Biometrics, 36:279–284. Coeurjolly, J. (2017). Median-based estimation of the intensity of a spatial point process. Annals of the Institute of Statistical Mathematics, 69:303–331. 41 Core Team, R. (2016). R: A language and environment for statistical computing. Statistical Computing. Cressie, N. (1993). Statistics for Spatial Data. Wiley. Dai, X., Wang, Z., Vadakkumthani, J., and Xing, Y. (2016). Identification of candidate millisecond pulsars from fermi lat observations. Research in Astronomy and Astrophysics, 16(69):97–109. Dazzo, F. B., Yanni, Y. G., Jones, A., and Elsadany, A. Y. (2015). CMEIAS bioimage informatics that define the landscape ecology of immature microbial biofilms developed on plant rhizoplane surfaces. AIMS Bioengineering, 2(5):469–486. Ebner, B., Henze, N., and Yukich, J. E. (2016). Multivariate goodness-of-fit on flat and curved spaces via nearest neighbor distances. ArXiv e-prints. Gaetan, C. and Guyon, X. (2010). Spatial Statistics and Modeling. Springer. Göring, D. (2012). Gamma-Ray Astronomy Data Analysis Framework based on the Quantification of Background Morphologies using Minkowski Tensors. PhD thesis, Universitt Erlangen-Nrnberg. Göring, D., Klatt, M. A., Stegmann, C., and Mecke, K. (2013). Morphometric analysis in gamma-ray astronomy using Minkowski functionals. Astronomy & Astrophysics, 555(A38). Gray, S. (1971). Local properties of binary images in two dimensions. IEEE Transactions on Computers, C-20(5):551–561. 42 Heinrich, L. (2015). Gaussian limits of empirical multiparameter K-functions of homogeneous Poisson processes and tests for complete spatial randomness. Lithuanian Mathematical Journal, 55(1):72–90. Hopkins, B. (1954). A new method of determining thy type of distribution of plant individuals. Annals of Botany, 18:213–227. Illian, J., Penttinen, A., Stoyan, H., and Stoyan, D. (2008). Statistical Analysis and Modelling of Spatial Point Patterns. Wiley. Justel, A., Pena, D., and Zamar, R. (1997). A multivariate Kolmogorov-Smirnov test of goodness of fit. Statistics & Probability Letters, 35:251–259. Karlis, D. and Xekalaki, E. (2005). Mixed Poisson Distributions. International Statistical Review, 73(1):35–58. Klatt, M. (2016). Morphometry of random spatial structures in physics. PhD thesis. Klette, R. and Rosenfeld, A. (2004). Digital Geometry. Morgan Kaufmann, San Francisco. Kong, T. and Rosenfeld, A. (1989). Digital topology: Introduction and survey. Computer Vision, graphics, and Image Processing, 48:357–393. Kong, Y. and Rosenfeld, A., editors (1996). Topological Algorithms for Digital Image Processing. North Holland, Amsterdam. Lake, D. E. and Keenan, D. M. (1995). Identifying minefields in clutter via collinearity and regularity detection. SPIE, 2496:519–530. Legland, D., Kiêu, K., and Devaux, M.-F. (2007). Computation of Minkowski Measures on 2D and 3D binary images. Image Analysis & Stereology, 26:83–92. 43 Liang, J., Fang, K., F., H., and Li, R. (2001). Testing Multivariate Uniformity and Its Applications. Mathematics of Computation, 70(233):337–355. Lloyd, C. (2007). Local Models for Spatial Analysis. CRC Press, Boca Raton. Loosmore, N. and Ford, E. (2006). Statistical Inference using the G or K point pattern spatial statistics. Ecology, 87:1925–1931. Mantz, H., Jacobs, K., and Mecke, K. (2008). Utilising minkowski functionals for image analysis: a marching square algorithm. Journal of Statistical Mechanics: Theory and Experiment, 2008:P12015. Marhuenda, Y., Morales, D., and Pardo, M. (2005). A comparison of uniformity tests. Statistics, 39(4):315–328. Mecke, K. and Stoyan, D. (Eds.) (2000). Statistical Physics and Spatial Statistics - The Art of Analyzing and Modeling Spatial Structures and Pattern Formation, volume 554 of Lecture Notes in Physics. Springer. Møller, J. and Waagepetersen, R. (2003). Statistical Inference and Simulation for Spatial Point Processes. Chapman & Hall. Okabe, B., Boots, B., and Sugihara, K. (1992). Spatial Tesselations. Wiley. Penrose, M. (2004). Random geometric graphs. Oxford University Press. Rinott, J. and Rotar, V. (1996). A Multivariate CLT for Local Dependence with n−1/2 log n Rate and Applications to Multivariate Graph Related Statistics. Journal of Multivariate Analysis, 56:333–350. Schneider, R. and Weil, W. (2008). Stochastic and Integral Geometry. Springer. 44 Schröder-Turk, G. E. et al. (2011). Minkowski tensor shape analysis of cellular, granular and porous structures. Advanced Materials, 23:2535–2553. Shaked, M. (1980). On mixtures from exponential families. Journal of the Royal Statistical Society Series B, 42:192–198. Skellam, J. (1954). Appendix to article by Hopkins (1954). Annals of Botany, 18:226–227. Tenreiro, C. (2007). On the Finite Sample Behavior of Fixed Bandwidth Bickel-Rosenblatt Test for Univariate and Multivariate Uniformity. Communications in Statistics - Simulation and Computation, 36:827–846. Viktorova, I. I. and Chistyakov, V. P. (1966). Some generalizations of the test of empty boxes. Theory of Probability and its applications, 11(2):270–276. Wheeler, D. C. (2007). A comparison of spatial clustering and cluster detection techniques for childhood leukemia incidence in ohio, 1996-2003. International Journal of Health Geographics, 6(13). 45
10math.ST
On the equations and classification of toric quiver varieties arXiv:1402.5096v1 [math.RT] 20 Feb 2014 M. Domokos and D. Joó∗ Rényi Institute of Mathematics, Hungarian Academy of Sciences, Reáltanoda u. 13-15, 1053 Budapest, Hungary Email: [email protected] [email protected] Abstract Toric quiver varieties (moduli spaces of quiver representations) are studied. Given a quiver and a weight there is an associated quasiprojective toric variety together with a canonical embedding into projective space. It is shown that for a quiver with no oriented cycles the homogeneous ideal of this embedded projective variety is generated by elements of degree at most 3. In each fixed dimension d up to isomorphism there are only finitely many ddimensional toric quiver varieties. A procedure for their classification is outlined. 2010 MSC: 14M25 (Primary) 14L24 (Secondary) 16G20 (Secondary) 52B20 (Secondary) Keywords: binomial ideal, moduli space of quiver representations, toric varieties 1 Introduction Geometric invariant theory was applied by King [18] to introduce certain moduli spaces of representations of quivers. In the special case when the dimension vector takes value 1 on each vertex of the quiver (thin representations), these moduli spaces are quasi-projective toric varieties; following [2] we call them toric quiver varieties. Toric quiver varieties were studied by Hille [13], [14], [15], Altmann and Hille [2], Altmann and van Straten [4]. Further motivation is provided by Craw and Smith [9], who showed that every projective toric variety is the fine moduli space for stable thin representations of an appropriate quiver with relations. Another application was introduced very recently by Carroll, Chindris and Lin [7]. From a different perspective, the projective toric quiver varieties are nothing but the toric varieties associated to flow polytopes. Taking this point of departure, Lenz [20] investigated toric ideals associated to flow polytopes. These are the homogeneous ideals of the projective toric variety associated to a flow polytope, canonically embedded into projective space. Given a quiver (a finite directed graph) and a weight (an integer valued function on the set of vertices) there is an associated normal lattice polyhedron yielding a quasiprojective toric variety with a canonical embedding into projective space. This variety is projective if and only if the quiver has no oriented cycles. We show in Theorem 9.3 that the homogeneous ideal of this embedded projective variety is generated by elements of degree at most 3. This is deduced from a recent result of Yamaguchi, Ogawa and Takemura [25], for which we give a simplified proof. It follows from work of Altmann and van Straten [4] and Altmann, Nill, Schwentner and Wiercinska [3] that for each positive integer d up to isomorphism there are only finitely many ∗ Partially supported by OTKA NK81203 and K101515. 1 toric quiver varieties (although up to integral-affine equivalence there are infinitely many ddimensional quiver polyhedra). We make this notable observation explicit and provide a selfcontained treatment yielding some refinements. Theorem 4.12 asserts that any toric quiver variety is the product of prime (cf. Definition 4.11) toric quiver varieties, and this deomposition can be read off from the combinatorial structure of the quiver. Moreover, by Theorem 4.22 any prime (cf. Definition 4.11) d-dimensional (d > 1) projective toric quiver variety can be obtained from a bipartite quiver with 5(d − 1) vertices and 6(d − 1) arrows, whose skeleton (cf. Definition 4.13) is 3-regular. A toric variety associated to a lattice polyhedron is covered by affine open toric subvarieties corresponding to the vertices of the polyhedron. In the case of quiver polyhedra the affine toric varieties arising that way are exactly the affine toric quiver varieties by our Theorem 6.2 and Theorem 6.3. According to Theorem 6.3 any toric quiver variety can be obtained as the union in a projective toric quiver variety of the affine open subsets corresponding to a set of vertices of the quiver polytope. The paper is organized as follows. In Section 2 we review flow polytopes, quiver polytopes, quiver polyhedra, and their interrelations. In Section 3 we recall moduli spaces of representations of quivers, including a very explicit realization of a toric quiver variety in Proposition 3.3. In Section 4 we collect reduction steps for quiver–weight pairs that preserve the associated quiver polyhedron, and can be used to replace a quiver by another one which is simpler or smaller in certain sense. These are used to derive the results concerning the classification of toric quiver varieties. As an illustration the classification of 2-dimensional toric quiver varieties is recovered in Section 5. Section 6 clarifies the interrelation of affine versus projective toric quiver varieties. Section 8 contains some generalities on presentations of semigroup algebras, from which we obtain Corollary 8.3 that provides the technical framework for the proof in Section 9 of Theorem 9.3 about the equations for the natural embedding of a toric quiver variety into projective space. For sake of completeness of the picture we show in Section 10 how the main result of [25] can be derived from the special case Proposition 9.1 used in the proof of Theorem 9.3. We also point out in Theorem 9.6 that the ideal of relations among the minimal generators of the coordinate ring of a d-dimensional affine toric quiver variety is generated in degree at most d − 1, and this bound is sharp. 2 Flow polytopes and their toric varieties By a polyhedron we mean the intersection of finitely many closed half-spaces in Rn , and by a polytope we mean a bounded polyhedron, or equivalently, the convex hull of a finite subset in Rn (this conforms the usage of these terms in [8]). A quiver is a finite directed graph Q with vertex set Q0 and arrow set Q1 . Multiple arrows, oriented cycles, loops are all allowed. For an arrow a ∈ Q1 denote by a− its starting vertex and by a+ its terminating vertex. Given an integral 1 vector θ ∈ ZQ0 and non-negative integral vectors l, u ∈ NQ 0 consider the polytope X X ∇ = ∇(Q, θ, l, u) = {x ∈ RQ1 | l ≤ x ≤ u, ∀v ∈ Q0 : θ(v) = x(a) − x(a)}. a+ =v a− =v This is called a flow polytope. According to the generalized Birkhoff-von Neumann Theorem ∇ is a lattice polytope in RQ1 , that is, its vertices belong to the lattice ZQ1 ⊂ RQ1 (see for example Theorem 13.11 in [23]). Denote by X∇ the projective toric variety associated to ∇ (cf. Definition 2.3.14 in [8]). The polytope ∇ is normal (see Theorem 13.14 in [23]). It follows that the abstract variety X∇ can be identified with the Zariski-closure of the image of the map (C× )Q1 → Pd−1 , t 7→ (tm1 : · · · : tmd ) 2 (1) where {m1 , . . . , md } = ∇ ∩ ZQ1 , and for t in the torus (C× )Q1 and m ∈ ZQ1 we write tm := Q m(a) . From now on X will stand for this particular embedding in projective space ∇ a∈Q1 t(a) of our variety, and we denote by I(X∇ ) the corresponding vanishing ideal, so I(X∇ ) is a homogeneous ideal in C[x1 , . . . , xd ] generated by binomials. Normality of ∇ implies that X∇ is projectively normal, that is, its affine cone in Cd is normal. We shall also use the notation X X ∇(Q, θ) = {x ∈ RQ1 | 0 ≤ x, ∀v ∈ Q0 : θ(v) = x(a) − x(a)}. a+ =v a− =v We shall call this a quiver polyhedron. When Q has no oriented cycles, then for u large enough we have ∇(Q, θ) = ∇(Q, θ, 0, u), so ∇(Q, θ) is a polytope; these polytopes will be called quiver polytopes. Definition 2.1 The lattice polyhedra ∇i ⊂ Vi with lattice Mi ⊂ Vi (i = 1, 2) are integral-affinely equivalent if there exists an affine linear isomorphism ϕ : AffSpan(∇1 ) → AffSpan(∇2 ) of affine subspaces with the following properties: (i) ϕ maps AffSpan(∇1 ) ∩ M1 onto AffSpan(∇2 ) ∩ M2 ; (ii) ϕ maps ∇1 onto ∇2 . The phrase ‘integral-affinely equivalent’ was chosen in accordance with [6] (though in [6] full dimensional lattice polytopes are considered). Obviously, if ∇1 and ∇2 are integral-affinely equivalent lattice polytopes, then the associated projective toric varieties X∇1 and X∇2 are isomorphic (and in fact they can be identified via their embeddings into projective space given by the ∇i ). As we shall point out in Proposition 2.2 below, up to integral-affine equivalence, the class of flow polytopes coincides with the class of quiver polytopes, so the class of quiver polyhedra is the most general among the above classes. Proposition 2.2 For any flow polytope ∇(Q, θ, l, u) there exists a quiver Q′ with no oriented ′ cycles and a weight θ ′ ∈ ZQ1 such that the polytopes ∇(Q, θ, l, u) and ∇(Q′ , θ ′ ) are integral-affinely equivalent. ′ Proof. Note that x ∈ RQ1 belongs to ∇(Q, θ,Pl, u) if and only P if x − l belongs to ∇(Q, θ , 0, u − l) ′ ′ where θ is the weight given by θ (v) = θ(v)− a+ =v l(a)+ a− =v l(a). Consequently X∇(Q,θ,l,u) = X∇(Q,θ′ ,0,u−l). Therefore it is sufficient to deal with the flow polytopes ∇(Q, θ, 0, u). Define a new quiver Q′ as follows: add to the vertex set of Q two new vertices va , wa for each a ∈ Q1 , and replace the arrow a ∈ Q1 by three arrows a1 , a2 , a3 , where a1 goes from a− to va , a2 goes from ′ wa to va , and a3 goes from wa to a+ . Let θ ′ ∈ ZQ0 be the weight with θ ′ (va ) = u(a) = −θ(wa ) ′ for all a ∈ Q1 and θ ′ (v) = θ(v) for all v ∈ Q0 . Consider the linear map ϕ : RQ1 → RQ1 , x 7→ y, where y(a1 ) := x(a), y(a3 ) := x(a), and y(a2 ) = u(a) − x(a) for all a ∈ Q1 . It is straightforward to check that ϕ is an affine linear transformation that restricts to an isomorphism AffSpan(∇(Q, θ, 0, u)) → AffSpan(∇(Q′ , θ ′ )) with the properties (i) and (ii) in Definition 2.1.  3 Moduli spaces of quiver representations A representation R of Q assigns a finite dimensional C-vector space R(v) to each vertex v ∈ Q0 and a linear map R(a) : R(a− ) → R(a+ ) to each arrow a ∈ Q1 . A morphism between representations R and R′ consists of a collection of linear maps L(v) : R(v) 7→ R′ (v) satisfying R′ (a) ◦ L(a− ) = 3 L(a+ ) ◦ R(a) for all a ∈ Q1 . The dimension vector of R is (dimC (R(v)) | v ∈ Q0 ) ∈ NQ0 . For a fixed dimension vector α ∈ NQ0 , M − + homC (Cα(a ) , Cα(a ) ) Rep(Q, α) := a∈Q1 is the space of α-dimensional representations of Q. The product of general linear groups GL(α) := Q v∈Q0 GLα(v) (C) acts linearly on Rep(Q, α) via g · R := (g(a+ )R(a)g(a− )−1 | a ∈ Q1 ) (g ∈ GL(α), R ∈ Rep(Q, α)). The GL(α)-orbits in Rep(Q, α) are in a natural bijection with the isomorphism classes of αdimensional representations of Q. Given a weightP θ ∈ ZQ0 , a representation R of Q is called P ′ θ-semi-stable if v∈Q0 θ(v) dimC (R(v)) = 0 and v∈Q0 θ(v) dimC (R (v)) ≥ 0 for all subrep′ resentations R of R. The points in Rep(Q, α) corresponding to θ-semi-stable representations constitute a Zariski open subset Rep(Q, α)θ−ss in the representation space, and in [18] Geometric Invariant Theory (cf. [22]) is applied to define a variety M(Q, α, θ) and a morphism π : Rep(Q, α)θ−ss → M(Q, α, θ) (2) which is a coarse moduli space for families of θ-semistable α-dimensional representations of Q up to S-equivalence. A polynomial function f on Rep(Q, α) is a relative invariant of weight θ if Q f (g · R) = ( v∈Q0 det(g(v))θ(v) )f (R) holds for all g ∈ GL(α) and R ∈ Rep(Q, α). The relative invariants of weight θ constitute a subspace O(Rep(Q, α))θ in the coordinate ring O(Rep(Q, α)) of the affine space Rep(Q, α). In fact O(Rep(Q, α))θ is a finitely generated module over the algebra O(Rep(Q, α))GL(α) of polynomial GL(α)-invariants on Rep(Q, α) (generators of this latter algebra are described in [19]). Now a quasiprojective variety M(Q, α, θ) is defined as the projective spectrum ∞ M O(Rep(Q, α))nθ ) M(Q, α, θ) = Proj( n=0 L of the graded algebra ∞ n=0 O(Rep(Q, α))nθ . A notable special case is that of the zero weight. Then the moduli space M(Q, α, 0) is the affine variety whose coordinate ring is the subalgebra of GL(α)-invariants in O(Rep(Q, α)). This was studied in [19] before the introduction of the case of general weights in [18]. Its points are in a natural bijection with the isomorphism classes of semisimple representations of Q with dimension vector α. For a quiver with no oriented cycles, M(Q, α, 0) is just a point, and it is more interesting for quivers containing oriented cycles. Let us turn to the special case when α(v) = 1 for all v ∈ Q0 ; we simply write Rep(Q) and M(Q, θ) instead of Rep(Q, α) and M(Q, α, θ). When Rep(Q)θ−ss is non-empty, M(Q, θ) is a quasiprojective toric variety with torus π({x ∈ Rep(Q) | x(a) 6= 0 ∀a ∈ Q1 }) = π((C× )Q1 ). On the other hand it is well known (see Proposition 3.2 below) that ∇(Q, θ) is a lattice polyhedron in the sense of Definition 7.1.3 in [8]. Denote by X∇(Q,θ) the toric variety belonging to the normal fan of ∇(Q, θ), see for example Theorem 7.1.6 in [8]. Proposition 3.1 We have M(Q, θ) ∼ = X∇(Q,θ) . Proof. For quivers with no oriented cycles this is explained in [2] using a description of the fan of M(Q, θ) in [14]. An alternative explanation is the following: the lattice points in ∇(Q, nθ) correspond bijectively in O(Rep(Q))nθ , namely assign to m ∈ ∇(Q, ZQ1 the function Lnθ)∩ Q to a C-basis ∞ m(a) m . Now X∇(Q,θ) is the projective spectrum of n=0 O(Rep(Q))nθ (see R 7→ R := a∈Q1 R(a) Proposition 7.1.13 in [8]), just like M(Q, θ).  4 A more explicit description of M(Q, θ) is possible thanks to normality of quiver polyhedra: Proposition 3.2 (i) Denote by Q1 , . . . , Qt the maximal subquivers of Q that contain no oriented cycles. Then ∇(Q, θ) ∩ ZQ1 has a Minkowski sum decomposition ∇(Q, θ) ∩ ZQ1 = ∇(Q, 0) ∩ ZQ1 + t [ ∇(Qi , θ) ∩ ZQ1 . (3) i=1 (ii) The quiver polyhedron ∇(Q, θ) is a normal lattice polyhedron. Proof. (i) By the support of x ∈ RQ1 we mean the set {a ∈ Q1 | x(a) 6= 0} ⊆ Q1 . It is obvious that ∇(Q, θ) ∩ ZQ1 contains the set on the right hand side of (3). To show the reverse inclusion take an x ∈ ∇(Q, θ) ∩ ZQ1 . If its support contains no oriented cycles, then x ∈ ∇(Qi , θ) for some i. Otherwise take a minimal oriented cycle C ⊆ Q1 in the support of x. Denote by εC ∈ RQ1 the characteristic function of C, and denote by λ the minimal coordinate of x along the cycle C. Then λεC ∈ ∇(Q, 0) and y := x − λεC ∈ ∇(Q, θ). Moreover, y has strictly smaller support than x. By induction on the size of the support we are done. S (ii) The same argument as in (i) yields ∇(Q, θ) = ∇(Q, 0) + ti=1 ∇(Qi , θ). So ∇(Q, 0) is the recession cone of ∇(Q, θ), and the set of vertices of ∇(Q, θ) is contained in the union of the vertex sets of ∇(Qi , θ). As we pointed out before, the vertices of ∇(Qi , θ) belong to ZQ1 by Theorem 13.11 in [23], whereas the cone ∇(Q, 0) is obviously rational and strongly convex. This shows that ∇(Q, θ) is a lattice polyhedron in the sense of Definition 7.1.3 in [8]. For normality we need to show that for all positive integers k we have ∇(Q, kθ) ∩ ZQ1 = k(∇(Q, θ) ∩ ZQ1 ) (the Minkowski sum of k copies of ∇(Q, θ) ∩ ZQ1 ), see Definition 7.1.8 in [8]. Flow polytopes are normal by Theorem 13.14 in [23], hence the ∇(Qi , θ) are normal for i = 1, . . . , t.SSo by (i) we have S t ∇(Q, kθ) ∩ ZQ1 = ∇(Q, 0) ∩ ZQ1 + i=1 (∇(Qi , kθ) ∩ ZQ1 ) = ∇(Q, 0) ∩ ZQ1 + ti=1 k(∇(Qi , θ) ∩ S ZQ1 ) ⊆ k(∇(Q, 0) + ti=1 ∇(Qi , θ) ∩ ZQ1 ).  Let C1 , . . . , Cr be the minimal oriented cycles (called also primitive cycles) in Q. Then their characteristic functions εC1 , . . . , εCr constitute a Hilbert basis in the monoid ∇(Q, 0) ∩ ZQ1 . St Enumerate the elements in {m, εCj + m | m ∈ i=1 ∇(Qi , θ), j = 1, . . . , r} as m0 , m1 , . . . , md . For Q a lattice point m ∈ ∇(Q, θ) ∩ ZQ1 denote by xm : Rep(Q) → C the function x 7→ a∈Q1 R(a)m(a) . Consider the map (4) ρ : Rep(Q)θ−ss → Pd , x 7→ (xm0 : · · · : xmd ). Proposition 3.3 M(Q, θ) can be identified with the locally closed subset Im(ρ) in Pd . Proof. The morphism ρ is GL(1, . . . , 1)-invariant, hence it factors through the quotient morphism (2), so there exists a morphism µ : M(Q, θ) → Im(ρ) with µ ◦ π = ρ. One can deduce from Proposition 3.2 by the Proj construction of M(Q, θ) that µ is an isomorphism.  This shows also that there is a projective morphism M(Q, θ) → M(Q, 0). In particular, M(Q, θ) is a projective variety if and only if Q has no oriented cycles, i.e. if ∇(Q, θ) is a polytope. 4 Contractable arrows Throughout this section Q stands for a quiver and θ ∈ ZQ0 for a weight such that ∇(Q, θ) is non-empty. For an undirected graph Γ we set χ(Γ) := |Γ1 | − |Γ0 | + χ0 (Γ), where Γ0 is the set 5 of vertices, Γ1 is the set of edges in Γ, and χ0 (Γ) is the number of connected components of Γ. Define χ(Q) := χ(Γ) and χ0 (Q) := χ0 (Γ) where Γ is the underlying graph of Q, and we say that Q is connected if Γ is connected, i.e. if χ0 (Q) = 1. Denote by F : RQ1 → RQ0 the map given by X X F(x)(v) = x(a) − x(a) (v ∈ Q0 ). (5) a+ =v a− =v 1 Q0 of By definition we have ∇(Q, θ) = F −1 (θ) ∩ RQ ≥0 . It is well known that the codimension in R the image of F equals χ0 (Q), hence dimR (F −1 (θ)) = χ(Q) for any θ ∈ F(RQ1 ), implying that dim(∇(Q, θ)) ≤ χ(Q), where by the dimension of a polyhedron we mean the dimension of its affine span. We say that we contract an arrow a ∈ Q1 which is not a loop when we pass to the pair (Q̂, θ̂), where Q̂ is obtained from Q by removing a and glueing its endpoints a− , a+ to a single vertex v ∈ Q̂0 , and setting θ̂(v) := θ(a− ) + θ(a+ ) whereas θ̂(w) = θ(w) for all vertices w ∈ Q̂0 \ {v} = Q0 \ {a− , a+ }. Definition 4.1 Let Q be a quiver, θ ∈ ZQ0 a weight such that ∇(Q, θ) is non-empty. (i) An arrow a ∈ Q1 is said to be removable if ∇(Q, θ) is integral-affinely equivalent to ∇(Q′ , θ), where Q′ is obtained from Q by removing the arrow a: Q′0 = Q0 and Q′1 = Q1 \ {a}. (ii) An arrow a ∈ Q1 is said to be contractable if ∇(Q, θ) is integral-affinely equivalent to ∇(Q̂, θ̂), where (Q̂, θ̂) is obtained from (Q, θ) by contracting the arrow a. (iii) The pair (Q, θ) is called tight if there is no removable or contractable arrow in Q1 . An immediate corollary of Definition 4.1 is the following statement: Proposition 4.2 Any quiver polyhedron ∇(Q, θ) is integral-affinely equivalent to some ∇(Q′ , θ ′ ), where (Q′ , θ ′ ) is tight. Moreover, (Q′ , θ ′ ) is obtained from (Q, θ) by successively removing or contracting arrows. Remark 4.3 A pair (Q, θ) is tight if and only if all its connected components are θ-tight in the sense of Definition 12 of [4]; this follows from Lemma 7, Corollary 8, and Lemma 13 in [4]. These results imply also Corollary 4.5 below, for which we give a direct derivation from Definition 4.1. Lemma 4.4 (i) The arrow a is removable if and only if x(a) = 0 for all x ∈ ∇(Q, θ). (ii) The arrow a is contractable if and only if in the affine space F −1 (θ) the halfspace {x ∈ F −1 (θ) | x(a) ≥ 0} contains the polyhedron {x ∈ F −1 (θ) | x(b) ≥ 0 ∀b ∈ Q1 \ {a}}. Proof. (i) is trivial. To prove (ii) denote by Q̂, θ̂ the quiver and weight obtained by contracting a. Since the set of arrows of Q̂ can be identified with Q̂1 = Q1 \ {a}, we have the projection map π : F −1 (θ) → F ′−1 (θ̂) obtained by forgetting the coordinate x(a). The equation X X x(a) = θ(a+ ) − x(b) + x(b) b∈Q1 \{a},b+ =a+ b∈Q1 \{a},b− =a+ shows that π is injective, hence it gives an affine linear isomorphism F −1 (θ) ∩ ZQ1 and F ′−1 (θ̂) ∩ ZQ̂1 , and maps injectively the lattice polyhedron ∇(Q, θ) onto an integral-affinely equivalent lattice polyhedron contained in ∇(Q̂, θ̂). Thus a is contractable if and only if on the affine space F −1 (θ) the inequality x(a) ≥ 0 is a consequence of the inequalities x(b) ≥ 0 (b ∈ Q1 \ {a}).  6 For an arrow a ∈ Q1 set ∇(Q, θ)x(a)=0 := {x ∈ ∇(Q, θ) | x(a) = 0}. Corollary 4.5 (i) The pair (Q, θ) is tight if and only if the assignment a 7→ ∇(Q, θ)x(a)=0 gives a bijection between Q1 and the facets (codimension 1 faces) of ∇(Q, θ). (ii) If (Q, θ) is tight, then dim(∇(Q, θ)) = χ(Q). Proof. Lemma 4.4 shows that (Q, θ) is tight if and only if AffSpan(∇(Q, θ)) = F −1 (θ) and {x(a) = 0} ∩ F −1 (θ) (a ∈ Q1 ) are distinct supporting hyperplanes of ∇(Q, θ) in its affine span.  The following simple sufficient condition for contractibility P of an arrow turns out to be sufficient for our purposes. For a subset S ⊆ Q0 set θ(S) := v∈S θ(v). By (5) for x ∈ F −1 (θ) we have X X X X θ(S) = x(a) − x(a) = x(a) − x(a). (6) a∈Q1 ,a+ ∈S a+ ∈S,a− ∈S / a∈Q1 ,a− ∈S a− ∈S,a+ ∈S / Proposition 4.6 Suppose that S ⊂ Q0 has the property that there is at most one arrow a with a+ ∈ S, a− ∈ / S and at most one arrow b with b+ ∈ / S and b− ∈ S. Then a (if exists) is contractable when θ(S) ≥ 0 and b (if exists) is contractable when θ(S) ≤ 0. Proof. By (6) we have θ(S) = x(a) − x(b), hence by Lemma 4.4 a or b is contractable, depending on the sign of θ(S).  By the valency of a vertex v ∈ Q0 we mean |{a ∈ Q1 | a− = v}| + |{a ∈ Q1 | a+ = v}|. Corollary 4.7 (i) Suppose that the vertex v ∈ Q0 has valency 2, and a, b ∈ Q1 are arrows such that a+ = b− = v. Then the arrow a is contractable when θ(v) ≥ 0 and b is contractable when θ(v) ≤ 0. (ii) Suppose that for some c ∈ Q1 , c− and c+ have valency 2, and a, b ∈ Q1 \ {c} with − a = c− and b+ = c+ . Then a is contractable when θ(c− ) + θ(c+ ) ≤ 0 and b is contractable when θ(c− ) + θ(c+ ) ≥ 0. Proof. Apply Proposition 4.6 with S = {v} to get (i) and with S = {c− , c+ } to get (ii).  Proposition 4.8 Suppose that there are exactly two arrows a, b ∈ Q1 attached to some vertex v, and either a+ = b+ = v or a− = b− = v. Let Q′ , θ ′ be the quiver and weight obtained after replacing −θ(v) v a u b by w â θ(u) + θ(v) −θ(v) v b̂ or a u θ(w) + θ(v) b by w â θ(u) + θ(v) b̂ . θ(w) + θ(v) That is, replace the arrows a, b by â and b̂ obtained by reversing them, and consider the weight ′ θ ′ ∈ ZQ1 given by θ ′ (v) = −θ(v), θ ′ (u) = θ(u) + θ(v) when u 6= v is an endpoint of a or b, and θ ′ (w) = θ(w) for all other w ∈ Q′0 = Q0 . Then the polyhedra ∇(Q, θ) and ∇(Q′ , θ ′ ) are integral-affinely equivalent. ′ Proof. It is straightforward to check that the map ϕ : RQ1 → RQ1 given by ϕ(x)(â) = x(b), ϕ(x)(b̂) = x(a), and ϕ(x)(c) = x(c) for all c ∈ Q′1 \{â, b̂} = Q1 \{a, b} restricts to an isomorphism between AffSpan(∇(Q, θ)) and AffSpan(∇(Q′ , θ ′ )) satisfying (i) and (ii) in Definition 2.1.  7 Remark 4.9 Proposition 4.8 can be interpreted in terms of reflection transformations: it was shown in Sections 2 and 3 in [17] (see also Theorem 23 in [24]) that reflection transformations on representations of quivers induce isomorphisms of algebras of semi-invariants. Now under our assumptions a reflection transformation at vertex v fixes the dimension vector (1, . . . , 1). Proposition 4.10 Suppose that Q is the union of its full subquivers Q′ , Q′′ which are either ′ ′′ disjoint or have a single common vertex v. Identify RQ1 ⊕ RQ1 = RQ1 in the obvious way, and ′ Q′′ 0 ⊂ ZQ0 be the unique weights with θ = θ ′ + θ ′′ and θ ′ (v) = letPθ ′ ∈ ZQ0 ⊂ ZQ0 , θ ′′ ∈ ZP − w∈Q′ \{v} θ(w), θ ′′ (v) = − w∈Q′′ \{v} θ(w) when Q′0 ∩ Q′′0 = {v}. 0 0 (i) Then the quiver polyhedron ∇(Q, θ) is the product of the polyhedra ∇(Q′ , θ ′ ) and ∇(Q′′ , θ ′′ ). (ii) We have M(Q, θ) ∼ = M(Q′ , θ ′ ) × M(Q′′ , θ ′′ ). Proof. (i) A point x ∈ RQ1 uniquely decomposes as x = x′ + x′′ , where x′ (a) = 0 for all a ∈ / Q′1 and x′′ (a) = 0 for all a ∈ / Q′′1 . It is obvious by definition of quiver polyhedra that x ∈ ∇(Q, θ) if ′ ′ ′ and only if x ∈ ∇(Q , θ ) and x′′ ∈ ∇(Q′′ , θ ′′ ). (ii) was observed already in [13] and follows from (i) by Proposition 3.1.  Definition 4.11 (i) We call a connected undirected graph Γ (with at least one edge) prime if it is not the union of full proper subgraphs Γ′ , Γ′′ having only one common vertex (i.e. it is 2-vertex-connected). A quiver Q will be called prime if its underlying graph is prime. (ii) We call a toric variety prime if it is not the product of lower dimensional toric varieties. Obviously any toric variety is the product of prime toric varieties, and this product decomposition is unique up to the order of the factors (see for example Theorem 2.2 in [12]). It is not immediate from the definition, but we shall show in Theorem 4.12 (iii) that the prime factors of a toric quiver variety are quiver varieties as well. Note that a toric quiver variety associated to a non-prime quiver may well be prime, and conversely, a toric quiver variety associated to a prime quiver can be non-prime, as it is shown by the following example: 1 −2 1 −2 2 The quiver in the picture is prime but the moduli space corresponding to this weight is However, as shown by Theorem 4.12 below, when the tightness of some (Q, θ) is assumed, decomposing Q into its unique maximal prime components gives us the unique decomposition of M(Q, θ) as a product of prime toric varieties. P1 ×P1 . Theorem 4.12 (i) Let Qi (i = 1, . . . , k) be the maximal full subquivers of Q, and Pk prime i i i Q denote by θ ∈ Z 0 the unique weights satisfying i=1 θ (v) = θ(v) for all v ∈ Q0 and Qk P i i i ∼ i=1 M(Q , θ ). Moreover, if (Q, θ) is tight, v∈Qi0 θ (v) = 0 for all i. Then M(Q, θ) = then the (Qi , θ i ) are all tight. (ii) If (Q, θ) is tight then M(Q, θ) is prime if and only if Q is prime. (iii) Any toric quiver variety is the product of prime toric quiver varieties. 8 Qk Proof. The isomorphism M(Q, θ) ∼ = i=1 M(Qi , θ i ) follows from Proposition 4.10. The second statement in (i) follows from this isomorphism and Corollary 4.5. Next we turn to the proof of (ii), so suppose that (Q, θ) is tight. If Q is not prime, then χ(Qi ) > 0 for all i, hence M(Q, θ) is not prime by (i). To show the reverse implication assume on the contrary that Q is prime, and M(Q, θ) ∼ = X ′ ×X ′′ where X ′ , X ′′ are positive dimensional toric Q1 varieties. Note that then Q1 does not contain P loops. Let P {εa | a ∈ Q1 } be a Z-basis of Z , and for each vertex v ∈ Q0 let us define Cv := a+ =v εa − a− =v εa . Following the description of the toric fan Σ of M(Q, θ) in [14] we can identify the lattice of one-parameter subgroups N of M(Q, θ) with ZQ1 /hCv | v ∈ Q0 i, and the ray generators of the fan with the cosets of the εa . Denoting by Σ′ and Σ′′ the fans of X ′ and X ′′ respectively, we have Σ = Σ′ × Σ′′ = {σ ′ × σ ′′ | σ ′ ∈ Σ′ , σ ′′ ∈ Σ′′ } (see [8] Proposition 3.1.14). Denote by π ′ : N → N ′ , π ′′ : N → N ′′ the natural projections to the sets of one-parameter subgroups of the tori in X ′ and X ′′ . For each ray generator εa we have either π ′ (εa ) = 0 or π ′′ (εa ) = 0. Since (Q, θ) is tight we obtain a partition of Q1 into two disjoint non-empty sets of arrows: Q′1 = {a ∈ Q1 | π ′′ (a) = 0} and Q′′1 = {a ∈ Q1 | π ′ (a) = 0}. Since Q is prime, it is connected, hence there exists a vertex w incident to arrows both from Q′1 and ′′ ′ Q′′1 . Let Π′ and Π′′ denote the projections from ZQ1 to ZQ1 and ZQ1 . By choice of w we have Π′ (Cw ) 6= 0 and Π′′ (Cw ) 6= 0. Writing ϕ for the natural map from ZQ1 to N ∼ = ZQ1 /hCv | v ∈ Q0 i ′ ′ ′′ ′′ ′ we have ϕ ◦ Π = π ◦ ϕ and ϕP◦ Π = π ◦ ϕ, so ker(ϕ) = hCv | v ∈ QP 0 i is closed under Π and ′ ′′ Π . Taking into account that v∈Q0 Cv = 0 we deduce that Π (Cw ) = v∈Q0 \{w} λv Cv for some λv ∈ Z. Set S ′ := {v ∈ Q0 | λv 6= 0}. Since each arrow appears in exactly two of the Cv , it follows that S ′ contains all vertices connected to w by an arrow in Q′1 , hence S ′ is non-empty. Moreover, the set of arrows having exactly one endpoint in S ′ are exactly those arrows in Q′1 that are adjacent to w. Thus S ′′ := Q0 \ (S ′ ∪ {w}) contains all vertices that are connected to w by an arrow from Q′′1 , hence S ′′ is non-empty. Furthermore, there are no arrows in Q1 connecting a vertex from S ′ to a vertex in S ′′ . It follows that Q is the union of its full subquivers spanned by the vertex sets S ′ ∪ {w} and S ′′ ∪ {w}, having only one common vertex w and no common arrow. This contradicts the assumption that Q was prime. Statement (iii) follows from (i), (ii) and Proposition 4.2.  Note that if χ(Γ) ≥ 2 and Γ is prime, then Γ contains no loops (i.e. an edge with identical endpoints), every vertex of Γ has valency at least 2, and Γ has at least two vertices with valency at least 3. Definition 4.13 For d = 2, 3, . . . denote by Ld the set of prime graphs Γ with χ(Γ) = d in which all vertices have valency at least 3. Let Rd stand for the set of quivers Q with no oriented cycles obtained from a graph Γ ∈ Ld by orienting some of the edges somehow and putting a sink on the remaining edges (that is, we replace an edge by a path of length 2 in which both edges are pointing towards the new vertex in the middle). We shall call Γ the skeleton S(Q) of Q; note that χ(Q) = χ(S(Q)). Starting from Q, its skeleton Γ = S(Q) can be recovered as follows: Γ0 is the subset of Q0 consisting of the valency 3 vertices. For each path in the underlying graph of Q that connects two vertices in Γ0 and whose inner vertices have valency 2 we put an edge. Clearly, a quiver Q with χ(Q) = d ≥ 2 belongs to Rd if and only if the following conditions hold: (i) Q is prime. (ii) There is no arrow of Q connecting valency 2 vertices. (iii) Every valency 2 vertex of Q is a sink. 9 Furthermore, set R := . F∞ d=1 Rd where R1 is the 1-element set consisting of the Kronecker quiver Remark 4.14 A purely combinatorial characterization of tightness is given in Lemma 13 of [4]. Namely, (Q, θ) is tight if and only if any connected component of Q is θ-stable, and any connected component of Q \ {a} for any a ∈ Q1 is θ-stable (see Section 6 for the notion of θstability). P In the same Lemma it is also shown that if (Q, θ) is tight, then (Q, δQ ) is tight, where δQ := a∈Q1 (εa+ − εa− ) is the so-called canonical weight (here εv stands for the characteristic function of v ∈ Q0 ). It is easy to deduce that ` for a connected quiver Q the pair (Q, δQ ) is tight if and only if there is no partition Q0 = S S ′ such that there is at most one arrow from S to S ′ and there is at most one arrow from S ′ to S. Proposition 4.15 For any d ≥ 2, Γ ∈ Ld and Q ∈ Rd we have the inequalities |Γ0 | ≤ 2d − 2, |Γ1 | ≤ 3d − 3, |Q0 | ≤ 5(d − 1), |Q1 | ≤ 6(d − 1). In particular, Ld and Rd are finite for each positive integer d. Proof. Take Γ ∈ Ld where d ≥ 2. Then Γ contains no loops, and denoting by e the number of edges and by v the number of vertices of Γ, we have the inequality 2e ≥ 3v, since each vertex is adjacent to at least three edges. On the other hand e = v − 1 + d. We conclude that v ≤ 2d − 2 and hence e ≤ 3d − 3. For Q ∈ Rd with S(Q) = Γ we have that |Q0 | ≤ v + e and |Q1 | ≤ 2e.  Theorem 4.16 (i) Any d-dimensional prime toric quiver variety M(Q, θ) can be realized by a tight pair (Q, θ) where Q ∈ Rd (consequently |Q0 | ≤ 5(d − 1) and |Q1 | ≤ 6(d − 1) when d ≥ 2). (ii) For each positive integer d up to isomorphism there are only finitely many d-dimensional toric quiver varieties. Proof. It follows from Propositions 4.2, Corollary 4.7 and Proposition 4.8 that any d-dimensional prime toric quiver variety can be realized by a tight pair (Q, θ) where Q ∈ Rd ; the bounds on vertex and arrow sets of the quiver follow by Proposition 4.15. It remains to show (ii). For a ′ given quiver Q we say that the weights θ and θ ′ are equivalent if Rep(Q)θ−ss = Rep(Q)θ −ss ; this implies that M(Q, θ) = M(Q, θ ′ ). For a given representation R of Q, the set of weights θ for which R is θ-semistable is determined by the set of dimension vectors of subrepresentations of R. Since there are finitely many possibilities for the dimension vectors of a subrepresentation of a representation with dimension vector (1, . . . , 1), up to equivalence there are only finitely many different weights, hence there are finitely many possible moduli spaces for a fixed Q.  Remark 4.17 Part (i) of Theorem 4.16 can be directly obtained from the results in [3] and [4]. From the proof of Theorem 7 in [3] it follows that the bound on the number of vertices and edges hold whenever the canonical weight is tight for a quiver. While in [3] it is assumed that Q has no oriented cycles, their argument for the bound applies to the general case as well. Moreover Lemma 13 in [4] shows that every toric quiver variety can be realized by a pair (Q, θ) where Q is tight with the canonical weight. These two results imply part (i) of Theorem 4.16. Remark 4.18 We mention that for a fixed quiver Q it is possible to give an algorithm to produce a representative for each of the finitely many equivalence classes of weights. The change of the moduli spaces of a given quiver when we vary the weight is studied in [13], [14], where the inequalities determining the chamber system were given. To find an explicit weight in each chamber one can use the Fourier-Motzkin algorithm. 10 Theorem 4.16 is sharp, and the reductions on the quiver are optimal, in the sense that in general one can not hope for reductions that would yield smaller quivers: Proposition 4.19 For each natural number d ≥ 2 there exists a d-dimensional toric quiver variety M(Q, θ) with |Q1 | = 6(d − 1), |Q0 | = 5(d − 1), such that for any other quiver and weight Q′ , θ ′ with M(Q, θ) ∼ = M(Q′ , θ ′ ) (isomorphism of toric varieties) we have that |Q′1 | ≥ |Q1 | and ′ |Q0 | ≥ |Q0 |. Proof. The number of inequalities defining ∇(Q, θ) in its affine span is obviously bounded by the number of arrows of Q, so the number of facets of a quiver polyhedron ∇(Q, θ) is bounded by |Q1 |. On the other hand the number of facets is an invariant of the corresponding toric variety, as it equals the number of rays in the toric fan of M(Q, θ). Therefore by Corollary 4.5 it is sufficient to show the existence of a tight (Q, θ) with |Q1 | = 6(d − 1) and |Q0 | = 5(d − 1). Such a pair (Q, θ) is provided in Example 4.20.  Example 4.20 For d ≥ 3 consider the graph below with 2(d − 1) vertices. Removing any two edges from this graph we obtain a connected graph. Now let Q be the quiver obtained by putting a sink on each of the edges (so the graph below is the skeleton of Q). Then (Q, δQ ) is tight by Remark 4.14 (δQ takes value 2 on each sink and value −3 on each source). Relaxing the condition on tightness it is possible to come up with a shorter list of quivers whose moduli spaces exhaust all possible toric quiver varieties. A key role is played by the following statement: Proposition 4.21 Suppose that Q has no oriented cycles and a ∈ Q1 is an arrow such that contracting it we get a quiver (i.e. the quiver Q̂ described in Definition 4.1) that has no oriented cycles. Then for a sufficiently large integer d we have that a is contractable for the pair (Q, θ + d(εa+ − εa− )), where εv ∈ ZQ0 stands for the characteristic function of v ∈ Q0 . Proof. Set ψd = θ + d(εa+ − εa− ), and note that ψ̂d = θ̂ for all d. Considering the embeddings π : F −1 (ψd ) → F ′−1 (θ̂) described in the proof of Lemma 4.4, we have that for any d, any y ∈ F −1 (ψd ) and b ∈ Q1 \ {a}, min{x(b) | x ∈ ∇(Q̂, θ̂)} ≤ y(b) ≤ max{x(b) | x ∈ ∇(Q̂, θ̂)} Since we assumed that Q̂ has no oriented cycles, the minimum and the maximum in the inequality above are finite. Now considering the arrows incident to a− we obtain that for any xP ∈ F −1 (ψd ) we P P − − have x(a) = d−θ(a )+ b+ =a− x(b)− b− =a− ,b6=a x(b). Thus for d ≥ θ(a )−min{ b+ =a− x(b)− P ′−1 (θ̂)} the arrow a is contractable for (Q, ψ ) by Lemma 4.4.  d b− =a− ,b6=a x(b) | x ∈ F For d ≥ 2 introduce a partial ordering ≥ on Ld : we set Γ ≥ Γ′ if Γ′ is obtained from Γ by contracting an edge, and take the transitive closure of this relation. Now for each positive integer d ≥ 2 denote by L′d ⊆ Ld the set of undirected graphs Γ ∈ Ld that are maximal with respect to the relation ≥, and set L′1 := L1 . It is easy to see that for d ≥ 2, L′d consists of 3-regular graphs (i.e. graphs in which all vertices have valency 3). Now denote by R′d the quivers which are obtained by putting a sink on each edge from a graph from L′d . 11 Theorem 4.22 For d ≥ 2 any prime d-dimensional projective toric quiver variety is isomorphic to M(Q, θ) where Q ∈ R′d . Proof. This is an immediate consequence of Theorem 4.16 and Proposition 4.21.  Example 4.23 L′3 consists of two graphs: Now put a sink on each edge of the above graphs. The first of the two resulting quivers is not tight for the canonical weight. After tightening we obtain the following two quivers among whose moduli spaces all 3-dimensional prime projective toric quiver varieties occur: 5 The 2-dimensional case As an illustration of the general classification scheme explained in Section 4, we quickly reproduce the classification of 2-dimensional toric quiver varieties (this result is known, see Theorem 5.2 in [13] and Example 6.14 in [11]): Proposition 5.1 (i) A 2-dimensional toric quiver variety is isomorphic to one of the following: The projective plane P2 , the blow up of P2 in one, two, or three points in general position, or P1 × P1 . (ii) The above varieties are realized (in the order of their listing) by the following quiver-weight pairs: −1 1 2 3 2 1 1 2 2 1 −2 −3 −2 −4 2 2 −3 −3 −1 1 −1 1 −3 2 Proof. R1 consists only of the Kronecker quiver. The only weights yielding a non-empty moduli space are (−1, 1) and its positive integer multiples, hence the corresponding moduli space is P1 . Thus P1 × P1 , the product of two projective lines occurs as a 2-dimensional toric quiver variety, 1. say for the disjoint union of two copies of −1 L2 consists of the graph with two vertices and three edges connecting them (say by Proposition 4.15). Thus R′2 consists of the following quiver: A: 12 Figure 1: The polytope ∇(A, θ) y Defining inequalitites: y = θ3 0 ≤ x ≤ θ2 0 ≤ y ≤ θ3 x + y = −θ1 −θ4 − θ1 ≤ x + y ≤ −θ1 . x + y = −θ1 − θ4 x x = θ2 Choosing a spanning tree T in Q, the x(a) with a ∈ Q1 \ T1 can be used as free coordinates in AffSpan(∇(Q, θ)). For example, take in the quiver A the spanning tree with thick arrows in the following figure: θ2 AffSpan(∇(A, θ)): x y θ1 θ3 P5 i=1 θi θ2 − x θ3 − y −θ1 − x − y =0 θ5 θ4 + θ1 + x + y θ4 Clearly ∇(A, θ) is integral-affinely equivalent to the polytope in R2 = {(x, y) | x, y ∈ R} shown on Figure 1. Depending on the order of −θ1 , θ3 , −θ1 − θ4 , θ2 , its normal fan is one of the following: σ2 σ3 σ1 σ2 σ1 σ3 σ4 σ3 σ1 σ3 σ5 σ3 σ2 σ4 σ2 σ4 σ2 σ4 σ1 σ1 σ5 σ6 It is well known that the corresponding toric varieties are the projective plane P2 , P1 × P1 and the projective plane blown up in one, two, or three points in general position, so (i) is proved. Taking into account the explicit inequalities in Figure 1, we see that for the pairs (A, θ) given in (ii), the variety X∇(A,θ) = M(A, θ) has the desired isomorphism type.  13 Remark 5.2 (i) Since the toric fan of the blow up of P2 in three generic points has 6 rays, to realize it as a toric quiver variety we need a quiver with at least 6 arrows and hence with at least 5 vertices (see Proposition 4.19). (ii) Comparing Proposition 5.1 with Section 3.3 in [3] we conclude that for each isomorphism class of a 2-dimensional toric quiver variety there is a quiver Q such that M(Q, δQ ) belongs to the given isomorphism class (recall that δQ is the so-called canonical weight), in particular in dimension 2 every projective toric quiver variety is Gorenstein Fano.. This is explained by the following two facts: (1) in dimension 2, a complete fan is determined by the set of rays; (2) if (Q, θ) is tight, then (Q, δQ ) is tight. Now (1) and (2) imply that if (Q, θ) is tight and χ(Q) = 2, then M(Q, θ) ∼ = M(Q, δQ ). (iii) The above does not hold in dimension three or higher. Consider for example the quiverweight pairs: 3 1 0 −3 1 −2 The weight on the left is the canonical weight δQ for this quiver, and it is easy to check that (Q, δQ ) is tight and M(Q, δQ ) is a Gorenstein Fano variety with one singular point. The weight on the right is also tight for this quiver, however it gives a smooth moduli space which can not be isomorphic to M(Q, δQ ), consequently it also can not be Gorenstein Fano since the rays in its fan are the same as those in the fan of M(Q, δQ ). (iv) It is also notable in dimension 2 that each toric moduli space can be realized by precisely one quiver from Rd . This does not hold in higher dimensions. For example consider the following quivers: These quivers are both tight with their canonical weights, and give isomorpic moduli, since they are both obtained after tightening: 6 Affine quotients We need a result concerning representation spaces that we discuss for general dimension vectors. Consider the following situation. Let T be a (not necessarily full) subquiver of Q which is the `r disjoint union of trees T = i=1 T i (where by a tree we mean a quiver whose underlying graph 14 is a tree). Let α be a dimension vector taking the same value di on the vertices of each T i Q0 be a weight such that there exist positive integers n (a ∈ T ) with (i = 1, .P . . , r). Let θ ∈ ZP a 1 θ(v) = a∈T1 :a+ =v na − a∈T1 :a− =v na . The representation space Rep(Q, α) contains the Zariski dense open subset UT := {R ∈ Rep(Q, α) | ∀a ∈ T1 : det(R(a)) 6= 0}. Note that UT is a principal Q affine open subset in Rep(Q, α) given by the non-vanishing of the relative invariant f : R 7→ a∈T1 detna (R(a)) of weight θ, hence UT is contained in Rep(Q, α)θ−ss . Moreover, UT is π-saturated with respect to the quotient morphism π : Rep(Q, α)θ−ss → M(Q, α, θ), hence π maps UT onto an open subset π(UT ) ∼ = UT //GL(α) of M(Q, α, θ) (here for an affine GL(α)-variety X we denote by X//GL(α) the affine quotient, that is, the variety with coordinate ring the ring of invariants O(X)GL(α) ), see [22]. Denote by Q̂ the quiver obtained from Q by contracting each connected component T i of T to a single vertex ti (i = 1, . . . , r). So ` Q̂0 = Q0 \ T0 {t1 , . . . , tr } and its arrow set can be identified with Q1 \ T1 , but if an end vertex of an arrow belongs to T i in Q then viewed as an arrow in Q̂ the correspoding end vertex is ti (in particular, an arrow in Q1 \ T1 connecting two vertices of T i becomes a loop at vertex ti ). Denote by α̂ the dimension vector obtained by contracting α accordingly, so α̂(ti ) = di for i = 1, . . . , r and α̂(v) = α(v) for v ∈ Q̂0 \ {t1 , . . . , tr }. Sometimes we shall identify GL(α̂) with the subgroup of GL(α) consisting of the elements g ∈ GL(α) with the property that g(v) = g(w) whenever v, w belong to the same component T i of T . We have a GL(α̂)-equivariant embedding ι : Rep(Q̂, α̂) → Rep(Q, α) (7) defined by ι(x)(a) = x(a) for a ∈ Q̂1 and ι(x)(a) the identity matrix for a ∈ Q1 \ Q̂1 . Clearly Im(ι) ⊆ Rep(Q, α)θ−ss . Proposition 6.1 (i) UT ∼ = GL(α) ×GL(α̂) Rep(Q̂, α̂) as affine GL(α)-varieties. ∼ = (ii) The map ι induces an isomorphism ῑ : M(Q̂, α̂, 0) −→ π(UT ) ⊆ M(Q, α, θ). Proof. (i) Set p := ι(0) ∈ Rep(Q, α). Clearly GL(α̂) is the stabilizer of p in GL(α) acting on Rep(Q, α), hence the GL(α)-orbit O of p is isomorphic to GL(α)/GL(α̂) via the map sending the coset gGL(α̂) to g · p. On the other hand O is the subset consisting of all those points R ∈ Rep(Q, α) for which det(R(a)) 6= 0 for a ∈ T1 and R(a) = 0 for all a ∈ / T1 . This can be shown by induction on the number of arrows of T , using the assumption that T is the disjoint union of trees. Recall also that the arrow set of Q̂ is identified with a subset Q1 \T1 . This yields an obvious identification UT = Rep(Q̂, α̂) × O. Projection ϕ : UT → O onto the second component is GL(α)-equivariant by construction. Moreover, the fibre ϕ−1 (p) = ι(Rep(Q̂, α̂)) ∼ = Rep(Q̂, α̂) as a StabGL(α) (p) = GL(α̂)-varieties. It is well known that this implies the isomorphism UT ∼ = GL(α) ×GL(α̂) Rep(Q̂, α̂), see for example Lemma 5.17 in [5]. (ii) It follows from (i) that UT //GL(α) ∼ = Rep(Q̂, α̂)//GL(α̂) = M(Q̂, α̂, 0) by standard properties of associated fiber products. Furthermore, taking into account the proof of (i) we see UT //GL(α) = π(ϕ−1 (p)) = π(ι(Rep(Q̂, α̂)) where π is the quotient morphism (2).  Let us apply Proposition 6.1 in the toric case. It is well known that for a lattice point m in a lattice polyhedron ∇ there is an affine open toric subvariety Um of X∇ , and X∇ is covered by these affine open subsets as m ranges over the set of vertices of ∇ (see Section 2.3 in [8]). For a toric quiver variety realized as Im(ρ) as in (4) and Proposition 3.3, this can be seen explicitly as follows: Umi is the complement in Im(ρ) of the affine hyperplane {(x0 : · · · : xd ) | xi = 0} ⊆ Pd , 15 and for a general lattice point m in the quiver polyhedron, Um is the intersection of finitely many Umi . A subset S of Q0 is successor closed if for any a ∈ Q1 with a− ∈ S we have a+ ∈ S. A subquiver Q′ of Q is θ-stable if θ(Q′0 ) = 0 and for any non-empty S ( Q′0 which is successor closed in Q′ we have that θ(S) > 0. The support of x ∈ ZQ1 is the quiver with vertex set supp(x)0 := Q0 and arrow set supp(x)1 := {a ∈ Q1 | x(a) 6= 0}. Now m ∈ ∇(Q, θ) is a vertex if and only if the connected components of supp(m) are θ-stable subtrees of Q. On the other hand for each subquiver T of Q that is the disjoint union of θ-stable subtrees and satisfies T0 = Q0 there is precisely one vertex m ∈ ∇(Q, θ) such that supp(m) = T (see for example Corollary 8 in [4]). Given a vertex m of the polyhedron ∇(Q, θ) denote by (Qm , θ m ) the quiver and weight obtained by successively contracting the arrows in supp(m). Clearly θ m is the zero weight. The following statement can be viewed as a stronger version for the toric case of the results [1] on the local quiver settings of a moduli space of quiver representations: the étale morphisms used for general dimension vectors in [1] can be replaced by isomorphisms in the toric case. Theorem 6.2 For any vertex m of the quiver polyhedron ∇(Q, θ) the affine open toric subvariety Um in M(Q, θ) is isomorphic to M(Qm , 0). Moreover, ι : Rep(Qm ) → Rep(Q) defined as in (7) ∼ = induces an isomorphism ῑ : M(Qm , 0) −→ Um ⊆ M(Q, θ). Proof. This is a special case of Proposition 6.1 (ii).  Conversely, any affine toric quiver variety M(Q′ , 0) can be obtained as Um ⊆ M(Q, θ) for some projective toric quiver variety M(Q, θ) and a vertex m of the quiver polytope ∇(Q, θ). In fact we have a more general result, which is a refinement for the toric case of Theorem 2.2 in [10]: Theorem 6.3 For any quiver polyhedron ∇(Q, θ) with k vertices there exists a bipartite quiver Q̃, a weight θ ′ ∈ ZQ̃1 , and a set m1 , . . . , mk of vertices of the quiver polytope ∇(S Q̃, θ ′ ) such that the quasiprojective toric variety M(Q, θ) is isomorphic to the open subvariety ki=1 Umi of the projective toric quiver variety M(Q̃, θ ′ ). Proof. Double the quiver Q to get a bipartite quiver Q̃ as follows: to each v ∈ Q0 there corresponds a source v− and a sink v+ in Q̃, for each a ∈ Q1 there is an arrow in Q̃ denoted by the same symbol a, such that if a ∈ Q1 goes from v to w, then a ∈ Q̃1 goes from v− to w+ , and for each v ∈ Q0 there is a new arrow ev ∈ Q̃1 from v− to v+ . Denote by θ̃ ∈ ZQ̃0 the weight θ̃(v− ) = 0, θ̃(v+ ) = θ(v), and set κ ∈ ZQ̃0 with κ(v− ) = −1 and κ(v+ ) = 1 for all v ∈ Q0 . Suppose that T is a θ-stable subtree in Q. Denote by T̃ the subquiver of Q̃ consisting of the arrows with the same label as the arrows of T , in addition to the arrows ev for each v ∈ T0 . It is clear that T̃ is a subtree of Q̃. We claim that T̃ is (θ̃ + dκ)-stable for sufficiently large d. Obviously (θ̃ + dκ)(T˜0 ) = 0. Let S̃ be a proper successor closed subset of T̃0 in Q̃. Denote by S ⊂ T0 consisting of v ∈ T0 with v+ ∈PS̃ (note that v− ∈ S implies v+ ∈ S, since ev ∈ T̃ ). We have the equality (θ̃+dκ)(S̃) = θ(S)+ v+ ∈S̃,v− ∈/ S̃ (θ(v)+d). If the second summand is the empty sum (i.e. v+ ∈ S̃ implies v− ∈ S̃), then S is successor closed, hence θ(S) > 0 by assumption. Otherwise the sum is positive for sufficiently large d. This proves the claim. It follows that if d is sufficiently large, then for any vertex m of ∇(Q, θ), setting T := supp(m), there exists a vertex m̃ of ∇(Q̃, θ̃ + dκ) with supp(m̃) = T̃ . Denote by µ : Rep(Q) → Rep(Q̃) the map defined by µ(x)(ev ) = 1 for each v ∈ Q0 , and µ(x)(a) = x(a) for all a ∈ Q̃1 . This is equivariant, where we identify (C× )Q0 with the stabilizer of µ(0) in (C× )Q̃0 . The above considerations show that µ(Rep(Q)θ−ss ) ⊆ Rep(Q)(θ̃+dκ)−ss , 16 whence µ induces a morphism µ̄ : M(Q, θ) → M(Q̃, θ̃ + dκ). Restrict µ̄ to the affine open subset Um ⊆ M(Q, θ), and compose µ̄|Um with the isomorphism ῑ : M(Qm , 0) → Um ⊆ M(Q, θ) from Theorem 6.2. By construction we see that µ̄|U m ◦ ῑ is the isomorphism M(Qm , 0) → Um̃ of Theorem 6.2. It follows that µ̄|Um : Um → Um̃ is an isomorphism. As m rangesSover the vertices of ∇(Q, θ), these isomorphisms glue together to the isomorphism µ̄ : M(Q, θ) → m̃ Um̃ ⊆ M(Q̃, θ̃).  We note that similarly to Theorem 2.2 in [10], it is possible to embed M(Q, θ) as an open subvariety into a projective variety M(Q̃, θ ′ ), such that for any vertex m′ of ∇(Q̃, θ ′ ) the affine open subvariety Um′ ⊆ M(Q̃, θ ′ ) is isomorphic to Um ⊆ M(Q, θ) for some vertex m of ∇(Q, θ) (but of course typically ∇(Q̃, θ ′ ) has more vertices than ∇(Q, θ)). In particular, a smooth variety M(Q, θ) can be embedded into a smooth projective toric quiver variety ∇(Q̃, θ ′ ), where Q̃ is bipartite. 7 Classifying affine toric quiver varieties In this section we deal with the zero weight. It is well known and easy to see (say by Remark 4.14) that Q is 0-stable if and only if Q is strongly connected, that is, for any ordered pair v, w ∈ Q0 there is an oriented path in Q from v to w. Proposition 7.1 Let Q be a prime quiver with χ(Q) ≥ 2, such that (Q, 0) is tight. (i) For any v ∈ Q0 we have |{a ∈ Q1 | a− = v}| ≥ 2 and |{a ∈ Q1 | a+ = v}| ≥ 2. (ii) We have |Q0 | ≤ χ(Q) − 1 (and consequently |Q1 | = |Q0 | + χ(Q) − 1 ≤ 2(χ(Q) − 1). Proof. (i) Suppose v ∈ Q0 and a ∈ Q1 is the onlyParrow with a− = v. Then the equations (5) imply that for any x ∈ ∇(Q, 0) we have x(a) = b+ =v x(b), so by Lemma 4.4 the arrow a is contractable. The case when a is the only arrow with a+ = v is similar. (ii) By (i) the valency of any vertex is at least 4, hence similar considerations as in the proof of Proposition 4.15 yield the desired bound on |Q0 |.  Denote by R′′d the set of prime quivers Q with χ(Q) = d and (Q, 0) tight. Then R′′1 consists of the one-vertex quiver with a single loop, R′′2 is empty, R′′3 consists of the quiver with 2 vertices and 2 − 2 arrows in both directons. R′′4 consists of three quivers: Example 7.2 Consider the quiver Q with d vertices and 2d arrows a1 , . . . , ad , b1 , . . . , bd , where a1 . . . ad is a primitive cycle and bi is the obtained by reversing ai for i = 1, . . . , d. Then χ(Q) = d+1, and after the removal of any of the arrows of Q we are left with a strongly connected quiver. So (Q, 0) is tight, showing that the bound in Proposition 7.1 (ii) is sharp. The coordinate ring O(M(Q, 0)) is the subalgebra of O(Rep(Q)) generated by {x(ai )x(bi ), x(a1 ) · · · x(ad ), x(b1 ) · · · x(bd ) | i = 1, . . . , d}, so it is the factor ring of the (d + 2)-variable polynomial ring C[t1 , . . . , td+2 ] modulo the ideal generated by t1 · · · td − td+1 td+2 . 17 8 Presentations of semigroup algebras Let Q be a quiver with no oriented cycles, θ ∈ ZQ0 a weight. For a ∈ Q1 denote by x(a) : R 7→ R(a) the Q corresponding coordinate function on Rep(Q), and for a lattice point m ∈ ∇(Q, θ) set xm := a∈Q1 x(a)m(a) . The homogeneous coordinate ring A(Q, θ) of M(Q, θ) is the subalgebra of O(Rep(Q)) generated by xm where m ranges over ∇(Q, θ) ∩ ZQ1 . In Section 9 we shall study the ideal of relations among the generators xm . This leads us to the context of presentations of polytopal semigroup algebras (cf. section 2.2 in [6]), since A(Q, θ) is naturally identified with the semigroup algebra C[S(Q, θ)], where S(Q, θ) := ∞ a ∇(Q, kθ) ∩ ZQ1 . k=0 This is a submonoid of ZQ1 . By normality of the polytope ∇(Q, θ) it is the same as the submonoid 1 Q1 of NQ 0 generated by ∇(Q, θ) ∩ Z . First we formulate a statement (Lemma 8.2; a version of it was introduced in [16]) in a slightly more general situation than what is needed here. Let S be any finitely generated commutative monoid (written additively) with non-zero generators s1 , . . . , sd , and denote by Z[S] the corresponding semigroup algebra over Z: its elements are formal integral linear combinations of the ′ ′ symbols {xs | s ∈ S}, with multiplication given by xs · xs = xs+s . Write R := Z[t1 , . . . , td ] for the d-variable polynomial ring over the integers, and φ : R → Z[S] the ring surjection ti 7→ xsi . Set I := ker(φ). It is well known and easy to see that I = ker(φ) = SpanZ {ta − tb | d X i=1 ai s i = d X bj sj ∈ S} (8) j=1 where for a = (a1 , . . . , ad ) ∈ Nd0 we write ta = ta11 . . . tdad . Introduce a binary relation on the set of monomials in R: we write ta ∼ tb if ta − tb ∈ R+ I, where R+ is the ideal in R consisting of the polynomials with zero constant term. Obviously ∼ is an equivalence of the equivalence classes. P ` relation. Let Λ be a complete set of representatives ai si = s}. For the s ∈ S with We have Λ = s∈S Λs , where for s ∈ S set Λs := {ta ∈ Λ | |Λs | > 1, set Gs := {ta1 − tai | i = 2, . . . , p}, where ta1 , . . . , tap is an arbitrarily chosen ordering of the elements of Λs . ` Lemma 8.1 Suppose that S = ∞ k=0 Sk is graded ` (i.e. Sk Sl ⊆ Sk+l ) and S0 = {0} (i.e. the generators s1 , . . . , sd have positive degree). Then s∈S:|Λs |>1 Gs is a minimal homogeneous generating system of the ideal I, where the grading on Z[t1 , . . . , td ] is defined by setting P the degree of ti to be equal to the degree of si . In particular, I is minimally generated by s∈S (|Λs | − 1) elements. P Proof. It is easy to see that a Z-module direct complement of R+ I in R is ta ∈Λ Zta . Thus the statement follows by the graded Nakayama Lemma.  Next for a cancellative commutative monoid S we give a more explicit description of the relation ∼ (a special case occurs in [16]). For some elements s, v ∈ S we say that s divides v and write s | v if there exists an element w ∈ S with v = s + w. For any s ∈ S introduce a binary relation ∼s on the subset of {s1 , . . . , sd } consisting of the generators si with si | s as follows: si ∼s sj if i = j or there exist u1 , . . . , uk ∈ {s1 , . . . , sd } with u1 = si , uk = sj , ul ul+1 | s for l = 1, . . . , k − 1. 18 (9) Obviously ∼s is an equivalence relation, and si ∼s sj implies si ∼t sj for any s | t ∈ S. a b LemmaP8.2 Let S be Pad cancellative commutative monoid generated by s1 , . . . , sd . Take t −t ∈ I, d so s := i=1 ai si = j=1 bj sj ∈ S. Then the following are equivalent: (i) ta − tb ∈ R+ I; (ii) For some ti | ta and tj | tb we have si ∼s sj ; (iii) For all ti | ta and tj | tb we have si ∼s sj . Proof. (iii) trivially implies (ii). Moreover, if ti , tj are two different variables occuring in ta with P ai si = s, then si sj | s, hence taking k = 2 and u1 = s1 , u2 = s2 in (9) we see that si ∼s sj . This shows that (ii) implies (iii). To show that (ii) implies (i) assume that for some ti | ta and tj | tb we have si ∼s sj . If ′ ′ si = sj , then ta and tb have a common variable, say t1 , so ta = t1 ta and tb = t1 tb for some a′ , b′ ∈ Nd0 . We have ′ ′ ′ ′ xs1 φ(ta − tb ) = φ(t1 (ta − tb )) = φ(ta − tb ) = 0 ′ ′ ′ ′ ′ ′ hence xs1 φ(ta ) = xs1 φ(tb ). Since S is cancellative, we conclude φ(ta ) = φ(tb ), thus ta − tb ∈ I, ′ ′ implying in turn that ta − tb = t1 (ta − tb ) ∈ R+ I. If si 6= sj , then there exist z1 , . . . , zk ∈ {t1 , . . . , td } such that ul ∈ S with φ(zl ) = xul satisfy (9). Then there exist monomials (possibly empty) w0 , . . . , wk in the variables t1 , . . . ., td such that z1 w0 = ta , φ(zl zl+1 wl ) = xs (l = 1, . . . , k − 1), zk wk = tb . It follows that ta − tb = z1 (w0 − z2 w1 ) + k−1 X zl (zl−1 wl−1 − zl+1 wl ) + zk (zk−1 wk−1 − wk ). (10) l=2 Note that φ(z1 w0 − z1 z2 w1 ) = xs − xs = 0. Hence z1 (w0 − z2 w1 ) ∈ I. Since S is cancellative, we conclude that z1 (w0 − z2 w1 ) ∈ R+ I. Similarly all the other summands on the right hand side of (10) belong to R+ I, hence ta − tb ∈ R+ I. Finally we show that (i) implies (ii). Suppose that ta − tb ∈ R+ I. By (8) we have a b t −t = k X til (tal − tbl ) where tal − tbl ∈ I and il ∈ {1, . . . , d} (11) l=1 After a possible renumbering we may assume that ti1 ta1 = ta , til tbl = til+1 tal+1 for l = 1, . . . , k − 1, and tik tbk = tb . (12) Observe that if til = til+1 for some l ∈ {1, . . . , k − 1}, then necessarily tbl = tal+1 , hence til (tal − tbl ) + til+1 (tal+1 − tbl+1 ) = til (tal − tbl+1 ). Thus in (11) we may replace the sum of the lth and (l + 1)st terms by a single summand til (tal − tbl+1 ). In other words, we may achieve that in (11) we have til 6= til+1 for each l = 1, . . . , k − 1, in addition to (12). If k = 1, then ta and tb have a common variable and (ii) obviously holds. From now on assume that k ≥ 2. From til tal = til+1 tbl and the fact that til and til+1 are different variables in Z[t1 , . . . , td ] we deduce that tal = til+1 tcl for some cl ∈ Nd0 , implying that xs = φ(til tal ) = φ(til til+1 tcl ) = φ(til )φ(til+1 )φ(tcl ). Thus ul := sil satisfy (9) and hence si1 ∼s sik .  19 ` Corollary 8.3 Suppose that S = ∞ k=0 Sk is a finitely generated graded cancellative commutative monoid generated by S1 = {s1 , . . . , sd }. The kernel of φ : Z[t1 , . . . , td ] → Z[S], ti 7→ xsi is generated by homogeneous elements of degree at most r (with respect to the standard grading on Z[ta , . . . , td ]) if and only if for all k > r and s ∈ Sk , the elements in S1 that divide s in the monoid S form a single equivalence class with respect to ∼s . Proof. This is an immediate consequence of Lemma 8.1 and Lemma 8.2. 9  Equations of toric quiver varieties Corollary 8.3 applies for the monoid S(Q, θ), where the grading is given by S(Q, θ)k = ∇(Q, kθ)∩ ZQ1 . Recall that we may identify the complex semigroup algebra C[S(Q, θ)] and the homogeneous coordinate ring A(Q, θ) by identifying the basis element xm in the semigroup algebra to the element of A(Q, θ) denoted by the same symbol xm . Introduce a variable tm for each m ∈ ∇(Q, θ) ∩ ZQ1 , take the polynomial ring F := C[tm | m ∈ ∇(Q, θ) ∩ ZQ1 ] and consider the surjection ϕ : F → A(Q, θ), tm 7→ xm . (13) The kernel ker(ϕ) is a homogeneous ideal in the polynomial ring F (endowed with the standard grading) called the ideal of relations among the xm , for which Corollary 8.3 applies. Note also that in the monoid S(Q, θ) we have that m | n for some m, n if and only if m ≤ n, where the partial ordering ≤ on ZQ1 is defined by setting m ≤ n if m(a) ≤ n(a) for all a ∈ Q1 . The following statement is a special case of the main result (Theorem 2.1) of [25]: Proposition 9.1 Let Q = K(n, n) be the complete bipartite quiver with n sources and n sinks, with a single arrow from each source to each sink. Let θ be the weight with θ(v) = −1 for each source and θ(v) = 1 for each sink, and ϕ : F → A(Q, θ) given in (13). Then the ideal ker(ϕ) is generated by elements of degree at most 3. For sake of completeness we present a proof. The argument below is based on the key idea of [25], but we use a different language and obtain a very short derivation of the result. For this quiver and weight generators of A(Q, θ) correspond to perfect matchings of the underlying graph of K(n, n). Recall that a perfect matching of K(n, n) is a set of arrows {a1 , . . . , an } such that for each source v there is a unique i such that a− i = v and for each sink w there is a unique j such + Q 1 that aj = w. Now ∇(Q, θ) ∩ Z in this case consists of the characteristic functions of perfect matchings of K(n, n). By a near perfect matching we mean an incomplete matching that covers all but 2 vertices (1 sink and 1 source). Abusing language we shall freely identify a (near) perfect 1 matching and its characteristic function (an element of NQ 0 ). First we show the following lemma: Lemma 9.2 Let θ be the weight for Q = K(n, n) as above, and m1 + · · · + mk = q1 + · · · + qk for some k ≥ 4 and mi , qj ∈ ∇(Q, θ) ∩ ZQ1 . Furthermore let us assume that for some 0 ≤ l ≤ n − 2 there is a near perfect matching p such that p ≤ m1 + m2 and p contains l arrows from q1 . Then there is a j ≥ 3 and m′1 , m′2 , m′j ∈ ∇(Q, θ) ∩ ZQ1 and a near perfect matching p′ such that m1 + m2 + mj = m′1 + m′2 + m′j , p′ ≤ m′1 + m′2 and p′ contains l + 1 arrows from q1 . 20 Proof. Let v1 , . . . , vn be the sources and w1 , . . . , wn the sinks of Q, and let us assume that p covers all vertices but v1 and w1 . Let a be the arrow incident to v1 in q1 . If a is contained in m1 + m2 then pick an arbitrary j ≥ 3, otherwise take j to be such that mj contains a. We can obtain a near perfect matching p′ < m1 + m2 + mj that intersects q1 in l + 1 arrows in the following way: if a connects v1 and w1 we add a to p and remove one arrow from it that was not contained in q1 (this is possible due to l ≤ n − 2); if a connects v1 and wi for some i 6= 1 then we add a to p and remove the arrow from p which was incident to wi (this arrow is not 1 contained in q1 ). Set r := m1 + m2 + mj − p′ ∈ NQ S the subquiver of K(n, n) 0 , and denote by −` + S0 where S0− P denotes the with S0 = Q0 and S1 = {c ∈ Q1 | r(c) 6= 0}. We have S0 = S0 set of sources and S0+ denotes the set of sinks. For a vertex v ∈ S0 set degr (v) := c∈S1 |r(c)|. We have that degr (v) = 3 for exactly one source and for exactly one sink, and degr (v) = 2 for all the remaining vertices of S. Now let A be an arbitrary subset of S0− , and denote by B the subset of S0+ consisting P of the sinks that P are connected by an arrow in S to a vertex in A. We have the inequality v∈A degr (v) ≤ w∈B degr (w). Since on both sides of this inequality the summands are 2 or 3, and 3 can occur at most once on each side, we conclude that |B| ≥ |A|. Applying the König-Hall Theorem (cf. Theorem 16.7 in [23]) to S we conclude that it contains a perfect matching. Denote the characteristic vector of this perfect matching by m′j . Take perfect matchings m′1 and m′2 of S with m1 + m2 + mj − m′j = m′1 + m′2 (note that m′1 , m′2 exist by normality of the polytope ∇(Q, θ), which in this case can be seen as an imediate consequence of the König-Hall Theorem). By construction we have m1 + m2 + mj = m′1 + m′2 + m′j , p′ ≤ m′1 + m′2 , and p′ has l + 1 common arrows with q1 .  Proof of Proposition 9.1 By Corollary 8.3 it is sufficient to show that if s = m1 + · · · + mk = q1 + · · · + qk where mi , qj ∈ ∇(Q, θ) ∩ ZQ1 and k ≥ 4, then the mi , qj all belong to the same equivalence class with respect to ∼s . Note that since k ≥ 4, the elements m′1 , m′2 , m′j from the statement of Lemma 9.2 belong to the same equivalence class with respect to ∼s as m1 , . . . , mk . Hence repeatedly applying Lemma 9.2 we may assume that there is a near perfect matching p ≤ m1 + m2 such that p and q1 have n − 1 common arrows. The only arrow of q1 not belonging to p belongs to some mj , hence after a possible renumbering of m3 , . . . , mk we may assume that q1 ≤ m1 + m2 + m3 . It follows that q1 ∼s m4 , implying in turn that the mi , qj all belong to the same quivalence class with respect to ∼s .  Now we are in position to state and prove the main result of this section (this was stated in [20] as well, but was withdrawn later, see [21]): Theorem 9.3 Let Q be a quiver with no oriented cycles, θ ∈ ZQ1 a weight, and ϕ the C-algebra surjection given in (13). Then the ideal ker(ϕ) is generated by elements of degree at most 3. Proof. By Proposition 4.21 and the double quiver construction (cf. the proof of Theorem 6.3) it is sufficient to deal with the case when Q is bipartite and ∇(Q, θ) is non-empty. This implies that θ(v) ≤ 0 for each source vertex v and θ(w) ≥ 0 for each sink vertex w. Note that if θ(v) = 0 for some vertex v ∈ Q0 , then omitting v and the arrows adjacent to v we get a quiver Q′ such that the lattice polytope ∇(Q, θ) is integral-affinely equivalent toP∇(Q′ , θ|Q′0 ), hence we may assume that θ(v) 6= 0 for each v ∈ Q0 . We shall apply P induction on v∈Q0 (|θ(v)| − 1). The induction starts with the case when v∈Q0 (|θ(v)| − 1) = 0, in other words, θ(v) = −1 for each source v and θ(w) = 1 for each sink w. This forces that the number of sources equals to the number of sinks in Q. The case when Q is the complete bipartite quiver K(n, n) having n sinks and n sources, and each source is connected to each sink by a single arrow is covered by Proposition 9.1. Suppose next that Q is a subquiver of K(n, n) having a relative invariant of weight θ (i.e. K(n, n) 21 has a perfect matching all of whose arrows belong to Q). The lattice polytope ∇(Q, θ) can be identified with a subset of ∇(K(n, n), θ): think of m ∈ ZQ1 as m̃ ∈ ZK(n,n)1 where m̃(a) = 0 for a ∈ K(n, n)1 \ Q1 and m̃(a) = m(a) for a ∈ Q1 ⊆ K(n, n)1 . The surjection ϕ̃ : C[tm | m ∈ ∇(K(n, n), θ)] → A(K(n, n), θ) restricts to ϕ : C[tm | m ∈ ∇(Q, θ)] → A(Q, θ). Denote by π the surjection of polynomial rings that sends to zero the variables tm with m ∈ / ∇(Q, θ). Then π maps the ideal ker(ϕ̃) onto ker(ϕ), consequently generators of ker(ϕ̃) are mapped onto generators of ker(ϕ). Since we know already that the first ideal is generated by elements of degree at most 3, the same holds for ker(ϕ). The case when Q is an arbitrary bipartite quiver with n sources and n sinks having possibly multiple arrows, and θ(v) = −1 for each source v and θ(w) = 1 for each sink w follows from P the above case by a repeated application of Proposition 9.4 below. Assume next that v∈Q0 (|θ(v)| − 1) ≥ 1, so there exists a vertex w ∈ Q0 with |θ(w)| > 1. By symmetry we may assume that w is a sink, so θ(w) > 1. Construct a new quiver Q′ as follows: add a new vertex w′ to Q0 , for each arrow b with b+ = w add an extra arrow b′ with (b′ )+ = w′ and (b′ )− = b− , and consider the weight θ ′ with θ ′ (w′ ) = 1, θ ′ (w) = θ(w) − 1, and θ ′ (v) = θ(v) for all other vertices v. By Corollary 8.3 it is sufficient to show that if m1 + · · · + mk = n1 + · · · + nk = s ∈ S := S(Q, θ) for some k ≥ 4 and m1 , . . . , mk , n1 , . . . , nk ∈ ∇(Q, θ) ∩ ZQ1 , then mi ∼s nj for some (and hence all) i, j. Set S ′ := S(Q′ , θ ′ ), and consider the semigroup homomorphism π : S ′ → S given by ( m′ (a) + m′ (a′ ) if a+ = w; π(m′ )(a) = m′ (a) if a+ 6= w. Take an arrow α with α+ = w and s(α) > 0. After a possible renumbering we may assume Q′ that m1 (α) > 0 and n1 (α) > 0. Define m′1 ∈ N0 1 as m′1 (α) = m1 (α) − 1, m′1 (α′ ) = 1, and Q′ m′1 (a) = m1 (a) for all other arrows a ∈ Q′1 . Similarly define n′1 ∈ N0 1 as n′1 (α) = n1 (α) − 1, n′1 (α′ ) = 1, and n′1 (a) = n1 (a) for all other arrows a ∈ Q′1 . Clearly π(m′1 ) = m1 , π(n′1 ) = n1 . Q′ Q′ ′ ′ Now we construct s′ ∈P S ′ with π(s′ ) = s, s′ − m′1 ∈PN0 1 and s′ − n′1 ∈ N0 1 (thus m P1 and n1 divide ′ ′ s in S ). Note that a+ =w s(a) = kθ(w) and a+ =w max{m1 (a), n1 (a)} < a+ =w (m1 (a) + n1 (a))P= 2θ(w) (since m1 (α) > 0 and n1 (α) > 0). The inequalities θ(w) ≥ 2 and k ≥ 3 imply that a+ =w (s(a) − max{m P1 (a), n1 (a)}) ≥ P k. Consequently there exist non-negative integers + {t(a) | a = w} such that a+ =w t(a) = ( a+ =w s(a)) − k, s(a) ≥ t(a) ≥ max{m1 (a), n1 (a)} for ′ all a 6= α with a+ = w, and s(α) − 1 ≥ t(α) ≥ max{m1 (α), n1 (α)} − 1. Consider s′ ∈ ZQ1 given by s′ (a′ ) = s(a) − t(a) and s′ (a) = t(a) for a ∈ Q1 with a+ = w and s′ (b) = s(b) for all other ′ ∈ ∇(Q′ , θ ′ ) with properties, and so there exist m′i , nP b ∈ Q′1 . By construction s′ has the desiredP j ′ ′ ′ ′ ′ ′ s = m1 + · · · + mk = n1 + · · · + nk . Since v∈Q′ (|θ (v)| − 1) is one less than v∈Q0 (|θ(v)| − 1), 0 by the induction hypothesis we have m′1 ∼s′ n′1 . It is clear that a ∼t b implies π(a) ∼π(t) π(b), so we deduce m1 ∼s n1 . As we pointed out before, this shows by Corollary 8.3 that ker(ϕ) is generated by elements of degree at most 3.  The above proof refered to a general recipe to derive a minimal generating system of ker(ϕ) from a minimal generating system for the quiver obtained by collapsing multiple arrows to a single arrow. Let us consider the following situation: let Q be a quiver with no oriented cycles, − + + ′ α1 , α2 ∈ Q1 with α− 1 = α2 and α1 = α2 . Denote by Q the ′quiver obtained from Q by collapsing the αi to a single arrow α. Take a weight θ ∈ ZQ0 = ZQ0 . The map π : ∇(Q, θ) → ∇(Q′ , θ) mapping m 7→ m′ with m′ (α) = m(α1 ) + m(α2 ) and m′ (β) = m(β) for all β ∈ Q′1 \ {α} = Q1 \ {α1 , α2 } induces a surjection from the monoid S := S(Q, θ) onto the monoid S ′ := S(Q′ , θ ′ ). 22 This extends to a surjection of semigroup algebras π : C[S] → C[S ′ ], which are identified with A(Q, θ) and A(Q′ , θ), respectively. Keep the notation π for the induced C-algebra surjection A(Q, θ) → A(Q′ , θ). We have the commutative diagram of C-algebra surjections F = C[tm | m ∈ ∇(Q, θ) ∩ ZQ1 ] ↓π ′ ϕ −→ A(Q, θ) ↓π ϕ′ F ′ = C[tm′ | m′ ∈ ∇(Q′ , θ) ∩ ZQ1 ] −→ A(Q′ , θ) where the left vertical map (denoted also by π) sends the variable tm to tπ(m) . For any monomial u ∈ F ′ and any s ∈ S with π(xs ) = ϕ′ (u) ∈ S ′ we choose a monomial ψs (u) ∈ F such that π(ψs (u)) = u and ϕ(ψs (u)) = xs . This is clearly possible: let u = tm1 . . . tmr , then we take for ψs (u) an element tn1 . . . tnr where π(nj ) = mj , such that (n1 + · · · + nr )(α1 ) = s(α1 ). Denote by 1 εi ∈ NQ 0 the characteristic function of αi ∈ Q1 (i = 1, 2). ′ Proposition 9.4 Let uλ − vλ (λ S ∈ Λ) be a set of binomial relations generating the ideal ker(ϕ ). Then ker(ϕ) is generated by G1 G2 , where G1 := {ψs (uλ ) − ψs (vλ ) | λ ∈ Λ, π(s) = ϕ′ (uλ )} G2 := {tm tn − tm+ε2 −ε1 tn+ε1 −ε2 | m, n ∈ ∇(Q, θ) ∩ ZQ1 , m(α1 ) > 0, n(α2 ) > 0}. Proof. Clearly G1 and G2 are contained in ker(ϕ). Denote by I the ideal generated by them in F , so I ⊆ ker(ϕ). In order to show the reverse inclusion, take any binomial relation u − v ∈ ker(ϕ), then ϕ(u) = ϕ(v) = xs for some s ∈ S. follows that π(u) − π(v) ∈ ker(ϕ′ ), whence there exist PIt k monomials wi such that π(u)−π(v) = i=1 wi (ui −vi ), where ui −vi ∈ {uλ −vλ , vλ −uλ | λ ∈ Λ}, w1 u1 = π(u), wi vi = wi+1 ui+1 for i = 1, . . . , k − 1 and wk vk = π(v). Moreover, for each i choose a divisor si | s such that π(xsi ) = ϕ′ (ui ) (this is clearly possible). Then I contains the element P k i=1 ψs−si (wi )(ψsi (ui ) − ψsi (vi )), whose ith summand we shall denote by yi − zi for notational simplicity. Then we have that π(y1 ) = π(u), π(zk ) = π(v), π(zi ) = π(yi+1 ) for i = 1, . . . , k − 1, and xs = ϕ(yi ) = ϕ(zi ). It follows by Lemma 9.5 below u − y1 , v − zk , and yi+1 − zi for i = 1, . . . , k − 1 are all contained in the ideal J generated by G2 . Whence u − v is contained in I.  Lemma 9.5 Suppose that for monomials u, v ∈ F we have ϕ(u) = ϕ(v) ∈ A(Q, θ) and π(u) = π(v) ∈ F ′ . Then u − v is contained in the ideal J generated by G2 (with the notation of Proposition 9.4). Proof. If u and v have a common variable t, then u − v = t(u′ − v ′ ), and u′ , v ′ satisfy the conditions of the lemma. By induction on the degree we may assume that u′ − v ′ belongs to the ideal J. Take m1 ∈ ∇(Q, θ) ∩ ZQ1 such that tm1 is a variable occurring in u. There exists an m2 ∈ ∇(Q, θ)∩ ZQ1 such that tm2 occurs in v, and π(m1 ) = π(m2 ). By symmetry we may assume that m1 (α1 ) ≥ m2 (α1 ), and apply induction on the non-negative difference m1 (α1 ) − m2 (α1 ). If m1 (α1 ) − m2 (α1 ) = 0, then m1 = m2 and we are done by the above considerations. Suppose next that m1 (α1 ) − m2 (α1 ) > 0. By π(m1 ) = π(m2 ) we have m2 (α2 ) > 0, and the condition ϕ(u) = ϕ(v) implies that there exists an m3 ∈ ∇(Q, θ) ∩ ZQ1 such that tm2 tm3 divides v, and 1 ′ m3 (α1 ) > 0. Denote by εi ∈ NQ 0 the characteristic function of αi , and set m2 := m2 + ε1 − ε2 , m′3 := m3 − ε1 + ε2 . Clearly m′2 , m′3 ∈ ∇(Q, θ) ∩ ZQ1 and tm2 tm3 − tm′2 tm′3 ∈ J. So modulo J we may replace v by tm′2 tm′3 v ′ where v = tm2 tm3 v ′ . Clearly 0 ≤ m1 (α1 )−m′2 (α1 ) < m1 (α1 )−m2 (α1 ), and by induction we are finished.  23 In the affine case one can also introduce a grading on O(M(Q, 0)) by declaring the elements that correspond to primitve cycles of the quiver to be of degree 1. The ideal of relations can be defined as above, but in this case it is not possible to give a degree bound independently of the dimension. This is illustrated by Example 7.2, providing an instance where a degree d − 1 element is needed to generate the ideal of relations of a d-dimensional affine toric quiver variety. However the following theorem shows that this example is the worst possible from this respect. Theorem 9.6 Let Q be a quiver such that d := dim(M(Q, 0)) > 0. Then the ideal of relations of M(Q, 0) is generated by elements of degree at most d − 1. Proof. Up to dimension 2 the only affine toric quiver varieties are the affine spaces. Suppose from now on that d ≥ 3. Clearly it is sufficient to deal with the case when (Q, 0) is tight and Q is prime. Suppose that a degree k element is needed to generate the ideal of relations of M(Q, 0). In Section 6 of [16] it is shown that this holds if and only if there is a pair of primitive cycles c1 , c2 in Q such that the multiset sum of their arrows can also be obtained as the multiset sum of some other k primitive cycles e1 , . . . , ek . Note that each ei has an arrow contained in c1 but not in c2 , and has an arrow contained in c2 but not in c1 . It follows that length(c1 ) + length(c2 ) ≥ 2k, implying that Q has at least k vertices. By Proposition 7.1 (ii) we conclude that d − 1 = χ(Q) − 1 ≥ |Q0 | ≥ k.  10 The general case in [25] In this section we give a short derivation of the main result of [25] from the special case Proposition 9.1. To reformulate the result in our context consider a bipartite quiver Q with at least as many sinks as sources. By a one-sided matching of Q we mean an arrow set which has exactly one arrow incident to each source, and at most one arrow incident to each sink. By abuse of language the characteristic vector in ZQ1 of a one-sided matching will also be called a one-sided matching. The convex hull of the one-sided matchings in ZQ1 is a lattice polytope in RQ1 which we will denote by OSM (Q). Clearly the lattice points of OSM (Q) are precisely the one-sided matchings. The normality of OSM (Q) is explained in section 4.2 of [25] or it can be directly shown using the König-Hall Theorem for regular graphs and an argument similar to that in the 1 Q1 proof below. Denote by S(OSM (Q)) the submonoid of NQ 0 generated by OSM (Q) ∩ Z . This is graded, the generators have degree 1. Consider the ideal of relations among the generators {xm | m ∈ OSM (Q) ∩ ZQ1 } of the semigroup algebra C[S(OSM (Q))]. Theorem 2.1 from [25] can be stated as follows: Theorem 10.1 The ideal of relations of C[S(OSM (Q))] is generated by binomials of degree at most 3. Proof. Consider a quiver Q′ that we obtain by adding enough new sources to Q so that it has the same number of sources and sinks, and adding an arrow from each new source to every sink. Let θ be the weight of Q′ that is −1 on each source and 1 on each sink. Now the natural projection ′ ′ π : RQ1 → RQ1 induces a surjective map from ∇(Q′ , θ) ∩ ZQ1 onto OSM (Q) ∩ ZQ1 giving us a degree preserving surjection between the corresponding semigroup algebras. By Corollary 8.3 it is sufficient to prove that for any k ≥ 4, any degree k element s ∈ S(OSM (Q)), and any m, n ∈ OSM (Q) ∩ ZQ1 with m, n dividing s we have m ∼s n. In order to show this we shall ′ ′ construct an s′ ∈ ∇(Q′ , kθ) ∩ ZQ1 and m′ , n′ ∈ ∇(Q′ , θ) ∩ ZQ1 such that m′ ≤ s′ , n′ ≤ s′ , π(m′ ) = m, π(n′ ) = n and π(s′ ) = s. By Proposition 9.1 we have m′ ∼s′ n′ , hence the surjection 24 π yields m ∼s n. The desired s′ , m′ , n′ can be obtained as follows: think of s as the multiset of arrows from Q, where the multiplicity of an arrow a is s(a). Pairing off the new sources Q′0 \ Q0 with the sinks in Q not covered by m and adding the corresponding arrows to m we get a perfect matching m′ of Q′ with π(m′ ) = m. Next do the same for n, with the extra condition that if none of n and m covers a sink in Q, then in n′ it is connected with the same new source as in Q′ m′ . Let t ∈ N0 1 be the multiset of arrows obtained from s by adding once each of the arrows P Q′1 \ Q1 occuring in m′ or n′ . For a vertex v ∈ Q′1 set degt (v) := v∈{c− ,c+ } |t(c)|. Observe that s − m and s − n belong to S(OSM (Q))k−1 , hence degs−m (w) ≤ k − 1 and degs−n (w) ≤ k − 1 for any vertex w. So if w is a sink not covered by m or n, then degs (w) agrees with degs−m (w) or degs−n (w), thus degs (w) ≤ k − 1, and hence degt (w) ≤ k. For the remaining sinks we have degt (w) = degs (w) ≤ k as well, moreover, degt (v) = k for the sources v ∈ Q0 \ Q′0 , whereas degt (v) ≤ 2 for the new sources v ∈ Q′0 \ Q0 . Consequently successively adding further new arrows from Q′1 \ Q1 to t we obtain s′ ≥ t with degs′ (v) = k for all v ∈ Q′0 . Moreover, m′ ≤ t ≤ s′ , n′ ≤ t ≤ s′ , and π(s′ ) = s, so we are done.  Acknowledgement We thank Bernd Sturmfels for bringing [25] to our attention. References [1] J. Adriaenssens and L. Le Bruyn, Local quivers and stable representations, Comm. Alg. 31 (2003), 1777-1797. [2] K. Altmann and L. Hille, Strong exceptional sequences provided by quivers, Algebras and Represent. Theory 2 (1) (1999) 1-17. [3] K. Altmann, B. Nill, S. Schwentner, and I. Wiercinska, Flow polytopes and the graph of reflexive polytopes, Discrete Math. 309 (2009), no. 16, 4992-4999. [4] K. Altmann and D. van Straten, Smoothing of quiver varieties, Manuscripta Math. 129 (2009), no. 2, 211-230. [5] K. Bongartz, Some geometric aspects of representation theory, Algebras and Modules I, CMS Conf. Proc. 23 (1998), 1-27, (I. Reiten, S.O. Smalø, Ø. Solberg, editors). [6] W. Bruns and J. Gubeladze, Semigroup algebras and discrete geometry, Séminaires Congrès 6 (2002), 43-127. [7] A.T. Carroll, C. Chindris, Z. Lin, Quiver representations of constant Jordan type and vector bundles, arXiv: 1402.2568 [8] D. Cox, J. Little, and H. Schenck, Toric Varieties, Amer. Math. Soc., 2010. [9] A. Craw and G. G. Smith, Projective toric varieties as fine moduli spaces of quiver representations, Amer. J. Math. 130 (2008), 1509-1534. [10] M. Domokos, On singularities of quiver moduli, Glasgow Math. J. 53 (2011), 131-139. [11] Jiarui Fei, Moduli of representations I. Projections from quivers, arXiv:1011.6106v3. 25 [12] M. Hatanaka: 1304.0891 Uniqueness of the direct decomposition of toric manifolds, arXiv: [13] L. Hille, Moduli spaces of thin sincere representations of quivers, preprint, Chemnitz, 1995. [14] L. Hille, Toric quiver varieties, pp. 311-325, Canad. Math. Soc. Conf. Proc. 24, Amer. Math. Soc., Providence, RI, 1998. [15] L. Hille, Quivers, cones and polytopes, Linear Alg. Appl. 365 (2003), 215-237. [16] D. Joó, Complete intersection quiver settings with one dimensional vertices, Algebr. Represent. Theory 16 (2013), 1109-1133. [17] V. G. Kac, Infinite root systems, representations of graphs and invariant theory, Invent. Math. 56 (1980), 57-92. [18] A. D. King, Moduli of representations of finite dimensional algebras, Quart. J. Math. Oxford (2), 45 (1994), 515-530. [19] L. Le Bruyn and C. Procesi, Semisimple representations of quivers, Trans. Amer. Math. Soc. 317 (1990), 585-598. [20] M. Lenz, Toric ideals of flow polytopes, 22nd International Conference on Formal Power Series and Algebraic Combinatorics (FPSAC 2010), 889896, Discrete Math. Theor. Comput. Sci. Proc., AN, Assoc. Discrete Math. Theor. Comput. Sci., Nancy, 2010. [21] M. Lenz, Toric ideals of flow polytopes arXiv:0801.0495 Version 3. [22] P. E. Newstead, Introduction to Moduli Problems and Orbit Spaces, Tata Institute Lecture Notes, Springer-Verlag, 1978. [23] A. Schrijver, Combinatorial Optimization – Polyhedra and Efficiency. Number 24A in Algorithms and Combinatorics, Springer, Berlin, 2003. [24] A. Skowroński and J. Weyman, The algebras of semi-invariants of quivers, Transformation Groups, 5 (2000), No. 4., 361-402. [25] Takashi Yamaguchi, Mitsunori Ogawa and Akimichi Takemura, Markov degree of the Birkhoff model, arXiv:1304.1237. 26
0math.AC
arXiv:1608.05994v1 [math.ST] 21 Aug 2016 Inefficient Best Invariant Tests Richard A. Lockhart∗ Department of Mathematics and Statistics Simon Fraser University Burnaby, BC Canada V5A 1S6 November 10, 2017 Abstract Test statistics which are invariant under various subgroups of the orthogonal group are shown to provide tests whose powers are asymptotically equal to their level against the usual type of contiguous alternative in models where the number of parameters is allowed to grow as the sample size increases. The result is applied to the usual analysis of variance test in the Neyman-Scott many means problem and to an analogous problem in exponential families. Proofs are based on a method used by Čibisov(1961) to study spacings statistics in a goodness-of-fit problem. We review the scope of the technique in this context. Keywords. Asymptotic relative efficiency, Neyman-Scott many means problem, goodness-of-fit, spacings statistics, many parameter problems, permutation central limit theorem, bootstrap. AMS 1980 Classification. Primary 62G20, Secondary 62G30. Running title: Invariant tests ∗ This manuscript was written in 1992 but the reviewers were so caustic I never tried again to publish it. It seems relevant today. Supported by the Natural Sciences and Engineering Research Council of Canada. 1 1 Introduction Consider the problem of data X coming from a model indexed by a parameter space M. Suppose there is a group G which acts both on the data and on the parameter space so that gX has the same distribution under m ∈ M as X has under g −1 m. The problem of testing Ho : m ∈ M0 ⊂ M is invariant under G if m ∈ M0 iff gm ∈ M0 for all g ∈ G. In what follows we shall impose the stronger condition that gm = m for all m ∈ M0 and all g ∈ G. In this note we use the observation that for an invariant test the power at alternative m minus the level of the test is the covariance between the test function and the likelihood ratio averaged over the orbit of m under G to study the power of invariant tests under contiguous alternatives. The technique was used in Čibisov(1961) to study the asymptotic behaviour of tests of uniformity based on sample spacings. Our results may be summarized as follows. When for a given point m in the null hypothesis, the number of possible directions of departure from m into the alternative hypothesis grows with the sample size the power of invariant tests may be expected to be low. We will exhibit a variety of examples in which the power minus the level of invariant tests converges to 0 uniformly in the class of invariant tests. We begin in section 2 with a simple normal example to illustrate the technique and set down the basic identities and inequalities. In section 3 we extend the normal example to general exponential families using a version of the permutation central limit theorem. In section 4 we examine the Neyman Scott many means problem and extend our results to more general models. In section 5 we revisit Čibisov’s example to show that a variety of goodnessof-fit tests have ARE 0 over a large class of alternatives. The results of the first 5 sections suggest that either invariance is not always desirable or that contiguity calculations are not always the right way to compare powers of tests in such models. Section 6 is a discussion of the relevance of contiguity calculations in this context, together with some open problems and suggestions for further work. An appendix contains some technical steps in the proofs. 2 2 Basic Results: A Normal Example Suppose X ∈ Rn has a multivariate normal distribution with mean vector m ∈ Rn and identity covariance matrix. The problem of testing the null hypothesis Ho : m = 0 is invariant under the group of orthogonal transformations. Under Ho , X and PX have the same distribution for any orthogonal matrix P. Consider a simple alternative m 6= 0. The likelihood ratio of m to 0 is L(X) = exp{mT X − kmk2 /2}. Thus the Neyman Pearson test rejects when mT X/kmk is too large. Under Ho this statistic has a standard normal distribution while under the alternative m the mean is shifted to kmk. Thus as n → ∞ non-trivial limiting power (i.e. a limiting power larger than the level and less than 1) results when kmk → δ 6= 0. (Throughout this paper objects named by Roman letters depend on n; wherever possible the dependence is suppressed in the notation. Objects named by Greek letters do not depend on n.) We may analyse the efficiency of an invariant test relative to the Neyman Pearson test for a given sequence of alternatives as follows. Let T be the class of all test functions T (X) for testing Ho which are invariant under the group of orthogonal transformations, that is, for which T (PX) = T (X) for each orthogonal transformation P. We have the following theorem. Theorem 1 As n → ∞, sup{|Em (T ) − E0 (T )| : T ∈ T , kmk ≤ δ} → 0. Since the parameter space depends on the sample size the usual definition of relative efficiency does not make sense. Instead, given an alternative m we will define the efficiency of a (level α where α is fixed) test relative to the Neyman Pearson test to be 1/c2 where c is chosen so that the test under consideration has power against cm equal to the Neyman Pearson power against the alternative m. In traditional finite dimensional parametric models this notion agrees with the usual notion of Pitman relative efficiency (asymptotically). Thus ARE will be the limit of 1/c2 ; the alternative sequence m must be contiguous so that the asymptotic power of the Neyman Pearson test is not 1. For a discussion of the relevance of the Neyman-Pearson test as a standard for the relative efficiency see section 6. 3 Corollary 1 The best invariant test of Ho has ARE 0. Proof of Theorem 1 Let L(X) be the likelihood ratio for m to 0. Then Em (T (X)) = E0 (T (X)L(X)) . Since PX and X have the same distribution under Ho we have Em (T (X)) = E0 (T (PX)L(PX)) = E0 (T (X)L(PX)) (1) for all orthogonal P. Since P appears only on the right hand side of (1) we may average over orthogonal P to obtain Em (T (X)) = Z E0 (T (X)L(PX)) F (dP)  = E0 T (X) Z L(PX)F (dP)  (2) where F is any probability measure on the compact group of orthogonal matrices. Let Z L(X) = L(PX)F (dP). Then |Em (T ) − E0 (T )| = |E0 (T (L − 1))| ≤ E0 (|L − 1|). (3) Since the last quantity is free of T we need only show that sup{E0 (|L − 1|) : kmk ≤ δ} → 0. Since E(L) = 1 the dominated convergence theorem shows that it suffices to prove for an arbitrary sequence of alternatives m with kmk ≤ δ and for a suitably chosen sequence of measures F that L → 1 in probability. We take F to be Haar measure on the compact group of orthogonal transformations; that is, we give P a uniform distribution. 4 For each fixed X, when P has the distribution for which F is Haar measure on the orthogonal group, the vector PX has the uniform distribution on the sphere of radius kXk. Using the fact that a standard multivariate normal vector divided by its length is also uniform on a sphere we find that L = H(kmk · kXk)/H(0) where H(t) = Z π 0 exp(t cos θ) sinn−2 θ dθ. Standard asymptotic expansions of Bessel functions (see, e.g. Abramowitz and Stegun, 1965, p 376ff) then make it easy to show that L → 1 in probability, finishing the proof.• A test invariant under the group of orthogonal transformations is a function of kXk2 and the analysis above can be made directly and easily using the fact that this statistic has a chi-squared distribution with non-centrality parameter kmk2 . Our interest centres on the technique of proof. Equations (1-3) and the argument following (3) use only the group structure of the problem and the absolute continuity of the alternative with respect the null. The remainder of the argument depends on an asymptotic approximation to the likelihood ratio averaged over alternatives. Whenever such an approximation is available we can expect to obtain efficiency results for the family of invariant tests. In the next section we apply the technique to a more general model by replacing the explicit Bessel function calculation with a version of the permutation central limit theorem. 3 Exponential Families Suppose now that X = (X1 , . . . , Xn )T with the Xi independent and Xi having the exponential family density exp(mi xi − β(mi )) relative to some fixed measure. We assume the mi ’s take values in Θ an open subset of R. The parameter space is then M = Θn . Let Θ0 be a fixed compact subset of Θ. Consider the null hypothesis Ho : m1 = · · · = mn . This problem is invariant under the subgroup of the orthogonal group consisting of all permutation 5 matrices P. Let m = mi /n; we also use m to denote the vector of length n all of whose entries are m. The calculations leading to (1-3) establish that for any test T in T , the family of all tests invariant under permutations of the entries of X, we have P |Em (T ) − Em (T )| ≤ Em (|L − 1|). where now n L = exp − X (β(mi ) − β(m)) oX   exp (m − m)T PX /n! P is the likelihood ratio averaged over all permutations of the alternative vector m. 3.1 Heuristic Computations Think now of X as fixed and P as a randomly chosen permutation matrix. Then (m − m)T PX = (m − m)T P(X − X) has moment generating function g(s) = X exp{s(m − m)T P(X − X)}/n!. P If max{|mi − m| : 1 ≤ i ≤ n} → 0 the permutation central limit theorem suggests that (m − m)T PX has approximately a normal distribution with P P mean 0 and variance (mi − m)2 (Xi − X)2 /n. Thus heuristically g(s) ≈ exp{s2 X (mi − m)2 X (Xi − X)2 /(2n)}. Under the same condition, max{|mi − m| : 1 ≤ i ≤ n} → 0, we may expand X (β(mi ) − β(m)) ≈ X (mi − m)2 β ′′ (m)/2. We are led to the heuristic calculation L(X) ≈ exp{ X (mi − m)2 (S 2 − β ′′ (m))/2} where S 2 = (Xi − X)2 /n is the sample variance. Since Varm (X) = β ′′ (m) P we see that L should converge to 1 provided (mi − m)2 = o(n1/2 ) or P 6 km − mk = o(n1/4 ). In the simple normal example of the previous section we are actually able to prove (again using asymptotic expansions of Bessel functions) this strengthened version of Theorem 1, namely, if a = o(n1/4 ) then sup{|Em (T ) − E0 (T )| : T ∈ T , kmk ≤ a} → 0. In the more general exponential family problem we do not know a permutation central limit theorem which extends in a useful way to give convergence of moment generating functions. For contiguous alternative sequences we are able to replace the moment generating function by a characteristic function calculation. We can then prove that invariant tests have power converging to their level uniformly on compact subsets of Θ. Theorem 2 As n → ∞, sup{|Em (T ) − Em (T )| : T ∈ T , km − mk ≤ δ, mi ∈ Θ0 } → 0. 3.2 Proof of Theorem 2 Our proof uses contiguity techniques to replace the moment generating function used in the heuristics above by a corresponding characteristic function calculation. A standard compactness argument reduces the problem to showing that Em (T ) − Em (T ) → 0 for an arbitrary sequence of alternatives m satisfying (mi − m)2 ≤ δ 2 , mi ∈ Θ0 , and an arbitrary sequence T ∈ T . Our proof is now in three stages. First we prove that any such sequence is contiguous to the null sequence indexed by m. The second step is to eliminate the particular statistics, T , as at (3), reducing the problem to showing that the permutation characteristic function of the log-likelihood ratio is nearly non-random. The final step is to establish the latter fact appealing to Theorem 3. P Step 1: Contiguity of m to m. The log-likelihood ratio of m to m is ℓ(X) = X (mi − m)(Xi − β(m)) − 7 X (β(mi ) − β(m)). Under m the mean of ℓ(X) is − X (β(mi ) − β(m)) = − X (mi − m)2 β ′′ (ti ) for some ti between mi and m. In view of the conditions on m and the compactness of Θ0 this sequence of means is bounded. Also under m the variance of ℓ(x) is X (mi − m)2 β ′′ (m). Again this is bounded. Thus the sequence of log-likelihood ratios is tight under the null sequence m and so the sequence of alternatives, m, is contiguous to the null sequence m. Lemma 1 Suppose Q is a sequence of measures contiguous to a sequence of measures P . If T is a bounded sequence of statistics such that EP (T exp(iτ log dQ/dP )) − EP (T )EP (exp(iτ log dQ/dP )) → 0 for each real τ then EQ (T ) − EP (T ) → 0. Remark: In the Lemma the random variable log dQ/dP can be replaced by any random variable S such that log dQ/dP −S tends to 0 in probability under P . Remark: The Lemma is very closely connected with LeCam’s third lemma (see Hájek and Šidák, 1967, page 209, their formula 4) which could also be applied here to the Q characteristic function of T . Before proving the lemma we finish the theorem. Step 2: Elimination of the sequence T . Let H(t, X) = exp(itℓ(X)). According to the lemma we must show Em (T (X)H(τ, X)) − Em (T )Em (H(τ, X)) → 0 . Arguing as in (1-3) the quantity in (4) may be seen to be Em (T (X)H(τ, X)) − Em (T (X))Em (H(τ, X)) 8 (4) where H(τ, X) = P H(τ, PX)/n! = E(H(τ, PX)|X). Since both T and H(τ, X) are bounded it suffices to prove that P H(τ, X) − Em (H(τ, X)) → 0 (5) in probability. Remark: If ℓ(X) = S(X)+oP (1) under m then in view of the remark following the lemma the random variable ℓ(X) can be replaced in the definition of H by the random variable S(X). Moreover, if S ∗ (X) = S(X) + a then (5) will hold for S ∗ replacing ℓ if and only if it holds for S replacing ℓ because the sequence exp(iτ a) is bounded in modulus. Step 3: Application of the Permutation Central Limit Theorem Using the last remark take S ∗ (X) = (m − m)T Px. The variable H P then becomes P exp(iτ (m − m)T Px)/n! whereas Em (H(τ, X)) becomes Em (exp(iτ (m − m)T X)). Now let F̂ be the empirical distribution of the X1 , . . . , Xn . Let X1∗ , . . . , Xn∗ be independent and identically distributed according to F̂ . We will show in the next section that X  exp(iτ mT Px)/n! − EF̂ exp(iτ P and  EF̂ exp(iτ X   X mj Xj∗ ) − Em exp(iτ  mj Xj∗ ) → 0 X  mj Xj ) → 0 (6) (7) in probability for each fixed τ . This will finish the proof of Theorem 2 except for establishing the lemma. To prove the (undoubtedly well-known) lemma argue as follows. Letting ℓ = log dQ/dP , the condition shows that EP (T φ(ℓ)) − EP (T )EP (φ(ℓ)) → 0 for each bounded continuous function φ. There is then a sequence a tending to infinity so slowly that EP (T f (ℓ)) − EP (T )EP (f (ℓ)) → 0 where f (x) = min(ex , a). In view of contiguity EQ (T ) − EP (T eℓ ) → 0 and for any sequence a tending to infinity |EP (T (eℓ − f (ℓ)))| ≤ EP (|eℓ − f (ℓ)|) → 0. The lemma follows.• 9 3.3 The Permutation Limit Theorem Suppose m ∈ Rn and x ∈ Rn are two (non-random) vectors with m = 0 for convenience. Suppose P is a random n × n permutation matrix. The random P P variable mT Px has mean nm x and variance s2 = (mi −m)2 (xi −x)2 /(n− 1). An alternative description of the random variable mT Px is as follows. Let J1 , . . . , Jn be a simple random sample drawn without replacement from the set {1, . . . , n}. Then J1 , . . . , Jn is a random permutation of {1, . . . , n} P and mT Px has the same distribution as mi x(Ji ); we now use functional rather than subscript notation for legibility. Hájek(1961, see his formula 3.11) shows that it is possible to construct, on a single probability space, J1 , . . . , Jn together with J1∗ , . . . , Jn∗ , a random sample drawn with replacement from {1, . . . , n} in such a way that E[( X mi x(Ji ) − X mi x(Ji∗ ))2 ] ≤ 3s max |xi − x|/(n − 1)1/2 . (8) Since the Xi have an exponential family distribution and Θ is compact it is straightforward to check that S max |Xi − X|/(n − 1)1/2 = OP (log n/n1/2 ) = oP (1) under m where S denotes the sample standard deviation. In view of the elementary inequality |E(exp(itW )) − E(exp(itW ′ ))| ≤ t2 E((W − W ′ )2 ) + |t|E1/2 ((W − W ′ )2 ) (9) this establishes (6). It seems easiest to deal with (7) after recalling some facts about weak convergence in the presence of moment conditions. Consider the set, ∆, of distribution functions F on Rπ which have finite variance. Throughout 2 this paper we write F ⇒Φ if EF (γ(X)) → EΦ (γ(X)) for each fixed continuous function γ such that γ(x)/(1 + kxk2 ) is bounded. (The notation is R EF (γ(X)) = γ(x)F (dx).) This notion of convergence defines a topology on ∆ which can be metrized by a metric ρ2 in such a way that ∆ becomes a complete separable metric space. In fact the metric ρ2 may be taken to be the Wasserstein metric; see Shorack and Wellner (1986, pp 62-65). Suppose that ∆0 is a subset of ∆. The following are equivalent: 10 i. ∆0 has compact closure. ii. for each ǫ > 0 there is a fixed compact subset Ψ of Rπ such that EF (kXk2 1(X 6∈ Ψ)) ≤ ǫ for all F ∈ ∆0 .   iii. there is a fixed function Ψ such that EF kXk2 1(kXk ≥ t) ≤ Ψ(t) for all F ∈ ∆0 and all t where Ψ has the property that limt→∞ Ψ(t) = 0. iv. the family ∆0 makes kXk2 uniformly integrable. Notice that for each limt→∞ Ψ(t) = 0 the family of distribu fixed Ψ such that  2 tions F with EF kXk 1(|X| ≥ t) ≤ Ψ(t) for all t is a compact metric space. 2 Finally note that F ⇒Φ if and only if F converges in distribution to Φ and EF (kXk2 ) → EΦ (kXk2 ). All the foregoing results are trivial modifications of the usual results for convergence in distribution; see Billingsley (1968) pp 31-41. It will be useful to let ρ0 denote a metric analogous to ρ2 for which the space of all distributions on Rπ becomes a complete separable metric space with the topology of convergence in distribution. If ∆0 is a compact subset of ∆ for the metric ρ2 then it is a compact subset of the space of all distributions for the metric ρ0 . To state the result let F̂ be the empirical distribution of the numbers X1 , . . . , Xn . Let X1∗ , . . . , Xn∗ be independent and identically distributed acP cording to F̂ . Let LF̂ be the (conditional given X1 , . . . , Xn ) law of mi Xi∗ P and LF be the law of mi Xi . Theorem 3 Let ∆0 be a fixed compact subset of ∆. Suppose F is any sequence in ∆0 and that for each n the vector X = (X1 , . . . , Xn )T has independent entries distributed according to F . Assume m is an arbitrary sequence P satisfying m = 0 and m2i ≤ δ 2 . If F̂ is the empirical distribution function of X1 , . . . , Xn then ρ2 (LF , LF̂ ) → 0 in probability. Corollary 2 Under the conditions of Theorem 3  EF̂ exp(iτ X   mj Xj ) − EF exp(iτ in probability for each fixed τ . 11 X  mj Xj ) → 0 It is straightforward to rephrase a (weakened) version of Hájek’s permutation central limit theorem in the notation of Theorem 3. Let LP be the law of mT Px. Theorem 4 Suppose that m ∈ Rn and x ∈ Rn are two sequences of vectors such that nm x → 0, (10) X (mi − m)2 ≤ δ 2 (11) for a fixed δ and such that x satisfies X (xi − x)2 1(|xi − x| ≥ t)/n ≤ Ψ(t) (12) where Ψ is a fixed function such that limt→∞ Ψ(t) = 0. If F̂ is the empirical distribution of the numbers {1, . . . , xn } then ρ2 (LP , LF̂ ) → 0. The proof of Theorem 3 is in the Appendix. Remark: Theorem 3 asserts the validity of the bootstrap approximation to LF . Theorem 4 says that the bootstrapping carried out in Theorem 3 by sampling from the list X1 , . . . , Xn with replacement can also be carried out without replacement. Notice that the result applies only to contrasts in the Xi ; the condition m = 0 is crucial to this bootstrap interpretation of Theorem 4. 4 4.1 Extensions Non-exponential families The exponential family model gives the log-likelihood ratio a rather special form. For general models, however, a Taylor expansion can be used to show that the log-likelihood ratio has almost that form. Rather than try to discover the weakest possible conditions on a general model permitting the conclusion we try to illustrate the idea with assumptions which are far from best possible. 12 Suppose X = (X1 , . . . , Xn )T with the individual Xi independent and Xi having density exp(φ(·; mi )) where mi ∈ Θ an open subset of R. Again consider the null hypothesis Ho : m1 = · · · = mm . Let Θ0 denote some fixed compact subset of Θ. The log-likelihood ratio for m to m is ℓ(X) = P {φ(Xi ; mi ) − φ(Xi ; m)}. Assume that φ is twice differentiable with respect to the parameter. Let φi denote the i-th derivative of φ with respect to the parameter. Assume that the usual identities of large sample theory of likelihood hold, namely, that φ1 (X, m) has mean 0 and finite variance ι(m) under m and that φ2 (X, m) has mean −ι(m). Then we may write ℓ(X) = (mi − m)φ1 (Xi , m) − (mi − m)2 ι(m)/2 X + (mi − m)2 {φ2 (Xi , m) + ι(m)}/2 X + (mi − m)2 {φ2 (Xi , ti ) − φ2 (Xi , m)} X X (13) where ti is between mi and m. We see that, under the usual sort of regularity conditions, there will exist a constant α such that |Em (φ(Xi ; m∗ ) − φ(Xi ; m))| ≤ α(m∗ − m)2 (14) Varm (φ(Xi ; m∗ ) − φ(Xi ; m)) ≤ α(m∗ − m)2 (15) and such that for all m and m∗ in Θ0 . Under these two conditions we see that |E(ℓ(X))| ≤ P P α (mi − m)2 and Varm (ℓ(X)) ≤ α (mi − m)2 . Thus any sequence m with P (mi − m)2 ≤ δ 2 and all mi ∈ Θ0 is contiguous to the null sequence m. The first two steps in the proof of Theorem 3 may therefore be seen to apply to general one-parameter models under regularity conditions, specifically whenever (14) and (15) hold. Further regularity assumptions are necessary in order for Step 3 of Theorem 2 to go through in the present context. To get some insight consider the situation where max{|mi − m|; 1 ≤ i ≤ n} → 0. Under further regularity conditions we will have X (mi − m)2 {φ2 (Xi ; ti ) − φ2 (Xi ; m)} → 0 13 (16) and X (mi − m)2 {φ2 (Xi ; m) + ι(m)} → 0 (17) in probability. Assuming that (16) and (17) hold we see ℓ(X) = X (mi − m)φ1 (Xi ; m) − X (mi − m)2 ι(m)/2 + oP (1). (18) Define S ∗ (X) = (mi − m)φ1 (Xi ; m). Step 3 of the proof of Theorem 2 may now be carried through with Xi replaced by Ui = φ1 (Xi ; m) provided that the map from Θ0 to ∆ which associates m with the m distribution of φ1 (Xi ; m) is continuous. P The assumption that max{|mi − m|; 1 ≤ i ≤ n} → 0 can be avoided; we now make this assertion precise. We will need three more assumptions: sup{Em (|φ2 (X, m) + ι(m)|1(|φ2 (X, m) + ι(m)| ≥ t)); m ∈ Θ0 } → 0 (19) as t → ∞. Define W (X, ǫ, m) = sup{|φ2 (X, m′ ) − φ2 (X, m)|; |m′ − m| ≤ ǫ, m′ ∈ Θ0 }. The second assumption will then be lim sup{Em (W (X, ǫ, m)); m ∈ Θ0 } = 0. ǫ→0 (20) Finally we will assume that the map (m, m) 7→  L((φ(X, m) − φ(X, m))/(m − m)|m) m 6= m L(φ1 (X, m)) m=m (21) is continuous from Θ0 × Θ0 to ∆ where L(X|m) denotes the law of X when m is true. Theorem 5 Assume conditions (14, 15, 19, 20, 21). Then as n → ∞, sup{|Em (T ) − Em (T )| : T ∈ T , km − mk ≤ δ, mi ∈ Θ0 } → 0. Proof Assume, without loss of generality that the entries in m have been sorted so that |m1 − m| ≥ · · · ≥ |mn − m|. Let k = k(n) be any sequence tending to 14 infinity. Then (mi − m)2 ≤ δ 2 implies that max{|mi − m|; k ≤ i ≤ n} → 0. The assumptions now imply that P ℓ(X) = X {φ(Xi , mi ) − φ(Xi , m)} + (mi − m)φ1 (Xi , mi ) i>k i≤k − X X (mi − m)2 ι(m)/2 + oP (1). i>k Define S ∗ (X) = X {φ(Xi , mi ) − φ(Xi , m) − Em (φ(Xi , mi ) − φ(Xi , m))} i≤k + X (mi − m)φ1 (Xi , mi ). i>k Let H(τ, X) = P P exp(iτ S ∗ (PX))/n!. As before it suffices to prove that H(τ, X) − Em (H(τ, X)) → 0 (22) in probability. The proof may be found in the Appendix; its length is due to our failure to impose the condition that max{|mi − m|; k ≤ i ≤ n} → 0 . 4.2 The Neyman-Scott Problem Consider now the Neyman-Scott many means problem in the following form. Let {Xij ; 1 ≤ j ≤ ν, 1 ≤ i ≤ n} be independent normals with mean mi and standard deviation σ. The usual Analysis of Variance F -test of the hypothesis that m1 = · · · = mn is invariant under permutations of the indices i. Any level α test of this null hypothesis for this model with σ unknown is a level α test in any submodel with a known value of σ. When σ is known the argument of section 3 can be applied to the vector X = (X 1· , . . . , X n· ) of cell means to conclude that the ARE of ANOVA is 0 along any contiguous sequence of alternatives. This Analysis of Variance problem may be extended to the following multiparameter exponential family setting. Suppose that for i = 1, . . . , n the Rπ -valued random variable Xi has density exp{mT i xi − β(mi )} relative to some fixed measure on Rπ . The natural parameter space for a single 15 observation Xi is some Θ ⊂ Rπ . Let a(m) be some parameter of interest and consider the problem of testing Ho : a(m1 ) = · · · = a(mn ). The problem is again permutation invariant. Let M be the n × π matrix with ith row mi and M be the n × π matrix with ith row m. Let X be the n × π matrix with ith row XiT . The log likelihood ratio of M to M is ℓ(X) = tr((M − M )T X) − X (β(mi ) − β(m)) Denote kMk2 = tr(M T M). Let Θ0 be some fixed compact subset of Θ. Let T be the family of all permutation invariant test functions, T (X). Theorem 6 As n → ∞, sup{|EM (T ) − EM (T )| : T ∈ T , kM − M k ≤ δ, mi ∈ Θ0 } → 0. The proof of this theorem is entirely analogous to that of Theorem 2 needing only a multivariate extension of Theorems 3 and 4. Suppose M and x are sequences of n × π matrices. Let M1 , . . . , Mπ and x1 , . . . , xπ be the columns of M and x respectively. Let P be a random n × n permutation matrix and let F̂ be the empirical distribution (measure on Rπ ) of the n rows of x. Let X be an n × π matrix whose rows are iid according to F̂ . Let LP denote the joint law of (M1T Px1 , . . . , MπT Pxπ ). Let LF̂ denote the law of MiT Xi where Xi is the ith column of X. Theorem 7 Suppose that each Mi satisfies (11) and has Mi = 0. Suppose that each xi satisfies (12). Then ρ2 (LP , LF̂ ) → 0. The obvious analogue of Theorem 3 also holds. Theorem 8 Let ∆0 be a fixed compact subset of ∆. Suppose F is any sequence in ∆0 and that for each n the n × π matrix X has independent rows distributed according to F . Assume M is an arbitrary sequence of n × π matrices whose columns Mi each satisfy (11) and have Mi = 0. If F̂ is the empirical distribution function of the rows of X then ρ2 (LF , LF̂ ) → 0 in probability. 16 It should be noted that the actual null hypothesis plays no role in these theorems. If the theorems are to be used to deduce that any particular sequence of permutation invariant tests has poor power properties it is necessary that m1 = . . . = mn imply the assertion that the null hypothesis is true and that there be some alternative sequence satisfying the conditions of the preceding theorems. 5 Spacings Statistics Suppose U1 ≤ · · · ≤ Un are the order statistics for a sample of size n from a distribution on the unit interval. To test the null hypothesis that this distribution is uniform many authors have suggested tests based on the sample spacings Di = Ui − Ui−1 where we take U0 = 0 and Un+1 = 1. Examples P of statistics include Moran’s statistic log(Di ) and Greenwood’s statistic P 2 Di . See Guttorp and Lockhart (1989) and the references therein for a detailed discussion. Notice that these statistics are invariant under permutations of the Di . Also note that the joint distribution of the Di is permutation invariant. Consider a sequence of alternative densities 1 + h(x)/n1/2 . Čibisov(1961) showed (though his proof seems to rely on convergence of the permutation moment generating function which does not seem to me to follow from the form of the permutation central limit theorem which he cites) under differentiability conditions on h that the power of any spacings statistic invariant under permutations of the Di is asymptotically equal to its level using essentially the method of proof used above. We can relax the conditions on h somewhat to achieve the following. Theorem 9 Let ∆0 be a compact subset of L2 , the Hilbert space of square integrable functions on the unit interval. Let T be the family of permutation invariant test functions T (D). As n → ∞, sup{|Eh (T ) − E0 (T )| : T ∈ T , h ∈ ∆0 } → 0 . 17 In Guttorp and Lockhart(1988) it is established that, under the condiP tions of the theorem, ℓ(D), the log-likelihood ratio, is equal to hi (Di − R 1/(n + 1)) − h2 (x) dx/2 + OP (1) for any sequence of alternatives h converging in L2 where the hi are suitable constants derived from h. Using the remark following Lemma 1, the fact that the joint distribution of the Di is permutation invariant under the null hypothesis, and the characterization of the spacings as n + 1 independent exponentials divided by their total, the theorem may be proved by following the argument leading to Theorem 2. 6 6.1 Discussion Relevance of Contiguity All the theorems establish that permutation invariant tests are much less powerful than the Neyman-Pearson likelihood ratio test for alternatives which are sufficiently different from the null that the Neyman-Pearson test has nontrivial power. Thus if, in practice, it is suspected which parameters mi are the ones most likely to be different from all the others there will be scope for much more sensitive tests than the invariant tests. On the other hand, some readers will argue that the analysis of variance is often used in situations where no such prior information is available. Such readers, I suspect, will be inclined to argue that this sort of contiguity calculation is irrelevant to practical people. Some readers may feel that a user would need unreasonable amounts of prior knowledge to derive a better test than the F -test. Consider the situation of the normal example in the first section. Suppose that the mi can be sorted so that adjacent entries are rather similar. Define h(s) = m[ns] . If the sequence of functions are reasonably close to some square integrable limit η then, without knowing η, we can construct a test whose power stays larger than its level if the Neyman-Pearson test has the same property. Specifically consider the exponential family example. Let γi ; i = 1, 2, . . . be an orthogonal basis of L2 [0, 1] with each γi continuous and let λi be any sequence of summable positive constants. Define a test statistic P P P of the form T (X) = i λi ( γi (j/n)Xj )/( j γi2 (j/n))1/2 . If the sequence h 18 converges to some η 6= 0 in L2 [0, 1] then the asymptotic power of T will be larger than its level. The test is the analogue of the usual sort of quadratic goodness-of-fit test of the Cramer-von Mises type. It is worth noting that the calculations compute the power function by averaging over alternative vectors which are a permutation of a basic vector m. Another approach to problems with large numbers of different populations (labelled here by the index i) is to model the mi themselves as an iid sequence chosen from some measure G. In this case the null hypothesis is that G is point mass at some unknown value m. I note that alternative measures G which make the resulting model contiguous to the null make VarG (mi ) = O(n−1/2 ) which means that a typical mi deviates from m by the n−1/4 discrepancy which arises in our first example and in analysis of spacings tests. In other words when any ordering of the mi is equally likely vectors m differing from m by the amount we have used here are indistinguishable from the null hypothesis according to this empirical Bayes model. It is important to note, however, that for this empirical Bayes model the hypothesis of permutation invariance of the statistic T is unimportant: if VarG (mi ) = o(n−1/2 ) then every test statistic, permutation invariant or not, has power approaching its level. The proofs hinge rather critically on the exact invariance properties of the statistics considered. In the Neyman-Scott problem for instance if a single sample size were to differ from all the others the whole argument would come apart. As long as the sample sizes are bounded the ARE of ANOVA is 0 nevertheless, as may be seen by direct calculation with the alternative non-central F -distribution. In the spacings problem of section 5 the sample 2-spacings defined by Di = Ui+2 −Ui still provide tests with non-trivial power only at alternatives at the n−1/4 distance; the joint distribution of these 2spacings is not permutation invariant and our ideas do not help. Our ideas do apply, however, to the non-overlapping statistics of Del Pino(1971). The definition of ARE offered here may well be challenged since the comparison is relative to the Neyman-Pearson test which would not be used for a composite null versus composite alternative situation. Nevertheless there seems to us to be a sharp distinction between procedures for which our definition yields an ARE of 0 and the quadratic tests mentioned above whose 19 ARE is then positive. 6.2 Open Problems and Conjectures The results presented here lead to some open problems and obvious areas for further work. Hájek’s proof of the permutation central limit theorem guarantees convergence of the characteristic function and moments up to order 2 of the variables mT Px. Our heuristic calculations suggest that a good deal more information could be extracted if the characteristic function could be replaced by the moment generating function and if convergence of the moment generating function could be established not only for fixed arguments but for arguments growing at rates slower than n1/2 . Such an extension would eliminate, as in the normal example, the need for considering only contiguous alternatives. Large sample theory for spacings statistics suggests that the results presented here hold out to alternatives at such distances. If, in addition, approximations were available to the moment generating function for arguments actually growing at the rate n1/2 the technique might extend to providing power calculations for alternatives so distant that permutation invariant tests have non-trivial limiting power. Another possible extension would use Edgeworth type expansions in the permutation central limit theorem to get approximations for the difference between the power and the level in the situation, covered by our theorems, where this difference tends to 0. Consider the exponential family model of section 3 for the special case of the normal distribution. The problem of testing m1 = · · · = mn is invariant under the permutation group and under the sub-group of the orthogonal group composed of all orthogonal transformations fixing the vector 1 all of whose entries are 1. It is instructive to compare our results for the two different groups. The example illustrates the trade-off. For statistics invariant under larger groups it may be easier to prove the required convergence of the average likelihood ratio; the easier proof is balanced against applying the conclusion to a smaller family of statistics. For statistics invariant under the larger group of orthogonal transformations fixing 1 we can modify the argument of section 2 and extend the conclusion described in the heuristic problem of section three to relatively 20 large values for km − mk. Rather than describe the details we follow a suggestion made to us by Peter Hooper. Suppose Y = Xb + se where e has a multivariate normal distribution with mean vector m and variance covariance matrix the identity and where s is an unknown constant, X is an n×p matrix of regression covariate values of rank p and b is an unknown p dimensional vector. Let H = X(X T X)−1 X T be the hat matrix. Suppose we wish to test the hypothesis (I − H)m = 0. (If X = 1 this is equivalent to the problem mentioned above of testing m1 = · · · = mn . The problem is identifiable only if Hm = 0 or equivalently if X T m = 0.) The problem is invariant under the group OX of orthogonal matrices P for which PX = X. Suppose T (Y ) is a family of statistics such that T (PY ) = T (Y ) for any P in OX . Consider the likelihood ratio of m to Hm (the latter is a point in the null). Following equations (1-3) we are lead to study L(Y ) = Z L(PY )F (dP). where now F is Haar measure on OX and L(Y ) = exp(mT (I − H)(Y − Xb) − k(I − H)mk2 /2). Since PX = x we see that L(PY ) = exp(mT (I − H)P(Y − Xb) − k(I − H)mk2 /2). If P is distributed according to F and Z is standard multivariate normal then PT (I − H)m/k(I − H)mk and (I − H)Z/k(I − H)Zk have the same distribution. This fact and expansions of Bessel functions show that L → 1 in probability provided k(I − H)mk = o((n − p)1/4 ). The family of statistics invariant under the group of permutations of the entries of Y will be different than the family invariant under OX . When X is simply a vector which is a non-zero multiple of 1 the family of statistics invariant under the permutation group is much larger than the family invariant under O1 . For this case we are led to study the variable P L = P exp((m − m)T Pe − km − mk2 /2)/n!. We find that Em (L) = 1 P and Varm (L) = P exp((m − m)T P(m − m))/n! − 1. Just when this variance goes to 0 depends on extending the permutation central limit theorem to give convergence of moment generating functions. Since the random variable (m − m)T P(m − m) has mean 0 and variance km − mk4 /n we are again led to the heuristic rate km − mk = o(n1/4 ). However, by taking m to have exactly one non-zero entry it is not too hard to check that this heuristic calculation cannot be made rigorous without further conditions on m to control 21 the largest entries. Finally, if X is not a scale multiple of 1 the problem is not invariant under the permutation group. Is there some natural extension of our techniques to this context for a group smaller than OX ? Appendix Proof of Theorem 3 We prove below (cf Shorack and Wellner, p 63 their formula 5, except that there the distribution F does not depend on n) that ρ2 (F, F̂ ) → 0 (23) in probability. If Theorem 3 were false then from any counterexample sequence we could extract a subsequence which is a counterexample and along which the convergence in (23) is almost sure. The theorem then follows from the assertion that ρ2 (F, G) → 0 implies ρ2 (LF , LG ) → 0 (24) whenever F is any sequence of distributions with compact closure in ∆. Assertion (24) is a consequence of Lemma 1 of Guttorp and Lockhart (1988). To prove (23) we may assume without loss, in view of the compactness of 2 ∆0 that F ⇒Φ for some Φ. Elementary moment calculations assure that F̂ (τ ) converges in probability to Φ(τ ) for each τ which is a continuity point of Φ. This guarantees that ρ0 (F̂ , Φ) → 0 in probability. We need only show that P EF̂ (X 2 ) → EΦ (X 2 ). But EF̂ (X 2 ) = Xi2 /n. The triangular array version of the law of large numbers given in Lemma 2 of Guttorp and Lockhart(1988) P 2 shows that Xi2 /n − EF (X 2 ) → 0 in probability. Since F ⇒Φ implies that EF (X 2 ) → EΦ (X 2 ) we are done. 22 Proof of Theorem 5 It remains to choose a sequence k = k(n) in such a way that we can check (22). In view of permutation invariance we may assume without loss that |m1 − m| ≥ · · · ≥ |mn − m|. Define matrices C and D by setting C(i, j) = φ(Xj , mi ) − φ(Xj , m) − Em (φ(Xj , mi ) − φ(Xj , m)) and D(i, j) = (mi − m)φ1 (Xj ; m). We will eventually choose a sequence k and put B(i, j) = C(i, j) for i ≤ k and B(i, j) = D(i, j) for i > k. Note that P ∗ i B(i, i) is simply S (X). If P is a random permutation matrix then in row i there is precisely 1 nonzero entry; let Ji be the column where this entry occurs. Then S ∗ (PX) = P i B(i, Ji ). The variables J1 , . . . , Jn are a random permutation of the set {1, . . . , n}. As in the proof of Theorem 2 let J1∗ , . . . , Jn∗ be a set of independent random variables uniformly distributed on {1, . . . , n}. We will show that for each fixed κ   ρ2 L( and  ρ2 L( X C(i, Ji∗ )|X), L( i≤κ X X i≤κ C(i, Ji∗ )|X), L( X i≤κ i≤κ C(i, i)) → 0 (25)  C(i, Ji )|X) → 0 (26) in probability. We will also show that for any sequence k tending to ∞ with k 2 = o(n) we have  ρ2 L( X (mi − m)φ1 (X(Ji∗ ), m)|X), L( i>k X i>k  D(i, i)) → 0 (27) in probability. There is then a single sequence k tending to infinity so slowly that (25) and (26) hold with κ replaced by k and so that (27) holds. We use this sequence k to define B. We will then show that ρ2 L( X B(i, Ji∗ )|X), L( i X i 23 ! B(i, i)) → 0 (28) in probability and that ρ2 L( X B(i, Ji )|X), L( X B(i, Ji∗ )|X) i i ! →0 (29) in probability. These two are enough to imply (22) as in Corollary 2 and the obvious (but unstated) corresponding corollary to Theorem 4. Proof of (25) For each fixed i we may apply (23) with the vector (X1 , . . . , Xn ) replaced by (C(i, 1), . . . , C(i, n)) to conclude that ρ2 (L(C(i, Ji∗ )|X), L(C(i, i))) → 0 in probability; the condition imposed on F leading to (23) is implied by (21). Use the independence properties to conclude ρ2 (L(C(1, J1∗), . . . , C(κ, Jκ∗ )|X), L(C(1, 1), . . . , C(κ, κ))) → 0 for each fixed κ. Assertion (25) follows. Proof of (26) For each fixed i we have L(C(i, Ji∗ )|X) = L(C(i, Ji )|X). Furthermore it is possible to construct J and J ∗ in such a way that for each fixed κ we have P (Ji = Ji∗ ; 1 ≤ i ≤ κ) → 1. This establishes (26). Proof of (27) Let m−k = i>k mi /(n − k) and let U be the vector with ith entry φ1 (Xi , m). Arguing as in the proof of Theorem 3 (see 24 above) we see that P  ρ2 L( X (mi − m−k )U(Ji∗ )|X), L( i>k X i>k  (mi − m−k )Ui ) → 0 (30) in probability. We need to replace m−k by m in order to verify (27). Elementary algebra shows m−k − m = O(k/(n − k)). Temporarily let T1 = X (mi − m−k )U(Ji∗ ) − X i>k i>k 24 (mi − m)U(Ji∗ ), and T2 = X (mi − m−k )Ui − i>k X (mi − m)Ui i>k In view of (21) we see that Var(U1 ) = O(1). Hence Var(T2 ) = (m−k − m)2 (n − k)Var(U1 ) → 0. Since the central limit theorem shows that the sequence L( compact closure in ∆ we may use (31) to show that  ρ2 L( X (mi − m−k )Ui ), L( i>k X i>k (31) P i>k D(i, i)) has  D(i, i)) → 0. (32) Next Var(T1 |X) = (m−k − m)2 (n − k)Var(U(J1∗ )|X). (33) Since Var(U(J1∗ )|X) = X Ui2 /n − ( X Ui /n)2 we may apply the triangular array law of large numbers given in Guttorp and Lockhart(1988, Lemma 2) to conclude that Var(U(J1∗ )|X) = OP (1). Since k 2 = o(n) we see that the right hand side of (33) tends to 0 in probability. Hence  ρ2 L( X (mi − m−k )U(Ji∗ )|X), L( i>k i>k  X (mi − m)U(Ji∗ )|X) → 0 (34) in probability. Assembling (30), (32) and (34) we have established (27). Proof of (28) Given X, the variables i≤k C(i, Ji∗ ) and i>k (mi − m)φ1 (X(Ji∗ ), m) are P P independent. Similarly i≤k C(i, i) and i>k D(i, i) are independent. Statement (28) then follows from (25) and (27). P P Proof of (29) To deal with (29) we must cope with the lack of independence among the Ji . A random permutation of {1, . . . , n} can be generated as follows. 25 Pick J1 , . . . , Jk a simple random sample of size k from {1, . . . , n}. Let P−k , independent of J1 , . . . , Jk , be a random permutation of {1, . . . , n − k}. Then P B(i, Ji ) has the same distribution (given X) as k X C(i, Ji ) + (m−k − m−k )T P−k U−k i=1 where the subscript −k on m denotes deletion of m1 , . . . , mk while that on U denotes deletion of the entries U(J1 ), . . . , U(Jk ). Let Z0 denote a random variable, independent of J and J ∗ whose condiP tional distribution given X is normal with mean 0 and variance i>k (mi − m)2 S where S is the sample variance of the Uj ’s. Statement (29) is a consequence of the following 3 assertions:  ρ2 L( X B(i, Ji∗ )|X), L( X i≤k in probability,  ρ2 (L( X C(i, Ji ) + Z0 |X), L( i≤k  C(i, Ji∗ ) + Z0 |X) → 0 X i≤k in probability, and  ρ2 L( X C(i, Ji ) + Z0 |X), L(  C(i, Ji∗ ) + Z0 |X) → 0 X i i≤k in probability.  B(i, Ji )|X) → 0 (35) (36) (37) Condition (36) follows from (26), the conditional independence of Z0 and J, J ∗ and the fact that the conditional variance of Z0 is bounded. Condition (35) is implicit in the proof of (28) after noting that the variance S of the entries in U is negligibly different from ι(m). It remains to establish (37). We will condition on (J1 , . . . , Jk ) as well as X and apply the Permutation Central Limit Theorem. The application of the conditions of that theorem is a bit delicate since the conditions will only be shown to hold in probability. We present the argument in the form of a technical lemma. 26 Lemma 2 Suppose (W1 , W2 , W3 ) is a sequence of random variables. Suppose g and h are sequences of measurable functions defined on the range spaces of (W1 , W2 ) and (W1 , W2 , W3 ). Let ζ1 , ζ2 be two independent real valued random variables. Suppose that there are functions fi for i = 0, 1, . . . (also indexed as usual by the hidden index n) such that f0 (w1 ) → 0 implies 2 g(w1 , W2 ) ⇒ζ1 (38) and f1 (w1 , w2 ) → 0 i = 1, 2, . . . implies 2 h(w1 , w2 , W3 ) ⇒ζ2 . (39) If f0 (W1 ) → 0 in probability and fi (W1 , W2 ) → 0 in probability then L(g(W1, W2 ) + h(W1 , W2 , W3 )|W1 ) ⇒ ζ1 + ζ2 in probability. If in addition E(g(W1 , W2 ) + h(W1 , W2 , W3 )|W1 ) → E(ζ1 + ζ2 ) (40) Var(g(W1 , W2 )|W1 ) → Var(ζ1 ) (41) Var(h(W1 , W2 , W3 )|W1 ) → Var(ζ2 ) (42) in probability, in probability and in probability then 2 L(g(W1 , W2 ) + h(W1 , W2 , W3 )|W1 ) ⇒ζ1 + ζ2 in probability. The lemma is to be applied with W1 = X, with W2 = (J1 , . . . , Jk ) and with W3 = P−k . Conclusion (37) can be reduced to the form given by a comP pactness argument. The sequence of laws of i≤k C(i, i) has compact closure in ∆ in view of (21). Then apply (25) and (26) to conclude that the sequence P of laws of i≤k C(i, Ji ) also has compact closure. Let the distribution of ζ1 be any limit point of this sequence of laws. The random variable ζ2 will be the normal limit in distribution of (m−k − m)T P−k U−k . 27 In order to apply the lemma we must give the conditions of the Permutation Central Limit Theorem in a form in which we have only a countable family of convergences, as required in (39), to check. Note that (12) in Theorem 4 can be replaced by the assertion that there is a sequence τ1 , . . . of real numbers increasing to ∞ such that max(n−1 for each j ≥ 1. (xi − x)2 1(|xi − x| > τj ), Ψ(τj )) − Ψ(τj ) → 0 X (43) We now apply Theorem 4 with x replaced by U−k , with m replaced by m−k −m and with P replaced by P−k . It is easy to check by conditioning on J that E(U−k ) = 0 and Var(U−k ) = ι(m)/(n−k). Hence(n−k)(m−k −m)U−k → 0 in probability. Set T3 = Then X (U−k,i − U−k )2 1(|U−k,i − U−k | > t)/(n − k) T3 ≤ 2 X 2 U−k,i 1(|U−k,i − U−k | > t)/(n − k) +2U−k 2 X 1(|U−k,i − U−k | > t)/(n − k). The second term on the right is OP (1/(n − k)) = oP (1). Since 1(|U−k,i − U−k | > t) ≤ 1(|U−k,i | > t/2) + 1(|U−k | > t/2) we see that T3 ≤ 2(n − k)−1 X Ui2 1(|Ui | > t/2) + oP (1) . i Take Ψ(t) = 2 sup{Em (φ1 (X1 , m)1(|φ1 (X1 , m)| > t/2); m ∈ Θ0 } and apply Lemma 2 of Guttorp and Lockhart together with (21) to check that (43) holds. To finish the proof of (37) we need to check convergence of second moments as in (40), (41) and (42). This can be done using (25), (26) and direct P calculation of the conditional mean and variance given X of i>k D(i, Ji ). Theorem (5) follows. The technical lemma itself may be proved as follows. From any counterexample sequence we may extract by a diagonalization argument a subsequence which is still a counterexample and for which f0 (W1 ) → 0 almost surely and 28 fj (W1 , W2 ) → 0 almost surely for each j ≥ 1. For any sample sequence for which all these convergences occur we have L(h(W1 , W2 , W3 )|W1 , W2 ) ⇒ ζ2 and L(g(W1, W2 )|W1 ) ⇒ ζ1 . Evaluation of the conditional characteristic function of g(W1 , W2 ) + h(W1 , W2 , W3 ) given W1 by further conditioning on W2 yields the convergence in distribution asserted in the lemma. The remaining conclusions concerning moments are more elementary analogues of the same idea. References Abramowitz, M. and Stegun, I. A. (1965). Handbook of Mathematical Functions. New York: Dover. Billingsley, Patrick (1968). Convergence of Probability Measures. New York: Wiley. Čibisov, D.M. (1961). On the tests of fit based on sample spacings. Teor. Verojatnos. i Primenen. 6, 354–8. Del Pino, G.E. (1979). On the asymptotic distribution of k-spacings with applications to goodness-of-fit tests. Ann. Statist., 7, 1058-1065. Guttorp, P. and Lockhart, R. A. (1988). On the asymptotic distribution of quadratic forms in uniform order statistics. Ann. Statist., 16, 433-449. Hájek, J. (1961). Some estensions of the Wald-Wolfowitz-Noether Theorem. Ann. Math. Statist., 32, 506-523. Hájek, J. and Šidák, Z. (1967). Theory of Rank Tests. Academic Press: New York. Shorack, G. R. and Wellner, J. A. (1986). Empirical Processes with Applications to Statistics. New York: Wiley. 29
10math.ST
arXiv:1510.06051v2 [math.CO] 18 Dec 2016 Discrete Mathematics and Theoretical Computer Science DMTCS vol. 18:2, 2016, #11 The Complexity of Pattern Matching for 321-Avoiding and Skew-Merged Permutations Michael Albert1 Martin Lackner3† 1 2 3 4 Marie-Louise Lackner2∗ Vincent Vatter4‡ Department of Computer Science, University of Otago, Dunedin, New Zealand Institute of Discrete Mathematics and Geometry, TU Wien, Vienna, Austria Department of Computer Science, University of Oxford, Oxford, UK Department of Mathematics, University of Florida, Gainesville, Florida, USA received 22nd Oct. 2015, revised 5th Dec. 2016, accepted 20th Dec. 2016. The P ERMUTATION PATTERN M ATCHING problem, asking whether a pattern permutation π is contained in a text permutation τ , is known to be NP-complete. We present two polynomial time algorithms for special cases. The first is applicable if both π and τ are 321-avoiding while the second is applicable if both permutations are skew-merged. Both algorithms have a runtime of O(kn), where k is the length of π and n the length of τ . Keywords: pattern matching, permutation class, permutation pattern 1 Introduction In this paper, a permutation is a bijective function from [n] to itself, where n is a positive integer and [n] = {1, 2, . . . , n}. Therefore, a permutation, π : [n] → [n] is the set of ordered pairs (i, π(i)). We occasionally write specific permutations in the usual one line notation, e.g., 321 represents the permutation of [3] equal to {(1, 3), (2, 2), (3, 1)}. The size of π is just the cardinality of this set, and we denote the elements, also called points, of a permutation by variables such as x and y. We adopt the usual conventions with respect to order of such points, i.e., (i, π(i)) lies to the left of (j, π(j)) if i < j and above (k, π(k)) if π(i) > π(k), with corresponding definitions for ‘to the right of’ and ‘below’. Given an element x in a permutation π, we define (wherever possible): x the element immediately to its left, x the element immediately to its right, the element immediately above it, and x x the element immediately below it. ∗ M.-L. Lackner’s research was supported by the Austrian Science Foundation FWF, grant P25337-N23. Lackner’s research was supported by the Austrian Science Foundation FWF, grants P25518-N23 and Y698, and by the European Research Council (ERC) under grant number 639945 (ACCORD). ‡ Vatter’s research was partially supported by the National Science Foundation under Grant Number DMS-1301692. † M. ISSN 1365–8050 c 2016 by the author(s) Distributed under a Creative Commons Attribution 4.0 International License 2 Michael Albert, Marie-Louise Lackner, Martin Lackner, and Vincent Vatter We use the symbol ⊥ to represent ‘undefined’. Any operator applied to ⊥ also yields ⊥. For example, in the permutation 31254 and for x = 3 we have: x = ⊥, x = 1, x = 4 and x = 2. Let π and τ be two permutations. An injective function, f , from π into τ is an embedding if, for all elements x and y of π, the elements f (x) and f (y) of τ are in the same relative order as x and y (e.g., if x lies below and to the right of y, then f (x) also lies below and to the right of f (y)). If there is an embedding from π into τ then we say that τ contains π. If not, then we say that τ avoids π. The following problem, analogous to problems related to detecting occurrences of patterns in words, is central with respect to these concepts: P ERMUTATION PATTERN M ATCHING (PPM) Input: A text permutation τ of size n and a pattern π of size k. Question: Does τ contain π? Bose, Buss, and Lubiw [5] showed in 1998 that the PPM problem is NP-complete(i) . The recent work of Guillemot and Marx [9] shows that the PPM problem can be solved in time O(k2 log k) 2 n, i.e., linear-time in n when k is viewed as a constant. In particular, this implies that the PPM problem is fixed-parameter tractable (fpt) with respect to the size of the pattern k. Work prior to this breakthrough result achieved runtimes of O(n1+2k/3 · log n) [2] and O(n0.47k+o(k) ) [1]. Using run(τ ) as parameter, i.e., the number of alternating runs of τ , Bruner and Lackner [6] present an fpt algorithm with runtime O(1.79run(τ ) · kn). A permutation class, C, is a set of permutations with the property that if τ ∈ C and τ contains π then π ∈ C. In other words, C is closed downwards with respect to the partial ordering of permutations given by the relation “is contained in”. A permutation class is proper if it does not contain every permutation. Permutation classes are frequently defined in terms of avoidance conditions, namely, for any set B of permutations, the set Av(B) consisting of those permutations which avoid every element of B is a permutation class (and it is always proper if B is non-empty). Conversely, every permutation class is equal to the class of permutations avoiding its complement, or even avoiding the minimal elements (with respect to the partial ordering mentioned above) of its complement. For an overview of results on permutation classes, we refer to the corresponding chapter in the Handbook of Enumerative Combinatorics [15]. This leads to two natural ways in which one might restrict the PPM problem. One is to impose additional structure on the pattern, most naturally, to insist that the pattern belongs to a particular (proper) permutation class. One example which has been studied is the class of separable permutations, which are those avoiding both 3142 and 2413. If the pattern is separable, PPM can be solved in polynomial time [2, 5, 11, 13, 16]. The fastest algorithm for this case is by Ibarra [11] with a runtime of O(kn4 ). Formally, we define this class of problems as follows: C-PATTERN P ERMUTATION PATTERN M ATCHING (C- PATTERN PPM) Input: A text permutation τ of size n and a pattern π of size k, where π belongs to a fixed proper permutation class C. Question: Does τ contain π? A second and more restrictive specialisation of the PPM problem is to insist that both the pattern and text belong to a (proper) permutation class. This is the version of the problem that we study. (i) Note that because both the pattern andtextare regarded as input, the size of the input is n + k. Were we to regard the size of the pattern as fixed, then the trivial O n · k algorithm would be polynomial time. k The Complexity of Pattern Matching for 321-Avoiding and Skew-Merged Permutations 3 C P ERMUTATION PATTERN M ATCHING (C-PPM) Input: A text permutation τ of size n and a pattern π of size k, both belonging to a fixed proper permutation class C. Question: Does τ contain π? Clearly, for a fixed C, polynomial time algorithms for C- PATTERN PPM apply to C-PPM as well. Consequently, the separable case, i.e., Av(3142, 2413)-PPM, can be solved in O(kn4 ) time [11]. Note that if the pattern avoids 132, 231, 213 or 312 then it is automatically separable and thus the C- PATTERN PPM problem for all four classes Av(132), Av(231), Av(213) or Av(312) can be solved in polynomial time. Most relevant to our work is a result by Guillemot and Vialette [10] that establishes an O(k 2 n6 )-time algorithm for Av(321)-PPM. In Sections 2 and 3, we improve their approach to give the following. Theorem 1.1. Given 321-avoiding permutations τ of size n and π of size k, there is an O(kn)-time algorithm which determines whether τ contains π. In Section 4 we show how to adapt this approach to the class of skew-merged permutations, which are those permutations whose elements can be partitioned into an increasing subsequence and a decreasing subsequence. Skew-merged permutations can also be characterised as those permutations that avoid both 3412 and 2143 [14]. Theorem 1.2. Given skew-merged permutations τ of size n and π of size k, there is an O(kn)-time algorithm which determines whether τ contains π. The following elementary observation will be used repeatedly. Lemma 1.3. Let π and τ be permutations and f : π → τ . Then f is an embedding of π into τ if and only if for every element x of π: • if x 6= ⊥ then f (x) lies strictly to the right of f (x ) and • if x 6= ⊥ then f (x) lies strictly above f (x ). Proof: Suppose that x and y are points of π and that, without loss of generality, y lies strictly to the left of x. Then y occurs in the sequence x , x , x , . . . . So, by inductive use of the first property, f (x) lies strictly to the right of f (y). Similarly, inductive use of the second property establishes that the vertical relationship between f (x) and f (y) is the same as that between x and y, and the result follows. The other direction follows directly from the definition of embeddings given on page 2: x is an element strictly to the left of x and thus f (x) lies strictly to the right of f (x ) for an embedding f . In the same way, x is an element strictly below x and thus f (x) lies strictly above f (x ). 2 The Lattice of Rigid Embeddings of 321-Avoiding Permutations It is easy to see that the elements of any 321-avoiding permutation π can be partitioned into two increasing subsequences. This partition is in general not unique but in any such partition, one of these subsequences will contain all those elements which participate as the ‘2’ in a copy of 21—called the upper elements of π and denoted Uπ — and the other will contain all those elements which participate as the ‘1’ in a copy of 21—called the lower elements of π and denoted Lπ . Elements that are neither upper nor lower elements, i.e., those that are not involved in a copy of 21, can be part of either of the two subsequences. Let us formalise these definitions: An element x of π is an upper element if there is some embedding of 4 Michael Albert, Marie-Louise Lackner, Martin Lackner, and Vincent Vatter upper lower fluid rigid Fig. 1: The decomposition of the 321-avoiding permutation π = 3 1 2 4 5 9 6 7 10 8 11 13 12 into rigid and fluid elements. 21 = {(1, 2), (2, 1)} into π such that x is the image of (1, 2) and a lower element if there is an embedding of 21 such that x is the image of (2, 1). Following Albert, Atkinson, Brignall, Ruškuc, Smith, and West [3], elements which are either upper or lower elements of π are referred to as rigid elements, and π is called a rigid permutation if all of its elements are rigid (i.e., if π = Uπ ∪ Lπ ). The remaining elements will be called fluid elements. For an example of a 321-avoiding permutation and its decomposition into rigid and fluid elements, see Figure 1. Note that it can be determined in linear time which elements are upper, lower and fluid in a permutation. For this purpose one simply needs to scan the permutation from left to right and record the largest element encountered so far, denoted by ℓ, and the smallest element yet to come at the right, denoted by s. When we read an element x, three cases can occur: • x > s: In this case x s forms a 21-pattern and thus x is an upper element. • x < ℓ: In this case ℓ x forms a 21-pattern and thus x is a lower element • x ≤ s and x ≥ ℓ (which implies that x = s and s > ℓ): In this case x does not occur in a 21-pattern and is thus a fluid element. The existence of fluid elements in a pattern will be the source of some difficulty in solving the Av(321)PPM problem, and will be addressed in the next section. For the remainder of this section we consider a rigid pattern π of size k and a 321-avoiding text τ of size n. Since an embedding preserves relative locations of points, the image of any rigid element must be rigid. More precisely, we have the following: Observation 2.1. Let π be a rigid pattern and τ be an arbitrary 321-avoiding permutation. If there exists an embedding of π into τ , then it must map upper (resp., lower) elements of π to upper (resp., lower) elements of τ and the fluid elements of τ will never occur in an embedding. In order to look for such embeddings we must widen our search space. A map f : π → τ is called a rigid mapping if f maps upper (resp., lower) elements of π to upper (resp., lower) elements of τ . As noted above, because π is rigid, every embedding of π into τ is a rigid mapping, but the converse is far from true since, among other reasons, rigid mappings need not be injective. Given two points, x and y, in Uπ , we say x ≤ y if y lies above and to the right of x. This is a linear order on Uπ , and we have similar linear orders (all denoted ≤) on Lπ , Uτ and Lτ . This makes the set of all rigid mappings of π into τ into a partially ordered set using point-wise comparison; that is, given rigid mappings f, g : π → τ , we write f ≤ g if f (x) ≤ g(x) for all elements x of π. In fact, it is easy to see that this partially ordered set is a distributive lattice; given two rigid mappings f, g : π → τ their meet The Complexity of Pattern Matching for 321-Avoiding and Skew-Merged Permutations 5 and join can be defined, respectively, by (f ∧ g)(x) (f ∨ g)(x) = = min{f (x), g(x)}, max{f (x), g(x)} for all elements x of π. It is notable that these observations also hold for embeddings. That is, the set of embeddings from π into τ is a sublattice of the lattice of rigid mappings: Theorem 2.2. bruner [[3, Theorem 2]] Given a rigid pattern π and a 321-avoiding text τ , the set of embeddings of π into τ forms a distributive lattice under the operations of meet and join defined above. It follows from Theorem 2.2 that if π is contained in τ then there is a minimum embedding of π into τ which we denote by emin . Given an element x of some 321-avoiding permutation σ we define xU to be the rightmost element of Uσ that is to the left of x. Of course, we have corresponding notations such as xL , xU and so on. In all cases, if no such element exists we get ⊥ as usual. We also define the type of x, T (x) to be U if x ∈ Uσ and L if x ∈ Lσ . The following result forms the core of our algorithm for determining whether there is an embedding of π into τ , at least for the case where π is rigid. It will allow us to turn an arbitrary rigid mapping into an embedding, if possible. Proposition 2.3. Suppose that e : π → τ is an embedding, f : π → τ is a rigid mapping, and, for all x ∈ π, f (x) ≤ e(x). Then, for all x ∈ π: max{f (x )T (x) , f (x )T (x) } ≤ e(x), where we define max{y, ⊥} = y and max{⊥} = 0. Proof: We first establish that f (x )T (x) ≤ e(x). Since x lies strictly to the right of x (and e is an embedding), e(x) lies strictly to the right of e(x ) and is of the same type as x, so, it does not lie to the left of e(x )T (x) . Consequently, e(x )T (x) ≤ e(x). But f (x ) ≤ e(x ) and so f (x )T (x) ≤ e(x )T (x) ≤ e(x). The arguments for the other case are exactly the same. Applying the proposition above in the case where f = e, we see that for any embedding, e, from a rigid π into τ , and any x ∈ π: max{e(x )T (x) , e(x )T (x) } ≤ e(x). Now suppose that f is any rigid mapping from π to τ . We say that x is a problem if it violates the above condition, i.e., x is a problem if f (x) < max{f (x )T (x) , f (x )T (x) }. (1) Intuitively , x is a problem if f (x) is too low compared with f (x ) or too far left compared with f (x ). We let P (f ) be the set of problems for f , for which the following holds: Corollary 2.4. Let π be a rigid permutation and τ a 321-avoiding permutation. A rigid mapping f is an embedding of π into τ if and only if the set of problems P (f ) is empty. 6 Michael Albert, Marie-Louise Lackner, Martin Lackner, and Vincent Vatter Proof: If f is an embedding, it follows from Proposition 2.3 that no element x ∈ π fulfills condition (1). Thus P (f ) is empty. For the other direction, assume that f is not an embedding. From Lemma 1.3 we know that there exists an x ∈ π such that f (x) is below or equal to f (x ) or such that f (x) is left of or equal to f (x ). First, if f (x) is below or equal to f (x ) this implies that f (x) is strictly below f (x )T (x) and hence x ∈ P (f ). Second, if f (x) is left of or equal to f (x ), we have that f (x) is strictly left of f (x )T (x) . Now note that for f (x), f (y) ∈ τ of the same type, f (x) is left of f (y) if and only if f (x) is below f (y). Moreover we know that f preserves types and thus f (x) and f (x )T (x) have the same type. We conclude that f (x) < f (x )T (x) and thus x ∈ P (f ). We now describe an algorithm, displayed as Algorithm 1. Given as input a rigid permutation π and a 321-avoiding permutation τ , it returns the minimum embedding emin of π into τ when it exists, and fails otherwise. The algorithm constructs and updates a rigid mapping f , ensuring that f ≤ emin at all times (if an embedding exists). Let f0 be the map that sends all the elements of Uπ to the least element of Uτ and all elements of Lπ to the least element of Lτ . Algorithm 1 Find a minimum embedding of π into τ , or demonstrate that no embeddings exist. Initialise: f ← f0 . Compute: P (f ). while f is defined everywhere, and P (f ) is non-empty do Choose x ∈ P (f ). Update: f (x) ← max{f (x )T (x) , f (x )T (x) } Recompute: P (f ). end while Return: f , which, if everywhere defined, equals emin. The correctness of this algorithm is easy to establish. Within the while loop, if f is everywhere defined, P (f ) is non-empty, and x is chosen for the update step, then the updated version of f is strictly greater than the original at x, and has the same value elsewhere. Since the set of rigid maps is finite, the loop can be executed a bounded number of times, and the algorithm halts. In the case where emin exists, we certainly have f0 ≤ emin . So, by Proposition 2.3, it is always the case that f ≤ emin . Therefore, when the loop terminates, the algorithm returns an embedding that is less than or equal to emin , and hence must equal emin . Should emin not exist, then termination can only occur because f is not everywhere defined, and so the algorithm fails as required in this case. We can further combine the correctness analysis with a run-time analysis to obtain the following. Proposition 2.5. Given a rigid 321-avoiding permutation π of size k and a 321-avoiding permutation τ of size n there is an algorithm which determines an embedding of π into τ if one exists, and fails otherwise, whose run-time is O(kn). Proof: The algorithm in question is Algorithm 1, and it remains to show that we can achieve the bound claimed for the run-time. As noted, each execution of the loop increases the value of f (x) for at least one x (in the linear ordering, ≤, of either Uτ or Lτ ). Since there are at most n possible values any f (x) can take, and only k distinct x, the loop certainly executes not more than kn times. So, if we can establish that the computation in the loop can be carried out in constant time, the claim follows. The Complexity of Pattern Matching for 321-Avoiding and Skew-Merged Permutations 7 In an initialisation phase (not part of the algorithm proper) we can certainly compute tables of all the values xab for x in both π and τ , a ∈ { , , , } and b either absent or equal to one of L or U . For π this can be done in O(k) time, and for τ in O(n) time, so this initialisation can be absorbed into the claimed run-time. This ensures that the “Update” operations in the loop can be carried out in constant time. We can maintain P (f ) as a queue, and separately maintain an array of boolean values that indicate whether or not x ∈ P (f ). To start the loop, we dequeue some x. The update operation ensures that x is no longer a problem, so we can set its value in the array to false. Moreover, the update operation only changes the value of f (x), and increases it. So it cannot “solve” any existing problem (other than that of x) and the only other way that it could change the problem set would be if f (x) moved to the right of f (x ) or above f (x ). Therefore, in the recompute phase we only need to check those two possibilities, and enqueue x and/or x (setting their boolean values in the array to true) if necessary. By making reference to the array, we can ensure that we never have duplicate elements in the queue – so every iteration of the loop really does result in a proper update. Let us end this section by providing a simple example illustrating how the presented algorithm works. Example 2.6. Let us consider the text permutation τ = 3 1 2 4 5 9 6 7 10 8 11 13 12 represented in Figure 1 and the pattern π = 2 1 4 5 3. Note that π is indeed rigid, whereas τ is not; we can however ignore the fluid elements when looking for an embedding of π into τ as explained above. The upper elements in π are 2, 4 and 5 and the lower elements are 1 and 3. We now describe a possible run of the algorithm (the order in which problems are resolved is not determined): 1. We start with the initial rigid mapping f = f0 defined as follows: f0 (1) = f0 (3) = 1 and f0 (2) = f0 (4) = f0 (5) = 3. By checking the condition in equation (1) we see that all elements except 1 and 2 are problems: P (f0 ) = P0 = {3, 4, 5}. 2. We resolve the problem x = 4 for which we have max{f (x )U , f (x )U } = 9 and update f such that f (4) = 9. In order to recompute P (f ), we only need to check x = x = 5. We cannot possibly have resolved the problem 5 at the same time, so it remains in P (f ) and we have P (f ) = {3, 5}. 3. We resolve the problem x = 5 for which we have max{f (x )U , f (x )U } = 10 and update f such that f (5) = 10. In order to recompute P (f ), we only need to check x = 3 (5 is not defined). We cannot possibly have resolved the problem 3 at the same time, so it remains in P (f ) and we have P (f ) = {3}. 4. We resolve the last problem x = 3 for which we have max{f (x )L , f (x )L } = 8 and update f such that f (3) = 8. In order to recompute P (f ), we only need to check x = 4 (3 is not defined). The element 4 is no longer a problem since it is large enough and thus P (f ) is empty. 5. The algorithm terminates successfully since P (f ) is empty and has found the minimal embedding e = emin of π into τ defined as follows: e(2) = 3, e(1) = 1, e(4) = 9, e(5) = 10 and e(3) = 8. 3 Fluid Elements and the O(kn) Algorithm for 321-Avoiding Permutations In this section we aim to complete the proof of Theorem 1.1 and to do so we must face the issue of fluid elements in the pattern π. Since a fluid element participates in no 21, each other element of π is either 8 Michael Albert, Marie-Louise Lackner, Martin Lackner, and Vincent Vatter below and left of it, or above and right of it. This is represented most easily using another notational convention. Suppose that σ and θ are two permutations of size m and n respectively. Then σ ⊕ θ is the permutation whose points are: σ ∪ {(i + m, θ(i) + m) : i ∈ [n]}. Informally, to form σ ⊕ θ we just place θ above and to the right of σ. Clearly ⊕ is associative, though of course not commutative. For any 321-avoiding permutation π there is a unique decomposition: π = π1 ⊕ π2 ⊕ · · · ⊕ πt where, for 1 ≤ i ≤ t, πi is either rigid or a singleton, and it is never the case that both πi and πi+1 are rigid. The singleton elements of this representation correspond precisely to the fluid elements of π. For an example, consider again Figure 1 where the black squares correspond to the blocks πi of this representation. Given π of size k we can easily compute this representation in O(k) time, simply by finding the fluid elements of π (which are those elements that are both left-to-right maxima and right-to-left minima). Henceforth, we assume that this representation is given. In the algorithm to determine whether π embeds in τ we will construct, for each 1 ≤ i ≤ t at most two embeddings of π1 ⊕ · · · ⊕ πi into τ in such a way that, if any embedding of π into τ exists, then at least one of the two partial embeddings can be extended to a full embedding. So we first consider the following question: given an embedding, ei , of π1 ⊕ · · · ⊕ πi into τ that extends to an (unknown) embedding, e, of π into τ , how can we construct a pair of embeddings of π1 ⊕ · · · ⊕ πi ⊕ πi+1 into τ , at least one of which extends to an embedding of π into τ ? We distinguish three cases for πi+1 . For this purpose, let Ti denote the set of elements that lie above and to the right of the image of ei . Then, the image of e restricted to the elements corresponding to πi+1 is contained in Ti . Let us first consider the case where πi+1 is rigid. Then the image of e on the elements corresponding to πi+1 must be greater than or equal to (point by point), the image of πi+1 under its minimum embedding into Ti . Thus, if we choose the minimal embedding of πi+1 into Ti , the resulting embedding ei+1 extends to an embedding of π into τ . Though Ti is, strictly speaking, not a permutation all of its associated operators are the same as those of τ (except some are undefined, e.g., the leftmost element of Ti has no left neighbour in Ti but may well have one in τ ). So, in this case we can use Algorithm 1 in order to find the minimal embedding of πi+1 into Ti and hereby obtain a single extension of ei with the required property. A similarly easy case is where πi+1 is a singleton, i.e., a fluid element and Ti begins with its least element (which is a fluid element as well). Then nothing can be lost by mapping πi+1 to that element. The only remaining case is where πi+1 is a singleton and the first element of Ti is not its minimum. Since every element of Ti lies above its first element, or above and to the right of its minimum, we can extend ei in two ways – one sending πi+1 to the leftmost element of Ti (which is an upper element) and one to its minimum (which is a lower element), and one of these must be extensible. Now it seems that we might have a problem – given two partial embeddings of π1 ⊕ · · · ⊕ πi might they not extend to three or four candidate embeddings of π1 ⊕ · · · ⊕ πi ⊕ πi+1 ? Indeed this is the case, but only if πi+1 is a singleton. If it has four possible images, two belong to Uτ and two to Lτ . Since all further elements of π lie above and to the right of this fluid element, we only need to retain the embeddings The Complexity of Pattern Matching for 321-Avoiding and Skew-Merged Permutations 9 where its image is the lesser of the two in each of these sets. Likewise, if it has three possible images (one of which might be fluid), at least one of them can be ignored. Another way to say this is that because π1 ⊕ · · · ⊕ πi ⊕ πi+1 ends with its maximum element, so do its images under the embedding. Among three or more elements of a 321-avoiding permutation there are at least one and at most two elements that do not participate as the 2 in a 12 pattern. We need retain only those embeddings whose maximum is not such a 2, as otherwise they could be replaced by an embedding with a smaller maximum in forming a full extension. Since the sum of the size of the rigid permutations in the representation of π is at most the total size of π, the parts of the algorithm where we construct minimal rigid embeddings still require at most O(kn) time in total. Dealing with singletons (fluid elements) clearly requires only constant time since we can find the next (to the right) fluid/upper/lower element in τ in constant time. Also, filtering out non-optimal extensions can be done in constant time since only the maximal elements of these extensions have to be compared and at most four extensions exist at the same time. We conclude that the total cost of the algorithm is still O(kn). If τ contains π the algorithm terminates successfully and returns one or possibly two embeddings. What if no embedding exists? Then, following the plan above as if it did (beginning from an empty map, i.e., the case i = 0) we must at some point reach a failing case of Algorithm 1, or possibly encounter an empty Ti . In either case, we fail since we have demonstrated that no embedding can be possible. This completes the proof of Theorem 1.1. Again, let us provide an example demonstrating how the algorithm for arbitrary 321-avoiding patterns works. Example 3.1. As in Example 2.6, we consider the text permutation τ = 3 1 2 4 5 9 6 7 10 8 11 13 12 represented in Figure 1. The pattern is π = 2 1 3 4 5 7 6 8. The upper elements in π are 2 and 7, the lower ones are 1 and 6, and the fluid elements are 3, 4, 5 and 8. The algorithm proceeds block by block in the decomposition of π. 1. It starts with the rigid block consisting of the elements 2 and 1. Algorithm 1 takes care of this block and, as in Example 2.6, e(2) = 3 and e(1) = 1. 2. The next block π2 is the singleton element 3. T1 , the set of elements that lie above and to the right of the image of e starts with a fluid element and thus we can set e(3) = 4. 3. We have the same situation for π3 which consists of the singleton element 4 and set e(4) = 5. 4. The block π4 is again a singleton element. However, T3 does not start with its minimal element and thus two choices are possible for e(5): we can either send 5 to the leftmost upper element in T3 or to the leftmost lower element. We store these two possibilities: eU (5) = 9 and eL (5) = 6. 5. The next block π5 is rigid and we thus apply Algorithm 1 which is not detailed here. For the choice eU (5) = 9 it leads to eU (7) = 13 and eU (6) = 12 whereas for eL (5) = 6 it leads to eL (7) = 10 and eL (6) = 8. These two partial embeddings are rigid and thus comparable: eL ≤ eU and we can disregard eU . This is a good choice, since eU cannot be extended to an embedding of π into τ since the last element 8 cannot be mapped anywhere. 6. It remains to determine e(8). Since T5 starts with its minimal element we can choose this one and set e(8) = 11. 10 Michael Albert, Marie-Louise Lackner, Martin Lackner, and Vincent Vatter NW NE centre SW SE Fig. 2: The decomposition of a skew-merged permutation into its centre and four corners. 7. The algorithm terminates successfully and returns an embedding of π into τ : e(2) = 3, e(1) = 1, e(3) = 4, e(4) = 5, e(5) = 6, e(7) = 10, e(6) = 8 and e(8) = 11. 4 Skew-Merged Permutations The permutations avoiding 321 can be partitioned into two monotone increasing sequences. Of course the permutations avoiding 123 can be similarly partitioned (into decreasing sequences) and the results of the previous section apply to them as well. However, the class of skew-merged permutations, those that can be partitioned into an increasing and a decreasing sequence, requires further analysis, though as we shall see the analogue of Theorem 1.1 is also true in this context. Towards this goal, we first identify a set of rigid elements of a skew-merged permutation. In Figure 2 these are the elements lying in the corner regions. Specifically we say that an element of a skew-merged permutation is of type: NE if it participates as a 3 in a 213; NW if it participates as a 3 in a 312; SW if it participates as a 1 in a 132; SE if it participates as a 1 in a 231, and we call any other element of a skew-merged permutation central. We first verify that the illustration of a skew-merged permutation shown in Figure 2 is correct. This is a result due to Atkinson [4], and so we only sketch part of the proof to give its flavour. Proposition 4.1. The elements of a skew-merged permutation decompose by type as shown in Figure 2. Moreover, the central elements form a monotone subsequence. Proof: Recall that another characterisation of skew-merged permutations is the following: they are those permutations that do not contain either 3412 or 2143. Let a skew-merged permutation π be given, and suppose that π = I ∪ D is a partition of π into a monotone increasing and monotone decreasing sequence. Consider first elements of type NE (all other types can be handled by parallel arguments due to symmetry). Since any such participates as a 3 in a 213, it must belong to I (otherwise, the elements participating as the 2 and 1 would both belong to I which is of course impossible). So the elements of type NE form a monotone increasing sequence. Suppose that C is of type NE, with BAC an occurrence of 213 and a is of type SW with acb an occurrence of 132. Then a ∈ I for similar reasons to the preceding ones. If C preceded a (and hence was The Complexity of Pattern Matching for 321-Avoiding and Skew-Merged Permutations 11 also smaller than it) then, BAcb would be an occurrence of 2143. So, all elements of type SW lie below and to the left of those of type NE. Now suppose that z is of type NW, with zxy an occurrence of 312. If C were to precede z we would have various cases: first if C lay below y then BAzy would be 2143, if C lay above y but below z then Czxy would be 3412, if C lay above z and B above y, then BCxy would be 3412, but if B lay below y then BAzy would be 2143. As all these cases lead to contradictions, C must follow z. All other cases can be dealt with similarly. Finally, to see that the central elements form a monotone sequence observe that they must certainly avoid all of 132, 213, 231, and 312 lest some of them be noncentral. But, only monotone permutations (of either type) avoid these four permutations. This decomposition can be computed in linear time: Lemma 4.2. Given a skew-merged permutation of size n, there is an algorithm that computes its partition into types in O(n)-time. Proof: Let θ be an arbitrary skew-merged permutation. Notice that the part of θ to the left of the leftmost element of type NE or SE avoids 231 and 213. Such permutations have a characteristic > shape since any element must not be intermediate in value between two to its right. We are interested in finding the maximum prefix of θ which has this characteristic shape, or what amounts to the same thing, the leftmost element of θ such that the prefix ending at that element involves 231 or 213. This can be accomplished in linear time: we scan θ from left to right and determine for every position i whether it is an ascent (θ(i) < θ(i + 1)) or a descent (θ(i) > θ(i + 1)). At any moment we only store the last encountered ascent a and descent d. The element θ(i) plays the role of a 1 in a 231 pattern, if θ(i) < θ(a); it plays the role of a 3 in a 213, if θ(i) > θ(d). If either of the two conditions apply to position i, we have identified the leftmost element of type NE or SE. That is, we have found the boundary line between the centre region and the Eastern region of θ. In a similar manner we can find all of the boundary lines: by scanning θ from right to left we find the boundary between West and centre, by scanning from bottom to top we find the boundary between South and centre and by scanning from top to bottom we find the boundary between North and centre. We can thus compute the partition of θ into types by scanning θ four times. We will now describe an algorithm for skew-merged patterns and texts and provide the necessary theoretic background. This algorithm consists of two main parts: In the first part, the non central elements of the pattern π are embedded into τ using a similar approach as for rigid permutations and adapting Algorithm 1 which will deliver a minimal embedding of the non-central elements. In the second part, we will extend this minimal embedding to the central elements of π. In this sense, the non-central elements of a skew-merged permutation correspond to the rigid elements of a 321-avoiding permutation. Since they are defined by the occurrence of certain patterns and since embeddings preserve such patterns it is immediately clear that if e : π → τ is an embedding of one skew-merged permutation into another, then e must preserve the type of all non-central elements. In order to be able to speak of minimal embeddings in the context of skew-merged permutations, we need to introduce some new notation. For two non-central elements of the same type we write x ✁ y if x lies strictly further out from the center than y (x ✂ y will mean that either x ✁ y or x = y). The minimum with respect to this relation ✁ is denoted by outer and the maximum by inner. For two embeddings, e1 and e2 of the non-central elements of π into τ that preserve types we can define their meet by e1 ∧ e2 (x) = outer{e1 (x), e2 (x)} 12 Michael Albert, Marie-Louise Lackner, Martin Lackner, and Vincent Vatter for all non-central x ∈ π. Then, just as in the 321-avoiding case, e1 ∧ e2 is also an embedding of the non-central elements of π into those of τ : Lemma 4.3. Let π be a skew-merged pattern with no central elements and τ be an arbitrary skew-merged permutation. Then the following holds: If e1 and e2 are embeddings of π into τ then their meet f := e1 ∧e2 as defined above is an embedding as well. Proof: Let x 6= y be two elements in π and let us assume that x lies to the left of y in π. We need to show that f (x) lies to the left of f (y) in τ and that the horizontal relation between x and y is preserved as well. The key argument is that taking the minimum of the elements in the above sense automatically translates into taking their actual minimum or maximum (equivalently, the leftmost or rightmost element), depending on the type of element. In order to give a formal proof, we distinguish between three cases. • If x and y are of the same type. We detail the case of SW elements here, as the other ones are analogous (one simply needs to replace “minimum” by “maximum” and/or “left of” by “right of” depending on the type). In this case, taking the minimum of the elements in the sense defined earlier is nothing else than taking their actual minimum, which again is the same as taking the left-most element. Since we have that f (x) ≤ e1 (x) < e1 (y) (and f (x) is to the left of e1 (y)) as well as f (x) ≤ e2 (x) < e2 (y) (and f (x) is to the left of e2 (y)), it follows that f (x) < outer(e1 (y), e2 (y)) = f (y) (and f (x) is to the left of f (y)). • If x and y lie in opposite corners of the diagram. In this case the statement follows immediately from the fact that an embedding preserves types. Indeed, all SW elements are to the left of and smaller than NE ones and all NW elements are to the left of and larger than SE ones. Thus both the vertical as well as the horizontal relation between x and y is preserved. • The remaining cases, where x and y are not of the same type, but are both elements in the south, north, east or west. We detail the case of two elements in the north, i.e., x is a NW element and y a NE one. The other cases can be dealt with analogously (by interchanging minimum with maximum or vertical with horizontal positions). Without loss of generality, we further assume that x < y. First, it is clear that f (x) lies strictly to the left of f (y) since types are preserved. Second, regarding the horizontal relation between x and y, let us note that taking the element that is furthest away from the centre translates into taking the maximum. Thus, we have that f (y) ≥ e1 (y) > e1 (x) as well as f (y) ≥ e2 (y) > e2 (x) which implies that f (y) > f (x). The consideration of these cases completes the proof. Observe the following: if either e1 or e2 was the restriction of an actual embedding, e, of π into τ to the non-central elements then we can extend the mapping e1 ∧ e2 to central elements using e there, and thereby obtain an embedding. So, among all embeddings of π into τ there is one whose effect on the non-central elements is the minimum of all the embeddings of the non-central elements of π into those of τ . We will see later on how such an extension to the central elements of π can be found. This minimum embedding of the non-central elements can be found by modifying the definition of the problem set and the update rule of Algorithm 1. The only thing we need to do in order to reflect the new notion of minimum/maximum in this definition, is to redefine the notation introduced in the Introduction. Given a non-central element x in a skew-merged permutation π, we denote by (wherever possible): The Complexity of Pattern Matching for 321-Avoiding and Skew-Merged Permutations 13 xoh the next non-central element further out from the center in horizontal direction, xih the next non-central element towards the center (inwards) in horizontal direction, xiv the next non-central element towards the center (inwards) in vertical direction, and xov the next non-central element further out from the center in vertical direction. For example, in the skew-merged pattern π depicted in Figure 3 and x = 7, we have: xoh = 1, xih = ⊥, xiv = 6, and xov = ⊥. We also define the type of a non-central element x in a skew-merged permutation, T (x), to be the corner in which x lies, i.e., T (x) can be NW, SW, NE or SE. Moreover, we extend the notation introduced above as follows: For a ∈ {oh, ih, iv, ov} and b ∈ {N E, SE, SW, N W }, we define xab to be the next non-central element in π according to direction a that is of type b. In other words, xab is the first element in the sequence (xa , (xa )a , . . . ) of type b. If there is no such element, i.e., no element in (xa , (xa )a , . . . ) is of type b, then we set xab = ⊥. For example, in the skew-merged pattern π depicted in Figure 3 and ov oh iv x = 5, we have xov N W = 7, xN E = 6, whereas xSE = ⊥ and xSE = ⊥. With this new notation, one can see that an analogue of Proposition 2.3 holds for skew-merged permutations: Proposition 4.4. Suppose that e is an embedding of the non-central elements of π into τ , f is a mapping of the non-central elements of π into τ that preserves types, and, for all non-central x ∈ π, f (x) ✂ e(x). Then, for all non-central x ∈ π: o n ov iv inner f (xoh )ih , f (x ) T (x) T (x) ✂ e(x). The proof of this Proposition is analogous to the one of Proposition 2.3. We thus say that a non-central element x of a skew-merged permutation is a problem if: n o ov iv f (x) ✁ inner f (xoh )ih T (x) , f (x )T (x) , (2) for a mapping f of the non-central elements of π into τ that preserves types. Moreover, when we resolve the problem x by updating the value analogously to the case of 321-avoiding n of f (x) this is done o ov iv , f (x ) permutations and we set f (x) = inner f (xoh )ih T (x) . T (x) This finishes the description of the necessary modifications of Algorithm 1. As for Algorithm 1 we assume that xa and xab for a ∈ {oh, ih, iv, ov} and b ∈ {N E, SE, SW, N W } is precomputed and thus can be found in constant time. Given the decomposition of π and τ into types, these precomputations can be done in linear time. Both the steps required for the update of f and the recomputation of the problem set P (f ) can be carried out in constant time. To complete the proof of Theorem 1.2 we must show that, having found a minimum embedding of the non-central elements of π to those of τ , the existence of a full embedding can also be determined sufficiently quickly. We need to determine whether or not the central part of π can be embedded into the remainder of τ , i.e., the set of elements in τ which consists of central elements and all adjacent elements that have not yet been used in the minimum embedding. The central part of π is a monotone pattern of a certain size at most k, and the remaining part of τ is a skew-merged permutation of size at most n (whose endpoints we know). In general, finding a longest increasing (or decreasing) subsequence of size k in a permutation of size n can be done in time O(n log log k) [7]. Thus, checking whether the central part can be embedded into 14 Michael Albert, Marie-Louise Lackner, Martin Lackner, and Vincent Vatter π = 1734256 τ = 10 1 9 3 5 4 6 2 7 8 Fig. 3: Decomposition of the skew-merged permutations π and τ into their centres and four corners. the remaining part of τ can be done within the O(nk) runtime bound of our algorithm. In the special case of skew-merged permutations, finding a longest increasing (resp., decreasing) subsequence can even be done in O(n) time. To be more precise, O(n) time is only required for obtaining the partition into five types as represented in Figure 2 (which is already available in our case); the remaining steps require only constant time. Indeed, for longest increasing subsequences the following observations can be made (the case of decreasing subsequences can be treated analogously): The elements of type SW and NE will always contribute to a longest increasing subsequence. Moreover, such a subsequence also contains as many elements as possible from the centre, i.e., if the center is increasing then all elements contribute to a longest increasing subsequence and if the center is decreasing we can arbitrarily pick one centre element. Note that it is never advantageous to include elements of type NW or SE. This can be seen as follows: At most one NW or SE element can be part of an increasing subsequence. Thus, if the centre is non-empty, it is certainly not advantageous to include a NW or SE element. Let us assume that the centre is empty. An element of type NW occurs as a 3 in a 312 pattern. Among the elements playing the role of the 1 and the 2, at least one element (and possibly both of them) is of type SW or NE. Thus, including an element of type NW would force us to exclude one or two elements of type SW or NE. In other words, we cannot increase the size of an increasing subsequence by adding an element of type NW. A similar argument holds for elements of type SE. We conclude that for the size of the longest increasing subsequence we only have to add the number of elements of type SW and NE as well as the size of the longest increasing subsequence in the central part. Let us end this section by providing a simple example illustrating how this modified version of Algorithm 1 works. Example 4.5. Let us consider the text permutation τ = 10 1 9 3 5 4 6 2 7 8 and the pattern π = 1 7 3 4 2 5 6. Both permutations and their decomposition into types are shown in Figure 3. We start by describing a possible run of the algorithm (the order in which problems are resolved is not determined) finding the minimal embedding of the non-central elements of π into τ : 1. We start with the initial mapping f = f0 that sends all non-central elements of one type in π to the minimal element of this type in τ (i.e., the element that is furthest out from the center). It is defined as follows: f (1) = 1, f (7) = 10, f (5) = f (6) = 8 and f (2) = 2. We compute the problem set The Complexity of Pattern Matching for 321-Avoiding and Skew-Merged Permutations 15 using the condition in equation (2) and obtain P (f ) = {5, 7}.  ov iv 2. We resolve the problem x = 5 for which we have inner f (xoh )ih N E , f (x )N E = 7 and update f such that f (5) = 7. In order to recompute P (f ), we only need to check xih = 2 since xiv is not defined. The choice f (2) = 2 does not create a problem with this new choice for f (5). We cannot possibly have resolved the problem 7 at the same time, so it remains in P (f ) and we have P (f ) = {7}.  ov iv 3. We resolve the problem x = 7 for which we have inner f (xoh )ih N W , f (x )N W = 9 and update f such that f (7) = 9. In order to recompute P (f ), we only need to check xiv = 6 since xih is not defined. The choice f (6) = 8 does not create a problem with this new choice for f (7). 4. The algorithm has found the minimal embedding e = emin of the non-central elements of π into τ defined as follows: f (1) = 1, f (7) = 9, f (2) = 2, f (5) = 7 and f (6) = 8. 5. We need to map the central elements 3 and 4 of π into the remaining part of τ (marked by a dotted line in Figure 3). Since the central elements of π consist of an increasing subsequence of size two, we can choose any such subsequence within the dotted area in τ . We decide to set f (3) = 3 and f (4) = 5 which finally gives an embedding of π into τ . 5 Concluding Remarks We conclude by mentioning some open problems related to this work. We have seen in Theorem 1.1 that Av(321)-PPM can be solved in O(kn) time. Guillemot and Vialette showed that the more general √ 4 k+12 ) time. It is an open problem whether Av(321)- PATTERN PPM problem can be solved in O(kn Av(321)- PATTERN PPM can be solved in polynomial time. Note that if the pattern avoids 132, 231, 213 or 312 then it is automatically separable and thus the C-PPM problem and the C- PATTERN PPM problem for all four classes Av(132), Av(231), Av(213) or Av(312) can be solved in polynomial time. Consequently the Av(321)- PATTERN PPM—which is equivalent to the Av(123)- PATTERN PPM—is the only open case for Av(β)- PATTERN PPM where β has size 3. In case Av(321)- PATTERN PPM turns out to be NP-complete, Av(β)- PATTERN PPM will also be NP-complete if β is any permutation of size four other than 2143, 3142, 2413, or 3412. Interestingly, this list contains exactly those patterns that define the classes of skew-merged and of separable permutations. Moreover, NP-completeness of Av(321)- PATTERN PPM would imply that Av(β)- PATTERN PPM is NPcomplete for β of size five or more, since by Erdős–Szekeres Theorem [8] every permutation of size at least five contains 123 or 321. Looking at the big picture, Theorems 1.1 and 1.2 show that C-PPM can be solved in polynomial time for Av(321) and Av(2143, 3412), respectively. It might be that C-PPM is always polynomial-time solvable for a fixed, proper class C. It would be of considerable interest to either establish this statement or to prove a dichotomy theorem that distinguishes permutation classes for which C-PPM is polynomial-time solvable and those that yield hard C-PPM instances. The same question can be asked for C- PATTERN PPM, although it seems rather unlikely that this problem is polynomial time solvable for every fixed, proper class C. 16 Michael Albert, Marie-Louise Lackner, Martin Lackner, and Vincent Vatter Note added in proof. After a draft of this paper was posted on the arXiv, Jelı́nek and Kynčl [12] established that the Av(β)- PATTERN PPM problem is indeed NP-complete for every β∈ / {1, 12, 21, 132, 213, 231, 312}. They further showed that the Av(4321)-PPM problem is NP-complete, even when the pattern is restricted to be 321-avoiding. References [1] S. Ahal and Y. Rabinovich. On complexity of the subpattern problem. SIAM J. Discrete Math., 22(2):629–649, 2008. [2] M. H. Albert, R. E. L. Aldred, M. D. Atkinson, and D. A. Holton. Algorithms for pattern involvement in permutations. In P. Eades and T. Takaoka, editors, 12th International Symposium on Algorithms and Computation (ISAAC), volume 2223 of Lecture Notes in Comput. Sci., pages 355–366. Springer, Berlin, Germany, 2001. [3] M. H. Albert, M. D. Atkinson, R. Brignall, N. Ruškuc, R. Smith, and J. West. Growth rates for subclasses of Av(321). Electron. J. Combin., 17:Paper 141, 16 pp., 2010. [4] M. D. Atkinson. Permutations which are the union of an increasing and a decreasing subsequence. Electron. J. Combin., 5:Paper 6, 13 pp., 1998. [5] P. Bose, J. F. Buss, and A. Lubiw. Pattern matching for permutations. Inform. Process. Lett., 65(5):277–283, 1998. [6] M.-L. Bruner and M. Lackner. A fast algorithm for permutation pattern matching based on alternating runs. Algorithmica, 75(1):84–117, 2016. [7] M. Crochemore and E. Porat. Fast computation of a longest increasing subsequence and application. Inform. and Comput., 208(9):1054–1059, 2010. [8] P. Erdős and G. Szekeres. A combinatorial problem in geometry. Compos. Math., 2:463–470, 1935. [9] S. Guillemot and D. Marx. Finding small patterns in permutations in linear time. In Proceedings of the Twenty-Fifth Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 82–101. SIAM, Philadelphia, Pennsylvania, 2014. [10] S. Guillemot and S. Vialette. Pattern matching for 321-avoiding permutations. In Y. Dong, D.-Z. Du, and O. Ibarra, editors, Algorithms and Computation, Proceedings of the Twentieth International Symposium (ISAAC), volume 5878 of Lecture Notes in Comput. Sci., pages 1064–1073. Springer, Berlin, Germany, 2009. [11] L. Ibarra. Finding pattern matchings for permutations. Inform. Process. Lett., 61(6):293–295, 1997. [12] V. Jelı́nek and J. Kynčl. Hardness of permutation pattern matching. arXiv:1608.00529 [math.CO]. The Complexity of Pattern Matching for 321-Avoiding and Skew-Merged Permutations 17 [13] B. E. Neou, R. Rizzi, and S. Vialette. Pattern matching for separable permutations. In S. Inenaga, K. Sadakane, and T. Sakai, editors, String Processing and Information Retrieval: 23rd International Symposium, SPIRE 2016, volume 9954 of Lecture Notes in Comput. Sci., pages 260–272. Springer, Berlin, Germany, 2016. [14] Z. E. Stankova. Forbidden subsequences. Discrete Math., 132(1-3):291–316, 1994. [15] V. Vatter. Permutation classes. In M. Bóna, editor, Handbook of Enumerative Combinatorics, pages 754–833. CRC Press, Boca Raton, Florida, 2015. [16] V. Yugandhar and S. Saxena. Parallel algorithms for separable permutations. Discrete Appl. Math., 146(3):343–364, 2005.
8cs.DS
Fixed-point Characterization of Compositionality Properties of Probabilistic Processes Combinators Daniel Gebler Department of Computer Science, VU University Amsterdam, De Boelelaan 1081a, NL-1081 HV Amsterdam, The Netherlands [email protected] Simone Tini Department of Scienza e Alta Tecnologia, University of Insubria, Via Valleggio 11, I-22100, Como, Italy [email protected] Bisimulation metric is a robust behavioural semantics for probabilistic processes. Given any SOS specification of probabilistic processes, we provide a method to compute for each operator of the language its respective metric compositionality property. The compositionality property of an operator is defined as its modulus of continuity which gives the relative increase of the distance between processes when they are combined by that operator. The compositionality property of an operator is computed by recursively counting how many times the combined processes are copied along their evolution. The compositionality properties allow to derive an upper bound on the distance between processes by purely inspecting the operators used to specify those processes. Keywords: SOS, probabilistic transition systems, bisimulation metric, compositionality, continuity 1 Introduction Over the last decade a number of researchers have started to develop a theory of structural operational semantics for probabilistic transition systems (PTSs). Several rule formats for various PTSs were proposed that ensure compositionality of bisimilarity [3, 10, 27] and of approximate bisimilarity [24, 31]. We will consider specifications with rules of the probabilistic GSOS format [3, 9, 29] in order to describe nondeterministic probabilistic transition systems [30]. Bisimilarity is very sensitive to the exact probabilities of transitions. The slightest perturbation of the probabilities can destroy bisimilarity. Bisimulation metric [6, 7, 13–16, 25] provides a robust semantics for probabilistic processes. It is the quantitative analogue to bisimulation equivalence and assigns to each pair of processes a distance which measures the proximity of their quantitative properties. The distances form a pseudometric with bisimilar processes at distance 0. Alternative approaches towards a robust semantics for probabilistic processes are approximate bisimulation [17, 25, 32] and bisimulation degrees [33]. We consider bisimulation metrics as convincingly argued in e.g. [6, 15, 25]. For compositional specification and reasoning it is necessary that the considered behavioral semantics is compatible with all operators of the language. For bisimulation metric semantics this is the notion of uniform continuity. Intuitively, an operator is uniformly continuous if processes composed by that operator stay close whenever their respective subprocesses are replaced by close subprocesses. In the 1990s, rule formats that guarantee compositionality of the specified operators have been proposed by (reasonable) argumentation for admissible rules. Prominent examples are the GSOS format [5] and the ntyft/ntyxt [26] format. More recently, the development of compositional proof systems for the J. Borgström, S. Crafa (Eds.): Combined Workshop on Expressiveness in Concurrency and Structural Operational Semantics (EXPRESS/SOS 2014) EPTCS 160, 2014, pp. 63–78, doi:10.4204/EPTCS.160.7 © D. Gebler & S. Tini This work is licensed under the Creative Commons Attribution License. 64 Characterization of Compositionality Properties of Probabilistic Process Combinators satisfaction relation of HML-formulae [18, 23] allowed to derive rule formats from the logical characterization of the behavioral relation under investigation [4, 19–21]. We propose a new approach that allows to derive for any given specification the compositionality property of each of its specified operators. The compositionality properties are derived from an appropriate denotational model of the specified language. First, we develop for a concrete process algebra an appropriate denotational model. The denotation of an open process term describes for each resolution of the nondeterministic choices how many instances of each process variable are spawned while the process evolves. The number of spawned process replicas is weighted by the likelihood of its realization just like the bisimulation metric weights the distance between target states by their reachability. We derive from the denotation of an open process term an upper bound on the bisimulation distance between the closed instances of the denoted process. Then we generalize this method to arbitrary processes whose operational semantics is specified by probabilistic GSOS rules. In fact, the upper bound on the bisimulation distance between closed instances of f (x1 , . . . , xr( f ) ) is a modulus of continuity of operator f if the denotation of f (x1 , . . . , xr( f ) ) is finitely bounded. In this case the operator f is uniformly continuous and admits for compositional reasoning wrt. bisimulation metric. This paper continues our research programme towards a theory of robust specifications for probabilistic processes. Earlier work [24] investigated compositional process combinators with respect to approximate bisimulation. Besides the different semantics considered in this paper, we extend substantially on the approach of [24] by using the newly developed denotational approach. The denotational model separates clearly between nondeterministic choice, probabilistic choice, and process replication. This answers also the open question of [24] how the distance of processes composed by process combinators with a nondeterministic operational semantics can be approximated. 2 Preliminaries 2.1 Probabilistic Transition Systems A signature is a structure Σ = (F, r), where (i) F is a countable set of operators, and (ii) r : F → N is a rank function. r( f ) gives the arity of operator f . We write f ∈ Σ for f ∈ F. We assume an infinite set of state variables Vs disjoint from F. The set of Σ-terms (also called state terms) over V ⊆ Vs , notation T (Σ, V), is the least set satisfying: (i) V ⊆ T (Σ, V), and (ii) f (t1 , . . . , tr( f ) ) ∈ T (Σ, V) for f ∈ Σ and t1 , . . . , tr( f ) ∈ T (Σ, V). T (Σ, ∅) is the set of all closed terms and abbreviated as T(Σ). T (Σ, Vs ) is the set of open terms and abbreviated as T(Σ). We may refer to operators as process combinators, to variables as process variables, and to closed terms as processes. Var(t) denotes the set of all state variables in t. P Probability distributions are mappings π : T(Σ) → [0, 1] with t∈T(Σ) π(t) = 1 that assign to each closed term t ∈ T(Σ) its respective probability π(t). By ∆(T(Σ)) we denote the set of all probability distributions on T(Σ). We let π range over ∆(T(Σ)). The probability mass of T ⊆ T(Σ) in π is defined by π(T ) = P i.e., δt (t) = 1 and δt (t′ ) = 0 if t and t′ are t∈T π(t). Let δt for t ∈ T(Σ) denote the Dirac distribution, P syntactically not equal. The convex combination i∈I qi πi of a family {πi }i∈I of probability distributions P P P πi ∈ ∆(T(Σ)) with qi ∈ (0, 1] and i∈I qi = 1 is defined by ( i∈I qi πi )(t) = i∈I (qi πi (t)). By f (π1 , . . . , πr( f ) ) Qr( f ) we denote the distribution defined by f (π1 , . . . , πr( f ) )( f (t1 , . . . , tr( f ) )) = i=1 πi (ti ). We may write π1 f π2 for f (π1 , π2 ). In order to describe probabilistic behavior, we need expressions that denote probability distributions. We assume an infinite set of distribution variables Vd . We let µ range over Vd , and x, y range over V = Vs ∪ Vd . The set of distribution terms over state variables V s ⊆ Vs and distribution variables D. Gebler & S. Tini 65 Vd ⊆ Vd , notation T (Γ, V s , Vd ) with Γ denoting the signature extending Σ by operators to describe disP tributions, is the least set satisfying: (i) Vd ∪ {δ(t) | t ∈ T(Σ, V s )} ⊆ T(Γ, V s , Vd ), (ii) i∈I qi θi ∈ T(Γ, V s , Vd ) P if θi ∈ T(Γ, V s , Vd ) and qi ∈ (0, 1] with i∈I qi = 1, and (iii) f (θ1 , . . . , θr( f ) ) ∈ T(Γ, V s , Vd ) if f ∈ Σ and θi ∈ T(Γ, V s , Vd ). A distribution variable µ ∈ Vd is a variable that takes values from ∆(T(Σ)). An instantiable Dirac distribution δ(t) is an expression that takes as value the Dirac distribution δt′ when variables in t are substituted so that t becomes the closed term t′ . Case (ii) allows to construct convex combinations of distributions. We write θ1 ⊕q θ2 for qθ1 + (1 − q)θ2 . Case (iii) lifts the structural inductive construction of state terms to distribution terms. T(Γ) denotes T (Γ, Vs , Vd ). Var(θ) denotes the set of all state and distribution variables in θ. A substitution is a mapping σ : V → T(Σ) ∪ T(Γ) such that σ(x) ∈ T(Σ) if x ∈ Vs , and σ(µ) ∈ T(Γ) if µ ∈ Vd . A substitution extends to a mapping from state terms to state terms as usual. A substituP P tion extends to distribution terms by σ(δ(t)) = δσ(t) , σ( i∈I qi θi ) = i∈I qi σ(θi ) and σ( f (θ1 , . . . , θr( f ) )) = f (σ(θ1 ), . . . , σ(θr( f ) )). Notice that closed instances of distribution terms are probability distributions. Probabilistic transition systems generalize labelled transition systems (LTSs) by allowing for probabilistic choices in the transitions. We consider nondeterministic probabilistic LTSs (Segala-type systems) [30] with countable state spaces. Definition 1 (PTS) A nondeterministic probabilistic labeled transition system (PTS) is given by a triple − where Σ is a signature, A is a countable set of actions, and → − ⊆ T(Σ) × A × ∆(T(Σ)) is a (T(Σ), A,→), transition relation. a a a We write t − → π for (t, a, π) ∈ →, − and t − → if t − → π for some π ∈ ∆(T(Σ)). 2.2 Specification of Probabilistic Transition Systems We specify PTSs by SOS rules of the probabilistic GSOS format [3] and adapt from [29] the language to describe distributions. We do not consider quantitative premises because they are incompatible1 with compositional approximate reasoning. Definition 2 (PGSOS rule) A PGSOS rule has the form: ai,m {xi −−−→ µi,m | i ∈ I, m ∈ Mi } bi,n 6 | i ∈ I, n ∈ Ni } {xi −−−→ a f (x1 , . . . , xr( f ) ) − →θ with I = {1, . . . , r( f )} the indices of the arguments of operator f ∈ Σ, finite index sets Mi , Ni , actions ai,m , bi,n , a ∈ A, state variables xi ∈ Vs , distribution variables µi,m ∈ Vd , distribution term θ ∈ T(Γ), and constraints: 1. all µi,m for i ∈ I, m ∈ Mi are pairwise different; 2. all x1 , . . . , xr( f ) are pairwise different; 3. Var(θ) ⊆ {µi,m | i ∈ I, m ∈ Mi } ∪ {x1 . . . , xr( f ) }. ai,m bi,n 6 ) above the line are called positive (resp. negative) premises. The expressions xi −−−→ µi,m (resp. xi −−−→ ai,m We call µi,m in xi −−−→ µi,m a derivative of xi . We denote the set of positive (resp. negative) premises a of rule r by pprem(r) (resp. nprem(r)). The expression f (x1 , . . . , xr( f ) ) − → θ below the line is called the 1 Cases 8 and 9 in [24] show that rules with quantitative premises may define operators that are not compositional wrt. approximate bisimilarity. The same holds for metric bisimilarity. Characterization of Compositionality Properties of Probabilistic Process Combinators 66 conclusion, notation conc(r), f (x1 , . . . , xr( f ) ) is called the source, notation src(r), the xi are called the source variables, notation xi ∈ src(r), and θ is called the target, notation trgt(r). A probabilistic transition system specification (PTSS) in PGSOS format is a triple P = (Σ, A, R), where Σ is a signature, A is a countable set of actions and R is a countable set of PGSOS rules. R f is the set of those rules of R with source f (x1 , . . . , xr( f ) ). A supported model of P is a PTS (T(Σ), A,→) − a such that t − → π ∈→ − iff for some rule r ∈ R and some closed substitution σ all premises of r hold, i.e. ai,m bi,n ai,m 6 ∈ nprem(r) we have − and for all xi −−−→ for all xi −−−→ µi,m ∈ pprem(r) we have σ(xi ) −−−→ σ(µi,m ) ∈ → bi,n a σ(xi ) −−−→ π < → − for all π ∈ ∆(T(Σ)), and the conclusion conc(r) = f (x1 , . . . , xr( f ) ) − → θ instantiates to σ( f (x1 , . . . , xr( f ) )) = t and σ(θ) = π. Each PGSOS PTSS has exactly one supported model [2, 5] which is moreover finitely branching. 2.3 Bisimulation metric on Probabilistic Transition Systems Behavioral pseudometrics are the quantitative analogue to behavioral equivalences and formalize the notion of behavioral distance between processes. A 1-bounded pseudometric is a function d : T(Σ) × T(Σ) → [0, 1] with (i) d(t, t) = 0, (ii) d(t, t′ ) = d(t′ , t), and (iii) d(t, t′ ) ≤ d(t, t′′ ) + d(t′′ , t′ ), for all terms t, t′ , t′′ ∈ T(Σ). We define now bisimulation metrics as quantitative analogue to bisimulation equivalences. Like for bisimulation we need to lift the behavioral pseudometric on states T(Σ) to distributions ∆(T(Σ)) and sets of distributions P(∆(T(Σ))). A matching ω ∈ ∆(T(Σ) × T(Σ)) for (π, π′ ) ∈ ∆(T(Σ)) × ∆(T(Σ)) is given if P P ′ ′ ′ ′ ′ t∈T(Σ) ω(t, t ) = π (t ) for all t, t ∈ T(Σ). We denote the set of all matchings t′ ∈T(Σ) ω(t, t ) = π(t) and ′ ′ for (π, π ) by Ω(π, π ). The Kantorovich pseudometric K(d) : ∆(T(Σ)) × ∆(T(Σ)) → [0, 1] is defined for a pseudometric d : T(Σ) × T(Σ) → [0, 1] by X d(t, t′ ) · ω(t, t′ ) K(d)(π, π′ ) = min ′ ω∈Ω(π,π ) t,t′ ∈T(Σ) for π, π′ ∈ ∆(T(Σ)). The Hausdorff pseudometric H(d̂) : P(∆(T(Σ))) × P(∆(T(Σ))) → [0, 1] is defined for a pseudometric d̂ : ∆(T(Σ)) × ∆(T(Σ)) → [0, 1] by ( ) H(d̂)(Π1 , Π2 ) = max sup inf d̂(π1 , π2 ), sup inf d̂(π2 , π1 ) π1 ∈Π1 π2 ∈Π2 π2 ∈Π2 π1 ∈Π1 for Π1 , Π2 ⊆ ∆(T(Σ)) whereby inf ∅ = 1 and sup ∅ = 0. A bisimulation metric is a pseudometric on states such that for two states each transition from one state can be mimicked by a transition from the other state and the distance between the target distributions does not exceed the distance of the source states. Definition 3 (Bisimulation metric) A 1-bounded pseudometric d on T(Σ) is a bisimulation metric if for a a all t, t′ ∈ T(Σ) with d(t, t′ ) < 1, if t − → π′ with K(d)(π, π′ ) ≤ d(t, t′ ). → π then there exists a transition t′ − We order bisimulation metrics d1 ⊑ d2 iff d1 (t, t′ ) ≤ d2 (t, t′ ) for all t, t′ ∈ T(Σ). The smallest bisimulation metric, notation d, is called bisimilarity metric and assigns to each pair of processes the least possible distance. We call the bisimilarity metric distance also bisimulation distance. Bisimilarity equivalence [28, 30] is the kernel of the bisimilarity metric [13], i.e. d(t, t′ ) = 0 iff t and t′ are bisimilar. We say that processes t and t′ do not totally disagree if d(t, t′ ) < 1. D. Gebler & S. Tini 67 a a → for all a ∈ A, i.e. t and t′ Remark 1 Let t, t′ be processes that do not totally disagree. Then t − → iff t′ − agree on the actions they can perform immediately. Bisimulation metrics can alternatively be defined as prefixed points of a monotone function. Let ([0, 1]T(Σ)×T(Σ) , ⊑) be the complete lattice defined by d ⊑ d′ iff d(t, t′ ) ≤ d′ (t, t′ ), for all t, t′ ∈ T(Σ). We define the function B : [0, 1]T(Σ)×T(Σ) → [0, 1]T(Σ)×T(Σ) for d : T(Σ) × T(Σ) → [0, 1] and t, t′ ∈ T(Σ) by:  B(d)(t, t′ ) = sup H(K(d))(der(t, a), der(t′ , a)) a∈A a with der(t, a) = {π | t − → π}. Proposition 1 ([13]) The bisimilarity metric d is the least fixed point of B. 3 Denotational model We develop now a denotational model for open terms. Essentially, the denotation of an open term t describes for each variable in t how many copies are spawned while t evolves. The denotation of t allows us to formulate an upper bound on the bisimulation distance between closed instances of t. In this section we consider a concrete process algebra. In the next section we generalize our method to arbitrary PGSOS specifications. Let ΣPA be the signature of the core operators of the probabilistic process algebra in [10] defined by the stop process 0, a family of n-ary prefix operators a.([q1 ] ⊕ · · · ⊕ [qn ] ) with a ∈ A, n ≥ 1, q1 , . . . , qn ∈ Pn (0, 1] and Ln i=1 qi = 1, alternative composition + , and parallel composition kB for each B ⊆ A. We write a. i=1 [qi ] for a.([q1 ] ⊕ · · · ⊕ [qn ] ), and a. for a.[1] (deterministic prefix operator). Moreover, we write k for kA (synchronous parallel composition). The PTSS PPA = (ΣPA , A, RPA ) is given by the following PGSOS rules in RPA : a a x2 − → µ2 x1 − → µ1 a. n M a [qi ]xi − → i=1 a x1 − → µ1 n X a qi δ(xi ) x1 + x2 − → µ1 a x1 + x2 − → µ2 i=1 a x2 − → µ2 a (a ∈ B) x1 kB x2 − → µ1 k B µ2 a x1 − → µ1 a (a < B) x1 kB x2 − → µ1 kB δ(x2 ) a x2 − → µ2 (a < B) a x1 kB x2 − → δ(x1 ) kB µ2 We call the open terms T(ΣPA ) nondeterministic probabilistic process terms. We define two important subclasses of T(ΣPA ) that allow for a simpler approximation of the distance of their closed instances. Let Tdet (ΣPA ) be the set of deterministic process terms, which are those terms of T(ΣPA ) that are built exclusively from the stop process 0, deterministic prefix a. , and synchronous parallel composition k (no nondeterministic and no probabilistic choices). We call the open terms Tdet (ΣPA ) deterministic because all probabilistic or nondeterministic choices in the operational semantics of the closed instances σ(t), with σ : Vs → T(ΣPA ) any closed substitution, arise exclusively from the processes in σ. Let Tprob (ΣPA ) be the set of probabilistic process terms, L which are those terms of T(ΣPA ) that are built exclusively from n the stop process 0, probabilistic prefix a. i=1 [qi ] , and synchronous parallel composition k (no nondeterministic choices). Again, all nondeterministic choices in σ(t) arise exclusively from the processes in σ. 68 Characterization of Compositionality Properties of Probabilistic Process Combinators The denotation of a deterministic process term t ∈ Tdet (ΣPA ) is a mapping m : V → N∞ that describes for each process variable x ∈ Var(t) how many copies of x or some derivative of x are spawned while t evolves. We call m the multiplicity of t. Let M be the set of all mappings V → N∞ . The denotation of t, notation ~tM , is defined by ~0M (x) = 0, ~xM (x) = 1, ~xM (y) = 0 if x , y, ~t1 k t2 M (x) = ~t1 M (x) + ~t2 M (x), and ~a.t′ M (x) = ~t′ M (x). We use notation 0 ∈ M for the multiplicity that assigns 0 to each x ∈ V, and nV ∈ M with V ⊆ V for the multiplicity such that nV (x) = n if x ∈ V and nV (x) = 0 if x < V. We write nx for n{x} . As it will become clear in the next sections, we need the denotation m(x) = ∞ for (unbounded) recursion and replication. We will approximate the bisimulation distance between σ1 (t) and σ2 (t) for closed substitutions σ1 , σ2 using the denotation of t and the bisimulation distances between processes σ1 (x) and σ2 (x) of variables x ∈ Var(t). The bisimulation distance of variables is represented by a mapping e : V → [0, 1). We call e a process distance. Let E be the set of all process distances V → [0, 1). We henceforth assume closed substitutions σ1 , σ2 with a bisimulation distance between σ1 (x) and σ2 (x) that is strictly less than 1. Practically, this is a very mild restriction because for any (non-trivial) process combinator the composition of processes that totally disagree (i.e. which are in bisimulation distance 1) may lead to composed processes that again totally disagree. For any d : T(Σ) × T(Σ) → [0, 1] and any closed substitutions σ1 , σ2 we define the associated process distance d(σ1 , σ2 ) ∈ E by d(σ1 , σ2 )(x) = d(σ1 (x), σ2 (x)). Definition 4 For a multiplicity m ∈ M and process distance e ∈ E we define the deterministic distance approximation from above as Y (1 − e(x))m(x) D(m, e) = 1 − x∈V To understand the functional D remind that e(x) is the distance between processes σ1 (x) and σ2 (x). In other words, processes σ1 (x) and σ2 (x) disagree by e(x) on their behavior. Hence, σ1 (x) and σ2 (x) agree Q by 1 − e(x). Thus, m(x) copies of σ1 (x) and m(x) copies of σ2 (x) agree by at least x∈V (1 − e(x))m(x) , Q and disagree by at most 1 − x∈V (1 − e(x))m(x) . Example 1 Consider the deterministic process term t = x k x and substitutions σ1 (x) = a.a.0 and σ2 (x) = a.([0.9]a.0 ⊕ [0.1]0). In this and all following examples we assume that σ1 and σ2 coincide on all other variables for which the substitution is not explicitly defined, i.e. σ1 (y) = σ2 (y) if x , y in this example. It is clear that d(σ1 (x), σ2 (x)) = 0.1. Then, d(σ1 (t), σ2 (t)) = 0.1 · 0.9 + 0.9 · 0.1 + 0.1 · 0.1 = 0.19, which is the likelihood that either the first, the second or both arguments of σ2 (x k x) can perform action a only once. The denotation of t is ~tM (x) = 2. Then, D(~tM , d(σ1 , σ2 )) = 1 − (1 − 0.1)2 = 0.19. The functional D defines an upper bound on the bisimulation distance of deterministic processes. Proposition 2 Let t ∈ Tdet (ΣPA ) be a deterministic process term and σ1 , σ2 be closed substitutions. Then d(σ1 (t), σ2 (t)) ≤ D(~tM , d(σ1 , σ2 )). The distance d(σ1 , σ2 ) abstracts from the concrete reactive behavior of terms σ1 (x) and σ2 (x). It is not hard to see that for deterministic process terms without parallel composition the approximation functional D gives the exact bisimulation distance. However, the parallel composition of processes may lead to an overapproximation if the bisimulation distance of process instances arises (at least partially) from reactive behavior on which the processes cannot synchronize. Example 2 Consider t = x k a.a.0 and substitutions σ1 (x) = a.b.0 and σ2 (x) = a.([0.9]b.0 ⊕ [0.1]0) with d(σ1 (x), σ2 (x)) = 0.1. We have d(σ1 (t), σ2 (t)) = 0 since both σ1 (t) and σ2 (t) make an a move to a distribution of parallel compositions either b.0 k a.0 or 0 k a.0 that all cannot proceed. Note that the bisimulation distance between σ1 (x) and σ2 (x) arises from the difference on performing action b which cannot D. Gebler & S. Tini 69 synchronize with a. The denotation of t is ~tM (x) = 1 which gives in this case an overapproximation of the distance d(σ1 (t), σ2 (t)) = 0 < D(~tM , d(σ1 , σ2 )) = 1 − (1 − 0.1) = 0.1. However, for σ′1 (x) = a.a.0 and σ′2 (x) = a.([0.9]a.0 ⊕ [0.1]0) with d(σ′1 (x), σ′2 (x)) = 0.1 we get d(σ′1 (t), σ′2 (t)) = 0.1 = D(~tM , d(σ′1 , σ′2 )). We remark that the abstraction of the closed substitutions to process distances is intentional and very much in line with common compositionality criteria that relate the distance of composed processes with the distance of the process components. The denotation of a probabilistic process term t ∈ Tprob (ΣPA ) is a distribution p ∈ ∆(M) that describes for each multiplicity m ∈ M the likelihood p(m) that for each process variable x ∈ Var(t) exactly m(x) copies of x or some derivative of x are spawned while t evolves. We call p the probabilistic multiplicity of t. Let P be the set of all distributions ∆(M). The denotation of t, notation ~tP , is defined by P ~0P = δm with m = 0, ~xP = δm with m = 1x , ~t1 k t2 P (m) = ~t1 P (m1 ) · ~t2 P (m2 ), and m1 ,m2 ∈M m(x)=m1 (x)+m2 (x) for all x∈V Ln P ~a. i=1 [qi ]ti P = ni=1 qi ~ti P . Notice that ~tP = δ~tM for all t ∈ Tdet (ΣPA ). For important probabilistic multiplicities we use the same symbols as for multiplicities but it will always be clear from the context if we refer to probabilistic multiplicities or multiplicities. By 0 ∈ P we mean the probabilistic multiplicity that gives probability 1 to the multiplicity 0 ∈ M. By nV ∈ P we mean the probabilistic multiplicity that gives probability 1 to the multiplicity nV ∈ M. Definition 5 For a probabilistic multiplicity p ∈ P and process distance e ∈ E we define the probabilistic distance approximation from above as X p(m) · D(m, e) P(p, e) = m∈M Example 3 Consider t = a.([0.5](x k x)⊕[0.5]0) and substitutions σ1 (x) = a.a.0 and σ2 (x) = a.([0.9]a.0⊕ [0.1]0) with d(σ1 (x), σ2 (x)) = 0.1. It holds that d(σ1 (t), σ2 (t)) = 0.5(1 − (1 − 0.1)2 ). The probabilistic multiplicity of t is ~tP (2x ) = 0.5 and ~tP (0) = 0.5. Then, D(2x , d(σ1 , σ2 )) = 1 − (1 − 0.1)2 and D(0, d(σ1 , σ2 )) = 0. Hence, we get the probabilistic distance approximation P(~tP , d(σ1 , σ2 )) = 0.5(1 − (1 − 0.1)2 ). Remark 2 The functional P shows a very important interaction between probabilistic choice and process replication. Consider again the process term t = a.([0.5](x k x) ⊕ [0.5]0) and any closed substitutions σ1 , σ2 with d(σ1 (x), σ2 (x)) = ǫ for any ǫ ∈ [0, 1). In the probabilistic distance approximation P(~tP , d(σ1 , σ2 )) the deterministic distance approximation D(2x , d(σ1 , σ2 )) = 1 − (1 − ǫ)2 of the synchronous parallel execution x k x of two instances of x is weighted by the likelihood 0.5 of its realization. Hence, P(~tP , d(σ1 , σ2 )) = 0.5(1 − (1 − ǫ)2 ). From Bernoulli’s inequality m1 (1 − (1 − ǫ)n ) ≤ ǫ if m ≥ n, we get 0.5(1 − (1 − ǫ)2 ) ≤ ǫ. Hence, the distance between instances of two copies running synchronously in parallel with a probability of 0.5 is at most the distance between those instances running (non-replicated) with a probability of 1.0. Notice that P(~tP , d(σ1 , σ2 )) = D(~tM , d(σ1 , σ2 )) for all t ∈ Tdet (ΣPA ). The functional P defines an upper bound on the bisimulation distance of probabilistic processes. Proposition 3 Let t ∈ Tprob (ΣPA ) be a probabilistic process term and σ1 , σ2 be closed substitutions. Then d(σ1 (t), σ2 (t)) ≤ P(~tP , d(σ1 , σ2 )). Before we can introduce the denotation of nondeterministic probabilistic processes, we need to orP der the denotation of probabilistic processes. Let π : M → [0, 1] with m∈M π(m) ≤ 1 be a subdistribution over multiplicities. We define the weighting of π as a mapping π : V → R≥0 defined π(x) = 70 Characterization of Compositionality Properties of Probabilistic Process Combinators P P (1/|π|) m∈M π(m) · m(x) if |π| > 0, with |π| = m∈M π(m) the size of π, and π(x) = 0 if |π| = 0. Intuitively, the number of process copies m(x) are weighted by the probability π(m) of realization of that multiplicity. We order probabilistic multiplicities p1 ⊑ p2 if p1 can be decomposed into subdistributions such that each multiplicity in p2 is above some weighted subdistribution of p1 . The order is now defined by: p1 ⊑ p2 iff there is a ω ∈ Ω(p1 , p2 ) with ω(·, m) ⊑ m for all m ∈ M m1 ⊑ m2 iff m1 (x) ≤ m2 (x) for all x ∈ V The denotation of a nondeterministic probabilistic process term t ∈ T(ΣPA ) is a set of probabilistic multiplicities P ⊆ P that describes by p ∈ P some resolution of the nondeterministic choices in t such that the process evolves as a probabilistic process described by p. We construct a Hoare powerdomain over the probabilistic multiplicities P and use as canonical representation for any set of probabilistic multiplicities P ⊆ P the downward closure defined as ↓ P = {p ∈ P | p ⊑ p′ for some p′ ∈ P}. Let D be the set of non-empty downward closed sets of probabilistic multiplicities {P ⊆ P | P , ∅ and ↓ P = P}. We use downward closed sets such that D will form a complete lattice with the order defined below (esp. satisfies antisymmetry, cf. Proposition 4). The denotation of t, notation ~t, is defined by ~0 = {~0P }, ~x = ↓ {~xP }, p ∈ ~t1 kB t2  iff there are p1 ∈ ~t1  and p2 ∈L ~t2  such that p ⊑ p′ with p′ defined by P n ′ p (m) = p1 (m1 ) · p2 (m2 ) for all m ∈ M, p ∈ ~a. i=1 [qi ]ti  iff there are pi ∈ ~ti  such that m1 ,m2 ∈M m(x)=m1 (x)+m2 (x) for all x∈V P p ⊑ p′ with p′ defined by p′ = ni=1 qi · pi , and ~t1 + t2  = ~t1  ∪ ~t2 . Notice that ~t = ↓ {~tP } for all t ∈ Tprob (ΣPA ). By 0 ∈ D we mean the singleton set containing the probabilistic multiplicity 0 ∈ P, and by nV ∈ D the downward closure of the singleton set with element nV ∈ P. Definition 6 For a nondeterministic probabilistic multiplicity P ∈ D and process distance e ∈ E we define the nondeterministic probabilistic distance approximation from above as A(P, e) = sup P(p, e) p∈P Example 4 Consider the nondeterministic probabilistic process term t = a.([0.5](x k x) ⊕ [0.5]0) + b.y, and substitutions σ1 (x) = a.a.0, σ2 (x) = a.([0.9]a.0 ⊕ [0.1]0) and σ1 (y) = b.b.0, σ2 (y) = b.([0.8]b.0 ⊕ [0.2]0). It is clear that d(σ1 (x), σ2 (x)) = 0.1 and d(σ1 (y), σ2 (y)) = 0.2. Now, d(σ1 (t), σ2 (t)) = max{0.5(1− (1 − 0.1)2 ), 0.2}. The nondeterministic probabilistic multiplicity of t is ~t = ↓ {p1 , p2 }, for p1 (2x ) = 0.5, p1 (0) = 0.5 and p2 (1y ) = 1.0. Thus A(~t, d(σ1 , σ2 )) = max(P(p1 , d(σ1 , σ2 )), P(p2 , d(σ1 , σ2 ))) = max(0.5(1 − (1 − 0.1)2 ), 0.2). Notice that A(~t, d(σ1 , σ2 )) = P(~tP , d(σ1 , σ2 )) for all t ∈ Tprob (ΣPA ). Moreover, A(P, e) = A(↓ P, e) for any P ⊆ P. The functional A defines an upper bound on the bisimulation distance of nondeterministic probabilistic process terms. Theorem 1 Let t ∈ T(ΣPA ) be a nondeterministic probabilistic process term and σ1 , σ2 be closed substitutions. Then d(σ1 (t), σ2 (t)) ≤ A(~t, d(σ1 , σ2 )). Theorem 1 shows that the denotation of a process term is adequate to define an upper bound on the distance of closed instances of that process term. The converse notion is full-abstraction in the sense that d(σ1 (t), σ2 (t)) = A(~P, d(σ1 , σ2 )) (no over-approximation). As demonstrated in Example 2, the approximation functionals would require for process variables x ∈ Var(t) besides the bisimulation distance between σ1 (x) and σ2 (x) also information about the reactive behavior and the branching. However, for our objective to study the distance of composed processes in relation to the distance of its components, the bisimulation distance is the right level of abstraction. D. Gebler & S. Tini 71 We introduce now an order on D that ensures monotonicity of both the approximation functional A and the functional F introduced in the next section to compute the denotation of arbitrary terms of a PGSOS PTSS. The order is defined by P1 ⊑ P2 iff for all p1 ∈ P1 there is a p2 ∈ P2 such that p1 ⊑ p2 . Proposition 4 (D, ⊑) is a complete lattice. We order process distances by e1 ⊑ e2 iff e1 (x) ≤ e2 (x) for all x ∈ V. The nondeterministic probabilistic distance approximation A is monotone in both arguments. Proposition 5 Let P, P′ ∈ D and e, e′ ∈ E. Then A(P, e) ≤ A(P′ , e) if P ⊑ P′ , and A(P, e) ≤ A(P, e′ ) if e ⊑ e′ . We will see in the following section that the denotations developed for terms of PPA are sufficient for terms of any PGSOS PTSS. 4 Distance of composed processes Now we provide a method to determine the denotation of an arbitrary term. In line with the former section this gives an upper bound on the bisimulation distance of closed instances of that term. In particular, the denotation for the term f (x1 , . . . , xr( f ) ) gives an upper bound on the distance of processes composed by the process combinator f . This allows us in the next section to formulate a simple condition to decide if a process combinator is uniformly continuous, and hence if we can reason compositionally over processes combined by that process combinator. 4.1 Operations on process denotations We start by defining two operations on process denotations that allow us to compute the denotation of process terms by induction over the term structure. We define the operations first on M and then lift them to D. The composition of two processes t1 and t2 which both proceed requires that their multiplicities are summed up (cf. parallel composition in the prior section). We define the summation of multiplicities by: (m1 ⊕ m2 )(x) = m1 (x) + m2 (x) In order to define by structural induction the multiplicity of a term f (t1 , . . . , tr( f ) ), we need an operation that composes the multiplicity denoting the operator f with the multiplicity of ti . We define the pointed multiplication of multiplicities with respect to variable y ∈ V by: (m1 ⊙y m2 )(x) = m1 (y) · m2 (x) Then, the multiplicity of a state term f (t1 , . . . , tr( f ) ) is given by: r( f )  M  ~ f (t1 , . . . , tr( f ) )M = ~ f (x1 , . . . , xr( f ) )M ⊙ xi ~ti M i=1 Example 5 Consider the open term t = a.x k y. From Section 3 we get ~a.xM = 1x , ~yM = 1y and ~x1 k x2 M = 1{x1 ,x2 } . Then, we have ~tM = (~x1 k x2 M ⊙ x1 ~a.xM ) ⊕ (~x1 k x2 M ⊙ x2 ~yM ) = ((1x1 ⊕ 1x2 ) ⊙ x1 1x ) ⊕ ((1x1 ⊕ 1x2 ) ⊙ x2 1y ) = 1{x,y} . Characterization of Compositionality Properties of Probabilistic Process Combinators 72 It remains to define the multiplicity of f (x1 , . . . , xr( f ) ) for operators f with an operational semantics defined by some rule r. We define the multiplicity of f (x1 , . . . , xr( f ) ) in terms of the multiplicity of the target of r. Let µ be a derivative of the source variable x in rule r. We use the property (m ⊙µ 1x )(x) = m(µ) in order to express the multiplicity m(µ) as a multiplicity of x. Then, the multiplicity of f (x1 , . . . , xr( f ) ) is defined for any variable x as the summation of the multiplicity of x and its derivatives in the rule target: ! M ~trgt(r)M ⊙µi,m 1xi ~trgt(r)M ⊕ ai,m xi −−−→µi,m ∈ pprem(r) Example 6 Consider t = f (x) and the following rule r: a x− →µ a f (x) − →µkµ The operator f mimics the action a of its argument, replicates the derivative µ, and proceeds as a process that runs two instances of the derivative in parallel. Consider again the closed substitutions σ1 (x) = a.a.0 and σ2 (x) = a.([0.9]a.0 ⊕ [0.1]0) with d(σ1 (x), σ2 (x)) = 0.1. Then, d(σ1 (t), σ2 (t)) = 1 − (1 − 0.1)2 . The denotation of the target of r is ~trgt(r)M = 2µ . Hence, the denotation of t is 2µ ⊕ (2µ ⊙µ 1x ) = 2{µ,x} . Thus, D(~tM , d(σ1 , σ2 )) = 1 − (1 − 0.1)2 by d(σ1 , σ2 )(x) = 0.1 and d(σ1 , σ2 )(µ) = 0. Operations op ∈ {⊕, ⊙y } over M lift to D by X (p1 op p2 )(m) = p1 (m1 ) · p2 (m2 ) m1 ,m2 ∈M m=m1 op m2 p ∈ (P1 op P2 ) iff ∃p1 ∈ P and p2 ∈ P2 such that p ⊑ p1 op p2 4.2 Approximating the distance of composed processes Let (Σ, A, R) be any PGSOS PTSS. We compute the denotation of terms and rules as least fixed point of a monotone function. Let S = S T × S R with S T = T(Σ) ∪ T(Γ) → D and S R = R → D. A pair (τ, ρ) ∈ S assigns to each term t ∈ T(Σ) ∪ T(Γ) its denotation τ(t) ∈ D and to each rule r ∈ R its denotation ρ(r) ∈ D. Let S = (S , ⊑) be a poset with ordering (τ, ρ) ⊑ (τ′ , ρ′ ) iff τ(t) ⊑ τ′ (t) and ρ(r) ⊑ ρ′ (r) for all t ∈ T(Σ) ∪ T(Γ) and r ∈ R. S forms a complete lattice with least element (⊥T , ⊥R ) defined by ⊥T (t) = ⊥R (r) = 0 for all t ∈ T(Σ) ∪ T(Γ) and r ∈ R. Proposition 6 S is a complete lattice. We assume that for all rules r ∈ R the source variable of argument i is called xi . Let Xr be the set of source variables xi for which r tests the reactive behavior, i.e. xi ∈ Xr iff r has either some positive ai,m bi,n 6 . premise xi −−−→ µi,m or some negative premise xi −−−→ The mapping F : S → S defined in Figure 1 computes iteratively the nondeterministic probabilistic multiplicities for all terms and rules. As expected, the denotation of a state term f (t1 , . . . , tr( f ) ) is defined as the application of all rules R f to the denotation of the arguments. However, for distribution terms the application of the operator needs to consider two peculiarities. First, different states in the support of a distribution term f (θ1 , . . . , θr( f ) ) may evolve according to different rules of R f . D. Gebler & S. Tini 73 Function F : S → S is defined by F(τ, ρ) = (τ′ , ρ′ ) with   1x if t = x         t = f (t1 , . . . , tr( f ) ) M r( f ) ′ [ τ (t) =      ρ f ⊙ xi τ(ti ) if  ρ f =  ρ(r)      i=1 r∈R f    1µ if θ = µ          τ(t) if θ = δ(t)     X X      q · τ(θ ) if θ = qi θi i i  τ′ (θ) =   i∈I i∈I         θ = f (θ1 , . . . , θr( f ) )  r( f )  M              if  ρ f ⊙ xi τ(θi )       sup(sup ρ(r), 1 ) sup ρ = ↓   X f  r     i=1   r∈R f ) (  M  p ⊙µi,m 1xi | p ∈ τ(trgt(r)) ρ′ (r) = p ⊕ ai,m xi −−−→µi,m ∈ pprem(r) Figure 1: Computation of the denotation of arbitrary terms Example 7 Consider the operator f defined by the following rule: a x− →µ a f (x) − → µ+µ Operator f replicates the derivative of x and evolves as alternative composition of both process copies. Consider the closed substitutions σ1 (x) = a.([0.9]a.a.0 ⊕ [0.1]0) and σ2 (x) = a.([0.9]a.0 ⊕ [0.1]0) with d(σ1 (x), σ2 (x)) = 0.9. Then, d(σ1 ( f (x)), σ2 ( f (x))) = 1 − 0.12 = 0.99. The denotations for the two rules defining the alternative composition (see Section 3) are the downward closed sets with maximal elements 1{x1 ,µ1 } and 1{x2 ,µ2 } . Since sup 1{x1 ,µ1 } = 1{x1 ,µ1 } ∈ P, sup 1{x2 ,µ2 } = 1{x2 ,µ2 } ∈ P and 1Xr+ = {x1 }, 1 1Xr+ = {x2 } we get ρ+ = ↓ {sup(1{x1 ,µ1 } , 1{x2 ,µ2 } )} = 1{x1 ,x2 ,µ1 ,µ2 } ∈ D. Hence, the denotation for the tar2 get of the f -defining rule is ~µ + µ = (1{x1 ,x2 ,µ1 ,µ2 } ⊙ x1 1µ ) ⊕ (1{x1 ,x2 ,µ1 ,µ2 } ⊙ x2 1µ ) = 2µ . Thus, ~ f (x) = 2x . Then, D(2x , d(σ1 , σ2 )) = 0.99. Second, in the distribution term f (θ1 , . . . , θr( f ) ) the operator f may discriminate states in derivatives belonging to θi solely on the basis that in some rule r ∈ R f the argument xi ∈ Xr gets tested on the ability to perform or not perform some action. Example 8 Consider the operators f and g defined by the following rules: a x− →µ a f (x) − → g(µ) a y− → µ′ a g(y) − → δ(0) Operator f mimics the first move of its argument and then, by operator g, only tests the states in the derivative for their ability to perform action a. Consider first operator g. We get d(σ1 (g(y)), σ2 (g(y))) = 0 74 Characterization of Compositionality Properties of Probabilistic Process Combinators for all closed substitutions σ1 , σ2 . Clearly, ~g(y) = 0. Consider now t = f (x) and substitutions σ1 (x) = a.a.0 and σ2 (x) = a.([0.9]a.0 ⊕ [0.1]0) with d(σ1 (x), σ2 (x)) = 0.1. The distance between σ1 ( f (x)) and σ2 ( f (x)) is the distance between distributions δg(a.0) and 0.9δg(a.0) + 0.1δg(0) . From d(g(a.0), g(0)) = 1 we get d( f (σ1 (x)), f (σ2 (x))) = K(d)(δg(a.0) , 0.9δg(a.0) + 0.1δg(0) ) = 0.1. If we would ignore that g tests its argument on the reactive behavior, then the denotation of g(µ) would be ~g(µ) = ~g(x) ⊙ x 1µ = 0, and the denotation of f (x) would be ~g(µ) ⊕ (~g(µ) ⊙µ 1x ) = 0. Then D(0, d(σ1 , σ2 )) = 0 < 0.1 = d( f (σ1 (x)), f (σ2 (x))). Because the operator g tests its argument on the ability to perform action a, it can discriminate instances of the derivative µ the same way as if the process would progress (without replication). Thus, the denotation of operator g if applied in the rule target is ρg = ↓ {sup(sup 0, 1Xrg )} = 1x as Xrg = {x}. Hence, ~g(µ) = ρg ⊙ x 1µ = 1µ . Thus, ~ f (x) = 1x . It follows, d( f (σ1 (x)), f (σ2 (x))) ≤ D(~ f (x), d(σ1 , σ2 )) = 0.1. To summarize Examples 7 and 8: The nondeterministic probabilistic multiplicity for operator f applied to some distribution term is given by ρ f = ↓ {supr∈R f sup(sup ρ(r), 1Xr ))} (Figure 1). We explain this expression stepwise. For any rule r we define by sup ρ(r) ∈ P the least probabilistic multiplicity which covers all nondeterministic choices represented by the probabilistic multiplicities in ρ(r) ∈ D. By sup(sup ρ(r), 1Xr ) ∈ P we capture the case that premises of r only test source variables in Xr on their ability to perform an action (Example 8). By supr∈R f sup(sup ρ(r), 1Xr ) ∈ P we define the least probabilistic multiplicity which covers all choices of rules r ∈ R f (Example 7). Finally, by the downward closure ↓ {supr∈R f sup(sup ρ(r), 1Xr ))} ∈ D we gain the nondeterministic probabilistic multiplicity ρ f that can be applied to the distribution term (Figure 1). Proposition 7 F is order-preserving and upward ω-continuous. From Proposition 6 and 7 and the Knaster-Tarski fixed point theorem we derive the existence and uniqueness of the least fixed point of F. We denote by (ωT , ωR ) the least fixed point of F. We write ~t for ωT (t) and ~tτ for τ(t). We call ~t the canonical denotation of t. It is not hard to verify that all denotations presented in Section 3 for PPA are canonical. A denotation of terms τ ∈ S T is compatible with a distance function d ∈ [0, 1]T(Σ)×T(Σ) , notation d  ~·τ , if d(σ1 (t), σ2 (t)) ≤ A(~tτ , d(σ1 , σ2 )) for all t ∈ T(Σ) and all closed substitutions σ1 , σ2 . Now we can show that the functional B to compute the bisimulation distance and functional F to compute the denotations preserve compatibility (Proposition 8). A simple inductive argument allows then to show that the canonical denotation of terms ~· is compatible with the bisimilarity metric d (Theorem 2). Proposition 8 Let d ∈ [0, 1]T(Σ)×T(Σ) with d ⊑ B(d) = d′ and (τ, ρ) ∈ S with (τ, ρ) ⊑ F(τ, ρ) = (τ′ , ρ′ ). Then d  ~·τ implies d′  ~·τ′ . Theorem 2 Let P be any PGSOS PTSS with d the bisimilarity metric on the associated PTS and ~· the canonical denotation of terms according to P. Then d  ~·. Proof sketch. Remind that d is the least fixed point of B : [0, 1]T(Σ)×T(Σ) → [0, 1]T(Σ)×T(Σ) defined by B(d)(t, t′ ) = supa∈A {H(K(d))(der(t, a), der(t′ , a))} and H the Hausdorff metric functional (Proposition 1). Let dn = Bn (0) and (τn , ρn ) = Fn (⊥T , ⊥R ). Proposition 8 shows that dn  ~·τn by reasoning inductively over the transitions specified by the rules. Monotonicity and upward ω-continuity (Proposition 7) ensures that this property is also preserved in the limit.  5 Compositional Reasoning In order to reason compositionally over probabilistic processes it is enough if the distance of the composed processes can be related to the distance of their parts. This property is known as uniform continuity. D. Gebler & S. Tini 75 In essence, compositional reasoning over probabilistic processes is possible whenever a small variance in the behavior of the parts leads to a bounded small variance in the behavior of the composed processes. Technically this boils down to the existence of a modulus of continuity. Uniform continuity generalizes earlier proposals of non-expansiveness [15] and non-extensiveness [1]. Definition 7 (Modulus of continuity) Let f ∈ Σ be any process combinator. A mapping z : [0, 1]r( f ) → [0, 1] is a modulus of continuity for operator f if z(0, . . . , 0) = 0, z is continuous at (0, . . . , 0), and ′ ′ ′ d( f (t1 , . . . , tr( f ) ), f (t1′ , . . . , tr( f ) )) ≤ z(d(t1 , t1 ), . . . , d(tr( f ) , tr( f ) )) for all closed terms ti , ti′ ∈ T(Σ). Definition 8 (Uniformly continuous operator) A process combinator f ∈ Σ is uniformly continuous if f admits a modulus of continuity. Intuitively, a continuous binary operator f ensures that for any non-zero bisimulation distance ǫ (understood as the admissible tolerance from the operational behavior of the composed process f (t1 , t2 )) there are non-zero bisimulation distances δ1 and δ2 (understood as the admissible tolerances from the operational behavior of the processes t1 and t2 , respectively) such that the distance between the composed processes f (t1 , t2 ) and f (t1′ , t2′ ) is at most ǫ = z(δ1 , δ2 ) whenever the component t1′ (resp. t2′ ) is in distance of at most δ1 from t1 (resp. at most δ2 from t2 ). We consider the uniform notion of continuity because we aim for universal compositionality guarantees. The denotation of f (x1 , . . . , xr( f ) ) allows to derive a candidate for the modulus of continuity for operator f as follows. Definition 9 (Derived modulus of continuity) Let P be any PGSOS PTSS. For any operator f ∈ Σ we define   r( f )  X z f (ǫ1 , . . . , ǫr( f ) ) = min  m f (xi )ǫi , 1 i=1 with m f = sup~ f (x1 , . . . , xr( f ) ). ′ )) ≤ z (d(t , t′ ), . . . , d(t ′ Trivially, we have z f (0, . . . , 0) = 0 and d( f (t1 , . . . , tr( f ) ), f (t1′ , . . . , tr( f 1 1 r( f ) , tr( f ) )) f) for all closed terms ti , ti′ ∈ T(Σ) by Theorem 2. However, z f is continuous at (0, . . . , 0) only if the multiplicities in the denotation ~ f (x1 , . . . , xr( f )  assign to each variable a finite value. Theorem 3 Let P be any PGSOS PTSS. A process combinator f ∈ Σ is uniformly continuous if ~ f (x1 , . . . , xr( f ) ) ⊑ n{x1 ,...,xr( f ) } for some n ∈ N. Example 9 We will show that unbounded recursion operators may be not uniformly continuous. We consider the replication operator of π-calculus specified by the rule: a x− →µ a !x − → µ k δ(!x) The replication operator is not continuous since no z with d(!t, !t′ ) ≤ z(d(t, t′ )) and z(0) = 0 will be continuous at 0 since z(δ) = 1 for any δ > 0. The denotation ~!x = ∞ x shows that the argument x is infinitely often replicated. Hence, the replication operator is not continuous. 76 Characterization of Compositionality Properties of Probabilistic Process Combinators Even more, for uniformly continuous operators f the function z f is a modulus of continuity. Theorem 4 Let P be any PGSOS PTSS. A uniformly continuous process combinator f ∈ Σ satisfies ′ ′ ′ d( f (t1 , . . . , tr( f ) ), f (t1′ , . . . , tr( f ) )) ≤ z f (d(t1 , t1 ), . . . , d(tr( f ) , tr( f ) )) for all closed terms ti , ti′ ∈ T(Σ). In reverse, for a given modulus of continuity (as specification of some process combinator), we can derive the maximal replication of process of this operator. Definition 10 (Derived multiplicity) Let z : [0, 1]n → [0, 1] be a mapping with z(0, . . . , 0) = 0 and z continuous at (0, . . . , 0). Let m : V → R∞ ≥0 be defined by   n   X     ∞ m = sup  m : V → R | ∀e ∈ E. m(x )e(x ) ≤ z(e(x ), . . . , e(x ))  i i 1 n ≥0     i=1 where m1 , m2 : V → R∞ ≥0 are ordered m1 ⊑ m2 iff m1 (x) ≤ m2 (x) for all x ∈ V. We call m the derived multiplicity of z. Theorem 5 Let P be any PGSOS PTSS, z : [0, 1]n → [0, 1] be a mapping with z(0, . . . , 0) = 0 and z continuous at (0, . . . , 0), and m the derived multiplicity of z. Then, an operator f ∈ Σ with r( f ) = n has z as modulus of continuity if sup~ f (x1 , . . . , xr( f ) ) ⊑ m To conclude, the methods provided in Section 3 and 4 to compute an upper bound on the distance between instances of the term f (x1 , . . . , xr( f ) ) can be used to derive the individual compositionality property of operator f given by its the modulus of continuity z f . Note that z f depends on all those rules which define operators of processes to which an instance of f (x1 , . . . , xr( f ) ) may evolve to. Traditional rule formats define syntactic criteria on single rules in order to guarantee a desired compositionality property of the specified operator. In contrast, our approach derives the compositionality property of an operator from the the syntactic properties of those rules which define the operational behavior of processes composed by that operator. 6 Conclusion and Future Work We presented a method to approximate the bisimulation distance of arbitrary process terms (Theorem 1 and 2). This allows to decide for any given PTSS which operators allow for compositional metric reasoning, i.e. which operators are uniformly continuous (Theorem 3). Moreover, our method allows to compute for any given PTSS a modulus of continuity of each uniformly continuous operator (Theorem 4). Additionally, for any given modulus of continuity (understood as the required compositionality property of some operator) we provide a sufficient condition to decide if an operator satisfies the modulus of continuity (Theorem 5). The condition characterizes the maximal number of times that processes combined by the operator may be replicated during their evolution in order to guarantee the modulus of continuity. We will continue this line of research as follows. First, we will investigate the compositionality of process combinators with respect to convex bisimulation metric [12], discounted bisimulation metric [15], and generalized bisimulation metric [8]. Second, we will explore compositionality with respect D. Gebler & S. Tini 77 to behavioral pseudometrics based on trace semantics [11] and testing semantics. Finally, we will investigate how the denotational approach to decide the compositionality properties of operators relates to the logical approach to derive rule formats of [4, 22]. Besides this general line, we want to investigate how our structural syntactic approach to compositionality relates to the algorithmic computational approach in [1]. References [1] Giorgio Bacci, Giovanni Bacci, Kim G Larsen & Radu Mardare (2013): Computing Behavioral Distances, Compositionally. In: Proc. MFCS’13, Springer, pp. 74–85, doi:10.1007/978-3-642-40313-2_9. [2] Falk Bartels (2002): GSOS for probabilistic transition systems. In: Proc. CMCS’02, ENTCS 65, Elsevier, pp. 29–53, doi:10.1016/S1571-0661(04)80358-X. [3] Falk Bartels (2004): On Generalised Coinduction and Probabilistic Specification Formats. Ph.D. thesis, VU University Amsterdam. [4] Bard Bloom, Wan Fokkink & Rob J. van Glabbeek (2004): Precongruence formats for decorated trace semantics. ACM TOCL 5, pp. 26–78, doi:10.1145/963927.963929. [5] Bard Bloom, Sorin Istrail & Albert R. Meyer (1995): Bisimulation can’t be traced. J. ACM 42, pp. 232–268, doi:10.1145/200836.200876. [6] Franck van Breugel & James Worrell (2005): A Behavioural Pseudometric for Probabilistic Transition Systems. TCS 331(1), pp. 115–142, doi:10.1016/j.tcs.2004.09.035. [7] Franck van Breugel & James Worrell (2006): Approximating and computing behavioural distances in probabilistic transition systems. TCS 360(1), pp. 373–385, doi:10.1016/j.tcs.2006.05.021. [8] Konstantinos Chatzikokolakis, Daniel Gebler, Catuscia Palamidessi & Lili Xu: Generalized bisimulation metrics. In: Proc. CONCUR’14, LNCS, Springer, To appear. [9] Pedro R. D’Argenio, Daniel Gebler & Matias David Lee (2014): Axiomatizing Bisimulation Equivalences and Metrics from Probabilistic SOS Rules. In: Proc. FoSSaCS’14, LNCS 8412, Springer, pp. 289–303, doi:10.1007/978-3-642-54830-7_19. [10] Pedro R. D’Argenio & Matias David Lee (2012): Probabilistic Transition System Specification: Congruence and Full Abstraction of Bisimulation. In: Proc. FoSSaCS’12, LNCS 7213, Springer, pp. 452–466, doi:10. 1007/978-3-642-28729-9_30. [11] L. De Alfaro, M. Faella & M. Stoelinga (2004): Linear and Branching Metrics for Quantitative Transition Systems. In: Proc. ICALP’04, LNCS 3142, Springer, pp. 97–109, doi:10.1007/978-3-540-27836-8_11. [12] L. De Alfaro, R. Majumdar, V. Raman & M. Stoelinga (2007): Game relations and metrics. Proc. LICS’07, IEEE, pp. 99–108, doi:10.1109/LICS.2007.22. In: [13] Yuxin Deng, Tom Chothia, Catuscia Palamidessi & Jun Pang (2006): Metrics for Action-labelled Quantitative Transition Systems. ENTCS 153(2), pp. 79–96, doi:10.1016/j.entcs.2005.10.033. [14] Yuxin Deng & Wenjie Du (2011): Logical, Metric, and Algorithmic Characterisations of Probabilistic Bisimulation. Technical Report CMU-CS-11-110, CMU. [15] Josée Desharnais, Vineet Gupta, Radha Jagadeesan & Prakash Panangaden (2004): Metrics for Labelled Markov Processes. TCS 318(3), pp. 323–354, doi:10.1016/j.tcs.2003.09.013. [16] Josée Desharnais, Radha Jagadeesan, Vineet Gupta & Prakash Panangaden (2002): The Metric Analogue of Weak Bisimulation for Probabilistic Processes. In: Proc. LICS’02, IEEE, pp. 413–422, doi:10.1109/LICS. 2002.1029849. [17] Josée Desharnais, Francois Laviolette & Mathieu Tracol (2008): Approximate Analysis of Probabilistic Processes: Logic, Simulation and Games. In: Proc. QEST’08, IEEE, pp. 264–273, doi:10.1109/QEST.2008. 42. 78 Characterization of Compositionality Properties of Probabilistic Process Combinators [18] Wan Fokkink, Rob J. van Glabbeek & Paulien de Wind (2006): Compositionality of Hennessy-Milner logic by structural operational semantics. TCS 354, pp. 421–440, doi:10.1016/j.tcs.2005.11.035. [19] Wan Fokkink, Rob J. van Glabbeek & Paulien de Wind (2006): Divide and Congruence Applied to ηBisimulation. ENTCS 156, pp. 97–113, doi:10.1016/j.entcs.2005.10.029. [20] Wan Fokkink, Rob J. van Glabbeek & Paulien de Wind (2006): Divide and Congruence: From Decomposition of Modalities to Preservation of Branching Bisimulation. In: Proc. FMCO’05, LNCS 4111, Springer, pp. 195–218, doi:10.1007/11804192_10. [21] Wan Fokkink, Rob J. van Glabbeek & Paulien de Wind (2012): Divide and congruence: From decomposition of modal formulas to preservation of branching and η-bisimilarity. I&C 214, pp. 59–85, doi:10.1016/j. ic.2011.10.011. [22] Maciej Gazda & Wan Fokkink (2010): Congruence from the Operator’s Point of View: Compositionality Requirements on Process Semantics. In: Proc. SOS’10, EPTCS 32, pp. 15–25, doi:10.4204/EPTCS.32.2. [23] Daniel Gebler & Wan Fokkink (2012): Compositionality of Probabilistic Hennessy-Milner Logic through Structural Operational Semantics. In: Proc. CONCUR’12, LNCS 7454, Springer, pp. 395–409, doi:10. 1007/978-3-642-32940-1_28. [24] Daniel Gebler & Simone Tini (2013): Compositionality of Approximate Bisimulation for Probabilistic Systems. In: Proc. EXPRESS/SOS’13, EPTCS 120, OPA, pp. 32–46, doi:10.4204/EPTCS.120.4. [25] Alessandro Giacalone, Chi-Chang Jou & Scott A. Smolka (1990): Algebraic Reasoning for Probabilistic Concurrent Systems. In: Proc. IFIP TC2 Working Conf. on Prog. Concepts and Methods, pp. 443–458. [26] Jan Friso Groote (1993): Transition System Specifications with Negative Premises. TCS 118(2), pp. 263–299, doi:10.1016/0304-3975(93)90111-6. [27] Ruggero Lanotte & Simone Tini (2009): Probabilistic Bisimulation as a Congruence. ACM TOCL 10, pp. 1–48, doi:10.1145/1462179.1462181. [28] Kim G. Larsen & Arne Skou (1991): Bisimulation Through Probabilistic Testing. I&C 94, pp. 1–28, doi:10. 1016/0890-5401(91)90030-6. [29] Matias David Lee, Daniel Gebler & Pedro R. D’Argenio (2012): Tree Rules in Probabilistic Transition System Specifications with Negative and Quantitative Premises. In: Proc. EXPRESS/SOS’12, EPTCS 89, pp. 115–130, doi:10.4204/EPTCS.89.9. [30] Roberto Segala (1995): Modeling and Verification of Randomized Distributed Real-Time Systems. Ph.D. thesis, MIT. [31] Simone Tini (2010): Non-expansive ǫ-bisimulations for Probabilistic Processes. TCS 411, pp. 2202–2222, doi:10.1016/j.tcs.2010.01.027. [32] Mathieu Tracol, Josée Desharnais & Abir Zhioua (2011): Computing Distances between Probabilistic Automata. In: Proc. QAPL’11, EPTCS 57, pp. 148–162, doi:10.4204/EPTCS.57.11. [33] Mingsheng Ying (2002): Bisimulation indexes and their applications. TCS 275(1), pp. 1–68, doi:10.1016/ S0304-3975(01)00124-4.
6cs.PL
Weak convergence of the sequential empirical copula processes under long-range dependence arXiv:1801.02364v3 [math.ST] 15 Mar 2018 Yusufu Simayi∗1 1 Institute for Numerical and Applied mathematics, University of Göttingen, Lotzestr. 16-18, 37083, Göttingen Germany;, Email: [email protected] March 16, 2018 Abstract We consider multivariate copula-based stationary time-series under Gaussian subordination. Observed time series are subordinated to long-range dependent Gaussian processes and characterized by arbitrary marginal copula distributions. First of all, we establish limit theorems for the marginal and quantile marginal empirical processes of multivariate stationary long-range dependent sequences under Gaussian subordination. Furthermore, we establish the asymptotic behavior of sequential empirical copula processes under non-restrictive smoothness assumptions. The limiting processes in the case of long-memory sequences are quite different from the cases of of i.i.d. and weakly dependent observations. Key words: Copula; Long-range dependence; Gaussian subordination; functional limit theorem; multivariate time series; Conditional quantiles. MSC: 62G05, 62G20 1 Introduction In recent years, it is increasingly popular to investigate the estimations of multivariate stationary time series models by copula function. The parametric copula function capture the crosssectional dependence between time series, which provide us an important way to construct a multivariate time series models. By using copulas to model the temporal dependence between the multivariate time series and the applications of copulas in modelling financial has been widely studied in many literature, see, e.g., Joe (1997) and Patton (2009). Moreover, it is a main tool in the field of finance, Hydrology and insurance risk management, see, e.g., McNeil et al. (2005), Frees & Valdez (1998) respectively. Let F be a joint distribution function with continuous marginal dirstributions F1 , · · · , Fp and a copula C associated to F . Then by the Sklar theorem in Nelsen (2006), the joint distribution F decompose as: F (x1 , · · · , xp ) = C(F1 (x1 ), · · · , Fp (xp )), for all x = (x1 , · · · , xp ) ∈ Rp . To estimate such a copula C, (sequential) empirical copula C⌊nz⌋ is a main tool for statistical inference on unknown copulas. Let X1 , · · · , Xn be p-dimensional random vectors from strictly stationary sequence (Xt )t∈Z with copula C. If we denotes F⌊nz⌋ the empirical distribution function of the random vectors Xt , then the sequential empirical copula is defined as −1 −1 C⌊nz⌋ (u) = F⌊nz⌋ (F⌊nz⌋,1 (u1 ), · · · , F⌊nz⌋,p (up )), ∗ Email: [email protected]; Alias: Yusup Ismayil 1 u = (u1 , · · · , up ) ∈ [0, 1]p , where F⌊nz⌋ and F⌊nz⌋,j are joint empirical and j-th marginal empirical distribution functions of −1 sample respectively, and F⌊nz⌋,j is j-th sequential quantile marginal empirical distributions, see Section 2.2 for more details. In this paper, we mainly consider the following sequential empirical copula process ⌊nz⌋ o 1 Xn −1 I{Xt ≤ F⌊nz⌋ (u)} − C(u) C⌊nz⌋ (u) = qn t=1 for u ∈ [0, 1]p , z ∈ [0, 1], (1.1) where qn is a normalizing factor to be discussed in Section 2. To establish asymptotic behavior of the empirical copula process are fundamental step to estimate parametric copulas and testing problems. As we know, there exists a number of literature for studying the asymptotic behaviors of the empirical copula processes in the context of i.i.d sequences, i.e., Ruschendorf (1976), Gaenssler & Stute (1987), Vaart & Wellner (1996),Fermanian et al. (2004),Tsukahara (2005), Bücher (2011), Segers (2012). More specifically, Gaenssler & Stute (1987), Tsukahara (2005) and Segers (2012) prove convergence results of Cn (where z = 1) by directly analyzing the behavior of the empirical copula processes Cn . The rest of the authors applied a functional delta method to derive the weak convergence of Cn . They analyze the mapping properties between spaces of functions and made a smoothness assumption that the copula C has continuous partial derivatives on the closd unit cube, see e.g. Segers (2012). Furthermore, in the case of weakly dependent stationary sequences, the sequential empirical copula processes C⌊nz⌋ with order qn = o(n1/2 ): √ C⌊nz⌋ (u) = n(C⌊nz⌋ (u) − C(u)) (1.2) converges weakly to a Gaussian field GC with a summable covariance functions, see, e.g., Doukhan et al. (2008), Remillard (2010), Rémillard et al. (2012), Bücher & Ruppert (2013) and Bücher & Volgushev (2013). More precisely, Doukhan et al. (2008) establish limit theorems for Cn under η-dependence, Bücher & Ruppert (2013) derive the asymptotic behavior of Cn for α-mixing conditions, Rémillard et al. (2012) aslo establish limit theorems for copula-based semiparametric models for multivariate time series under both interdependence and serial dependence. Bücher & Volgushev (2013) also derive asymptotic behavior of empirical and sequential empirical copula process (1.2) under general setting by using the functional delta method. As for the long-range dependent sequences, Ibragimov & Lentzas (2017) and Chicheportiche & Chakraborti (2014) study the copula-based time series with long-memory and provide applications, but they didn’t discuss the asymptotic properties of the empirical copula processes and establish limit theorems. Bücher & Volgushev (2013) sign us that the derivation of weak convergence results under long-range dependence can be established based on the their method. Recently, Beran (2016) construct multivariate copula-based stationary time series models under Gaussian subordination and estbalish the limit theorem for a nonparametric estimator of the Pickands dependence function. The copula-based time series with cross-sectional dependence characterized by a copula function and subordinated to the nonlinear long-memory Gaussian processe. To the best of our knowledge, there are no further results have been found for the asymptotic behavior of the (sequential) empirical copula processes C⌊nz⌋ in (1.1) under longrange dependence. In the case of long-range dependent sequences, the limiting distribution is not a Gaussian anymore as well as the covariance function is not summable. To establish a limit theorem for the sequential empirical copula processes C⌊nz⌋ we first purpose to establish asymptotic properties of the sequential marginal empirical processes. This process plays an important role in nonparametric statistics such as change-point analysis and testing issue. However, in the case of long-memory sequences, the limiting distributions and the asymptotic behavior are very different from the cases of i.i.d. and short memory sequences and asymptotically not normal. For literature on the asymptotic properties of the empirical processes with one dimensional case, see e.g., Taqqu (1975), Dehling & Taqqu (1989) and Leonenko & Sakhno (2001). For the bivariate and multivariate cases, see e.g., Marinucci (2005), Taufer (2015) and Arcones 2 (1994), Bai & Taqqu (2013), Buchsteiner (2015) and Mounirou (2016), respectively. The usual way to derive a limiting distribution of multivariate empirical processes in the context of long-memory is using the multivariate unifrom reduction principle. The remainder of this paper is organized as follows. In section 2, we first present a multivariate copula-based stationary time series with long-memory and Hermite polynomials expansions of the empirical processes. In section 3, we establish the weak convergence of the sequential marginal and quantile marginal empirical processes. In section 4, we derive the weak convergence of usual empirical empirical processes with different Hermite ranks. In section 5, we derive the asymptotic behavior of the sequential empirical copula processes C⌊nz⌋ . In section 6, we address our conclusions and some open problems. 2 2.1 Empirical copula processes under long-range dependence Multivariate Copula-based long-range dependent sequences ′ Let Xt = (Xt,1 , · · · , Xt,p )t∈Z be a vector valued strictly stationary process in Rp . Let F be the joint multivariate distribution function of Xt with continuous marginal distributions F1 , · · · , Fp for all t ∈ Z, j = 1, · · · , p, then by Sklar theorem in Nelsen (2006), there exists an unique copula C such that F (x1 , · · · , xp ) = C(F1 (x1 ), · · · , Fp (xp )), for all xj ∈ R, j = 1, · · · , p, (2.1) where the marginal distributions F1 , · · · , Fp are standard uniform on [0, 1]. We now consider that the observable stationary time series {Xt,j }t∈Z are subordinated to the long-memory Gaussian processes. Condition 2.1. Assume that {ηt,j }t∈Z , j = 1, · · · , p are unobservable, independent univariate stationary Gaussian processes with E[ηt,j ] = 0, Var[ηt,j ] = 1 and the autocovariance functions satisfying γη,j (k) := Cov(ηt,j , ηt+k,j ) ∼ Lη,j (k)|k|2dj −1 , for all dj ∈ (0, 1/2), where ” ∼ ” denotes that the ratio between the right and left hand sides tends to one and the functions Lη,j (k) are slowly varying at infinity and are positive for all large k, i.e., Lη,j (αy) = 1, y→∞ Lη,j (y) lim ∀α > 0. Since the univariate Gaussian processes ηt,j are mutually independent, the spectral density of Xt,j are defined by fX,j (k) ∼ cX,j |k|−2dj (as |k| → 0). ′ for some constants 0 < cX,j < ∞. Let G(ηt ) := (G1 (ηt ), · · · , Gp (ηt )) : Rp 7→ Rp be Borel measurable functions satisfying with E[Gj (ηt,j )] = 0 and E[G2j (ηt )] < ∞ for j = 1, · · · , p. Then the subordinated processes (Xt )t∈Z are defined by ′ Xt = G(ηt ) = (G1 (ηt ), · · · , Gp (ηt )) in Rp , where G(ηt ) is nonlinear functions of stationary Gaussian processes. Note that the memory parameters dj ∈ (0, 21 ) are not necessarily all equal and suppose to be known. For the memory parameters dj ∈ (0, 1/2), the stationary Gaussian sequences (ηt,1 ,P · · · , ηt,p ) display long-memory behavior and have nonsummable P autocovariance functions, i.e., k∈Z γη,j (k) = ∞. If dj = 0, the autocovariance functions 0 < k∈Z γη,j (k) < ∞, then the Gaussian processes ηt,j exhibit short-memory behavior. For more details of linear and nonlinear long-memory processes and applications, we refer to Beran (1994), Beran et al. (2013). For the simplicity, here we only consider the case with dj = d, j = 1, · · · , p. 3 According to Lemma 1 in Beran (2016), we find that the observed process (Xt )t∈Z has a copula C as in (2.1) and the multivariate Hermite rank of each Gj is one. More precisely, we have      Xt,1 G1 (ηt ) Xt,2  G2 (ηt )       Xt =  .  :=  .  =   ..   ..   Xt,p Gp (ηt )  F1−1 (Φ(ηt,1 )) −1  F2−1 (C2|1 (Φ2 (ηt,2 )|Φ1 (ηt,1 )))   , (2.2) ..  . −1 −1 Fp (Cp|1,··· ,p−1 (Φp (ηt,p )|Φ1 (ηt,1 ), · · · , Φp−1 (ηt,p−1 ))) −1 where Φ(·) denotes the cumulative standard normal distribution and Cj|1,··· ,j−1 the conditional quantile copula of Uj = Fj (Xj ) given U1 , · · · , Uj−1 , for the deatils, see Beran (2016). It can be seen from (2.2) that the functions Gj are monotonically nondecreasing. Let L2 be the space of square integrable functions with respect to p-dimensional standard normal distribution ′ ηt = (ηt,1 , · · · , ηt,p ) . An orthogonal basis of these space is given by Hr1 ,··· ,rp (ηt ) = Hr1 (ηt,1 ) · · · Hrp (ηt,p ), r1 , · · · , rp ∈ N, with Hermite rank r = r1 + · · · + rp , where Hrj is an one-dimensional Hermite polynomial of order rj , i.e.,  2  2  rj d x x rj , rj = 0, 1, 2, · · · , x ∈ R. exp − Hrj (x) = (−1) exp 2 dxrj 2 with H0 (x) = 1, H1 (x) = x, H2 (x) = x2 − 1 etc. Thus, the Hermite coefficient of Gj with respect to the Hermite Polynomials He(l) (η) = ηl is defined by Jj,l (H, G) = hHe(l) (ηt ), Gj (ηt )i = E[ηt,l Gj (ηt )]. (2.3) ′ where e(l) = (e1 (l), · · · , ep (l) in Np is lth unit vector. 2.2 Hermite polynomials expansions of the empirical copula processes Let (X1 , · · · , Xn ) be samples from the Gaussian subordinated long-memory processes Xt . Define Ut,j = Fj (Xt,j ) with Xt,j = Gj (ηt ) for t ∈ {1, · · · , n} and j = 1, · · · , p. Let Ut = ′ (Ut,1 , · · · , Ut,p ) be the random vectors sampled from copula C. The corresponding sequential empirical distribution functions are given by respectively.   z ∈ [0, n1 ), 0, ⌊nz⌋ F⌊nz⌋,j (xj ) = P 1  I{Gj (ηt ) ≤ xj }, xj ∈ R, z ∈ [ n1 , 1].  ⌊nz⌋ t=1 and D⌊nz⌋,j (uj ) = ′   0, 1   ⌊nz⌋ ⌊nz⌋ P t=1 z ∈ [0, n1 ), I{Fj Gj (ηt ) ≤ uj }, uj ∈ [0, 1], z ∈ [ n1 , 1]. ′ for x = (x1 , · · · , xp ) ∈ Rp and u = (u1 , · · · , up ) ∈ [0, 1]p and z ∈ [0, 1]. The marginal quantile empirical distributions associated to F⌊nz⌋,j and D⌊nz⌋,j are ( bt,j , if uj ∈ (0, 1], z ∈ [0, 1], X −1 F⌊nz⌋,j (uj ) = inf{x ∈ R : F⌊nz⌋,j (xj ) ≥ uj } = −∞, if uj = 0, z ∈ [0, 1]. and −1 D⌊nz⌋,j (uj ) = inf{uj ∈ [0, 1] : D⌊nz⌋,j (uj ) ≥ uj } = 4 ( bt,j , if uj ∈ (0, 1], z ∈ [0, 1], U 0, if uj = 0, z ∈ [0, 1], bt,j and U bt,j are the vectors of ascending order statistics of the jth coordinate samples where X Xt,1 , · · · , Xt,p and Ut,1 , · · · , Ut,p , respectively. Let F⌊nz⌋ be the joint empirical distribution function of (X1 , · · · , Xn ). Then the associated empirical copula is defined by −1 −1 C⌊nz⌋ (u) = F⌊nz⌋ (F⌊nz⌋,1 (u1 ), · · · , F⌊nz⌋,p (up )), ′ for all u = (u1 , · · · , up ) ∈ [0, 1]p . (2.4) where F⌊nz⌋ (x) =   0, 1   ⌊nz⌋ ′ ⌊nz⌋ P t=1 z ∈ [0, n1 ), I{G1 (ηt ) ≤ x1 , · · · , Gp (ηt ) ≤ xp }, xj ∈ R, z ∈ [ n1 , 1]. −1 −1 for all x = (x1 , · · · , xp ) ∈ Rp . Since Xt,j ≤ F⌊nz⌋,j (uj ) if and only if Ut,j ≤ D⌊nz⌋,j (uj ) for all uj ∈ [0, 1], t = 1, · · · , n, and j = 1, · · · , p, it allows us to write the empirical copula (2.4) as −1 −1 C⌊nz⌋ (u) = D⌊nz⌋ (D⌊nz⌋,1 (u1 ), · · · , D⌊nz⌋,p (up )). Finally, the corresponding sequential uniform and genegral processes to the empirical distribution functions D⌊nz⌋ and D⌊nz⌋,j ( are given as B⌊nz⌋ (u) = ⌊nz⌋  D⌊nz⌋ (u) − C(u) , qn B⌊nz⌋,j (uj ) = ⌊nz⌋  C⌊nz⌋ (u) − C(u) , qn Q⌊nz⌋,j (uj ) = ⌊nz⌋  D⌊nz⌋,j (uj ) − uj , qnj (2.5) −1 and the processes to the empirical quantile D⌊nz⌋,j and empirical copula distribution C⌊nz⌋ are give as C⌊nz⌋ (u) = o ⌊nz⌋ n −1 D⌊nz⌋,j (uj ) − uj , qnj (2.6) for all uj ∈ [0, 1], z ∈ [0, 1], where qn and qnj are the normalizing factors corresponding to the joint and marginal empirical distributions, respectively, which will be given later. In the following, we need some notations as given in Dehling & Taqqu (1989) for expanding the class of functions I{Ut ≤ u} − C(u) and I{Ut,j ≤ uj } − uj , respectively. Let Hr (·) be denote the r-th order Hermite polynomials with Hr (x) = Hr1 (x1 ) · · · Hrp (xp ). Since the functions Hr1 (x1 ) · · · Hrp (x2 ) form a orthogonal system in L2 -space with  L2 (Rp , φ(x1 ) · · · , φ(xp )) = G : Rp 7→ R, and kGk2 < ∞ , R where kGk2 = R2 Gp (x)φ(x1 ) · · · φ(xp )dx1 · · · dxp < ∞ and φ(·) is standard Gaussian density function. From the orthogonality properties of Hermite polynomials for a zero-mean, unit variance of Gaussian variables ηt,1 , · · · , ηt,p , we have ( 1 for rl = rk rk rt rk E[Hrt (ηt,k )Hrt (ηt,l )] = rl !δrl {E[ηt,l ηt,k ]} , δrl = , (2.7) 0 for rl 6= rk rk where δrl is Kronecker’s delta. By Condition 2.1, we have σr21 ···rp (n) " n #2 1X 1 E = Hr (ηt,1 ) · · · Hrp (ηt,p ) r1 ! · · · rp ! n t=1 1 n n X 1 X rp r1 γη,t (|t1 − s1 |) · · · γη,t (|tp − sp |). ··· = 2 1 p n t =1 t =1 1 p 5 where σr21 ···rp (n) ∼  p P  p− rj (2dj −1)  rp r1  j=1 a(r1 · · · rp , d1 · · · dp )Lη,1 (n) · · · Lη,p (n)n ,    an−1 , p P j=1 p P j=1 rj (1 − 2dj ) < 1, rj (1 − 2dj ) > 1, as n → ∞. According to the argument as in Taqqu in Theorem 3.1 Taqqu (1975) or Mounirou (2016) and view of (2.1) and (2.7), we have pr1 ! · · ·!rp ! . j=1 [j − r1 (1 − 2d1 ) − · · · − rp (1 − 2dp )] a(r1 · · · rp , d1 · · · dp ) = Qp If the memory parameter are all equal d = d1 = · · · = dp and r1 + · · · + rp = r, then a(r1 · · · rp ; d) = pr1 ! · · · rp ! . [1 − r(1 − 2d)] · · · [p − r(1 − 2d)] Now we expand the class of joint distribution function I{Ut ≤ u} − C(u) in Hermite polynomials for any fixed u ∈ [0, 1]p : I{Ut ≤ u} − C(u) = ∞ X r=1 ··· ∞ X r1 +···+rp =r p Jr1 ···rp (u) Y Hr (ηt,j ), r1 ! · · ·!rp ! j=1 j (2.8) with the Hermite coefficient Jr1 ···rp (u), i.e., Jr1 ···rp (u) = E[I(Ut ≤ u)] p Y Hrj (ηt,j ), (2.9) j=1 where r is the Hermite rank of the function (2.9), i.e., r = r(u) = min{r1 + · · · + rp = r : Jr1 ···rp (u) 6= 0 for all uj ∈ [0, 1]}. As described in Marinucci (2005), we find that the stochastic order of magnitude of Cn (u) is determined by the lowest r1 (1 − 2d1 ) + · · · + rp (1 − 2dp ) terms corresponding to Jr1 ,··· ,rp (u). We define ∗ ∗ (ri1 , · · · , rip ) = argmin{r1 (1 − 2d1 ) + · · · + rp (1 − 2dp )} ∗ ···r ∗ (u) 6= 0 for i = 1, · · · , M . If all the memory paramters such that the Hermite coefficient Jri1 ip are equal, i.e., dj = d, then the stochastic order r(1 − 2d) is constant for all i and the Hermite rank of I{Ut ≤ u} − C(u) follows from the result of Arcones (1994). Condition 2.2. (regularity assumption). Let 1 ∗ ri1 ∗ rip ∗ ∗ ∗ ∗ 2 2 qn (ri1 , · · · , rip ) = a(ri1 , · · · , rip ; d1 , · · · , dp ) 2 Lη,1 (n) · · · Lη,p (n)n1− ∗ +···+r∗ ri1 ip 2 . Pn Q p ∗ ∗ be the square root of the asymptotic variance of t=1 j=1 Hj (ηt,j ) with ri1 (1−2d1 )+· · ·+rip (1− 2dp ) < 1. Suppose that the exist some finite and positive constants ρ1 , · · · , ρM > 0. Then ∗ ∗ qn (ri1 , · · · , rip ) =: ρi , n→∞ qn (r∗ , · · · , r∗ ) 11 1p lim i = 1, 2, · · · , M exists and non-zero. Moreover, we have r ∗ /2 r ∗ /2 η,1 η,p ip ∗ ∗ i1 Lη,1 (n) · · · Lη,p a(ri1 , · · · , rip ; d1 , · · · , dp ) (n) lim ρi = . ∗ /2 ∗ /2 ∗ ∗ r r a(r11 , · · · , r1p ; d1 , · · · , dp ) n→∞ L 11 (n) · · · L 1p (n) 6 Define the random processes, which can be represented by multiple Wiener-Itô integrals, see e.g., Dobrushin & Major (1979) or Mounirou (2016): Z ′ Z ′ h(z; λ21 , · · · , λ2r2 ) · · · h(z; λp1 , · · · , λprp−1 ) ··· Hr1 ···rp (z) = Rr 1 r1 Y j1 =1 and |λj1 | Rr p (d1 −1) ··· rp Y jp =1 |λjp | (dp −1) r1 Y j1 =1 W1 (dλj1 ) · · · rp Y Wp (dλjp ) (2.10) jp =1 exp(iz(λj1 + · · · + λjrj )) − 1 1 h(z; λj1 , · · · , λjrj ) = p a(r1 , · · · , rp , d1 , · · · , dp ) i(λj1 + · · · + λjrj ) where Wj (·), j = 1, · · · , p are independent copies of a complex-valued Gaussian white noise on R′ R1 and the symbol Rrj refer that the domain of integration exclude the hyperdiagonals with λj = ±λj (1) , j 6= j (1) for j, j (1) = 1, · · · , rj , λ denote Lebesgue measure. Note that the process Hr,s (z) defined in (2.10) is called an r th order Hermite process. The coefficients are a(r1 · · · rp ; d1 · · · dp ) = [1 − r(2d − 1)/2][1 − r(2d − 1)] . r!{2Γ(2d − 1) sin[(3/2 − d)π]}r The Hermite process Hr1 ···rp (z) is called fractional Brownian motion if r = 1. If r = 2, the process H2 (z) is called Rosenblatt process, Pp see Taqqu (1975). Otherwise the limiting process Hr1 ,···rp (z) is Hermite process of order r = j=1 rj . 3 Weak convergence of the marginal and quantile marginal empirical processes Before we estbalish the weak convergence of the sequential empirical copula processes, it is a main step to derive the weak convergence of the marginal and qunatile marginal sequential empirical processes B⌊nz⌋,j and Q⌊nz⌋,j with the case that the memory parameters dj = d are all equal for all j = 1, · · · , p. Since the marginal distributions F1 , · · · Fp are conditionally subordinated to the long-memory Gaussian processes, the class of functions I{Gj (ηt ) ≤ xj } − Fj (xj ) are expanded in multivariate Hermite polynomials for fixed xj ∈ R: I{Gj (ηt ) ≤ xj } − Fj (xj ) = X mj =1 Pp ∞ X j=1 rj =mj p Tj(r1 ,··· ,rp ) (xj ) Y Qp Hrj (ηt,j ) j=1 rj ! j=1 where j(r1 , · · · , rp ) is the number of indeces r1 , · · · , rp that are equal to j and the corresponding Hermite coefficients of these functions are denoted by Tj(r1 ,··· ,rp ) (xj ) = E [I{Gj (ηt ) ≤ xj } − Fj (xj )] p Y Hrj (ηt,j ). j=1 Then we can define the Hermite rank of the functions I{Gj (ηt ) ≤ xj } − Fj (xj ) as mj = min{mj (xj ) = p X j=1 rj : Tj(r1 ,··· ,rp ) (xj ) 6= 0 for all xj ∈ R}. Since the uniform marginals Fj are continuous, the class of functions I{Fj (Gj (ηt ) ≤ uj } − uj can be expanded in Hermite polynomials for any fixed uj ∈ (0, 1): I{Fj (Gj (ηt )) ≤ uj } − uj = X mj =1 Pp ∞ X j=1 7 rj =mj p Jj(r1 ,··· ,rp ) (uj ) Y Qp Hrj (ηt,j ), j=1 rj ! j=1 the corresponding Hermite coefficients are denoted by Jj(r1 ,··· ,rp ) (uj ) = E [I{Fj (Gj (ηt )) ≤ uj } − uj ] p Y Hrj (ηt,j ). j=1 Since Tj(r1 ,··· ,rp ) (D−1 (uj )) = Jj(r1 ,··· ,rp ) (uj ) for any uj ∈ [0, 1], where D−1 (uj ) = inf{xj : Fj (xj ) = uj } for u ∈ (0, 1]. The Hermite rank of the class of functions I{Fj (Gj (ηt )) ≤ uj } − uj are also same the rank of I{Gj (ηt ) ≤ xj } − Fj (xj ). Similarly, by Theorem 3.1 of Taqqu (1975), the normalizing factors corresponding to the each marginal empirical processes are given by 2 qnj ∼ cj (r, d) p Y Lrj (n)n2− Pn j=1 rj (1−2d) , (3.1) j=1 with the constants 2 . j=1 [j − rj (1 − 2d)] cj (r, d) = Qp (3.2) Dehling & Taqqu (1989) studied the asymptotic properties of the one-dimensional empirical process, Taufer (2015), Marinucci (2005) and Buchsteiner (2015) also performed the bivariate and multivariate expansion of one dimensional empirical processes in Hermite polynomials. We now present the limiting distribution of all marginal empirical processes in the following lemma since it is useful results to establish the weak convergence of the empirical copula processes under long-range dependent data. Fj (xj ) have Lemma 3.1. Under Condition 2.1 and (2.2), the class of functions I{Xt,j ≤ xj } −P p Hermite ranks mj := min{mj (xj ) : Tj(r1 ,··· ,rp ) (xj ) 6= 0 for some xj ∈ R} with 0 < j=1 rj (1 − 2d) < 1. Then F⌊nz⌋,j (xj ) = ⌊nz⌋  F⌊nz⌋ (xj ) − Fj (xj ) qnj Pp X j=1 rj =mj Tj(r1 ,··· ,rp ) (xj ) Qp Zj(r1 ,··· ,rp ) (z) j=1 rj ! (3.3) converges weakly in D([−∞, ∞]) × [0, 1] equipped with sup-norm, wherePthe symbol ” ” denotes weak convergence and qnj is as in (3.1). The processes Zj(r1 ,··· ,rp ) (z), pj=1 rj = mj are give as multiple Wiener-Itô integrals of the form 1 Zj(r1 ,··· ,rp ) (z) = p cj (r, d) × r1 Y j1 =1 Z ′ R mj mj eiz(λ1 +···+λmj )−1 Y |λj |d−1 i(λ1 + · · · + λmj ) j=1 W1 (dλi ) · · · rp Y Wp (dλi ). (3.4) jp =rp−1 +1 where W1 , · · · , Wp are independent copies of a complex valued gaussian white noise on R and the coefficient cj is given in (3.2). Proof. (sketch). The proof is strongly associated to the weak convergence results in Dehling & Taqqu (1989), here we extend the univariate case to the multivariate cases. The class of functions F⌊nz⌋,j (xj ) − Fj (xj ) can be expressed as a multivariate expansions in Hermite polynomials. The first class of function I{G1 (ηt,1 ) ≤ x1 } − F1 (x1 ) can be expanded as one dimensional Hermite polynomials in L2 : I{G1 (ηt,1 ) ≤ x1 } − F1 (x1 ) = 8 ∞ X Tr1 (x1 ) Hr1 (ηt,1 ) r1 ! r =m 1 1 with the Hermite rank m1 = min{r1 (x1 ) : Tr1 (x1 ) 6= 0}, where Tr1 (x1 ) = E[I{G1 (ηt,1 ) ≤ x1 }Hr1 (ηt,1 ). Moreover, the results of Dehling & Taqqu (1989) show that ⌊nz⌋ 1 X Hr1 (ηt,1 ) qn1 t=1 1 Zr1 (z) = p c1 (r, d) Z ′ Rr 1 r1 r1 Y eiz(λ1 +···+λr1 ) Y d−1 W1 (dλj1 ) (3.5) |λj | i(λ1 + · · · + λr1 ) j =1 1 j =1 1 1 in the space D([0, 1]) equipped with supremum norm. To the second marginal empirical process, the class of function I{G2 (ηt,1 , ηt,2 ) ≤ x2 } − F2 (x2 ) is square integrable with respect to the standard Gaussian density such that we can expand the class of function I{G2 (ηt,1 , ηt,2 ) ≤ x2 } − F2 (x2 ) with bivariate Hermite polynomials in L2 : I{G2 (ηt,1 , ηt,2 ) ≤ x2 } − F2 (x2 ) = ∞ X ∞ X m2 =1 r1 +r2 =m2 Tr1 ,r2 (x2 ) Hr1 (ηt,1 )Hr2 (ηt,2 ) r1 !r2 ! with the Hermite rank m2 = m2 (x2 ) = min{r1 + r2 = m2 (x2 ) : Tr1 ,r2 (x2 ) 6= 0}, where Tr1 ,r2 (x2 ) = E[I{G1 (ηt,1 , ηt,2 ) ≤ x2 }Hr1 (ηt,1 )Hr2 (ηt,2 ). Similarly, by the results of Dehling & Taqqu (1989), we have ⌊nz⌋ 1 X Zr1 ,r2 (z), Hr1 (ηt,1 )Hr2 (ηt,2 ) qn2 t=1 in the space D([0, 1]) equipped with supremum norm, where 1 Zr1 ,r2 (z) = p c2 (r, d) Z ′ R m2 r2 r1 m Y Y eiz(λ1 +···+λm2 ) Y2 W2 (dλj2 ). W1 (dλj1 ) |λj1 |d−1 i(λ1 + · · · + λm2 ) j =1 j =1 j =1 (3.6) 2 1 1 see also Proposition 2 in Taufer (2015). Consequently, for the pth marginal empirical process, the function I{Gp (ηt,1 , · · · , ηt,p ) ≤ xp } − F2 (xp ) is pth integrable w.r.t. the standard Gaussian densities (φ(x1 , · · · , φ(xp ) and let L2 = L2 (R, φ(x1 ) · · · φ(xp )dx1 · · · dxp ) be the Hilbert space of real measurable functions G2 (x). Then there exists an expansion in L2 for any xp ∈ R: I{Gp (ηt,1 , · · · , ηt,p ) ≤ xp } − Fp (xp ) = ∞ X ∞ X mp =1 r1 +···+rp =mp Tr1 ,··· ,rp (xp ) Hr1 (ηt,1 ) · · · Hrp (ηt,p ) r1 ! · · · rp ! with the Hermite rank mp = mp (xp ) = min{r1 + · · · + rp = mp : Tmp (xp ) 6= 0}, where Tr1 ,··· ,rp (xp ) = E[I{Gp (ηt,1 , · · · ηt,p ) ≤ xp }Hr1 (ηt,1 ) · · · Hrp (ηt,p ). Similarly, as a consequence of theorem 1 in Dehling & Taqqu (1989), we have ⌊nz⌋ 1 X qnp t=1 Hr1 (ηt,1 ) · · · Hrp (ηt,p ) Zr1 ,··· ,rp (z), in the space D([0, 1]) equipped with supremum norm, where Zr1 ,··· ,rp (z) = p × 1 cp (r, d) r1 Y j1 =1 Z ′ R mp mp eiz(λ1 +···+λmp ) Y |λj |d−1 i(λ1 + · · · + λmp ) j =1 1 1 W1 (dλj1 ) · · · rp Y W2 (dλjp ). (3.7) jp =1 Therefore, combining (3.5), (3.6) and (3.7), we can conclude that the sequential marginal empirical processes (3.3) weakly converges to the Hermite process as in (3.4). 9 Pp Remark 3.2. The Hermite processes Zj(r1 ,··· ,rp ) (1) with Hermite ranks mj = j=1 rj are GausP sian for pj=1 rj = 1 and the normalizing factors cj (r, d) ensures unit variance of Zj(r1 ,··· ,rp ) (1) and otherwise Zj(r1 ,··· ,rp ) (1) are non-Gaussian for m ≥ 2. As a consequence of Lemma 3.1, we can now immidiately establish the weak convergence of the each uniform marginal empirical processes B⌊nz⌋,j (uj ). Since the uniform marginal distributions F1 , · · · , Fp are all continuous, we have B⌊nz⌋,j (uj ) = F⌊nz⌋,j (Fj−1 (uj )), for all uj , z ∈ [0, 1]. This means that the weak convergence results that we show in Lemma 3.1 also holds true simultaneously for all marginal empirical processes F⌊nz⌋,j (xj ) and B⌊nz⌋,j (uj ) if Fj are continuous. Corollary 3.3. Under Condition 2.1 and (2.2), the class of functions I{Ut,j ≤ uj } − uj = I{Fj (Gj (ηt )) ≤ uj }−uj have Hermite ranks mj := min{mj (xj ) : Jj(r1 ,··· ,rp ) (uj ) 6= 0 for some uj ∈ R} with 0 < mj (1 − 2d) < 1. Then we have, B⌊nz⌋,j (uj ) = ⌊nz⌋ (D⌊nz⌋,j (uj ) − uj ) qnj Pp X j=1 rj =mj Jj(r1 ,··· ,rp ) (uj ) Qp Zj(r1 ,··· ,rp ) (z). j=1 rj ! (3.8) for all components uj ∈ [0, 1], j = 1, · · · , p and z ∈ [0, 1] in D([0, 1]2 ) of uniformly bounded functions on [0, 1]2 with supremum norm k · k∞ . In order to derive the weak convergence of the sequential empirical copula processes C⌊nz⌋ , we first need to study a strong approximation of the quantile empirical process Q⌊nz⌋,j (uj ) = −1 −1 −1 nqnj (D⌊nz⌋,j (uj ) − uj ) by B⌊nz⌋,j (uj ) = nqnj (D⌊nz⌋,j (uj ) − uj ) as n → ∞. Proposition 3.4. Suppose that the Condition 2.1 is satisfied and the subordinated processes Xt ′ as in (2.2). Let Jj(r1 ,··· ,rp ) (uj ) and the derivatives Jj(r1 ,··· ,rp ) (uj ) with the Hermite ranks mj are uniformly bounded and supuj ∈[0,δn ] |Jj(r1 ,··· ,rp ) (uj )| = O(δn ) for the sequence δn → 0 as n → ∞. Then we have p Q⌊nz⌋,j (uj ) − B⌊nz⌋,j (uj ) → 0, as n → ∞. (3.9) sup uj ∈[0,1];z∈[0,1] Proof. For each j ∈ {1, · · · , p}, we have  ⌊nz⌋  −1 D⌊nz⌋,j (uj ) − uj qnj  ⌊nz⌋   ⌊nz⌋  −1 −1 −1 D⌊nz⌋,j (D⌊nz⌋,j (uj )) − uj − D⌊nz⌋,j (D⌊nz⌋,j (uj )) − D⌊nz⌋,j (uj ) = qnj qnj   ⌊nz⌋ −1 −1 = (uj )), D⌊nz⌋,j (D⌊nz⌋,j (uj )) − uj − B⌊nz⌋,j (D⌊nz⌋,j qnj Q⌊nz⌋,j (uj ) = and 0 ≤ sup uj ∈[0,1] −1 D⌊nz⌋,j (D⌊nz⌋,j (uj )) − uj ≤ 1 , ⌊nz⌋ Thus, we have sup uj ∈[0,1],z∈[0,1] = |Q⌊nz⌋,j (uj ) − B⌊nz⌋,j (uj )| sup uj ∈[0,1],z∈[0,1] −1 |B⌊nz⌋,j (D⌊nz⌋,j (uj )) − B⌊nz⌋,j (uj )| + O  1 qnj −1 n 1 Jj(r1 ,··· ,rp ) (D⌊nz⌋,j (uj )) X Qp ≤ sup Hr1 ,··· ,rp (ηt ) uj ∈[0,1],z∈[0,1] qnj j=1 rj ! t=1 10  − ≤ ⌊nz⌋ Jj(r1 ,··· ,rp ) (uj ) X Qp Hr1 ,··· ,rp (ηt ) j=1 rj ! t=1 qnj 1 Qp ⌊nz⌋ X sup Hr1 ,··· ,rp (ηt ) j=1 rj ! z∈[0,1] t=1 Note that Hr1 ,··· ,rp (ηt ) = lim sup n mj (d−1/2) n→ Qp j=1   sup uj ∈[0,1] −1 Jj(r1 ,··· ,rp ) (D⌊nz⌋,j (uj )) − Jj(r1 ,··· ,rp ) (uj ) . Hrj (ηt,j ). Using the results of Mori & Oodaira (1987), we have − m2j p Y ⌊nz⌋ Lη,j (n) log log n j=1 sup z∈[0,1] t=1 almost surely. Then, by the mean value theorem, we derive sup uj ∈[0,1] X 2(mj +1)/2 Hr (ηt ) = p cj (r, d) (3.10) −1 Jj(r1 ,··· ,rp ) (D⌊nz⌋,j (uj )) − Jj(r1 ,··· ,rp ) (uj ) ′ −1 e ⌊nz⌋,j (uj ))| = sup |D⌊nz⌋,j (uj ) − uj )||Jj(r1 ,··· ,rp ) (D uj ∈[0,1] ′ e −1 (uj ) − uj )| ≤ |D−1 (uj ) − uj )| and |J e where |D j(r1 ,··· ,rp ) (D⌊nz⌋,j (uj ))| is uniformly bounded. ⌊nz⌋,j ⌊nz⌋,j Then, from the proof (3.10) of Proposition 2.2 in Csörgő et al. (2006), we obtain sup uj ∈[0,1] qnj Q⌊nz⌋,j (uj ) ⌊nz⌋ uj ∈[0,1]   m2j  p Y   Lη,j (n) log log n  → 0. = O n2d−1 −1 D⌊nz⌋,j (uj ) − uj ) = sup j=1 as n → ∞. This yields sup uj ∈[0,1] −1 Jj(r1 ,··· ,rp ) (D⌊nz⌋,j (uj )) − Jj(r1 ,··· ,rp ) (uj )   = O n2d−1 p Y j=1  m2j   Lη,j (n) log log n  → 0. (3.11) as n → ∞. Therefore, by combining (3.10) and (3.11), we conclude that sup uj ∈[0,1] p Q⌊nz⌋,j (uj ) − B⌊nz⌋,j (uj ) → 0, as n → ∞, which complete the proof of proposition. 4 4.1 Weak convergence of the sequential empirical copula processes Weak convergence of the processes in (2.5) In this subsection, we study the asymptotic behavior of the sequential empirical copula processes D⌊nz⌋ . In the case of long-range dependent sequences, the limiting distributions of the D⌊nz⌋ are usually dependent on the Hermite rank r of the class of functions I{Ut ≤ u} − C(u), and determined by functions G1 , · · · , Gp . Thus, we show first the asymptotics of D⌊nz⌋ under lower Hermite ranks. 11 Lemma 4.1. If the Condition 2.1 and (2.2) holds true, the class of functions I{Ut ≤ u} − C(u) has a Hermite rank r = 1 and 0 < r(1 − 2d) < 1, then B⌊nz⌋ (u) = ⌊nz⌋ {D⌊nz⌋ (u) − C(u)} qn BC (u) weakly converges to  BC (u) = −φ(Φ−1 (u1 ))H1,0,··· ,0 (z) −  with covariance function (j) (j) Cov(H1 (z1 ), H1 (z2 )) = (j) p X j=2  (j) φ(Cj|1,··· ,j−1 (uj ) H1 (z) 1  1+2d |z1 | + |z2 |1+2d − |z1 − z2 |1+2d , 2 (4.1) where the processes H1 (z) denotes the jth independent copies of fractional Brownian motions. Proof. For simplicity of proof, we discuss here only with the bivariate case. Let us first compute the Hermite coefficients J1,0 (u) and J0,1 (u). Let −1 and G2 (η1 , η2 ) = C2|1 (F2 (η2 )|η1 )) G1 (η1 ) = η1 −1 in L2 (R2 , φ(η1 )φ(η2 )), where C2|1 (F2 (η2 )|η1 ) is monotonically nondecreasing for given η1 and −1 strictly increasing on the set of Lebesgue measure and denote as C2|1 . By using the formula (2.9), we can calculate the Hermite coefficient J1,0 (u1 , u2 ) = E[I(Ut,1 ≤ u1 , Ut,2 ≤ u2 ) − C(u1 , u2 )]H1 (η1 ) Z = I(F1 (G1 (η1 )) ≤ u1 , F2 (G2 (η2 , η1 )) ≤ u2 )η1 φ(η1 )φ(η2 )dη1 dη2 R2 Z −1 = I(η1 ≤ Φ−1 (u1 ))I(C2|1 (F2 (η2 )|η1 ) ≤ u2 )η1 φ(η1 )φ(η2 )dη1 dη2 R2  Z  Z  −1 = I(η1 ≤ Φ−1 (u1 )) I C2|1 (F2 (η2 )|η1 ) ≤ u2 φ(η2 )dη2 η1 φ(η1 )dη1 R = Z 0 Φ−1 (u1 ) R η1 φ(η1 )dη1 = −φ(Φ−1 (u1 )). is nonzero, where H1 (η1 ) = η1 and the limit distribution in the right hand side of (4.9) is −φ(Φ−1 (u1 ))H1,0 (1) and the Hermite rank is one. The process H1,0 (1) is a Gaussian with mean zero and unit variance. Furthermore, we also calculate J0,1 (u1 , u2 ) = E[I(Ut,1 ≤ u1 , Ut,2 ≤ u2 ) − C(u1 , u2 )]H1 (η2 ) Z I(F1 (G1 (η)) ≤ u1 , F2 (G2 (η2 , η1 )) ≤ u2 )η2 φ(η1 )φ(η2 )dη1 dη2 = 2 ZR −1 = I(η1 ≤ Φ−1 (u1 ))I(C2|1 (F2 (η2 )|η1 ) ≤ u2 )η2 φ(η1 )φ(η2 )dη1 dη2 R2  Z  Z  −1 −1 I(η ≤ Φ (u1 )) = I C2|1 (F2 (η2 )|η1 ) ≤ u2 η2 φ(η2 )dη2 φ(η1 )dη1 R R Z = −φ(C2|1 (u2 )) I(η1 ≤ Φ−1 (u1 ))φ(η1 )dη1 R = −φ(C2|1 (u2 )). is also nonzero. Thus, by the results of Taqqu (1975), the limiting processes H1,0 (1) and H0,1 (1) are fractional Brownian motions with mean zero, stationary increments as in (4.1). Consequently, by induction method, this result can be extended to the multivariate cases. 12 Now we will establish a limiting distribution of empirical copula process B⌊nz⌋ with Hermite rank r = 2 case. The limiting process of H2 (z) are more difficult than H1 (z): Lemma 4.2. If the Condition 2.1 and (2.2) holds true, the class of functions I{Ut ≤ u} − u has Hermite rank r = 2 and 0 < r(1 − 2d) < 1, then q 2F1−1 (u1 ) F1−1 (u1 ) ⌊nz⌋ √ {D⌊nz⌋ (u) − C(u)} − e− 2 H2,0··· ,0 (z) B⌊nz⌋ (u) = qn 2! π q  p 2Cj|1,··· ,j−1 (Fj−1 (uj )) Cj|1,··· ,j−1 (Fj−1 (uj )) X   H(j) 2 √ − (4.2) e− 2 (z), 2! π j=2 where the process Hj2,0,··· ,0 (z) are the jth independent copies of Rosenblatt process, which are nonGaussian and has stationary increments, the covariance function of Hr1 ,··· ,rp (z) is given by Cov(Hj2 (z1 ), Hj2 (z2 )) = 1  4d |z1 | + |z2 |4d − |z1 − z2 |4d . 2 (4.3) Proof. Since the limiting processes of D⌊nz⌋ (u) are usually dependent on the Hermite rank r of the class of functions I(Ut ≤ u) − C(u) and it is determined by the functions G1 and G2 , we need to compute the Hermite coefficients. h i2 −1 Consider the function G1 (η1 ) = η12 and G2 (η1 , η2 ) = C2|1 (F2 (η2 )|η1 ) and H2 (ηj ) = ηj2 − 1 for j = 1, 2. Thus, we calculate the Hermite coefficients J2,0 , J0,2 and J1,1 respectively. J1,0 (u1 , u2 ) = E[I(U1 ≤ u1 , U2 ≤ u2 ) − C(u1 , u2 )]H1 (η1 ) = E [I{F1 (G1 (η1 )) ≤ u1 , F2 (G2 (η1 , η2 )) ≤ u2 }] η1   q q −1 = E I − F1 (u1 ) ≤ η1 ≤ F1−1 (u1 )  q q −1 − F2−1 (u2 ) ≤ C2|1 (F2 (η2 )|η1 ) ≤ F2−1 (u2 ) η1  Z   q q I − F1−1 (u1 ) ≤ η1 ≤ F1−1 (u1 ) η1 φ(η1 )dη1 = R  Z   q q −1 (F2 (η2 )|η1 ) ≤ F2−1 (u2 ) φ(η2 )dη2 = 0. I − F2−1 (u2 ) ≤ C2|1 × R By symmetricity of J1,0 and J0,1 , we obtain J0,1 (u1 , u2 ) = 0. If r = 2, then we have J2,0 (u1 , u2 ) = E[I(U1 ≤ u1 , U2 ≤ u2 ) − C(u1 , u2 )]H2 (η1 ) = E[I(U1 ≤ u1 , U2 ≤ u2 ) − C(u1 , u2 )](η12 − 1)  Z   q q = I − F1−1 (u1 ) ≤ η1 ≤ F1−1 (u1 ) (η12 − 1)φ(η1 )dη1 R  Z   q q −1 I − F2−1 (u2 ) ≤ C2|1 × (F2 (η2 )|η1 ) ≤ F2−1 (u2 ) φ(η2 )dη2 R q Z √F1−1 (u1 ) 2F1−1 (u1 ) F1−1 (u1 ) √ (η12 − 1)φ(η1 )dη1 = − = √ e− 2 . −1 π − F1 (u1 ) Note that x1 = F1−1 (u1 ). By symmetricity of J0,2 (u) and J2,0 (u), we can easly derive J0,2 (u1 , u2 ) = E[I(U1 ≤ u1 , U2 ≤ u2 ) − C(u1 , u2 )]H2 (η2 ) = E[I(U1 ≤ u1 , U2 ≤ u2 ) − C(u1 , u2 )](η22 − 1) 13 =  Z   q q I − F1−1 (u1 ) ≤ η1 ≤ F1−1 (u1 ) φ(η1 )dη1 R  Z   q q −1 I − F2−1 (u2 ) ≤ C2|1 × (F2 (η2 )|η1 ) ≤ F2−1 (u2 ) (η22 − 1)φ(η2 )dη2 R √ −1 Z F2 C2|1 ( = C2|1 (− (u2 )|η1 ) √ F2−1 (u2 )|η1 ) (η22 − 1)φ(η2 )dη2 q 2C2|1 (F1−1 (u2 )|η1 ) C2|1 (F1−1 (u2 )|η1 ) 2 √ e− . =− π Thus, limiting processes H2,0 (z), H0,2 (z) are called Rosenblatt process and Hermite rank r = 2, it is not difficult to see that H2,0 (z), H0,2 (z) are non-Gaussian, and has stationary increments with covariance 1  4d |z1 | + |z2 |4d − |z1 − z2 |4d . Cov(H2,0 (z1 ), H2,0 (z2 )) = 2 However, we need to calculate J1,1 (u1 , u2 ) = E[I(F1 (G1 (η1 )) ≤ u1 , F2 (G2 (η1 , η2 )) ≤ u2 )]H1 (η1 )H1 (η2 )  Z   q q −1 −1 I − F1 (u1 ) ≤ η1 ≤ F1 (u1 ) η1 φ(η1 )dη1 = R  Z   q q −1 −1 −1 I − F2 (u2 ) ≤ C2|1 (F2 (η2 )|η1 ) ≤ F2 (u2 ) η2 φ(η2 )dη2 × R √ √ −1 −1 Z Z F1 = − √ (u1 ) F1−1 (u1 ) F2 C2|1 ( η1 φ(η1 )dη1 C2|1 (− (u2 )|η1 ) √ F2−1 (u2 )|η1 ) η2 φ(η2 )dη2 = 0. By the results of Taqqu (1975), we can now conclude that the limiting distributions H2,0 (z) and H0,2 (z) of D⌊nz⌋ (u) are no longer Gaussian, which are called the Rosenblatt process with stationary increments as described in (4.3). By using the induction, we can conclude that (4.2) holds true. Furthermore, the limiting distributions of the process B⌊nz⌋ are no longer a Gaussian process (which are called Hermite processes) if the class of functions I{Ut ≤ u} − C(u) has Hermite rank r > 2. We will summarize this resul in the following theorem. Theorem 4.3. Let (ηt,j )t∈Z be stationary Gaussian processes satisfying Condition 2.1 and 2.2. Let the subordinated process class of functions {I{Ut ≤ u} − C(u) Pthe Pp Xt,j = Gj (ηt ) as in (2.2). Then p have Hermite rank j=1 rj = r > 2 and satisfies 0 < j=1 rj (1 − 2dj ) < 1 for dj 6= d ∈ (0, 1/2) such that B⌊nz⌋ (u) = M X ⌊nz⌋ ∗ · · · r∗ ) {D⌊nz⌋ (u) − C(u)} qn (r11 1p ρi i=1 ∗ ···r ∗ (u) Jr11 1p ∗ ! · · · r∗ ! r11 1p ∗ ···r ∗ (z), Hr11 1p (4.4) and If the all memory parameters dj = d ∈ (0, 1/2), then B⌊nz⌋ (u) = ⌊nz⌋ {D⌊nz⌋ (u) − C(u)} qn (r1 · · · r1 ) Pp X j=1 rj =r Jr1 ···r1 (u) Hr ···r (z), r1 ! · · · rp ! 1 1 (4.5) for all u ∈ [0, 1]p and z ∈ [0, 1] in the space l∞ ([0, 1]p+1 ) of uniformly bounded functions on [0, 1]p+1 equipped with supremum norm k · k∞ , where the Hermite process Hr1 ···rp (z) is given in (2.10). 14 Proof. The asymptotic behavior of the empirical processes B⌊nz⌋ (u) can be established based on the multivariate reduction principle obtained by Mounirou (2016) for dj 6= d for j = 1, · · · , p. or the results of Theorem 9 in Arcones (1994) for dj = d for j = 1, · · · , p respectively. Since −1 −1 Xt,j ≤ F⌊nz⌋,j (uj ) ≤ uj if and only if Ut,j ≤ D⌊nz⌋,j (uj ) for all t ∈ {1, · · · , n}, j ∈ {1, · · · , p}. Without loss of generality, we can assume that Xt and Ut has copula C such that the multivariate expansion of D⌊nz⌋ (u) − C(u) in Hermite polynomials is written as ⌊nz⌋ ∗ · · · r∗ ) {D⌊nz⌋ (u) − C(u)} qn (r11 1p = ⌊nz⌋ M ∗ ···r ∗ (u) X X Jri1 1 ip ∗ ∗ (ηt,1 ) · · · H Hri1 rip (ηt,p ), ∗ ∗ · · · r∗ ) ∗ qn (r11 1p i=1 ri1 ! · · · rip ! t=1 then based on the result of Proposition 1 and 2 in Mounirou (2016), we derive ⌊nz⌋ X 1 ∗ ∗ (ηt,1 ) · · · H Hri1 rip (ηt,p ) ∗ · · · r∗ ) qn (r11 1p t=1 ∗ ···r ∗ (z), Hri1 ip in the unifrom space D([0, 1]p ), Thus we derive (4.4). If the memory parameters dj = d, j = 1, · · · , p are all equal, then (4.5) can be derived based on the Theorem 9 in Arcones (1994). However, they prove their results by using a tightness condition on the empirical process rather than a uniform reduction principle. 4.2 Weak convergence of the processes in (2.6) In this section, we first study the aysmptotic behavior of the empirical processes B⌊nz⌋ under the long-range dependent sequences, where the mempory parameters dj are all equal. Then, to establish the weak convergence of the empirical copula process C⌊nz⌋ under long-range dependence, a smoothness condition on copula C as point out by Segers (2012) is still needed. This condition is very useful to establish the weak convergence of empirical copula process C⌊nz⌋ on the boundaries as well as important for the limiting process of C⌊nz⌋ to exist and to have continuous trajectories. Condition 4.4. For j = 1, · · · , p, the jth first-order partial derivative Ċj exists and is continuous on the set {u ∈ [0, 1]p | uj ∈ (0, 1)} for all j = 1, · · · , p. Under Condition 4.4, the partial derivatives Cj can be  C(u+hej )−C(u)  , lim sup  h   h→0  C(u+hej ) , Ċj (u) = lim sup h h↓0    C(u)−C(u−hej )  , lim sup h defined on whole unit cube [0, 1]p by for 0 < uj < 1, for uj = 0, (4.6) for uj = 1, h→0 ′ where e1 denotes the first column of a 2 × 2 matrix and u = (u1 , · · · , up ) ∈ [0, 1]p . It can be seen from (4.6) that it expand the application of the many copula families, see, e.g., Segers (2012). The asymptotic behavior of the empirical copula process under i.i.d and weakly dependent cases has been established in number of literature Ruschendorf (1976), Fermanian et al. (2004),Doukhan et al. (2008),Segers (2012),Bücher & Ruppert (2013) and Bücher & Volgushev (2013). Here we study the limiting distributions of the sequential empirical copula processes with the Hermite rank r ≥ 1. b t ≤ u}−C(u) with U b t = (U bt,1 , · · · , U bt,p )′ for all u ∈ [0, 1]p has Hermite If the class of functions I{U rank r ≥ 1, then the limiting distributions converges to Hermite processes. Our main results are summarized in the following theorem: Theorem 4.5. Let (ηt,j )t∈Z be stationary Gaussian processes satisfying Condition 2.1 and 2.2. Let b t ≤ u} − C(u) the subordinated process Xt,j = Gj (ηt ) as in (2.2). Then the class of functions I{U 15 Pp have Hermite rank r and satisfies 0 < j=1 rj (1 − 2dj ) < 1. Moreover, let Jr1 ,··· ,rp (u) and the ′ ′ derivatives Jr1 ,··· ,rp (u) are uniformly bounded and supu∈[0,δn ] |Jr1 ,··· ,rp (u)| = O(δn ). If copula C satisfies the Condition 4.4 and the memory parameters are same dj = d ∈ (0, 1/2), then C⌊nz⌋ (u) = ⌊nz⌋ {C⌊nz⌋ (u) − C(u)} qn (r1 · · · rp ) converges weakly to Cz (u) = Pp X j=1 rj =r − Ċ2 (u) Jr1 ···rp (u) Jr (u1 ) Hr ···r (z) − Ċ1 (u) 1 Zr1 (z) r1 ! · · · rp ! 1 p r1 ! ∞ X r1 +r2 =m2 Jr1 ,r2 (u2 ) Zr1 ,r2 (z) · · · − Ċp (u) r1 !r2 ! r ∞ X 1 +···+rp =mp Jr1 ···rp (up ) Zr1 ···rp (z) (4.7) r! · · ·!rp ! for all u ∈ [0, 1]p , z ∈ [0, 1] in l∞ ([0, 1]p+1 ), where Ċj denotes the j-th partial derivatives of C. Proof. The weak convergence of C⌊nz⌋ can be achieved by two different methods. One of the methods is functional delta method, which was applied in Fermanian et al. (2004) and Bücher (2011) for i.i.d case respectively. The another one is Seger’s method introduced in Segers (2012). These both methods are still valid for the case of long-memory sequences to derive the weak convergence of the sequential empirical copula processes C⌊nz⌋ . Here we prefer to establish the weak convergence of C⌊nz⌋ by using Segers’ approach. To show the weak convergence C⌊nz⌋ Cz , it suffices to prove for u ∈ [0, 1]p : sup z∈[0,1],u∈[0,1]p where p b ⌊nz⌋ (u − C⌊nz⌋ (u) → C 0, b ⌊nz⌋ (u) = B⌊nz⌋ (u) − C p X as n → ∞, Ċj (u)B⌊nz⌋,j (uj ) j=1 is the sequence of processes of Cz (u) in ℓ∞ ([0, 1]p+1 ). The supremum is zero if uj = 0 for some j = 1, · · · , p. For simpilicity, we denote the quantile marginal sequential empirical distributions as −1 −1 v⌊nz⌋ (u) = (D⌊nz⌋,1 (u1 ), · · · , D⌊nz⌋,2 (up )) for all u ∈ [0, 1]p , z ∈ [0, 1] then we decompose the empirical copula process C⌊nz⌋ by [nz] {C⌊nz⌋ (u) − C(u)} qn (r1 · · · rp ) ⌊nz⌋ ⌊nz⌋ = {D⌊nz⌋ (vn (u)) − C(v⌊nz⌋ (u))} + {C(v⌊nz⌋ (u)) − C(u)} qn (r1 · · · rp ) qn (r1 · · · rp ) [nz] = B⌊nz⌋ (v⌊nz⌋ (u)) + {C(v⌊nz⌋ (u)) − C(u)}. (4.8) qn (r1 · · · rp ) C⌊nz⌋ (u) = ∗ ∗ Note that the normalizing factor qn (r11 · · · r1p ) can be reduced to qn (r1 · · · rp ) if the memory parameters dj = d are all equal. As we proved above, B⌊nz⌋ (u) converges weakly to the process in (3.3) in a metric space l∞ ([0, 1]p+1 ) and have continuous trajectories. From the proof of Proposition 3.4, we have sup z∈[0,1],uj ∈[0,1] −1 |D⌊nz⌋,j (uj ) − uj | → 0, 16 a.s. Then we show that sup z∈[0,1],u∈[0,1]p B⌊nz⌋ (v⌊nz⌋ (u)) − B⌊nz⌋ (u) ⌊nz⌋ {D⌊nz⌋ (v⌊nz⌋ (u)) − D⌊nz⌋ (u))} qn (r1 · · · rp ) ≤ = sup z∈[0,1],u∈[0,1]p ⌊nz⌋ Jr1 ,··· ,rp (v⌊nz⌋ (u)) X 1 Qp Hr1 ,··· ,rp (ηt ) qn (r1 , · · · , rp ) j=1 rj ! t=1 ⌊nz⌋ Jr1 ,··· ,rp (u) X − Q Hr1 ,··· ,rp (ηt ) p j=1 rj ! t=1 ⌊nz⌋ X 1 Qp Hr1 (ηt ) · · · Hr1 (ηt ) sup qn (r1 , · · · , rp ) j=1 rj ! z∈[0,1] t=1 ≤ × where P⌊nz⌋ t=1 sup z∈[0,1],u∈[0,1]p Jr1 ,··· ,rp (v⌊nz⌋ (u)) − Jr1 ,··· ,rp (u) , (4.9) Hr1 ,··· ,rp (ηt ) is bounded as we shown in (3.10). By the mean value theorem, we get sup z∈[0,1],u∈[0,1]p = Jr1 ,··· ,rp (v⌊nz⌋ (u)) − Jr1 ,··· ,rp (u) sup z∈[0,1],u∈[0,1]p ′ v⌊nz⌋ (u))|, |v⌊nz⌋ (u) − u||Jr1 ,··· ,rp (e ′ where supz∈[0,1],u∈[0,1]p |v⌊nz⌋ (u) − u| → 0 and |e v⌊nz⌋ (u) − u| ≤ |v⌊nz⌋ (u) − u| and |Jr1 ,··· ,rp (u)| is uniformly bounded. Therefore, (4.9) converges to zero in distribution. For the second term in the right hand side of (4.8), we set A(δ) = u + δ{vn (u) − u} and f (δ) = C(A(δ)) for fixed u ∈ [0, 1]p . If u ∈ (0, 1]p , then vn (u) ∈ (0, 1)p and A(δ) ∈ (0, 1)p for all δ ∈ (0, 1]. The Condition 4.4 yields the function f is continuous on [0, 1] and continuously differentiable on (0, 1). By the mean value theorem, we can write p ⌊nz⌋ X ⌊nz⌋ −1 Ċj (A(δ)){D⌊nz⌋,j (uj ) − uj }. {C(v⌊nz⌋ (u)) − C(u)} = qn (r1 · · · rp ) qnj j=1 (4.10) From (4.10), we note that if the j-th component ujanumberof = 0, then the terms on the right hand side of (4.10) is still holds true whether δ ∈ (0, 1) is well-defined or not, because both side of (4.10) are equal to zero. On the other word, if uj = 0 for some j = 1, · · · , p, then the j-th −1 term is vanished due to D⌊nz⌋,j (0) = 0 and the j-th derivatives Ċj also vanish at this point. By Proposition 3.4, the Bahadur-Kiefer processes will be approximated as sup z∈[0,1],uj ∈[0,1] ⌊nz⌋ ⌊nz⌋ −1 p {D⌊nz⌋,j (uj ) − u} + {D⌊nz⌋,j (uj ) − uj } → 0. qnj qnj as n → ∞. If the Condition 4.4 satisfies, then we know that the first order partial derivatives Ċj in [0, 1] such that sup u∈[0,1]p ,z∈[0,1] p X ⌊nz⌋ p Ċj (u + δ{v⌊nz⌋ (u) − u})B⌊nz⌋,j (uj ) → 0, {C(v⌊nz⌋ (u)) − C(u)} + qn (r1 · · · rp ) j=1 as n → ∞. Finally, it remains to show that sup u∈[0,1]p ,z∈[0,1] p R⌊nz⌋,j (u) = Ċj (u + δ{v⌊nz⌋ (u) − u}) − Ċj (u) |D⌊nz⌋,j (uj ) − uj | → 0. 17 as n → ∞. As in Segers (2012), for fixed ε > 0 and ω ∈ (0, 1/2), we can decompose the probability of R⌊nz⌋,j (u) over supremum u ∈ [0, 1]p based on the intervals uj ∈ [ω, 1 − ω] and uj ∈ [0, ω) ∪ (1 − ω, 1] respectively, i.e., ! ! sup P u∈[0,1]p ,z∈[0,1] R⌊nz⌋,j (u) > ε ≤P sup u∈[0,1]p ,z∈[0,1],uj ∈[ω,1−ω] +P R⌊nz⌋,j (u) > ε sup u∈[0,1]p ,z∈[0,1],uj ∈[ω,1−ω] / ! R⌊nz⌋,j (u) > ε . (4.11) For the first term on the right-hand side of (4.11), we derive that the probability converges to zero. Since sup |v⌊nz⌋ (u) − u| → 0, z∈[0,1],u∈[0,1]p almost surely and the partial derivatives Ċj are uniformly continuous on the set {u ∈ [0, 1]p , uj ∈ [ω/2, 1 − ω/2]} and bounded by 0 ≤ Ċj (A) ≤ 1 and the supremum of the empirical process ⌊nz⌋ qnj supu∈[0,1] |D⌊nz⌋,j (uj ) − uj | is bounded in distribution. As for the second term on the right hand side of (4.11), by using the portmanteau lemma we can bound the probability by ! ! lim sup P n→∞ sup z∈[0,1],uj ∈[0,ω)∪(1−ω,1] |B⌊nz⌋,j (uj )| ≥ ε ≤P sup uj ∈[0,ω)∪(1−ω,1] |Bj (uj )| ≥ ε . Hence, for any small µ > 0, the probability (4.11) is lim sup P n→∞ sup u∈[0,1]p ,z∈[0,1] R⌊nz⌋,j (u) > ε ! ≤ µ, which complete the proof of theorem. Remark 4.6. These convergence results can be extended to Gaussian subordinated processes with covariance 1 γη,j (k) :∼ Lη,j (k)|k|2dj −1 , d1 , · · · , dp ∈ (0, ), 2 where the memory parameters dj are not necessarily all equal. Remark 4.7. B⌊nz⌋ (u) in Lemma 4.1 and Lemma 4.2 with the case r = 1 and r = 2 we can establish the asymptotic properties of the sequential empirical copula processes C⌊nz⌋ by using the same arguments as in Theorem 4.5. More precisely, the asymptotic behavior of the empirical copula process C⌊nz⌋ under Condition 4.4 with lower Hermite rank can also be derived by the methods of Segers Segers (2012) or functional delte method Bücher & Volgushev (2013). The functional delta methods studied by Bücher & Volgushev (2013) are applied to more general setting. Remark 4.8. If the memory parameters dj = 0, then the stationary Gaussian sequences {ηt,j }t∈Z display P shor-memory behavior and the autocovariance functions are summable. More specifically, if k∈Z |γη,j (k)|r < ∞, then √ BC Bn (u) = n{Dn (u) − C(u)} in metric space D([0, 1]p ), where BC is mean-zero Gaussian field with covariance X Cov(BC (u), BC (u)) = Cov (I(U0 ≤ u), I(Ut ≤ v)) , u, v ∈ [0, 1]p . t∈Z Furthermore, under Condition 4.4 and by using the same method, the empirical copula processes C⌊nz⌋ converges weakly to a Gaussian field GC in ℓ∞ ([0, 1]p ), which can be expressed as GC (u) = BC (u) − p X Ċj (u)Bj (uj ), j=1 18 u ∈ [0, 1]p . This can also be achieved by using a functional delta method introduced by Bücher & Volgushev (2013). 5 Conclusion We mainly focus on the problem of nonparametric estimation for copula-based time series models under long-range dependence. The multivariate copula-based time series are subordinated by nonlinear transformation of Gaussian processes, where the observable time series exhibit longmemory behavior. We establish limit theorems for the sequential empirical copula processes C⌊nz⌋ in the context of long-memory. This is essential step to testing problems and it plays a central role in many applications of copulas. On the other hand, there are many open problems for future research including semiparametric estimations for copula paramters under Gaussian subordinated long-memory processes and linear moving avarage process (linear long-memory process), other copula families and goodness-of-fit tests ect. Acknowledgements I would like to thank Prof. Jan Beran give me a helpful idea and necessary advice to finish the paper. References Arcones, M. A. 1994. Limit theorems for nonlinear functionals of a stationary Gaussian sequence of vectors. The Annals of Probability, 22(4), 2242–2274. Bai, S. Y., & Taqqu, M. S. 2013. Multivariate limit theorems in the context of long-range dependence. Journal of Time Series Analysis, 34(6), 717–743. Beran, J. 1994. Statistics for Long-Memory Processes. Chapman and Hall. Beran, J. 2016. On the effect of long-range dependence on extreme value copula estimation with fixed marginals. Communications in Statistics - Theory and Methods, 45(19), 5590–5618. Beran, J., Feng, Y., Ghosh, S., & Kulik, R. 2013. Long-Memory Processes: Probabilistic Properties and Statistical methods. Springer Berlin Heidelberg. Bücher, A. 2011. Statistical inference for copulas and extremes. PhD Thesis, Bochum. Bücher, A., & Ruppert, M. 2013. Consistent testing for a constant copula under strong mixing based on the tapered block multiplier technique. Journal of Multivariate Analysis, 116, 208–229. Bücher, A., & Volgushev, S. 2013. Empirical and sequential empirical copula processes under serial dependence. Journal of Multivariate Analysis, 119, 61–70. Buchsteiner, J. 2015. The sequential empirical process of nonlinear long-range dependent random vectors. –. Chicheportiche, R., & Chakraborti, A. 2014. Copulas and time series with long-ranged dependencies. Physical Review E, 89(4). Csörgő, M., Szyszkowicz, B., & Wang, L. 2006. Strong invariance principles for sequential Bahadur–Kiefer and Vervaat error processes of long-range dependent sequences. The Annals of Statistics, 34(2), 1013–1044. Dehling, H., & Taqqu, M. S. 1989. The Empirical Process of some Long-Range Dependent Sequences with an Application to U-Statistics. The Annals of Statistics, 17(4), 1767–1783. 19 Dobrushin, R. L., & Major, P. 1979. Non-central limit theorems for non-linear functional of Gaussian fields. Zeitschrift fr Wahrscheinlichkeitstheorie und Verwandte Gebiete, 50(1), 27–52. Doukhan, P., Fermanian, J-D., & Lang, G. 2008. An empirical central limit theorem with applications to copulas under weak dependence. Statistical Inference for Stochastic Processes, 12(1), 65–87. Fermanian, J-D., Radulovic, D., & Wegkamp, M. 2004. Weak convergence of empirical copula processes. Bernoulli, 10(5), 847–860. Frees, E. W., & Valdez, E. A. 1998. Understanding Relationships Using Copulas. North American Actuarial Journal, 2(1), 1–25. Gaenssler, P., & Stute, W. 1987. Seminar on Empirical Processes. Birkhäuser-Verlag, Basel. Ibragimov, R., & Lentzas, G. 2017. Copulas and long memory. Probability Surveys, 14(0), 289–327. Joe, H. 1997. Multivariate Models and Multivariate Dependence Concepts. Chapman and Hall. Leonenko, N. N., & Sakhno, L. M. 2001. On the Kaplan-meier estimator of long-range dependent sequences. Statistical Inference for Stochastic Processes, 4(1), 17–40. Marinucci, D. 2005. The empirical process for bivariate sequences with long-memory. Statistical Inference for Stochastic Processes, 8(2), 205–223. McNeil, A., Frey, R., & Embrechts, P. 2005. Quantitative Risk Management. Vol. 10. Princeton University Press, New Jersey. Mori, T., & Oodaira, H. 1987. The functional iterated logarithm law for stochastic processes represented by multiple Wiener integrals. Probability Theory and Related Fields, 76(3), 299–310. Mounirou, I. 2016. The multivariate empirical for long-memory processes. Journal Statistics and Mathematical Sciences. Nelsen, R. B. 2006. An Introduction to Copulas. Springer Series in Statistics, Springer, New York. Patton, A. J. 2009. Copula–Based Models for Financial Time Series. Pages 767–785 of: Handbook of Financial Time Series. Springer Berlin Heidelberg. Remillard, B. 2010. Goodness-of-fit tests for copulas of multivariate time series. SSRN Electronic Journal. Rémillard, B., Papageorgiou, N., & Soustra, F. 2012. Copula-based semiparametric models for multivariate time series. Journal of Multivariate Analysis, 110, 30–42. Ruschendorf, L. 1976. Asymptotic distributions of multivariate rank order statistics. The Annals of Statistics, 4(5), 912–923. Segers, J. 2012. Asymptotics of empirical copula processes under non-restrictive smoothness assumptions. Bernoulli, 18(3), 764–782. Taqqu, M. 1975. Weak convergence to fractional Brownian motion and to the Rosenblatt process. Advances in Applied Probability, 7(02), 249. Taufer, E. 2015. On the empirical process of strongly dependent stable random variables: asymptotic properties, simulation and applications. Statistics and Probability Letters, 106, 262–271. 20 Tsukahara, H. 2005. Semiparametric estimation in copula models. Canadian Journal of Statistics, 33(3), 357–375. Vaart, A. W., & Wellner, J. A. 1996. Weak Convergence and Empirical Processes. Springer Series in Statistics, Springer, New York. 21
10math.ST
WNGrad: Learn the Learning Rate in Gradient Descent arXiv:1803.02865v1 [stat.ML] 7 Mar 2018 Xiaoxia Wu *12 Rachel Ward *12 Léon Bottou 2 Abstract Adjusting the learning rate schedule in stochastic gradient methods is an important unresolved problem which requires tuning in practice. If certain parameters of the loss function such as smoothness or strong convexity constants are known, theoretical learning rate schedules can be applied. However, in practice, such parameters are not known, and the loss function of interest is not convex in any case. The recently proposed batch normalization reparametrization is widely adopted in most neural network architectures today because, among other advantages, it is robust to the choice of Lipschitz constant of the gradient in loss function, allowing one to set a large learning rate without worry. Inspired by batch normalization, we propose a general nonlinear update rule for the learning rate in batch and stochastic gradient descent so that the learning rate can be initialized at a high value, and is subsequently decreased according to gradient observations along the way. The proposed method is shown to achieve robustness to the relationship between the learning rate and the Lipschitz constant, and near-optimal convergence rates in both the batch and stochastic settings (O(1/T ) for smooth loss in the batch setting, and √ O(1/ T ) for convex loss in the stochastic setting). We also show through numerical evidence that such robustness of the proposed method extends to highly nonconvex and possibly non-smooth loss function in deep learning problems. Our analysis establishes some first theoretical understanding into the observed robustness for batch normalization and weight normalization. 1. Introduction Recall the standard set-up for gradient descent: we consider the general problem of minimizing a “loss function” f : Rd → R, min x f (x) (1) and given access only to first-order/gradient evaluations of f , we iteratively move in the direction of the negative gradient until convergence: xj+1 ← xj − ηj ∇f (xj ). Gradient descent enjoys nice convergence guarantees if the learning rate ηj = η is tuned just right according to the scale of the smoothness of the gradient function ∇f (x); on the other hand, if the learning rate is chosen slightly larger than the optimal value, gradient descent with constant learning rate can oscillate or even diverge. Thus, in practice, one instead uses iteration-dependent learning rate ηj , chosen via line search methods (Dimitri, 1999; Wright and Nocedal, 2006). Line search methods work well in the “batch” set-up where the gradients ∇f (xj ) are observed exactly, but notoriously become less effective in the stochastic setting, where only noisy gradient evaluations are given. Recall the standard setting for stochastic gradient descent: Instead of observing a full gradient ∇f (xk ) at iteration k, we observe a stochastic gradient gk , or a random vector satisfying E(gk ) = ∇f (xk ) and having bounded variance Ekgk k2 ≤ G2 . Stochastic gradient descent is the optimization algorithm of choice in deep learning problems, and, more generally, in many large-scale optimization problems where the objective function f can be expressed as a sum of a number component functions fi , of which only have access to a subset (the so-called “training data”). In the stochastic setting, the issue of how to choose the learning rate is less resolved. There are different guidelines for setting the learning “schedule” η1 , η2 , . . . , each guideline having its own justification in the form of a convergence result given a set of structural assumptions on the loss function f . The classical Robbins/Monro theory (Robbins and Monro, * Equal contribution 1 Department of Mathematics, University of Texas at Austin, Austin, TX 2 Facebook AI Research, New York, New York, USA. Correspondence to: Xiaoxia Wu <[email protected]>. WNGrad: Learn the Learning Rate in Gradient Descent 1951) says that if the learning rate is chosen such that ∞ X k=1 ηk = ∞ and ∞ X k=1 ηk2 < ∞, (2) and if the loss function is sufficiently smooth, then limk→∞ E[k∇f (xk )k2 ] = 0 ((Bottou et al., 2016), Corollary 4.12). If the loss function is moreover strongly convex, the stochastic gradient update xk+1 ← xk − ηk gk will converge in expectation to the minimizer . √ If the loss function is convex but not necessarily smooth, then setting ηk = c/ k results in a convergence guarantee of the √ form E[f (xk ) − f ∗ ] ≤ O(log(k)/ k), with an optimal constant if c is chosen properly to depend on the stochastic variance G2 ((Shamir and Zhang, 2013), Theorem 2). If the loss function is µ-strongly convex and has L-Lipschitz smooth gradient, µ then setting ηk = c/k where c is sufficiently small compared to L gives E[f (xk ) − f ∗ ] ≤ O(1/k) ((Bottou et al., 2016), Theorem 4.7). If, moreover, the loss function can be expressed as the average of a number of component functions fi , each of which is itself convex, and if the noisy gradient direction at each iteration is actually the direction of the exact gradient of one of the component functions chosen i.i.d. uniformly from the universe of component functions, and if a bound on the “consistency” parameter σ 2 = Ei [kfi (x∗ )k2 ] is known, then one may take a constant learning rate ηk = η chosen in just the right way with respect to µ, L, and σ 2 to achieve exponential convergence, in expectation, up to a radius around the optimal solution (Bach and Moulines, 2011; Needell et al., 2014). Thus, in the stochastic setting, there is no clear “best choice” for the learning rate. In many deep learning problems, where the underlying loss function is highly non-convex, one often tests several different learning rate schedules of the form ηk = η0 η0 D √ , or ηk = ; , or ηk = 1 + k/τ kG 1 + k/τ where D is the maximal diameter of the feasible set, and G is the norm of the current gradient or an average of recent gradients; the schedule which works best on the problem at hand is then chosen. Another popular and effective choice is to start with a constant learning rate η0 which gives good empirical convergence results or start with a small one followed by a warmup scheme (Goyal et al., 2017), maintain this constant learning rate for a fixed number of epochs over the training data, then decrease the learning rate η1 ← 0.1η0 , and repeat this process until convergence . 1.1. Adaptive Learning Rate Rules In the stochastic setting, it can be advantageous to set different learning rates for different component functions fi (or for different coordinates), with larger learning rates for components with smaller gradients, and smaller learning rates for components with larger gradients, to balance their respective influences. This heuristic is theoretically justified in some cases. The family of adaptive gradient (AdaGrad) algorithms (Duchi et al., 2011) dynamically update each coordinate learning rate by the reciprocal of the root-mean-square of the elements of the gradients for that coordinate which have √ been observed so far. AdaGrad has rigorous theoretical backing: it provably achieves the optimal E[f (xk ) − f ∗ ] ≤ O(1/ k) regret guarantee in the convex setting, with a better constant compared to plain stochastic gradient descent depending on the geometry of the problem. Despite originally being designed in the convex setting, AdaGrad has proven to be very useful beyond the convex set-up – in particular, it improves convergence performance over standard stochastic gradient descent in settings where data is sparse and sparse parameters are more informative; such examples abound in natural language processing. Several subsequent modifications to AdaGrad have been proposed to combat this accumulation including Adadelta (Zeiler, 2012), RMSprop (Srivastava and Swersky), Adam (Kingma and Ba, 2014) and AdaBatch (Alexandre and Francis, 2017); however, these algorithms (except AdaBatch) come with no guarantees of convergence. These adaptive subgradient methods cannot be applied as a general panacea for the learning rate problem, however as they result in biased gradient updates which change the underlying optimization problem. The recent paper (Wilson et al., 2017) provides evidence that while these methods do speed up training time in neural network applications, they nevertheless result in worse generalization error compared to simple methods such as plain stochastic gradient descent with a single learning rate. Another line of work on adaptive learning rates (Needell et al., 2014; Zhao and Zhang, 2015) consider importance sampling in stochastic gradient descent in the setting where the loss function can be expressed as a sum of component functions, and provide precise ways for setting different constant learning rates for different component functions based on their 2 WNGrad: Learn the Learning Rate in Gradient Descent Lipschitz constants; if the sampling distribution over the parameters is weighted so that parameters with smaller Lipschitz constants are sampled less frequently, then this reparametrization affords a faster convergence rate, depending on the average Lipschitz constant between all parameters, rather than the largest Lipschitz constant between them. Of course, in practice, the Lipschitz constants are not known in advance, and must be learned along the way. This begs the question: if we take a step back to the batch/non-stochastic gradient descent setting, is it possible to learn even a single Lipschitz constant, corresponding to the gradient function ∇f , so that we can match the convergence rate of gradient descent with optimized constant learning rate which requires knowledge of the Lipschitz constant beforehand? To our knowledge, this question has not been addressed until now. 1.2. Weight Normalization To answer this question, we turn to simple reparametrizations of weight vectors in neural networks which have been proposed in recent years and have already gained widespread adaptations in practice due to their effectiveness in accelerating training times without compromising generalization performance, while simultaneously being robust to the tuning of learning rates. The celebrated batch normalization (Ioffe and Szegedy, 2015) accomplishes these objectives by normalizing the means and variances of minibatches in a particular way which reduces the dependence of gradients on the scale of the parameters or their initial values, allowing the use of much higher learning rates without the risk of divergence. Inspired by batch normalization, the weight normalization algorithm (Salimans and Kingma, 2016) was introduced as an even simpler reparametrization, also effective in making the resulting stochastic gradient descent more robust to specified learning rates and initialization (Tygert et al., 2015). The weight normalization algorithm, roughly speaking, reparametrizes the loss function in polar coordinates, and runs (stochastic) gradient descent with respect to polar coordinates: If the loss function is r v, where v is a d-dimensional f (x) where x is a d-dimensional vector, then weight normalization considers instead x = kvk vector, r is a scalar, and kvk is the Euclidean norm of v. The analog of the weight normalization algorithm in the batch gradient setting would simply be gradient descent in polar coordinates as follows: rk vk+1 = vk − η∇v f ( vk ) kvk k rk rk = vk − η Pvk⊥ (∇f ( vk )); kvk k kvk k rk rk+1 = rk − η∇r f ( vk ) kvk k rk vk = rk − ηh∇f ( vk ), i (3) kvk k kvk k where Pv⊥ (u) denotes the orthogonal projection of u onto the subspace of co-dimension orthogonal to v. One important feature of note is that, since the gradient of f with respect to v is orthogonal to the current direction v, the norm kvk k grows rη monotonically with the update, thus effectively producing a dynamically-updated decay in the effective learning rate kvk 2. More precisely, considering weight normalization in the batch setting, restricted to the unit sphere (fixing rk = 1), the gradient update reduces to vk+1 vk η vk = − Pvk⊥ (∇f ( )); 2 kvk k kvk k kvk k kvk k η2 vk kvk+1 k2 = kvk k2 + kP ⊥ (∇f ( ))k2 . (4) kvk k2 vk kvk k 1.3. Our contributions Weight normalization (and, to an even larger extent, batch normalization) has proven in practice to be very robust to the choice of the scale of Lipschitz constant η. Inspired by this, and in a first attempt at theoretical understanding of such normalization, we are inspired to consider the following method for updating the learning rate in batch and stochastic gradient descent more generally: starting from x1 ∈ Rd and b1 > 0, repeat until convergence 1 ∇f (xk ); bk 1 = bk + k∇f (xk )k2 . bk 3 xk+1 = xk − bk+1 (5) WNGrad: Learn the Learning Rate in Gradient Descent As a nod to its inspiration, weight normalization, we call this algorithm WNGrad, but note that the update can also be interpreted as a close variant of AdaGrad with the dynamic update applied to a single learning rate; indeed, WNGrad b-update satisfies b2k+1 = b2k + 2k∇f (xk )k2 + 1 k∇f (xk )k4 b2k = b2k + 2k∇f (xk )k2 + O(k∇f (xk )k4 ) which matches the coordinate-wise update rule in AdaGrad if ∇f is one dimension. Nevertheless, WNGrad update (5) offers some insight and advantages over the family or modifications/improvements of AdaGrad update – first, it gives a precise correspondence between the accumulated gradient and current gradient in the update of the bk . Additionally, it does not require any square root computations, thus making the update more efficient. In this paper, we provide some basic theoretical guarantees about WNGrad update. Surprisingly, we are able to provide guarantees for the same learning rate update rule in both the batch and stochastic settings. In the batch gradient descent setting, we show that WNGrad will converge to a weight vector xT satisfying k∇f (xT )k2 ≤  ∗ +L)2 in at most T = O( (f (x1 )−f ) iterations, if f has L-Lipschitz smooth gradient. The proof involves showing that if bk  grows up to the critical level bk ≥ L, it automatically stabilizes, satisfying bk ≤ CL for all time1 . This should be compared to the standard gradient descent convergence rate using constant learning rate η, which in the ideal case η = 1/L achieves O( L ) convergence rate, but which is not guaranteed to converge at all if the learning rate is even slightly too big, η ≥ 2/L. Thus, WNGrad is a provably robust variant to gradient descent which is provably robust to the scale of Lipschitz constant, when parameters like the Lipschitz smoothness are not known in advance. On √the other hand, in the stochastic setting, the bk update in WNGrad has dramatically different behavior, growing like O( Gk ), where G is a bound on the variance of the stochastic gradients. As a result, in the stochastic setting, we also √ show that WNGrad, achieves the optimal O(1/ T ) rate of convergence for convex loss functions, and moreover settles in √ expectation on the “correct” constant, bk ∼ Gk . Thus, WNGrad also works robustly in the stochastic setting, and finds a good learning rate. We supplement all of our theorems with numerical experiments, which show that WNGrad competes favorably to plain stochastic gradient descent in terms of robustness to the Lipschitz constant of the loss function, speed of convergence, and generalization error, in training neural networks on two standard data sets. 2. WNGrad for Batch Gradient Descent Consider a smooth function f : Rd → R with L-Lipschitz continuous gradient (denoted f ∈ CL1 ): for any x, y ∈ Rd , and the optimization problem k∇f (x) − ∇f (y)k ≤ Lkx − yk min f (x). x With knowledge of the Lipschitz constant L, the standard gradient descent update with constant learning rate iterates, starting at x1 ∈ Rd , xj ← xj−1 − η∇f (xj−1 ). (6) The following convergence result is classical ((Nesterov, 1998), (1.2.13)). Lemma 2.1 Suppose that f ∈ CL1 and that f ∗ > −∞. Consider gradient descent with constant learning rate η > 0. If η = δ L and δ ≤ 1, then min k∇f (xj )k2 ≤  j=1:T after at most a number of steps T = 1 C is a constant factor 2L(f (x1 ) − f ∗ ) ; δ 4 WNGrad: Learn the Learning Rate in Gradient Descent On the other hand, gradient descent can oscillate or diverge once η ≥ 2 L. Note that this result requires the knowledge of Lipschitz constant L or an upper bound estimate. Even if such a bound is known, the algorithm is quite conservative; the Lipschitz constant represents the worst case oscillation of the function ∇f over all points x, y in the domain; the local behavior of gradient might be much more regular, indicating that a larger learning rate (and hence, faster convergence rate) might be permissible. In any case, it is beneficial to consider a modified gradient descent algorithm which, starting from a large initial learning rate, decreases the learning rate according to gradient information received so far, and stabilizes at at a rate depends on the local smoothness behavior and so no smaller than 1/L. We consider the following modified gradient descent scheme: Algorithm 1 WNGrad – Batch Setting Input: Tolerance  > 0 Initialize x1 ∈ Rd , b1 > 0, j ← 1 repeat j ←j+1 1 ∇f (xj−1 ) xj ← xj−1 − bj−1 k∇f (x )k2 bj ← bj−1 + bj−1j until k∇f (xj )k2 ≤  Remark 2.2 Initializing b1 and scale invariance. Ideally, one could initialize b1 in WNGrad by sampling R ≥ 2 points u1 , u2 , . . . , uR close to the initialization x1 , and ∇f (u1 ), . . . , ∇f (uR ), and take b1 = max j6=k k∇f (uj ) − ∇f (uk )k ≤ L. kuj − uk k If this is not possible, it is also reasonable to consider an initialization b1 = Ck∇f (x1 )k with a constant C ≥ 0. With either choice, one observes that the resulting WNGrad algorithm is invariant to the scale of f : if f is replaced by λf , then the sequence of iterates x1 , x2 , . . . remains unchanged. We show that the WNGrad algorithm has the following properties: • After a reasonable number of initial iterations, either k∇f (xk )k2 ≤  or bk ≥ L • If at some point bk ≥ L, then the learning rate stabilizes: bj ≤ CL for all j ≥ k. As a consequence, we have the following convergence result. Theorem 2.3 (Global convergence for smooth loss function) Consider the WNGrad algorithm. Set b1 ≥ k∇f (x1 )k. Suppose that f ∈ CL1 , x∗ is the point satisfying ∇f (x∗ ) = 0. and that f ∗ > −∞. Then we have the guarantee min k∇f (xk )k2 ≤  k=1:T after 2(f (x1 )−f ∗ )(b1 +8(f (x1 )−f ∗ ))  Case 1 T = Case 2 T =1+ L2 (1−δ)  steps if b1 ≥ L, and 2 + 3 5 + 8δ )L) 16((f (x1 )−f ∗ )+( 16  steps if b1 = δL < L, δ ∈ (0, 1]. Comparing the convergence rate of batch gradient descent in Theorem 2.3 and the classical convergence result in Lemma 2.1, we see that WNGrad adjusts the learning rate automatically with decreasing learning rate 1/bj based on the gradient information received so far, and without knowledge of the constant L, and still achieves linear convergence at nearly the same rate as gradient descent in Lemma 2.1 with constant learning rate η ≤ L1 . We will use the following lemmas to prove Theorem 2.3. For more details, see Appendix A.1. 5 WNGrad: Learn the Learning Rate in Gradient Descent Lemma 2.4 Fix  ∈ (0, 1] and L > 0. Consider the sequence b1 > 0; bj+1 = bj + k∇f (xj+1 )k2 bj n o 1) after N = max 1, d L(L−b e + 1 iterations, either mink=1:N k∇f (xk )k2 ≤ , or bN > L. η Lemma 2.5 Suppose that f ∈ CL1 , f ∗ > −∞ and b1 ≥ k∇f (x1 )k. Denote by k0 the first index such that bk0 > L. Then for all k ≥ k0 , bk ≤ bk0 + 8(f (xk0 ) − f ∗ ) and moreover, if k0 > 1, f (xk0 ) ≤ f (x1 ) + L2 . 2b1 Lemma 2.5 guarantees that the learning rate stabilizes once it reaches the (unknown) Lipschitz constant, up to an additive term. To be complete, we can also bound bk0 as a function of L, then arrive at the main result of this section. Lemma 2.6 Suppose that f ∈ CL1 and that f ∗ > −∞. Denote by k0 the first index such that bk0 > L. Then bk0 ≤ 3L + 2L2 . b1 3. WNGrad for Stochastic Gradient Descent We now shift from the setting of batch gradient descent to stochastic gradient descent. The update rule to the learning rate in WNGrad extends without modification to this setting, but now that the gradient norms do not converge to zero but rather remain noisy, the WNGrad learning rate b1k does not converge to a fixed size, but rather settles eventually on the rate of √Gk , where G is a bound on the variance of the stochastic gradients. In order to tackle this issue and derive a convergence rate, we assume for the analysis that the loss function is convex but not necessarily smooth. Algorithm 2 WNGrad – Stochastic Setting Input: Tolerance  > 0 Initialize x1 ∈ Rd , b1 > 0, j ← 1 repeat j ←j+1 1 xj ← xj−1 − bj−1 gj−1 bj ← bj−1 + until f (xj ) ≤  kgj k2 bj−1 Consider the general optimization problem min f (x) x from stochastic gradient information. Instead of observing full gradients ∇f (xk ), we observe stochastic gradients gk ∈ Rd Pk satisfying E(gk ) = ∇f (xk ). Let xk = k1 i=1 xi . Theorem 3.1 Consider WNGrad algorithm. Suppose f (x) is convex. Suppose, that, independent of xk , Ekgk k2 ≤ G2 6 WNGrad: Learn the Learning Rate in Gradient Descent and that for all k, kgk k ≥ γ and Ekxk − x∗ k2 ≤ D2 . Then, with initialization b1 ≥ kg1 k, f (xk ) − f ∗ ≤ G2 (D2 + 2) b1 kx1 − x∗ k2 √ + . 2k γ k Remark 3.2 Under the same assumptions, excluding the assumption that γ 2 ≤ kgk k2 , one obtains the same convergence rate using decreasing learning rate ηk = √ck for some constant c. We will use the following lemma, which is easily proved by induction. Lemma 3.3 Consider a positive constant a > 0 and a sequence of positive numbers t1 , t2 , . . . and for each k, tk + Then, √ a ≤ tk+1 . tk 2ak ≤ tk . Proof of Theorem 3.1: First, note that under the stated assumptions, bk satisfies Lemma 3.3 for a = γ 2 . Thus, with probability 1, √ bk ≥ γ k. Now, kxk+1 − x∗ k2 = kxk − x∗ k2 + 1 1 kgk k2 − 2 hxk − x∗ , gk i, 2 bk bk so 2hxk − x∗ , gk i = bk kxk − x∗ k2 − bk kxk+1 − x∗ k2 + 1 kgk k2 . bk Thus, 2 k k X X hx` − x∗ , g` i ≤ 2 hx` − x∗ , g` i + bk kxk+1 − x∗ k2 `=1 `=1 = k X `=2 = (b` − b`−1 )kx` − x∗ k2 + b1 kx1 − x∗ k2 + k X kg` k2 `=2 ≤ k−1 X `=1 b`−1 k X 1 kg` k2 b` `=1 k X 1 kx` − x∗ k2 + b1 kx1 − x∗ k2 + kg` k2 b` `=1 k X 1 kg`+1 k2 √ √ kg` k2 . kx`+1 − x∗ k2 + b1 kx1 − x∗ k2 + `γ `γ `=1 Now, since hxk − x∗ , ∇f (xk )i = Ehxk − x∗ , gk i and since Ekg` k2 ≤ G2 , conditioned on g`−1 , . . . , g1 , we apply the law of iterated expectation to obtain ! k−1 k k X 1X 1 2 1 X 1 2 ∗ ∗ 2 √ G E(kx`+1 − x k ) + b1 kx1 − x∗ k2 + √ G 2 hx` − x , g` i ≤ γ γ ` ` `=1 `=1 `=1 2G2 (D2 + 1) √ 2 √ ≤ k − 1 + b1 kx1 − x∗ k2 + G2 k γ γ √ Pk where in the final inequality, we use that `=1 √1` ≤ 2 k. 7 WNGrad: Learn the Learning Rate in Gradient Descent From Jensens inequality, and recalling that by convexity f (xk ) − f ∗ ≤ hxk − x∗ , ∇f (xk )i = Ehxk − x∗ , gk i, we conclude k 1X (f (x` ) − f ∗ ) k `=1 √ √ G2 (D2 + 1) k − 1 + γ(b1 /2)kx1 − x∗ k2 + G2 k ≤ γk √ G2 (D2 + 2) k + γ(b1 /2)kx1 − x∗ k2 ≤ . γk f (xk ) − f ∗ ≤ 4. Numerical Experiments With guaranteed convergence of WNGrad in both batch and stochastic settings under appropriate conditions2 , we perform experiments in this section to show that WNGrad exhibits the same robustness for highly non-convex loss functions associated to deep learning problems. Consider a loss function f whose gradient has Lipschitz constant L. Then, the gradient of the rescaled loss function λf has Lipschitz constant λL. If we were to also rescale b1 to λb1 , then the dynamics xj ← xj−1 would remain unchanged due to scale invariance. If instead we fix b1 = 1 while letting λ vary, we can test the robustness of WNGrad to different Lipschitz constants, and compare its robustness to stochastic gradient descent (SGD, Algorithm 5 in Appendix). To be precise, we consider the following variant of WNGrad, Algorithm 3, and explore its performance as we vary λ. Note that λ in this algorithm is analogous to the constant learning rate η in weight normalization and batch normalization as discussed in (4). Algorithm 3 WNGrad - Scaled Loss Function Input: Tolerance  > 0 Initialize x1 ∈ Rd , b1 ← 1, j ← 1 repeat j ←j+1 λ2 kgj−1 k2 bj ← bj−1 + bj−1 λg xj ← xj−1 − bj−1 j until k∇f (xj )k2 ≤  WNGrad is mainly tested on two data sets: MNIST (LeCun et al., 1998a) and CIFAR-10 (Krizhevsky, 2009). Table 1 is the summary. We use batch size 100 for both MNIST and CIFAR-10. The experiments are done in PyTorch and parameters are by default if no specification is provided. The data sets are preprocessed with normalization using mean and standard deviation of the entire train samples. Details in implementing WNGrad in a neural network are explained in Appendix A.3. We first test a wide range of the scale of the loss function3 with two fully connected layers (without bias term) on MNIST (input dimension is 784) in a very simple setting excluding other factors that come into effect, such as regularization (weight decay), dropout, momentum, batch normalization, etc. In addition, we repeat 5 times for each experiment in order to avoid the initialization effect since random initialization of weight vectors is used in our experiments. The outcome of the experiments shown in Figure 1 verifies that WNGrad is very robust to the Lipschitz constant, while SGD is much more sensitive. This shows that the learning rate can be initialized at a high value if we consider λ to be the learning rate. When picking λ = 0.562 and λ = 0.056, we have the train/test loss with respect to epoch shown in blue and dark-red curves respectively. With larger scale of Lipschitz constant (λ = 0.562), WNGrad does much better than SGD in both training and test loss. It is interesting to note that even with smaller scale of the Lipschitz constant λ = 0.056, even thought SGD obtains the smaller training loss but does worse in generalization. On the contrary, WNGrad gives better generalization (smaller test loss) despite of the larger train loss. Thus, WNGrad to some extend is not only robust to the scale of Lipschitz constant but also generalizes well – we aim to study this property of WNGrad in future work. 2 3 We assume non-convex smooth loss function in batch setting and convex not necessarily smooth in stochastic setting λ ∈ {10−0.25j+1.25 , j ∈ {0, 1, 2, · · · , 19}} 8 WNGrad: Learn the Learning Rate in Gradient Descent WNGrad Train 1.4 1.2 1.2 1.0 1.0 0.8 0.8 0.6 0.6 0.4 0.4 0.2 0.2 loss 1.4 0.0 10−3 10−1 10−2 WNGrad at 0.562 WNGrad at 0.056 SGD Test 0.0 101 100 Scale λ 10−3 10−1 10−2 101 100 Scale λ SGD at 0.562 SGD at 0.056 4 × 10−1 10−1 3 × 10−1 loss 2 × 10−1 10−2 10−1 10−3 0 5 10 15 20 Epoch 25 30 0 5 10 15 Epoch 20 25 30 Figure 1. Two fully connected layers on MNIST. The first row are plots of mean Train/Test loss of 5 repeated experiments with respect to the scale of Lipschitz constant at epoch 30 and the second row are plots of mean loss with respect to epoch at λ = 0.562 (blue curves) and λ = 0.056 (dark-red curves). The error bar of the plots in the first row means one standard deviation of five repeated experiments and no error bars shows in the second row for neatness. Better read on screen. SGD WNGrad 80 4 70 3 60 Train lo Te t Acc 5 2 50 1 40 0 10−5 10−4 10−3 10−2 Scale λ 10−1 30 10−5 101 100 SGD: λ at 0.05 WNGRad: λ at 0.25 2.0 1.8 10−4 10−3 10−2 Scale λ 10−1 101 100 70 65 1.6 Train lo Te t Acc 60 55 1.4 50 1.2 45 1.0 40 0.8 0 20 40 Epoch 60 80 0 20 40 Epoch 60 80 Figure 2. The simple convolutional network on CIFAR10. Top left (right) is the average training loss (test accuracy) of 5 repeated experiments with respect to the scale of Lipschitz constant at epoch 90. Bottom left (right) is the plot of mean train loss (test accuracy) with respect to epoch at the best λ found at this epoch. The error bar of the plots in the first row means one standard deviation of five repeated experiments and no error bars shown in the second row for neatness. Better read on screen. 9 WNGrad: Learn the Learning Rate in Gradient Descent Now we continue to compare the methods on a larger dataset, CIFAR10, with a wide range of scale λ 4 from 0.0001 to 1. We apply a simple convolution neural network (see Table 2 for details) with weight decay 10−4 , of which the result shown in Figure 2. In comparison with SGD, WNGrad is very robust to the scale λ – it performs better at λ ∈ [0.01, 1] and does as well as SGD when λ smaller than 0.01. When at the best λ for each algorithm (λ = 0.25 WNGrad and λ = 0.05 SGD), WNGrad outperforms in training and testing along the way. A common practice to train deep and recurrent neural neural networks is to add momentum to stochastic gradient descent (Sutskever et al., 2013). Recent adaptive moment estimation (Adam) (Kingma and Ba, 2014) seems to improve performance of models on a number of datasets. However, these methods are considerably sensitive to the scale of Lipschitz constant and require careful tuning in order to obtain the best result. Here we incorporate our algorithms with momentum (WNGradMomentum) and adapt “Adam” way (WN-Adam, Algorithm 4) in the hope to improve the robustness to the relationship between the learning rate and the Lipschitz constant. We use ResNet-18 training on CIFAR10 in Figure 3. Because of the batch normalization designed in ResNet-18, we widen the range of λ up to 10. As we can see, WN-Adam (green curve) and WNGrad-Momentum (black curve) do seem to be more robust compared to Adam (red) and SGD-Momentum (orange). Particularly, WN-Adam is very robust even at λ = 10 and still does fairly well in generalization. Algorithm 4 WN-Adam Input: Tolerance  > 0 Initialize x1 ∈ Rd , ĝ1 ← 0, b1 ← 1, j ← 1 repeat j ←j+1 ĝj ← β1 ĝj−1 + (1 − β1 )gj−1 , β1 = 0.9 kgj−1 k2 bj−1 ĝj λ bj 1−β j−1 1 bj ← bj−1 + λ2 xj ← xj−1 − until f (xj ) ≤  SGD-Momentum Adam WNGrad-Momentum 10 WN-Adam 95 90 85 80 6 Test Acc Trai loss 8 75 4 70 65 2 60 55 0 10−5 10−4 10−3 10−2 Scale λ 10−1 50 10−5 101 100 SGD-Momentum: λ at 0.005 Adam: λ at 0.0003 WNGRad-Momentum: λ at 0.005 WN-Adam: λ at 0.1 1.4 1.2 10−3 10−2 Scale λ 10−1 101 100 94 92 90 Test Acc Trai loss 1.0 10−4 0.8 88 0.6 86 0.4 84 0.2 82 0.0 0 20 40 Epoch 60 80 80 0 20 40 Epoch 60 80 Figure 3. ResNet-18 on CIFAR10. Top plots are the snapshots of training at the 60th epoch. Reading instruction, see Figure 2. 4 λ ∈ {1, 34 , 21 , 14 , 1 , 1 , 1 , 1 , 1 , 1 , 1 }. 10 20 100 200 1000 2000 10000 10 WNGrad: Learn the Learning Rate in Gradient Descent 5. Conclusion We propose WNGrad, an method for dynamically updating the learning rate 1/bk according to gradients received so far, which works in both batch and stochastic gradient methods and converges. In the batch gradient descent setting, we show that WNGrad converges to a weight vector wT satisfying k∇f (wT )k2 ≤  2 in at most T = O( L+L  ) iterations, if f has L-Lipschitz smooth gradient. This nearly matches the convergence rate for standard gradient descent with fixed learning rate 1/L, but WNGrad does not need to know L in advance. √ In the stochastic setting, the bk update in WNGrad has different behavior, growing like O( Gk ), where G is a bound on the variance of the stochastic gradients. As a result, in the stochastic setting, we also show that WNGrad achieves the optimal √ √ O(1/ T ) rate of convergence for convex loss functions, and moreover settles in expectation on the “correct” rate, bk ∼ Gk . Thus, WNGrad works robustly in the stochastic setting, and finds a good learning rate. In numerical experiments, WNGrad competes favorably to plain stochastic gradient descent in terms of robustness to the relationship between the learning rate and the Lipschitz constant and generalization error in training neural networks on two standard data sets. And such robustness extends further to the algorithm that incorporates momentum (WN-Adam and WNGrad-Momentum). Acknowledgments We thank Arthur Szlam and Mark Tygert for constructive suggestions. Also, we appreciate the help (with the experiments) from Sam Gross, Shubho Sengupta, Teng Li, Ailing Zhang, Zeming Lin, and Timothee Lacroix. References D. Alexandre and B. Francis. Adabatch: Efficient gradient aggregation rules for sequential and parallel stochastic gradient methods. arXiv preprint arXiv:1711.01761, 2017. F. Bach and E. Moulines. Non-asymptotic analysis of stochastic approximation algorithms for machine learning. In Advances in Neural Information Processing Systems, 2011. L. Bottou, F. Curtis, and J. Nocedal. Optimization methods for large-scale machine learning. In arXiv preprint arXiv:1606.04838, 2016. B. Dimitri. Nonlinear programming. Athena scientific Belmont, 1999. J. Duchi, E. Hazan, and Y. Singer. Adaptive subgradient methods for online learning and stochastic optimization. Journal of Machine Learning Research, 12(Jul):2121–2159, 2011. P. Goyal, P. Dollár, R. B. Girshick, P. Noordhuis, L. Wesolowski, A. Kyrola, A. Tulloch, Y. Jia, and K. He. Accurate, large minibatch SGD: training imagenet in 1 hour. CoRR, abs/1706.02677, 2017. URL http://arxiv.org/abs/1706. 02677. S. Ioffe and C. Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. In International conference on machine learning, pages 448–456, 2015. D. Kingma and J. Ba. Adam: A method for stochastic optimization. CoRR, abs/1412.6980, 2014. URL http://dblp. uni-trier.de/db/journals/corr/corr1412.html#KingmaB14. A. Krizhevsky. Learning multiple layers of features from tiny images. 2009. Y. LeCun, L. Bottou, Y. Bengio, and P. Haffner. Gradient-based learning applied to document recognition. Proceedings of the IEEE, 86(11):2278–2324, 1998a. Y. LeCun, L. Bottou, G. Orr, and K. Müller. Efficient backprop. In Neural networks: Tricks of the trade, pages 9–50. Springer, 1998b. D. Needell, R. Ward, and N. Srebro. Stochastic gradient descent, weighted sampling, and the randomized kaczmarz algorithm. In Advances in Neural Information Processing Systems, 2014. 11 WNGrad: Learn the Learning Rate in Gradient Descent Y. Nesterov. Introductory lectures on convex programming volume i: Basic course. 1998. H. Robbins and S. Monro. A stochastic approximation method. In The Annals of Mathematical Statistics, volume 22, pages 400–407, 1951. T. Salimans and D. Kingma. Weight normalization: A simple reparameterization to accelerate training of deep neural networks. In Advances in Neural Information Processing Systems, pages 901–909, 2016. O. Shamir and T. Zhang. Stochastic gradient descent for non-smooth optimization: Convergence results and optimal averaging schemes. In International Conference on Machine Learning, pages 71–79, 2013. G. Hinton N. Srivastava and K. Swersky. Neural networks for machine learning-lecture 6a-overview of mini-batch gradient descent. I. Sutskever, J. Martens, G. Dahl, and G. Hinton. On the importance of initialization and momentum in deep learning. In International conference on machine learning, pages 1139–1147, 2013. M. Tygert, A. Szlam, S. Chintala, M. Ranzato, Y. Tian, and W. Zaremba. Convolutional networks and learning invariant to homogeneous multiplicative scalings. arXiv preprint arXiv:1506.08230, 2015. A. Wilson, R. Roelofs, M. Stern, N. Srebro, and B. Recht. The marginal value of adaptive gradient methods in machine learning. In Advances in Neural Information Processing Systems, pages 4151–4161, 2017. S. Wright and J. Nocedal. Numerical Optimization. Springer New York, New York, NY, 2006. ISBN 978-0-387-40065-5. doi: 10.1007/978-0-387-40065-5 3. URL https://doi.org/10.1007/978-0-387-40065-5_3. M. Zeiler. Adadelta: an adaptive learning rate method. In arXiv preprint arXiv:1212.5701, 2012. P. Zhao and T. Zhang. Stochastic optimization with importance sampling for regularized loss minimization. In International Conference on Machine Learning (ICML), pages 1–9, 2015. A. Appendix A.1. Proof ingredients Lemma A.1 (Descent Lemma) Let f ∈ CL1 , i.e., ∀x, y ∈ Rd , k∇f (x) − ∇f (y)k ≤ Lkx − yk. Then, f (x) ≤ f (y) + h∇f (y), x − yi + L kx − yk2 . 2 A.1.1. P ROOF OF L EMMA 2.4 Proof: If b1 ≥ L, we are done. So suppose b1 ≤ bN < L. Thus, L > bN = b1 + N −1 X k=1 > b1 + N −1 X k=1 So PN k=2 k∇f (xk+1 )k2 bk k∇f (xk+1 )k2 . L k∇f (xk )k2 ≤ L(L − b1 ), and hence N min k∇f (xk )k2 ≤ k=1:N ≤ 1 X k∇f (xk )k2 N −1 k=2 L(L − b1 ) ≤ . (N − 1) 12 WNGrad: Learn the Learning Rate in Gradient Descent A.1.2. P ROOF OF L EMMA 2.5 Suppose k0 is the first index such that bk0 > L. Then bj > L for all j ≥ k0 , and by Lemma A.1, for j ≥ k0 , 1 L (1 − )k∇f (xj )k2 bj 2bj 1 ≤ f (xj ) − k∇f (xj )k2 2bj 1 ≤ f (xj ) − k∇f (xj )k2 2bj+1 f (xj+1 ) ≤ f (xj ) − ≤ f (xk0 ) − Taking j → ∞, j X `=1 ∞ X k∇f (xk 0 +`−1 `=1 Now, if k0 > 1, then bk0 +j − bk0 = ≤2 ≤2 =2 0 +` j X k∇f (xk )k2 0 +`−1 `=1 j X L2 kxk 0 +`−1 `=1 ) − ∇f (xk0 +` )k2 + k∇f (xk0 +`−1 )k2 bk0 +`−1 − xk0 +` k2 + k∇f (xk0 +`−1 )k2 bk0 +`−1 j X L2 k∇f (xk 0 +`−1 )k2 b3k0 +`−1 j X k∇f (xk `=1 ≤ 2(f (xk0 ) − f ∗ ). bk0 +`−1 `=1 ≤4 )k2 bk0 +`−1 j X k∇f (xk `=1 1 k∇f (xk0 +`−1 )k2 . 2bk0 +`−1 0 +`−1 +2 j X k∇f (xk 0 +`−1 `=1 )k2 )k2 bk0 +`−1 bk0 +`−1 ≤ 8(f (xk0 ) − f ∗ ) (7) since bk0 ≥ L. Finally, since bj ≤ L for j = 1 = 1, 2, . . . , k0 − 1, we can bound f (xk0 ) − f ∗ . By Lemma A.1, k0 −1 k∇f (xj )k2 L X f (xk0 ) ≤ f (x1 ) + 2 j=1 b2j ≤ f (x1 ) + k0 −2 Lk∇f (x1 )k2 L X k∇f (xj+1 )k2 + 2 2b1 2 j=1 b2j Lk∇f (x1 )k2 L + (bk −1 − b1 ) 2b21 2b1 0 Lbk0 −1 ≤ f (x1 ) + 2b1 ≤ f (x1 ) + since b1 ≥ k∇f (x1 )k and bk0 −1 ≤ L. 13 (8) WNGrad: Learn the Learning Rate in Gradient Descent A.1.3. P ROOF OF L EMMA 2.6 We use shorthand ∇fk = ∇f (xk ). Let k0 ≥ 1 be the first index such that bk0 ≥ L. Then, bk0 = bk0 −1 + k∇fk0 k2 k∇fk0 − ∇fk0 −1 k2 + k∇fk0 −1 k2 ≤ bk0 −1 + 2 bk0 −1 bk0 −1  2  L kxk0 − xk0 −1 k2 k∇fk0 −1 k2 ≤ bk0 −1 + 2 + bk0 −1 bk0 −1 ! 2 2 k∇fk0 −1 k2 L k∇fk0 −1 k + = bk0 −1 + 2 b3k0 −1 bk0 −1 2L2 k∇fk0 −1 k2 2k∇fk0 −1 k2 + 2 bk0 −1 bk0 −2 bk0 −1 ≤ bk0 −1 + 2L2 (bk0 −1 − bk0 −2 ) 2k∇fk0 −1 k2 + b2k0 −1 bk0 −1 = bk0 −1 + 2L2 2k∇fk0 −1 k2 + bk0 −1 bk0 −2 2L2 ≤ 3L + . b1 ≤ bk0 −1 + (9) A.2. Proof of Theorem 2.3 1) By Lemma 2.4, if mink=1:N k∇f (xk )k2 ≤  is not satisfied after N = d L(L−b e≤  index k0 ≤ N such that bk0 > L. By Lemma 2.5, for all k ≥ k0 , (1−δ)L2  steps, then there is a first bk ≤ bk0 + 8(f (xk0 ) − f ∗ ), so set P = bk0 + 8(f (xk0 ) − f ∗ ). If k0 = 1, then it follows that f (xM ) ≤ f (x1 ) − PM k∇f (xk )k2 2(b1 + 8(f (x1 ) − f ∗ )) k=1 and thus the stated result holds straightforwardly. Otherwise, if k0 > 1, then, by Lemma A.1, for any M ≥ 1, 1 k∇f (xk0 +M −1 )k2 2bk0 +M −1 1 ≤ f (xk0 +M −1 ) − k∇f (xk0 +M −1 )k2 2P M 1 X ≤ f (xk0 ) − k∇f (xk0 +k−1 )k2 . 2P f (xk0 +M ) ≤ f (xk0 +M −1 ) − k=1 By Lemma 2.6, since b1 ≥ δL, we have 2 bk0 ≤ (3 + )L. δ By Lemma 2.4, f (xk0 ) − f ∗ ≤ f (x1 ) − f ∗ + 14 L . 2δ (10) WNGrad: Learn the Learning Rate in Gradient Descent Thus, min k∇f (xk0 +k−1 )k2 ≤ k=1:M M 1 X k∇f (xk0 +k−1 )k2 M k=1 2P (f (xk0 ) − f ∗ ) M 2(bk0 + 8(f (xk0 ) − f ∗ ))(f (xk0 ) − f ∗ ) = M 2bk0 (f (xk0 ) − f ∗ ) 16(f (xk0 ) − f ∗ )2 + ≤ M M 2(3 + 2δ )L(f (xk0 ) − f ∗ ) 16(f (xk0 ) − f ∗ )2 ≤ + . M M ≤ Thus, once M≥ 3 16(f (x1 ) − f ∗ + ( 16 +  we are assured that min k=1:N +M where N ≤ 5 2 8δ )L) , k∇f (xk )k2 ≤  L2 (1−δ) .  A.3. Implementing the Algorithm in A Neural Network In this section, we give the details for implementing our algorithm in a neural network. In the standard neural network architecture, the computation of each neuron consists of an elementwise nonlinearity of a linear transform of input features or output of previous layer: y = φ(hw, xi + b), (11) where w is the d-dimensional weight vector, b is a scalar bias term, x,y are respectively a d-dimensional vector of input features (or output of previous layer) and the output of current neuron, φ(·) denotes an elementwise nonlinearity. When using backpropogration (LeCun et al., 1998b) the stochastic gradient of g in Algorithms 2, 3 and 4 represent the gradient of the current neuron (see Figure 4). Thus, when implementing our algorithm in PyTorch, WNGrad is one learning rate associated to one neuron, while SGD has one learning rate for all neurons. Input layer Hidden layer 1 Hidden layer 2 Output layer Dim 1 Dim 2 loss Dim 3 Dim 4 Figure 4. An example of backproporgation of two hidden layers. Green edges represent the stochastic gradient g in Algorithm 3 and 4. 15 WNGrad: Learn the Learning Rate in Gradient Descent A.4. Tables and Algorithms Algorithm 5 SGD Input: Tolerance  > 0 Initialize x1 ∈ Rd , b1 ← 1, j ← 1 repeat j ←j+1 xj ← xj−1 − λgj−1 until k∇f (xj )k2 ≤  Table 1. Statistics of data sets. DIM is the dimension of a sample DATASET T RAIN T EST C LASSES MNIST CIFAR-10 60,000 50,000 10,000 10,000 10 10 D IM 28×28 32×32 Table 2. architecture for five-layer convolution neural network L AYER TYPE 5 × 5 CONV RELU 2 × 2 MAX POOL , STR .2 5 × 5 CONV RELU 2 × 2 MAX POOL , STR .2 FC RELU FC RELU FC RELU C HANNELS 6 6 16 6 N/A N/A N/A 16 O UT D IMENSION 28 14 10 5 120 84 10
2cs.AI
Gaussian Cooling and O∗ (n3) Algorithms for Volume and Gaussian Volume∗ arXiv:1409.6011v3 [cs.DS] 5 Dec 2016 Ben Cousins † Santosh Vempala‡ December 6, 2016 Abstract We present an O∗ (n3 ) randomized algorithm for estimating the volume of a well-rounded convex body given by a membership oracle, improving on the previous best complexity of O∗ (n4 ). The new algorithmic ingredient is an accelerated cooling schedule where the rate of cooling increases with the temperature. Previously, the known approach for potentially achieving this asymptotic complexity relied on a positive resolution of the KLS hyperplane conjecture, a central open problem in convex geometry. We also obtain an O∗ (n3 ) randomized algorithm for integrating a standard Gaussian distribution over an arbitrary convex set containing the unit ball. Both the volume and Gaussian volume algorithms use an improved algorithm for sampling a Gaussian distribution restricted to a convex body. In this latter setting, as we show, the KLS conjecture holds and for a spherical Gaussian distribution with variance σ 2 , the sampling complexity is O∗ (max{n3 , σ 2 n2 }) for the first sample and O∗ (max{n2 , σ 2 n2 }) for every subsequent sample. 1 Introduction Computing the volume of a convex body is an ancient and fundamental problem; it is also a difficult problem, as evidenced by both the #P-hardness of computing the volume of an explicit polytope [9] and exponential lower bounds for deterministic algorithms in the general oracle model, even to approximate the volume to within an exponential factor in the dimension [16, 17]. Against this backdrop, the breakthrough result of Dyer, Frieze and Kannan [11, 12] established a randomized polynomial-time algorithm for estimating the volume to within any desired accuracy. In the quartercentury since then, the quest for faster volume algorithms has revealed an array of powerful and elegant techniques for the design and analysis of algorithms, and influenced the development of asymptotic convex geometry [1, 20, 10, 21, 18, 19, 4, 24, 22, 14] . The DFK algorithm for computing the volume of a convex body K in Rn given by a membership oracle uses a sequence of convex bodies K0 , K1 , . . . , Km = K, starting with the unit ball fully contained in K and ending with K. Each successive body Ki = 2i/n Bn ∩ K is a slightly larger ball intersected with K. Using random sampling, the algorithm estimates the ratios of volumes of consecutive bodies. The product of these ratios times the volume of the unit ball was the estimate of the volume of K. Sampling is achieved by a random walk in the convex body. There were many ∗ This paper combines and extends preliminary conference publications in STOC 2015 [7] and SODA 2014 [6]. Georgia Tech. Supported in part by an NSF graduate fellowship and by NSF award CCF-1217793. Email: [email protected] ‡ Georgia Tech. Supported in part by NSF awards CCF-1217793 and EAGER-1555447. Email: [email protected] † 1 technical issues to be addressed, but the central challenge was to show a random walk that “mixed” rapidly, i.e. converged to its stationary distribution in a polynomial number of steps. The overall complexity of the algorithm was O ∗ (n23 ) oracle calls1 . Since then researchers have improved the complexity of volume computation and sampling for convex bodies considerably, to O∗ (n4 ) for volume estimation and for obtaining the first random sample [24, 22] and to O ∗ (n3 ) per sample for subsequent samples [22, 23]. These improvements rely on continuous random walks, the use of affine transformations, improved isoperimetric inequalities and several other developments. However, throughout the course of these developments, the outer DFK algorithm using a chain of bodies remained unchanged till the most recent improvement in 2003 [24]. The LV algorithm [24] relies on sampling a sequence of logconcave distributions, akin to simulated annealing, starting with one that is highly concentrated around a point deep inside the convex body and ending with the uniform distribution (we will discuss these ideas in more detail presently). The total number of random points needed is only O∗ (n), down from Ω(n2 ) needed by all previous algorithms. Combining this with the O ∗ (n3 ) complexity for each sample yielded the overall O ∗ (n4 ) complexity for volume computation. Before running this algorithm, there is a preprocessing step where the convex body is placed in nearly-isotropic position, ensuring in particular √ that most of the body is contained in a ball of radius O( n). Crucially, this well-roundedness property is maintained during the course of the algorithm. Is there a faster algorithm? In 1995, Kannan, Lovász and Simonovits, while analyzing the convergence of the ball walk for sampling, proposed a beautiful geometric conjecture now known as the KLS hyperplane conjecture [18]. Roughly speaking, it says that the worst-case isoperimetric ratio for a subset of a convex body is achieved by a hyperplane to within a constant factor. They √ were able to show that hyperplanes are within O( n) of the minimum. The convergence of the ball walk depends on the square of the reciprocal of the isoperimetric ratio; thus the KLS conjecture had the potential to improve the sampling time by a factor of n to O∗ (n2 ) per sample and thereby indicated the possibility of an O ∗ (n3 ) volume algorithm (such an algorithm would have to surmount other substantial hurdles). The KLS hyperplane conjecture remains unresolved, in spite of intensive efforts and partial progress towards its resolution [2, 15, 14]. Indeed, it captures two well-known and much older conjectures from convex geometry, the slicing (or hyperplane) conjecture and the thin-shell conjecture (these were all shown to be equivalent in a certain sense recently [13, 14]), and thus has effectively evaded resolution for nearly a half-century. Our first result is an O∗ (n2 ) algorithm for sampling from the standard Gaussian distribution in n R restricted to an arbitrary convex body. To achieve this complexity, we prove the KLS conjecture for such distributions. We then show that the Gaussian volume or Gaussian measure of a convex body, i.e., the integral of a standard Gaussian over a convex body given by a membership oracle and containing the unit ball. of any convex body, can be computed in O∗ (n3 ) time. Our main finding is an O ∗ (n3 ) algorithm for computing the volume of any convex body con√ taining a unit ball and mostly contained in a ball of radius O∗ ( n). Equivalently, it suffices to have E(kXk2 ) = O ∗ (n) for a uniform random point X from the body. Assuming the body is wellrounded (or sandwiched) in this sense, no further affine transformation is used, and there is no need to assume or maintain near-isotropy during the course of the volume algorithm. To describe the main ideas behind the improvement, we recall the LV algorithm in more de√ tail. It uses a sequence of O∗ ( n) exponential distributions, starting with a distribution that is concentrated inside the unit ball contained in K, then “flattening” this distribution to the uniform 1 The O∗ notation suppresses error terms and logarithmic factors. 2 by adjusting a multiplicative factor in the exponent2 . In each phase, samples from the previous distribution are used to estimate the ratio of the integrals of two consecutive exponential functions (by simply averaging the ratio of the function values at the sample points). It is crucial to keep the variance of this ratio estimator bounded, and to do this, the distributions could be cooled by a √ √ factor of 1 + √1n in each phase. This leads to O∗ ( n) phases in total, and to O ∗ ( n) samples per phase. Along with the sample complexity of O ∗ (n3 ) per sample, this gives the bound of O ∗ (n4 ). The improved complexity for Gaussian volume estimation is achieved by using a sequence of Gaussians (rather than exponentials as in LV), starting with a highly concentrated Gaussian centered inside K and ending with the standard Gaussian. The cooling schedule is the same as in the LV algorithm, but each sample takes only O ∗ (n2 ) time. For a Gaussian with covariance σ 2 I, the mixing time is O∗ (max{σ 2 , 1}n2 ) (see Theorem 1.5 below). Since the starting σ is small and the last σ is 1, this bound is O∗ (n2 ) throughout the algorithm. (We encounter additional technical issues such as maintaining a warm start for the random walks.) Returning to the usual Lebesgue volume, how could we possibly improve the LV algorithm, without relying on the KLS conjecture? We will also use Gaussian cooling, starting with a highly concentrated Gaussian and flattening it (i.e., increasing σ) till we reach the uniform distribution. In the beginning, this is similar to the algorithm of [6]. But after σ becomes higher than 1 (or some constant), we no longer have quadratic sampling time, as the mixing time of the ball work grows as max{σ 2 , 1}n2 . Moreover, we need to go till σ 2 = Ω(n), so cooling at the fixed rate of 1 + 1/n would be too slow. The main new idea is that for σ > 1, the cooling rate can be made higher, in fact about 1 + σ 2 /n instead of only 1 + 1/n. This means that the number of phases to double σ 2 is only n/σ 2 . It can be shown that the number of samples per “doubling” phase is only O ∗ (1), giving n/σ 2 samples in total. Multiplying by the sampling time, we have σn2 · σ 2 n2 = n3 , a cubic algorithm! The key technical component of the analysis is to show that the variance of the ratio estimator remains bounded even at this higher cooling rate of 1 + σ 2 /n. We now formally state the problems. Problem 1.1. [Volume] Given a membership oracle for a convex set K in Rn containing the unit ball Bn , and error parameter ε > 0, give an algorithm that computes a number V such that with probability at least 3/4, (1 − ε)vol(K) ≤ V ≤ (1 + ε)vol(K).  We denote the Gaussian density function as γ(x) = (2π)−n/2 · exp −kxk2 /2 . Problem 1.2. [Gaussian Volume] Given a membership oracle for a convex set K in Rn containing the unit ball Bn , and error parameter ε > 0, give an algorithm that computes a number V such that with probability at least 3/4, Z Z γ(x) dx. γ(x) dx ≤ V ≤ (1 + ε) (1 − ε) K 1.1 K Main results Our main result can be stated more precisely as follows, which solves Problem 1.1 in O∗ (n3 ) assuming the input body K is well-rounded. We note that the roundness condition can be achieved for any convex body by a preprocessing step consisting of an affine transformation. It is a significantly weaker condition than isotropic position. 2 In the original description, the algorithm first created a “pencil” using an extra dimension, but this can be avoided [22]. 3 Theorem 1.1. There is an algorithm that, for any ε > 0, p > 0 and convex body K in Rn that contains the unit ball and has EK (kXk2 ) = O(n), with probability 1 − p, approximates the volume of K within relative error ε and has complexity   3  1 n 2 2 1 2 n ∗ 3 · log n log log log = O n . O ε2 ε ε p in the membership oracle model. More generally, if EK (kXk2 ) = R2 , then the algorithm has complexity    1 max{R2 n2 , n3 } 2 2 1 2 n ∗ 2 2 3 · log n log log log = O max{R n , n } . O ε2 ε ε p The current best complexity for achieving well-roundedness, i.e., R2 = O∗ (n), for a convex body is O∗ (n4 ) [24]. In previous work, the complexity of generating the first nearly uniform random point was always significantly higher than for later points. Here, using a faster cooling schedule, we can generate the first random point in O∗ (n3 ) steps, under the same assumption that K is well-rounded. Any subsequent uniform random points also require O ∗ (n3 ) steps. Theorem 1.2. There is an algorithm that, for any ε > 0, p > 0, and any convex body K in Rn that contains the unit ball and has EK (kXk2 ) = R2 , with probability 1 − p, generates random points from a density ν that is within total variation distance ε from the uniform distribution on K. In the membership oracle model, the complexity of each random point, including the first, is    1 2 2 3 2 n O max{R n , n } log n log log = O∗ max{R2 n2 , n3 } . ε p In addition to volume and uniform sampling, we also have an O∗ (n3 ) algorithm for computing the Gaussian volume. This algorithm does not require a rounding preprocessing step and gives an O∗ (n3 ) algorithm for any convex set K ⊆ Rn containing the unit ball. Theorem 1.3. For any ε > 0, p > 0, and any convex set K in Rn containing the unit ball, there is an algorithm that, with probability 1 − p, approximates the Gaussian volume of K within relative error ε and has complexity    3   1 n 2 2 n log · log (n) log = O∗ (n3 ) O ε2 ε p in the membership oracle model. Both the uniform volume and Gaussian volume algorithms utilize an improved sampling algorithm for Gaussian distributions restricted by convex sets. Theorem 1.4. For any ε > 0, p > 0, and any convex set K in Rn containing the unit ball, there is an algorithm that, with probability 1 − p, can generate a random point within total variation distance ε of the Gaussian density N (0, σ 2 I) restricted to K. In the membership oracle model, the complexity of the first random point is       1 2 3 2 n log O max{σ , 1}n log(n) log = O∗ max{σ 2 , 1}n3 . ε p For subsequent random points, the complexity is    n  1 2 2 log = O ∗ max{σ 2 , 1}n2 . O max{σ , 1}n log ε ε The set of random points will be ε-independent. 4 The following theorem guarantees we can efficiently obtain Gaussian samples from a warm start. Theorem 1.5. Let K be a convex set containing the unit ball, Q0 be a starting distribution, and Q √ be the target Gaussian density N (0, σ 2 I) restricted to K ∩ p 4σ nBn . For any ε > 0, p > 0, the lazy Metropolis ball walk with δ-steps for δ = min{σ, 1}/(4096 n log n/ε), starting from Q0 , satisfies dtv (Qt , Q) ≤ ε after   n M (Q0 , Q) 2 2 log t ≥ C · M (Q0 , Q) · max{σ , 1} · n log ε ε expected steps for an absolute constant C. Here M (Q0 , Q) is a measure of how close Q0 is to Q (also called the warm start parameter) and 0 (S) is defined as M (Q0 , Q) = supS⊆K QQ(S) . In other words, the theorem says that ball walk mixes in ∗ 2 2 O (max{σ , 1}n ) steps from a warm start. 2 Algorithm At a high level, the algorithm relies on sampling random points from a sequence of distributions using the ball walk with a Metropolis filter. For a target density proportional to the function f , the ball walk with δ-steps is defined in Figure 2. After a suitable number of steps, the point x obtained will be from a distribution close to the one whose density is proportional to f . However, this process is slightly complicated by the fact that we only know that the point is mixed once a certain number of proper steps have been taken, i.e. steps where y ∈ K or alternatively where f (y) 6= 0. The algorithm in Figure 1 starts with a Gaussian of variance 1/(4n), with mean at the center of the unit ball inside K. This variance is increased over a sequence of phases till the distribution becomes uniform over K. Until the variance σ 2 reaches 1, it is increased by a fixed factor of 1 + 1/n in each phase. After the variance reaches 1, the variance accelerates, increasing by a factor of 1 + σ 2 /(2C 2 n) where σ 2 is the current variance. This process is continued till the variance becomes linear in C 2 n, at which point one final phase can be used to jump to the uniform distribution. In each phase, we pick a sample of random points from the current distribution and compute the average of the ratio of the current density to the next density for each point. The product of these ratios times a fixed term to account for the integral of the initial function is the estimate output by the algorithm.  Let f (σ 2 , K) be the function that assigns value exp −kxk2 /(2σ 2 ) to points in a convex set K and zero to points outside. The algorithm below uses a series of such functions. 3 3.1 Outline of analysis Outline of sampling analysis To show the random walk quickly reaches its stationary distribution, we will use the standard method of bounding the conductance. For the ball walk, this runs into a hurdle, namely, the local conductance of points near sharp corners of the body can be arbitrarily small, so the walk can get stuck and waste a large number of steps. To avoid this, we could start the walk from a random point chosen from a distribution sufficiently close to the target distribution. But how to generate random points from such a starting distribution? We do this by considering a sequence of distributions, each 5 √ We assume Bn ⊆ K ⊆ C nBn . Volume(K, ε) 1. Initialize: ν = Define  ε 16 , σ02 n = 1 4n , k = 512 log C 2 n ,i ε2 = 0; x0 is a random point from N (0, σ02 I) ∩ K.  1  1 + if σ 2 ≤ 1 n 2 β(σ) =  1 + σ otherwise 2C 2 n 2. While σi2 ≤ C 2 n: (a) Get k points {X1 , . . . , Xk } using the Ball Walk with  p  n log n/ε) ball radius δ = min{σi , 1}/(4096 √ 2 f = f (σi , K ∩ 4σi nBn ) target density   16 10 max{σ 2 , 1}n2 · log(1/ν) proper steps 2 2 2 (b) Set σi+1 = σi2 · β(σi ); if σi+1 > C 2 n, set σi+1 = ∞. (c) Compute the ratio estimate Wi+1 = k 1 X fi+1 (Xj ) · . k fi (Xj ) j=1 (d) Increment i. 3. Return (2πσ02 )n/2 W1 . . . Wi as the volume estimate for K. Figure 1: The Volume algorithm providing a warm start for the next. The very first distribution is chosen to be a highly concentrated Gaussian so that it almost entirely lies inside the unit ball (inside K). Thus sampling from the initial distribution is easy by standard rejection sampling. Each successive Gaussian is “flatter” with the final one being the target distribution, e.g. standard Gaussian, uniform distribution. The next challenge is to show that, from a warm start, the expected number of steps to converge to the stationary distribution is only O ∗ (n2 ). This is usually done by bounding the conductance of the Markov chain. The conductance, φ, of a Markov chain with state space K and next-step distribution Px is defined as: R Px (K \ S) dQ(x) . φ = min S S⊂K min Q(S), Q(K \ S) Unfortunately, for the ball walk, this can be arbitrarily small, e.g., for points near corners (but also for points in the interior). To utilize the warm start, we use an idea from [19], namely the speedy walk. We emphasize that the speedy walk cannot be implemented efficiently and is only a tool for analysis. It is defined as follows. At current point x: 6 Ball Walk(δ, f ) At point x: 1. Pick a random point y from x + δBn . 2. Go to y with probability min{1, f (y)/f (x)}. Figure 2: The Ball walk with a Metropolis filter 1. Pick random point y from K ∩ x + δBn . 2. Go to y with probability min{1, f (y)/f (x)}. To capture the stationary distribution of the speedy walk with a Metropolis filter we need another parameter. The local conductance at x for the speedy walk, without a filter, is defined as follows: ℓ(x) = vol(K ∩ x + δBn ) . vol(δBn ) The following fact is now easy to verify. Lemma 3.1. The stationary distribution of the speedy walk with a Metropolis filter applied with a function f has density proportional to ℓ(x)f (x). √ For the speedy walk with δ = O(1/ n), we can show that the conductance is Ω(1/(σn)), and so the total number of steps needed is only O∗ (σ 2 n2 ). This is a factor n faster than previous best bounds. We do this by establishing a stronger (and nearly optimal) isoperimetric inequality. As noted, the speedy walk cannot actually be implemented efficiently. To bound the Metropolis ball walk, we can view it as an interleaving of a speedy walk with wasted steps. Let the Markov chain for the original walk be w0 , w1 , . . . , wi , . . . ,. The subsequence wi1 , wi2 , . . . , where we record x if the point y chosen by the Metropolis ball walk is in K, corresponds to the speedy walk. We then need to estimate the number of wasted steps from a warm start. We will show that this is at most a constant factor higher than the number of proper steps. The key ingredient of this analysis is the (known) fact that for a body containing the unit ball average local conductance is high for ball √ radius δ = O(1/ n). Even within the speedy walk, there are “null” steps due to the Metropolis filter. However, by restricting the walk to a large ball, we ensure that the probability of rejection by the filter is bounded by a constant, and therefore the number of wasted steps within the speedy walk is at most a constant fraction of all steps. Also, the speedy walk converges to a distribution proportional to ℓ(x)f (x), but we can map this to a random sample from f with rejection sampling routine (Section 6.4). To sample efficiently, we need a warm start for each phase. For two probability distributions P and Q with state space K, the M -warmness of P and Q is defined as M (P, Q) = sup S⊆K P (S) . Q(S) (1) To keep this parameter bounded by a constant, we use a finer-grained cooling schedule so that a random point from one phase is a warm start for the next phase. This cooling schedule is also different in the two parts. In the first part of the algorithm, where we can cool at the rate of 7 1 + 1/n and use O ∗ (n2 ) steps to sample. In the second part, we cool at the rate of 1 + σ 2 /(2C 2 n), and this is fast enough to compensate for the higher sample complexity of O ∗ (σ 2 n2 ). Thus, the overall time to obtain a warm start for every phase of the algorithm is also O ∗ (n3 ). We analyze this in full detail in Section 6, including the proof that this cooling rate maintains a warm start from one phase to the next. We can obtain uniform random samples from K given samples from a Gaussian with variance √ 2 σ = C 2 n via a simple rejection sampling routine. Since K ⊆ C nBn , the two distributions will be within a constant factor of each other, and therefore we can use O(1) expected samples from the Gaussian distribution to obtain a uniform random point. 3.2 Outline of volume analysis The sampling time when the variance is σ 2 is max{1, σ 2 }n2 . If we cooled at a rate of 1 + 1/n throughout the algorithm, we would get an O∗ (n4 ) algorithm since the last doubling phase, i.e. the set of phases until σ 2 doubles, takes Ω(n) samples, each mixing for Ω(n3 ) steps. The main insight that speeds up our algorithm is the cooling rate of 1 + σ 2 /(2C 2 n) once σ 2 > 1. Cooling at a faster rate once σ 2 > 1 will allow us to compute volume in time O ∗ (n3 ) by having fewer phases when the mixing time of the ball walk increases. The volume algorithm proceeds as a series of phases, where each phase seeks to estimate a ratio of Gaussian integrals over the convex body K. More precisely, let (  exp −kxk2 /(2σ 2 ) if x ∈ K 2 f (σ , x) = 0 otherwise and 2 F (σ ) = Z f (σ 2 , x) dx. Rn Define µi as the probability distribution proportional to f (σi2 , x); that is, µi is a symmetric Gaussian distribution with variance σi2 restricted to K. Let X be a random sample point from µi and let 2 , X)/f (σ 2 , X). We see that the expectation of Y is the ratio of F (σ 2 )/F (σ 2 ): Y = f (σi+1 i i+1 i   Z kxk2 kxk2 − dµi (x) exp E(Y ) = 2 2σi2 2σi+1 K    Z exp −kxk2 /(2σi2 ) kxk2 kxk2 exp = dx − 2 · 2σi2 2σi+1 F (σi2 ) K   Z 2 ) F (σi+1 kxk2 1 exp − = · . dx = 2 F (σi2 ) K 2σi+1 F (σi2 ) Our goal is to estimate E(Y ) within some target relative error. The algorithm estimates the quantity E(Y ) by taking random sample points X1 , . . . , Xk and computing the empirical estimate for E(Y ) from the corresponding Y1 , . . . , Yk : k k 1 X fi+1 (Xj ) 1X Yj = . W = k k fi (Xj ) j=1 j=1 The variance of Y divided by its expectation squared will give a bound on how many independent samples Xi are needed to estimate E(Y ) within the target accuracy. Thus we seek to bound 8 E(Y 2 )/E(Y )2 . We have that   2 R σ2 σi2 kxk2 kxk − dx ) F ( 2σ2i+1 exp 2 2 2 K 2σ σ i i+1 i −σi+1   = E(Y 2 ) = R kxk2 F (σi2 ) dx K exp − 2σ2 i and σ2 σ2 i ) F (σi2 )F ( 2σ2i+1 2 E(Y 2 ) i −σi+1 = 2 )2 E(Y )2 F (σi+1 2 If we let σ 2 = σi+1 and σi2 = σ 2 /(1 + α), then we can further simplify as  2   2  σ σ 2 F 1+α F 1−α E(Y ) . = E(Y )2 F (σ 2 )2 The algorithm has two parts, and the cooling rate αi is different for them. In the first part, starting with a Gaussian of variance σ 2 = 1/(4n), which has almost all its measure inside the ball contained in K, we increase σ 2 by a fixed factor of 1 + 1/n in each phase till the variance σ 2 reaches 1. For each σ, we sample random points from the corresponding distribution and estimate the ratio of the densities for the current phase and the next phase by averaging over samples. The total complexity for the first part is thus O ∗ (n) phases × O∗ (1) samples per phase × O∗ (n2 ) time per sample = O ∗ (n3 ). In the second part, we increase the variance till it reaches C 2 n, after which one final phase suffices to compare with the target uniform distribution. However, we cannot afford to cool at the same rate of 1 + 1/n because the time per sample goes to O∗ (σ 2 n2 ) for σ > 1. By the end of this part, we would be using O∗ (n3 ) per sample, and the overall complexity would be O∗ (n4 ). Instead we observe that we can cool at a faster rate of 1 + σ 2 /(2C 2 n) and still maintain that the variance of the ratio estimator is a constant. The following bound on the variance, proved in Section 7.1, allows us to cool at a faster rate as σ increases and overcome the increased sampling cost of O ∗ (σ 2 n2 ). √ Lemma 3.2. Let K ⊆ C nBn and α ≤ 1/2. Then,  2   2  σ σ   F 1+α F 1−α C 2 α2 n ≤ exp 2 · . F (σ 2 ) σ2 Note that the above RHS is ≤ 1 + σ 2 /(Cn) if we select α = σ 2 /(2C 2 n). With this rate, the number of phases needed to double the variance is only O(C 2 n/σ 2 ), and the number of samples per phase will be O∗ (1). Together, they compensate for the higher complexity of obtaining each sample. The complexity of the second part of the algorithm is thus  2  ∗ C n phases × O∗ (1) samples per phase × O∗ (σ 2 n2 ) time per sample = O ∗ (C 2 n3 ). O σ2 In Section 7.1, we prove that cooling at this accelerated rate still keeps the variance of the ratio estimator appropriately bounded. We note that with respect to estimating the volume using Lemma 3.2, there is a range of √ cooling rates that we could select to obtain an O ∗ (n3 ) algorithm. We need to select α ≤ σ/(C n) 9 to maintain α ≤ 1/2 and satisfy the condition of Lemma 3.2. We need α ≥ σ 2 /(C 2 n) because √ otherwise there would be too many phases. So for any α such that c1 σ 2 /(C 2 n) ≤ α ≤ c2 σ/(C n), we get that the complexity of the volume algorithm is     2 2 1 ∗ ∗ C α n 1 O · phases×O samples per phase×O ∗ (σ 2 n2 ) time per sample = O ∗ (C 2 n3 ). α σ2 α We select the cooling rate of α = σ 2 /(2C 2 n) for simplicity of the algorithm since this cooling rate also maintains a warm start for the ball walk sampler, as shown in Lemma 6.8. 4 Preliminaries A function f : Rn → R+ is logconcave if it has convex support and the logarithm of f , wherever f is non-zero, is concave. Equivalently, f is logconcave if for any x, y ∈ Rn and any λ ∈ [0, 1], f (λx + (1 − λ)y) ≥ f (x)λ f (y)1−λ Let γ : Rn → R+ be the density of the standard Gaussian N (0, I). For two probability distributions P and Q with state space K, we will use M (P, Q) to denote the M -warmness between P and Q as defined in (1) and dtv (P, Q) to denote the total variation distance between P and Q: dtv (P, Q) = sup |P (S) − Q(S)|. S⊆K as For a nonnegative function f : Rn → R+ , we define the f -distance between two points u, v ∈ Rn df (u, v) = 5 |f (u) − f (v)| . max{f (u), f (v)} Isoperimetry The following theorem is due to Brascamp and Lieb. Theorem 5.1. [3] Let γ : Rn → R+ be the standard Gaussian density in Rn . Let f : Rn → R+ be any logconcave function. Define the density function h over Rn as follows: h(x) = R f (x)γ(x) . Rn f (y)γ(y) dy Fix a unit vector v ∈ Rn , let µ = Eh (x). Then, for any α ≥ 1, Eh (|v T (x − µ)|α ) ≤ Eγ (|x1 |α ). We have the following concentration bound. Corollary 5.2. For h as defined in Theorem 5.1, and any t ≥ 1, √ 2 Pr(kx − µk2 ≥ n + ct n) ≤ e−t h for an absolute constant c. 10 The next lemma about one-dimensional isoperimetry is from [18] Lemma 5.3. [18] For any one-dimensional isotropic logconcave function f , and any partition S1 , S2 , S3 of the real line, πf (S3 ) ≥ ln(2) d(S1 , S2 )πf (S1 )πf (S2 ). Theorem 5.4. Let π be the Gaussian distribution N (0, σ 2 In ) with density function γ restricted by a logconcave function f : Rn → R+ , i.e., π has density dπ(x) proportional to h(x) = f (x)dγ(x). Let S1 , S2 , S3 partition Rn such that for any u ∈ S1 , v ∈ S2 , either ku − vk ≥ d/ ln(2) or dh (u, v) ≥ √ 4d n. Then, π(S3 ) ≥ d π(S1 )π(S2 ). σ Proof. We prove the theorem for the case σ = 1, then note that by applying the scaling x = y/σ, we get the general case. Our main tool, as in previous work, is the Localization Lemma of Lovász and Simonovits [21]. Suppose the conclusion is false. Define h(x) = f (x)γ(x). Then there exists a partition S1 , S2 , S3 for which, for some positive real number A, Z Z h(x) dx h(x) dx = A Rn S1 Z Z h(x) dx. h(x) dx < dA and S2 S3 By the localization lemma, there must be a “needle” given by a, b ∈ Rn and a nonnegative linear function l : [0, 1] → R+ for which, Z Z h((1 − t)a + tb)l(t)n−1 dt h((1 − t)a + tb)l(t)n−1 dt = A (1−t)a+tb∈[0,1] (1−t)a+tb∈S1 ∩[0,1] and Z n−1 (1−t)a+tb∈S3 ∩[0,1] h((1 − t)a + tb)l(t) dt < dA Z (1−t)a+tb∈S2 ∩[0,1] h((1 − t)a + tb)l(t)n−1 dt. By a standard combinatorial argument, we can assume that Zi = {t : (1−t)a+tb ∈ Si } are intervals that partition [a, b]. Thus, to reach a contradiction, it suffices to prove that for a one-dimensional logconcave function h(t) = f ((1−t)a+tb)γ((1−t)a+tb) with support [a, b] ⊂ R and a ≤ u ≤ v ≤ b, the following statements hold: Z v Z b Z b Z dh (u, v) u √ h(t)l(t)n−1 dt ≥ h(t)l(t)n−1 dt h(t)l(t)n−1 (2) h(t)l(t)n−1 dt 4 n u a v a Z b n−1 h(t)l(t) a dt Z v n−1 h(t)l(t) u dt ≥ ln(2)ku − vk Z u n−1 h(t)l(t) a dt Z b h(t)l(t)n−1 . (3) v The first inequality (2) follows directly from Lemma 3.8 in [19]. To see the second inequality (3), we first note that by applying Theorem 5.1, with α = 2, we have that the variance of the distribution proportional to h(t)l(t)n−1 is at most 1. This is because h(t)l(t)n−1 = (f ((1−t)a+tb)l(t)n−1 )γ((1− t)a + tb) and the f ((1 − t)a + tb)l(t)n−1 is itself a logconcave function. Now, we note that by scaling down to increase the variance to exactly 1, the isoperimetric coefficient can only go down. Hence, the second inequality is implied by Lemma 5.3.  11 6 Sampling The analysis of the sampling algorithm is divided into several parts: bounding the conductance of the speedy walk, bounding the warmth of the distribution from one phase to the next, the mixing time of the Metropolis ball walk from a warm start, and finally the complexity of sampling. 6.1 Conductance First we bound the rate of convergence of the random walk through a lower bound on the conductance. The conductance φ of a Markov chain with state space K and next-step distribution Px is defined as: R Px (K\S)dQ(x) . φ = min S S⊂K min{Q(S), Q(K\S)} We will make use of the following theorem of Lovász and Simonovits [21] to bound the total variation distance between the current distribution and the target distribution. Theorem 6.1. [21] Let Qt be the distribution after t steps of a lazy Markov chain and Q be its stationary distribution. Suppose that Q0 is M -warm with respect to Q. Then, √ dtv (Qt , Q) ≤ M  φ2 1− 2 t . For the next lemmas, we let f : Rn → R denote the Gaussian density function   kxk2 f (x) = exp − 2 . 2σ √ √ Lemma 6.2. For the speedy walk applied to a convex body K ⊆ 4σ nBn , δ ≤ σ/(8 n) and σ 2 ≤ 64n, the acceptance probabilty of the Metropolis filter is at least 1e . Proof. Assume that f (x) ≤ f (u) (otherwise the Metropolis filter always accepts). Then, the acceptance probability is   kxk2 − kuk2 f (x) = exp − f (u) 2σ 2   (kuk + δ)2 − kuk2 ≥ exp − 2σ 2   2δkuk + δ2 = exp − 2σ 2  2  σ + σ 2 /(64n) ≥ exp − 2σ 2 1 ≥ . e  12 √ √ Lemma 6.3. Let K ⊆ 4σ nBn be a convex body and let u, v ∈ K such that ku − vk ≤ δ/ n. If √ δ ≤ σ/(8 n) and |ℓ(u)f (u) − ℓ(v)f (v)| 1 < , max{ℓ(u)f (u), ℓ(v)f (v)} 4 then 1 |ℓ(u) − ℓ(v)| < . max{ℓ(u), ℓ(v)} 3 Proof. Assume without loss of generality that ℓ(u)f (u) ≥ ℓ(v)f (v). It follows that 3γ(u)ℓ(u) < γ(v)ℓ(v). 4 √ Since ku − vk ≤ δ/ n, we have that 0.9 ≤ f (v)/f (u) ≤ 1.1 for n large enough. Thus 3 ℓ(u) < ℓ(v). 2 By assumption, we have that γ(u)ℓ(u) > γ(v)ℓ(v). Thus we also have that 3 ℓ(u). 2 The lemma then follows. ℓ(v) <  The following lemma bounds the overlap for a step of the speedy walk with respect to the speedy walk. We then show that the Gaussian weighting only hurts by a constant factor. Lemma 6.4. Let K be a convex set with S ⊆ K. Let S = K\S and let Pxunif denote the 1-step distribution from x of the speedy walk with respect to the uniform distribution over K. Suppose that √ dℓ (u, v) < 1/3 and ku − vk ≤ δ/ n. Then for u ∈ S and v ∈ S,  1 Puunif S + Pvunif (S) > . 6 Proof. Let Bu = u + δBn and let C = Bu ∩ Bv . By Lemma 3.5 from [18], we know that vol (K ∩ C) ≥ vol(δBn ) min {ℓ(u), ℓ(v)} . e+1 (4) We have that Puunif (S)   vol S ∩ Bu vol S ∩ C = ≥ . ℓ(u)vol(δBn ) ℓ(u)vol(δBn ) Similarly for Pvunif (S). Assume that ℓ(u) ≥ ℓ(v), which implies ℓ(u) ≤ 3ℓ(v)/2. Therefore,  vol S ∩ C vol (S ∩ C) unif unif + Pu (S) + Pv (S) ≥ ℓ(u)vol(δBn ) ℓ(v)vol(δBn )  2vol S ∩ C vol (S ∩ C) ≥ + 3ℓ(v)vol(δBn ) ℓ(v)vol(δBn ) 2vol (K ∩ C) ≥ 3ℓ(v)vol(δBn ) 2 1 ≥ > . 3(e + 1) 6 13  It then follows that the Gaussian filter decrease the overlap by at most a constant factor. √ Corollary 6.5. Let S, S be a partition of a convex body K ⊆ 4σ nBn , and u ∈ S, v ∈ S be such √ that ku − vk < δ/ n and dh (u, v) < 1/4, where h(x) = f (x)ℓ(x). Then, Pu (S) + Pv (S) > 1 . 20 Proof. By Lemma 6.3, we know that dℓ (u, v) < 1/3. We then apply Lemma 6.4, while noting that the Gaussian weighting affects the 1-step distributions by at most a 1/e factor since that is a lower bound on the acceptance probability of the Metropolis filter (Lemma 6.2).  We can now prove the desired lower bound on the conductance of the speedy walk with respect to a Gaussian weighting over a convex set. √ Theorem 6.6. Let K be a convex body such that Bn ⊆ K ⊆ 4σ nBn . The conductance of the √ δ ). speedy walk applied to K with Gaussian density N (0, σ 2 I) and δ ≤ σ/8 n steps is Ω( σ√ n Proof. Let S ⊂ K be an arbitrary measurable set of K and let S = K\S. Assume that π(S) ≤ 1/2. Consider the following partition of K:   1 S1 = x ∈ S : Px (S) < 20   1 S2 = x ∈ S : Px (S) < 20 S3 = K\S1 \S2 . Let h(x) = ℓ(x)f (x). By Corollary 6.5, we have that for any u ∈ S1 , v ∈ S2 , either ku − vk ≥ √ δ/ n or dh (u, v) ≥ 1/4. We may assume that π(S1 ) ≥ π(S)/2 and π(S2 ) ≥ π(S)/2. If not, we can bound the conductance of S as follows (similarly for S). Z Px (S)h(x) dx S φ(S) = π(S) Z Z Px (S)h(x) dx P (S)h(x) dx + 1 S x S = 2 π(S) Z h(x) dx 1 S3 20 ≥ 2 π(S) 1 π(S3 ) = 40 π(S) 1 ≥ . 80 14 Now we can apply Theorem 5.4 with   1 δ ln 2 d = min √ , √ n 16 n to the partition S1 , S2 , S3 to get π(S3 ) ≥ d π(S1 )π(S2 ). σ Using the above, we get that 1 π(S3 ) 40 π(S1 ) d π(S1 )π(S2 ) ≥ 40σ π(S1 ) d ≥ 160σ δ √ , ≥ 250σ n φ(S) ≥ which proves the theorem. 6.2  Getting a warm start The following two lemmas guarantee that the ball walk in the algorithm will always have a warm start, i.e. the M -warmness (1) is bounded by a constant. The first lemma bounds the warmness under the fixed cooling rate of 1 + 1/n.  2 Lemma 6.7. Let K ⊆ Rn , σi+1 = σi2 (1 + 1/n), and fi (x) = exp −kxk2 /(2σi2 ) . Denote Qi as the associated probability distribution of fi over K. Then, we can bound the warmness between successive √ M (Qi , Qi+1 ) ≤ e. The following lemma bounds the warmness when the cooling schedule begins to accelerate, under the roundness condition.  √ 2 = σi2 (1 + σi2 /(C 2 n)), and fi (x) = exp −kxk2 /(2σi2 ) . Lemma 6.8. Let K ⊆ C n · Bn , σi+1 Denote Qi as the associated probability distribution of fi over K. Then we can bound the warmness between successive phases as √ M (Qi , Qi+1 ) ≤ e. Proof.(of Lemma 6.7) Let R −a kxk2 dx e i+1 A = RK −a kxk2 . i dx Ke 15 Then, M (Qi , Qi+1 ) = sup Qi (S) Qi+1 (S) ≤ sup Qi (x) Qi+1 (x) S⊆K x∈K 2 e−ai kxk = sup A −a kxk2 x∈K e i+1 2 /n = A · sup e−ai kxk x∈K = A, where the last line follows from the fact that 0 ∈ K. We will now bound A. First, we extend A to be over all Rn instead of K, and then argue that it can only decrease when restricted to K. R R 2 −ai+1 kxk2 dx (ai /π)n/2 (ai+1 /π)n/2 Rn e−ai+1 kxk dx n e R R R = −ai kxk2 dx −ai kxk2 dx (ai+1 /π)n/2 (ai /π)n/2 Rn e Rn e n/2 = ai n/2 ai+1  1 = 1 − 1/n √ ≤ e. n/2 Let µK (r) be the proportion of the sphere of radius r centered at 0 that is contained in K. Note that since K is a convex body that contains 0, that r1 > r2 ⇒ µK (r1 ) ≤ µK (r2 ). Then, R ∞ n−1 −a r2 r e i+1 µK (r)dr . A = R0 ∞ n−1 −a r2 e i µK (r)dr 0 r 2 2 Note (r n−1 e−ai+1 r )/(r n−1 e−ai r ) is a monotonically increasing function in r. Since K is a convex body containing 0, we can partition K into infinitesimally small cones centered at 0. Consider an arbitrary cone C. µC (r) is 1 for r ∈ [0, r ′ ] and then 0 for r ∈ (r ′ , ∞) since K is convex. Since 2 2 (r n−1 e−ai+1 r )/(r n−1 e−ai r ) is monotonically increasing, the integral over the cone only gets larger by extending µC (r) to be 1 for r ∈ [0, ∞). Therefore R ∞ n−1 −a r2 R ∞ n−1 −a r2 r e i+1 µC (r)dr e i+1 dr √ 0 0 r R∞ R ≤ = e. ∞ n−1 −ai r 2 n−1 e−ai r 2 µ (r)dr e dr C 0 r 0 r Since C was an arbitrary cone from a partition of A, we have that A ≤ 16 √ e.  Proof.(of Lemma 6.8). Note that   kxk2 fi+1 (x) = exp − 2 2σi+1   kxk2 = exp − 2 2σi (1 + σi2 /(C 2 n))    kxk2 σi2 /(C 2 n) = exp − 2 · 1 − 2σi 1 + σi2 /(C 2 n)   kxk2 1 = fi (x) · exp · 2C 2 n 1 + σi2 /(C 2 n)   kxk2 ≤ fi (x) · exp . 2C 2 n We have that M (Qi , Qi+1 ) = sup S⊆K R Qi (S) Qi+1 (S) fi+1 (x) dx fi (x) · sup x∈K fi+1 (x) K fi (x) dx R ≤ K = R    fi+1 (x) dx kxk2 1 · sup exp − 2 · 2C n 1 + σi2 /(C 2 n) x∈K K fi (x) dx K R R fi+1 (x) dx K fi (x) dx R = K ≤ R K  fi (x) exp kxk2 /(2C 2 n) dx R K fi (x) dx  ≤ sup exp x∈K √ since kxk ≤ C n. 6.3 ≤ √  kxk2 2C 2 n  e  Bounding wasted steps The speedy walk is defined as the proper steps of the ball walk, where the point the ball walk attempts to visit is contained in K. For convenience, we restate the definition of the speedy walk from earlier (Figure 3). To prove convergence of the ball with a Metropolis filter, we prove convergence of the speedy walk, then bound the number of “wasted” steps. Note that the speedy walk cannot be implemented as described in Figure 3, but is an analysis tool to prove the mixing time of the ball walk. 17 Speedy Walk(δ, f ) At current point x ∈ K: 1. Pick random point y from K ∩ (x + δBn ). 2. Go to y with probability min{1, f (y)/f (x)}. Figure 3: The Speedy walk with a Metropolis filter Next, we bound the average number of wasted steps of the ball walk, i.e., when the ball walk tries to visit a point not in K. The average local conductance of the ball walk is defined as R ℓ(x)f (x) dx λ(f ) = KR . K f (x) dx We say that a density function f : Rn → R+ is a-rounded if any level set L contains a ball of radius a · µf (L). We now show that the average local conductance is large, i.e. at least a constant. Lemma 6.9. For any a-rounded logconcave density function f in Rn , λ(f ) ≥ 1 − 32 δ1/2 n1/4 . a1/2 Proof. Define fˆ as the following smoothened version of f , obtained by convolving f with a ball of radius δ. Let D be a convex subset of δBn of half its volume. R y∈x+D f (y) dy fˆ(x) = min . D vol(D) Now Lemma 6.3 from [25] shows that Z K δ fˆ(x) dx ≥ 1 − 32 1/2 n1/4 a1/2 . To complete the proof, we observe that for any point x, ℓ(x)f (x) ≥ fˆ(x). To see this, note that R 1 dy ℓ(x)f (x) = f (x) x+δBn vol(δBn ) R ≥ y∈x+δBn :f (y)≤f (x) R f (y) dy y∈x+δBn :f (y)≤f (x) 1 dy ≥ fˆ(x).  Lemma 6.10. The Gaussian N (0, σ 2 I) restricted to K containing a unit ball centered at 0 is min{σ, 1}-rounded. 18 Proof. The level sets of the distribution are balls restricted to K. For the distribution to be min{σ, 1}-rounded, we need that a level set of measure k contains a ball of radius k · min{σ, 1}. Consider the following function of t, which is an upper bound on the measure of the ball of radius t ≤ min{σ, 1}, since the unit ball is contained in K:   R t n−1 x2 dx x exp − 2 0 2σ   . g(t) = R min{σ,1} n−1 x2 x exp − dx 2 0 2σ Consider the second derivative of g: g ′′ (t) =  (n − 1) − t2 σ2   2  t tn−2 exp − 2σ 2   . ·R min{σ,1} n−1 x2 dx x exp − 0 2σ2 For g ′′ (t) to be nonnegative, we need σ 2 (n − 1) − t2 ≥ 0, which it is for n ≥ 2, t ∈ [0, min{σ, 1}]. Since g(0) = 0, g(min{σ, 1}) = 1, and the second derivative is nonnegative, we then have that g(t min{σ, 1}) ≤ t for t ∈ [0, 1], which proves the lemma.  We now show that for an appropriate selection of ball radius, the ball walk has large average local conductance. √ Lemma 6.11. If δ ≤ min{σ, 1}/(4096 n), then the average local conductance, λ(f ), for the density function f proportional to the Gaussian N (0, σ 2 In ) restricted to K containing the unit ball, is at least 1/2. Proof. Using Lemma 6.9 and Lemma 6.10, we have that λ(f ) ≥ 1 − 32 min{σ 1/2 , 1}n1/4 1 = . 1/4 1/2 2 64n min{σ , 1}  The following lemma is shown in [6]. Lemma 6.12. If the average local conductance is at least λ, M (Q0 , Q) ≤ M , and the speedy walk takes t steps, then the expected number of steps of the corresponding ball walk is at most M t/λ. Proof. Since M (Q0 , Q) ≤ M , we have that for all S ⊆ K, Q0 (S) ≤ M Q(S), and by induction on i, we get that Z Z Px (S)dQ(x) = M Q(S). Px (S)dQi−1 (x) ≤ M Qi (S) = K K For any point x, the expected number of steps until a proper step is made is 1/ℓ(x). So, given a point from Qi , the expected number of steps to obtain a point from Qi+1 is Z Z Z 1 1 1 M dQi (x) ≤ M dQ(x) = M dQ̂(x) = , λ K ℓ(x) K ℓ(x) K λ where Q̂ is the corresponding distribution for the ball walk with a Metropolis filter (i.e., with stationary distribution proportional to f (x)). If the speedy walk took t steps, then by linearity of expectation, the expected number of steps for the ball walk is at most M t/λ.  19 6.4 Mapping speedy distribution to target distribution When the speedy walk has converged, we obtain a point approximately from the speedy walk distribution ℓ(x)f (x). We will use a rejection routine to map a random point from this distribution to the target distribution f (x) while incurring a small amount of additional sampling error. We adapt the proof of Theorem 4.16 of [18] to the Gaussian setting. Lemma 6.13. Assume that kP − Q̂ktv ≤ ε, Bn ⊆ K, ε ≤ 1/10, and min{σ, 1} δ≤ p . 8 n log(n/ε) There is an algorithm that will use a constant number of random samples from P , in expectation, to obtain a distribution R satisfying kR − Qktv ≤ 10ε. Proof. The rejection routine is as follows: let c = 1 − 1/(2n). For a point u from distribution ℓ(x)f (x), let v = (1/c)u. Accept v with probability f (v)/f (u). Repeat until we accept a v. The correctness of the above routine follows from the following two facts: (i) with constant probability, the rejection sampling will succeed and (ii) removing a thin shell around the boundary makes ℓ(x) look close to uniform on average. Recall that Q̂ is the speedy walk distribution and Q is the ball walk distribution. Consider a level set µL = {x : f (x) ≥ L}. By logconcavity of f , µL is convex. From [18], Q̂µL (c · µL ) ≥ 1/2. By applying this to all level sets, it then follows that Q̂(cK) ≥ 1/2. Also from [18], if µL contains the unit ball, then Z (1 − ℓ(x)) dx ≤ εvol (µL ∩ cK) . µL ∩cK Recall that the level sets µL are balls intersected with K since f is a spherical Gaussian distribution. If µL does not contain the unit ball, a standard calculation (using that Bn ⊆ K) shows that the local conductance is at least 1 − ε for every point, and thus Z (1 − ℓ(x)) dx ≤ εvol(µL ∩ cK). µL ∩cK Using the above, we see that Z ∞Z Z (1 − ℓ(x)) {x ∈ 1cK } dx dL (1 − ℓ(x)) f (x) dx = 0 µL cK Z ∞ εvol(µL ∩ cK) dL ≤ 0 Z f (x) dx. ≤ε cK 20 Then, Z ℓ(x)f (x) dx Q̂(cK) = Z cK ℓ(x)f (x) dx Z Z (1 − ℓ(x)) f (x) dx f (x) dx − cK cK Z = ℓ(x)f (x) dx K Z Z f (x) dx f (x) dx − ε cK ≥ cK Z ℓ(x)f (x) dx K K and Q̂(cS) ≤ Z Z f (x) dx cS . ℓ(x)f (x) dx K Let P ′ be the distribution of the first sample from P which satisfies (1/c)x ∈ K. Define ( f (cx) if x ∈ K z(x) = 0 otherwise and let Z be the probability distribution corresponding to z. Then, P ′ (S) − Z(S) = Q(cS) P (cS) − P (cK) Q(cK) Q̂(cS) + ε Q(cS) Q̂(cK) − ε Q(cK) Z Z Z ℓ(x)f (x) dx f +ε K Z cS Z Z ≤ −Z ℓ(x)f (x) dx f −ε f −ε ≤ cK − cK K f (x) dx cS f (x) dx cK 1 + 2ε −1 1 − 2ε ≤ 10ε. ≤ √ Then accept a point x with probability f (x)/z(x), which is at least a constant since kxk ≤ 4σ n. The overall expected number of rejection steps is a constant since Q̂(cK) ≥ 1/2.  6.5 Proof of sampling theorems We can now prove Theorem 1.4 and Theorem 1.5 for sampling a Gaussian distribution restricted to a convex body. 21 Proof.(of Theorem 1.5) √ By Theorem 6.6 and Theorem 6.1, we have selecting δ = min{σ, 1}/(4096 n) implies that the speedy walk starting from a distribution that is M -warm will be within total variation distance ε of the target distribution in O(max{σ 2 , 1}n2 log(n/ε) log(M/ε)) steps. By Lemma 6.12, the ball walk will, in expectation, take at most 2M times as many steps since the average local conductance λ is at least 1/2. Therefore, the total number of expected ball walk steps is O(M max{σ 2 , 1}n2 log(n/ε) log(M/ε)). We then repeat this walk O(1) times until we obtain a point from the proper target distribution using Lemma 6.13.  Proof.(of Theorem 1.4.) Note that here, we are analyzing the sampling phases of Figure 1, and only the phases when 2 σ ≤ 1. By Theorem 1.5, we have that the ball walk will take O(M max{σ 2 , 1}n2 log(n/ε) log(M/ε)) steps in expectation. By Lemma 6.7, each phase will always provide a warm start to the next, i.e. M = O(1). By assigning a sampling error (ε/n)16 to each phase, we ensure that the overall sampling failure is at most ε by a straightforward union bound. Therefore, each sampling phase takes  n   O n2 log2 ε expected steps of the ball walk. Adding up across phases introduces an additional n log n factor since we increase σ 2 by the rate of 1 + 1/n between phases. If we want to instead run for a fixed number of steps, we can keep a global counter of the ball walk steps. Say the expected number of ball walk steps is T . If at any point the number of ball walk steps goes above 2T , we abandon this run of the algorithm. The probability of a single run failing is at most 1/2 by Markov’s inequality. If we want an overall failure probability of at most p, then we can run log(1/p) iterations of the algorithm, and with probability 1 − p, at least one of them will succeed.  Proof.(of Theorem 1.2) The proof of Theorem 1.2, which extends Gaussian sampling to uniform sampling, follows along the same lines as Theorem 1.4. When σ 2 ≤ 1, the total expected ball walk steps is  n   . O n3 log(n) log2 ε When σ 2 > 1, we additionally use Lemma 6.8, which implies that we can accelerate our cooling rate and still maintain a warm start. This accelerated rate allows us to overcome the increased mixing time of O∗ (max{σ 2 , 1}n2 ) once σ 2 ≥ 1. Now consider a “chunk” of phases as a set of phases until σ 2 doubles. There will be O(C 2 n/σ 2 ) phases in a chunk, where each chunk has expected mixing time O(σ 2 n2 log(n/ε)). Since there are O(log n) chunks (provided C = poly(n)), the total number of expected ball walk steps when σ 2 > 1 is   n  . O C 2 n2 log(n) log ε Note that this will yield a random sample with respect to a Gaussian with σ 2 = C 2 n restricted to K. We can map this point to a uniform random point using simple rejection sampling, which √ will succeed with probability at least 1/e since K ⊆ C n. If it fails, we can restart the algorithm. As with Theorem 1.4, we can repeat log(1/p) times to transform the expected ball walk steps into a fixed number of steps with success probability 1 − p.  22 7 Analysis of volume algorithm 7.1 Accelerated cooling schedule The goal of this section is to prove the Lemma 3.2, which gives a bound on the variance of the random variable we use to estimate the ratio of Gaussian integrals in the volume algorithm in Figure 1. Here we will actually prove the inequality to be true for all logconcave functions, but only apply it to an indicator function of a convex body. Let f : Rn → R be a logconcave function such that Ef (kXk2 ) = R2 . Define   kxk2 2 g(x, σ ) = f (x) exp − 2 2σ and also define Z 2 G(σ ) = g(x, σ 2 ) dx. Rn Define µi as the probability distribution proportional to g(x, σi2 ). Let X be a random sample 2 )/g(X, σ 2 ). From a standard calculation, we have that from µi and let Y = g(X, σi+1 i E(Y ) = 2 ) G(σi+1 . G(σi2 ) The second moment of Y is given by E(Y 2 ) = Z Rn  2 ) g(x, σi+1 g(x, σi2 ) 2 dµi (x) 2 ) 2 g(x, σi+1 g(x, σi2 ) = dx · g(x, σi2 ) G(σi2 ) Rn Z 2 )2 g(x, σi+1 1 dx = G(σi2 ) Rn g(x, σi2 )  Z 2 σ2  σi+1 1 i g x, 2 dx = 2 G(σi2 ) Rn 2σi − σi+1 Z  σ2 = σ2 i G( 2σ2i+1 ) −σ2 i i+1 G(σi2 ) . To bound the number of samples X needed to estimate Y within a target relative error, we will bound E(Y 2 )/E(Y )2 , which is given by 2) E(Y = E(Y )2 σ2 σ2 i G( 2σ2i+1 )G(σi2 ) −σ2 i i+1 2 )2 G(σi+1 . 2 Then letting σ 2 = σi+1 and σi2 = σ 2 /(1 + α), we can further simplify as  2   2  σ σ 2 G 1+α G 1−α E(Y ) = . E(Y )2 G(σ 2 )2 23 The above n-dimensional inequality is difficult to analyze directly. We will reduce it to a simpler 1-dimensional inequality via localization. Define an exponential needle E = (a, b, γ) as a segment [a, b] ⊆ Rn and γ ∈ R corresponding to the weight function eγt applied the segment [a, b]. The integral of an n-dimensional function f over this one dimensional needle is Z f= E Z |b−a| f (a + tu)eγt dt where u= 0 b−a . |b − a| We use the following theorem from [18]. Theorem 7.1. ([18]) Let f1 , f2 , f3 , f3 be four nonnegative continuous functions defined on Rn , and α, β > 0. Then, the following are equivalent: 1. For every logconcave function F defined on Rn with compact support, Z Rn F (t)f1 (t) dt  α Z F (t)f2 (t) dt Rn β ≤ Z Rn F (t)f3 (t) dt  α Z Rn F (t)f4 (t) dt β 2. For every exponential needle E, Z f1 E α Z f2 E β ≤ Z E f3 α Z f4 E β A crucial aspect of our proof is that we can restrict the support of our target logconcave function f , which then allows us to consider a restricted family of needles. Recall that we assumed Ef (kXk2 ) = R2 . Set R1 = 2R · log(1/ε). By the following lemma from [25], if we restrict the support of f to be R1 · Bn , we only lose an ε/2 fraction of the mass. Lemma 7.2. [25] Let X ∈ Rn be a random point from a logconcave distribution with E(X 2 ) = R2 . Then for any t > 1, Pr(kXk > tR) < exp (−R + 1). We can now reduce the desired inequality to a simpler form of exponential needles, which are restricted to lie in the interval [−R1 , R1 ]. Lemma 7.3. If for all intervals [ℓ, u] ⊆ [−R1 , R1 ] and γ > 0, Z u Z u  2    2 t (1+α) exp (γt) exp − t (1−α) dt · dt exp (γt) exp − 2σ2 2 2σ ℓ ℓ ≤ c, Z u  2  2 t dt exp (γt) exp − 2σ 2 ℓ then for all logconcave functions f defined on Rn whose support is a compact subset of R1 · Bn , 2 2 σ σ G( 1+α )G( 1−α ) ≤ c. 2 2 G(σ ) Proof. Applying Theorem 7.1 and setting f1 (x) = g(σ 2 /(1 + α), x), √ f2 (x) = g(σ 2 /(1 − α), x), f3 (x) = f4 (x) = c · g(σ 2 , x), β = γ = 1, we have that 2 2 σ σ )G( 1−α ) G( 1+α ≤c 2 2 G(σ ) 24 if and only if for all exponential needles E ⊆ Rn , Z  2   2  Z σ σ g 1−α g 1+α , x dx , x dx E E ≤ c. 2 Z 2 g (σ , x) dx E To prove the lemma, we will show that we can reduce the inequality for an arbitrary exponential needle E ⊆ Rn to the simpler form. E is defined by an interval I in Rn and an arbitrary exponential function exp (γt) on I. Define z as the closest distance from the origin to the extension of the I in both directions. Parameterize the interval I in terms of t, where t = 0 gives the closest point along the extension of I to the origin (note t = 0 does not necessarily have to be on I). Also define the minimum and maximum values of t on I as ℓ and u respectively. We can assume that −R1 ≤ ℓ ≤ u ≤ R1 since f is 0 outside of R1 · Bn . We then have that   2 Z u Z t + z2 2 ) dt exp (γt) exp − g(σ , x) dx = 2σ 2 ℓ E     Z u t2 z2 exp (γt) exp − 2 dt. = exp − 2 · 2σ 2σ ℓ Note that in the integral ratio, the terms with z cancel out since   (1 + α)z 2 (1 − α)z 2 2z 2 exp − − + = 1, 2σ 2 2σ 2 2σ 2 which then proves the lemma.  Before bounding the desired inequality, we first prove the following two helper lemmas. Lemma 7.4. Let X be a random variable with E(X 4 ) < ∞ and a ≤ X ≤ b. Then, E(X 4 ) − E(X 2 )2 ≤ 4 max{a2 , b2 }Var(X). Proof. Let Y be an independent random variable drawn from the same distribution as X. Then, 2Var(X 2 ) = Var(X 2 ) + Var(Y 2 ) = E(X 4 ) − E(X 2 )2 + E(Y 4 ) − E(Y 2 )2 = E(X 4 ) − 2E(X 2 )E(Y 2 ) + E(Y 4 )  = E (X 2 − Y 2 )2  = E (X + Y )2 (X − Y )2  ≤ 4 max{a2 , b2 }E (X − Y )2 = 4 max{a2 , b2 }E X 2 − 2XY + Y 2 = 8 max{a2 , b2 }Var(X).   Lemma 7.5. Let [ℓ, u] ⊆ [−R1 , R1 ] and  2  Ru 2 t x t exp (γt) exp − 2σ dt 2 ℓ   . v(x) = R u t2 x ℓ exp (γt) exp − 2σ2 dt Then, v ′ (x) ≥ −2R12 /x. 25 Proof. For convenience, define  2  t x s(x, t) = exp (γt) exp − 2 . 2σ We have that ′ v (x) =  1 2σ 2  · Z u t2 s(x, t) dt 2 − Z u s(x, t) dt ℓ 2 Z u s(x, t) dt ℓ Z u ℓ t4 s(x, t) dt . ℓ Observe that the above quantity is the difference of moments of a truncated Gaussian distribution. We then have that    1 γσ 2 σ 2 ′ 2 2 4 v (x) = , )ℓ≤X≤u · E(X ) − E(X ) where X ∼ N ( 2σ 2 x x 2R2 ≥ − 21 · Var(X) by Lemma 7.4 σ 2R2 σ 2 by Theorem 5.1 ≥ − 21 · σ x 2R2 = − 1. x  The following lemma now proves the variance bound. Lemma 7.6. Let [ℓ, u] ⊆ [−R1 , R1 ] and α ≤ 1/2. Then Z u Z u  2    2 t (1+α)   exp (γt) exp − t (1−α) dt · dt exp (γt) exp − 2σ2 2 2σ R12 α2 ℓ ℓ ≤ exp 2 · . Z u 2   2 σ 2 t exp (γt) exp − 2σ dt 2 ℓ Proof. Again for convenience, define  2  t x s(x, t) = exp (γt) exp − 2 . 2σ Define h(α) := Z u Z u s(1 − α, t) dt s(1 + α, t) dt · ℓ ℓ . 2 Z u s(1, t) dt ℓ Note that the lemma is equivalent to bounding h(α). We first prove the following claim, from which the lemma will easily follow. 26 Claim 7.7. For α ≤ 1/2, h′ (α) ≤ 4 · αR2 · h(α) . σ2 Proof. First, observe that  2   Z u  ∂  ∂ t (1 + α) s(1 + α, t) = exp (γt) exp − dt ∂α ∂α 2σ 2 ℓ −1 = 2 2σ Z ℓ u t2 (1 + α) t exp (γt) exp − 2σ 2  2  dt  and similarly  2 Z u    ∂  1 t (1 − α) 2 s(1 − α, t) = 2 t exp (γt) exp − dt . ∂α 2σ 2σ 2 ℓ Then taking the derivative of h(α) with respect to α gives Z ∂  ∂  (h(α)) =  ∂α ∂α  1 = 2· 2σ u ℓ Z u Z u  s(1 − α, t) dt  s(1 + α, t) dt ·  ℓ  2 Z u  s(1, t) dt ℓ Z u ℓ s(1 + α, t) dt · t2 s(1 ℓ Z u s(1 − α, t) dt · − α, t) dt − ℓ 2 Z u s(1, t) dt Z u t2 s(1 + α, t) dt ℓ ℓ Let We now have that  2  2    R u Ru 2 t (1+α) 2 exp (γt) exp − t (1−α) dt ′ t t exp (γt) exp − dt 2 2 ℓ ℓ h (α) 1 2σ 2σ .  2  2   = 2 · R − R u u t (1−α) t (1+α) h(α) 2σ exp (γt) exp − exp (γt) exp − dt dt ℓ ℓ 2σ2 2σ2   2 exp (γt) exp − t2 nx dt t 2 ℓ 2σ   . v(x) = R 2 u t nx exp (γt) exp − dt 2 ℓ 2σ Ru 27 . We then have that h′ (α) 1 = 2 h(α) 2σ  Z 1−α  v (x) dx − v(1 + α) ′ v(1 + α) + 1+α  Z 1+α 1 ′ v (x) dx =− 2 2σ 1−α Z 1+α 2  2R1 1 dx ≤ 2 2σ 1−α x ! R2 1 1+α = 12 − 2 2σ x 1−α   1 1 R12 − = 2 2σ (1 − α)2 (1 + α)2   2 R 4α = 12 2σ (1 − α2 )2 4R12 α ≤ . σ2  by Lemma 7.5  By Claim 7.7, we then have a bound on h(α) as follows: Z α d (ln h(x)) dx ln h(α) = ln h(0) + 0 dx Z α ′ h (x) = ln(1) + dx 0 h(x) Z α 4R12 x ≤ dx σ2 0 2R12 x2 α = σ2 0 2R12 α2 = , σ2 and thus h(α) ≤ exp  2R12 α2 σ2  .  n Lemma 7.8. Suppose a logconcave  function f : R → R has support contained in R1 · Bn . Let 2 2 2 g(x, σ ) = f (x) exp −kxk /(2σ ) . Let X be drawn from a distribution proportional to g(x, σ 2 ) and Y = g(X, σ 2 (1 + α))/g(X, σ 2 ). Then for α ≤ 1/2,  2 2 2R1 α E(Y 2 ) ≤ exp . E(Y )2 σ2 Proof. Follows immediately from Lemma 7.3 and Lemma 7.6.  The bound in Lemma 3.2 then follows by applying Lemma 7.8 with the indicator function of a convex body. 28 7.2 Proof of the main theorem In this section, we prove Theorem 1.1 by analyzing the runtime of the algorithm in Figure 1 and also showing that the volume estimate it computes is accurate. The following lemma says that the beginning and ending σ 2 for the algorithm are sufficient. p Lemma 7.9. If σ 2 ≤ 1/(n + 8n ln(1/ε)) and Bn ⊆ K, then Z −kxk2 exp − 2σ 2 K  −kxk2 exp − dx ≥ (1 − ε) 2σ 2 Rn   Z  dx. 2 √ 2 Let K ⊆ C nBn , fi (x) = exp(− kxk ), σi2 ≥ C 2 n, and σi+1 = ∞. Then for X drawn from 2σ2 i distribution proportional to fi ∩ K and Y = fi+1 (X)/fi (X), E(Y 2 ) ≤ e2 . E(Y )2 Proof. The proof that the starting Gaussian has most of its measure in the unit ball is in [6]. To show that σi2 ≥ C 2 n is sufficient to switch to the uniform distribution, observe that fi (X) ≥ 1/e since kXk2 ≤ C 2 n and thus Y ≤ e. Also note Y ≥ 1. Therefore E(Y 2 )/E(Y )2 ≤ e2 .  We now bound the variance when σ 2 is small. First, we will need the following lemma that is proved in [24]. Lemma 7.10. Let K ⊆ Rn be a convex body and f : K → R be a logconcave function. For any a > 0, define Z(a) = Z f (ax)dx. K Then an Z(a) is a logconcave function of a. Lemma 7.11.  Assume n ≥ 3. Let X be a random point in K with density proportional to fi (x) =  kxk2 2 = σi2 (1 + 1/n), and Y = fi+1 (X)/fi (X). Then, exp − 2σ2 , σi+1 i E(Y 2 ) 2 <1+ . 2 E(Y ) n Proof. We have Z E(Y 2 ) = E(Y )2 exp K  Z K Z   2 exp − kxk2σ(1+α) dx 2 K .  2  kxk2 exp − 2σ2 dx 2 − kxk2σ(1−α) 2  dx By Lemma 7.10, the function z(a) = an+1 z  1−α σ2     2 1+α 1 . z ≤z 2 σ σ2 R K  exp −akxk2 /2 dx is logconcave, and thus 29 Therefore  Z  Z kxk2 (1 − α) dx exp − 2σ 2 K kxk2 (1 + α) exp − 2σ 2 K   dx ≤  1 1 − α2 n+1 Z kxk2 exp − 2 2σ K   dx Setting α = 1/n, we have that E(Y 2 ) ≤ E(Y )2  1 1 − 1/n2 n+1 =  1 1+ 2 n −1 n+1 ≤ exp  1 n−1  ≤1+ 2 . n  We now show that the volume estimate computed in Algorithm 1 is accurate. Define Ri as the i-th integral ratio, i.e.  R 2 ) 2 ) dx F (σi+1 exp −kxk2 /(2σi+1 K  Ri := , = R 2 2 F (σi2 ) K exp −kxk /(2σi ) dx and let Wi denote the estimate of the algorithm for Ri . For two random variables X, Y , we will measure their independence by the following: µ(X, Y ) = sup |P (X ∈ A, Y ∈ B) − P (X ∈ A)P (Y ∈ B)|, A,B where A, B range over measurable subsets of the ranges of X, Y . We will give an argument similar to [24], and use the following lemmas that were proved there. Lemma 7.12. [24] If f and g are two measurable functions, then µ(f (X), g(Y )) ≤ µ(X, Y ). Lemma 7.13. [24] Let X, Y be random variables such that 0 ≤ X ≤ a and 0 ≤ Y ≤ b. Then |E(XY ) − E(X)E(Y )| ≤ abµ(X, Y ). Lemma 7.14. [24] Let X ≥ 0 be a random variable, a > 0, and X ′ = min(X, a). Then E(X ′ ) ≥ E(X) − E(X 2 ) . 4a Lemma 7.15. With probability at least 4/5, (1 − ε)R1 . . . Rm ≤ W1 . . . Wm ≤ (1 + ε)R1 . . . Rm . Proof. Let (X0i , X1i , X2i , . . . , Xki ) be the sequence of sample points for the ith volume phase. The distribution of each Xi is approximately the correct distribution, but slightly off based on the error parameter ν in each phase that bounds the total variation distance. We will define new random i variables X j that have the correct distribution for each phase. Note that Xj0 would be sampled from the exact distribution, and then rejected if outside of 0 K. Therefore Pr(Xj0 = X j ) = 1. Suppose that the total number of sample points throughout the algorithm is t. Using induction and the definition of total variation distance, we see that j Pr(Xij = X i , ∀i, j) ≥ 1 − tν. (5) 30 2 . Let   kXji k2 exp − 2σ2 i+1 i   Yj = kX i k2 exp − 2σj2 and i ki 1 X Wi = Yji . ki j=1 Note that for a fixed i, all of the Yji have the same expectation since they are from the exact distribution, and it is equal to E(W i ). Suppose that we have E((Yji )2 ) ≤ ci E(Yji )2 . Then 2   ki X 1  E((Yji )2 ) + ki (ki − 1)Ri2  ki2 j=1   ci − 1 · E(W i )2 . ≤ 1+ ki E(W i ) = (6) The following claim bounds the variance of our ratio estimater under a faster cooling rate; combined with Lemma 7.11, we have a bounds on the variance throughout our algorithm. It follows from Lemma 3.2. √ Claim 7.16. Suppose that K ⊆ C nBn and let α = σ 2 /(2C 2 n). Then,  E (Y i )2 σ2 < 1 + . E(Y i )2 C 2n Suppose that we had independence between samples and consider bounding the cumulative error for all phases of the algorithm. When σ 2 ≤ 1, we can bound the number of phases for the first part as m1 ≤ 2n log 4n. When σ 2 > 1, we will analyze the phases in chunks, where a chunk is the set of phases until σ 2 doubles. Note that the number of phases in a chunk starting with variance σ 2 is at most 2C 2 n/σ 2 . Also there are at most log(C 2 n) chunks. Observe that for a single chunk with starting variance σ 2 , where i, j are the starting and ending phases of the chunk, we have 2 2 E(W i . . . W j ) ≤ Ri2 . . . Rj2  2σ 2 1+ kC 2 n 2C 2 n/σ2 ≤  5 1+ k  . Then, there is one final phases when we switch to the uniform distribution, which has variance at most 1 + e2 by Lemma 7.9. Let m denote the total number of phases. If we had independence between samples, then we can use Lemma 7.11 and Claim 7.16 with Chebyshev’s inequality to bound the probability of failure: 31 Pr  |W 1 . . . W m − R1 . . . Rm | ε ≥ R1 . . . Rm 2  ≤ 4Var(W 1 . . . W m ) 2 ε2 R12 . . . Rm 4 = 2 ε ≤ 4 ε2 4 ε2 4 ≤ 2 ε 4 ≤ 2 ε 1 = 10 ≤ ! 2 2 E(W 1 . . . W m ) −1 2 R12 . . . Rm ! 2       e2 5 log C n 2 m1 1+ −1 1+ 1+ kn k k     2m1 5 log(C 2 n) e2 + + exp −1 kn k k   2  ε exp −1 50    ε2 1+ −1 40 However, subsequent samples are dependent, and we must carefully bound the dependence. The analysis is somewhat involved, but will follow essentially the sample template as in [24, 6] which utilizes the following lemma to bound dependence between subsequent samples, where ν is the target total variation distance for each sample point. For convenience, denote the entire sequence of t samples points used in the algorithm as (Z0 , Z1 , . . . , Zt−1 ). Lemma 7.17. (a) For 0 ≤ i < t, the random variables Zi and Zi+1 are ν-independent, and the random variables Z i and Z i+1 are (3ν)-independent. (b) For 0 ≤ i < t, the random variables (Z0 , . . . , Zi ) and Zi+1 are (3ν)-independent. (c) For 0 ≤ i < m, the random variables W 1 . . . W i and W i+1 are (3kmν)-independent. The variables W i are not bounded, but we will introduce a new set of random variables based on W i that are bounded so we can later apply Lemma 7.13. Let α= ε1/2 , 8(mµ)1/4 where µ = 3kmν. Note that α is much larger than one. Define Vi = min{W i , αE(W i )}. It is clear that E(Vi ) ≤ E(W i ), and by Lemma 7.14, we also have 2 E(Vi ) ≥ E(W i ) − 1 7 E(W i ) 1 ≥ (1 − (1 + ))E(W i ) ≥ (1 − )E(W i ). 4α k 2α 4αE(W i ) Let U0 = 1 and define recursively Ui+1 = min{Ui Vi+1 , αE(V1 ) . . . E(Vi+1 )}. We will now show that (1 − i−1 )E(V1 ) . . . E(Vi ) ≤ E(Ui ) ≤ (1 + 2µα2 i)E(V1 ) . . . E(Vi ). α 32 (7) By Lemma 7.12, the random variables Ui and Vi+1 are µ-independent, and by Lemma 7.13 and since α ≥ 1, |E(Ui Vi+1 − E(Ui )E(Vi+1 )| ≤ µαE(V1 ) . . . E(Vi )αE(W i+1 ) ≤ 2µα2 E(V1 ) . . . E(Vi+1 ). (8) From (8), we can get the upper bound on E(Ui+1 ) by induction: E(Ui+1 ) ≤ E(Ui Vi+1 ) ≤ E(Ui )E(Vi+1 ) + 2µα2 E(V1 ) . . . E(Vi+1 ) ≤ (1 + 2µα2 (i + 1))E(V1 ) . . . E(Vi+1 ). (9) Similarly, and E(Ui2 ) ≤ (1 + 2µα4 i)E(V12 ) . . . E(Vi2 ) 2 ) E(Ui2 Vi+1 4 ≤ (1 + 2µα (10) 2 i)E(V12 ) . . . E(Vi+1 ). (11) For the lower bound, we use Lemma 7.14 and (11) to get: 2 ) E(Ui2 Vi+1 4αE(V1 ) . . . E(Vi+1 ) 2 ) E(V12 ) . . . E(Vi+1 ≥ E(Ui Vi+1 ) − (1 + 2µα4 i) . 4αE(V1 ) . . . E(Vi+1 ) E(Ui+1 ) ≥ E(Ui Vi+1 ) − (12) For α ≥ 3k, we have that 7 2 E(Vi2 ) ≤ E(W i ) ≤ (1 + )E(W i )2 k 7 1 ≤ (1 + ) E(Vi )2 k (1 − 1/(2α))2 1 7 ≤ (1 + )(1 + )E(Vi )2 k 2k 8 ≤ (1 + )E(Vi )2 . k (13) Combining (8), (12), and (13), 1 8 (1 + 2µα4 i)(1 + )i E(V1 ) . . . E(Vi+1 ) 4α k 1 + 2µα4 i E(V1 ) . . . E(Vi+1 ) ≥ E(Ui Vi+1 ) − 2α 1 ≥ E(Ui )E(Vi+1 ) − E(V1 ) . . . E(Vi+1 ). α E(Ui+1 ) ≥ E(Ui Vi+1 ) − Then, by induction on i, E(Ui+1 ) ≥ E(V1 ) . . . E(Vi+1 ) − i E(V1 ) . . . E(Vi+1 ). α Putting (9) and (14) together, we now have a proof of (7). Thus, ε ε E(Um ) ≤ (1 + )E(V1 ) . . . E(Vm ) ≤ (1 + )E(W 1 ) . . . E(W m ). 4 4 33 (14) We also have that α ≥ 4m/ε implies ε E(Um ) ≥ (1 − )E(W 1 ) . . . E(W m ). 4 From (10) and (13), and the selection of α, µ, and the lower bound on k, we have that 2 E(Um ) ≤ (1 + 2µα4 m)E(V12 ) . . . E(Vm2 ) 8 ≤ (1 + 2µα4 m)(1 + )m E(V1 )2 . . . E(Vm )2 k 8 1 ≤ (1 + 2µα4 m)(1 + )m E(Um )2 k (1 − (m − 1)/α)2 ε2 ≤ (1 + )E(Um )2 , 64 and hence  ε Pr |Um − E(Um )| ≤ E(W 1 ) . . . E(W m ) ≥ 0.9 2 by Chebyshev’s inequality. Then, applying Markov’s inequality,  2 Pr(Ui+1 6= Ui Vi+1 ) = Pr Ui Vi+1 > αE(V1 ) . . . E(Vi+1 ) ≤ α and similarly Pr(Vi 6= W i ) ≤ 1 . α So, with probability at least 1 − 3k/α, we have Um = W 1 . . . W m . Also, from (5), we have that W 1 . . . W m = W1 . . . Wm with probability at least 1 − 2kmν. Recall that E(W 1 ) . . . E(W m ) = R1 . . . Rm . Therefore, with probability at least 4/5 ε |W1 . . . Wm − R1 . . . Rm | ≤ R1 . . . Rm , 2 which proves the lemma.  We can now prove the main theorem. Proof.(of Theorem 1.1) We assume that ε ≥ 2−n , which only ignores cases which would take exponential time. Then by Lemma 7.9, selecting σ02 = 1/(4n) implies that all but a negligible amount of volume of the starting Gaussian is contained in K. Recall that our algorithm only has a bound on the expected number of steps. To account for this, we will run the algorithm O(1) times to obtain a run which takes at most a constant factor of ball walk steps to proper steps, say with probability 1/20. By Lemma 7.15, the answer returned by the algorithm will be within the target relative error with probability at least 4/5. Thus the overall probability of failure is 3/4. Note that we can boost this probability of failure to 1 − p by the standard trick of repeating the algorithm log 1/p times and returning the median. √ We now analyze the runtime of the algorithm in Figure 1. Set C = R log(1/ε)/ n. Assume that C ≥ 1 (otherwise arbitrarily increase C). When σ 2 ≤ 1, using the value of k, the mixing time assigned to each phase, and the fact that there are O(n log n) phases, we see that the total number 34 of ball walk steps taken is O(n2.5 k log n log2 (n/ε)) = O(n3 log2 n log2 (n/ε)/ε2 ) = O ∗ (n3 ). When σ 2 > 1, the analysis is very similar if we note that the faster cooling rate and fewer number of samples cancels out the slower mixing time of O∗ (σ 2 n2 ). Thus, it follows that the total number of ball walk steps taken is !  2 2  C 2 n3 log2 n log2 nε R n 2 n 2 2 1 log · log n log =O = O ∗ (R2 n2 ). O ε2 ε2 ε ε  8 Conclusion We make a few concluding remarks: 1. In our algorithm, the complexity of volume computation for well-rounded bodies is essentially the same as the amortized complexity of generating a single uniform random sample — both are O∗ (n3 ). This is in contrast to all previous volume algorithms where the amortized complexity of sampling is lower by at least a factor of n compared to the complexity of volume computation. 2. It would be interesting to extend our algorithm to integrating any well-rounded logconcave function; we expect this should be possible with essentially the same complexity. The variance of the ratio of integrals computed in each phase, as well as the isoperimetric inequality, are already proven in full generality for all logconcave functions. 3. The accelerated cooling schedule used in our algorithm can be seen as a worst-case analysis of the cooling schedule used in a practical algorithm for volume computation [5, 8]; in the latter, we used an adaptive schedule by empirically estimating the maximum tolerable change in the variance of the Gaussian that keeps the variance of the ratio estimator bounded by a constant. 4. An important open question is to find an O∗ (n3 ) rounding algorithm for arbitrary convex bodies. The current best rounding complexity is O ∗ (n4 ) [24]. References [1] D. Applegate and R. Kannan. Sampling and integration of near log-concave functions. In STOC, pages 156–163, 1991. [2] K. M. Ball. Logarithmically concave functions and sections of convex sets in rn. Studia Mathematica, 88:69–84, 1988. [3] H. J. Brascamp and E. H. Lieb. On extensions of the brunn-minkowski and prekopa-liendler theorems, including inequalities for log-concave functions, and with application to the diffusion equationslogarithmic concave measures and functions. J. Functional Anal., 22:366–389, 1976. [4] R. Bubley, M. Dyer, and M. Jerrum. An elementary analysis of a procedure for sampling points in a convex body. Random Structures Algorithms, 12(3):213–235, 1998. [5] B. Cousins and S. Vempala. Volume computation of convex bodies. MATLAB File Exchange, 2013. http://www.mathworks.com/matlabcentral/fileexchange/ 43596-volume-computation-of-convex-bodies. 35 [6] B. Cousins and S. Vempala. A cubic algorithm for computing Gaussian volume. In SODA, pages 1215–1228, 2014. [7] B. Cousins and S. Vempala. Bypassing KLS: Gaussian cooling and an O ∗ (n3 ) volume algorithm. In STOC, pages 539–548, 2015. [8] B. Cousins and S. Vempala. A practical volume algorithm. Math. Prog. Computation, 2015. to appear. [9] M. E. Dyer and A. M. Frieze. On the complexity of computing the volume of a polyhedron. SIAM J. Comput., 17(5):967–974, 1988. [10] M. E. Dyer and A. M. Frieze. Computing the volume of a convex body: a case where randomness provably helps. In Proc. of AMS Symposium on Probabilistic Combinatorics and Its Applications, pages 123–170, 1991. [11] M. E. Dyer, A. M. Frieze, and R. Kannan. A random polynomial time algorithm for approximating the volume of convex bodies. In STOC, pages 375–381, 1989. [12] M. E. Dyer, A. M. Frieze, and R. Kannan. A random polynomial-time algorithm for approximating the volume of convex bodies. J. ACM, 38(1):1–17, 1991. [13] R. Eldan. Thin shell implies spectral gap up to polylog via a stochastic localization scheme. Geometric and Functional Analysis, 23:532–569, 2013. [14] R. Eldan and B. Klartag. Approximately gaussian marginals and the hyperplane conjecture. Contermporary Mathematics, 545, 2011. [15] B. Fleury. Concentration in a thin euclidean shell for log-concave measures. J. Funct. Anal., 259(4):832–841, 2010. [16] Z. Furedi and I. Barany. Computing the volume is difficult. In STOC ’86: Proceedings of the eighteenth annual ACM symposium on Theory of computing, pages 442–447, New York, NY, USA, 1986. ACM. [17] Z. Furedi and I. Barany. Approximation of the sphere by polytopes having few vertices. Proceedings of the AMS, 102(3), 1988. [18] R. Kannan, L. Lovász, and M. Simonovits. Isoperimetric problems for convex bodies and a localization lemama. Discrete & Computational Geometry, 13:541–559, 1995. [19] R. Kannan, L. Lovász, and M. Simonovits. Random walks and an O∗ (n5 ) volume algorithm for convex bodies. Random Structures and Algorithms, 11:1–50, 1997. [20] L. Lovász and M. Simonovits. Mixing rate of Markov chains, an isoperimetric inequality, and computing the volume. In ROCS, pages 482–491, 1990. [21] L. Lovász and M. Simonovits. Random walks in a convex body and an improved volume algorithm. In Random Structures and Alg., volume 4, pages 359–412, 1993. [22] L. Lovász and S. Vempala. Fast algorithms for logconcave functions: sampling, rounding, integration and optimization. In FOCS, pages 57–68, 2006. 36 [23] L. Lovász and S. Vempala. Hit-and-run from a corner. SIAM J. Computing, 35:985–1005, 2006. [24] L. Lovász and S. Vempala. Simulated annealing in convex bodies and an O∗ (n4 ) volume algorithm. J. Comput. Syst. Sci., 72(2):392–417, 2006. [25] L. Lovász and S. Vempala. The geometry of logconcave functions and sampling algorithms. Random Structures and Algorithms, 30(3):307–358, 2007. 37
8cs.DS
QUANTIFYING SEPARABILITY IN VIRTUALLY SPECIAL GROUPS arXiv:1501.07001v2 [math.GR] 5 Feb 2016 MARK F. HAGEN AND PRIYAM PATEL Abstract. We give a new, effective proof of the separability of cubically convex-cocompact subgroups of special groups. As a consequence, we show that if G is a virtually compact special hyperbolic group, and Q ≤ G is a K-quasiconvex subgroup, then any g ∈ G − Q of word-length at most n is separated from Q by a subgroup whose index is polynomial in n and exponential in K. This generalizes a result of Bou-Rabee and the authors on residual finiteness growth [9] and a result of the second author on surface groups [34]. Introduction Early motivation for studying residual finiteness and subgroup separability was a result of the relevance of these properties to decision problems in group theory. An observation of Dyson [18] and Mostowski [31], related to earlier ideas of McKinsey [30], states that finitely presented residually finite groups have solvable word problem. The word problem is a special case of the membership problem, i.e. the problem of determining whether a given g ∈ G belongs to a particular subgroup H of G. Separability can produce a solution to the membership problem in essentially the same way that a solution to the word problem is provided by residual finiteness (see, e.g., the discussion in [2]). A subgroup H ≤ G is separable in G if, for all g ∈ G − H, there exists G0 ≤f.i. G with H ≤ G0 and g 6∈ G0 . Producing an upper bound, in terms of g and H, on the minimal index of such a subgroup G0 is what we mean by quantifying separability of H in G. Quantifying separability is related to the membership problem; see Remark D below. Recently, separability has played a crucial role in low-dimensional topology, namely in the resolutions of the Virtually Haken and Virtually Fibered conjectures [1, 40]. Its influence in topology is a consequence of the seminal paper of Scott [37], which establishes a topological reformulation of subgroup separability. Roughly, Scott’s criterion allows one to use separability to promote (appropriately construed) immersions to embeddings in finite covers. In [1], Agol proved the Virtually Special Conjecture of Wise, an outstanding component of the proofs of the above conjectures. Agol’s theorem shows that every word hyperbolic cubical group virtually embeds in a right-angled Artin group (hereafter, RAAG). Cubically convex-cocompact subgroups of RAAGs are separable [25, 22] and Agol’s theorem demonstrates that word hyperbolic cubical groups inherit this property via the virtual embeddings (separability properties are preserved under passing to subgroups and finite index supergroups). In fact, since quasiconvex subgroups of hyperbolic cubical groups are cubically convex-cocompact [22, 36], all quasiconvex subgroups of such groups are separable. In this paper, we give a new, effective proof of the separability of cubically convex-cocompact subgroups of special groups. Our main technical result is: Theorem A. Let Γ be a simplicial graph and let Z be a compact connected cube complex, based at a 0–cube x, with a based local isometry Z → SΓ . For all g ∈ AΓ − π1 Z, there is a cube complex (Y, x) such that: (1) Z ⊂ Y ; (2) there is a based local isometry Y → SΓ such that Z → SΓ factors as Z ,→ Y → SΓ ; (3) any closed based path representing g lifts to a non-closed path at x in Y ; (4) |Y (0) | ≤ |Z (0) |(|g| + 1), where |g| is the word length of g with respect to the standard generators. Date: March 20, 2018. 2010 Mathematics Subject Classification. 20E26, 20F36. 1 Via Haglund-Wise’s canonical completion [23], Theorem A provides the following bounds on the separability growth function (defined in Section 1) of the class of cubically convex-cocompact subgroups of a (virtually) special group. Roughly, separability growth quantifies separability of all subgroups in a given class. Corollary B. Let G ∼ = π1 X, with X a compact special cube complex, and let QR be the class of subgroups represented by compact local isometries to X whose domains have at most R vertices. Then R SepQ G,S (Q, n) ≤ P Rn for all Q ∈ QR and n ∈ N, where the constant P depends only on the generating set S. Hence, letting Q0K be e (0) , the class of subgroups Q ≤ G such that the convex hull of Qx̃ lies in NK (Qx̃) and x̃ ∈ X Q0 K SepG,S (Q, n) ≤ P 0 grXe (K)n, e S, and gr e is the growth function of X e (0) . where P 0 depends only on G, X, X In the hyperbolic case, where cubically convex-cocompactness is equivalent to quasiconvexity, we obtain a bound that is polynomial in the length of the word and exponential in the quasiconvexity constant: Corollary C. Let G be a group with an index-J special subgroup. Fixing a word-length k − kS on G, suppose that (G, k − kS ) is δ-hyperbolic. For each K ≥ 1, let QK be the set of subgroups Q ≤ G such that Q is K-quasiconvex with respect to k − kS . Then there exists a constant P = P (G, S) such that for all K ≥ 0, Q ∈ QK , and n ≥ 0, J! J! K SepQ G,S (Q, n) ≤ P grG (P K) n , where grG is the growth function of G. Corollary C says that if G is a hyperbolic cubical group, Q ≤ G is K-quasiconvex, and g ∈ G − Q, then g is separated from Q by a subgroup of index bounded by a function polynomial in kgkS and exponential in K. The above results fit into a larger body of work dedicated to quantifying residual finiteness and subgroup separability of various classes of groups (see, e.g., [10, 11, 27, 14, 34, 33, 35, 8, 12, 29]). When G is the fundamental group of a hyperbolic surface, compare Corollary C to [34, Theorem 7.1]. Combining various cubulation results with [1], the groups covered by Corollary C include fundamental groups of hyperbolic 3–manifolds [6, 26], hyperbolic Coxeter groups [24], simple-type arithmetic hyperbolic lattices [5], hyperbolic free-by-cyclic groups [21], hyperbolic ascending HNN extensions of free groups with irreducible monodromy [20], hyperbolic groups with a quasiconvex hierarchy [40], C 0 ( 61 ) small cancellation groups [38], and hence random groups at low enough density [32], among many others. In [9] Bou-Rabee and the authors quantified residual finiteness for virtually special groups, by working in RAAGs and appealing to the fact that upper bounds on residual finiteness growth are inherited by finitely-generated subgroups and finite-index supergroups. Theorem A generalizes a main theorem of [9], and accordingly the proof is reminiscent of the one in [9]. However, residual finiteness is equivalent to separability of the trivial subgroup, and thus it is not surprising that quantifying separability for an arbitrary convex-cocompact subgroup of a RAAG entails engagement with a more complex geometric situation. Our techniques thus significantly generalize those of [9]. Remark D (Membership problem). If H is a finitely-generated separable subgroup of the finitely-presented {H} group G, and one has an upper bound on SepG,S (|g|), for some finite generating set S of G, then the {H} following procedure decides if g ∈ H: first, enumerate all subgroups of G of index at most SepG,S (|g|) using a finite presentation of G. Second, for each such subgroup, test whether it contains g; if so, ignore it, and if not, proceed to the third step. Third, for each finite-index subgroup not containing g, test whether 2 it contains each of the finitely many generators of H; if so, we have produced a finite-index subgroup con{H} taining H but not g, whence g 6∈ H. If we exhaust the subgroups of index at most SepG,S (|g|) without finding such a subgroup, then g ∈ H. In particular, Corollary C gives an effective solution to the membership problem for quasiconvex subgroups of hyperbolic cubical groups, though it does not appear to be any more efficient than the more general solution to the membership problem for quasiconvex subgroups of (arbitrary) hyperbolic groups recently given by Kharlampovich–Miasnikov–Weil in [28]. The paper is organized as follows: In Section 1, we define the separability growth of a group with respect to a class Q of subgroups, which generalizes the residual finiteness growth introduced in [7]. We also provide some necessary background on RAAGs and cubical geometry. In Section 2, we discuss corollaries to the main technical result, including Corollary C, before concluding with a proof of Theorem A in Section 3. Acknowledgments. We thank K. Bou-Rabee, S. Dowdall, F. Haglund, D.B. McReynolds, N. Miller, H. Wilton, and D.T. Wise for helpful discussions about issues related to this paper. We also thank an anonymous referee for astute corrections. The authors acknowledge travel support from U.S. National Science Foundation grants DMS 1107452, 1107263, 1107367 "RNMS: Geometric Structures and Representation Varieties" (the GEAR Network) and from grant NSF 1045119. M.F.H. was supported by the National Science Foundation under Grant Number NSF 1045119. 1. Background 1.1. Separability growth. Let G be a group generated by a finite set S and let H ≤ G be a subgroup. ΩH Let ΩH = {∆ ≤ G : H ≤ ∆}, and define a map DG : G − H → N ∪ {∞} by ΩH (g) = min{[G : ∆] : ∆ ∈ ΩH , g 6∈ ∆}. DG This is a special case of the notion of a divisibility function defined in [7] and discussed in [11]. Note that ΩH takes only finite values. H is a separable subgroup of G if and only if DG The separability growth of G with respect to a class Q of subgroups is a function SepQ G,S : Q × N → N ∪ {∞} given by o n ΩQ (g) : g ∈ G − Q, kgk ≤ n . SepQ (Q, n) = max D S G G,S If Q is a class of separable subgroups of G, then the separability growth measures the index of the subgroup to which one must pass in order to separate Q from an element of G − Q of length at most n. For example, when G is residually finite and Q = {{1}}, then SepQ G,S is the residual finiteness growth function. The following fact is explained in greater generality in [9, Section 2]. (In the notation of [9], ΩQ SepQ G,S (Q, n) = RFG,S (n) for all Q ∈ Q and n ∈ N.) Proposition 1.1. Let G be a finitely generated group and let Q be a class of subgroups of G. If S, S 0 are finite generating sets of G, then there exists a constant C > 0 with Q SepQ G,S 0 (Q, n) ≤ C · SepG,S (Q, Cn) for Q ∈ Q, n ∈ N. Hence the asymptotic growth rate of SepQ G,S is independent of S. (Similar statements assert that upper bounds on separability growth are inherited by finite-index supergroups and arbitrary finitely-generated subgroups but we do not use, and thus omit, these.) 3 1.2. Nonpositively-curved cube complexes. We assume familiarity with nonpositively-curved and CAT(0) cube complexes and refer the reader to e.g. [19, 22, 39, 40] for background. We now make explicit some additional notions and terminology, related to convex subcomplexes, which are discussed in greater depth in [4]. We also discuss some basic facts about RAAGs and Salvetti complexes. Finally, we will use the method of canonical completion, introduced in [23], and refer the reader to [9, Lemma 2.8] for the exact statement needed here. 1.2.1. Local isometries, convexity, and gates. A local isometry φ : Y → X of cube complexes is a locally injective combinatorial map with the property that, if e1 , . . . , en are 1–cubes of Y all incident to a 0–cube y, and the (necessarily distinct) 1–cubes φ(e1 ), . . . , φ(en ) all lie in a common n–cube c (containing φ(y)), then e1 , . . . , en span an n–cube c0 in Y with φ(c0 ) = c. If φ : Y → X is a local isometry and X is e of universal nonpositively-curved, then Y is as well. Moreover, φ lifts to an embedding φ̃ : Ye → X e in the following sense. covers, and φ̃(Ye ) is convex in X e e is full if K contains each n–cube of X e whose Let X be a CAT(0) cube complex. The subcomplex K ⊆ X T 1-skeleton appears in K. If K is full, then K is isometrically embedded if K ∩ i Hi is connected whenever e Equivalently, the inclusion K (1) ,→ X e (1) is an {Hi } is a set of pairwise-intersecting hyperplanes of X. e of the full subcomplex isometric embedding with respect to the graph-metric. If the inclusion K ,→ X K is a local isometry, then K is convex. Note that a convex subcomplex is necessarily isometrically e (1) . A convex subcomplex embedded, and in fact K is convex if and only if K (1) is metrically convex in X K is a CAT(0) cube complex in its own right, and its hyperplanes have the form H ∩ K, where K is a e Moreover, if K is convex, then hyperplanes H1 ∩ K, H2 ∩ K of K intersect if and only hyperplane of X. if H1 ∩ H2 6= ∅. We often say that the hyperplane H crosses the convex subcomplex K to mean that H ∩ K 6= ∅ and we say the hyperplanes H, H 0 cross if they intersect. Hyperplanes are an important source of convex subcomplexes, in two related ways. First, recall that for e the carrier N (H) is a convex subcomplex. Second, N (H) ∼ all hyperplanes H of X, = H × [− 21 , 12 ], and e “bounding” N (H) are convex subcomplexes isomorphic to H (when the subcomplexes H × {± 12 } of X e A subcomplex H is given the cubical structure in which its n–cubes are midcubes of (n + 1)–cubes of X). 1 e is the of the form H × {± 2 } is a combinatorial hyperplane. The convex hull of a subcomplex S ⊂ X intersection of all convex subcomplexes that contain S; see [22]. e be a convex subcomplex. Then there is a map gK : X e (0) → K such that for all x ∈ X e (0) , Let K ⊆ X the point gK (x) is the unique closest point of K to x. (This point is often called the gate of x in K; gates e → K, the gate map. See are discussed further in [17] and [3].) This map extends to a cubical map gK : X e.g. [4] for a detailed discussion of the gate map in the language used here; we use only that it extends the map on 0–cubes and has the property that for all x, y, if gK (x), gK (y) are separated by a hyperplane H, then the same H separates x from y. Finally, the hyperplane H separates x from gK (x) if and only if H e separates x from K. The gate map allows us to define the projection of the convex subcomplex K 0 of X 0(0) onto K to be gK 0 (K), which is the convex hull of the set {gK (x) ∈ K : x ∈ K }. Convex subcomplexes K, K 0 are parallel if gK 0 (K) = K 0 and gK (K 0 ) = K. Equivalently, K, K 0 are parallel if and only if, for each hyperplane H, we have H ∩ K 6= ∅ if and only if H ∩ K 0 6= ∅. Note that parallel subcomplexes are isomorphic. e Then the convex Remark 1.2. We often use the following facts. Let K, K 0 be convex subcomplexes of X. 0 0 hull C of K ∪ K contains the union of K, K and a convex subcomplex of the form GK (K 0 ) × γ̂, where GK (K 0 ) is the image of the gate map discussed above and γ̂ is the convex hull of a geodesic segment γ joining a closest pair of 0–cubes in K, K 0 , by [4, Lemma 2.4]. A hyperplane H crosses K and K 0 if and only if H crosses GK (K 0 ); the hyperplane H separates K, K 0 if and only if H crosses γ̂. All remaining hyperplanes either cross exactly one of K, K 0 or fail to cross C. Observe that the set of hyperplanes 4 separating K, K 0 contains no triple H, H 0 , H 00 of disjoint hyperplanes, none of which separates the other two. (Such a configuration is called a facing triple.) 1.2.2. Salvetti complexes and special cube complexes. Let Γ be a simplicial graph and let AΓ be the corresponding right-angled Artin group (RAAG), i.e. the group presented by V (Γ) | [v, w], {v, w} ∈ E(Γ) , where V (Γ) and E(Γ) respectively denote the vertex- and edge-sets of Γ. The phrase generator of Γ refers to this presentation; we denote each generator of AΓ by the corresponding vertex of Γ. The RAAG AΓ is isomorphic to the fundamental group of the Salvetti complex SΓ , introduced in [16], which is a nonpositively-curved cube complex with one 0–cube x, an oriented 1–cube for each v ∈ V (Γ), labeled by v, and an n–torus (an n–cube with opposite faces identified) for every n–clique in Γ. A cube complex X is special if there exists a simplicial graph Γ and a local isometry X → SΓ inducing e → SeΓ of universal covers whose a monomorphism π1 X → AΓ and a π1 X-equivariant embedding X image is a convex subcomplex. Specialness allows one to study geometric features of π1 X by working inside of SeΓ , which has useful structure not necessarily present in general CAT(0) cube complexes; see Section 1.2.3. Following Haglund-Wise [23], a group G is (virtually) [compact] special if G is (virtually) isomorphic to the fundamental group of a [compact] special cube complex. 1.2.3. Cubical features particular to Salvetti complexes. Let Γ be a finite simplicial graph and let Λ be an induced subgraph of Γ. The inclusion Λ ,→ Γ induces a monomorphism AΛ → AΓ . In fact, there is an injective local isometry SΛ → SΓ inducing AΛ → AΓ . Hence each conjugate AgΛ of AΛ in AΓ is the stabilizer of a convex subcomplex g SeΛ ⊆ SeΓ . A few special cases warrant extra consideration. When Λ ⊂ Γ is an n-clique, for some n ≥ 1, then SΛ ⊆ SΓ is an n–torus, which is the Salvetti complex of the sub-RAAG isomorphic to Zn generated by n pairwise-commuting generators. In this case, SΛ is a standard n-torus in SΓ . (When n = 1, SΛ is a standard circle.) Each lift of SeΛ to SeΓ is a standard flat; when n = 1, we use the term standard line; a compact connected subcomplex of a standard line is a standard segment. The labels and orientations of 1–cubes in SΓ pull back to SeΓ ; a standard line is a convex subcomplex isometric to R, all of whose 1–cubes have the same label, such that each 0–cube has one incoming and one outgoing 1–cube. When Lk(v) is the link of a vertex v of Γ, the subcomplex SLk(v) is an immersed combinatorial hyperplane in the sense that SeLk(v) is a combinatorial hyperplane of SeΓ . There is a corresponding hyperplane, whose carrier is bounded by SeLk(v) and v SeLk(v) , that intersects only 1–cubes labeled by v. Moreover, SeLk v is contained in SeSt(v) , where St(v) is the star of v, i.e. the join of v and Lk(v). It follows that SeSt(v) ∼ = SeLk(v) × Sev , where Sev is a standard line. Note that the combinatorial hyperplane SeLk(v) is parallel to v k SeLk(v) for all k ∈ Z. Likewise, Sev is parallel to g Sev exactly when g ∈ AΛ , and parallel standard lines have the same labels. We say Sev is a standard line dual to SeLk(v) , and is a standard line dual to any hyperplane H such that N (H) has SeLk(v) as one of its bounding combinatorial hyperplanes. Remark 1.3. We warn the reader that a given combinatorial hyperplane may correspond to distinct hyperplanes whose dual standard lines have different labels; this occurs exactly when there exist multiple vertices in Γ whose links are the same subgraph. However, the standard line dual to a genuine (noncombinatorial) hyperplane is uniquely-determined up to parallelism. Definition 1.4 (Frame). Let K ⊆ SeΓ be a convex subcomplex and let H be a hyperplane. Let L be a standard line dual to H. The frame of H is the convex subcomplex H 0 × L ⊆ SeΓ described above, where H 0 is a combinatorial hyperplane bounding N (H). If K ⊆ SeΓ is a convex subcomplex, and H intersects K, then the frame of H in K is the complex K ∩ (H × L). It is shown in [9] that the frame of H in K has 5 the form (H ∩ K) × (L ∩ K), provided that L is chosen in its parallelism class to intersect K. Note that the frame of H is in fact well-defined, since all possible choices of L are parallel. 2. Consequences of Theorem A Assuming Theorem A, we quantify separability of cubically convex-cocompact subgroups of special groups with the proofs of Corollaries B and C, before proving Theorem A in the next section. Proof of Corollary B. Let Γ be a finite simplicial graph so that there is a local isometry X → SΓ . Let Q ∈ QR be represented by a local isometry Z → X. Then for all g ∈ π1 X − π1 Z, by Theorem A, there is a local isometry Y → SΓ such that Y contains Z as a locally convex subcomplex, and g 6∈ π1 Y , and |Y (0) | ≤ |Z (0) |(|g| + 1). Applying canonical completion [23] to Y → SΓ yields a cover SbΓ → SΓ in which Y embeds; this cover has degree |Y (0) | by [9, Lemma 2.8]. Let H 0 = π1 SbΓ ∩ π1 X, so that π1 Z ≤ H 0 , and g 6∈ H 0 , and [π1 X : H 0 ] ≤ |Z (0) |(|g| + 1). The first claim follows. e lies in NK (QX̃). Then Let G ∼ = π1 X with X compact special, Q ≤ G, and the convex hull of Qx̃ in X the second claim follows since we can choose Z to be the quotient of the hull of Qx̃ by the action of Q, and |Z (0) | ≤ grXe (K).  In general, the number of 0–cubes in Z is computable from the quasiconvexity constant of a Q-orbit in (1) e X by [22, Theorem 2.28]). In the hyperbolic case, we obtain Corollary C in terms of the quasiconvexity constant, without reference to any particular cube complex: Proof of Corollary C. We use Corollary B when J = 1, and promote the result to a polynomial bound when J ≥ 1. Let Q ∈ QK and let g ∈ G − Q. The special case: Suppose J = 1 and let X be a compact special cube complex with G ∼ = π1 X. Let Z → X be a compact local isometry representing the inclusion Q → G. Such a complex exists by quasiconvexity of Q and [22, Theorem 2.28], although we shall use the slightly more computationally e (1) , d) explicit proof in [36]. Let A0 ≥ 1, B 0 ≥ 0 be constants such that an orbit map (G, k − kS ) → (X 0 0 is an (A , B )-quasi-isometric embedding, where d is the graph-metric. Then there exist constants A, B, depending only on A0 , B 0 and hence on k−kS , such that Qx is (AK+B)-quasiconvex, where x is a 0–cube e ⊂ X. e By the proof of Proposition 3.3 of [36], the convex hull Z e of Qx lies in the ρ-neighborhood of in Z     √ 1 Qx, where ρ = AK + B + dim X + δ 0 csc 12 sin−1 ( √dim + 1 and δ 0 = δ 0 (δ, A0 , B 0 ). Corollary B X provides G0 ≤ G with g 6∈ G0 , and [G : G0 ] ≤ |Z (0) |(|g| + 1). But |g| + 1 ≤ A0 kgkS + B 0 + 1, while |Z (0) | ≤ grXe (ρ). Thus [G : G0 ] ≤ grXe (ρ)A0 kgkS + grXe (ρ)B 0 + grXe (ρ), so that there exists P1 such that K SepQ e (P1 K)n G,S (Q, n) ≤ P1 grX for all K, Q ∈ QK , n ∈ N, where P1 depends only on X. The virtually special case: Now suppose that J ≥ 1. We have a compact special cube complex X, and [G : G0 ] ≤ J!, where G0 ∼ = π1 X and G0 / G. Let Q ≤ G be a K-quasiconvex subgroup. By Lemma 2.1, there exists C = C(G, S) such that Q ∩ G0 is CJ!(K + 1)-quasiconvex in G, and thus is P2 CJ!(K + 1)quasiconvex in G0 , where P2 depends only on G and S. Let g ∈ G − Q. Since G0 / G, the product QG0 is a subgroup of G of index at most J! that contains Q. Hence, if g 6∈ QG0 , then we are done. We thus assume g ∈ QG0 . Hence we can choose a left transversal {q1 , . . . , qs } for Q ∩ G0 in Q, with s ≤ J! and q1 = 1. Write g = qi g 0 for some i ≤ s, with g 0 ∈ G0 . Suppose that we have chosen each qi to minimize kqi kS among all elements of qi (Q ∩ G0 ), so that, by Lemma 2.3, kqi k ≤ J! for all i. Hence kg 0 kS ≤ (kgkS + J!). By the first part of the proof, there exists a constant P1 , depending only on G, G0 , S, and a subgroup 00 G ≤ G0 such that Q ∩ G0 ≤ G00 , and g 0 6∈ G00 , and [G0 : G00 ] ≤ P1 grG0 (P1 P2 CJ!(K + 1))kg 0 kS ≤ P1 grG (P1 P2 CJ!(K + 1))kg 0 kS . 6 Let G000 = ∩si=1 qi G00 qi−1 , so that g 0 6∈ G000 , and Q ∩ G0 ≤ G000 (since G0 is normal), and [G0 : G000 ] ≤ (P1 grG (P1 P2 CJ!(K + 1))kg 0 kS )s . Finally, let H = QG000 . This subgroup clearly contains Q. Suppose that g = qi g 0 ∈ H. Then g 0 ∈ QG000 , i.e. g 0 = ag 000 for some a ∈ Q and g 000 ∈ G000 . Since g 0 ∈ G0 and G000 ≤ G0 , we have a ∈ Q ∩ G0 , whence a ∈ G000 , by construction. This implies that g 0 ∈ G000 ≤ G00 , a contradiction. Hence H is a subgroup of G separating g from Q. Finally, [G : H] ≤ [G : G000 ] ≤ J! [P1 grG (P1 P2 CJ!(K + 1))(kgkS + J!)]J! ,  and the proof is complete. Lemma 2.1. Let the group G be generated by a finite set S and let (G, k − kS ) be δ-hyperbolic. Let Q ≤ G be K-quasiconvex, and let G0 ≤ G be an index-I subgroup. Then Q ∩ G0 is CI(K + 1)-quasiconvex in G for some C depending only on δ and S. Proof. Since Q is K-quasiconvex in G, it is generated by a set T of q ∈ Q with kqkS ≤ 2K + 1, by [13, Lemma III.Γ.3.5]. A standard argument shows (Q, k − kT ) ,→ (G, k − kS ) is a (2K + 1, 0)-quasi-isometric embedding. Lemma 2.3 shows that Q ∩ G0 is I-quasiconvex in (Q, k − kT ), since [Q : Q ∩ G0 ] ≤ I. Hence Q ∩ G0 has a generating set making it ((2I + 1)(2K + 1), 0)-quasi-isometrically embedded in (G, k − kS ). Apply Lemma 2.2 to conclude.  The following lemma is standard, but we include it to highlight the exact constants involved: Lemma 2.2. Let G be a group generated by a finite set S and suppose that (G, k − kS ) is δ-hyperbolic. Then there exists a (sub)linear function f : N → N, depending on S and δ, such that σ ⊆ Nf (λ) (γ) whenever γ : [0, L] → G is a (λ, 0)–quasigeodesic and σ is a geodesic joining γ(0) to γ(L).  Proof. See e.g. the proof of [13, Theorem III.H.1.7]. Lemma 2.3. Let Q be a group generated by a finite set S and let Q0 ≤ Q be a subgroup with [Q : Q0 ] = s < ∞. Then there exists a left transversal {q1 , . . . , qs } for Q0 such that kqi kS ≤ s for 1 ≤ i ≤ s. Hence Q0 is s-quasiconvex in Q. Proof. Suppose that qk = sik · · · si1 is a geodesic word in S ∪ S −1 and that qk is a shortest representative of qk Q0 . Let qj = sij · · · si1 be the word in Q consisting of the last j letters of qk for all 1 < j < k, and let q1 = 1. We claim that each qj is a shortest representative for qj Q0 . Otherwise, there exists p with kpkS < j such that qj Q0 = pQ0 . But then sk · · · sj+1 pQ0 = qk Q0 , and thus qk was not a shortest representative. It also follows immediately that qj Q0 6= qj 0 Q0 for j 6= j 0 . Thus, q1 , q2 , . . . , qk represent distinct left cosets of Q0 provided k ≤ s, and the claim follows.  Remark 2.4 (Embeddings in finite covers). Given a compact special cube complex X and a compact local isometry Z → X, Theorem A gives an upper bound on the minimal degree of a finite cover in which Z embeds; indeed, producing such an embedding entails separating π1 Z from finitely many elements in π1 X. However, it is observed in [9, Lemma 2.8] the Haglund–Wise canonical completion construction [23] b → X of degree |Z (0) | in which Z embeds. produces a cover X 3. Proof of Theorem A In this section, we give a proof of the main technical result. Definition 3.1. Let SΓ be a Salvetti complex and let SeΓ be its universal cover. The hyperplanes H, H 0 of SeΓ are collateral if they have a common dual standard line (equivalently, the same frame). Clearly collateralism is an equivalence relation, and collateral hyperplanes are isomorphic and have the same stabilizer. 7 Being collateral implies that the combinatorial hyperplanes bounding the carrier of H are parallel to those bounding the carrier of H 0 . However, the converse is not true when Γ contains multiple vertices whose links coincide. In the proof of Theorem A, we will always work with hyperplanes, rather than combinatorial hyperplanes, unless we explicitly state that we are referring to combinatorial hyperplanes. Proof of Theorem A. Let x̃ ∈ SeΓ be a lift of the base 0–cube x in SΓ , and let Ze ⊆ SeΓ be the lift of the b ⊂ Z e be the universal cover of Z containing x̃. Since Z → SΓ is a local isometry, Ze is convex. Let Z e Denote by convex hull of a compact connected fundamental domain for the action of π1 Z ≤ AΓ on Z. b e K the convex hull of Z ∪ {gx̃} and let S be the set of hyperplanes of SΓ intersecting K. We will form a b → Z on Z, b whose image admits a local isometry to SΓ . quotient of K, restricting to Z b The subcomplex bZc: Let L be the collection of standard segments ` in K that map to standard circles b be convex hull of Z b∪S in SΓ with the property that ` ∩ Zb has non-contractible image in Z. Let bZc `∈L `, b ⊆ K. so that Zb ⊆ bZc Partitioning S: We now partition S according to the various types of frames in K. First, let Z be the set b Second, let N be the set of N ∈ S−Z such that the frame (N ∩K)×(L∩K) of hyperplanes intersecting Z. of N in K has the property that for some choice of x0 ∈ N (0) , the segment ({x0 } × L) ∩ Zb maps to a b the number nontrivial cycle of 1–cubes in Z. Let nN ≥ 1 be the length of that cycle. By convexity of Z, nN is independent of the choice of the segment L within its parallelism class. Note that N is the set of b but do not cross Z. b Hence each N ∈ N is collateral to some W ∈ Z. Third, hyperplanes that cross bZc, fix a collection {H1 , . . . Hk } ⊂ S − Z such that: b (1) For 1 ≤ i ≤ k − 1, the hyperplane Hi separates Hi+1 from bZc. (2) For 1 ≤ i < j ≤ k, if a hyperplane H separates Hi from Hj , then H is collateral to H` for some b then H is collateral to H1 , and if H separates Hk ` ∈ [i, j]. Similarly, if H separates H1 from bZc, from gx̃, then H is collateral to Hk . (0) (3) For each i, the frame (Hi ∩ K) × Li of Hi in K has the property that for every h ∈ Hi , the image in Z of the segment ({h} × Li ) ∩ Zb is empty or contractible. (Here, Li is a standard segment of a standard line dual to Hi .) Let H be the set of all hyperplanes of S − Z that are collateral to Hi for some i. Condition (3) above b Finally, let B = S − (Z ∪ N ∪ H). Note that each ensures that H ∩ N = ∅, while H = ∅ only if K = bZc. B ∈ B crosses some Hi . Figure 1 shows a possible K and various families of hyperplanes crossing it. N2 B2 H2 H3 N1 H1 B1 b Figure 1. Hyperplanes crossing K (the dark shaded area on the left is Z). 8 b to Z: We now define a quotient map q : bZc b → Z extending the restriction Zb → Z of Mapping bZc e → Z. Note that if N = ∅, then bZc b = Z, b and q is just the map Zb → Z. Hence suppose N 6= ∅ and let Z N1 , . . . , Ns be the collateralism classes of hyperplanes in N, and for 1 ≤ i ≤ s, let N0i be the collateralism class of Ni in S, i.e. Ni together with a nonempty set of collateral hyperplanes in Z. For each i, let Li b each of whose 1–cubes is dual to a hyperplane in N0 and be a maximal standard line segment of bZc, i 0 b from gx̃. Then which crosses each element of Ni . For each i, let Ni ∈ Ni be a hyperplane separating Z b We can choose the Li so that there is an Ni ∩ Nj 6= ∅ for i 6= j, since neither separates the other from Z. Qk b since whether or not two hyperplanes of SeΓ cross depends only on isometric embedding i=1 Li → bZc, their collateralism classes. For each nonempty I ⊆ {1, . . . , k}, a hyperplane W ∈ Z crosses some U ∈ ∪i∈I N0i if and only if W crosses each hyperplane collateral to U . Hence, by [19, Lemma 7.11], there is a maximal convex b defined up to parallelism, such that a hyperplane W crosses each U ∈ ∪i∈I N0 subcomplex Y (I) ⊂ Z, i if and only if W ∩ Y (I) 6= ∅. Let A(I) be the set of hyperplanes crossing Y (I). By the definition of Q b whose Y (I) and [19, Lemma 7.11], there is a combinatorial isometric embedding Y (I) × i∈I Li → bZc, b that is image we denote by F (I) and refer to as a generalized frame. Moreover, for any 0–cube z ∈ bZc 0 not separated from a hyperplane in ∪i∈I Ni ∪ A(I) by a hyperplane not in that set, we can choose F (I) to contain z (this follows from the proof of [19, Lemma 7.11]). Figures 2, 3, 4, and 5 show possible N0i ’s and generalized hyperplane frames. N01 N02 Figure 2. Collateral families N01 and N02 . Figure 3. Y ({1}) × L1 . Figure 4. Y ({2}) × L2 Figure 5. Y ({1, 2}) × (L1 × L2 ) b as the union of Zb and a collection of generalized frames, define q on each To build q, we will express bZc generalized frame, and check that the definition is compatible where multiple generalized frames intersect. b be a 0–cube. Either z ∈ Z, b or there is a nonempty set I ⊂ {1, . . . , k} such that the set of Let z ∈ bZc b is contained in ∪i∈I N0 , and each N0 contains a hyperplane separating z hyperplanes separating z from Z i i 9 b If H ∈ A(I) ∪ S N0 is separated from z by a hyperplane U , then U ∈ A(I) ∪ S N0 , whence from Z. i i i∈I i∈I b is the union of Z b and a finite collection of generalized frames we can choose F (I) to contain z. Hence bZc F (I1 ), . . . , F (It ). Q For any p ∈ {1, . . . , t}, we have F (Ip ) = Y (Ip ) × j∈Ip Lj and we let Y (Ip ) = im(Y (Ip ) → Z) and let Lj = im(Lj ∩ Zb → Z) be the cycle of length nNj to which Lj maps, for each j ∈ Ip . Note that Z Q contains F (Ip ) = Y (Ip ) × j∈IP Lj and so we define the quotient map qp : F (Ip ) → Z as the product of the above combinatorial quotient maps. Namely, qp (y, (rj )j∈IP ) = (y, (rj mod nNj )j∈Ip ) for y ∈ Y (Ip ) and rj ∈ Lj . To ensure that qp (F (Ip ) ∩ F (Ij )) = qj (F (Ip ) ∩ F (Ij )) for all i, j ≤ t, it suffices to show that     Y Y Y Lk  ∩ Y (Ij ) × F (Ip ) ∩ F (Ij ) := Y (Ip ) × L`  = [Y (Ip ) ∩ Y (Ij )] × Lk . k∈Ip `∈Ij k∈Ip ∩Ij This in turn follows from [15, Proposition 2.5]. Hence, the quotient maps qp are compatible and therefore b → Z extending the maps qp . define a combinatorial quotient map q : bZc b then we take Y = Z. By hypothesis, Z admits a local isometry Observe that if H = ∅, i.e. K = bZc, to SΓ and has the desired cardinality. Moreover, our hypothesis on g ensures that g 6∈ π1 Y , but the map q shows that any closed combinatorial path in SΓ representing g lifts to a (non-closed) path in Z, so the proof of the theorem is complete. Thus we can and shall assume that H 6= ∅. Quotients of H-frames: To extend q to the rest of K, we now describe quotient maps, compatible with b → Z, on frames associated to hyperplanes in H. An isolated H-frame is a frame (H ∩ K) × L, the map Z b (and hence crosses no hyperplane of bZc). b An interfered where H ∈ H and H crosses no hyperplane of Z H-frame is a frame (H ∩ K) × L, where H ∈ H and H crosses an element of Z. Equivalently, (H ∩ K) × L b contains a 1–cube and is isolated otherwise. is interfered if gN (H) (Z) Define quotient maps on isolated H-frames by the same means as was used for arbitrary frames in [9]: let (H ∩ K) × L be an isolated H-frame. Let H be the immersed hyperplane in SΓ to which H is sent by SeΓ → SΓ , and let H ∩ K be the image of H ∩ K. We form a quotient YH = H ∩ K × L of every isolated H-frame (H ∩ K) × L. b=g b and let A be image of A b under Now we define the quotients of interfered H-frames. Let A (Z) N (H) b → Z. There is a local isometry A → SΓ , to which we apply canonical completion to produce a finite Z ... ... ...(0) cover S Γ → SΓ where A embeds. By Lemma 2.8 of [9], deg(S Γ → SΓ ) = S Γ = A(0) ≤ Z (0) . Let ... H ∩ K = im(H ∩ K → S Γ ), and map the interfered H-frame (H ∩ K) × L to YH = H ∩ K × L. Constructing Y : We now construct a compact cube complex Y 0 from Z and the various quotients YH . b only if W ∈ N. Each H-hyperplane frame has the form (Hi ∩ A hyperplane W in K separates H1 from Z K)×Li = (Hi ∩K)×[0, mi ], parametrized so that (Hi ∩K)×{0} is the closest combinatorial hyperplane b We form Y 0 (1) by gluing YH to Z along the image of g ((H1 ∩ K) × {0}), enabled in the frame to Z. 1 b Z b by the fact that the quotients of interfered H-frames are compatible with Z → Z. In a similar manner, form Y 0 (i) from Y 0 (i − 1) and YHi by identifying the image of (Hi−1 ∩ K) × {mi−1 } ∩ (Hi ∩ K) × {0} in YHi−1 ⊂ Y 0 (i − 1) with its image in YHi . Let Y 0 = Y 0 (k).   0 b ∪ S Let K 0 = bZc Hi ∈H (Hi ∩ K) × Li . Since Hi ∩ Hj = ∅ for i 6= j, there exists a map (K , x̃) → (Y 0 , x) and a map (Y 0 , x) → (SΓ , x) such that the composition is precisely the restriction to K 0 of the covering map (SeΓ , x̃) → (SΓ , x). If Y 0 → SΓ fails to be a local isometry, then there exists i and nontrivial open cubes e ⊂ Hi−1 ∩ K × {mi−1 } (or Z if i = 1) and c ⊂ Hi ∩ K × {0} such that SΓ contains an open cube ē × c̄, where ē, c̄ are the images of e, c under SeΓ → SΓ , respectively. Moreover, since gZb (Hi ∩ K) ⊆ gZb (Hi−1 ∩ K), we can 10 assume that c̄ is disjoint from each immersed hyperplane of SΓ crossing Z. Hence the closure Cl (c̄) is a standard torus. Glue Cl (ē) × Cl (c̄) to Y 0 , if necessary, in the obvious way. Note that this gluing adds no new 0–cubes to Y 0 . Indeed, every 0–cube of Cl (ē) × Cl (c̄) is identified with an existing 0–cube of Y 0 lying in Hi−1 ∩ K × {mi−1 }. Adding Cl (ē) × Cl (c̄) also preserves the existence of a local injection from our cube complex to SΓ . Either this new complex admits a local isometry to SΓ , or there is a missing cube of the form ē × c̄ where Cl (c̄) is a standard torus and ē lies in Y 0 . We add cubes of this type until we have no missing corners. That the process terminates in a local isometry with compact domain Y is a consequence of the following facts: at each stage, every missing cube has the form ē × c̄ where ē lies in Y 0 and Cl (c̄) is a standard torus, so the number of 0–cubes remains unchanged; each gluing preserves the existence of a local injection to SΓ ; each gluing increases the number of positive dimensional cubes containing some 0–cube; cubes that we add are images of cubes in K, which is compact. Note that there exists a combinatorial path γ in K 0 joining x̃ to gx̃. It follows from the existence of γ that the convex hull of K 0 is precisely equal to K. Hence, there exists a based cubical map (K, x̃) → (Y, x) → (SΓ , x), so that the composition is the restriction of the covering map (SeΓ , x̃) → (SΓ , x). Therefore, any closed path in SΓ representing g lifts to a non-closed path at x in Y . It is easily verified that the number of 0–cubes in Y is bounded by |Z (0) |(m1 + · · · + mk ) where each mi is the length of Li , and hence |Y (0) | ≤ |Z (0) |(|g| + 1). Thus, Y is the desired cube complex.  Remark 3.2. When dim SΓ = 1, arguing as above shows that Y can be chosen so that |Y (0) | ≤ |Z (0) | + K K |g|. Hence, if F is freely generated by S, with |S| = r, then SepQ F,S (Q, n) ≤ (2r) + n. References [1] Agol, I. The virtual Haken conjecture (with an appendix by Ian Agol, Daniel Groves and Jason Manning). Documenta Mathematica, Journal of the DMV 18 (2013), 1045–1087. [2] Aschenbrenner, M., Friedl, S., and Wilton, H. Decision problems for 3-manifolds and their fundamental groups. arXiv:1405.6274 (2014). [3] Bandelt, H.-J., and Chepoi, V. Metric graph theory and geometry: a survey. In Surveys on Discrete and Computational Geometry: Twenty Years Later, J. P. J. E. Goodman and R. Pollack, Eds., vol. 453. Contemporary Mathematics, AMS, Providence, RI, 2008, pp. 49–86. [4] Behrstock, J., Hagen, M. F., and Sisto, A. Hierarchically hyperbolic spaces I: curve complexes for cubical groups. arXiv:1412.2171 (2014). [5] Bergeron, N., Haglund, F., and Wise, D. T. Hyperplane sections in arithmetic hyperbolic manifolds. Journal of the London Mathematical Society 83, 2 (2011), 431–448. [6] Bergeron, N., and Wise, D. T. A boundary criterion for cubulation. American Journal of Mathematics 134, 3 (2012), 843–859. [7] Bou-Rabee, K. Quantifying residual finiteness. Journal of Algebra 323, 3 (2010), 729–737. [8] Bou-Rabee, K. Approximating a group by its solvable quotients. New York Journal of Mathematics 17 (2011), 699–712. [9] Bou-Rabee, K., Hagen, M. F., and Patel, P. Residual finiteness growths of virtually special groups. Mathematische Zeitschrift 279, 1-2 (2015), 297–310. [10] Bou-Rabee, K., and Kaletha, T. Quantifying residual finiteness of arithmetic groups. Compositio Mathematica 148, 3 (2012), 907–920. [11] Bou-Rabee, K., and McReynolds, D. Extremal behavior of divisibility functions. Geometriae Dedicata (2013), 1–9. [12] Bou-Rabee, K., and McReynolds, D. Characterizing linear groups in terms of growth properties. arXiv:1403.0983 (2014). [13] Bridson, M. R., and Haefliger, A. Metric spaces of non-positive curvature. Springer-Verlag, Berlin, 1999. [14] Buskin, N. V. Efficient separability in free groups. Sibirskij Matematicheskij Zhurnal 50, 4 (2009), 765–771. [15] Caprace, P.-E., and Sageev, M. Rank rigidity for CAT(0) cube complexes. Geometric and Functional Analysis, (GAFA) 21 (2011), 851–891. [16] Charney, R., and Davis, M. W. Finite K(π, 1)s for Artin groups. In Prospects in topology (Princeton, NJ, 1994), vol. 138 of Annals of Mathematics Studies. Princeton Univ. Press, Princeton, NJ, 1995, pp. 110–124. [17] Chepoi, V. Graphs of some CAT(0) complexes. Advances in Applied Mathematics 24, 2 (2000), 125–179. [18] Dyson, V. The word problem and residually finite groups. Notices of the American Mathematical Society 11 (1964), 743. [19] Hagen, M. F. Weak hyperbolicity of cube complexes and quasi-arboreal groups. Journal of Topology 7, 2 (2014), 385–418. [20] Hagen, M. F., and Wise, D. T. Cubulating hyperbolic free-by-cyclic groups: the irreducible case. ArXiv preprint 1311.2084 (2013). 11 [21] Hagen, M. F., and Wise, D. T. Cubulating hyperbolic free-by-cyclic groups: the general case. To appear in Geometric and Functional Analysis, (GAFA) (2014), 1–36. [22] Haglund, F. Finite index subgroups of graph products. Geometriae Dedicata 135, 1 (2008), 167–209. [23] Haglund, F., and Wise, D. T. Special cube complexes. Geometric and Functional Analysis, (GAFA) 17, 5 (2008), 1 551–1620. [24] Haglund, F., and Wise, D. T. Coxeter groups are virtually special. Advances in Mathematics 224 (2010), 1890–1903. [25] Hsu, T., and Wise, D. T. Separating quasiconvex subgroups of right-angled Artin groups. Mathematische Zeitschrift 240, 3 (2002), 521–548. [26] Kahn, J., and Markovic, V. Immersing almost geodesic surfaces in a closed hyperbolic three manifold. Annals of Mathematics 175 (2009), 1127–1190. [27] Kassabov, M., and Matucci, F. Bounding the residual finiteness of free groups. Proceedings of the American Mathematical Society 139, 7 (2011), 2281–2286. [28] Kharlampovich, O., Myasnikov, A., and Weil, P. Completion process and quasi-convex subgroups. arXiv:1408.1917 (2014). [29] Kozma, G., and Thom, A. Divisibility and laws in finite simple groups. arXiv:1403.2324 (2014). [30] McKinsey, J. The decision problem for some classes of sentences without quantifiers. The Journal of Symbolic Logic 8, 03 (1943), 61–76. [31] Mostowski, A. W. On the decidability of some problems in special classes of groups. Fundamenta Mathematicae 59, 2 (1966), 123–135. [32] Ollivier, Y., and Wise, D. T. Cubulating random groups at density < 16 . Transactions of the American Mathematical Society 363 (2011), 4701–4733. [33] Patel, P. Quantifying algebraic properties of surface groups and 3-manifold groups. PhD thesis, Rutgers University-Graduate School-New Brunswick, 2013. [34] Patel, P. On a theorem of Peter Scott. Proceedings of the American Mathematical Society 142, 8 (2014), 2891–2906. [35] Rivin, I. Geodesics with one self-intersection, and other stories. Advances in Mathematics 231, 5 (2012), 2391–2412. [36] Sageev, M., and Wise, D. T. Cores for quasiconvex actions. Submitted. www.math.mcgill.ca/wise/papers (2012), 1–9. [37] Scott, P. Subgroups of surface groups are almost geometric. Journal of the London Mathematical Society 2, 3 (1978), 555–565. [38] Wise, D. T. Cubulating small cancellation groups. Geometric and Functional Analysis, (GAFA) 14, 1 (2004), 150–214. [39] Wise, D. T. From riches to RAAGs: 3-manifolds, right-angled Artin groups, and cubical geometry. In Lecture notes (NSFCBMS Conference, CUNY Graduate Center, New York, August 2011). [40] Wise, D. T. The structure of groups with a quasiconvex hierarchy. Submitted. www.math.mcgill.ca/wise/papers (2011), 205. Dept. of Pure Maths and Math. Stat., University of Cambridge, Cambridge, UK E-mail address: [email protected] Department of Mathematics, Purdue University, West Lafayette, Indiana, USA E-mail address: [email protected] 12
4math.GR
arXiv:cs/0409009v1 [cs.PL] 7 Sep 2004 CrocoPat 2.1 Introduction and Reference Manual Dirk Beyer Andreas Noack Report No. UCB//CSD-04-1338 July 2004 Computer Science Division (EECS) University of California Berkeley, California 94720 CrocoPat 2.1 Introduction and Reference Manual⋆ Dirk Beyer1 and Andreas Noack2 1 Electronics Research Laboratory Department of Electrical Engineering and Computer Sciences College of Engineering University of California at Berkeley Berkeley, CA 94720-1770, U.S.A. [email protected] 2 Software Systems Engineering Research Group Department of Computer Science Brandenburg University of Technology at Cottbus PO Box 10 13 44, 03013 Cottbus, Germany [email protected] Abstract. CrocoPat is an efficient, powerful and easy-to-use tool for manipulating relations of arbitrary arity, including directed graphs. This manual provides an introduction to and a reference for CrocoPat and its programming language RML. It includes several application examples, in particular from the analysis of structural models of software systems. 1 Introduction CrocoPat is a tool for manipulating relations, including directed graphs (binary relations). CrocoPat is powerful, because it manipulates relations of arbitrary arity; it is efficient in terms of time and memory, because it uses the data structure binary decision diagram (BDD, [Bry86,Bry92]) for the internal representation of relations; it is fairly easy to use, because its language is simple and based on the well-known predicate calculus; and it is easy to integrate with other tools, because it uses the simple and popular Rigi Standard Format (RSF) as input and output format for relations. CrocoPat is free software (released under LGPL) and can be obtained from http://www.software-systemtechnik.de/CrocoPat. Overview. CrocoPat is a command line tool which interprets programs written in the Relation Manipulation Language (RML). Its inputs are an RML program and relations in the Rigi Standard Format (RSF), and its outputs are relations in RSF and other text produced by the RML program. The programming language RML, and the input and output of relations from and to RSF files are introduced with the help of many examples in Section 2. Section 3 describes advanced programming techniques, in particular for improving the performance of RML programs and for circumventing limitations of RML. The manual concludes with references of CrocoPat’s command line options in Section 4, of RSF in Section 5, and of RML in Section 6. The RML reference includes a concise informal description of the semantics, and a formal description of the syntax and the core semantics. Applications. CrocoPat was originally developed for analyzing graph models of software systems, and in particular for finding patterns in such graphs [BNL03]. Existing tools were not appropriate for this task, because they were limited to binary relations (e.g. Grok [Hol98], RPA [FKvO98], and RelView [BLM02]), or consumed too much time or memory (e.g. relational database management systems and Prolog interpreters). Applications of graph pattern detection include – the detection of implementation patterns [RW90,HN90,Har91,Qui94], object-oriented design patterns (Section 2.4, [MS95,KP96,AFC98,KSRP99,NSW+ 02]), and architectural styles [Hol96], – the detection of potential design problems (Section 2.4, [MS95,SSC96,FKvO98,KB98,Ciu99,FH00]), ⋆ This research was supported in part by the NSF grants CCR-0234690 and ITR-0326577, and the DFG grant BE 1761/3-1. – – – – the the the the inductive inference of design patterns [SMB96,TA99], identification of code clones [Kri01], extraction of scenarios from models of source code [WHH02], and detection of design problems in databases [Bla04]. The computation of transitive closures of graphs – another particular strength of CrocoPat – is not only needed for the detection of some of the above patterns, but has also been applied for dead code detection and change impact analysis [CGK98,FKvO98]. Computing and analyzing the difference between two graphs supports checking the conformance of the as-built architecture to the as-designed architecture [SSC96,FKvO98,MWD99,FH00,MNS01], and studying the evolution of software systems between different versions. Calculators for relations have also been used to compute views of systems on different levels of abstraction by lifting and lowering relations [FKvO98,FH00], and to calculate software metrics (Section 2.5, [MS95,KW99]). Although we are most familiar with potential applications in the analysis of software designs, we are confident that CrocoPat can be beneficial in many other areas. For example, calculators for relations have been used for program analyses like points-to analysis [BLQ+ 03], and for the implementation of graph algorithms (Section 2.3, [BBS97]). 2 RML Tutorial This section introduces RML, the programming language of CrocoPat, on examples. The core of RML are relational expressions based on first-order predicate calculus, a well-known, reasonably simple, precise and powerful language. Relational expressions are explained in Subsection 2.1, and additional examples involving relations of arity greater than two are given in Subsection 2.4. Besides relational expressions, the language includes control structures, described in Subsection 2.3, and numerical expressions, described in Subsection 2.5. The input and output of relations is described in Subsection 2.2. A more concise and a more formal specification of the language can be found in Section 6. Although the main purpose of this section is the introduction of the language, some of the application examples may be of interest by themselves. In Subsection 2.3, simple graph algorithms are implemented, and in the Subsections 2.4 and 2.5 the design of object-oriented software systems is analyzed. 2.1 Relational Expressions This subsection introduces relational expressions using relationships between people as example. Remember that n-ary relations are sets of ordered n-tuples. In this subsection, we will only consider the cases n = 1 (unary relations) and n = 2 (binary relations, directed graphs). CrocoPat manipulates tuples of strings, thus unary relations in CrocoPat are sets of strings, and binary relations in CrocoPat are sets of ordered pairs of strings. Adding Elements. The statement Male("John"); expresses that John is male. (In some languages, e.g. the logic programming language Prolog [CM03], such statements are called facts.) It adds the string John to the unary relation Male. Because each relation variable initially contains the empty relation, John is so far the only element of the set Male. An explicit declaration of variables is not necessary. However, variables should be defined (i.e., assigned a value) before they are first used, otherwise CrocoPat prints a warning. Male("Joe"); adds the string Joe to the set Male, such that it now has two elements. Similarly, we can initialize the variable Female: Female("Alice"); Female("Jane"); Female("Mary"); 2 To express that the John and Mary are the parents of Alice and Joe, and Joe is the father of Jane, we create a binary relation variable ParentOf which contains the five parent-child pairs: ParentOf("John", "Alice"); ParentOf("John", "Joe"); ParentOf("Mary", "Alice"); ParentOf("Mary", "Joe"); ParentOf("Joe", "Jane"); Assignments. The following statement uses an attribute x to assign the set of Joe’s parents to the set JoesParent: JoesParent(x) := ParentOf(x, "Joe"); Now JoesParent contains the two elements John and Mary. As another example, the following assignment says that x is a child of y if and only if y is a parent of x: ChildOf(x,y) := ParentOf(y,x); John is the father of a person if and only if he is the parent of this person. The same is true for Joe: FatherOf("John", x) := ParentOf("John", x); FatherOf("Joe", x) := ParentOf("Joe", x); Because the scope of each attribute is limited to one statement, the attribute in the first statement and the attribute in the second statement are different, despite of their equal name x. Basic Relational Operators. The relation FatherOf can be described more concisely: x is father of y if and only if x is a parent of y and x is male: FatherOf(x,y) := ParentOf(x,y) & Male(x); Of course, we can define a similar relation for female parents: MotherOf(x,y) := ParentOf(x,y) & Female(x); Besides the operator and (&), another important operator is or (|). For example, we can define the ParentOf relation in terms of the relations MotherOf and FatherOf: x is a parent of y if and only if x is the mother or the father of y: ParentOf(x,y) := MotherOf(x,y) | FatherOf(x,y); Quantification. Parents are people who are a parent of another person. More precisely, x is a parent if and only if there exists (EX) a y such that x is a parent of y. Parent(x) := EX(y, ParentOf(x,y)); Now the set Parent consists of John, Mary, and Joe. There is also an abbreviated notation for existential quantification which is similar to anonymous variables in Prolog and functional programming languages: Parent(x) := ParentOf(x,_); With the operator not (!), we can compute who has no children: Childless(x) := !EX(y, ParentOf(x,y)); Equivalently, x childless if for all (FA) y holds that x is not a parent of y: Childless(x) := FA(y, !ParentOf(x,y)); In both cases, the set Childless contains Alice and Jane. Transitive Closure. To compute the grandparents of a person we have to determine the parents of his or her parents: 3 GrandparentOf(x,z) := EX(y, ParentOf(x,y) & ParentOf(y,z)); Now GrandparentOf contains the two pairs (John, Jane) and (Mary, Jane). To find out all ancestors of a person, i.e. parents, parents of parents, parents of parents of parents, etc., we have to apply the above operation (which is also called composition) repeatedly until the fixed point is reached, and unite the results. The transitive closure operator TC does exactly this: AncestorOf(x,z) := TC(ParentOf(x,z)); The resulting relation AncestorOf contains any pair from ParentOf and GrandparentOf. (It also contains grand-grandparents etc., but there are none in this example.) The transitive closure operator TC can only be applied to binary relations. Predefined Relations, the Universe. The relations FALSE and TRUE are predefined. FALSE is the empty relation, and TRUE is the full relation. More precisely, there is one predefined relation FALSE and one predefined relation TRUE for every arity. In particular, there is also a 0-ary relation FALSE(), which is the empty set, and a 0-ary relation TRUE(), which contains only () (the tuple of length 0). Intuitively, these 0-ary relations can be used like Boolean literals. By the way, the statement Male("John"); is an abbreviation of the assignment Male("John") := TRUE(); The result of TRUE(x) is the so-called universe. The universe contains all string literals that appear in the input RSF stream (if there is one, see Subsection 2.2) and on the left hand side of assignments in the present RML program. For example, the string literals used on the left hand side of the assignments in the examples of this subsection are Alice, Jane, Joe, John, and Mary, so the set TRUE(x) contains these five elements. See Subsection 3.4 for more information on the universe. The binary relations =, !=, <, <=, >, and >= for the lexicographical order of the strings in the universe are also predefined. For example, siblings are two different people who have a common parent: SiblingOf(x,y) := EX(z, ParentOf(z,x) & ParentOf(z,y)) & !=(x,y); The infix notation is also available for binary relations, so the expression !=(x,y) can also be written as x!=y. Note that the predefined relations, like any other relation, are restricted to the universe. Thus the expression "A"="A" yields FALSE() if (and only if) the string A is not in the universe. Further relational expressions are provided to match POSIX extended regular expressions [IEE01, Section 9.4]. These relational expressions start with the character @, followed by the string for the regular expression. For example, StartsWithJ(x) := @"^J"(x); assigns to the set StartsWithJ the set of all strings in the universe that start with the letter J, namely Jane, Joe, and John. A short overview of the syntax of regular expressions is given in Subsection 6.2. Boolean Operators. Two relations can be compared with the operators =, !=, <, <=, >, or >=. Because such comparisons evaluate to either TRUE() or FALSE(), they are called Boolean expressions. For example, GrandparentOf(x,y) < AncestorOf(x,y) yields TRUE(), because GrandparentOf is a proper subset of AncestorOf. However, GrandparentOf(x,y) = AncestorOf(x,y) yields FALSE(), because the two relations are not equal. The six comparison operators should not be confused with the six predefined relations for the lexicographical order. The operators take two relations as parameters, while the predefined relations take strings or attributes as parameters. 4 2.2 Input and Output of Relations File Format RSF. CrocoPat reads and writes relations in Rigi Standard Format (RSF, [Won98, Section 4.7.1]). Files in RSF are human-readable, can be loaded into and saved from many reverse engineering tools, and are easily processed by scripts in common scripting languages. In an RSF file, a tuple of an n-ary relation is represented as a line of the form RelationName element1 element2 ... elementn The elements may be enclosed by double quotes. Because white space serves as delimiter of the elements, elements that contain white space must be enclosed by double quotes. A relation is represented as a sequence of such lines. The order of the lines is arbitrary. An RSF file may contain several relations. As an example, the relation ParentOf from the previous subsection can be represented in RSF format as follows: ParentOf ParentOf ParentOf ParentOf ParentOf John John Mary Mary Joe Alice Joe Alice Joe Jane Input. RML has no input statements. When CrocoPat is started, it first reads input relations in RSF from the standard input before it parses and executes the RML program. RSF reading can be skipped with the -e command line option. If the input relations are available as files, they can be feeded into CrocoPat’s standard input using the shell operator <, as the following examples shows for the file ParentOf.rsf: crocopat Prog.rml < ParentOf.rsf The end of the input data is recognized either from the end of file character or from a line that starts with the dot (.) character. The latter is sometimes useful if RSF input is feeded interactively. If the above RSF data is used as input, then at the start of the program the binary relation variable ParentOf contains the five pairs, and the universe contains the five string literals Alice, Jane, Joe, John, and Mary (and additionally all string literals that appear on the left hand side of assignments in the program.) Output. The PRINT statement outputs relations in RSF format to the standard output. For example, running the program ParentOf("Joe",x) := FALSE(x); ParentOf(x,"Joe") := FALSE(x); PRINT ParentOf(x,y); with the above input data prints to the standard output John Alice Mary Alice The statement PRINT ["ParentOf"] ParentOf(x,y); writes the string ParentOf before each tuple, and thus outputs ParentOf John Alice ParentOf Mary Alice The output can also be appended to a file ParentOf2.rsf (which is created if it does not exist) with PRINT ["ParentOf"] ParentOf(x,y) TO "ParentOf2.rsf"; or to stderr with PRINT ["ParentOf"] ParentOf(x,y) TO STDERR; 5 Command Line Arguments. It is sometimes convenient to specify the names of output files at the command line and not in the RML program. If there is only one output file, the standard output can be simply redirected to a file using the shell operator >: crocopat Prog.rml < ParentOf.rsf > ParentOf2.rsf An alternative solution (which also works with more than one file) is to pass command line arguments to the program. Command line arguments can be accessed in RML as $1, $2, etc. For example, when the program ChildOf(x,y) := ParentOf(y,x); PRINT ["Child"] ChildOf(x,$1) TO $1 + ".rsf"; PRINT ["Child"] ChildOf(x,$2) TO $2 + ".rsf"; is executed with crocopat IO.rml Joe Mary < ParentOf.rsf then the first PRINT statement writes to the file Joe.rsf, and the second PRINT statement writes to Mary.rsf. Command line arguments are not restricted to specifying file names, but can be used like string literals. However, in contrast to string literals, command line arguments are never added to the universe, and thus cannot be used on the left hand side of relational assignments. 2.3 Control Structures This subsection introduces the control structures of RML, using algorithms for computing the transitive closure of a binary relation R as examples. WHILE Statement. As a first algorithm, the relation R is composed with itself until the fixed point is reached. Result(x,y) := R(x,y); PrevResult(x,y) := FALSE(x,y); WHILE (PrevResult(x,y) != Result(x,y)) { PrevResult(x,y) := Result(x,y); Result(x,z) := Result(x,z) | EX(y, Result(x,y) & Result(y,z)); } The program illustrates the use of the WHILE loop, which has the usual meaning: The body of the loop is executed repeatedly as long as the condition after WHILE evaluates to TRUE(). FOR Statement. The second program computes the transitive closure of the relation R using the Warshall algorithm. This algorithm successively adds arcs. In the first iteration, an arc (u, v) is added if the input graph contains the arcs (u, node0 ) and (node0 , v). In the second iteration, an arc (u, v) is added if the graph that results from the first iteration contains the arcs (u, node1 ) and (node1 , v). And so on, for all nodes of the graph (in arbitrary order.) Result(x,y) := R(x,y); Node(x) := Result(x,_) & Result(_,x); FOR node IN Node(x) { Result(x,y) := Result(x,y) | (Result(x,node) & Result(node,y)); } The program illustrates the use of the FOR loop. The relation after IN must be a unary relation. The iterator after FOR is a string variable and takes as values the elements of the unary relation in lexicographical order. Thus, the number of iterations equals the number of elements of the unary relation. For the implementation of the transitive closure operator of RML, we experimented with several algorithms. An interesting observation in these experiments was that the empirical complexity of some 6 algorithms for practical graphs deviated strongly from their theoretical worst case complexity, thus some algorithms with a relatively bad worst-case complexity were very competitive in practice. In our experiments, the first of the above algorithms was very fast, thus we made it available as operator TCFAST. The implementation of the TC operator of RML is a variant of the Warshall algorithm. It is somewhat slower than TCFAST (typically about 20 percent in our experiments), but often needs much less memory because it uses no ternary relations. IF Statement. The following example program determines if the input graph R is acyclic, by checking if its transitive closure contains loops (i.e. arcs from a node to itself): SelfArcs(x,y) := TC(R(x,y)) & (x = y); IF (SelfArcs(_,_)) { PRINT "R is not acyclic", ENDL; } ELSE { PRINT "R is acyclic", ENDL; } 2.4 Relations of Higher Arity In this subsection, relations of arity greater than two are used for finding potential design patterns and design problems in structural models of object-oriented programs. The examples are taken from [BNL03]. The models of object-oriented programs contain the call, containment, and inheritance relationships between classes. Here containment means that a class has an attribute whose type is another class. The direction of inheritance relationships is from the subclass to the superclass. As an example, the source code class ContainedClass {} class SuperClass {} class SubClass extends SuperClass { ContainedClass c; } corresponds to the following RSF file: Inherit Contain SubClass SubClass SuperClass ContainedClass C o m p o n e n t L e a f C o m p o s ite Fig. 1. Composite design pattern Composite Design Pattern. Figure 1 shows the class diagram of the Composite design pattern [GHJV95]. To identify possible instances of this pattern, we compute all triples of a Component class, a Composite class, and a Leaf class, such that (1) Composite and Leaf are subclasses of Component, (2) Composite contains an instance of Component, and (3) Leaf does not contain an instance of Component. The translation of these conditions to an RML statement is straightforward: 7 CompPat(component, composite, leaf) := Inherit(composite, component) & Contain(composite, component) & Inherit(leaf, component) & !Contain(leaf, component); Degenerate Inheritance. When a class C inherits from another class A directly and indirectly via a class B, the direct inheritance is probably redundant or even misleading. The following statement detects such patterns: DegInh(a,b,c) := Inherit(c,b) & Inherit(c,a) & TC(Inherit(b,a)); Cycles. To understand an undocumented class, one has to understand all classes it uses. If one of the (directly or indirectly) used classes is the class itself, understanding this class is difficult. All classes that participate in cycles can be found using the transitive closure operator, as shown in Subsection 2.3. However, in many large software systems hundreds of classes participate in cycles, and it is tedious for a human analyst to find the actual cycles in the list of these classes. In our experience, it is often more useful to detect cycles in the order of ascending length. As a part of such a program, the following statements detects all cycles of length 3. Use(x,y) := Call(x,y) | Contain(x,y) | Inherit(x,y); Cycle3(x,y,z) := Use(x,y) & Use(y,z) & Use(z,x); Cycle3(x,y,z) := Cycle3(x,y,z) & (x <= y) & (x <= z); To see the purpose of the third statement, consider three classes A, B, and C that form a cycle. After the second statement, the relation variable Cycle3 contains three representatives of this cycle: (A, B, C), (B, C, A) and (C, A, B). The third statement removes two of these representatives from Cycle3, and keeps only the tuple with the lexicographically smallest class at the first position, namely (A, B, C). 2.5 Numerical Expressions In this subsection, a software metric is calculated as example for the use of numerical expressions in RML programs. Therefore, we extend the structural model of object-oriented programs introduced in the previous subsection with a binary relation PackageOf. This relation assigns to each package the classes that it contains. (Packages are high-level entities in object-oriented software systems that can be considered as sets of classes.) Robert Martin’s metric for the instability of a package is defined as ce/(ca + ce), where ca is the number of classes outside the package that use classes inside the package, and ce is the number of classes inside the package that use classes outside the package [Mar97]. Use(x,y) := Call(x,y) | Contain(x,y) | Inherit(x,y); Package(x) := PackageOf(x,_); FOR p IN Package(x) { CaClass(x) := !PackageOf(p,x) & EX(y, Use(x,y) & PackageOf(p,y)); ca := #(CaClass(x)); CeClass(x) := PackageOf(p,x) & EX(y, Use(x,y) & !PackageOf(p,y)); ce := #(CeClass(x)); IF (ca + ce > 0) { PRINT p, " ", ce / (ca+ce), ENDL; } } 8 3 Advanced Programming Techniques This section describes advanced programming techniques, in particular for improving efficiency and circumventing language limitations. The first subsection explains how to control the memory usage of CrocoPat. The second and third subsection describe how relational expressions are evaluated in CrocoPat, and how to assess and improve the efficiency of their evaluation. The fourth subsection explains why the universe is immutable during the execution of an RML program and how to work around this limitation. 3.1 Controlling the Memory Usage CrocoPat represents relations using the data structure binary decision diagram (BDD, [Bry86]). When CrocoPat is started, it reserves a fixed amount of memory for BDDs, which is not changed during the execution of the RML program. If the available memory is insufficient, CrocoPat exits with the error message Error: BDD package out of memory. The BDD memory can be controlled with the command line option -m, followed by an integer number giving the amount of memory in MByte. The default value is 50. The actual amount of memory reserved for BDDs is not infinitely variable, so the specified value is only a rough upper bound of the amount of memory used. It can also be beneficial to reserve less memory, because the time used for allocating memory increases with the amount of memory. When the manipulated relations are small or the algorithms are computationally inexpensive, memory allocation can dominate the overall runtime. 3.2 Speeding up the Evaluation of Relational Expressions This subsection explains how CrocoPat evaluates relational expressions. Based on this information, hints for performance improvement are given. Understanding the subsection requires basic knowledge about BDDs and the impacts of the variable order on the size of BDDs. An introduction to BDDs is beyond the scope of this manual, we refer the reader to [Bry92]. The attributes in an RML program are called user attributes in the following. For example, the expression R(x,y) contains the user attributes x and y. For the internal representation of relations, CrocoPat uses a sequence of internal attributes, which are distinct from the user attributes. We call these internal attributes i1, i2, i3, ... For example, the binary relation R is internally represented as a set of assignments to the internal attributes i1 and i2. When the expression R(x,y) is evaluated, the internal attributes i1 and i2 are renamed to the user attributes x and y. Therefore all BDD nodes of the representation of R have to be traversed. Thus, the time for evaluating the expression R(x,y) is at least linear in the number of BDD nodes of R’s representation. The order of the internal attributes in the BDD is always i1, i2, ... The order of the user attributes in the BDD may be different in the evaluation of each statement, because the scope of user attributes is restricted to one statement. The order of the user attributes in the BDD in the evaluation of a statement is the order in which CrocoPat encounters the user attributes in the execution of the statement. In the example statement R(x,z) := EX(y, R(x,y) & R(y,z)); CrocoPat evaluates first R(x,y), then R(y,z), then the conjunction, then the existential quantification, and finally the assignment. Therefore, the order of the user attributes in the BDD is x, y, z. Avoid renaming large relations. The time for the evaluation of the expression R(x,y) is at least linear in the number of BDD nodes in the representation of R, because all BDD nodes have to be renamed from internal attributes to user attributes. Usually this effort for renaming does not dominate the overall runtime, but in the following we give an example where it does. 9 Let R(x,y) be a directed graph with n nodes. Let the BDD representation of R have Θ(n2 ) BDD nodes (which is the worst case). The assignment Outneighbor(y) := EX(x, R(x,y) & x="node1"); assigns the outneighbors of the graph node node1 to the set Outneighbor. The evaluation of R(x,y) costs Θ(n2 ) time in this example, because of the renaming of all nodes. The “real computation”, namely the conjunction and the existential quantification, can be done in O(log n) time. So the renaming dominates the overall time. The equivalent statement Outneighbor(y) := R("node1",y); is executed in only O(n) time, because the set R("node1",y) has O(n) elements, and its BDD representation has O(n) nodes. Avoid swapping attributes. Renaming the nodes of a BDD costs at least linear time, but can be much more expensive when attributes have to be swapped. In the statement S(x,y,z) := R(y,z) & R(x,y); the BDD attribute order on the right hand side of the assignment is y, z, x, while the BDD attribute order on the left hand side is x, y, z. Because the two orders are different, attributes have to be swapped to execute the assignment. This can be easily avoided by using the equivalent statement S(x,y,z) := R(x,y) & R(y,z); Of course, swapping attributes can not always be avoided. However, developers of RML programs should know that swapping attributes can be expensive, and should minimize it when performance is critical. Ensure good attribute orders. A detailed discussion of BDD attribute orders is beyond the scope of this manual (see e.g. [Bry92, Section 1.3] for details), but the basic rule is that related attributes should be grouped together. In the two assignment statements S1(v,w,x,y) := R(v,w) & R(x,y); S2(v,x,w,y) := R(v,w) & R(x,y); the attributes v and w are related, and the attributes x and y are related, while v and w are unrelated to x and y. In S1, related attributes are grouped together, but not in S2. For many relations R, the BDD representation of S1 will be drastically smaller than the BDD representation of S2. Profile. Information about the number of BDD nodes and the BDD attribute order of an expression can be printed with PRINT RELINFO. For example, PRINT RELINFO(R(y,z) & R(x,y)); may output Number of tuples in the relation: 461705 Number of values (universe): 6218 Number of BDD nodes: 246986 Percentage of free nodes in BDD package: 1614430 / 1966102 = 82 % Attribute order: y z x The first line gives the cardinality of the relation, the second line the cardinality of the universe, the third line the size of the BDD that represents the result of the expression, and the fifth line the attribute order in this BDD. 10 3.3 Estimating the Evaluation Time of Relational Expressions Knowledge of the computational complexity of RML’s operators is useful to optimize the performance of RML programs. This subsection gives theoretical complexity results, but also discusses the limits of their practical application. Table 1 shows the asymptotic worst case time complexity for the evaluation of RML’s relational operators. The times do not include the renaming of internal attributes discussed in the previous subsection, and the evaluation of subexpressions. It is assumed that the caches of the BDD package are sufficiently large. This assumption is closely approximated in practice when the manipulated BDDs only occupy a small fraction of the available nodes in the BDD package. Otherwise, performance may be improved by increasing the BDD memory (see Subsection 3.1). When the operands of an expression are relations, the computation time is given as function of the sizes of their BDD representation. (The only exception are the transitive closure operators, where a function of the size of the universe gives a more useful bound.) This raises the problem of how to estimate these BDD sizes. Many practical relations have regularities that enable an (often dramatically) compressed BDD representation, but the analytical derivation of the typical compression rate for relations from a particular application domain is generally difficult. Our advice is to choose some representative examples and measure the BDD sizes with the PRINT RELINFO statement. It is important to note that Table 1 gives worst-case computation times. In many cases, the typical practical performance is much better than the worst case. For example, the relational comparison operators (<=, <, >=, >) and the binary logic operators (&, |, ->, <->) are very common in RML programs. Their worst-case complexity is the product of the sizes of their operand BDDs, which is alarmingly high. However, in practice the performance is often much closer to the sum of the operand BDD sizes. Similarly, the quantification operators are often efficient despite their prohibitive worst case runtime (which is difficult to derive because quantification is implemented as a series of several bit-level operations). Another practically important example for the gap between average-case and worst-case runtime are the transitive closure operators. The worst case complexity of their BDD-based implementation is the same as for implementations with conventional data structures. However, the BDD-based implementations are much more efficient for many practical graphs [BNL03]. Even in the comparison of different BDD-based implementations, a better worst-case complexity does not imply a better performance in practice. We conclude from our experience that knowledge of the theoretical complexity complements but cannot replace experimentation in the development of highly optimized RML programs. ! re re1 & re2, re1 | re2 re1 -> re2, re1 <-> re2 EX(x, re), FA(x, re) TC(re) TCFAST(re) FALSE(x1, x2, ...) TRUE(x1, x2, ...) @s(x) ~(x1, x2) ~(ne1, ne2) re1 = re2, re1 != re2 re1 < re2, re1 <= re2 re1 > re2, re1 >= re2 O(bddsize(re)) O(bddsize(re1) · bddsize(re2)) O(bddsize(re1) · bddsize(re2)) ≥ O(bddsize(re)2 ) O(n3 ) O(n3 log n) O(1) O(1) O(n log n) O(n log n) (~ can be =, !=, <=, <, >=, >) O(1) (~ can be =, !=, <=, <, >=, >) O(1) O(bddsize(re1) · bddsize(re2)) O(bddsize(re1) · bddsize(re2)) Table 1. Worst case time complexity of the evaluation of relational expressions. re, re1, re2 are relational expressions, x, x1, x2 are attributes, and ne1, ne2 are numerical expressions. bddsize(re) is the number of BDD nodes of the result of the expression re, and n is the cardinality of the universe. 11 3.4 Extending the Universe The set of all strings that may be tuple elements of relations in an RML program is called the universe. The universe contains all tuple elements of the input relations (from the input RSF data), and all string literals that appear on the left hand side of assignments in the RML program. The universe is immutable in the sense that it can be determined before the interpretation of the RML program starts, and is not changed during the interpretation of the RML program. Sometimes the immutability of the universe is inconvenient for the developer of RML programs. Consider, for example, a program that takes as input the nodes and arcs of a graph, and computes the binary relation OutneighborCnt which contains for each node the number of outneighbors: FOR n IN Node(x) { OutneighborCnt(n, #(Arc(n,x))) := TRUE(); } This is not a syntactically correct RML program, because #(Arc(n,x)) is not a string, but a number. However, RML has an operator STRING that converts a number into a string. But OutneighborCnt(n, STRING( #(Arc(n,x)) )) := TRUE(); is still not syntactically correct, because such a conversion is not allowed at the left hand side of assignment statements. The reason is that the string that results from such a conversion is generally not known before the execution of the RML program, can therefore not be added to the universe before the execution, and is thus not allowed as tuple element of a relation. The immutability of the universe during the execution of an RML program is necessary because constant relations like TRUE(x) (the universe) and =(x,y) (string equality for all strings in the universe) are only defined for a given universe. Also, the complement of a relation depends on the universe: The complement of a set contains all strings of the universe that are not in the given set, and thus clearly changes when the universe changes. However, there is a way to work around this limitation: Writing an RSF file, and restarting CrocoPat with this RSF file as input, which adds all tuple elements in the RSF file to the universe. For example, the above incorrect program can be replaced by the following correct program: FOR n IN Node(x) { PRINT "OutneighborCnt ", n, " ", #(Arc(n,x)) TO "OutneighborCnt.rsf"; } When CrocoPat is restarted with the resulting RSF file OutneighborCnt.rsf as input, the binary relation OutneighborCnt is available for further processing. 4 CrocoPat Reference CrocoPat is executed with crocopat [OPTION]... FILE [ARGUMENT]... It first reads relations in RSF (see Section 5) from stdin (unless the option -e is given) and then executes the RML program FILE (see Section 6). The ARGUMENTs are passed to the RML program. The OPTIONs are -e Do not read RSF data from stdin. -m NUMBER Approximate memory for BDD package in MB. The default is 50. See Subsection 3.1. -q Suppress warnings. -h Display help message and exit. -v Print version information and exit. 12 The output of the RML program can be written to files, stdout, or stderr, as specified in the RML program. Error messages and warnings of CrocoPat are always written to stderr. The exit status of CrocoPat is 1 if it terminates abnormally and 0 otherwise. CrocoPat always outputs an error message to stderr before it terminates with exit status 1. 5 RSF Reference Rigi Standard Format (RSF) is CrocoPat’s input and output format for relations. It is an extension of the format for binary relations defined in [Won98, Section 4.7.1]. For examples of its use see Subsection 2.2. An RSF stream is a sequence of lines. The order of the lines is arbitrary. The repeated occurrence of a line is permissable and has the same meaning as a single occurrence. The end of an RSF stream is indicated by the end of the file or by a line that starts with a dot (.). Lines starting with a sharp (#) are comment lines. All lines that do not start with a dot or a sharp specify a tuple in a relation. They consist of the name of the relation followed by a sequence of (an arbitrary number of) tuple elements, separated by at least one whitespace character (i.e., space or horizontal tab). Relation names must be RML identifiers (see Subsection 6.1). Tuple elements are sequences of arbitrary characters except line breaks and whitespace characters. A tuple element may be optionally enclosed by double quotes ("), in which case it may also contain whitespace characters. Tuple elements that are enclosed by double quotes in the RSF input of an RML program are also enclosed by double quotes in its output. 6 RML Reference Relation Manipulation Language (RML) is CrocoPat’s programming language for manipulating relations. This section defines the lexical structure, the syntax, and the semantics of RML. Nonterminals are printed in italics and terminals in typewriter. 6.1 Lexical Structure Identifiers are sequences of Latin letters (a-zA-z), digits (0-9) and underscores ( ), the first of which must be a letter or underscore. RML has four types of identifiers: attributes (attribute), relational variables (rel var), string variables (str var), and numerical variables (num var). Every identifier of an RML program belongs to exactly one of these types. The type is determined at the first occurrence of the identifier in the input RSF file (only possible for relational variables) or in the RML program. Explicit declaration of identifiers is not necessary. The following strings are reserved as keywords and therefore cannot be used as identifiers: AVG DIV ELSE ENDL EX EXEC EXIT FA FOR IF IN MAX MIN MOD NUMBER PRINT RELINFO STDERR STRING SUM TC TCFAST TO WHILE RML has two types of literals: string literals (str literal) and numerical literals (num literal). String literals are delimited by double quotes (") and can contain arbitrary characters except double quotes. A numerical literal consists of an integer part, a fractional part indicated by a decimal point (.), and an exponent indicated by the letter e or E followed by an optionally signed integer. All three parts are optional, but at least one digit in the integer part or the fractional part is required. Examples of numerical literals are 1, .2, 3., 4.5, and 6e-7. There are two kinds of comments: Text starting with /* and ending with */, and text from // to the end of the line. 13 6.2 Syntax and Informal Semantics program ::= stmt ...1 RML program. Executes the stmts in the given order. stmt ::= rel var(term,...) := rel expr; Statement. Assigns the result of rel expr to rel var. →2The terms must be attributes or str literals. → The set of attributes among the terms on the left hand side must equal the set of free attributes in rel expr. rel var(term,...); Shortcut for rel var(term,...) := TRUE(term,...). str var := str expr; Assigns the result of str expr to str var. Assigns the result of num expr to num var. num var := num expr; IF rel expr {stmt ...} ELSE {stmt ...} Executes the stmts before ELSE if the result of rel expr is TRUE(), IF rel expr {stmt ...} and the stmts after ELSE (if present) otherwise. → rel expr must not have free attributes. WHILE rel expr {stmt ...} Exec. the stmts repeatedly as long as rel expr evaluates to TRUE(). → rel expr must not have free attributes. FOR str var IN rel expr {stmt ...} Executes the stmts once for each element in the result of rel expr. → rel expr must have exactly one free attribute. Writes the results of the print exprs to stdout. PRINT print expr,...; PRINT print expr,... TO STDERR; Writes the results of the print exprs to stderr. PRINT print expr,... TO str expr; Appends the results of the print exprs to the specified file. Executes the shell command given by str expr. EXEC str expr; The exit status is available as numerical constant exitStatus. Exits CrocoPat with the given exit status. EXIT num expr; { stmt ... } Executes the stmts in the given order. rel expr ::= rel var(term,...) term rel var term ! rel expr rel expr & rel expr rel expr | rel expr rel expr -> rel expr rel expr <-> rel expr EX(attribute,..., rel expr) FA(attribute,..., rel expr) TC(rel expr) TCFAST(rel expr) FALSE(term,...) TRUE(term,...) @str expr(term) ~(term, term) term ~ term ~(num expr, num expr) num expr ~ num expr rel expr ~ rel expr (rel expr) 1 2 3 Relational Expression. The result is a relation. Atomic relational expression. Same as rel var(term, term). Negation (not). Conjunction (and). Disjunction (or). Implication (if). r1 -> r2 is equivalent to !(r1) | (r2). Equivalence (if and only if). r1 <-> r2 is equivalent to (r1 -> r2) & (r2 -> r1). Existential quantification of the attributes. Universal quantification of the attributes. Transitive closure. → rel expr must have exactly two free attributes. Same as TC, but with an alternative algorithm (see Section 2.3). Empty relation. Relation containing all tuples of strings in the universe. Strings in the universe that match the regular expression str expr. Lexicographical order of all strings in the universe.3 Same as ~(term, term). Numerical comparison. The result is either TRUE() or FALSE().3 Same as ~(num expr, num expr). Relational comparison. The result is either TRUE() or FALSE().3 stmt ... denotes a sequence of one or more stmts. Context conditions are marked with →. ~ can be =, !=, <=, <, >=, >. 14 term ::= attribute str expr str expr ::= str literal str var STRING(num expr) $ num expr str expr + str expr (str expr) Term. Attribute. Anonymous attribute. E.g. R( ) is equivalent to EX(x, R(x)). String expression. String Expression. The result is a string. String literal. String variable. Converts the result of num expr into a string. Command line argument. The first argument has the number 1. The constant argCount contains the number of arguments. Concatenation. num expr ::= num literal num var NUMBER(str expr) Numerical Expression. The result is a floating point number. Numerical literal. Numerical variable. Converts the result of str expr into a number. Yields 0.0 if the result of str expr is not the string representation of a number. #(rel expr) Cardinality (number of elements) of the result of rel expr. MIN(rel expr), MAX(rel expr), SUM(rel expr), AVG(rel expr) Minimum, maximum, sum, and arithmetic mean of NUMBER(s) over all strings s in the result of rel expr. → rel expr must have one free attribute, its result must be non-empty. num expr + num expr Addition. Subtraction. num expr - num expr num expr * num expr Multiplication. num expr / num expr Real division. num expr DIV num expr Integer division (truncating). num expr MOD num expr Modulo. num expr ^ num expr The first num expr raised to the power given by the second num expr. argCount Number of command line arguments. exitStatus Exit status of the last executed EXEC statement. (num expr) print expr ::= rel expr [str expr] rel expr str expr num expr ENDL RELINFO(rel expr) Print Prints Prints Prints Prints Prints Prints Expression. the tuples in the result of rel expr, one tuple per line. the result of str expr before each tuple of rel expr. the result of str expr. the result of num expr. a line break. information about the BDD representation of rel expr. Levels of Precedence (from Low to High) =, !=, <=, <, >=, > ->, <-> | & ! +, - (binary) *, /, DIV, MOD ^ - (unary) $ 15 Free Attributes in Relational Expressions. Several context conditions of RML refer to the free attributes in relational expressions. The number of free attributes in a relational expression equals the arity of the resulting relation. Informally, the set of free attributes of an expression is the set of its contained attributes that are not in the scope of a quantifier (i.e., EX or FA). Exceptions are the numerical and relational comparison, which have Boolean results and therefore no free attributes. Formally, the function f that assigns to each relational expression the set of its free attributes is inductively defined as follows: f ( rel var(term1 , term2 ,...) ) := { termi | termi is an attribute } := f ( rel expr ) f ( !rel expr ) f ( rel expr1 & rel expr2 ) := f ( rel expr1 ) ∪ f ( rel expr2 ) := f ( rel expr1 ) ∪ f ( rel expr2 ) f ( rel expr1 | rel expr2 ) f ( rel expr1 -> rel expr2 ) := f ( rel expr1 ) ∪ f ( rel expr2 ) f ( rel expr1 <-> rel expr2 ) := f ( rel expr1 ) ∪ f ( rel expr2 ) := f ( rel expr ) \ { attribute } f ( EX(attribute, rel expr) ) f ( FA(attribute, rel expr) ) := f ( rel expr ) \ { attribute } f ( TC(rel expr) ) := f ( rel expr ) f ( TCFAST(rel expr) ) := f ( rel expr ) f ( (num expr1 ~ num expr2 ) ) := ∅ := ∅ f ( (rel expr1 ~ rel expr2 ) ) f ( (rel expr) ) := f ( rel expr ) As before, ~ can be =, !=, <=, <, >=, or >. The relational constants ~, FALSE, TRUE, and @str expr are equivalent to rel var with respect to the definition of free attributes. Regular Expressions. In the relational expression @str expr(term), the result of str expr can be any POSIX extended regular expression [IEE01, Section 9.4]. A full description is beyond the scope, we only give a short overview. Most characters in a regular expression only match themselves. The following special characters match themselves only when they are preceded by a backslash (\), and otherwise have special meanings: . [] [^ ] ^ $ {x,y} + * ? | Matches any single character. Matches any single character contained within the brackets. Matches any single character not contained within the brackets. Matches the start of the string. Matches the end of the string. Matches the last character (or regular expression enclosed by parentheses) at least x and at most y times. Matches the last character (or regular expression enclosed by parentheses) one or more times. Matches the last character (or regular expression enclosed by parentheses) zero or more times. Matches the last character (or regular expression enclosed by parentheses) zero or one times. Matches either the expression before or the expression after the operator. Regular expressions can be grouped by enclosing them with parentheses ((...)). 6.3 Formal Semantics This subsection formally defines the semantics of the part of RML that deals with relations, namely of relational expressions and the relational assignment statement. The universe U is the finite set of all string literals that appear in the input RSF file, or on the left side of a relational assignment. The finite set of attributes of the RML program is denoted by X (U ∩ X = ∅). An attribute assignment is a total function v : X ∪ U → U which maps each attribute to its value and (for notational convenience) each string literal to itself. The set of all attribute assignments is denoted by Val (X). 16 The finite set of relation variables in the RML program is denoted by R. A relation assignment is a Qn S total function s : R → n∈N 2 k=1 U , which maps each relation variable to a relation of arbitrary arity. The set of all relation assignments is denoted by Rel(R). The semantics of relational expressions and statements are given by the following interpretation functions: [[.]]e : rel exprs → (Rel(R) → 2Val(X) ) [[.]]s : stmts → (Rel(R) → Rel(R)) So we define the semantics of an expression as the set of attribute assignments that satisfy the expression, and the semantics of a statement as a transformation of the relation assignment. The interpretation functions are defined inductively in Figure 2. [[rel var(term1 , . . ., termn )]]e (s) = n v ∈ V al(X)  o  v(term1 ), . . . , v(termn ) ∈ s(rel var) [[! rel expr]]e (s) = Val (X) \ [[rel expr]]e (s) [[rel expr1 & rel expr2 ]]e (s) = [[rel expr1 ]]e (s) ∩ [[rel expr2 ]]e (s) [[rel expr1 | rel expr2 ]]e (s) = [[rel expr1 ]]e (s) ∪ [[rel expr2 ]]e (s) [[rel expr1 -> rel expr2 ]]e (s) = [[! (rel expr1 ) | (rel expr2 )]]e (s) [[rel expr1 <-> rel expr2 ]]e (s) = [[(rel expr1 -> rel expr2 ) & (rel expr2 -> rel expr1 )]]e (s) n o [[EX(attribute, rel expr)]]e (s) = v ∈ V al(X) ∃v ′ ∈ [[rel expr]]e (s) ∀x ∈ X \ {attribute} : v(x) = v ′ (x) [[FA(attribute, rel expr)]]e (s) = [[! EX(attribute, ! (rel expr))]]e (s) lfp [[TC(rel var(attribute1 , attribute2 ))]]e (s) = [[ rel var(attribute1 , attribute2 ) | EX(attribute3 , rel var(attribute1 , attribute3 ) & TC(rel var(attribute3 , attribute2 )))]]e (s) [[TCFAST(rel var(attribute1 , attribute2 ))]]e (s) = [[TC(rel var(attribute1 , attribute2 ))]]e (s) [[TRUE(term1 , . . ., termn )]]e (s) = Val (X) [[FALSE(term1 , . . ., termn )]]e (s) = ∅ n o [[=(term1 , term2 )]]e (s) = v ∈ V al(X) | v(term1 ) = v(term2 ) n o [[<(term1 , term2 )]]e (s) = v ∈ V al(X) | v(term1 ) <lexicographically v(term2 ) [[=(rel expr1 , rel expr2 )]]e (s) = Val (X), ∅, if [[rel expr1 ]]e (s) = [[rel expr2 ]]e (s) otherwise [[<(rel expr1 , rel expr2 )]]e (s) = Val (X), ∅, if [[rel expr1 ]]e (s) ( [[rel expr2 ]]e (s) otherwise [[(rel expr)]]e (s) = [[rel expr]]e (s)   [[rel var(term1 ,. . .,termn ):= rel expr]]s (s) (r) = s(r), n ∪ n  if r 6= rel var o v ∈ [[rel expr]]e (s) o t ∈ s(r) | ∃i : termi ∈ U ∧ termi 6= ti , if r = rel var v(term1 ), . . . , v(termn ) lfp with attribute, attribute1 , attribute2 , attribute3 ∈ X, term1 , ..., termn ∈ X ∪ U, and rel var ∈ R. The symbol = denotes the least fixed point. Fig. 2. RML semantics 17 References AFC98. G. Antoniol, R. Fiutem, and L. Cristoforetti. Design pattern recovery in object-oriented software. In Proceedings of the 6th IEEE International Workshop on Program Comprehension (IWPC 1998), pages 153–160. IEEE Computer Society, 1998. BBS97. Ralf Behnke, Rudolf Berghammer, and Peter Schneider. Machine support of relational computations: The Kiel RELVIEW system. Technical Report 9711, Institut für Informatik und Praktische Mathematik, Christian-Albrechts-Universität Kiel, 1997. Bla04. Michael Blaha. A copper bullet for software quality improvement. Computer, 37(2):21–25, 2004. BLM02. Rudolf Berghammer, Barbara Leoniuk, and Ulf Milanese. Implementation of relational algebra using binary decision diagrams. In H. de Swart, editor, Proceedings of the 6th International Conference on Relational Methods in Computer Science (RelMICS 2001), LNCS 2561, pages 241–257, Berlin, 2002. Springer-Verlag. BLQ+ 03. Marc Berndl, Ondrej Lhoták, Feng Qian, Laurie J. Hendren, and Navindra Umanee. Points-to analysis using BDDs. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI 2003), pages 103–114. ACM, 2003. BNL03. Dirk Beyer, Andreas Noack, and Claus Lewerentz. Simple and efficient relational querying of software structures. In Proceedings of the 10th Working Conference on Reverse Engineering (WCRE 2003), pages 216–225. IEEE Computer Society, 2003. Bry86. Randal E. Bryant. Graph-based algorithms for boolean function manipulation. IEEE Transaction on Computers, C-35(8):677–691, 1986. Bry92. Randal E. Bryant. Symbolic boolean manipulation with ordered binary decision diagrams. ACM Computing Surveys, 24(3):293–318, 1992. CGK98. Yih-Farn Chen, Emden R. Gansner, and Elftherios Koutsofios. A C++ data model supporting reachability analysis and dead code detection. IEEE Transactions on Software Engineering, 24(9):682–694, 1998. Ciu99. Oliver Ciupke. Automatic detection of design problems in object-oriented reengineering. In Proceedings of Technology of Object-Oriented Languages and Systems (TOOLS 1999), pages 18–32. IEEE Computer Society, 1999. CM03. William F. Clocksin and Cristopher S. Mellish. Programming in Prolog. Springer-Verlag, Berlin, 5th edition, 2003. FH00. Hoda Fahmy and Richard C. Holt. Software architecture transformations. In Proceedings of the International Conference on Software Maintenance (ICSM 2000), pages 88–96. IEEE Computer Society, 2000. FKvO98. Loe M. G. Feijs, René L. Krikhaar, and Rob C. van Ommering. A relational approach to support software architecture analysis. Software: Practice & Experience, 28(4):371–400, 1998. GHJV95. Erich Gamma, Richard Helm, Ralph Johnson, and John Vlissides. Design Patterns. Addison-Wesley, Reading, MA, 1995. Har91. John Hartman. Understanding natural programs using proper decomposition. In Proceedings of the 13th International Conference on Software Engineering (ICSE 1991), pages 62–73, 1991. HN90. Mehdi T. Harandi and Jim Q. Ning. Knowledge-based program analysis. IEEE Software, 7(1):74–81, 1990. Hol96. Richard C. Holt. Binary relational algebra applied to software architecture. Technical Report CSRI 345, University of Toronto, 1996. Hol98. Richard C. Holt. Structural manipulations of software architecture using Tarski relational algebra. In Proceedings of the 5th Working Conference on Reverse Engineering (WCRE 1998), pages 210–219. IEEE Computer Society, 1998. IEE01. IEEE. IEEE Standard for Information Technology – Portable Operating System Interface (POSIX) (IEEE Std 1003.1-2001), 2001. KB98. Rick Kazman and Marcus Burth. Assessing architectural complexity. In Proceedings of the 2nd Euromicro Conference on Software Maintenance and Reengineering (CSMR 1998), pages 104–112, 1998. KP96. Christian Krämer and Lutz Prechelt. Design recovery by automated search for structural design patterns in object-oriented software. In Proceedings of the 3rd Working Conference on Reverse Engineering (WCRE 1996), pages 208–215. IEEE Computer Society, 1996. Kri01. Jens Krinke. Identifying similar code with program dependence graphs. In Proceedings of the 8th Working Conference on Reverse Engineering (WCRE 2001), pages 301–309. IEEE Computer Society, 2001. 18 KSRP99. Rudolf K. Keller, Reinhard Schauer, Sébastien Robitaille, and Patrick Pagé. Pattern-based reverseengineering of design components. In Proceedings of the 21st International Conference on Software Engineering (ICSE 1999), pages 226–235. ACM, 1999. KW99. Bernt Kullbach and Andreas Winter. Querying as an enabling technology in software reengineering. In Proceedings of the 3rd European Conference on Software Maintenance and Reengineering (CSMR 1999), pages 42–50, 1999. Mar97. Robert C. Martin. Engineering notebook: Stability. C++ Report, February 1997. MNS01. Gail C. Murphy, David Notkin, and Kevin J. Sullivan. Software reflexion models: Bridging the gap between design and implementation. IEEE Transactions on Software Engineering, 27(4):364–380, 2001. MS95. Alberto O. Mendelzon and Johannes Sametinger. Reverse engineering by visualizing and querying. Software – Concepts & Tools, 16(4):170–182, 1995. MWD99. Kim Mens, Roel Wuyts, and Theo D’Hondt. Declarative codifying software architectures using virtual software classifications. In Proceedings of the 29th International Conference on Technology of ObjectOriented Languages and Systems - Europe (TOOLS 1999), pages 33–45. IEEE Computer Society, 1999. NSW+ 02. Jörg Niere, Wilhelm Schäfer, Jörg P. Wadsack, Lothar Wendehals, and Jim Welsh. Towards patternbased design recovery. In Proceedings of the 24th International Conference on Software Engineering (ICSE 2002), pages 338–348. ACM, 2002. Qui94. Alex Quilici. A memory-based approach to recognizing programming plans. Communications of the ACM, 37(5):84–93, 1994. RW90. Charles Rich and Linda M. Wills. Recognizing a program’s design: A graph-parsing approach. IEEE Software, 7(1):82–89, 1990. SMB96. Forrest Shull, Walcélio L. Melo, and Victor R. Basili. An inductive method for discovering design patterns from object-oriented software systems. Technical Report CS-TR-3597, Computer Science Department, University of Maryland, 1996. SSC96. Mohlalefi Sefika, Aamod Sane, and Roy H. Campbell. Monitoring compliance of a software system with its high-level design models. In Proceedings of the 18th International Conference on Software Engineering (ICSE 1996), pages 387–396. IEEE Computer Society, 1996. TA99. Paolo Tonella and Giulio Antoniol. Object oriented design pattern inference. In Proceedings of the International Conference on Software Maintenance (ICSM 1999), pages 230–238. IEEE Computer Society, 1999. WHH02. Jingwei Wu, Ahmed E. Hassan, and Richard C. Holt. Using graph patterns to extract scenarios. In Proceedings of the 10th International Workshop on Program Comprehension (IWPC 2002), pages 239–247. IEEE Computer Society, 2002. Won98. Kenny Wong. Rigi User’s Manual, Version 5.4.4, 1998. http://ftp.rigi.csc.uvic.ca/pub/rigi/doc/. 19
2cs.AI
On the List Decodability of Self-orthogonal Rank Metric Codes 1 Shu Liu arXiv:1801.07033v1 [cs.IT] 22 Jan 2018 Abstract V. Guruswami and N. Resch prove that the list decodability of Fq -linear rank metric codes is as good as that of random rank metric codes in [17]. Due to the potential applications of self-orthogonal rank metric codes, we focus on list decoding of them. In this paper, we prove that with high probability, n τ ) −  is shown an Fq -linear self-orthogonal rank metric code over Fqn×m of rate R = (1 − τ )(1 − m to be list decodable up to fractional radius τ ∈ (0, 1) and small  ∈ (0, 1) with list size depending on τ and q at most Oτ,q ( 1 ). In addition, we show that an Fqm -linear self-orthogonal rank metric code of rate up to the Gilbert-Varshamov bound is (τ n, exp(Oτ,q ( 1 )))-list decodable. I. I NTRODUCTION In the late 50’s, P. Elias [10], [11] and J. M. Wozencraft [6] introduced list decoding. Compared with unique decoding, list decoding can output a list of codewords which contains the correct transmitted codeword rather than output a unique codeword. Consequentially, the list size of list decoding can be bigger than 1. In coding theory, there exists a trade-off between the fraction of errors that can be corrected and the rate. The largest list size of the decoder’s output is an important parameter in list decoding. In fact, we want to have a small list size. At least two reasons can be argued. The first reason is due to the usefulness of this list. After the output of this list, the next step is to utilize this list to decide what the original transmitted message is. This can be done, by outputting the codeword corresponding to the smallest error. If the list size is exponential, the decision step needs exponential time complexity. The second reason is that this list size provides us with a lower bound for the worst-case complexity of the decoding algorithm itself. So, if we require the decoding algorithm to be efficient, we need the list size to be as small as possible. List Decoding of Rank Metric Codes Rank metric codes is a set of n × m matrices over a finite field Fq . By the ring isomorphism between Fm q and Fq m , an n × m matrix over Fq can be defined as a vector of length n over the extension field Fqm . Rank metric codes have been receivced many attention because of their applications in network coding [3], [13], storage systems [15], cryptography [4], [16], and space-time coding [12]. Finding good list decodable rank metric codes attracts more and more researchers. In order to find the limit in which an efficient list decoding is possible, A. Wachter-Zeh provided lower and upper bounds on the list size in [2], [1] and showed that the upper bound of the list size is exponential, for any decoding radius beyond half of the minimum distance. In addition, there exists an exponential list size rank metric code for any decoding radius is larger than half of the minimum distance. No efficient list decoding The author is with Division of Mathematical Sciences, School of Physical and Mathematical Sciences, Nanyang Technological University, Singapore 637371, Republic of Singapore (email: [email protected]). can be found for Gabidulin codes if decoding radius beyond the Johnson bound. Y. Ding [18] reveals that the Singleton bound is the list decoding barrier for any rank metric code. With high probability, the decoding radius and the rate of random rank metric codes satisfy the Gilbert-Varshamov bound with constant list size. In addition, with high probability, an Fq -linear rank metric code can be list decoded with list decoding radius attaining the Gilbert-Varshamov bound with exponential list size. Since efficient list decoding radius of Gabidulin codes cannot be larger than the unique decoding radius, S. Liu, C. Xing and C. Yuan show that with high probability, a random subcode of a Gabidulin code is list decodable with decoding radius far beyond the unique decoding radius in [9]. However, for Fq -linear rank metric codes, when the list decoding radius is beyond half of the minimum distance, the list size is exponential. V. Guruswami and N. Resch decrease the list size of Fq -linear rank metric codes and show that it is list decodable as good as random rank metric codes in [17]. Motivation There has been some interesting findings on the list decodability for random Fq -linear rank metric codes [17], [5]. An interesting direction is to see whether these new results can be applied to improve results on specific Fq -linear rank metric codes. Due to its potential application in many fields, the specific Fq -linear rank metric codes that we are interested in is the Fq -linear self-orthogonal rank metric codes. Due to the finding that from list decoding point of view, random Fq -linear rank metric codes perform as well as general rank metric codes, a natural question that follows is whether the performance can still be maintained when we further restrict that the random Fq -linear rank metric codes to be also selforthogonal. Moreover, based on Fq -linear case, we investigate how well one can list decode random Fqm -linear self-orthogonal rank metric codes. Organization Firstly, we give some definitions and notations about self-orthogonal rank metric codes, list decoding and quadratic form. Then, we describe how to construct Fq and Fqm -linear self-orthogonal rank metric codes based on the quadratic form and analyze the list decodability of them. Ultimately, we draw a conclusion. II. P RELIMINARIES A. Defined Self-Orthogonal Rank Metric Codes Rank metric codes can mainly be interpreted in two different representations. The first representation is to deem each codeword as matrices in Fn×m . Alternatively, we can interpret each element of a rank q metric code as a vector in Fnqm . In the first representation of codewords as matrices, linear codes are considered to be linear over Fq . On the other hand, the linearity considered when seeing a rank metric code as a set of vectors is assumed to be Fqm linearity. The two different representations of rank metric codes provide us with two different ways in defining self-orthogonal rank metric codes (Fq -linear and Fqm -linear). Fq -linear self-orthogonal rank metric codes: To properly define an Fq -linear self-orthogonal rank metric code, first we briefly provide the definitions and notations of matrix representation for rank metric codes. A rank metric code C contains n × m matrices over Fq for integers n, m and prime power q. Through the use of matrix transpose, for simplicity, we can just assume that n is at most m. The rank distance between two matrices X, Y ∈ Fn×m is then defined by the rank norm of the difference between the two, q 2 dR (X, Y ) := rank(X − Y ). These parameters can then be used to formulate two relative parameters, namely relative minimum rank distance δ and rate R. These relative parameters are then defined by logq |C| minX6=Y ∈C {dR (X, Y )} − 1 δ(C) = and R(C) = . n mn The (Delsarte) dual of C is then defined to be C ⊥ = {X ∈ Fn×m |T r(CX T ) = 0, ∀C ∈ C}. q Based on this definition of dual, an Fq -linear rank metric code C is said to be self-orthogonal if C ⊆ C ⊥ . A property of Fq -linear self-orthogonal rank metric code that is readily verified is that its Fq -dimension should be at most nm 2 and hence its rate R must be in the range 0 ≤ R ≤ 1/2. Fqm -linear self-orthogonal rank metric codes: Pick Fqm , the extension field of Fq with degree m. The ring isomorphism between Fqm and Fm q through the use of a fixed Fq -basis of Fq m implies the possibility to identify a rank metric codes over Fn×m as a collection of vectors over Fnqm . For any two q n vectors x =P (x1 , · · · xn ) and y = (y1 , · · · , yn ) ∈ Fqm , we say that they are orthogonal to each other if hx, yi = ni=1 xi yi = 0. The vector x is then called a self-orthogonal vector if it is orthogonal to itself. The definition of self-orthogonality can be naturally extended to a set {v1 , · · · , vt } where this set is self-orthogonal if hvi , vj i = 0 for any choices of i and j, 1 ≤ i, j ≤ t. Clearly, this suggests an alternative way to define a dual C ⊥ of a rank metric code C ∈ Fnqm , namely the collection of codewords that are orthogonal to all codewords in C. Analogous to the previous definition, we call an Fqm -linear rank metric code C to be self-orthogonal given that C ⊆ C ⊥ . Consequentially, an Fqm -linear rank metric code C can only be self-orthogonal if its Fqm -dimension does not exceed n2 or it has rate R ∈ (0, 1/2). We will devote the remainder of this section to investigate when both definition of duals can coincide. In order to do that, we first need to review some basic concepts of algebra. Recall that for the field i Fqm , there are n different Fq -linear automorphisms which are the Frobenius automorphisms x 7→ xq for i = 0, · · · , n − 1. Based on these automorphisms, we can then define the field trace trFqm /Fq which sends P qi x to m−1 i=0 x . We also recall that for any given Fq basis B = (β1 , · · · , βm ) of Fq m , there always exists ∗ ) satisfying tr ∗ a dual bases B ∗ := (β1∗ , · · · βm Fqm /Fq (βi βj ) = δi,j the Kronecker delta function. Now if βi ∗ coincides with βi for all i, B is called a self-dual basis. Note that the existence of a self-dual Fq -basis of Fqm is equivalent to the condition that q is even or both q and m are odd [5]. We are ready to conduct our investigations. Lemma 1. Let q and m be chosen such that Fqm has a self dual basis B = (β1 , · · · , βm ). Furthermore, pick any two rank metric codes C1 and C2 over Fqn×m . Then T r(C1 C2T ) = {T r(XY T ) : X ∈ C1 , Y ∈ C2 } = {0} if and only if hC1 , C2 i = {hx, yi : x ∈ C1 , y ∈ C2 } = {0}. Note that we assume Ci to be in its matrix representation for the earlier equation and vector representation for the latter. Pm Proof.PLet a = (a1 , · · · , an ) ∈ C1 and b = (b1 , · · · bn ) ∈ C2 . We further let ai = j=1 ai,j βj and m bi = k=1 bi,k βk for all i = 1, 2 · · · , n. Assuming hC1 , C2 i = {0}, we have   ! n n m m n X m X m X X X X X  0 = ha, bi = ai bi = ai,j βj  bi,k βk = ai,j bi,k βj βk . i=1 i=1 j=1 k=1 3 i=1 j=1 k=1 Applying the field trace function to both sides, we have 0 = trha, bi = n X m X m X ai,j bi,k tr(βj βk ) = n X m X m X ai,j bi,k = i=1 j=1 k=1 i=1 j=1 k=1 n X m X ai,j bi,j . i=1 j=1 Note that by assumption, the matrices A = (ai,j ), B = (bi,jP ) withPsize n × m are the matrix representations of a and b respectively. Noting that T r(AB T ) = ni=1 m j=1 ai,j bi,j , the last equality T implies that T r(AB ) = 0. Since a and b are arbitrary elements of C1 and C2 respectively, we have the conclusion T r(C1 C2T ) = {0} from the assumption that hC1 , C2 i = {0}. On the other direction can be easily proved. Suppose that T r(AB T ) = 0 for all A = (ai,j ) ∈ C1 and B = (bi,j ) ∈ C2 . Hence, we have B ∈ C1⊥ or hA, Bi = 0 for all A ∈ C1 and B ∈ C2 which ultimately implies that hC1 , C2 i = {0}. B. List Decoding Given a received word, list decoding outputs a list of codewords, if successful, it contains the correct transmitted codeword. Analogous to the Hamming ball in classical block codes, in rank metric codes, we also have the concept of rank metric ball. The formal definition is given in the following. . The rank metric ball centre at X and radius τ n is defined Definition 1. Let τ ∈ (0, 1) and X ∈ Fn×m q by BR (X, τ n) := {Y ∈ Fnqm : dR (X, Y ) ≤ τ n}.   For any n-dimensional vector space V over Fq , we denote by nk q , the number of subspaces of V with dimension k. This is called the Gaussian binomial coefficient and it has the following explicit formula,   k−1 Y qn − qi n . = k q qk − qi i=0 n It can be verified that this formula k q has the following bounds that can be used as estimation [8],   n k(n−k) q ≤ ≤ 4q k(n−k) . k q Definition 2. For an integer L ≥ 1 and a real τ ∈ (0, 1), a rank metric code C is said to be (τ n, L)-list decodable if for every X ∈ Fn×m q |BR (X, τ n) ∩ C| ≤ L. Analogously, for x ∈ Fnqm , |BR (x, τ n) ∩ C| ≤ L. C. Quadratic forms We say f (x) is an n-variate quadratic form over Fq , if it is a degree 2 homogeneous multinomial of n variables with coefficients from Fq . The general formula that f should follow f (x) = f (x1 , x2 , · · · , xn ) = n X i,j=1 4 aij xi xj , aij ∈ Fq . Note that an n-variate quadratic form f over Fq can be expressed as multiplication of matrices. Assuming x = (x1 , · · · , xn )T and A = (ai,j )i,j=1,··· ,n over Fq , f (x) can then be rewritten as f (x) = xT Ax. Two quadratic forms f and g of n1 and n2 indeterminates respectively are called equivalent provided that we can find a full rank n1 × n2 matrix M over Fq satisfying f (xM ) = g(x). Note that equivalence implies the same number of roots. Equivalence enables two quadratic forms of different number of indeterminates to be closely related to each other. Given a non-zero quadratic form f (x), the smallest number of indeterminates that a quadratic form g(x) can have while still being equivalent to f (x) is a parameter of f (x) that is called to be its rank. By convention, we let the zero quadratic form be rank 0. A non-zero quadratic form f (x) is said to be non-degenerate if its rank is equal to the number of its indeterminates. To aid our analysis in this paper, the number of roots a quadratic form f (x) is a topic of interest. We combine several results in [14] as a lemma to consider two cases (over Fq and Fqm ). Lemma 2. [14] Let f (x) := f (x1 , x2 , · · · , xn ) be a quadratic form with rank r over Fq (or Fqm ). N (f (x) = 0) denotes the number of roots of f (x) = 0 in Fqn×m (or Fnqm ). If r = 0, then we have N (f (x) = 0) = q mn . If r ≥ 1, then we have the following results: If f (x) is defined over Fq with solutions in Fqn×m , ( q mn−1 , r is odd. N (f (x) = 0) = mn−1 mn−r/2−1 q ± (q − 1)q , r is even. Alternatively, if f (x) is defined over Fqm with solutions in Fnqm , ( q m(n−1) , N (f (x) = 0) = q m(n−1) ± (q m − 1)q m(n−r/2−1) , r is odd. r is even. III. C ONSTRUCTION OF R ANDOM S ELF -O RTHOGONAL R ANK M ETRIC C ODES A. Construct Fq -linear Self-Orthogonal Rank Metric Codes In this part, we construct Fq -linear self-orthogonal rank metric codes based on quadratic forms. Let A = [aij ], 1 ≤ i ≤ n, 1 ≤ j ≤ m be a word. If A is self-orthogonal, then T r(AAT ) = n X m X aij aij = 0. i=1 j=1 Considering the standard bijection from [n]×[m] to [nm], where [n] = {0, · · · , n−1}, [m] = {0, · · · , m− 1}, we can rewrite the double index (i, j) to a single index to obtain T T r(AA ) = n X m X i=1 j=1 aij aij = mn X a2` = 0. `=1 Construction • Step 1. Choose a nonzero random solution A1 ∈ Fn×m of the quadratic equation x21 +x22 +· · ·+x2mn = q 0. By Lemma 2 we can obtain that the above equation has at least q mn−2 solutions, so a self-orthogonal word A1 can be found. 5 • Step 2. Obtain a linearly independent set {A1 , A2 , · · · , Ak−1 , Ak } of random self-orthogonal matrices given A1 , · · · , Ak−1 . Firstly, we assume that a linearly independent set {A P 1 , A2 , · · · , Ak−1 } of random self-orthogonal matrices has already been found, i.e. T r(Ai ATj ) = mn `=1 ai` aj` = 0, 1 ≤ i, j ≤ k − 1. Then, if we want to find the k -th matrix Ak , then we need to find a solution of the following equations  a11 x1 + a12 x2 + · · · + a1,mn xmn = 0,     ..  . (1)   ak−1,1 x1 + ak−1,2 x2 + · · · + ak−1,mn xmn = 0,    x21 + x22 + · · · + x2mn = 0. Take the first k − 1 equations above in to the last one, we have a quadratic equation g(xi1 , xi2 , · · · , ximn−k+1 ) of mn − k + 1 variables. So, N (g(xi1 , xi2 , · · · , ximn−k+1 ) = 0) is the number of solutions of the equation (1). The number of the cardinality of span{A1 , A2 , · · · , Ak−1 } is equal to q mn(k−1) . And, N (g(xi1 , xi2 , · · · , ximn−k+1 ) = 0) > q mn(k−1) , thus we can randomly choose a solution Ak from (1), it is not contained in Span{A1 , A2 , · · · , Ak−1 }. So, we can obtain a linearly independent set {A1 , A2 , · · · , Ak−1 , Ak } of random self-orthogonal matrices. Moreover, by Lemma 2, the number of solution N (g(xi1 , xi2 , · · · , ximn−k+1 ) = 0) of g(xi1 , xi2 , · · · , ximn−k+1 ) = 0 is at least q mn−k−1 . Thus, the set can always be constructed as long as k ≤ (mn − 1)/2. B. Construct Fqm -linear Self-Orthogonal Rank Metric Codes We study how to construct Fqm -linear self-orthogonal rank metric codes. The idea is similar to the construction of Fq -linear self-orthogonal rank metric codes. Constructing a random Fqm -linear selforthogonal rank metric code is equivalent to find a linearly independent set {x1 , x2 , · · · , xk } of random Fqm -linear self-orthogonal vectors, where xi ∈ Fqm , 1 ≤ i ≤ k. Choose a nonzero random solution x1 = (x11 , x12 , · · · , x1n ) ∈ Fnqm of the quadratic equation z12 + 2 z2 + · · · + zn2 = 0. This equation has at least q m(n−2) roots, so a self-orthogonal x1 can be found. The same method as the construction Fq -linear self-orthogonal rank metric codes can be conducted. Then, we can confirm there exists a linearly independent set {x1 , x2 , · · · , xk−1 , xk } of Fqm -linear self-orthogonal vectors. In addition, by calculation we have such xk as long as k ≤ (n − 1)/2. IV. L IST D ECODING S ELF -O RTHOGONAL R ANK M ETRIC C ODES A. List Decoding Fq -linear Self-Orthogonal Rank Metric Codes In this part, we investigate the list decodability of Fq -linear self-orthogonal rank metric codes. We show that rate and decoding radius of Fq -linear self-orthogonal rank metric codes can achieve the Gilbertq |C| n Varshamov bound. From now on, the information rate logmn and the ratio m are denoted by R and ρ, respectively. Our main result of list decoding of Fq -linear self-orthogonal rank metric codes can be found in the Theorem 1. With the help of studying and discussing the weight distribution of certain rank metric code, we can deal with it. 6 √ Lemma 3. [17] For all integers n ≤ m, every τ ∈ (0, 1) and ` = O( nm), there exists a constant Cτ,q > 1 such that if X1 , · · · , X` are selected independently and uniformly at random from BR (0, τ n), then we have P r[| span{X1 , · · · , X` } ∪ BR (0, τ n) |≥ Cτ,q · `] ≤ q−(3−O(1))mn From the above lemma, it reveals that randomly picking ` words from BR (0, τ n), there exists more than Ω(`) words in the span of ` words lies in the BR (0, τ n) happens with a very small probability, where the parameter ` depends on the list size L. Then, we consider the following result on the probability that a random k dimension Fq -linear rank metric code contains a k−1 dimension Fq -linear self-orthogonal subcode and a given set {X1 , · · · , X` } ⊆ Fn×m of linearly independent vectors. Let Ck∗ present the set of k dimension Fq -linear rank metric codes, q where every code contains a k − 1 dimension Fq -linear self-orthogonal subcode. Lemma 4. [7] For any Fq -linearly independent words X1 , X2 , · · · , X` in Fn×m with ` ≤ k < mn/2, q the probability of a random code C ∗ from Ck∗ contains {X1 , X2 , · · · , X` } is ( q ((k+`−mn−1)`+2k−1) , if q is even; (2) P rC ∗ ∈Ck∗ [{X1 , X2 , · · · , X` } ⊆ C] ≤ q ((k+`−mn−2)`+4k−2) , if q is odd. Thus, we have P rC ∗ ∈Ck∗ [{X1 , X2 , · · · , X` } ⊆ C] ≤ q ((k+`−mn−2)`+4k−1) . (3) Based on the Lemma 3 and Lemma 4, we prove Theorem 1. Theorem 1. Let q be prime power and τ ∈ (0, 1). There exist a constant M and all large enough n, for small  > 0, an Fq -linear self-orthogonal rank metric code C ⊆ Fqn×m of rate R = (1 − τ )(1 − ρτ ) −  is (τ n, Oτ,q ( 1 ))-list decodable with high probability at least 1 − q −2mn . Proof. Pick M = 5Cτ,q , where Cτ,q is the constant in Lemma 3. Set L = d M e and n to be large enough. Let C be an Fq -linear self-orthogonal rank metric codes with dimFq = Rmn in Fn×m , the size q |C| = q Rmn . We want to show that with high probability, C is (τ, Oτ,q ( 1 ))-list decodable. In other words, the code C is not (τ n, Oτ,q ( 1 ))-list decodable with low probability, i.e., P rC∈CRmn [∃X ∈ Fqn×m , |BR (X, τ n) ∩ C| ≥ L] < q −2mn , (4) where CRmn denotes the set of Fq -linear self-orthogonal rank metric codes with dimension Rmn. Let X ∈ Fn×m be picked uniformly at random, define q 4 := P rC∈CRmn ,X∈Fqn×m [|BR (X, τ n) ∩ C| ≥ L] For (4), it suffices to prove 4 < q −2mn · q −(1−R)mn (5) The inequality (5) is derived from (4). For every Fq -linear code C , due to ”bad” case X such that (|BR (X, τ n) ∩ C| ≥ L), there are q Rmn such ”bad” X. Since C is Fq -linear, we have 4 =P rC∈CRmn ,X∈Fn×m [|BR (X, τ n) ∩ C| ≥ L] q =P rC∈CRmn ,X∈Fn×m [|BR (0, τ n) ∩ (C + X)| ≥ L] q ≤P rC∈CRmn ,X∈Fn×m [|BR (0, τ n) ∩ SpanFq (C + X)| ≥ L] q ∗ ≤P rC ∗ ∈CRmn+1 [|BR (0, τ n) ∩ C ∗ | ≥ L], 7 where C ∗ is a Rmn + 1 dimension random Fq -subspace of Fn×m containing SpanFq (C + X) ( If X is q not in C, then C ∗ = SpanFq (C, X); otherwise C ∗ = SpanFq (C, Y), where word Y is randomly picked from Fn×m \C ). q For each integer ` ∈ [logq L, L], let F` be the set of all tuples (X1 , X2 , · · · , X` ) ∈ BR (0, τ n)` such that X1 , X2 , · · · , X` are linearly independent and |span(X1 , · · · , X` ) ∩ BR (0, τ n)| ≥ L. S Let F = L `=dloqq Le F` . For each X = (X1 , · · · , X` ) ∈ F, let {X} and (X) denote the set {X1 , · · · , X` } and the tuple (X1 , · · · , X` ), respectively. Claim that if |BR (0, τ n) ∩ C ∗ | ≥ L, there must exist (X) ∈ F such that {X} ⊆ C ∗ . Indeed, let {H} be a maximal linearly independent subset of BR (0, τ n) ∩ C ∗ . If |{H}| < L, then we have {X} = {H}. Otherwise, we have {X} to be any subset of {H} of size L. Thus, ∗ 4 ≤P rC ∗ ∈CRmn+1 [|BR (0, τ n) ∩ C ∗ | ≥ L] X ∗ ≤ P rC ∗ ∈CRmn+1 [{X} ⊆ C ∗ ] (X)∈F` = L X X ∗ P rC ∗ ∈CRmn+1 [{X} ⊆ C ∗ ] `=dloqq Le (X)∈F` = L X ∗ |F` |P rC ∗ ∈CRmn+1 [{X} ⊆ C ∗ ] `=dloqq Le ≤ L X |F` |q (((Rmn+1)+`−mn−2)`+4(Rmn+1)−1) . `=dloqq Le The last inequality is from the Lemma 4. We want to get a good bound of our probability, so we need to take a reasonable good upper bound for |F` |. In [17], we bound |F` | relying on the value of the parameter `. • Case 1. ` < 5 |F` | In this case, we have |BR (0,τ n)|` is a lower bound on the probability that matrices X1 , X2 , · · · , X` chosen independently and uniformly at random from the rank metric ball BR (0, τ n) are | span{X1 , · · · , X` } ∪ BR (0, τ n) |≥ L. By Lemma 3, the probability is at most q −2mn , thus  ` 2 |F` | ≤ |BR (0, τ n)` | · q −2mn ≤ 4q mn(τ +τ ρ−τ ρ) · q −2mn . • Case 2. ` ≥ 5 We have the simple bound of  ` 2 |F` | ≤ |BR (0, τ n)` | ≤ 4q mn(τ +τ ρ−τ ρ) . 8 Finally, taking the value of R = (1 − τ )(1 − ρτ ) −  into the below inequality, L X 4≤ |F` |q (((Rmn+1)+`−mn−2)`+4(Rmn+1)−1) `=dloqq Le d 5 e−1 X ≤ |F` |q (((Rmn+1)+`−mn−2)`+4(Rmn+1)−1) + L X |F` |q (((Rmn+1)+`−mn−2)`+4(Rmn+1)−1) `=d 5 e `=dloqq Le d 5 e−1 =q −2mn 4Rmn q · X ` mn`(τ +τ ρ−τ 2 ρ+R−1) 4q +q 4Rmn 5  d e−1 =q q · X L X 4` q mn`(−) + q 4Rmn · d 5 e−1 ≤q q · X `=dloqq Le 2 ρ+R−1) 4` q mn`(−) `=d 5 e `=dloqq Le −2mn 4Rmn 4` q mn`(τ +τ ρ−τ `=d 5 e `=dloqq Le −2mn 4Rmn · L X L X 4` q mn`(−) + q 4Rmn · 4` q −5mn `=d 5 e ≤q −2mn . Thus, an Fq -linear self-orthogonal rank metric code with rate R = (1−τ )(1−ρτ )− is not (τ n, Oτ,q ( 1 ))list decodable with an exponential small probability q −2mn . B. List Decoding Fqm -linear Self-Orthogonal Rank Metric Codes We consider the probability that a random dimension k Fqm -linear code contains a self-orthogonal k − 1 dimension subcode and a given set {v1 , v2 , · · · , v` } ⊆ Fnqm of linearly independent vectors. Let Ck∗ present the set of Fqm -linear codes in which every code contains an Fqm -linear dimension k − 1 self-orthogonal subcode. Lemma 5. [7] For any Fqm -linearly independent vectors x1 , x2 , · · · , x` in Fnqm with ` ≤ k < n/2, the probability of a random code C ∗ from Ck∗ contains {x1 , x2 , · · · , x` } is P rC ∗ ∈Ck∗ [{x1 , x2 , · · · , x` } ⊆ C] ≤ q m((k+`−n−2)`+4k−1) . (6) Theorem 2. Let q be prime power and a real τ ∈ (0, 1). There exist a constant M and all large enough n, for small  > 0, an Fqm -linear self-orthogonal rank metric code C ⊆ Fnqm of R = (1 − τ )(1 − ρτ ) −  is (τ n, exp(Oτ,q ( 1 )))-list decodable with high probablility 1 − q −2mn . Proof. Put L = d 1 e, n is large enough. Let C be an Fqm -linear self-orthogonal rank metric codes with dimFqm = Rn in Fnqm , the size |C| = q Rmn . We want to show that C is not (τ, exp(Oτ,q ( 1 )))-list decodable, i.e., P rC∈CRn [∃x ∈ Fnqm , |BR (x, τ n) ∩ C| ≥ L] < q −2mn , (7) where CRn denotes the set of Fqm -linear self-orthogonal rank metric codes with dimension Rn. Let x ∈ Fnqm be picked uniformly at random, define 4 := P rC∈CRn ,x∈Fnqm [|BR (x, τ n) ∩ C| ≥ L] 9 To prove inequality (7), we need to show that 4 < q −2mn · q −(1−R)mn (8) The inequality (8) is derived from (7). For every Fqm -linear C, due to ”bad” case x such that |BR (x, τ n)∩ C| ≥ L, there are q Rmn such ”bad” x. Since C is linear, we have 4 =P rC∈CRn ,x∈Fnqm [|BR (x, τ n) ∩ C| ≥ L] =P rC∈CRn ,x∈Fnqm [|BR (0, τ n) ∩ (C + x)| ≥ L] ≤P rC∈CRn ,x∈Fnqm [|BR (0, τ n) ∩ SpanFqm (C + x)| ≥ L] ∗ ≤P rC ∗ ∈CRn+1 [|BR (0, τ n) ∩ C ∗ | ≥ L], where C ∗ is a random Rn + 1 dimension Fqm -subspace of Fnqm containing C ( If x ∈ / C,then C ∗ = SpanFqm (C, x); otherwise C ∗ = SpanFqm (C, y), where y is picked randomly from Fnqm \C ). For each integer `, ` ∈ [logqm L, L]. Let F` be the set of all tuples (x1 , · · · , x` ) ∈ BR (0, τ n)` such that x1 , · · · , x` are linearly independent and |span(x1 , · · · , x` ) ∩ BR (0, τ n)| ≥ L. Hence, `  2 |Ft | ≤ |BR (0, τ n)t | ≤ 4q mn(τ +τ b−τ b) . S Let F = L `=dloqqm Le F` . For each x = (x1 , · · · , x` ) ∈ F, let {x} denote the set {x1 , · · · , x` }. We claim that if |BR (0, τ n) ∩ C ∗ | ≥ L, there must exist x ∈ F such that {x} ⊆ C ∗ . Thus, we have ∗ 4 ≤P rC ∗ ∈CRn+1 [|BR (0, τ n) ∩ C ∗ | ≥ L] X ∗ ≤ [{x} ⊆ C ∗ ] P rC ∗ ∈CRn+1 x∈F` = L X X ∗ [{x} ⊆ C ∗ ] P rC ∗ ∈CRn+1 `=dloqqm Le x∈F` = L X ∗ |F` |P rC ∗ ∈CRn+1 [{v} ⊆ C ∗ ] `=dloqqm Le 10 By taking R = (1 − τ )(1 − ρτ ) − , we can obtain ∗ 4 ≤P rC ∗ ∈CRn+1 [|BR (0, τ n) ∩ C ∗ | ≥ L] L  ` X 2 ∗ ≤ [{x} ⊆ C ∗ ] 4q mn(τ +τ ρ−τ ρ) P rC ∗ ∈CRn+1 `=dloqqm Le L X ≤  4q mn(τ +τ ρ−τ 2 ρ) ` q m((Rn+1)+`−n−2)`+4(Rn+1)−1) `=dloqqm Le ` ≤4 · ≤q L X q mn`(τ +τ b−τ 2 ρ+R−1) `=dloqqm Le −2mn . Thus, an Fqm -linear self-orthogonal rank metric code with rate R = (1 − τ )(1 − ρτ ) −  is not (τ n, exp(Oτ,q ( 1 )))-list decodable with an exponential small probability q −2mn . V. C ONCLUSION We investigate the list decodable Fq and Fqm -linear self-orthogonal rank metric codes. We show that the list decodability of Fq -linear self-orthogonal rank metric codes is as good as that of general random rank metric codes as well, which can be list decoded up to the Gilbert-Varshamov bound. By using the same methods for Fqm -linear rank metric codes, our results reveal that the Fqm -linear self-orthogonal rank metric codes is list decodable up to R = (1 − τ )(1 − ρτ ) −  with exponential list size. The list size of the codes grows polynomially in q m (rather than just q ). It is interesting to decrease the list size of Fqm -linear self-orthogonal rank metric codes and Fqm -linear rank metric codes. R EFERENCES [1] A. Wachter-Zeh, Bounds on List Decoding Gabidulin Codes, in Int, Workshop Alg. Combin. Coding Theory, Jun. 2012, pp. 329-334. [2] A. Wachter-Zeh, Bounds on list decoding of rank-metric codes, IEEE Transactions on Information Theory, 2013(59): 7268-7277. [3] D. Silva, F. R. Kschischang and R. Köetter, A rank-metric apporach to error control in random network coding, IEEE Transactions on Information Theory, 2008(54): 3951-3967. [4] E. M. Gabidulin, A. V. Paramonov, and O. V. Tretjakov, Ideals over a non-commutative ring and their application in cryptology, LNCS, Vol. 573, pp. 482489, 1991. [5] G. Nebe, W. Willems, On self-dual MRD codes, Advances in Mathematics of Communication, 2016(10): 633-642. [6] J. M. Wozencraft, List decoding, Res. Lab. Electron., MIT, Cambridge, MA, USA, Quart. Prog. Rep., 1958. [7] L. Jin, C. Xing and X. Zhang, On the List-Decodability of Random Self-Orthogonal Codes, IEEE Transactions on Information Theory, Vol.61, No.2, Feb. 2015. [8] M. Gadouleau and Z. Y. Yan, Packing and covering peoperties of rank metric codes, IEEE Transactions on Information Theory, 2008(54): 3873-3883. [9] S. Liu, C. Xing and C. Yuan, List Decodability of Random Subcodes of Gabidulin Codes, IEEE Transactions on Information Theory, Vol.63, No.1, Jan 2017. [10] P. Elias, List decoding for noisy channels, Res. Lab. Electron., MIT, Cambridge, MA, USA, Tech. Rep. 335, 1957. [11] P. Elias, Error-correcting codes for list decoding, IEEE Transactions on Information Theory, Vol.37, No.1, pp. 5-12, Jan. 1991. [12] P. Lusina, E. M. Gabidulin and M. Bossert, Maximum rank distance codes as space-time codes, IEEE Transactions on Information Theory, 2003(49): 2757-2760. 11 [13] R. Köetter and F. R. Kschischang, Coding for Errors and Erasures in Random Network Coding, IEEE Transactions on Information Theory, 2008(54): 3579-3591. [14] R. Lidl and H. Neiderriter, Finite Fields, Cambridge, U.K. Cambridge University. Press, 1997. [15] R. M. Roth, Maximum Rank Array Codes and their Application to Crisscross Error Correction, IEEE Transactions on Information Theory, 1991(37): 328-336. [16] R. Overbeck, Brute-force attacks public key cryptosystem based on Gabidulin codes, J. Cryptography, 2008(21): 280-301. [17] V. Guruswami, N. Resch, On the List-Decodability of Random Linear Rank Metric Codes, 2017. [18] Y. Ding, On List-Decodability of Random Rank Metric Codes and Subspace Codes, IEEE Transactions on Information Theory, 2015(61): 51-59. 12
7cs.IT
Survey on Additive Manufacturing, Cloud 3D Printing and Services arXiv:1708.04875v1 [cs.CY] 7 Aug 2017 Felix W. Baumann, Dieter Roller University of Stuttgart, Stuttgart, Germany Abstract Cloud Manufacturing (CM) is the concept of using manufacturing resources in a service oriented way over the Internet. Recent developments in Additive Manufacturing (AM) are making it possible to utilise resources ad-hoc as replacement for traditional manufacturing resources in case of spontaneous problems in the established manufacturing processes. In order to be of use in these scenarios the AM resources must adhere to a strict principle of transparency and service composition in adherence to the Cloud Computing (CC) paradigm. With this review we provide an overview over CM, AM and relevant domains as well as present the historical development of scientific research in these fields, starting from 2002. Part of this work is also a metareview on the domain to further detail its development and structure. Keywords: Additive Manufacturing; Cloud Manufacturing; 3D Printing Service 1. Introduction Cloud Manufacturing (here CM, in other works also CMfg) as a concept is not new and has been executed in enterprises for many years [275], under different terms, e.g., Grid Manufacturing [50] or Agile Manufacturing [215]. The decision to have a globally distributed and with many contractors or partners interconnected production process and related supply chains is a luxurious one. Large global corporations and competitions makes “expensive” local production nearly impossible. Email addresses: [email protected] (Felix W. Baumann), [email protected] (Dieter Roller) Preprint submitted to arXiv August 17, 2017 CM is based on a strict service orientation of its constituent production resources and capabilities. Manufacturing resources become compartmentalised and connected and worked with as service entities, that can be rented, swapped, expanded, dismantled or scaled up or down just by the use of software. This almost instantaneous and flexible model of resource usage is what made the Cloud Computing (CC) paradigm very successful for a number of companies. Here computing resources and data storage are all virtual, living in large datacentres around the globe, with the user only interfacing these resources through well-defined APIs (Application programming interface) and paying for only the resources utilised – apart from the costs inflicted by the cloud service providers due to their business model and the surcharged or otherwise calculated requirement for profit. With this work we contribute to the dissemination of knowledge in the domain of Additive Manufacturing (AM) and the concept of CM. Cloud Manufacturing can be seen as having two aspects and applications, where the first application is within an industrial environment for which CM provides a concept to embed, connect and utilise existing manufacturing resources, e.g., 3D printers, drilling-, milling- and other machines, i.e., cloud manufacturing is not limited to AM but AM can be utilised within a CM concept. The second application is for end-users that use AM/3D resources over the Internet in lieu acquiring their own 3D printer. The usage in this second application is highly service oriented and has mainly end-users or consumers as target clients. The consumers can profit from online-based services without the requirement of having to own neither hard- nor software resources for 3D printing. We motivate this work by an overview of the historical development of scientific research in these domains starting from 2002. With this we show that the scientific output within these fields has increased by an average of 41.3 percent annually to about 20000 publications per year (see Sect. 1.2). To develop a better understanding of the topic at hand we discuss various terminological definitions found in literature and standards. We give critique on the common definitions of AM and propose a simpler, yet more accurate definition. For the reader to further grasp these domains we study existing journals catering for these communities and discuss reach and inter-connections. Cloud Manufacturing relies on a service oriented concept of production services or capabilities. We extend an existing study on cloud printing ser2 vices as we see such services as integral components for future CM systems. Cloud manufacturing has two aspects which are detailed in this work. First CM is a methodology that is used within industrial settings for the connection of existing resources to form either a virtual assembly line or to acquire access to manufacturing resources in a service oriented manner. Due to the globalisation of the industry, manufacturers face increased challenges with shorter time-to-markets, requirements for mass customisation (MC) and increased involvement of customers within the product development process. In order to stay or become competitive, companies must utilise their resources more efficiently and where not available they must acquire those resources in an efficient and transparent way. These resources must then be integrated into the existing process environment and released when no longer required. The concepts of cloud computing, where resources are available as services from providers that can be leased, rented, acquired or utilised in other ways are proposed to be applied to the domain of manufacturing. Resources like machines and software, as well as capabilities/abilities become transparently available as services that customers or end-users can use through the respective providers and pay for only the services they require momentarily. Most often, no contractual obligations between the provider and the consumer exists (but it can exist, especially for high-value or highvolume usage) which gives the consumer great flexibility at the expense of possible unavailability of resources by the provider. In the end-user segment, or the consumer aspect of CM the user is interested in using AM resources like 3D printers through a web-based interface in order to be able to have objects produced that are designed to be 3D printed without the necessity to purchase and own a 3D printer themselves. The user commonly uses such services in a similar fashion that they would use a (online) photography lab / printing service. The users’ experience and knowledge of AM and 3D printing can vary significantly. Albeit these two aspects seem to be far apart, the commonality between them is, that the service operator must provide AM resources in both cases in a transparent and usable manner. Resources must be provided with clear definitions of the interface to the service, i.e., the data consumed by the service and data rendered by the service. The description and provisioning of the service must be hardware agnostic as the consumer must be able to select the resources required, e.g., have an object manufactured either on a FDM (Fused Deposition Modeling, also Fused Filament Fabrication FFF) machine or and SLA (Stereolithography) machine without the necessity to 3 alter the underlying data and models but by selection. This work is structured as follows: Section 1.1 provides information of the objective we accomplish with this review. Section 1.1.1 presents the research methodology applied for this work. In section 1.1.2 we disseminate the sources that were used to gather information for this work. Section 1.2 provides a dissemination of the scientific research in these fields with a discussion on its historical development. Chapter 2 contains sections on key terminology and their definition throughout literature and standards. We present these terms as well as synonyms and provide an alternative definition as a proposal. The Chapter 3 is an exhaustive collection of scientific journals relevant to the domains discussed in this work. We provide an insight in their interconnectedness and their structure. Chapter 4 provides a meta-review on the subject for the reader to get a further reaching understanding of the subject and its relevant components. In Chapter 4.1 we discuss the audience or target group for CM and 3D printing related cloud services. Chapter 5 extends the study by Rayna and Striukova [204] due to the importance of 3D printing related cloud services for the topic at hand. Section 6 provides the information on the concepts, terminology, methods relevant to the subject as they are disseminated in literature. We conclude this work with a summary in Chapter 7. 1.1. Research Objective This review is performed to establish an overview on the concept and implementation of CM and the utilisation of Additive Manufacturing (AM) therein. For the understanding it is required to become familiar with the various definitions available and the problems arising from inconsistent usage of terminology. For this we compile differing definitions on key terminology. With this work we aim to present an overview over the topic of CM, and its current research findings. We furthermore present a summary overview over existing online and cloud based 3D printing services that can either be regarded as implementations of CM or be utilised in CM scenarios. This part is to extend the knowledge on relevant online services and their orientation towards numerous services. With the presentation of the identified journals that cater for AM, DM, RP, RM and 3D printing research we want to provide other researchers with insight into possible publication venues and a starting point for the identification of relevant sources for their own work. The review work of this article has the objective to identify relevant literature and summarise the key and essential findings thereof. The review also is intended to 4 Search Results for Terms from Google Trends (2004 - 2016) 3D printing Additive Manufacturing Cloud Manufacturing 3D Print 100 number of queries 80 60 40 20 9 -2 01 5- 08 -2 7 7 -1 23 20 15 -0 8- 11 -2 01 5- 01 -0 6 20 15 -0 1- 01 -2 01 4- 06 -2 6 20 14 -0 6- 20 -2 01 3- 10 -1 4 20 13 -1 0- 10 -2 01 3- 03 -0 4 320 13 -0 7- 29 -2 01 2- 08 -2 4 12 101 -2 18 20 12 -0 220 11 -1 5- 08 -2 01 1- 05 -1 2 0 -0 10 001 -2 -0 11 20 20 10 -0 9- 26 -2 01 0- 02 -2 1 9 -1 14 20 10 -0 2- 05 -2 00 9- 07 -2 9 7-0 09 20 20 08 -1 1- 23 -2 00 8- 11 -1 8 -2 00 8- 04 -0 7 13 4-0 08 20 20 07 -0 9- 02 -2 00 7- 09 -2 7 -2 00 7- 01 -1 5 21 20 07 -0 1- 11 -2 00 6- 06 -0 6 6-0 06 20 20 05 -1 0- 30 -2 00 5- 11 -2 03 500 -2 20 3-0 05 04 20 20 -0 8- 08 -2 00 4- 08 -1 4 0 source of data: trends.google.com; 3D printing, sum=13816, avg=43.72; AM, sum=983, avg=3.11; CM, sum=217, avg=0.69; 3D print, sum=6060, avg=19.18 Figure 1: Queries for 3D Printing, AM, CM and 3D Print on google.com for 2004–2016 from trends.google.com provide a high level overview on identified research needs that are considered essential for the evolution of AM and CM. 1.1.1. Methodology The first part of this review is the analysis of other reviews in order to establish a foundation of the existing works and to have a baseline for the analysis of the journals catering to this domain. The journals are identified and presented in order to help researchers in finding a suitable publication venue and to present the recent development in this area. The journals are identified by literature research, web searching (see Sect. 1.1.2), and as a result of the review analysis. This review identified its sources by web search for each of the identified topics depicted in the concept map (See Sect. 6.1), where the first 30 results from the search engines (see Sect. 1.1.2) each are scanned first by title, then by their abstract. For the creation of the topological map an iterative process is applied. The process starts with the analysis of the following works [273, 265, 275, 279, 102] which we had prior knowledge of due to previous engagements in this research area. After the analysis a backward- and forward search is performed. 5 The searches for the content of the review are sorted by relevance, according to the search engine operator. The articles are then analysed and its core concepts are presented in this work. The reviews for the meta-review are identified by a web search and data gathered during our review. For the compilation of the definitions an extraction process is employed where the identified literature for the review is basis for information extraction and dissemination. The compilation is expanded by literature and Internet research for the appropriate keywords and concepts. The extension to the study by Rayna and Striukova [204] is performed following the research methodology applied in the original work. 1.1.2. Sources This review is based on scientific literature acquired through the respective publishers and searched for using the following search engines: • Google Scholar1 • SemanticScholar2 • dblp3 • Web of Science4 • ProQuest5 Microsoft Academic Search6 is not used for the search as the quality and number of results is unsatisfactory. Scopus7 is not used for the research, as we have no subscription for it. The search engines differ in the handling of grouping and selection operators (e.g., OR, +). For each search engine the appropriate operators where selected when not explicitly stated otherwise. As a search engine for scientific literature, Google Scholar, yields the most 1 https://scholar.google.com https://semanticscholar.org 3 https://dblp.uni-trier.de 4 https://webofknowledge.com 5 https://proquest.com 6 http://academic.research.microsoft.com 7 https://www.scopus.com 2 6 results but with a high degree of unrelated or otherwise unusable sources, like the Google search engine8 itself. Furthermore, the search engine enforces strict usage rules thus hindering automated querying and usage. Results from patents and citations are excluded from the result set for Google Scholar. SemanticScholar offers a responsive interface, that allows for automated querying through JSON9 , to “millions” of articles10 from computer science - a statement that we can not verify as we have seen articles from other domains too. The dblp project indexes over 333333311 from computer science in a very high quality. Its interface allows for automated and scripted usage. Web of Science provides an index of a large number (over 5612 millions) of scientific works. The entries in the index are of high quality but the interface is rather restrictive. ProQuest also has a very restrictive and non-scriptable interface and contains over 54 million 13 entries in its corpus, among which are historical news articles and dissertations. The quality of the results is high. ProQuest and Web of Science are subscription based services. 1.2. Development in Scientific Publications The significance and maturity of a research area is reflected in the number of publications available. We perform a keyword based analysis utilising the sources described in Section 1.1.2. The searches are performed with a number of relevant keywords (including various technologies and methods for AM) and a restriction of the time period starting from 2002 to 2016. The queries are also restricted on the type of results with an exclusion to citations and patents, where applicable. For a study on the patents and the development of patent registrations for this domain we refer to Park et al. [190]. Caveat: Searching on search engines for specific keywords like clip and lens in their abbreviated form will lead to a number of skewed results from works that are not significant for this body of work. For example the search for “Additive Manufacturing” and LENS yield articles in the results that 8 https://google.com JavaScript Object Notation 10 https://www.semanticscholar.org/faq#index-size 11 News from 2016-05-03: “Today, dblp reached the wonderful ”Schnapszahl” of 3,333,333 publications” 12 A search for publications with its publication date between 1700 and 2100 yields 56998216 results 13 A search for publications with its publication date after 1700 yields 54266680 results 9 7 Classification of Research in Cloud Manufacturing OTHER ENVIRONMENTAL SCIENCES ECOLOGY CHEMISTRY MATERIALS SCIENCE OPERATIONS RESEARCH MANAGEMENT SCIENCE AUTOMATION CONTROL SYSTEMS COMPUTER SCIENCE ENGINEERING 0 10 20 30 40 50 60 percent source of data: webofknowledge.com; n=460 Figure 2: Classification of articles for Cloud Manufacturing; source of data: webofknowledge.com Classification of Research in Additive Manufacturing OTHER FOOD SCIENCE TECHNOLOGY SCIENCE TECHNOLOGY OTHER TOPICS PHYSICS METALLURGY METALLURGICAL ENGINEERING CHEMISTRY ENGINEERING MATERIALS SCIENCE 0 10 20 30 40 50 percent source of data: webofknowledge.com; n=4582 Figure 3: Classification of articles for Additive Manufacturing; source of data: webofknowledge.com are either fabricating (optical) lenses using AM or are about lenses in lasers that are used in AM. In case the result sets are as large as in our case it is not feasible to remove those erroneous results and adjust the result set accordingly. We make the reader aware to only take the given numbers as an indication. In Fig. 2 to Fig. 7 the classification of scientific articles according to Web of Science is shown. The classifications do not add up to 100 percent as the respective articles can be classified in more than one field. In the figures the number of results per search term is also listed. Domains with less than five percent aggregated classification are grouped together as “OTHER”. In Fig. 8 the accumulated prevalence of the terms 3D printing versus Additive Manufacturing (AM) is displayed. For these numbers queries are made for a combination of search terms and restrictions on the time period. The scale of the Y-Axis is logarithmic due to the large differences in the number of results per search engine. The dblp database returned the lowest number 8 Classification of Research in 3D Printing OTHER COMPUTER SCIENCE PHYSICS CHEMISTRY SCIENCE TECHNOLOGY OTHER TOPICS ENGINEERING MATERIALS SCIENCE 0 10 20 30 40 50 60 percent source of data: webofknowledge.com; n=3369 Figure 4: Classification of articles for 3D Printing; source of data: webofknowledge.com Classification of Research in Rapid Manufacturing OTHER SCIENCE TECHNOLOGY OTHER TOPICS METALLURGY METALLURGICAL ENGINEERING AUTOMATION CONTROL SYSTEMS PHYSICS MATERIALS SCIENCE ENGINEERING 0 10 20 30 40 50 60 70 percent source of data: webofknowledge.com; n=496 Figure 5: Classification of articles for Rapid Manufacturing; source of data: webofknowledge.com Classification of Research in Rapid Prototyping OTHER CHEMISTRY AUTOMATION CONTROL SYSTEMS PHYSICS SCIENCE TECHNOLOGY OTHER TOPICS COMPUTER SCIENCE MATERIALS SCIENCE ENGINEERING 0 10 20 30 40 50 percent source of data: webofknowledge.com; n=5393 Figure 6: Classification of articles for Rapid Prototyping; source of data: webofknowledge.com 9 Classification of Research in Rapid Tooling OTHER POLYMER SCIENCE METALLURGY METALLURGICAL ENGINEERING AUTOMATION CONTROL SYSTEMS MATERIALS SCIENCE ENGINEERING 0 10 20 30 40 50 60 70 80 percent source of data: webofknowledge.com; n=394 Figure 7: Classification of articles for Rapid Tooling; source of data: webofknowledge.com of results with results consistently less than 10. Google Scholar yielded the largest number of results with the accumulated number of results for the term AM gaining on the term 3D printing since 2009. In Fig. 9 the prevalence of certain AM or 3D Printing technologies is studied by the number of articles from four different search engines for the respective combination of search terms. The largest number of results are from Google Scholar for search term combinations with “3D Printing”. Furthermore, a generalised search is performed for the terminology “Laser, Lithography and Powder”, e.g., summarising technologies like SLM (Selective Laser Melting), SLS (Selective Laser Sintering), SLA, LOM (Laminated Object Manufacturing), LENS (Laser Engineered Net Shaping) for the term “Laser”. The search for technologies like CLIP and LENS are problematic due to the non-specificity of the terminology as described before (See note 1.2). 2. Definition and Terminology In general the usage of the terminology within this field is very inconsistent. Commonly and colloquially the terms 3D printing and AM are used as synonyms. Analysing the prevalence of either of these terms we find that 3D printing is slightly more prevalent for results of scientific literature with 68164 results for the sources described in Sect. 1.1.2 during the period of 2002–2016. In the same period there are over 59506 results for the term Additive Manufacturing. SemanticScholar provided significantly more results (7072 over 1211) for 3D printing and Web of Science yielded almost four times the number of results for Additive Manufacturing over 3D Printing (1956 results to 578). There is also no clear trend in the usage of either terms. With this section we exemplify this situation and present 10 Comparison of AM and 3D printing over 4 search engines Google: 3D Printing SemanticScholar: 3D Printing dblp: 3D Printing WoS: 3D Printing ProQuest: 3D Printing Google: Additive Manufacturing SemanticScholar: Additive Manufacturing" dblp: Additive Manufacturing WoS: Additive Manufacturing ProQuest: Additive Manufacturing summative number of publications 100000 10000 1000 100 10 16 20 15 20 14 20 13 20 12 20 11 20 10 20 09 20 08 20 07 20 06 20 05 20 04 20 03 20 20 02 1 year source of data: scholar.google.com, semanticscholar.org, dblp.uni-trier.de, webofknowledge.com, progquest.com Figure 8: Comparison of AM and 3D Printing on selected search engines (2002–2016) 11 Google: 3D Printing SemanticScholar: 3D Printing WoS: 3D Printing ProQuest: 3D Printing Google: Additive Manufacturing SemanticScholar: Additive Manufacturing WoS: Additive Manufacturing ProQuest: Additive Manufacturing 15000 10000 5000 s m dl sff ls dm de r y ph ra ho g lit po w se r la jm m 3d p le ns ip cl eb m m fd m lo a sl m sl s 0 sl summative number of publications (2002-2016) Results for Manufacturing Technologies source of data: scholar.google.com, semanticscholar.org, webofknowledge.com, proquest.com Figure 9: Comparison of 3D printing technologies on selected search engines (2002–2016) 12 common definitions throughout literature and standards. We furthermore add our point of view in the form of a critique at the end of the section. 2.1. Additive Manufacturing and 3D Printing In this section we present established definitions for AM and related terminology as presented in literature and standards. 2.1.1. Definitions of Additive Manufacturing AM is most often regarded as an umbrella term for technology and methods for the creation of objects from digital models from scratch. It is usually in contrast to subtractive and formative methods of manufacturing as defined in the standard [1]. It is also commonly a synonym for 3D printing. Gibson et al. [89] define AM as: “Additive manufacturing is the formalised term for what used to be called rapid prototyping and what is popularly called 3D Printing. [...] Referred to in short as AM, the basic principle of this technology is that a model, initially generated using a three-dimensional Computer-Aided Design (3D CAD) system, can be fabricated directly without the need for process planning. [...]” Gebhardt [88] defines AM as: “Als Generative Fertigungsverfahren werden alle Fertigungsverfahren bezeichnet, die Bauteile durch Auf- oder Aneinanderfügen von Volumenelementen (Voxel’n), vorzugsweise schichtweise, automatisiert herstellen.”, which we translate as “As generative/additive manufacturing processes all production processes are referred that produce components automatically by depositioning of volume elements (Voxels), preferably layer-wise”. The VDI directives VDI 3404 (Version 2009 [4] and 2014 [6]) define additive fabrication as: “Additive fabrication refers to manufacturing processes which employ an additive technique whereby successive layers or units are built up to form a model.”. The 2009 directive “VDI-Richtlinie: VDI 3404 Generative Fertigungsverfahren - Rapid-Technologien (Rapid Prototyping) - Grundlagen, Begriffe, Qualitätskenngrößen, Liefervereinbarungen” and the 2014 directive “VDIRichtlinie: VDI 3404 Additive Fertigung - Grundlagen, Begriffe, Verfahrensbeschreibungen” are both currently in retracted states. The also retracted ASTM standard F2792-12a “Standard terminology for additive manufacturing technologies” defines AM as “A process of joining materials to make objects from 3D model data, usually layer upon layer, 13 as opposed to subtractive manufacturing methodologies.” with the following synonyms listed “additive fabrication, additive processes, additive techniques, additive layer manufacturing, layer manufacturing, and freeform fabrication.”. Bechthold et al. [26] define AM as: “The terms additive manufacturing (AM) and 3D printing describe production processes in which a solid 3D structure is produced layer by layer by the deposition of suitable materials via an additive manufacturing machine.” Thomas and Gilbert [242] define AM as: “Additive manufacturing is the process of joining materials to make objects from three-dimensional (3D) models layer by layer as opposed to subtractive methods that remove material. The terms additive manufacturing and 3D printing tend to be used interchangeably to describe the same approach to fabricating parts. This technology is used to produce models, prototypes, patterns, components, and parts using a variety of materials including plastic, metal, ceramics, glass, and composites” Klocke [136] defines AM as: “Generative Verfahren: Diese Verfahrensgruppe umfasst alle Technologien, mit denen eine aufbauende, schichtweise Fertigung von Bauteilen realisiert wird. Sie werden auch als Additive Manufacturing Technologies oder als Layer based Manufacturing Technologies bezeichnet. Zum Herstellen der Schichten wird häufig Laserstrahlung verwendet. [...].” translation “Generative Processes: This process group contains all technologies, with which an additive, layer-wise generation of parts is realised. They are also referred to as additive manufacturing technologies or layer based manufacturing technologies. For the creation of the layers oftentimes laser emission is used. [...]” In the ASTM F2792-12a [5] standard AM is defined as: “process of joining materials to make objects from 3D model data, usually layer upon layer, as opposed to subtractive manufacturing methodologies. Synonyms: additive fabrication, additive processes, additive techniques, additive layer manufacturing, layer manufacturing, and freeform fabrication.” Gao et al. [83] use the term AM and 3D printing synonymously: “Additive manufacturing (AM), also referred to as 3D printing, [...]”. Sames et al. [214] also use the term AM and 3D printing synonymously: “Additive manufacturing (AM), also known as three-dimensional (3D) printing, [...]” Lachmayer and Lippert [140] define AM as: “Das Additive Manufacturing 14 (AM), als Überbegriff für das Rapid Prototyping (RP), das Rapid Tooling (RT), das Direct Manufacturing (DM) und das Rapid Repair (RR) basiert auf dem Prinzip des additiven Schichtaufbaus in x-, y- und z-Richtung zur maschinellen Herstellung einer (Near-) Net-Shape Geometrie” which translates to: “Additive manufacturing as an umbrella term for Rapid Prototyping (RP), Rapid Tooling (RT), Direct Manufacturing (DM) and Rapid Repair (RR) is based on the principle of the additive layer fabrication in x-, y- and z-direction for the fabrication of a (near-) net-shape geometry by machines” The ISO/ASTM Standard 52900:2015(E) [9] defines AM as: “process of joining materials to make parts (2.6.1) from 3D model data, usually layer (2.3.10) upon layer, as opposed to subtractive manufacturing and formative manufacturing methodologies”. 2.1.2. Definitions of 3D Printing According to Gebhardt [88] 3D Printing is a generic term that is synonymous to AM and is replacing the term AM in the future due to its simplicity. Bechtholdt et al. [26] use the terms 3D Printing and AM synonymously as umbrella terms for technologies and applications. In the VDI directive [7] the term 3D printing is used for a certain additive process but it is acknowledged that it is generally used as a synonym for AM. The ASTM standard F2792-12a (retracted) defines 3D printing as “The fabrication of objects through the deposition of a material using a print head, nozzle, or another printer technology.” but also acknowledges the common synonymous use of this term for AM, mostly of low-end quality and price machines. Gibson [89] uses the term 3D Printing for the technology invented by researches at MIT [212] but also acknowledges that it is used synonymously for AM and will eventually replace the term AM due to media coverage. The ISO/ASTM Standard 52900:2015(E) [9] defines 3D Printing as: “fabrication of objects through the deposition of a material using a print head, nozzle, or another printer technology”. It is also noted in this standard that the term 3D printing is often used as a synonym for AM, mostly in non-technical context. Furthermore, it is noted that 3D printing is associated with low price and capability machines. 2.1.3. Definitions of Rapid Prototyping In Hopkinson and Dickens [106] Rapid Prototyping (RP) is defined as: “RP refers to a group of commercially available processes which are used to 15 create solid 3D parts from CAD, from this point onwards these processes will be referred to as layer manufacturing techniques (LMTs)” The VDI directive 3405 defines RP as: “Additive fabrication of parts with limited functionality, but with sufficiently well-defined specific characteristics.” Weber et al. [267] define RP as: “Early AM parts were created for the rapid prototyping market and were first employed as visual aids and presentation models. Many lower cost AM systems are still used in this way.” 2.1.4. Definitions of Rapid Manufacturing Hopkinson et al. [108] define Rapid Manufacturing (RM) as: “the use of a computer aided design (CAD)-based automated additive manufacturing process to construct that are used directly as finished products or components.” Previously Hopkinson and Dickens [106] defined RM as: “Rapid manufacturing uses LMTs for the direct manufacture of solid 3D products to be used by the end user either as parts of assemblies or as stand-alone products.” The VDI directive 3404 Version 2009 [4] defines RM as: “Additive fabrication of end products (often also described as production parts). Characteristics: Has all the characteristics of the end product or is accepted by the customer for “series production readiness”. Material is identical to that of the end product. Construction corresponds to that of the end product.” The VDI directive 3405 [7] defines RM as a synonym for direct manufacturing, which is defined as: “Additive fabrication of end products.” 2.1.5. Definitions of Rapid Tooling King and Tansey [135] define Rapid Tooling (RT) as an extension of RP as such: “Rapid tooling is a progression from rapid prototyping. It is the ability to build prototype tools directly as opposed to prototype products directly from the CAD model resulting in compressed time to market solutions.” The VDI directive 3405 [7] defines RT as: “The use of additive technologies and processes to fabricate end products which are used as tools, moulds and mould inserts.” Weber et al. [267] define RT as: “Another class of applications for AM parts is patterns for tooling or tooling directly made by AM. AM processes can be used to significantly shorten tooling time and are especially useful for low-run production of products.” 16 2.1.6. Definitions of Cloud Manufacturing The work by Li et al. [112] appears to be the first to introduce the concept and definition of Cloud Manufacturing (CM), but unfortunately this article is only available in Chinese and could therefore not be considered. The article is cited by more than 450 publications according to Google Scholar. Wu and Yang [280] define CM as such: “Cloud manufacturing is an integrated supporting environment both for the share and integration of resources in enterprise. It provides virtual manufacturing resources pools, which shields the heterogeneousness and the regional distribution of resources by the way of virtualisation. cloud manufacturing provides a cooperative work environment for manufacturing enterprises and individuals and enables the cooperation of enterprise.” Tao et al. [237] define CM indirectly by the following description: “Cloud manufacturing is a computing and service-oriented manufacturing model developed from existing advanced manufacturing models (e.g. ASP, AM, NM, MGrid) and enterprise information technologies under the support of cloud computing, IoT, virtualisation and service-oriented technologies, and advanced computing technologies” Xu [283] defines CM similar to the NIST definition of CC as: “a model for enabling ubiquitous, convenient, on-demand network access to a shared pool of configurable manufacturing resources (e.g., manufacturing software tools, manufacturing equipment, and manufacturing capabilities) that can be rapidly provisioned and released with minimal management effort or service provider interaction”. This definition is also used in the work by Wang and Xu [266]. Zhang et al. [297] describe CM as: “Cloud manufacturing (CMfg) is a new manufacturing paradigm based on networks. It uses the network, cloud computing, service computing and manufacturing enabling technologies to transform manufacturing resources and manufacturing capabilities into manufacturing services, which can be managed and operated in an intelligent and unified way to enable the full sharing and circulating of manufacturing resources and manufacturing capabilities. CMfg can provide safe, reliable, high-quality, cheap and on-demand manufacturing services for the whole life cycle of manufacturing.” 2.1.7. Synonyms for AM As with the previous definitions for AM, RP, RT, RM and 3D printing there is no consensus in the terminology for synonyms of AM in general. The 17 following synonyms can be found in literature and are used in existing works. • direct layer manufacturing or layer manufacturing or additive layer manufacturing • direct digital manufacturing is a synonym for rapid manufacturing [89] • solid freeform fabrication (SFF), three dimensional printing [267] • 3D printing, Additive Techniques, Layer Manufacturing, and Freeform fabrication [183] • additive fabrication, additive processes, additive techniques, additive layer manufacturing, layer manufacturing, and freeform fabrication [5]14 • “The technical name for 3D printing is additive manufacturing [...]” [154] 2.1.8. Critique The existing definitions fall short on their focus on the layer-wise creation of objects as technologies like LENS and multi-axis (n > 3) are not bound and defined by a layer structure but can regarded as a form of AM as they create objects based on 3D (CAD) models from scratch without any of the characteristics of traditional subtractive or formative fabrication methods. Through a systematic decomposition of the existing definitions of AM we conclude that the basic commonality of AM is described as the creation of a physical object from a digital model by a machine. Furthermore, we propose the term AM as an umbrella term that signifies industrial, commercial or professional application and usage whereas 3D printing can be colloquially used for technologies and methods for the creation of physical objects from 3D (CAD) models in other situations. For the actual building machines of additively manufactured parts we recommend the synonymous use of AM fabricator or 3D printer. The first as it describes the functionality in a precise way and the second as it is commonly used and understood by a broad audience. 14 Also https://wohlersassociates.com/additive-manufacturing.html 18 3. Journals related to the Subject We have identified a number of journals specialising in the domain of AM. In this section we explain their foci and their scientific scope. The following journals cater partially or solely for the academic dissemination of works based in or related to the domains of AM, RM, RP and 3D Printing. These journals are identified using the service of the Directory of Open Access Journals15 , Thomson Reuters Web of Science16 and the articles used for this review. Only journals with indication for AM, RM, RP or 3D Printing in either the title or the scope are listed below. In the following overview the abbreviations EiC for Editor in Chief, ImpactF for Impact Factor and SJR for SCImago Journal Rank Indicator17 are used. The Impact Factor is either acquired from the journal’s home page directly when available or looked up from Thomson Reuters InCites Journal Citation Reports18 . For a number of journals neither a SJR nor the IF could be found. The numbers for the available volumes, issues and articles are directly extracted from the respective journal’s website. The listing contains a full list of all members of the board and editors per journal for an assessment of the interconnection between the various journals. Editors and members of the board that are involved in more than one journal are indicated by italicised text and the indication in which other journal they are involved. The journals are ordered by their number of articles published and if two or more journals have an equal number of publications the ordering is chronological. The journals without publications and age available are sorted by their ISSN. The 20 journals have an accumulated 22616 articles published (respectively 17877 articles, when only considering articles from Journal 2 after it was renamed). The median of the first publication date is 2014. Under the assumption that the articles are published equally since the first Journal (Journal 1) started in 1985, 31 years ago, this results in an average number of 576 articles per year, which accounts for approximately 18 % of the average accumulated results of 3197 scientific works indexed by 15 https://doaj.org http://webofknowledge.com 17 “It expresses the average number of weighted citations received in the selected year by the documents published in the selected journal in the three previous years”, see http: //www.scimagojr.com/SCImagoJournalRank.pdf for more details 18 https://jcr.incites.thomsonreuters.com 16 19 http://scholar.google.com for the time frame of 2002 to 2016 (See also Section 1.1). The information on the journals is accurate as of 2016-08-10 according to the respective websites. 1. The International Journal of Advanced Manufacturing Technology Publisher Springer ISSN 1433-3015 URL http://www.springer.com/engineering/production+engineering/ journal/170/PSE ImpactF 1.568 H-Index 7119 SJR 0.9120 Since 1985 Volumes 85 Issues 432 Articles 11727 EiC Andrew Y. C. Nee (See also Journal 3) Board and Editors 1) Kai Cheng 2) David W. Russell 3) M. S. Shunmugam 4) Erhan Budak 5) D. Ben-Arieh 6) C. Brecher 7) H. van Brussel 8) B. Çatay 9) F. T. S. Chan (See also Journal 3) 10) F. F. Chen 11) G. Chryssolouris 12) Chee Kai Chua (See also Journals 4, 6, 11) 13) M. Combacau 14) A. Crosnier 15) S. S. Dimov 16) L. Fratini 17) M. W. Fu 18) H. Huang 19) V. K. Jain 20) M. K. Jeong 21) P. Ji 22) W.-Y. Jywe 23) R. T. Kumara 24) A. Kusiak 25) B. Lauwers 26) W. B. Lee 27) C. R. Nagarajah 28) E. Niemi 29) D. T. Pham 30) S. G. Ponnambalam 31) M. M. Ratnam 32) V. R. Rao 33) C. Saygin 34) W. Steen 35) D. J. Stephenson 36) M. K. Tiwari (See also Journal 18) 37) E. Vezzetti 38) G. Vosniakos 39) X. Xu (See also Journal 3) 40) Y. X. Yao 41) A. R. Yildiz 42) M. Zoe (See also Journals 7, 12) 43) H.-C. Zhang 44) L. Zhang 45) A.G. Mamalis 2. Journal of Manufacturing Science and Engineering Publisher The American Society of Mechanical Engineers 19 20 http://www.scimagojr.com/journalsearch.php?q=20428&tip=sid&clean=0 http://www.scimagojr.com/journalsearch.php?q=20428&tip=sid&clean=0 20 ISSN 1087-1357 URL http://manufacturingscience.asmedigitalcollection.asme. org/journal.aspx ImpactF 1.087 H-Index 6821 SJR 0.822 Since 1996 Volumes 138 Issues 101 (Since “Journal of Engineering for Industry” was renamed to its current title) Articles 7066 (2327 since the renaming in May 1996) EiC Y. Lawrence Yao Board and Editors 1) Sam Anand 2) Wayne Cai (See also Journal 5) 3) Jaime Camelio 4) Hongqiang Chen 5) Dragan Djurdjanovic 6) Guillaume Fromentin 7) Yuebin Guo 8) Yong Huang (See also Journal 9) 9) Yannis Korkolis 10) Laine Mears 11) Gracious Ngaile (See also Journal 5) 12) Radu Pavel 13) Zhijian Pei 14) Xiaoping Qian 15) Tony Schmitz 16) Jianjun (Jan) Shi 17) Daniel Walczyk 18) Donggang Yao 19) Allen Y. Yi 3. Robotics and Computer-Integrated Manufacturing Publisher Elsevier B.V. ISSN 0736-5845 URL http://www.journals.elsevier.com/robotics-and-computer-integrated-manufa ImpactF 2.077 H-Index 6123 SJR 1.6124 Since 1984–1994, 1996 ongoing Volumes 44 Issues 145 Articles 2191 EiC Andre Sharon Board and Editors 1) M. Haegele 2) L. Wang 3) M. M. Ahmad 4) K. 21 http://www.scimagojr.com/journalsearch.php?q=20966&tip=sid&clean=0 http://www.scimagojr.com/journalsearch.php?q=20966&tip=sid&clean=0 23 http://www.scimagojr.com/journalsearch.php?q=18080&tip=sid&clean=0 24 http://www.scimagojr.com/journalsearch.php?q=18080&tip=sid&clean=0 22 21 Akella 5) H. Asada 6) J. Baillieul 7) T. Binford 8) D. Bossi 9) T. Broughton 10) M. Caramanis 11) F. T. S. Chan (See also Journal 1) 12) G. Chryssolouris 13) J. Deasley 14) S. Dubowsky 15) E. Eloranta 16) K. C. Fan 17) J. Y. H. Fuh (See also Journals 4, 15) 18) J. X. Gao 19) M. Gevelber 20) Y. Ito 21) K. Iwata 22) T. Kanade 23) F. Liu 24) L. Luong 25) K. L. Mak 26) K. McKay 27) A. Meng 28) N. Nagel 29) A. Y. C. Nee (See also Journal 1) 30) G. Reinhardt 31) R. D. Schraft 32) W. P. Seering 33) D. Spath 34) H. C. G. Spur 35) N. Suh 36) M. K. Tiwari 37) H. Van Brussel 38) F. B. Vernadat 39) A. Villa 40) M. Weck 41) H. Worn 42) K. Wright 43) C. Wu 44) X. Xu (See also Journal 1) 4. Rapid Prototyping Journal Publisher Emerald Group Publishing, Ltd ISSN 1355-2546 URL http://www.emeraldinsight.com/loi/rpj ImpactF 1.352 H-Index 4925 SJR 0.8126 Since 1995 Volumes 22 Issues 113 Articles 882 EiC Ian Campbell Board and Editors 1) David Bourell (See also Journals 10, 6) 2) Ian Gibson (See also Journals 8, 6) 3) James Martin 4) Sung-Hoon Ahn 5) Paulo Jorge da Silva Bártolo (See also Journals 17, 6, 11) 6) Deon de Beer 7) Alain Bernard (See also Journals 13, 8, 6) 8) Richard Bibb (See also Journal 11) 9) U. Chandrasekhar 10) Khershed Cooper (See also Journal 10) 11) Denis Cormier (See also Journals 9, 8) 12) Henrique de Amorim Almeida (See also Journal 12) 13) Phill Dickens 14) Olaf Diegel (See also Journal 10) 15) Jerry Fuh (See also Journals 15, 3) 16) Jorge Ramos Grez 17) Chua Chee Kai (See also Journals 1, 6, 11) 18) Jean-Pierre 25 26 http://www.scimagojr.com/journalsearch.php?q=21691&tip=sid&clean=0 http://www.scimagojr.com/journalsearch.php?q=21691&tip=sid&clean=0 22 Kruth 19) Gideon N. Levy 20) Toshiki Niino 21) Eujin Pei (See also Journal 12) 22) B. Ravi 23) David Rosen (See also Journals 10, 9) 24) Monica Savalani 25) Tim Sercombe (See also Journals 8, 15) 26) Brent Stucker (See also Journals 10, 9) 27) Wei Sun (See also Journal 10) 28) Jukka Tuomi 29) Terry Wohlers (See also Journal 10) 5. Journal of Manufacturing Processes Publisher Elsevier B.V. ISSN 1526-6125 URL http://www.journals.elsevier.com/journal-of-manufacturing-processes ImpactF 1.771 H-Index 2427 SJR 1.0928 Since 1999 Volumes 24 Issues 47 Articles 620 EiC Shiv G. Kapoor Board and Editors 1) M. Annoni 2) W. Cai (See also Journal 2) 3) G. Cheng 4) J. Dong 5) Z. Feng 6) G. Y. Kim 7) A. S. Kumar 8) X. Li 9) G. Ngaile (See also Journal 2) 10) S. S. Park 11) M. Sundaram 12) B. Wu 13) H. Yamaguchi Greenslet 14) Y. Zhang 6. Virtual and Physical Prototyping Publisher Taylor & Francis ISSN 1745-2767 URL http://www.tandfonline.com/loi/nvpp20 ImpactF N/A H-Index 1529 SJR 0.4230 27 http://www.scimagojr.com/journalsearch.php?q=27677&tip=sid&clean=0 http://www.scimagojr.com/journalsearch.php?q=27677&tip=sid&clean=0 29 http://www.scimagojr.com/journalsearch.php?q=5800173379&tip=sid&clean= 28 0 30 http://www.scimagojr.com/journalsearch.php?q=5800173379&tip=sid&clean= 0 23 Since 2006 Volumes 11 Issues 42 Articles 294 EiC Paulo Jorge da Silva Bártolo (See also Journals 4, 17, 11), Chee Kai Chua (See also Journals 1, 4, 11) Board and Editors 1) Wai Yee Yeong (See also Journal 11) 2) Alain Bernard (See also Journals 4, 13, 8) 3) Anath Fischer (See also Journal 12) 4) Bopaya Bidanda 5) Cijun Shuai (See also Journal 11) 6) David Bourell (See also Journals 10, 4) 7) David Dean (See also Journal 12) 8) Dongjin Yoo (See also Journal 11) 9) Jack Zhou 10) Ian Gibson (See also Journals 4, 8) 11) Jiankang He (See also Journal 11) 12) John Lewandowski 13) Martin Dunn 14) Ming Leu 15) Peifeng Li 16) Shoufeng Yang (See also Journals 17, 11) 17) Shlomo Magdassi 18) Yong Chen (See also Journal 8) 7. RTejournal Publisher University Library of the FH-Aachen University of applied Science ISSN 1614-0923 URL http://www.rtejournal.de ImpactF N/A H-Index N/A SJR N/A Since 2004 Volumes 13 Issues 13 Articles 155 EiC Andreas Gebhardt Board and Editors 1) Ralf Eckhard Beyer 2) Dietmar Drummer 3) KarlHeinrich Grote 4) Sabine Sändig 5) Gerd Witt (See also Journal 12) 6) Michael Zäh (See also Journals 1, 12) 8. International Journal of Rapid Manufacturing Publisher Inderscience Enterprises Ltd. ISSN 1757-8825 URL http://www.inderscience.com/ijrapidm ImpactF N/A 24 H-Index N/A SJR N/A Since 2009 Volumes 5 Issues 20 Articles 93 EiC Bahram Asiabanpour (See also Journal 13) Board and Editors 1) Ali K. Kamrani 2) Denis Cormier (See also Journals 9, 4) 3) Ismail Fidan 4) Ian Gibson (See also Journals 4, 6) 5) Wei Jun 6) Allan Rennie 7) Joseph J. Beaman Jr. (See also Journal 9) 8) Alain Bernard (See also Journals 4, 13, 6) 9) Georges Fadel 10) Mo Jamshidi 11) Behrokh Khoshnevis (See also Journal 10) 12) John M. Usher 13) Richard A. Wysk 14) Abe Zeid 15) Abdulrahman M. Al-Ahmari 16) Manfredi Bruccoleri 17) Satish T. S. Bukkapatnam 18) Yong Chen (See also Journal 6) 19) Fred Choobineh 20) L. Jyothish Kumar (See also Journals 10, 13) 21) Mehdi Mojdeh 22) Benoit Montreuil 23) Kamran Mumtaz 24) Hossein Tehrani Niknejad 25) Pulak Mohan Pandey (See also Journal 13) 26) Prahalad K. Rao 27) Sa’Ed M. Salhieh 28) Tim Sercombe (See also Journals 4, 15) 29) Kathryn E. Stecke 30) Albert Chi To 31) Shigeki Umeda 32) Omid Fatahi Valilai 33) Nina Vojdani 34) Micky R. Wilhelm 35) Stewart Williams 9. Additive Manufacturing Publisher Elsevier B.V. ISSN 2214-8604 URL http://www.journals.elsevier.com/additive-manufacturing ImpactF N/A H-Index 531 SJR 1.0432 Since 2014 Volumes N/A Issues 12 31 http://www.scimagojr.com/journalsearch.php?q=21100349533&tip=sid& clean=0 32 http://www.scimagojr.com/journalsearch.php?q=21100349533&tip=sid& clean=0 25 Articles 93 EiC Ryan Wicker Board and Editors 1) E. MacDonald 2) M. Perez 3) A. Bandyopadhyay 4) J. Beaman (See also Journal 8) 5) J. Beuth 6) S. Bose 7) S. Chen 8) J. W Choi 9) K. Chou 10) D. Cormier (See also Journals 4, 8) 11) K. Creehan 12) C. Elkins 13) S. Fish 14) D. D. Gu 15) O. Harrysson 16) D. Hofmann 17) N. Hopkinson 18) Y. Huang (See also Journal 2) 19) K. Jurrens 20) K. F. Leong 21) J. Lewis (See also Journal 10) 22) L. Love 23) R. Martukanitz 24) D. Mei 25) R. Resnick (See also Journal 10) 26) D. Rosen (See also Journals 10, 4) 27) C. Spadaccini 28) B. Stucker (See also Journals 10, 4) 29) C. Tuck 30) C. Williams 10. 3D Printing and Additive Manufacturing Publisher Mary Ann Liebert, Inc ISSN 2329-7662 URL http://www.liebertpub.com/overview/3d-printing-and-additive-manufacturin 621 ImpactF N/A H-Index N/A SJR N/A Since 2014 Volumes 3 Issues 10 Articles 86 EiC Skylar Tibbits Board and Editors 1) Hod Lipson 2) Craig Ryan 3) Anthony Atala 4) David Benjamin 5) Lawrence J. Bonassar 6) David Bourell (See also Journals 4, 6) 7) Adrian Bowyer 8) Glen Bull 9) Adam Cohen 10) Khershed P. Cooper (See also Journal 4) 11) Scott Crump 12) Olaf Diegel (See also Journal 4) 13) Richard Hague 14) John F. Hornick 15) Weidong Huang 16) Takeo Igarashi 17) Bryan Kelly 18) Behrokh Khoshnevis (See also Journal 8) 19) Matthias Kohler 20) L. Jyothish Kumar (See also Journals 13, 8) 21) Melba Kurman 22) Jennifer A. Lewis (See also Journal 9) 23) Jos Malda 24) Gonzalo Martinez 25) Neri Oxman 26) Bre Pettis 27) Sharon Collins Presnell 28) Phil Reeves 29) Avi N. Reichental 30) Ralph Resnick (See also Journal 9) 31) David W. Rosen (See also Jour26 nals 9, 4) 32) Jenny Sabin 33) Carolyn Conner Seepersad 34) Brent Stucker (See also Journals 9, 4) 35) Wei Sun (See also Journal 4) 36) Hiroya Tanaka 37) Thomas Toeppel 38) Peter Weijmarshausen 39) Terry Wohlers (See also Journal 4) 11. International Journal of Bioprinting Publisher Whioce Publishing Pte Ltd ISSN 2424-8002 URL http://ijb.whioce.com/index.php/int-j-bioprinting ImpactF N/A H-Index N/A SJR N/A Since 2015 Volumes 2 Issues 3 Articles 31 EiC Chee Kai Chua (See also Journals 1, 4, 6) Board and Editors 1) Wai Yee Yeong (See also Journal 6) 2) Aleksandr Ovsianikov (See also Journal 17) 3) Ali Khademhosseini (See also Journal 15) 4) Boris N. Chichkov (See also Journal 17) 5) Charlotte Hauser 6) Cijun Shuai (See also Journal 6) 7) Dong Jin Yoo (See also Journal 6) 8) Frederik Claeyssens 9) Geun Hyung Kim 10) Giovanni Vozzi (See also Journals 17, 15) 11) Ibrahim Tarik Ozbolat 12) Jiankang He (See also Journal 6) 13) Lay Poh Tan 14) Makoto Nakamura 15) Martin Birchall 16) Paulo Jorge Da Silva Bartolo (See also Journals 17, 4, 6) 17) Peter Dubruel 18) Richard Bibb (See also Journal 4) 19) Roger Narayan (See also Journals 20, 15) 20) Savas Tasoglu (See also Journals 17, 15) 21) Shoufeng Yang (See also Journals 6, 17) 22) Vladimir Mironov 23) Xiaohong Wang 24) Jia An 12. Progress in Additive Manufacturing Publisher Springer ISSN 2363-9520 URL http://www.springer.com/engineering/production+engineering/ journal/40964 ImpactF N/A H-Index N/A 27 SJR N/A Since 2016 Volumes 1 Issues 1 Articles 14 EiC Martin Schäfer, Cynthia Wirth Board and Editors 1) Henrique A. Almeida (See also Journal 4) 2) David Dean (See also Journal 6) 3) Fernando A. Lasagni 4) Eujin Pei (See also Journal 4) 5) Jan Sehrt 6) Christian Seidel 7) Adriaan Spierings 8) Xiaoyong Tian 9) Jorge Vilanova 10) Anath Fischer (See also Journal 6) 11) Russell Harris 12) Dachamir Hotza 13) Bernhard Müller 14) Nahum Travitzky 15) Gerd Witt (See also Journal 7) 16) Michael Friedrich Zäh (See also Journals 7, 1) 13. International Journal on Additive Manufacturing Technologies Publisher Additive Manufacturing Society of India ISSN 2395-4221 URL http://amsi.org.in/homejournal.html ImpactF N/A H-Index N/A SJR N/A Since 2015 Volumes 1 Issues 1 Articles 7 EiC Pulak M. Pandey (See also Journal 8), David Ian Wimpenny, Ravi Kumar Dwivedi Board and Editors 1) L. Jyothish Kumar (See also Journals 10, 8) 2) Keshavamurthy D. B. 3) Khalid Abdelghany 4) Suman Das 5) Alain Bernard (See also Journals 4, 8, 6) 6) C. S. Kumar 7) Bahram Asiabanpour (See also Journal 8) 8) K. P. Raju Rajurkar 9) Ehsan Toyserkani 10) Wan Abdul Rahman 11) Sarat Singamneni 12) Vijayavel Bagavath Singh 14. 3D Printing in Medicine Publisher Springer ISSN 2365-6271 URL http://www.springer.com/medicine/radiology/journal/41205 28 ImpactF N/A H-Index N/A SJR N/A Since 2015 Volumes 2 Issues 4 Articles 3 EiC Frank J. Rybicki Board and Editors 1) Leonid L. Chepelev 2) Andy Christensen 3) Koen Engelborghs 4) Andreas Giannopoulos 5) Gerald T. Grant 6) Ciprian N. Ionita 7) Peter Liacouras 8) Jane M. Matsumoto 9) Dimitrios Mitsouras 10) Jonathan M. Morris 11) R. Scott Rader 12) Adnan Sheikh 13) Carlos Torres 14) Shi-Joon Yoo 15) Nicole Wake 16) William Weadock 15. Bioprinting Publisher Elsevier B.V. ISSN 2405-8866 URL http://www.journals.elsevier.com/bioprinting ImpactF N/A H-Index N/A SJR N/A Since 2016 Volumes 1 Issues N/A Articles 1 EiC A. Atala Board and Editors 1) S. V. Murphy 2) T. Boland 3) P. Campbell 4) U. Demirci (See also Journal 17) 5) B. Doyle 6) J. Fisher 7) J. Y. H. Fuh (See also Journals 4, 3) 8) A. K. Gaharwar 9) P. Gatenholm 10) K. Jakab 11) J. Jessop 12) A. Khademhosseini (See also Journal 11) 13) S. J. Lee 14) I. Lelkes 15) J. Lim 16) A. G. Mikos 17) R. Narayan (See also Journals 20, 11) 18) T. Sercombe (See also Journals 4, 8) 19) A. Skardal 20) S. Tasoglu (See also Journals 17, 11) 21) D. J. Thomas 22) G. Vozzi (See also Journals 17, 11) 23) I. Whitaker (See also Journal 17) 24) S. K. Williams II 16. 3D Printing – Science and Technology 29 Publisher DE GRUYTER OPEN ISSN 1896-155X URL http://www.degruyter.com/view/j/3dpst ImpactF N/A H-Index N/A SJR N/A Since 2016 Volumes 0 Issues 0 Articles 0 EiC Haim Abramovich Board and Editors 1) Christopher A. Brown 2) Paolo Fino 3) Amnon Shirizly 4) Frank Walther 5) Kaufui Wong 17. Journal of 3D Printing in Medicine Publisher Future Medicine Ltd ISSN 2059-4755 URL http://www.futuremedicine.com/page/journal/3dp/editors. jsp ImpactF N/A H-Index N/A SJR N/A Since 2016 Volumes 0 Issues 0 Articles 0 EiC Dietmar W Hutmacher Board and Editors 1) Peter Choong 2) Michael Schuetz 3) Iain S. Whitaker (See also Journal 15) 4) Shoufeng Yang (See also Journals 6, 11) 5) Paulo Jorge Bártolo (See also Journals 4, 6, 11) 6) Luiz E. Bertassoni 7) Faiz Y. Bhora 8) Boris N. Chichkov (See also Journal 11) 9) Utkan Demirci (See also Journal 15) 10) Michael Gelinsky 11) Ruth Goodridge 12) Robert E. Guldberg 13) Scott J. Hollister 14) Zita M. Jessop 15) Jordan S. Miller 16) Adrian Neagu 17) Aleksandr Ovsianikov (See also Journal 11) 18) Katja Schenke-Layland 19) Ralf Schumacher 20) Jorge Vicente Lopes da Silva 21) Chris Sutcliffe 22) Savas Tasoglu (See also Journals 15, 11) 23) Daniel Thomas 24) Martijn van Griensven 25) Giovanni 30 Vozzi (See also Journals 15, 11) 26) David J. Williams 27) Chris J. Wright 28) Jing Yang 29) Nizar Zein 18. Smart and Sustainable Manufacturing Systems Publisher ASTM ISSN N/A URL http://www.astm.org/SSMS ImpactF N/A H-Index N/A SJR N/A Since 2017 Volumes 0 Issues 0 Articles 0 EiC Sudarsan Rachuri Board and Editors 1) Darek Ceglarek 2) Karl R. Haapala 3) Yinlun Huang 4) Jacqueline Isaacs 5) Sami Kara 6) Soundar Kumara 7) Sankaran Mahadevan 8) Lihong Qiao 9) Roberto Teti 10) Manoj Kumar Tiwari (See also Journal 1) 11) Shozo Takata 12) Tetsuo Tomiyama 13) Li Zheng 14) Fazleena Badurdeen 15) Abdelaziz Bouras 16) Alexander Brodsky 17) LiYing Cui 18) Bryony DuPont 19) Sebti Foufou 20) Pasquale Franciosa 21) Robert Gao 22) Moneer Helu 23) Sanjay Jain 24) I. S. Jawahir 25) Sagar V. Kamarthi 26) Jay Kim 27) Minna Lanz 28) Kincho H. Law 29) Mahesh Mani 30) Raju Mattikalli 31) Michael W. McKittrick 32) Shreyes N. Melkote 33) P. V. M. Rao 34) Utpal Roy 35) Christopher J. Saldana 36) K. Senthilkumaran 37) Gopalasamudram R. Sivaramakumar 38) Eswaran Subrahmanian 39) Dawn Tilbury 40) Conrad S. Tucker 41) Anahita Williamson 42) Paul William Witherell 43) Lang Yuan 44) Rakesh Agrawal 45) Dean Bartles 46) Gahl Berkooz 47) Jian Cao 48) S. K. Gupta 49) Timothy G. Gutowski 50) Gregory A. Harris 51) Rob Ivester 52) Mark Johnson 53) Thomas Kurfess 54) Bahram Ravani 55) William C. Regli 56) S. Sadagopan 57) Vijay Srinivasan 58) Ram D. Sriram 59) Fred van Houten 60) Albert J. Wavering 19. Powder Metallurgy Progress Publisher DE GRUYTER OPEN 31 ISSN 1339-4533 URL http://www.degruyter.com/view/j/pmp ImpactF N/A H-Index N/A SJR N/A Since N/A Volumes 0 Issues 0 Articles 0 EiC Beáta Ballóková Board and Editors 1) Katarı́na Ondrejová 2) Herbert Danninger 3) Eva Dudrová 4) Marco Actis Grande 5) Abolghasem Arvand 6) Csaba Balázsi 7) Sergei M. Barinov 8) Frank Baumgärtner 9) Paul Beiss 10) Sigurd Berg 11) Michal Besterci 12) Jaroslav Briančin 13) Francisco Castro 14) Andrzej Cias 15) Ján Dusza 16) Juraj Ďurišin 17) Štefan Emmer 18) Sergei A. Firstov 19) Christian Gierl-Mayer 20) Eduard Hryha 21) Pavol Hvizdoš 22) Jan Kazior 23) Jacob Kübarsepp 24) Alberto Molinari 25) John R. Moon 26) Ľudovı́t Parilák 27) Doan Dinh Phuong 28) Raimund Ratzi 29) Wolf D. Schubert 30) František Simančı́k 31) Marin Stoytchev 32) Andrej Šalak 33) José M. Torralba 34) Andrew S. Wronski 35) Timothy Martin 36) Radovan Bureš 20. 3D-Printed Materials and Systems Publisher Springer ISSN 2363-8389 URL http://www.springer.com/materials/journal/40861 ImpactF N/A H-Index N/A SJR N/A Since N/A Volumes 0 Issues 0 Articles 0 EiC Roger J. Narayan (See also Journals 15, 11) Board and Editors 1) Vipul Dave 2) Mohan Edirisinghe 3) Sungho Jin 4) Soshu Kirihara 5) Sanjay Mathur 6) Mrityunjay Singh 7) Pankaj Vadgama 32 Furthermore, the following journals are identified from the literature relevant to this review. Journals catering specifically or explicitly to AM, RM, RP and 3D printing are listed above. The list contains only journals with more than 2 publications. The goal for composing this list is to enable other researches to identify possible publication venues for their work. The list is sorted by the number of publications in our bibliography for each identified journal. The number of each entry indicates the number of publications for the journal. 11 The International Journal of Advanced Manufacturing Technology (See Journal 1) 11 Rapid Prototyping Journal (See Journal 4) 7 Computer-Aided Design33 , ISSN: 0010-4485 6 Robotics and Computer-Integrated Manufacturing (See Journal 3) 6 Journal of Manufacturing Science and Engineering (See Journal 2) 5 Journal of Materials Processing Technology34 , ISSN: 0924-0136 4 International Journal of Computer Integrated Manufacturing35 , ISSN: 1362-3052 4 CIRP Annals - Manufacturing Technology36 , ISSN: 0007-8506 3 Journal of Manufacturing Systems37 , ISSN: 0278-6125 3 Computers in Industry38 , ISSN: 0166-3615 2 Virtual and Physical Prototyping (See Journal 6) 2 Proceedings of the Institution of Mechanical Engineers, Part B: Journal of Engineering Manufacture39 , ISSN: 2041-2975 33 http://www.journals.elsevier.com/computer-aided-design http://www.journals.elsevier.com/journal-of-materials-processing-technology 35 http://www.tandfonline.com/toc/tcim20/current 36 http://www.journals.elsevier.com/cirp-annals-manufacturing-technology 37 http://www.journals.elsevier.com/journal-of-manufacturing-systems 38 http://www.journals.elsevier.com/computers-in-industry 39 http://pib.sagepub.com 34 33 2 Journal of Intelligent Manufacturing40 , ISSN: 1572-8145 2 International Journal of Production Research41 , ISSN: 1366-588X 2 International Journal of Machine Tools and Manufacture42 , ISSN: 08906955 2 IEEE Transactions on Industrial Informatics43 , ISSN: 1551-3203 2 Enterprise Information Systems44 , ISSN: 1751-7583 2 Applied Mechanics and Materials45 , ISSN: 1662-7482 2 Advanced Materials Research46 , ISSN: 1662-8985 4. Reviews on the Subject The topic of AM in general and its special applications, technologies and directions is extensively researched and results published in literature. The growth of the number of publications as found by Google Scholar and Proquest is illustrated in the following figures (See Fig. 10 and Fig. 11). An analysis of literature within this domain from sources (See Sect. 1.1.2) for scientific literature shows an increase in the number of published works from 2002 to 2016 of 41.3 % on average (See Fig. 10), respectively 26.1 % for the search engine Proquest. This number is from the average of the average growth of results found for keywords related to specific AM topics and AM related literature in general from http://scholar.google.com. In this section we will present the findings of the analysis of available data on the scientific publications. Specific aspects of AM, 3D printing and associated areas are topic of a number of reviews listed below. The list of reviews is compiled by searching on the previously mentioned search engines (See sect. 1.1.2) using a keyword 40 http://link.springer.com/journal/10845 http://www.tandfonline.com/toc/tprs20/current 42 http://www.journals.elsevier.com/international-journal-of-machine-tools-and-manufacture 43 http://ieeexplore.ieee.org/xpl/RecentIssue.jsp?punumber=9424 44 http://www.tandfonline.com/toc/teis20/current 45 http://www.scientific.net/AMM 46 http://www.scientific.net/AMR 41 34 Average number of publications per year (Google Scholar) Average annual growth 128 112 10000 96 8000 80 6000 64 48 4000 32 2000 16 16 15 20 14 20 13 20 12 20 11 20 10 20 09 20 08 20 07 20 06 20 05 20 04 20 20 20 03 0 02 0 percent; avg=41.32 144 12000 20 publications; avg=3196.81 Average number of publications 14000 period source of data: scholar.google.com Figure 10: Average number of publications and annual average growth for the combined results from scholar.google.com for 2002–2016 Average number of publications per year (ProQuest) Average annual growth 117 99 6000 81 4000 63 45 2000 27 9 0 percent; avg=26.14 135 8000 6 5 20 1 4 20 1 3 20 1 2 20 1 1 20 1 0 20 1 9 20 1 8 20 0 7 20 0 6 20 0 5 20 0 20 0 4 20 0 20 0 20 0 3 -9 2 publications; avg=441.93 Average number of publications period source of data: proquest.com Figure 11: Average number of publications and annual average growth for the combined results from proquest.com for 2002–2016 35 search. The keywords are “3D Printing” +Review/Survey/“State of the Art”, “Additive Manufacturing” +Review/Survey“State of the Art”, “Rapid Manufacturing” +Review/Survey“State of the Art”. The time range for the search for reviews is restricted from 2005 to 2016. Following this literature search a backward search on the results is performed. From the 70 reviews identified we calculate the average number of authors per review to be 3.3 with an average length of 15.2 pages. The list is sorted chronologically with the general theme or domain of the review provided. 1. Dimitar Dimitrov, Kristiaan Schreve and N. de Beer [61]; General Introduction, Applications, Research Issues 2. Vladimir Mironov, Nuno Reis and Brian Derby [172]; Bioprinting, Technology 3. Ben Utela et al. [252]; New Material Development (Mainly Powders) 4. Abbas Azari and Sakineh Nikzad [21]; Dentistry, Applications in Dentistry 5. Hongbo Lan [143]; Rapid Prototyping, Manufacturing Systems 6. Daniel Eyers and Krassimir Dotchev [72]; Rapid Manufacturing, Mass Customisation 7. Ferry P. W. Melchels, Jan Feijen and Dirk W. Grijpma [170]; Stereolithography, Biomedical Engineering 8. Fabian Rengier et al. [207]; Medicine, Data Acquisition (Reverse-Engineering) using Image Data 9. R. Sreenivasan, A. Goel and D. L. Bourell [227]; Energy Consumption, Sustainability 10. Rupinder Singh [224]; Rapid Prototyping, Casting 11. R. Ian Campbell, Deon J. de Beer and Eujin Pei [44]; Application and Development of AM in South Africa 12. Benjamin Vayre, Frédéric Vignat and François Villeneuve [256]; Metal Components, Technology 36 13. Dongdong Gu et al. [93]; Metal Components, Technology, Terminology 14. Ferry P. W. Melchels et al. [169]; Medicine, Tissue and Organ Engineering 15. Kaufui V. Wong and Aldo Hernandez [271]; General, Technology 16. Lawrence E. Murr et al. [182]; Metal Components, EBM, Laser Melting 17. Shawn Moylan et al. [179]; Quality, Test Artifacts 18. Timothy J. Horn and Ola L. A. Harrysson [109]; General, Applications, Technology 19. Xibing Gong, Ted Anderson and Kevin Chou [90]; EBM, Powder Based AM 20. Flavio S. Fogliatto, Giovani J.C. da Silveira and Denis Borenstein [77]; Mass-Customization 21. K. P. Karunakaran et al. [125]; Rapid Manufacturing, Metal Object Manufacturing 22. Carl Schubert, Mark C. van Langeveld and Larry A. Donoso [217]; General 23. Irene J. Petrick and Timothy W. Simpson [195]; Economics, Business 24. Iulia D. Ursan, Ligia Chiu and Andrea Pierce [251]; Pharmaceutical Drug Printing 25. Jasper Cerneels et al. [47]; Thermoplastics 26. Mohammad Vaezi, Hermann Seitz and Shoufeng Yang [253]; MicroStructure AM 27. Nannan Guo and Ming C. Leu [97]; General, Technology, Materials, Applications 28. Olga Ivanova, Christopher Williams and Thomas Campbell [118]; NanoStructure AM 29. Robert Bogue [30]; General 37 30. Samuel H. Huang et al. [113]; Socio-Ecological and Economy 31. Zicheng Zhu et al. [305]; Hybrid Manufacturing 32. Dazhong Wu et al. [272]; Cloud Manufacturing 33. Bethany C. Gross et al. [92]; Biotech, Chemistry 34. Brett P. Conner et al. [57]; Classification, Object Complexity 35. Brian N. Turner, Robert Strong and Scott A. Gold [248]; Thermoplastics, Physical Properties 36. David W. Rosen [210]; Design for Additive Manufacturing 37. Dimitris Mourtzis, Michael Doukas and Dimitra Bernidaki [178]; Simulation 38. Douglas S. Thomas and Stanley W. Gilbert [242]; Economy, Cost 39. Gustavo Tapia and Alaa Elwany [239]; Process Monitoring, Quality 40. Hae-Sung Yoon et al. [291]; Energy Consumption 41. Jan Deckers, Jef Vleugels and Jean-Pierre Kruth [59]; Ceramics AM 42. Rouhollah Dermanaki Farahani, Kambiz Chizari and Daniel Therriault [74]; Micro-Structure AM 43. Siavash H. Khajavi, Jouni Partanen and Jan Holmström [131]; Supply Chain, Application 44. William E. Frazier [79]; Metal Components 45. Wu He and Lida Xu [102]; Cloud Manufacturing 46. Syed Hasan Massod [163]; Fused Deposition Modeling (FDM) 47. Brian N. Turner and Scott A Gold [247]; Thermoplastic AM, Material Properties 48. Carlos Mota et al. [177]; Medicine, Tissue Engineering 49. C. Y. Yap et al. [290]; SLM 38 50. Donghong Ding et al. [62]; Metal Components, Wire Fed Processes 51. Adamson et al.[11]; Cloud Manufacturing, Terminology 52. Jie Sun et al. [231]; Food Printing, Technology 53. Jin Choi et al. [54]; 4D Printing 54. K. A. Lorenz et al. [158]; Hybrid Manufacturing 55. Merissa Piazza and Serena Alexander [197]; General, Terminology, Academic 56. Omar A. Mohamed, Syed H. Masood and Jahar L. Bhowmik [176]; Process Parameter Optimization (FDM) 57. Seyed Farid Seyed Shirazi et al. [220]; Tissue Engineering, Powder Based AM 58. Sheng Yang and Yaoyao Fiona Zhao [288]; Design for AM, Complexity 59. Sofiane Guessasma et al. [95]; Design for AM, Process Parameter Optimization 60. Wei Gao et al. [83]; General, Technology, Engineering 61. Yong Huang et al. [115]; General, Technology, Research Needs 62. Zhong Xun Khoo et al. [133]; Smart Materials, 4D Printing 63. Hammad H. Malik et al. [162]; Medicine, Surgery 64. Jie Sun et al. [232]; Food Printing 65. Behzad Esmaeilian, Sara Behdad and Ben Wang [71]; Manufacturing 66. H. Bikas, P. Stavropoulos and G. Chryssolouris [28]; General, Technology 67. Julien Gardan [84]; Technology, Engineering, Manufacturing 68. Swee Leong Sing et al. [223]; Metal Components, Medicine, Implants, Materials 39 69. William J. Sames et al. [214]; Metal Components, Materials 70. Andrew J. Pinkerton [198]; Laser-technology 4.1. Stakeholder Distinction Different 3D printing technologies, machines and manufacturers as well as services target different clients for which we propose the following classification. Generally the discerning factors are 1. cost per machine 2. quality of print (e.g., surface quality, physical properties of object) 3. reliability of machine and 4. materials available. From literature the three classes of audience are apparent: • consumer/end user • professional user • industrial application For the consumer a very important factor is the cost of the printer itself with 45 % of consumers are not willing to pay more than $US 299 for a 3D printer [164]. In recent years the price of entry level consumer 3D printers, especially for build-kits, decreased to about $US 30047 . Open-source projects like RepRap have contributed to the decline of costs for these machine [225]. In Fig. 12 we differentiate between the user groups of end-users/consumer, professional users and industrial users. Industrial users rely on high quality available with a large selection of processable materials. Machines for these users are expensive and out of reach of most end-users and professional users. The quality these machines produce is very high and the objects can be used for integration in a product or be a product themselves. Due to these restrictions the availability of such machines is not very wide spread but limited to highly specialised enterprises. On the other end of the spectrum the end-user/consumer has a large choice of 3D printers to select from, they are relatively inexpensive, produce objects of acceptable quality, work on a much lower number materials (typically thermoplastics) and have a reliability that is lower than the reliability 47 XYZPrinting da Vinci Jr. 1.0, XYZprinting-Vinci-Jr-1-0-Printer $US 297.97, 40 https://www.amazon.com/ of professional equipment. In the middle of the spectrum we see professional users, e.g., from design bureaus or architects, that use such machines in a professional manner, draw benefits from the usage of such technology but it is mostly not their main concept of business. In an example, an architect makes use of a 3D printer for the creation of a high-quality model of a building he designed, which is faster and easier than making such a model by hand. Reliability Material Availability Consumer Professional Industrial Cost per Machine Quality Availabilty Figure 12: Audience classification and Expectations 5. 3D Printing Services There are numerous dedicated 3D printing services available to end-users, professionals and industrial users. They differ in the clients they address, the services they offer, the quality they can provide and the cost they charge. In this section we give an overview of a selection of available 3D printing services. The list is not conclusive as a number of enterprises does offer 3D printing services in their portfolio but they are not necessarily to be considered 3D printing services due to either their local mode of operation or the number of 3D printers the user can chose from. This overview is closely based on the work of [204] and extends its findings. We use the following list of properties to distinguish the services: • The target group (End-users, industrial users or professional users) • The local reach (Local or global) 41 • Availability of an API • Services rendered (Design, 3D printing, marketplace, other) Rayna and Striukova [204] base their exploratory study on the following list of services they have identified. For the original list of services we add the following information. • 3D Burrito48 - Pre-Launch Phase • 3D Creation Lab49 • 3DLT50 - Shut down on 2015-12-31 • 3DPrintUK51 • Additer.com52 - Unreachable • Cubify Cloud53 - Acquired by 3D Systems, Service no longer available • i.Materialise54 • iMakr55 • Kraftwürx.com56 • MakerBot/Thingiverse57 • MakeXYZ58 • Ponoko59 48 http://3dburrito.com http://www.3dcreationlab.co.uk 50 http://3dlt.com 51 https://www.3dprint-uk.co.uk 52 http://additer.com 53 http://cubify.com 54 https://i.materialise.com/ 55 http://imakr.co.uk 56 http://www.kraftwurx.com 57 http://thingiverse.com 58 https://www.makexyz.com 59 https://www.ponoko.com/ 49 42 • Sculpteo60 • Shapeways61 For this study we extend the selection with the additional services listed in Tabs. 1 and . 2. Services omitted in these two tables are described in the original study. In contrast to the authors of the original work we think that an exhaustive list of such services is impossible to compile as a large number of local businesses do offer 3D printing services over the Internet and would therefore qualify to be included in such a list. These (local) businesses are hard to identify due to their limited size and reach. Also, an exhaustive list would need to contain 3D printing services and repositories of which many similar and derivative services exist. Further, we extend the classification and study to the provisioning of an API by the respective service. An API should provide methods to use the service programmatically. With an API such printing services can be used as a flexible production means in CM settings. The range of functionality of such APIs can vary significantly and range from the possibility of having a widget displayed on a website with a 3D model viewer, to upload and store digital models in a repository, request quotes for manufacturing or digital fabrication. A commonality for these APIs is the requirement for the thirdparty user to have an account with the service, which is indicated in Tabs. 3 and 4 by Implementer in the column Required for registration. The indication User in this column indicates that the user must be registered with this service too. The implementer registration is intended for scenarios where the API is embedded in a service or website that a third party user then uses. The findings of this study are presented in Tabs. 3 and 4, where we state whether the service provides an API and if it is publicly available or only accessible for business partners, who needs to be registered for the usage of the API and what capabilities the API provides (See Tab. 5). This explorative extension study is performed as described by the original authors. 60 61 https://www.sculpteo.com http://www.shapeways.com/ 43 Table 1: 3D printing platforms and services included in this study – Part 1 Company/Service Name URL 3Faktur http://3faktur.com 3DaGoGo 3DExport 3DHubs 3DPrinterOS 3DShook 3D Warehouse Autodesk 123D Clara.io CreateThis Cults Grabcad La Poste Libre3D Makershop ClassificationEstablished Locati Modeling 2014 Germa Service https://www.3dagogo.com Marketplace 2013 USA https://3dexport.com Marketplace, 2004 USA Repository http://3dhubs.com Crowd 2013 USA Printing Provider https://www.3dprinteros.com Crowd 2014 USA Printing Provider http://www.3dshook.com Marketplace, 2014 Israel Subscription Service https://3dwarehouse.sketchup.com Marketplace, 2006 USA Community, Repository http://www.123dapp.com Software, 2009 USA Marketplace, Repository https://clara.io Repository, 2013 Canad Modeling http://www.createthis.com Marketplace 2013 USA France https://cults3d.com Marketplace, 2013 Repository, Design Service https://grabcad.com Software, 2009 USA Marketplace, Repository http://impression3d.laposte.fr Print 2013 France Provider, 44 Marketplace http://libre3d.com Marketplace, 2014 USA Repository https://www.makershop.co Marketplace, 2013 USA Repository Table 2: 3D printing platforms and services included in this study – Part 2 Company/Service Name NIH 3D Print Exchange URL http://3dprint.nih.gov p3d.in Pinshape REPABLES Rinkak https://p3d.in https://pinshape.com http://repables.com https://www.rinkak.com shapeking http://www.shapeking.com Shapetizer https://www.shapetizer.com Sketchfab https://sketchfab.com stlfinder http://www.stlfinder.com STLHive http://www.stlhive.com Stratasys Direct Express https://express.stratasysdirect.com Threeding https://www.threeding.com Tinkercad https://www.tinkercad.com Treatstock https://www.treatstock.com 45 trinckle https://www.trinckle.com Trinpy https://www.trinpy.com Classification CoCreation, Repository Modeling Marketplace Repository Marketplace, Repository, Crowd Printing Provider Marketplace, Repository Marketplace, Repository, Print Provider Marketplace, Repository Search Engine Marketplace, Repository, Design Service Print Provider Marketplace, Print Provider Design, Repository Marketplace, Community, Crowd Printing Provider Print Provider Marketplace, Table 3: 3D printing platforms and services and their APIs - Part 1 Company / Service Name 3Faktur 3DaGoGo 3DExport 3DHubs 3DPrinterOS 3DPrintUK 3DShook 3D Creation Lab 3D Warehouse Autodesk 123D Clara.io CreateThis Cults Grabcad iMakr i.Materialise Kraftwürx.com La Poste Libre3D MakerBot / Thingiverse Makershop MakeXYZ Materflow MeltWerk Provides Required Capabilities Reach Target Group an API for registration No N/A N/A Regional Consumer No N/A N/A Global Consumer No N/A N/A Global Consumer + Professional Yes Implementer Upload Global Consumer + User No N/A N/A Global Consumer No N/A Global Consumer No N/A N/A Global Consumer No N/A N/A Global Consumer No N/A N/A Global Consumer N/A No N/A Global Consumer Yes Implementer Upload, Global Consumer + Professional Modify, Retrieve No N/A N/A Global Consumer Yes Implementer View, Global Consumer (not Republic) trieve No N/A N/A Global Consumer + Professional No N/A N/A Global Consumer Yes Implementer Upload, Global Consumer + Professional Quoting, Order Yes Implementer Upload, Global Consumer (not Order public) No N/A N/A Regional Consumer No N/A N/A Global Consumer Yes Implementer Upload, Global Consumer Retrieve Yes Implementer Search, Global Consumer + Professional 46 Retrieve Yes Implementer Order Global Consumer + Professional + User No N/A N/A Global Consumer Yes Implementer Upload, Global Consumer Table 4: 3D printing platforms and services and their APIs - Part 2 Company / Service Name NIH 3D Print Exchange p3d.in Pinshape Ponoko REPABLES Rinkak Sculpteo shapeking Shapetizer Shapeways Sketchfab stlfinder STLHive Stratsys Direct Express Threeding Tinkercad Treatstock trinckle Trinpy TurboSquid UPS Yeggi Provides Required Capabilities Reach an API for registration Yes Implementer Upload, Global Retrieve No N/A N/A Global No N/A N/A Global No N/A N/A Global No N/A N/A Global Yes Implementer View, Global Order, Modeling Yes Implementer Upload, Global + User Retrieve, Quoting, Order No N/A N/A Global No N/A Global N/A Yes Implementer Upload, Global + User Quoting, Order Yes Implementer Upload, Global View No N/A N/A Global No N/A N/A Global No N/A N/A Regional No N/A N/A Global No N/A N/A Global Yes Implementer Upload, Global Retrieve 47 No N/A N/A Global No N/A N/A Global No N/A N/A Global No N/A N/A Regional Yes Implementer Search, Global Re- Target Group Consumer Consumer Consumer Consumer Consumer Consumer Consumer + Professional Consumer Consumer Consumer + Professional Consumer Consumer Consumer + Professional Professional Consumer Consumer Consumer Consumer + Professional Consumer Consumer + Professional Consumer Consumer Table 5: Categorising 3D printing online platforms Company / Service Name Design Design marreposiket tory place 3Faktur 3DaGoGo + 3DExport + 3DHubs 3DPrinterOS 3DPrintUK 3DShook + 3D Creation Lab 3D Ware- + house Autodesk + 123D Clara.io + CreateThis + Cults + Grabcad + iMakr i.Materialise + Kraftwürx.com + La Poste + Libre3D + MakerBot + / Thingiverse Makershop + MakeXYZ Materflow + MeltWerk MyMiniFactory + NIH 3D + Print Exchange p3d.in + Pinshape + Ponoko REPABLES + Rinkak + Sculpteo Design Printing Printing Printer Crowd sermarket service sale sourcvice place ing platform + + Editor + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + p + + + + + p + + + + + + + + + + + + + + 48 + + + + + + + As analysed in Tab. 5, the services surveyed offer a different range of services each. No provider could be identified that offers a complete set of service for 3D printing and related tasks. In the table, the indication of p marks companies that do not themselves offer printers through this service but their parental companies do. The o character in the column for printing service for Tinkercad and YouMagine, indicates that the service itself does not render printing services, but has a cooperation with a third party for the provisioning of this service. With the exception of La Poste, UPS and iMakr all the services render their business completely on the Internet without the requirement for physical interaction. La Poste and UPS offer an Internet interface with the physical delivery of the objects in certain shops of theirs. Services that offer a design market place can offer designs and other files costless or for a fee, no distinction is made for this study. Yeggi and stlfinder are search engines for 3D model data that work on the data from other sources. Albeit a search engine, Yeggi provides the integration of printing services and cloud printing services for models available from third party services, thus Yeggi can be classified as a service of services. The service rendered by Trinpy is subscription based with various membership options. Grabcab provides 3D printing planning and control services, and integration with an online editor. 6. Review Cloud Manufacturing is mainly an overlapping manufacturing or engineering concept with application and grounding the development of parts or objects in “traditional” manufacturing. With traditional manufacturing we denote all technologies and methods to create or fabricate objects or parts other than AM. For a distinction between manufacturing methods see Klocke [136], Nee [185] and the DIN Standard 8580 [1]. In this sense all subtractive or formative manufacturing methods are summarises as “traditional manufacturing” methods. As AM offers a large degree of flexibility due to short lead times as well as other beneficial properties, we see that AM is the ideal technology to be considered within CM scenarios. Taking the properties of AM into account we do not predict that AM will replace other manufacturing methods, not even within CM scenarios. Rather AM will fill niches for special applications like mass-customisation, rapid replacement production capabilities or RT, especially within CM scenarios. With this work we aim to contribute to the development of AM methodology and 49 technology in the CM paradigm. 6.1. Topological Map In Fig. 13 the relationship and connection of various concepts relevant to CM is described. This map forms the basis of the following review, where the nodes from the map represent sections from the review where we present the current state of research and elaborate on open research questions. The topics are extracted from literature. This topological map displays the relationship of CM with a variety of connected and enabling technologies and concepts. Additive Manufacturing (See Sect. 6.10) enables CM to be more modular, flexible and offers new capabilities and business opportunities. The Rapid Technology (See Sect. 6.8) and its composition Rapid Prototyping (RP, see Sect. 6.8.3), Rapid Manufacturing (RM, see Sect. 6.8.2) and Rapid Tooling (RT, see Sect. 6.8.1) are areas in which CM can be applied. The topic of Service Orientation (Sect. 6.7) and its composition “as-a-Service” of which Design-as-a-Service (DaaS, see Sect. 6.7.2), Testing-as-a-Service (TaaS, see Sect. 6.7.3) and Manufacturingas-a-Service (MaaS, see Sect. 6.7.1) are explored as examples, are concepts that enable the efficient application of CM. For a broader understanding it is required to research the stakeholders involved in this technology which makes Sect. 6.6. The topics of Scheduling (See Sect. 6.12) and Resource Description (See Sect. 6.13) are to be discussed for the universal and efficient application of CM. The domain of Simulation (See Sect. 6.5) with its composition of Optimisation (See Sect. 6.5.2) and Topological Optimisation (See Sect. 6.5.1) enable a more rapid, more flexible and more robust usage of the technology. For AM technology the application of Topology Optimisation enables the benefits of this technology. Similar to AM is 3D printing (See Sect. 6.4) with its subtopic of Accuracy and Precision (See Sect. 6.4.1) as this technology is a appropriate basis for CM systems. The topic of Hybrid Manufacturing (See Sect. 6.14) gains importance in flexible and agile manufacturing systems which warrants and requires its research. In the topic of Technology (See Sect. 6.2) the general principles and technologies of CM and AM are discussed as these are basic principles for the efficient implementation of these systems. The topic of Cloud Computing (CC, see Sect. 6.11) with its sub-components Internet of Things (IoT, see Sect. 6.11.1) and Cyberphysical Systems (CPS, see Sect. 6.11.2) is the conceptual progenitor of CM and therefore requires careful studying. IoT and CPS are key enabling technologies for CM. The topic of Security 6.3 is of increasing importance with the 50 Figure 13: Topological Map for Cloud Manufacturing spreading application of AM and CM as attack surfaces grow and potential damage increases. 6.2. Technology A large number of technologies and technological advances have made AM possible to evolve from its origin as a RP method to its current state where it is used for end-part manufacturing (RM) and available to consumers [88, 269]. All 3D printed objects are based on a digital model. This model can either be created using CAD software, 3D sculpting software or acquired using reverseengineering methods (e.g., object scanning or photo reconstruction) [89]. Albeit direct slicing from a CAD model has been proposed by Jamieson [119] in 1995 it is still rarely performed. Direct slicing requires implementation in the CAD software for each printer type and printer manufacturer, which is not feasible. Further shortcomings of the de-facto standard file format for AM, i.e., STL, namely the possibility to contain mis-aligned facets, holes or to be non-watertight, as well as being to large in file size are reported by [281]. 51 Besides a Steiner-patch based [193] file format to replace the STL file format the ASTM Committee F42 has published an ISO Standard [10] for the AMF (Additive Manufacturing File Format) with the same intention. Both file formats are created to increase the accuracy for the models described and therefore increase the quality of the resulting printed objects. STL seems to be the prevalent file format for AM with 25700 results on Google Scholar compared to 8230 results for AMF. Further investigation in the file support for different hard- and software vendors is warranted but out of the scope of this work. The review by Dimitrov et al. [61] presents further information on the technology that AM is based on with an overview of applications for it. In the review by Esmaeilian et al. [71] the authors present the relationship of AM and Manufacturing in general as well its benefits. With the emergence of Internet or cloud based CAD Modelling software the creation of models for AM becomes easier as direct integration of 3D printing providers is possible. Furthermore, the collaborative aspect of 3D modelling is enhanced as studied by Jou and Wang [122]. This study used a group of college students as a test group and investigated the adoption of an online CAD modelling ( Autodesk AutoCAD 62 ) software in the curriculum. The authors Andreadis et al. [18] present a case study on the adoption of an unnamed cloud based CAD system in comparison to traditional software, as well as an exhaustive list of benefits of cloud based software. Wu et al. [277] present an economic analysis of cloud based services for design and manufacturing. This work also explores a number of cloud based services along with their pricing. Communities are of great importance to enterprises as shown in West and Kuk [269]. One form of community is a repository for 3D printable digital models that collects and curates models supplied by users for collaboration, exchange, co-creation and sale. In this work the authors conduct a study to research the profit of catering for such a community/repository (Thingiverse) by a former open-source company (Makerbot). Wittbrodt et al. [270] performed experiments to determine the ROI (Return on Investment) of 3D printers for common households and their feasibility in application in end-user scenarios. With their experiment they concluded that an average household can achieve between 40 and 200 percent 62 http://autodesk.com/products/autocad 52 ROI on average usage of such machines. 6.3. Security Security for 3D Printing, AM or CM can be discussed from at least three perspectives. The first perspective would be the legal security of data and models processed within such a scenario. Discussions can range from whether it is legal to manufacture an existing object (replication) which might be protected by intellectual copyright laws to questions regarding product liability in case of company supplied model data. The second perspective is closely related to intellectual property (IP) as it is the technological discussion about the safeguarding of digital model files and data. The third perspective is about the data and process security itself in scenarios with malicious thirdparties (e.g., Hackers, Cyber-criminals). This third perspective is not limited to AM but shares many problems with CC and computing in general. Dolinksy [65] analyses the copyright and its application to 3D Printing for the jurisdiction of the USA. Because legal systems are different to each other such an analysis can not be exhaustive. Grimmelmann [91] further exemplifies the legal status of 3D printing and model creation in the USA with fictitious characters from literature and theatre. He states that the creation of an object irregardless of the source of model for such a creation is infringing on copyright if the object that is replicated is protected by copyright. In [260] the author discusses the current situation of 3D printing in regard to gun laws. This discussion was started by the media in 2013 as models for a functional plastic gun were distributed and the gun manufactured. The author states that current gun control laws are adequate to control 3D printed weapons and that this is currently not a big issue. On a broader scope the authors McNulty et al. [167] research the implications of AM for the national security of the USA where the authors present the benefits of bio or tissue 3D printing for the treatment of battlefield wounds as well as the implications of AM technologies for criminal misconduct. For the analysis of data security the authors Wu et al. [276] present the importance of such technologies within a CM environment. They propose the development of trust models for cyber-physical systems respectively the actors within such systems. The authors of Yampolskiy et al. [284] provide a full risk analysis of a scenario for outsourcing AM under consideration of IP. The risk assessment 53 does not include malicious behaviour other than IP infringement. To secure printed objects against counterfeiting the authors of [75] study and recommend the use of chemical components for authentication. Possible attacks on the 3D printing process by third parties is researched in [294] where one scenario is about the introduction of wilfully integrated material differences into an object in order to weaken the object under load. If the printing process itself is secured the question remains if a printed object is the original, a genuine replicate or a faked replicate. For the identification of genuine objects the authors of [14] research the applicability of physical signatures to 3D printed objects. In [110] the authors present a watermarking technique for 3D printed objects that is resilient against repeated digital scanning of the manufactured object. For a generalised discussion on security of cloud services and cloud computing we refer to [230] where the authors present issues ranging from data integrity to confidentiality. The concepts and terminology of CC security are also discussed in [306] of which the concept of confidentiality, trust and privacy are most relevant to scenarios of cloud based AM where users have physical objects created from digital models by third parties. Sturm et al. [229] present attack scenarios and mitigation strategies for attacks on AM system. The authors see rising CPS implementations in AM as potential intrusion vectors for attacks. The authors discuss various attacks for each of the manufacturing process phases. Furthermore, the authors identify the STL file format as a potential risk for tampering and attacking. Among the recommendations for mitigation is file hashing and improved process monitoring. Bridges et al. [39] briefly explore possible attacks on the cyber-physical systems that are used for AM. Among the attack scenarios the authors identify theft and tampering. 6.4. 3D Printing Following the distinction between AM and 3D printing given in the definition of 3D printing (See Sect. 2.1.2) by some authors into high-quality professional or industrial usage and lower-quality end-user or semi-professional usage 3D printing could not be part of CM. As we relax the definition of AM and 3D printing and use the terms as synonyms, we survey technological developments within this chapter. Technological progress and development 54 are essential to the widespread use and application of 3D Printing or AM in the CM paradigm. In the short article by Hansen et al. [100] the authors propose a measurement method for the correction or calibration of FDM printers. For this purpose the authors develop a measurement plate that is printed with specified parameters. In their experiment the authors recorded roundness errors of up to 100 µm. The calibration could not be applied due to the printer control software being closed-source. Anitha et al. [19] analyse the process variables layer thickness, bead width and deposition speed for their influence on the quality of objects manufactured using FDM. The authors find that the layer thickness is contributing with approximately 50 % to the surface roughness of the manufactured objects. Balogun et al. [22] describe and an experiment on the energy consumption and carbon footprint of models printed using FDM technology. They define three specimens of 9000 mm3 and 18000 mm3 volume which are printed on a Stratasys dimension SST FDM. Their experiment also captures the energy consumption of the post processing with and ultrawave precision cleaning machine. The energy consumed for the print is approximately 1 kWh. Over 60 % of the energy is consumed in non-productive states, e.g., pre-heating. This energy consumption profile warrants high utilisation of 3D printers when aiming for a low ecological impact and penalises frequent and long idle times of the 3D printer. Brajlih et al. [37] propose a comparison method for the speed and accuracy of 3D printers. As a basis the authors introduce properties and capabilities of 3D printers. A test-object designed by the authors is used to evaluate the average manufacturing speed of an Objet EDEN330 Polyjet and 3D Systems SLA3500 SLA manufacturing machine in an experiment. Furthermore, the experiment includes an EOS EOSINT P385 SLS and Stratasys Prodigy Plus FDM machine. The experiment concludes that the SLS machine is capable of the highest manufacturing speed (approx. 140 cm3 /h). In the experiment the angular and dimensional deviations are significant (up to 2.5° for a 90° nominal, and 0.8 mm for a 10 mm nominal). Roberson et al. [208] develop a ranking model for the selection of 3D printers based on the accuracy, surface roughness and printing time. This decision making model is intended to enable consumers and buyers of such hardware to select the most appropriate device. Utela et al. [252] provide a review on the literature related to the devel55 opment of new materials for powder bed based 3D printing systems. They decompose the development into five steps, for which they provide information on the relevant literature. Brooks et al. [40] perform a review on the history and business implications of 3D printing. They argue that the most promising approach for companies to benefit from 3D printing technology is to invest in and adapt current business models to support supplementary printing for the users. They also present the importance of the DMCA (Digital Millennium Copyright Act) in the USA under the aspect of 3D printing for current and upcoming businesses and services in the USA. Bogue [30] aims to provide an introduction into 3D printing with this review. The historical development of the various printing technologies is presented and furthermore, applications with examples are explored. Petrick and Simpson [195] compare traditional manufacturing, which they classify as “economy of scale”, with AM. AM is classified by the authors as “economy of one”. They base their future hypotheses on the traditional design-build-deliver model and current patterns in supply chains from which they draw logical conclusion for future developments. These hypotheses are sparsely supported by literature. They predict that in the future the boundaries between the design-build-deliver paradigm will be less clear and that design and production will be closely coupled with experiments. One obvious prediction is that the supply chains will get shorter and the production will be more localised both geographically and in regard to time planning. Matias and Rao [164] conduct an exploratory study on the business and consumer markets of 3D printing. This study consists of a survey based part for consumers within the area of 3D printing with a sample size of 66 participants conducted in 2014. One of their findings for the consumers is the willingness of 45 % of the participants to spend only $US 299 on this technology. They also found out that a large number of consumers is not proficient with the technology and the required software. This finding was backed by five interviews conducted with business persons from five different companies. Their interviewees also expressed concerns that there will not be mass market for 3D printing within the next five to ten years. 6.4.1. Accuracy/Precision The accuracy, precision and geometrical fidelity of 3D printed objects has been researched in many works for over 20 years [116, 73] due to the necessity to produce objects that match their digital models closely. This topic is of 56 general relevance for AM as only precise objects are usable for the various applications. Increased precision and accuracy enables AM and CM to be a valid manufacturing technology. Dimitrov et al. [61] conducted a study on the accuracy of the 3DP (3DPrinting) process with a benchmark model. Among the three influencing factors for the accuracy is the selected axis and the material involved. Turner and Gold [247] provide a review on FDM with a discussion on the available process parameters and the resulting accuracy and resolution. Boschetto and Bottini [32] develop a geometrical model for the prediction of the accuracy in the FDM process. They predict the accuracy based on process parameters for a case study for 92 % of their specimens within 0.1 mm. Armillotta [20] discusses the surface quality of FDM printed objects. The author utilises a non-contacting scanner with a resolution of 0.03 mm for the assessment of the surface quality. Furthermore, the work delivers a set of guidelines for the FDM process in respect to the achievable surface quality. Equbal et al. [69] present a Fuzzy classifier and neural-net implementations for the prediction of the accuracy within the FDM process under varying process parameters. They achieve a mean absolute relative error of 5.5 % for the predictor based on Fuzzy logic. Sahu et al. [213] also predict the precision of FDM manufactured parts using a Fuzzy prediction, but with different input parameters (Signal to noise ratio of the width, length and height). Katatny et al. [126] present a study on the dimensional accuracy of FDM manufactured objects for the use as medical models. The authors captured the geometrical data with a 3D Laser scanner at a resolution of 0.2 mm in the vertical direction. In this work a standard deviation of 0.177 mm is calculated for a model of a mandible acquired from Computer Tomography (CT) data. To counter expected deviations of the object to the model, Tong et al. [243] propose the adaption of slice files. For this adaption the authors present a mathematical error model for the FDM process and compare the adaption of slice files to the adaption of STL (STereoLitography) files. Due to machine restrictions the corrections in either the slice file and the STL file are comparable, i.e., control accuracy of the AM fabricator is not sufficient to distinguish between the two correction methods. Boschetto and Bottini [33] discuss the implications of AM methods on the process of design. For this discussion they utilise digitally acquired images 57 to compare to model files. Garg et al. [87] present a study on the comparison of surface roughness of chemically treated and untreated specimens manufactured using FDM. They conclude that for minimal dimensional deviation from the model the objects should be manufactured either parallel or perpendicular to the main axis of the part and the AM fabricator axis. 6.5. Simulation Simulation in the area of AM is of great importance even though the process of object manufacturing itself is relatively cheap and fast when compared to other means of production. But even 3D printed objects can take many hours to be manufactured in which the AM resource is occupied. Furthermore, with specialised and high value printing materials the costs can be prohibitively expensive for misprinted parts. In [104] the authors describe a voxel based simulation for 3D printing for the estimation of the precision of AM objects. Pal et al. [189] propose a finite-element based simulation for the heattransfer of powder based AM methods. With this simulation the authors claim that the general quality of the printed objects can be enhanced and post-processing/quality-control can be reduced. The work of Zhou et al. [301] proposed a numerical simulation method for the packing of powder in AM. This research is conducted to provide a better understanding of the powder behaviour in methods like SLS or SLM. Alimardani [15] propose another numerical simulation method for the prediction of heat distribution and stress in printed objects for Laser Solid Freeform Fabrication (LSFF), a powder based process similar to LENS. They compare their numerically computed predictions with experimental specimens, in one finding the maximum time-dependent stress could be reduced by eight percent by improvements made by the simulation. Ding et al. [64] discuss a FEM based simulation model for wire and arc based AM. Their simulation of the thermo-mechanical properties during this process is performed in the ABAQUS63 software. Chan [49] presents graphical simulation models for the use in manufacturing scenarios not limited to AM. Such models must be adopted to contain virtual production entities like the ones provided by CM. 63 http://www.3ds.com/products-services/simulia/products/abaqus 58 Mourtzis et al. [178] present a review on the aspects of simulation within the domain of product development (PD). For this work they give introduction to concepts and technologies supporting and enabling PD. The concepts are explained in sections of two paragraphs each and supported by existing literature. They link the concepts to simulation research within these areas, where applicable. The concepts and technology introduced includes Computer Aided Design (CAD), Computer Aided Manufacturing (CAM), Computer Aided Process Planning (CAPP), Augmented and Virtual Reality (AR and VR), Life Cycle Assessment (LCA), Product Data Management (PDM) and Knowledge Management (KM), Enterprise Resource Planning (ERP), Layout Planning, Process-, Supply Chain- and Material Flow Simulation, Supervisory Control and Data Acquisition (SCADA) and Manufacturing Systems and Networks Planning and Control. Their review is based on over 100 years of research in the area of simulation and 15954 scientific articles from 1960 to 2014. The articles are aligned with the product and production lifecycle. Furthermore, this review includes a comparison of commercially available simulation software. The authors conclude their work with a detailed analysis of research opportunities aligned to the concepts introduced within this work. 6.5.1. Topological Optimisation One of the key benefits of AM is the ability to create almost any arbitrarily complex object which makes topological optimisation ideal for AM. In CM scenarios such optimisations can be embedded in the digital process chain and be offered and applied as services. In this section we present a number of research works on topological optimisation for AM. In [48] the authors discuss the application of topology optimisation for AM in a general manner giving an overview of the current state. Galantucci et al. [80] present experimental results of topology optimised and FDM printed objects from compression tests. In their experiment the reduction of filling material reduced the material consumption but also the maximum stress of the object. Almeida and Bártolo [58] propose a topology optimisation algorithm for the use in scaffold construction for bio-printing. This optimisation strategy is aimed to create scaffolds that are more bio-compatible due to their porosity but yield high structural strength. The authors conducted an experiment for the comparison of the topological optimised structures and un-optimised structures with reduced infill. Their approach yields structurally stable scaf59 folds up to 60 % porosity. The work by Leary et al. [146] focuses on the topological optimisation to create objects without the requirement for additional support structures. For this approach the authors perform a general topological optimisation first, then orient the part optimally to reduce the required support material and apply a strategy to add part structures to remove the required support material. In an experiment conducted the authors create an object that requires significantly less material (89.7 cm3 compared to 54.9 cm3 ) and is manufactured in 2.6 hours compared to 5.7 hours for the optimised part with support structures. Tang et al. [233] propose a design method for AM with the integration of topological optimisation. For this work the authors analyse existing design methods for AM. Bracket et al. [36] provide an overview and introduction of topology optimisation for AM. The authors identify constraints and restrictions for the usage of topology optimisation, e.g., insufficient mesh-resolution or insufficient manufacturing capabilities. Among the identified opportunities of topology optimisation in AM is the ability create lattice structures and design for multi-material objects. Gardan [85] proposes a topology optimisation method for the use in RP and AM. The work is focused on the inner-part of the object. In non-optimised objects this is filled with a pre-defined infill pattern of a user-selectable density. The authors implement the method in a plugin for Rhinoceros 3D64 and provide an experiment with SLA and SLS. The article does not provide detailed information on the implementation of the software and the algorithm. Gardan and Schneider [86] expand on the prior work by Gardan by slightly expanding the previous article. In this work the authors apply the optimisation method to prosthetic hip implants and additionally experiment on a FDM 3D printer. Hiller and Lipson [105] propose a genetic algorithm (GA) for the multimaterial topological optimisation. With this approach the authors demonstrate the optimisation of varying degrees of stiffness within a part. They utilise a high-level description of the parts properties to design the desired object automatically in its optimised composition. 64 https://rhino3d.com 60 6.5.2. Optimisation For AM and CM as processes a number of optimisations is possible and necessary. The optimisations can relate to the optimisation of process parameters for quicker manufacturing, higher quality manufacturing or increased utilisation of hard- and software resources. The optimisation can furthermore, regard the embeddability and integration of AM and CM within existing production processes. Optimisation for AM is a topic that is researched for a long time, as illustrated by the following two articles. Cheng et al. [52] propose an optimisation method for the criteria of manufacturing time, accuracy and stability. This optimisation is based on the calculation of the optimal part orientation. As a basis for the optimisation, the authors analyse the sources for errors in AM processes, e.g., tessellation errors, distortion and shrinkage, overcuring or stair-stepping effects. For their model they weight input parameters according to the inflicting errors and perform a multi-objective optimisation. Lin et al. [153] propose a mathematical model to reduce the process error in AM. In the first part the authors analyse the different process errors for various types of AM, e.g., under- and overfill, stair-stepping effects. Their model optimises the part orientation for minimal errors. Albeit this work is more than 15 years old, optimal orientation and placement of objects is not widely available in 3D printing control software. More recently, Rayegani and Onwubolu [203] present two methods for the process parameter prediction and optimisation for the FDM process. The authors provide an experiment to evaluate the tensile strength of specimens for the optimised process parameters. For the optimised parameters the authors provide the solution of 0° part orientation, 50° raster angle, 0.2034 mm raster width and -0.0025 mm air-gap. These parameters yield a mean tensile strength of 36.8603808 MPa. Paul and Anand [192] develop a system for the calculation of the energy consumption in SLS processes and process parameter optimisation to minimise the laser energy. For the model the authors neglect the energy consumption of all elements (e.g., heating bed) but the laser system. Paul and Anand [194] propose an optimisation for AM for the reduction of support material. Their approach is to optimise the part orientation for the minimum of support material. Furthermore, they provide optimisation for minimum cylindricity and flatness errors. Jin et al. [17] propose a method to optimise the path generation of ex- 61 trusion based AM, e.g., FDM. The optimisation goals for this approach are machine utilisation and object precision. The authors perform a study with their approach but comparison data on the quality and time consumption of other algorithms is missing. Khajavi et al. [131] present an optimisation for the spare-parts industry of fighter jets by the utilisation of AM. This work is on a systemic optimisation with AM being one strategy to achieve the optimum solution. The authors analyse the current situation in this specific application and propose an optimised solution based on distributed manufacturing or AM. Ponche et al. [199] present an optimisation for the design for AM based on a decomposition of functional shapes and volumes. The authors argue that objects designed for traditional manufacturing are not necessarily suitable for AM but require partial or complete re-design to adjust for the specifics of a certain AM process, e.g., in the inability to produce sharp corners and edges. In their work one optimisation goal is the reduction of material and therefore cost. Hsu and Lai [111] present the results of an experiment and the resulting process parameter optimisation for the 3DP manufacturing method. The authors improved the dimensional accuracy of each axis to under 0.1 mm. Furthermore, the authors improved on the building time by approximately 10 % and on the flexural stress by approximately 30 %. The authors experimented on the four process parameters that are layer height, object location, binder saturation and shrinkage. 6.6. Stakeholder In CM systems or cloud based printing systems naturally a number of stakeholders is involved. With this section we are presenting the current state in research on the identification of stakeholders in this domain as well as research regarding their agendas. In Rayna and Striukova [204] the authors identify the requirements of end-users for online 3D printing services. They base their study on concepts relevant to these stakeholders like user-participation and co-creation. Park et al. [190] provide a statistical analysis of patents and patent filings in the domain of 3D printing and bioprinting that can serve as a basis for decision making in the investment and R&D in these fields. The stakeholders in this case are the investors and managers. Hämäläinen and Ojala [99] applied the Stakeholder Theory by Freeman on the domain of AM and performed a study on eight companies with semi62 structured interviews. They identified five companies that use AM for prototyping (RP). They further analysed the benefits of AM for the interviewed companies. Buehler et al. [42] created a software called GripFab for the use in special needs education. For this software and the use of 3D printing in special needs education they performed a stakeholder analysis. The analysis is based on observations and found beneficial uses for this technology, e.g., in the form of assistive devices. Munguı́a et al. [181] analyse what influence missing standards have on the stakeholders of RM and develop a set of best practises for RM scenarios. They identified the four main contributors to RM cost as Operation times, Machine costs, Labour costs and Material costs. Lehmhus et al. [149] analyse the usage of data acquisition technologies and sensors within AM from the perspectives of the identified stakeholders designer, producer, user and regulatory or public bodies. They argue that the producers in such scenarios might become obsolete if AM is utilised in a complete CM sense. Fox [78] introduces the concept of virtual-social-physical (VSP) convergence for the application to product development. Within this concept he argues that AM can play an integral part to enhance product development. He identifies requirements from stakeholders in the product development process and addresses them in this work. Flatscher and Riel [76] propose a method to integrate stakeholder in an integrated design-process for the scenarios of next-generation manufacturing (Industry 4.0). In their study, a key challenge was the integration of all stakeholders in a team structure which they solved by integrating influential persons from different department in the joint operation. Maynard [166] discusses the risks and challenges, that come with the paradigm of Industry 4.0. Industry 4.0 as a concept is incorporating other concepts like AM and CM. The author briefly identifies the possible stakeholders of this technology as consumers, CEOs and educators. In the report by Thomas [241] the author performs a very detailed and thorough analysis of stakeholders for AM technology in the USA. The list of identified stakeholders is 40 entries long and contains very specific entries (e.g., Air Transport Providers or Natural Gas Suppliers) as well as generalised stakeholder groups (e.g., Professional Societies or Consumers). 63 6.7. Service Orientation Service orientation denotes a paradigm from the domain of programming (Service Oriented Architecture, SOA). Within this paradigm the functionality or capability of a software is regarded and handled as a consumable service. The services offer encapsulated capabilities that can be consumed by users or other services in an easy to use, well-defined and transparent manner. The services are inter- and exchangeable within business processes as their inner-working is abstracted and the services act like black boxes with well-defined interfaces. With CM or AM in general, this service orientation can be expanded to the physical resources of manufacturing. Similar to service orientation from the programming domain, it must be bound by the same stringency of well-defined interfaces and transparent or abstract execution of functionality or capability. In the review on service-oriented system engineering (SOSE) by Gu and Lago [94], the authors propose the hypotheses that the challenges in this domain can be classified by topic and by type. SOSE is the engineering discipline to develop service oriented systems. The authors identified 413 SOSE challenges from the reviewed set of 51 sources. The authors furthermore identified quality, service and data to be the three top challenges in this domain. Wang et al. [263] provide a review on the CC paradigm. For this work the authors classify CC into the three layers ( Hardware-as-a-Service - HaaS, Software-as-a-Service - SaaS and Data-as-a-Service - Daas). In this early work on CC the authors establish the importance of SoA for the CC paradigm. Tsai et al. [246] present an initial survey on CC architectures and propose a service architecture for CC (Service-Oriented Cloud Computing Architecture - SOCCA) for the interoperability between various cloud systems. Among the identified problems with CC architectures are tight coupling, lack of SLA (Service Level Agreement) support, lack of multi-tenancy support and lack of flexibility in user interfaces. The authors utilise SOA for the implementation of their prototype that is deployed on Google App Engine65 . Alam et al. [13] present a review on impact analysis in the domains of Business Process Management (BPM) and SOA. In their work the authors discuss the relationship and convergence of the two methods. From a set of 60 reviewed studies the authors conclude that BPM and SOA are becoming 65 https://appengine.google.com 64 dominant technologies. Zhang et al. [296] propose a management architecture for resource service composition (RSC) in the domain of CM. For this work the authors analyse and define the flexibility of resources and their composition. The implementation by the authors supports resource selection based on QoS and flexibility. Shang et al. [219] propose a social manufacturing system for the use in the apparel industry. Their implementation connects existing logistics and manufacturing systems with a strong focus on the consumer. For this architecture the authors rely heavily on SOA technology and describe the implementation of various layers required. Tao et al. [235] analyse the development of Advanced Manufacturing Systems (AMS) and its trend towards socialisation. In this work the authors establish the relationship between service orientation and manufacturing. The authors identify three phases for the implementation of service-oriented manufacturing (SOM), namely “Perception and Internet connection of Manufacturing resource and capability and gathering, Aggregation, management, and optimal allocation of Manufacturing resource and capability in the form of Manufacturing service and Use of Manufacturing service”. Thiesse et al. [240] analyse economic implications of AM on MIS (Management Information Systems) and the service orientation of these systems. In this work the authors analyse the economic, ecological and technological potential of AM and its services. The authors conclude that the services for the product development will be relocated upstream. For the service composition of cloud applications standards and definitions are essential. In the work by Binz et al. [29] the authors introduce the TOSCA (Topology and Orchestration Specification for Cloud Applications) standard. Albeit this standard is focused on the deployment and management of computing and other non-physical resources its architectural decisions and structures are of relevance to CM systems. Support for encapsulation and modelling as described in this work is sparse for other CM systems. As an extension to the previous work, the authors Soldani et al. [226] propose and implement a marketplace (TOSCAMART) for TOSCA for the distribution of cloud applications. Such a marketplace would be highly beneficial to CM systems as it can foster innovation, collaboration, re-use and competition. 65 6.7.1. Manufacturing-as-a-Service Described in Sect. 6.7 the service orientation regards capabilities as services that can be consumed. Such a class of services is the manufacturing of products. As a consumer of such a service, one is not necessarily interested in the process of manufacturing (e.g., what type of machine is used) or the location of manufacturing as long as a pre-agreed upon list of qualities of the end-product is complied with. As an example it can be said that a user wants two parts made from a certain metal, within a certain tolerance, certain properties regarding stress-resistance and within a defined time frame. The input of this service would then be the CAD model and the properties that must be fulfilled. The parts could then either be milled or 3D printed in any part of the world and then shipped to the user. The user must pay for the service rendered, i.e., the manufacturing of objects, but is not involved with the manufacturing itself as this is performed by a service provider. In the seventh EU Framework Programme, the project ManuCloud66 was funded that consolidated research on this topic. In this section we present current research articles on the subject in order to illustrate the concept of MaaS, its role for CM and applications. Tao et al.[236] propose an algorithm for a more efficient service composition optimal-selection (SCOS) in cloud manufacturing systems. Their proposed method is named FC-PACO-RM (full connection based parallel adaptive chaos optimisation with reflex migration) and it optimises the selection of manufacturing resources for the quality properties time, cost, energy, reliability, maintainability, trust and function similarity. In an experiment they proof that their implementation performs faster than a genetic algorithm (GA), an adaptive chaos optimisation (ACO) algorithm for the objectives of time, energy and cost, but not for the objective of reliability. Veiga et al. [258] propose a design and implementation for the flexible reconfiguration of industrial robot cells with SMEs in mind. These robot cells are mostly reconfigurable by design but with high barriers for SMEs due to the requirement of experts. The system proposed enables an intuitive interface for reconfiguration of the cells in order to enhance the flexibility of manufacturing. The implementation draws heavily on SOA concepts. The implementation supports the flexible orchestration of robotic cells as services. Zhang et al. [297] provide an introduction into the paradigm of CM. 66 http://www.manucloud-project.eu 66 Within this work the authors discuss issues arising from the implementation and the architecture itself. The authors present the decomposition of this paradigm into its service components, that are “design as a service (DaaS), manufacturing as a service (MFGaaS), experimentation as a service (EaaS), simulation as a service (SIMaaS), management as a service (MANaaS), maintain as a service (MAaaS), integration as a service (INTaaS)”. The authors implement such a CM system as a prototype for evaluation and discussion. Moghaddam et al. [175] present the development of MaaS and its relationship to the concepts of CM, Cloud Based Design and Manufacture (CBDM) and others. The authors propose SoftDiss [221] as an implementation platform for CM systems. Van Moergestel et al. [255] analyse the requirements for and propose an architecture for a manufacturing system that enables low-volume and lowcost manufacturing. The authors identify customer requirements for lowvolume and flexible production of products as a driver for the development of the CM concept or other MaaS implementations. The architecture relies on cheap reconfigurable production machines (equiplet). For the implementation of the system the authors utilise open source software like Tomcat and have a strong focus on the end-user integration via Web technology. Sanderson et al. [216] present a case study on distributed manufacturing systems which the authors call collective adaptive systems (CAS). The example in their case study is a manufacturing plant by Siemens in the UK which is part of the “Digital Factory” division. The authors present the division, structure and features of the company which is compared to CAS features. Among the identified challenges the authors list, physical layouting, resource flow through supply chains and hierarchical distributed decision making. For the integration of MaaS (which is called Fabrication-as-a-Service, FaaS, in this work) into CM, Ren et al. [206] analyse the service provider cooperative relationship (CSPR). Such a cooperation of MaaS/FaaS providers within a CM system is essential for the task completion rate and the service utilisation as demonstrated by the authors in an experiment. Guo [96] proposes a system design method for the implementation of CM systems. Within this work the MaaS layer of the CM system is further divided into “product design, process design, purchasing, material preparing, part processing and assembly and marketing process”. In the generalised five-layer architecture for the implementation of CM systems, the MaaS is located in the fifth layer. Yu and Xu [293] propose a cloud-based product configuration system 67 (PCS) for the implementation within CM systems. Such systems interface with the customer enabling the customer to configure or create products for ordering. Within a CM such a system can be employed to directly prepare objects that can be manufactured directly utilising MaaS capabilities. In the implementation within an enterprise the authors utilise the STEP file format for information exchange. 6.7.2. Design-as-a-Service Besides physical and computational resources that are exposed and utilized as services the concept of CM allows for and requires traditional services to be integrated. Such a service is for example the design of an object, which is traditionally either acquired as a service from a third-party company or rendered in-house. As with the physical Manufacturing-as-a-Service the service rendered here must be well-defined and abstract. The service in this section is that of the design for AM or traditional manufacturing. This paradigm can lead to increased involvement of the user as described by Wu et al. [279]. The authors provide an introduction to social product development - a new product development paradigm rooted in Web 2.0 and social media technology. They conducted a study on their students in a graduate level course on product development. They structure the process in four phases beginning with acquisition of user requirement through social media. With the social product development process (PDP) the product development involves the users or customers more directly and more frequently than with traditional PDP. This increased degree of integration requires support through technology which is provided by social media and Web 2.0 technology for communication and management. Unfortunately the scientific literature on DaaS is sparse and mostly only mentioned as part of architectural or systematic descriptions or implementations of CM systems. In Tao et al. [237] the authors place DaaS among other capabilities services that are part of the CM layer. Other capabilities services are Manufacturing, Experimentation, Simulation, Management, Maintenance and Integration-as-a-Service. In Adamson et al. [12] the same classification is used (but without the Integration and Maintenance, and a combination of the Simulation and Experimentation service). The authors also briefly review literature in the domain of collaborative design for CM systems. In Yu et al. [292] DaaS is also identified as a capability of CM systems and part of its layered structure. 68 Johanson et al. [121] discuss the requirements and implications of distributed collaborative engineering or design services. According to the authors the service orientation of design and its collaborative aspects will render enterprise more competitive due to reduced costs for software, decreased design times and innovative design. Furthermore, such services promote tighter integration and cooperation with customers. Laili et al. [141] propose an algorithm for a more efficient scheduling of collaborative design tasks within CM systems. As collaborative design task scheduling is NP-hard, the authors propose a heuristic energy adaptive immune genetic algorithm (EAIGA). In an experiment the authors prove that their implementation is more stable with higher quality results than compared to an genetic algorithm (GA) and a immune GA (IGA). Duan et al. [66] explore the servitization of capabilities and technologies in CC scenarios. The authors explore and discuss a variety of service offerings as described in literature. Among the identified as-a-Service offerings is Designas-a-Service which is referenced to Tsai et al. [246]. Duan et al. provide a large collection of “aaS” literature. Contrary to the indication by Duan et al. the work of Tsai et al. does not cover DaaS. It however covers the architectural design of CC systems and service provisioning as well as an analysis of potential drawbacks and limitations of CC systems. 6.7.3. Testing-as-a-Service Similar to the Design as a-Service (See Sect. 6.7.2) this exposition of a capability as a service can play an important role within CM systems. In general the QA for AM is not sufficiently researched and conducted as the traceability of information from the original CAD model to the manufactured part is insufficient due to the number of conversion steps, file formats and systems involved. Albeit mentioned in a number of publications on the design and implementation of CM architectures, designs or systems, e.g., Ren et al. [205] or Gao et al. [82], the research on Testing-as-a-Service (TaaS) in CM systems is sparse and the authors are not aware of any dedicated works on this topic. In contrast, TaaS as a concept for software testing in the cloud is researched by a number of authors, see e.g., Gao et al. [81] or Mishra and Tripathi [173] for an introductory overview, Yan et al. [285] for the special application of load testing, Tsai et al. [245] for service design or Llamas et al. [157] for a software implementation. Extrapolating from the benefits that TaaS brings to software quality, 69 e.g., transparency, scalability, concurrency, cost-reduction and certification by third parties, research on this area in CM scenarios is warranted. In contrast to software QA, physical testing has an extended set of requirements and limitations, e.g., object under test must be physically available, higher likelihood that standardised test protocols exist, inability to scale without hardware investment or inability to scale beyond minimum time required for testing. With this section we want to motivate further discussion and research into this area. 6.8. Rapid Technology As an umbrella term in accordance to the definition “General term to describe all process chains that manufacture parts using additive fabrication processes.” by [4] we examine the relevance of this technology for CM with this chapter. This technology is integral to the product development especially with its sub-technology that is RP (See Sect. 6.8.3). This and the following sections extend on the definitions provided in Sect. 2 by examples and research findings. For a brief introduction we refer to the following articles. Li et al. [151] propose a method for rapid new product ramp-up within large multi-national companies relying on disperse supply chain networks and out-sourcing partners. In this work the authors consider large-volume product development. For the conceptual framework the authors identified critical members and defined a ramp-up process as a flowchart. Mavri [165] describes 3D printing itself as a rapid technology and analyses the impact of this technology on the production chain. The author performs an analysis on the influences on the phases of product design, production planning, product manufacturing as well as the topics material utilisation, inventory and retail market. The findings of the author include that AM enables companies to act more agile, cater for smaller markets, limit potential inventory issues and can sustain smaller and slimmer supply chain networks. Muita et al. [180] discuss the evolution of rapid production technologies and its implications for businesses. The authors investigate business models and processes, transitions as well as materials and logistics. A decomposition of rapid technology into the phases or layers (Rapid Prototyping, 3D Printing, Rapid Tooling, Rapid Product Development and Rapid Manufacturing) is provided and discussed. The authors recommend the adaption of AM by all companies. 70 In the book by Bertsche and Bullinger [27] the authors present the work of a research project on RP and the various problems addressed within the topic of Rapid Product Development (RPD). One aspect of this research is the development and integration of systems to efficiently store and retrieve information required throughout the process. Information required in the process is knowledge on construction, quality, manufacturing, cost and time. In Lachmayer et al. [140] the authors present current topics of AM and its application in the industry. In the chapter by Zghair [295] the concept of rapid repair is discussed. This concept is intended to prolong the life-time of high-investment parts as well as modification of parts in academic settings. The authors perform an experiment for this approach with three objects and conclude that there is no visible difference between additional object geometry in the case of previously SLM manufactured objects. Differences are visually detectable for cast objects that are repaired. 6.8.1. Rapid Tooling The use case of RT for AM is that the required tools or moulds for the (mass-) production of other parts or objects is supported by provisioning of said tools or moulds. See the definitions of RT in Sect. 2.1.5. RT as a concept is researched and applied for at least 26 years [212]. Conceptually little has changed since the early publications but the number of available AM technologies, materials and support by other concepts like CC has increased. Since its start the idea of RT is to create tools or tooling directly from CAD models thus saving time and material. In this section we present articles from this research to give an overview to the reader and present its relevance and relationship to the concept of CM. In the review by Boparai et al. [31] the authors thoroughly analyse the development of RT using FDM technology. FDM manufactured objects commonly require post-processing for higher-quality surfaces which is discussed by the authors in a separate section of their work. The authors present a variety of applications of RT with FDM which include casting and injection moulds and scaffolds for tissue engineering. Furthermore, the authors discuss material selection and manufacturing, as well as testing and inspection. The review by Levy et al. [150] on RT and RM for layer oriented AM from 2003 already states that AM is not just for RP anymore. According to the definition of RT by the authors tools are supposed to last a few thousand to millions applications. The authors focus mainly on plastic injection moulds for tooling and survey a large number of different technologies and materials. 71 Similarly, the definition of RT by King and Tansey [135], is focused on injection moulds, a definition that has since been expanded to other tooling areas. In this work the authors present research on material selection for SLS manufactured moulds. In this work the authors analyse RapidSteel and copper polyamide for the use in time-critical RT scenarios. Lušić et al. [161] present a study on the applicability of FDM manufactured moulds for carbon fibre reinforced plastic (CFRP) objects. The authors achieved up to 84 % material saving or 47 % time saving for optimised structures compared to a solid mould at a comparable stiffness. The authors experimented with varying shell thicknesses and infill patterns. Nagel et al. [184] present the industrial application of RT in a company. The authors present at a high level the benefits and thoughts leading to the creation of flexible grippers for industrial robots utilising 3D printing. The authors also present a browser based design tool for the creation of the individual grippers with which the company is able to reduce the time required for product design by 97 %. Chua et al. [56] present a thorough introduction to RT as well as a classification into soft- and hard tooling, with a further divide into direct soft tooling, indirect soft tooling, direct hard tooling and indirect hard tooling. Among the benefits of RT the authors see time and cost savings as well as profit enhancements. The authors discuss each of the classifications with examples and the relevant literature. Examples from industry given support the benefits proposed by the authors. Rajaguru et al. [201] propose a method for the creation of RT moulds for the production of low-volume plastic parts. With this indirect tooling method, the authors are able to produce low-cost moulds in less than 48 hours. The authors present an experiment where the mould is used for 600 repetitions. The method uses electroless plating of nickel and phosphorous alloy for the micro-pattern moulds. In the introduction to RT, Equbal et al. [70] start with the basics of various AM technologies. The authors provide a classification schema for RT and discuss each class with the appropriate examples. According to the authors, RT is a key technology for globally active companies in respect to flexibility and competitiveness. In the review by Malik et al. [162] the authors investigate the use of 3D printing in the field of surgery. The authors discuss the fabrication of medical models for education and operation planning as well as drill-guides and templates as RT technology. In contrast, the direct fabrication of implants 72 or prosthetics as described by the authors is regarded RM. 6.8.2. Rapid Manufacturing In contrast to RP the goal of RM is the creation of parts and objects directly usable as end-products or part of end-products (See Sect. 2.1.4). To achieve this usability the requirements on the quality of the parts is higher, therefore the quality control and quality assurance are stricter. Hopkinson and Dickens [107] provides findings on cost analysis for the manufacturing of parts for traditional manufacturing and AM. The authors identify the current and potential future benefits for RM as the ability to manufacture with less lead time, increased geometric freedom, manufacture in distributed environments and potentially the use of graded material for production. The authors compared the costs incurred for the creation of two objects with injection moulding (IM), SLA, FDM and SLS. For IM the tool costs are high (27360 and 32100 Euro) whereas the unit costs are low (0.23 and 0.21 Euro). In their calculation the equilibrium for the cost of IM and SLS for one of the objects is at about 14000 units and for the other part at around 600 units. This finding validates RM for certain low-volume production scenarios. Ruffo et al. [211] also present a cost estimation analysis and is an extension and update to the previous work. The authors calculated with a much lower utilisation of the machines (57 % compared to 90 %), higher labour cost as well as production and administrative overhead costs. Furthermore, the authors took other indirect costs like floor/building costs and software costs into consideration. The authors calculated a higher unit cost for the object (3.25 Euro compared to 2.20 Euro), and a non-linear costing function due to partial low-utilisation of the printing resources which is due to incomplete rows for unit counts not equal or multiple of maximum unit packing. The comparison of these two works illustrates the necessity to use the most up-to date and complete models for costing estimation. Ituarte et al. [117] propose a methodology to characterise and asses AM technologies, here SLS, SLA and Polyjet. The methodology proposed is an experimental design for process parameter selection for object fabrication. The authors find that surface quality is the hardest quality to achieve with AM and might not suffice for RM usage with strict requirements. Such an analysis is of value in order to asses the feasibility of certain manufacturing methods in RM scenarios. In the review by Karunakaran et al. [125], the authors survey and classify 73 technologies capable of manufacturing metallic objects for RM. The technologies surveyed are CNC-machining, laminated manufacturing, powder bed processes, deposition processes, hybrid processes and rapid casting. The authors develop different classification schemes for RM processes based on various criteria, e.g., material or application. Furthermore, the authors compile a list of RM process capabilities to be used for the selection of appropriate RM processes. Simhambhatla and Karunakaran [222] survey build strategies for metallic objects for RM. The authors focus on the issues of overhangs and undercut structures in metallic AM. The work concludes with a comparative study on the fabrication of a part using CNC-machining and a hybrid layered manufacturing (HLM) method. With the hybrid approach the authors build the part in 177 minutes compared to 331 minutes at a cost of 13.83 Euro compared to 24.32 Euro. Hasan et al. [101] present an analysis of the implications of RM on the supply chain from a business perspective. For this study the authors interviewed 10 business representatives and 6 RP or RM service providers. The authors propose both reverse-auctioning as well as e-cataloguing as modes for business transactions. With rapid changing production the need arises for rapid fixture design and fabrication for the RM provider itself. This issue is discussed by Nelaturi et al. [186], as they propose a mechanism to synthesise fixture designs. The method analyses the models to be manufactured and supported by fixtures as STL files for possible fixture application areas. The algorithm furthermore calculates possible fixture positions and inflicting forces. The authors select existing fixtures from in-house or online catalogues of fixtures for application. Gupta et al. [98] propose an adaptive method to slice model files of heterogeneous objects for the use with RM. For this the authors decompose the slicing process into three phases (Slicing set up, Slices generation and Retrieving data). The work also surveys other existing slicing techniques for various optimisation goals, e.g., quality, computing resources or part manufacturing time. For the extraction of geometric and material information the authors utilise a relational database for efficient storage. The authors find that utilising the appropriate slicing technique the fabrication time can be reduced by up to 37 %. Hernández et al. [103] present the KTRM (Knowledge Transfer of Rapid Manufacturing) initiative which is created to improve training and knowledge transfer regarding RM in the European Union. For the requirement analysis 74 of such a project, the authors conducted a study with 136 participants of which the majority (70 %) are SMEs. Such training initiatives are beneficial to the growth in application and increased process majority as the authors find that the knowledge of RM is low but the perceived benefits of this technology include higher quality parts, lower time to markets and increased competitiveness. With the chapter by Paul et al. [191], the authors provide a thorough overview over laser-based RM. The authors discuss classifications of such systems as well as composition of these systems in general. Process parameters are presented and located in literature. Furthermore, the authors discuss materials available for this class of RM and applications. This work is a comprehensive overview, covering all relevant aspects of the technology, including monitoring and process control. 6.8.3. Rapid Prototyping Following the definitions in Sect. 2.1.3 Rapid Prototyping (RP) is the concept to speed-up the creation of prototypes in product development. These prototypes can be functional, visual, geared towards user-experience or of any other sort. RP was one of the first uses for AM and oftentimes the terms AM and RP are used synonymously. The quick or rapid creation of prototypes does not necessarily mean fast in absolute terms but rather a more rapid way to create prototypes than traditionally created using skilled or expert labour (e.g., wooden models created by carpenters) or subtractive or formative manufacturing methods oftentimes requiring specialised tooling or moulds. Pham and Gault [196] provide an overview of commonly used methods to rapidly create prototypes with information on the achievable accuracy, speed and incurred costs of each technology from a very early perspective. A number of technologies, e.g., Beam Interference Solidification (BIS), has since been disused. The accuracy for Fused Deposition Modeling (FDM) stated with 127 µm has not been improved significantly since then. Masood [163] reviews the technology of FDM and examines the usability of it for RP. Among the advantages of this technology is “Simplicity, Safety, and Ease of Use” as well as “Variety of Engineering Polymers” which makes it suitable for the creation of functional prototypes. A number of limitations, like “Surface Finish and Accuracy”, can diminish the suitability of this technology for certain aspects of prototyping. In their keynote paper Kruth et al. [137] survey the technologies used for 75 RP and produce examples for the technologies. Furthermore, they briefly explain the developmental bridge from RP to RT and RM. The authors Yan et al. [286] present the historical development of RP from its roots in the analogue and manual creation of prototypes to digital fabrication methods. The also present a list of current limitations for digital RP. Among the five limitations they place high-manufacturing cost, for the manufacturing resources, and the insufficient forming precision. The first argument of cost is often put forward in its reversed statement as RP is proposed as a low-cost production method, when compared to traditional prototyping. Azari and Nikzad [21] present a review on RP in dentistry with a distinction of models in dentistry and its general meaning. They discuss the problems in data-capture for RP due to the nature of living patients. They further discuss the use of AM for drill-guides which is an application for RT. Liu et al. [155] present a study on profit mechanisms associated with cloud 3D printing platforms predominantly in China. They argue that such services can enable small and medium sized enterprises (SME) to produce prototypes more rapidly and cheaper thus increasing their competitiveness. Roller et al. [209] introduce the concept of Active Semantic Networks (ASN) as shared database systems for the storage of information for the product development process. 6.9. Design In traditional (subtractive or formative) manufacturing the design is driven by the capabilities provided by the manufacturing equipment. This is described as Design for Manufacturing or Design for Manufacturability (DFM) which means that the parts designed must be easy and cheap to manufacture. Especially in large volume production the parts must be machinable in a simple way as tooling, tool changes and complex operations are expensive. Furthermore, with traditional manufacturing certain operations like hollowed or meshed structures are not possible to produce or incur large costs. With AM the design of objects or parts is not strictly limited by these considerations as flexibility comes for free and a number of operations (e.g., intersecting parts, hollowed structures) become possible. The designer can chose more freely from available designs and is less restricted. The design itself can concentrate on the functionality of the part, rather than its manufacturability. 76 In the review by Rosen [210] the author proposes principles that are relevant for design for AM (DFAM) as they exist in literature. The suitability of AM is declared for parts of high complexity and low production volume, high production volume and high degree of customisation, parts with complex or custom geometries or parts with specialised properties or characteristics. Within this review the author proposes a prototypical design process for AM that is derived from a European Union standardisation project by the name of SASAM67 . Kerbrat et al. [129] propose a multi-material hybrid design method for the combination of traditional manufacturing and AM. For this method the object is decomposed based on the machining difficulty. The authors implemented their method in a CAD System (Dassault Systems SolidWorks68 ) for evaluation. This hybrid design method is not limited to a specific AM or manufacturing technology. The authors omit information on how the decomposed part or parts are fused together and how to compensate for inaccuracies within the manufacturing process. Throughout the design process and later for manufacturing it is necessary to convey and transport information on design decisions and other specifications. Brecher et al. [38] provide an analysis of the STEP [8] and STEP-NC [2] file formats. This analysis is used to propose extensions necessary for the use in an interconnected CAD-CAM-NC (CAx) platform. Buckner and Love [41] provide a brief presentation of their work on the automatic object creation using Multi-Objective Constrained Evolutionary Optimisation (MOCEO) on a high-performance computing (HPC) system. With their software, utilising Matlab69 and driving SolidWorks, the objects are created automatically following a given set of restrictions and rules. Cai et al. [43] propose a design method for the personalisation of products in AM. Their work defines basic concepts ranging from Design Intent to Consistency Models. The design method is intended to convey design intentions from users or designers in a collaborative design or CAD environment. Vayre et al. [257] propose a design method for AM with a focus on the constraints and capabilities. This design method consists of four steps (Initial Shape Design, Parameter Definition, Parametric Optimisation, Shape 67 http://www.sasam.eu http://www.solidworks.com 69 http://mathworks.com/products/matlab 68 77 Validation). For the initial shape design, the authors propose the use of topological optimisation. The authors illustrate this process with an example of the re-design of an aluminium alloy square bracket. Diegel et al. [60] discuss the value of AM for a sustainable product design. The authors explore the benefits (e.g., Mass customisation, freedom of design) and design considerations or restrictions for AM (e.g., surface finish, strength and flexibility). The authors argue that AM offers create potential for the creation of long-lasting, high-quality objects and parts that can save resources throughout their lifetime by optimised design. Ding et al. [63] analyse existing slicing strategies for the creation of objects with AM. Besides the analysis, the authors propose a strategy to create multi-directional slicing paths to be used with AM machines that support multi-axis deposition or fabrication. By the authors’ analysis the existing software for slice creation is insufficient and leaves uncovered areas (hole or gap). This work is not on the design for AM but rather on the design of the resulting machine-paths for the manufacture with AM fabricators. In Wu et al. [274] the authors discuss the concept of Cloud-Based Design and Manufacturing (CBDM, see also [278]) in which the whole design and manufacturing process chain is executed in a cloud environment. CBDM is an extension to the CM concept as it expands the process chain horizontally into the collaborative and cooperative domain of the cloud. CBDM utilises Web 2.0 technology, service-oriented architecture (SOA) concepts, semantic web technologies and has an inherent connection to social networking applications. In this article concepts like collaboration, cooperation and crowdsourcing for design for AM are discussed and exemplified. 6.10. Additive Manufacturing We see AM an integral component in CM and Industry 4.0 settings due to the benefits it provides. Among those benefits are flexibility, resource efficiency and the freedom in and of design. In this section we survey scientific literature regarding AM, especially works that provide an overview (e.g., reviews, surveys), present important aspects or exhibit common characteristics of this domain. Le Bourhis et al. [35] develop the concept of design for sustainable AM (DFSAM) to minimise the yet unknown environmental impact of AM. According to the authors about 41 % of the total energy consumption globally is attributed to industry. The authors further provide a division for the French industry in 2010 where about 12 % percent are attributed to manufacturing. 78 The authors claim that AM can reduce the energy required as it limits waste material. The authors experiment on the energy and resource consumption of the Additive Laser Manufacturing (ALM) process and present a method to calculate electricity, powder and gas consumption for an object based on the respective GCode. In their work Kim et al. [134] present a federated information systems architecture for AM. This architecture is intended to facilitate an end-to-end digital implementation of AM, i.e., “digital thread”, design-to-product process. The authors analyse, for each phase (Part geometry/design, Raw/tessellated data, Tessellated 3D model, Build file, Machine data, Fabricated Part, Finished Part, Validated Part) the available and used data formats and supporting software. The focus of their conceptual architecture is interoperability by an open architecture. Balogun et al. [23] perform an experiment on the electricity consumption of the FDM process. The authors divide the manufacturing process into its components (Start-up, warm-up, ready-state, build-state). In an experiment they analyse three different FDM machines (Stratasys Dimension SST FDM, Dentford Inspire D290 and PP3DP) for their power consumption profile during manufacturing. The machines differ significantly in the energy demand with the Dentford machine requiring 1418 Wh and the PP3DP only requiring 66 Wh. Furthermore, the authors compare the energy consumption and manufacturing duration of a FDM machine to a milling machine. In the experiment the AM process consumed 685 Wh and the Mikron HSM 400 milling machine only 114 Wh. The AM cycle time was 3012 s (without 3600 s for support structure removal in an ultrasonic cleaning tank) and the milling machine cycle time was 137 s. Weller et al. [268] discuss the implications of AM on the company and industry level. Economic characteristics, i.e., opportunities like acceleration and possible price premiums, lower market entry barriers and limitations like missing economy of scale, missing quality standards are discussed in this analysis. The authors perform modelling of various scenarios and propositions for the market under the influence of AM. Their prediction for first adoption is within markets with an overall lower economy of scale. Efthymiou et al. [67] present a systematic survey on the complexity in manufacturing systems. Albeit not directly referencing AM this study is relevant to understand the implications of AM on manufacturing systems. Turner et al. [248] survey melt extrusion AM processes. This work is part of a two piece series (See also [247]) with this part focusing on the design 79 and process modelling. The authors provide a short market analysis in their introduction. The authors discuss literature relating to various processing steps and problems, e.g., die swelling, with melt extrusion processes. The authors provide a thorough overview on the literature for this topic. Mitev [174] approaches the topic of AM in a very uncommon manner, namely with a philosophical approach. This is the sole publication with this approach found by the authors. The author discusses AM for the question on what matter is and how 3D printing affects our concept of matter and material. In contrast to the previous author, Bayley et al. [25] present a model for the understanding of error generation in FDM. This work consists of two parts with experiments. The first part analyses actual errors in FDM manufactured parts (e.g., Roundness error, geometrical deviation). In the second part the authors construct a framework for error characterisation and quantification. In the review by Kai et al. [123] the authors evaluate the relationship of manufacturing systems and AM briefly. The authors also provide an overview over one possible decomposition of AM and its academic relevance through numbers of published works from 1975 to 2015. 6.11. Cloud Computing Cloud Computing (CC) is the concept of virtualized computing resources available to consumers and professionals as consumable services without physical restraints. Computing, storage and other related tasks are performed in a ubiquitous cloud which delivers all these capabilities through easy to use and interface front-ends or APIs. These concepts enable enterprises to acquire computing capacities as required while, often paying only for the resources consumed (Pay-as-you-go) in contrast to payment for equipment and resources in stock (e.g., leasing, renting or acquisition). Concepts developed for this computing paradigm are of importance for the CM domain, as many problems stated or solved are interchangeable within domains. What CC is to computing resources (e.g., storage, computing, analysis, databases) CM is to physical manufacturing resources (e.g., Tools, 3D printer, drills). In the definition of Cloud Computing, Mell and Grance [171] from NIST develop and present the characteristics and services models for CC. Truong and Dustdar [244] present a service for estimating and monitoring costs for cloud resources from the domain of scientific computing. This model is also suitable for the monitoring of costs in other cloud based computing 80 scenarios as CM with adaptions. The authors present an experiment where they analyse the cost of scientific workflows on with on-premise execution and deployment to the Amazon Web Service (AWS) cloud system. Stanik et al. [228] propose the cloud layer that is Hardware-as-a-Service for the remote integration of distinct hardware resource into the cloud. The authors argue from the point of embedded systems development and testing but the concepts described are universally applicable for any hardware that is intended to be exposed as a service. Mehrsai et al. [168] propose a cloud based framework for the integration of supply networks (SN) for manufacturing. The authors discuss the basics of supply networks and CC in order to develop a concept to integrate CC for the improvement of SNs. This modular approach is demonstrated in an experimental simulation. Oliveira et al. [187] research the factors influencing the adoption of CC in general and for the manufacturing sector. The authors test their hypothesis on a survey of 369 companies from Portugal with 37.94 % of the companies from the domain of manufacturing. The authors find that security concerns do not inhibit the adoption of CC in the manufacturing domain sub-sample of their survey group. Ramisetty et al. [202] propose an ontology based architecture for the integration of CC or cloud platforms in advanced manufacturing. The authors claim that adoption of CC in manufacturing is less than in comparable industries due to the lack of social or collaborative engagement. The authors implement three services (Ontology, Resource Brokering and Accounting) for an evaluation in the WheelSim App. The authors propose an “App Marketplace” for manufacturing services to further the adoption of CC in the manufacturing industry. Um et al. [250] analyse the benefit of CC on the supply chain interactions in the aerospace industry. The authors propose a manufacturing network for contracting and subcontracting based on CC. In this architecture the basis for information exchange is the STEP-NC file format. Valilai and Houshmand [254] propose a service oriented distributed manufacturing system on the basis of CC. For their work the authors analyse the requirements and basics of globally distributed manufacturing systems. The proposed system (XMLAYMOD) utilises the STEP file format for the information exchange and enables a collaborative and distributed product development process as well as process planning and execution. 81 6.11.1. Internet of Things Internet of Things (IoT) is a term used to describe a network consisting of physical objects connected to the Internet. These physical objects can be tools, parts, machines, actuators or sensors. The concept of IoT is integral to the CM paradigm as it is necessary to control the AM resources transparently and monitor the resources for efficient utilisation planning and scheduling. In IoT scenarios the use of open-standards helps to avoid vendor lock-in. Tao et al. [234] present a very high-level description of the possible integration of IoT in CM scenarios. In four proposed layers (IoT, Service, Application, Bottom Support) of CM systems, they declare IoT and the corresponding layer as core enabling technology. Tao et al. [238] propose a five layer (Resource layer, perception layer, network layer, service layer and application layer) architecture for a CM system. The authors propose the utilisation of IoT technology as a method to interface the manufacturing resources into the architecture. This work is very similar to [234]. Qu et al. [200] present a case study on the integration of CM and IoT technology into an enterprise to synchronise the production logistics (PL) processes. For the implementation they propose a five tier (Physical resource layer, Smart object layer, Cloud manufacturing resource management layer, Cloud manufacturing core service layer, Cloud manufacturing application layer) decomposition. The system uses AUTOM [299] as a backbone for the IoT integration. Baumann et al. [24] propose the development of flexible sensor boards for the use in the monitoring of AM processes. The authors analyse existing sensors available and provide an architectural overview over a system for the incorporation of these sensor boards into a manufacturing control and monitoring system. With these sensors AM resources can be bridged to control systems or services thus enabling IoT functionality for the resources. Caputo et al. [46] perform a review on IoT from a managerial perspective with the application of AM. The authors develop a four staged (Radical, Modular, Architectural and Incremental) conceptual framework to classify innovation and research on the topic. Within this framework’s description AM resource will become digitally represented by sensors and IoT technology. In the review by Kang et al. [124], the authors focus on global research on smart manufacturing and its enabling technologies and underlying concepts. In the section on IoT the authors link this concept to other technologies like 82 SoA, CM and smart sensors. Vukovic [259] discusses the importance of APIs for the IoT deployment and usage. The author discusses the common architectural patterns in IoT scenarios and the arising requirement for APIs to further this technology. In the work by Kubler et al. [138], the authors discuss the evolution of manufacturing paradigms and the origins of CM along its relationship with IoT technology. The authors conclude that CM is not widely adopted because of security concerns but research in AM and IoT will drive CM forward. 6.11.2. Cyber-physical Systems Cyber-physical Systems (CPS) are one of the key enabling technologies for the Internet of Things. CPS is a term coined by the NSF (National Science Foundation) to describe systems, e.g., machines, parts or tools that have capabilities to sense and interact with their physical environment while being connected to the Internet in order to relay state and environment information to an Internet based control system. The first occurrence in scientific literature can be found in Lee [147]. In the domain of 3D Printing, AM and CM such systems are required to enable seamless integration of systems. With CPS, it is possible for an AM hardware resource to signal its current status or utilisation to a centralised or cloud-based control infrastructure in order to participate in scheduling endeavours and become part of a controllable system. In the work by Chen and Tsai [51] the authors propose the concept of ubiquitous manufacturing. This concept is similar to CM but with a stronger focus on mobility of users and manufacturing resources. For this concept ubiquitous sensor and IoT technology are key enabling technologies. Lee et al. [148] propose a five layer architecture for CM based on IoT technology. The layers in this architecture are from bottom to top: Smart Connection Layer, Data-to-Information Conversion Layer, Cyber Layer, Cognition Layer and Configuration Layer. The goal of this work is to provide a guideline for implementation of such a CPS backed manufacturing systems and to improve the product quality as well as the system’s reliability. Sha et al. [218] provide a general introduction into CPS and the related research challenges. The authors identify QoS composition, knowledge engineering, robustness and real-time system abstraction as the four main research questions for this technology. In the survey by Khaitan and McCalley [130] the authors study the design, development and application of CPS. In the list of identified application 83 scenarios (Surveillance, Networking Systems, Electric Power Grid and Energy Systems, Data Centres, Social Networks and Gaming, Power and Thermal Management, Smart Homes, Medical and Health Care, Vehicular and Transportation Systems) manufacturing systems are missing. Despite this lack of mention, application in e.g., transportation and power management is relevant for CM systems. Kuehnle [139] proposes a theory of decomposition for manufacturing resources in distributed manufacturing (DM) systems. DM is similar in concept to CM in relation to the decomposition of manufacturing resources in vitalised services. According to the author IoT technology and CPS are among the enabling technologies for this smart manufacturing concept. Yao and Lin [289] expand the concept of CPS into socio-cyber-physicalsystems (SCPS) with this study on smart manufacturing. This extension to social aspects of manufacturing (e.g., collaboration and cooperation) is expected to be an integral part of the next industrial revolution (Industry 4.0). Turner et al. [249] discuss the risk of attacks and their implications on CPS in the domain of manufacturing. The authors present a number of attack vectors, e.g., attack on the QA process and counter or mitigation strategies. According to the authors CPS provide an additional attack surface for malicious third parties. 6.12. Scheduling In CM as in CC a number of resources must be provisioned on demand. In contrast to CC the requirements for the execution resource can be more complex than just a computing resource. With CM manufacturing resources must first be described in an abstract way (See Sect. 6.13) to be schedulable. In this section we present current research on the challenges that come from scheduling. Cheng et al. [53] introduce the concept of CM in their work and perform a brief review over possible criteria for scheduling in such scenarios. The authors provide four scheduling modes based on the three identified stakeholders (Operator, Consumer and Provider) and the system as a whole. The proposed modes consider energy consumption, cost and risk. The proposed system-centred cooperative scheduling mode yields the highest utilisation in their experiment. Liu et al. [156] propose a scheduling method for CM systems for multiple enterprise and services scenarios. The authors use the criteria time, cost and 84 pass-rate for the task selection. Based on these criteria constraints are constructed for the decomposition of tasks into subtasks and their distribution onto resources. The authors take geographical distance, respectively delivery times between CM locations into consideration. Their simulation concludes that for a 50 task scenario, with 10 enterprises offering 10 services in total, the utilisation is 49.88 % compared to 10 tasks (17.07 %). The authors provide no specific scheduling solution with their work. Laili et al. [142] define the problem of optimal allocation of resources based on a 3-tier model (Manufacturing Task Level, Virtual Resource Layer and Computing Resource Layer). The authors prove that the optimum resource allocation is NP-complete. For the reason of NP-completeness of the scheduling problem this and other authors propose heuristics based algorithms to provide near-optimal scheduling. Heuristics based scheduling algorithms provide near-optimum solutions for most of the scheduling instances without the guarantee to achieve an optimum solution but at greater speed than exact computation. In this work the authors propose a heuristic algorithm inspired by the immune system (Immune Algorithm, IA). In an experiment they compare their algorithm against three other heuristic algorithms and it performed comparable. Wang [261] proposes a web-based distributed process planning (WebDPP) system that performs process planning, machining job dispatching and job execution monitoring. The system is implemented as a prototype and connects to legacy machine controllers. The proposed system acts directly on the manufacturing resource and interfaces with the Wise-ShopFloor framework [262]. The author does not provide information on scheduling algorithms or methods used. Huang et al. [114] propose a scheduling algorithm based on Ant Colony Optimisation (ACO). In an experiment they compare the algorithm with and without a serial schedule generation scheme (SSGS) against another heuristic Genetic Algorithm (GA). Their algorithm for conflict resolution performs faster and with better quality results than the GA when used with the SSGS. Lartigau et al. [144] present an 11-step framework for scheduling and order decomposition within a CM system. This scheduling is deadline oriented and implemented in a company environment for evaluation. The paper lacks validation and conclusive results for the proposed algorithm. In the work by Zhang et al. [300] the authors propose a queue optimisation algorithm for the criteria lowest cost, fastest finished time, cleanest environ85 ment and highest quality. The proposed CM system relies on active and realtime environment and machine-status sensing through heterogeneous sensors. Furthermore, they utilise semantic web (Ontology) technology for the system. Cao et al. [45] refine an ACO algorithm for efficient scheduling within a CM. This algorithm optimises for time, quality, service or cost (TQSC). With the addition of a selection mechanism to ACO their ACOS algorithm performs with better quality results and faster convergence in comparison to Particle Swarm Optimisation (PSO), GA and Chaos Optimisation (CO). Jian and Wang [120] propose an adapted PSO algorithm (Improved Cooperative Particle Swarm Optimisation, ICPSO) for the use in batch processing within a CM system. Batch tasks are indivisible units of work to be executed with manufacturing resources. The authors present an experiment for the comparison of the proposed algorithm with an PSO and a cooperative PSO scheduling algorithm in respect to the cost and time criteria. The algorithm performs better than the other two algorithms. 6.13. Resource Description For the usage of manufacturing resources within CM there must be an abstract definition or description of the resources. Open-standards are preferable where available in order to avoid vendor lock in. Luo et al. [160] propose a six step framework for the description of Manufacturing Capabilities (MC). The representation of this information utilises ontology and Fuzzy technology. Within the framework the authors represent information on the manufacturing equipment, computing resources, intellectual resources, software and other resources. Wang et al. [264] also propose an ontology based representation for manufacturing resources. The information and ontology is derived from manufacturing task descriptions. The authors implement their algorithm in an enterprise setting in a medium-sized Chinese company for evaluation. As a more general approach to CC scheduling Li et al. [152] propose an ontology based scheduling algorithm with PSO. The authors motivate their work by an example in a logistics centre which is relevant to the domain of CM. For this algorithm the selection is restricted based on the Quality of Service (QoS) with time, cost, availability and reliability as criteria. Zhu et al. [302] develop an XML based description for manufacturing resources oriented at the Web Service Description Language (WSDL) for webservices. The authors separate the resource description into two parts (Cloud End, CE and Cloud Manufacturing Platform, CMP). In their approach, they 86 reflect static data, e.g., physical structure or input data types, in the CE layer whereas the CMP layer reflects the dynamic data, e.g., function parameters. Wu et al. [282] propose an ontology based capability description for industrial robot (IR) systems. IR are regarded as manufacturing resources and described as such. Besides manufacturing machines such IR systems enable CM to perform as a flexible and agile manufacturing system. 6.14. Hybrid Manufacturing Hybrid Manufacturing is a term used for the combination of AM and traditional manufacturing methods. The combination of these methods promises to provide benefits from both, e.g., speed and accuracy of a milling machine with the low material input from AM. Lu et al. [159] propose an architecture for a hybrid manufacturing cloud. Their definition of hybrid refers to cloud operation modes (private, community and public cloud). Besides the architecture they present a cloud management engine (CME) which is implemented for evaluation purposes on Amazon Web Service (AWS). In the work by Kenne et al. [128] a model for a hybrid manufacturingremanufacturing system is proposed. The authors refer the term hybrid to manufacturing and remanufacturing in combination. Remanufacturing denotes an alternative use of products at the end of their product lifecycle for value generation. In an experiment the authors calculate the cost for a mixture of parameters, e.g., return rates and come to the conclusion that the system is applicable with customisation to various industries. In the review by Chu et al. [55] the authors discuss 57 hybrid manufacturing processes. These micro- and nanoscale processes are categorised in three different schemes (concurrent, main/assistive separate and main/main separate). The authors survey a combination of 118 processes in this work. The review by Zhu et al. [305] provides a classification of hybrid manufacturing processes. The authors present an extensive list of mainly two-process combination manufacturing processes. For this work the authors explore the existing definitions of manufacturing and hybrid manufacturing processes in literature. In another work by Zhu et al. [304] the authors propose a build time estimation for the iAtractive [303] process that combines additive, subtractive and inspection processes. This process is based on FDM and the build time prediction is based on the same parameters as normal FDM build time prediction. The authors provide a discussion on an experiment for which 87 their estimation ranged from approximately -12 % – 12 % to the real build time. The authors only provide a build estimation method for the additively manufactured part of the process. Lauwers et al. [145] propose a definition and classification of hybrid manufacturing processes with their work. They define these processes as acting simultaneously on the same work area or processing zone. This definition excludes processes that combine processing steps sequentially. Elmoselhy [68] proposes a hybrid lean-agile manufacturing system (HLAMS). The author develops the system for the requirements in the automotive industry. The definition of hybridity in this work refers to the school of thinking for manufacturing. The work by Kendrick et al. [127] proposes a solution to the problems associated with distributed manufacturing through the utilisation of hybrid manufacturing processes. The authors propose four options for the usage of distributed hybrid manufacturing systems (Local factories, manufacturing shops, community areas, personal fabrication). The described usage of hybrid MS can be further utilised in CM systems. Yang et al. [287] propose a hybrid system for the integration of multiple manufacturing clouds. The definition of hybridity used in this work refers to the mixture of diverse manufacturing clouds and not on the manufacturing process itself. The architecture proposed links the various clouds together for a single point of interaction integration. The authors define adaptors and a broker system and implement these for evaluation purposes. In the overview by Zhang et al. [298] the authors use the term hybrid to describe the cloud management. Their definition for the three cloud types used in CM is private/enterprise cloud, public/industry cloud and a mixture of both as hybrid cloud. 6.15. Research Implications From the provided literature we have identified the following number of open research questions. The listing compiled is non-exhaustive due to the nature of scientific research. Bourell et al. [3] provide a report on the “Roadmap for Additive Manufacturing” workshop that took place in 2009 and resulted in proposal for research of the coming 10 to 12 years. The recommendations are grouped into 1. Design 2. Process Modelling and Control 3. Materials, Processes and Machines 4. Biomedical Applications 5. Energy and Sustainability Applications 6. Education 7. Development and Community and 8. National Testbed 88 Center. The recommendations include the proposal to create design methods for aiding designers with AM, creation of closed-loop printing systems and the design and implementation of open-architecture controllers for AM fabricators. The authors reflect on their proposed roadmap in an article [34] five years later. In this analysis the authors state that the direct influence of the Roadmap is hard to quantify. The authors remark that the report is referenced about 50 times in scientific literature but only one project can be clearly attributed to the Roadmap. Lan [143] identifies the following four tasks for future research in his review. 1. Combination of Web services and software agents 2. Collaborative network environment with the focus on integration and interoperability 3. Focus on Web technology integration in RM systems and 4. Collaborative product commerce and collaborative planning and control. In the review by Fogliatto et al. [77] on Mass Customisation (MC), the authors identify the following research needs: 1. Research on Rapid Manufacturing (RM) to support MC 2. Research on the value of MC for consumers as well as environmental, economic and ethic value 3. Research on Quality Control 4. Research on Warranty for MC objects and 5. Case Studies and empirical validation. Khan and Turowski [132] perform a survey on challenges in manufacturing for the evolution to Industry 4.0. The authors identify six current and future challenges which are the following topics 1. Data integration (IoT, Big-Data, real-time data, data management) 2. Process flexibility (Adaption, Change management) 3. Security (Connectivity, monitoring, compliance) 4. Process integration within and across enterprise boundaries (Integrated processes, logistics, optimisation) 5. Real-time information access on hand-held devices (Web technology, ERP integration) and 6. Predictive Maintenance (Machine data, sensors). Among the research needs identified by Adamson et al. [11] in their review are the following 1. Capabilities, information and knowledge integration and sharing as well as cloud architectures 2. Definitions and standards for CM 3. Intelligent, flexible and agile, distributed monitoring and control systems 4. Business models 5. Intellectual properties and 6. Cost, security and adoption of CM systems. Furthermore, the authors identify and predict 1. The emergence of cloud service providers 2. Real world connectivity (IoT) 3. New collaboration and cooperation scenarios (Customer-manufacturer and manufacturing collaboration) 4. Increased competitiveness 5. Cloud closed89 loop manufacturing 6. Manufacturing of feature function blocks 7. Increased awareness and research on sustainable operations. In the work by Oropallo and Piegl [188] the authors specifically researched and compiled ten challenges in current AM systems that require research. The challenges are 1. Shape optimisation (Cellular structures and topology optimisation) 2. Design for 3D printing (Software support, design methodology) 3. Pre- and Postprocessing (File formats, model preprocessing, part postprocessing) 4. Printing methodologies (Layered manufacturing, voxel and digital material, non-layer oriented methods) 5. Error control (Before and during printing) 6. Multi material printing (Modelling and manufacturing support) 7. Hardware and Maintenance issues (Process and material based issues) 8. Part orientation 9. Slicing (Adaptive and direct slicing) 10. Speed Wu et al. [274] explicitly identify the following research needs for the evolution of CM 1. Cloud-Based Manufacturing (Modeling and simulation of material flow, concurrency and synchronisation for scalability) 2. CloudBased Design (Social media integration and leveraging, CAx convergence and cloud enablement) 3. Information, Communication, and Cyber Security (IoT, Security-as-a-Service) and 4. Business Model. The work by Huang et al. [115] examines the state of the art of AM and names the following research areas for future investigation: 1. Materials 2. Design (Methods and tools, complex geometries, lifecycle cost analysis) 3. Modeling, Sensing, Control, and Process Innovation (Multi-scale modelling simulation, error and failure detection, optical geometry reconstruction, faster hardware, bioprinting) 4. Characterization and Certification and 5. System Integration and Cyber Implementation (Knowledge management integration, cloud based systems). 7. Summary This article provides an overview over the topic that is CM and 3D Printing services. With the overview of the existing definitions (See Sect. 2) and the extension of the definition proposed we create the foundation for the following work. The review is based on the topological map presented in Sect. 6.1. Concepts, techniques, methods and terminology is presented by exploring different authors work. We perform an explorative extension study to [204] due to relevance for this domain (See Sect. 5). In this study we cover and analyse 90 48 publicly available services. extension considers APIs of such services a further distinction to be made. This work also gives an overview on available journals in the domain of AM or 3D printing in general as to support other researchers’ in finding suitable audiences for their work. One journal was established 31 years ago and provides a catalogue of over 21000 articles with no exclusivity to AM or 3D Printing. In recent years a number of new journals were established or are currently in the process of being established. Their focus is solely on AM or related domains like bioprinting. The domain of AM, CM, 3D Printing, RM and related domains is thoroughly presented in this work by means of literature analysis in scientometrical sense (See Sect. 1.1.2 and Sect. 1.2). The results presented in this work illustrate the scientific development of various techniques and methods from these domains in a time period ranging from 2002 to 2016 (See Sect. 6). Disclosure This work is not funded by any third party. The authors do not have any conflicting interests in the topic and provide an unbiased and neutral article on the topic contained within this article. References [1] DIN 8580 Fertigungsverfahren - Begriffe, Einteilung. Din, 2003. URL: http://www.din.de/de/mitwirken/normenausschuesse/ natg/normen/wdc-beuth:din21:65031153. [2] Iso 10303-238:2007 - industrial automation systems and integration – product data representation and exchange – part 238: Application protocol: Application interpreted model for computerized numerical controllers. Iso, 2007. URL: http://www.iso.org/iso/catalogue_ detail.htm?csnumber=38036. [3] Roadmap for Additive Manufacturing Identifying the Future of Freeform Processing. Technical report, The University of Texas at Austin, 2009. URL: http://wohlersassociates.com/roadmap2009. html. 91 [4] VDI-Richtline: VDI 3404 Generative Fertigungsverfahren Rapid-Technologien (Rapid Prototyping) - Grundlagen, Begriffe, Qualitätskenngrößen, Liefervereinbarungen. Vdi, 12 2009. URL: https://www.vdi.de/richtlinie/vdi_3404-generative_ fertigungsverfahren_rapid_technologien_rapid_prototyping_ grundlagen_begriffe. [5] Astm f2792-12a standard terminology for additive manufacturing technologies (withdrawn 2015). Astm, 2012. URL: http://www.astm.org/ cgi-bin/resolver.cgi?F2792, doi:10.1520/F2792-12A. [6] VDI-Richtlinie: VDI 3404 Additive Fertigung - Grundlagen, Begriffe, Verfahrensbeschreibungen. Vdi, 5 2014. URL: https: //www.vdi.de/richtlinie/entwurf_alt_vdi_3404-additive_ fertigung_grundlagen_begriffe_verfahrensbeschreibungen/. [7] VDI-Richtlinie: VDI 3405 Additive Fertigungsverfahren - Grundlagen, Begriffe, Verfahrensbeschreibungen. Vdi, 12 2014. URL: https://www. vdi.de/richtlinie/vdi_3405-additive_fertigungsverfahren_ grundlagen_begriffe_verfahrensbeschreibungen_/. [8] Iso 10303-21:2016 - industrial automation systems and integration – product data representation and exchange – part 21: Implementation methods: Clear text encoding of the exchange structure. Iso, 2016. URL: http://www.iso.org/iso/home/store/catalogue_ics/ catalogue_detail_ics.htm?csnumber=63141. [9] ISO/ASTM 52900:2015 Additive manufacturing — General principles — Terminology. Iso, 2016. URL: http://www.iso.org/iso/home/ store/catalogue_tc/catalogue_detail.htm?csnumber=69669. [10] ISO/ASTM 52915:2016 Specification for Additive Manufacturing File Format (AMF) Version 1.2. Iso, 2016. URL: http://www.iso.org/iso/home/store/catalogue_tc/catalogue_ detail.htm?csnumber=67472. [11] Göran Adamson, Lihui Wanga, Magnus Holm, and Philip Moore. Cloud manufacturing – a critical review of recent development and future trends. International Journal of Computer Integrated Manufacturing, pages 1–34, 2015. URL: http://dx.doi.org/10.1080/0951192X. 2015.1031704, doi:10.1080/0951192X.2015.1031704. 92 [12] Göran Adamson, Lihui Wang, and Magnus Holm. The State of the Art of Cloud Manufacturing and Future Trends. In ASME 2013 International Manufacturing Science and Engineering Conference collocated with the 41st North American Manufacturing Research Conference, volume 2, pages 1–9, 2013. URL: http://dx.doi.org/10.1115/ MSEC2013-1123, doi:10.1115/MSEC2013-1123. [13] Khubaib Amjad Alam, Rodina Ahmad, Adnan Akhunzada, Mohd Hairul Nizam Md Nasir, and Samee U. Khan. Impact analysis and change propagation in service-oriented enterprises: A systematic review. Information Systems, 54:43–73, 2015. URL: http://dx.doi. org/10.1016/j.is.2015.06.003, doi:10.1016/j.is.2015.06.003. [14] Daniel G. Aliaga and Mikhail J. Atallah. Genuinity Signatures: Designing Signatures for Verifying 3D Object Genuinity. Computer Graphics Forum, 28(2):437–446, 2009. URL: http://dx.doi.org/10.1111/j. 1467-8659.2009.01383.x, doi:10.1111/j.1467-8659.2009.01383. x. [15] Masoud Alimardani, Ehsan Toyserkani, and Jan P. Huissoon. A 3D dynamic numerical approach for temperature and thermal stress distributions in multilayer laser solid freeform fabrication process. Optics and Lasers in Engineering, 45(12):1115–1130, 2007. URL: http: //dx.doi.org/10.1016/j.optlaseng.2007.06.010, doi:10.1016/ j.optlaseng.2007.06.010. [16] American Society for Precision Engineering. Dimensional Accuracy and Surface Finish in Additive Manufacturing, 2014. URL: http://aspe.net/publications/spring_2014/ 2014aspespringproceedings-printfinal.pdf. [17] Yu an Jin, Yong He, Jian zhong Fu, Wen feng Gan, and Zhi wei Lin. Optimization of tool-path generation for material extrusion-based additive manufacturing technology. Additive Manufacturing, 1-4:32– 47, 2014. URL: http://dx.doi.org/10.1016/j.addma.2014.08.004, doi:10.1016/j.addma.2014.08.004. [18] Georgios Andreadis, Georgios Fourtounis, and Konstantinos-Dionysios Bouzakis. Collaborative design in the era of cloud computing. Advances in Engineering Software, 81:66–72, 2015. URL: http://dx.doi.org/ 93 10.1016/j.advengsoft.2014.11.002, doi:10.1016/j.advengsoft. 2014.11.002. [19] R. Anitha, S. Arunachalam, and P. Radhakrishnan. Critical parameters influencing the quality of prototypes in fused deposition modelling. Journal of Materials Processing Technology, 118(1–3):385–388, 2001. URL: http://dx.doi.org/10.1016/S0924-0136(01)00980-3, doi:10.1016/S0924-0136(01)00980-3. [20] Antonio Armillotta. Assessment of surface quality on textured FDM prototypes. Rapid Prototyping Journal, 12(1):35–41, 2006. URL: http://dx.doi.org/10.1108/13552540610637255, doi:10. 1108/13552540610637255. [21] Abbas Azari and Sakineh Nikzad. The evolution of rapid prototyping in dentistry: a review. Rapid Prototyping Journal, 15(3):216– 225, 2009. URL: http://dx.doi.org/10.1108/13552540910961946, doi:10.1108/13552540910961946. [22] Vincent A. Balogun, Neil Kirkwood, and Paul T. Mativenga. Energy consumption and carbon footprint analysis of Fused Deposition Modelling: A case study of RP Stratasys Dimension SST FDM. International Journal of Scientific & Engineering Research, 6(8):442–447, 8 2015. URL: http://www.ijser.org/ research-paper-publishing-august-2015_page3.aspx. [23] Vincent A. Balogun, Neil D. Kirkwood, and Paul T. Mativenga. Direct electrical energy demand in fused deposition modelling – in: 21st cirp conference on life cycle engineering. Procedia CIRP, 15:38–43, 2014. URL: http://dx.doi.org/10.1016/j.procir.2014.06.029, doi:10.1016/j.procir.2014.06.029. [24] Felix W. Baumann, Manuel Schön, Julian Eichhoff, and Dieter Roller. Concept Development of a Sensor Array for 3D Printer. In Procedia CIRP, 3rd ICRM 2016 International Conference on Ramp-Up Management, volume 51, pages 24–31, 2016. URL: http://dx.doi.org/ 10.1016/j.procir.2016.05.041, doi:10.1016/j.procir.2016.05. 041. 94 [25] Cindy Bayley, Lennart Bochmann, Colin Hurlbut, Moneer Helu, Robert Transchel, and David Dornfeld. Understanding Error Generation in Fused Deposition Modeling. In Proceedings of Dimensional Accuracy and Surface Finish in Additive Manufacturing : ASPE Spring Topical Meeting [16], pages 98–103. URL: http://e-citations. ethbib.ethz.ch/view/pub:146650. [26] Laura Bechthold, Veronika Fischer, Andre Hainzlmaier, Daniel Hugenroth, Ljudmila Ivanova, Kristina Kroth, Benedikt Römer, Edyta Sikorska, and Vincent Sitzmann. 3D Printing - A Qualitative Assessment of Applications, Recent Trends and the Technology’s Future Potential. Number 17-2015 in Studien zum deutschen Innovationssystem. Expertenkommission Forschung und Innovation (EFI), 2015. URL: http://www.e-fi.de/151.html. [27] Bernd Bertsche and Hans-Jörg Bullinger, editors. Entwicklung und Erprobung innovativer Produkte – Rapid Prototyping. VDI-Buch. Springer-Verlag Berlin Heidelberg, 1 edition, 2007. URL: http://dx.doi.org/10.1007/978-3-540-69880-7, doi:10. 1007/978-3-540-69880-7. [28] H. Bikas, Panagiotis Stavropoulos, and George Chryssolouris. Additive manufacturing methods and modelling approaches: a critical review. The International Journal of Advanced Manufacturing Technology, 83(1):389–405, 2016. URL: http://dx.doi.org/10.1007/ s00170-015-7576-2, doi:10.1007/s00170-015-7576-2. [29] Tobias Binz, Uwe Breitenbücher, Oliver Kopp, and Frank Leymann. TOSCA: Portable Automated Deployment and Management of Cloud Applications, pages 527–549. Springer New York, New York, NY, 2014. URL: http://dx.doi.org/10.1007/978-1-4614-7535-4_22, doi:10.1007/978-1-4614-7535-4_22. [30] Robert Bogue. 3d printing: the dawn of a new era in manufacturing? Assembly Automation, 33(4):307–311, 2013. URL: http://dx.doi. org/10.1108/AA-06-2013-055, doi:10.1108/AA-06-2013-055. [31] Kamaljit Singh Boparai, Rupinder Singh, and Harwinder Singh. Development of rapid tooling using fused deposition modeling: a review. Rapid Prototyping Journal, 22(2):281–299, 2016. 95 URL: http://dx.doi.org/10.1108/RPJ-04-2014-0048, 1108/RPJ-04-2014-0048. doi:10. [32] Alberto Boschetto and Luana Bottini. Accuracy prediction in fused deposition modeling. The International Journal of Advanced Manufacturing Technology, 73(5):913–928, 2014. URL: http://dx.doi.org/ 10.1007/s00170-014-5886-4, doi:10.1007/s00170-014-5886-4. [33] Alberto Boschetto and Luana Bottini. Design for manufacturing of surfaces to improve accuracy in Fused Deposition Modeling. Robotics and Computer-Integrated Manufacturing, 37:103–114, 2016. URL: http://dx.doi.org/10.1016/j.rcim.2015.07.005, doi:10. 1016/j.rcim.2015.07.005. [34] David L. Bourell, David W. Rosen, and Ming C. Leu. The Roadmap for Additive Manufacturing and Its Impact. 3D Printing and Additive Manufacturing, 1(1):6–9, 2014. URL: http://dx.doi.org/10.1089/ 3dp.2013.0002, doi:10.1089/3dp.2013.0002. [35] Florent Le Bourhis, Olivier Kerbrat, Lucas Dembinski, Jean-Yves Hascoet, and Pascal Mognol. Predictive Model for Environmental Assessment in Additive Manufacturing Process - In: 21st CIRP Conference on Life Cycle Engineering. Procedia CIRP, 15:26–31, 2014. URL: http://dx.doi.org/10.1016/j.procir.2014.06.031, doi:10.1016/j.procir.2014.06.031. [36] David Brackett, Ian Ashcroft, and Richard J. M. Hague. Topology Optimization for Additive Manufacturing. In Proceedings of the TwentySecond Solid Freeform Fabrication (SFF) Symposium, pages 348–362, 2011. URL: http://sffsymposium.engr.utexas.edu/2011TOC. [37] Tomaz Brajlih, Bogdan Valentan, Joze Balic, and Igor Drstvensek. Speed and accuracy evaluation of additive manufacturing machines. Rapid Prototyping Journal, 17(1):64–75, 2011. URL: http://dx.doi.org/10.1108/13552541111098644, doi:10.1108/13552541111098644. [38] Christian Brecher, Wolfram Lohse, and Mirco Vitr. Advanced Design and Manufacturing Based on STEP, chapter Module-based Platform for Seamless Interoperable CAD-CAM-CNC Planning, pages 439– 462. Springer Series in Advanced Manufacturing. Springer London, 96 2009. URL: http://dx.doi.org/10.1007/978-1-84882-739-4_20, doi:10.1007/978-1-84882-739-4_20. [39] Susan M. Bridges, Ken Keiser, Nathan Sissom, and Sara J. Graves. Cyber security for additive manufacturing. In Proceedings of the 10th Annual Cyber and Information Security Research Conference, CISR ’15, pages 1–3, New York, NY, USA, 2015. ACM. URL: http://doi.acm. org/10.1145/2746266.2746280, doi:10.1145/2746266.2746280. [40] Gail Brooks, Kim Kinsley, and Tim Owens. 3d printing as a consumer technology business model. International Journal of Management & Information Systems, 18(4):271–280, 9 2014. URL: http://dx.doi.org/ 10.19030/ijmis.v18i4.8819, doi:10.19030/ijmis.v18i4.8819. [41] Mark A. Buckner and Lonnie J. Love. Automating and accelerating the additive manufacturing design process with multi-objective constrained evolutionary optimization and hpc/cloud computing. In Future of Instrumentation International Workshop (FIIW), 2012, pages 1–4, 2012. URL: http://dx.doi.org/10.1109/FIIW.2012.6378352, doi:10.1109/FIIW.2012.6378352. [42] Erin Buehler, Niara Comrie, Megan Hofmann, Samantha McDonald, and Amy Hurst. Investigating the Implications of 3D Printing in Special Education. ACM Trans. Access. Comput., 8(3):1–28, 3 2016. URL: http://doi.acm.org/10.1145/2870640, doi:10.1145/2870640. [43] X. T. Cai, W. D. Li, F. Z. He, and Y. Q. Wu. Operation-effects merging for collaborative design of personalized product. In Computer Supported Cooperative Work in Design (CSCWD), 2015 IEEE 19th International Conference on, pages 489–493, 2015. URL: http: //dx.doi.org/10.1109/CSCWD.2015.7231008, doi:10.1109/CSCWD. 2015.7231008. [44] R. Ian Campbell, Deon J. de Beer, and Eujin Pei. Additive manufacturing in South Africa: building on the foundations. Rapid Prototyping Journal, 17(2):156–162, 2011. URL: http://dx.doi.org/10.1108/ 13552541111113907, doi:10.1108/13552541111113907. [45] Yang Cao, Shilong Wang, Ling Kang, and Yuan Gao. A tqcs-based service selection and scheduling strategy in cloud manufacturing. The In97 ternational Journal of Advanced Manufacturing Technology, 82(1):235– 251, 2016. URL: http://dx.doi.org/10.1007/s00170-015-7350-5, doi:10.1007/s00170-015-7350-5. [46] Andrea Caputo, Giacomo Marzi, and Massimiliano Matteo Pellegrini. The Internet of Things in manufacturing innovation processes: Development and application of a conceptual framework. Business Process Management Journal, 22(2):383–402, 2016. URL: http://dx.doi.org/10.1108/BPMJ-05-2015-0072, doi:10. 1108/BPMJ-05-2015-0072. [47] Jasper Cerneels, André Voet, Jan Ivens, and Jean-Pierre Kruth. Additive manufacturing of thermoplastic composites. In Proceedings of the COMPOSITES WEEK @ LEUVEN AND TEXCOMP-11 CONFERENCE, pages 1–7, 2013. URL: https://lirias.kuleuven.be/ handle/123456789/419132. [48] Gilbert Chahine, Pauline Smith, and Radovan Kovacevic. Application of Topology Optimization in Modern Additive Manufacturing. In Proceedings of the Twenty-First Solid Freeform Fabrication (SFF) Symposium, pages 606–618, 2010. URL: http://sffsymposium.engr. utexas.edu/2010TOC. [49] Danny S. K. Chan. Simulation modelling in virtual manufacturing analysis for integrated product and process design. Assembly Automation, 23(1):69–74, 2003. URL: http://dx.doi.org/10.1108/ 01445150310460114, doi:10.1108/01445150310460114. [50] Li Chen, Hong Deng, Qianni Deng, and Zhenyu Wu. Framework for grid manufacturing. Tsinghua Science and Technology, 9(3):327–330, 6 2004. [51] Toly Chen and Horng-Ren Tsai. Ubiquitous manufacturing: Current practices, challenges, and opportunities. Robotics and ComputerIntegrated Manufacturing, pages 1–7, 2016. URL: http://dx.doi. org/10.1016/j.rcim.2016.01.001, doi:10.1016/j.rcim.2016.01. 001. [52] W. Cheng, J. Y. H. Fuh, A. Y. C. Nee, Y. S. Wong, H. T. Loh, and T. Miyazawa. Multi-objective optimization of part-building ori98 entation in stereolithography. Rapid Prototyping Journal, 1(4):12– 23, 1995. URL: http://dx.doi.org/10.1108/13552549510104429, doi:10.1108/13552549510104429. [53] Ying Cheng, Fei Tao Yilong Liu, Dongming Zhao, Lin Zhang, and Lida Xu. Energy-aware resource service scheduling based on utility evaluation in cloud manufacturing system. Proceedings of the Institution of Mechanical Engineers, Part B: Journal of Engineering Manufacture, 2013. URL: http://dx.doi.org/10.1177/0954405413492966, doi:10.1177/0954405413492966. [54] Jin Choi, O-Chang Kwon, Wonjin Jo, Heon Ju Lee, and Myoung-Woon Moon. 4D Printing Technology: A Review. 3D Printing and Additive Manufacturing, 2(4):159–167, 2015. URL: http://dx.doi.org/10. 1089/3dp.2015.0039, doi:10.1089/3dp.2015.0039. [55] Won-Shik Chu, Chung-Soo Kim, Hyun-Taek Lee, Jung-Oh Choi, Jae-Il Park, Ji-Hyeon Song, Ki-Hwan Jang, and Sung-Hoon Ahn. Hybrid manufacturing in micro/nano scale: A Review. International Journal of Precision Engineering and Manufacturing-Green Technology, 1(1):75–92, 2014. URL: http://dx.doi.org/10.1007/ s40684-014-0012-5, doi:10.1007/s40684-014-0012-5. [56] Chee Kai Chua, Kah Fai Leong, and Zhong Hong Liu. Rapid Tooling in Manufacturing, pages 2525–2549. Springer London, London, 2015. URL: http://dx.doi.org/10.1007/978-1-4471-4670-4_39, doi:10.1007/978-1-4471-4670-4_39. [57] Brett P. Conner, Guha P. Manogharan, Ashley N. Martof, Lauren M. Rodomsky, Caitlyn M. Rodomsky, Dakesha C. Jordan, and James W. Limperos. Making sense of 3-D printing: Creating a map of additive manufacturing products and services. Additive Manufacturing, 1-4:64– 76, 2014. Inaugural Issue. URL: http://dx.doi.org/10.1016/j. addma.2014.08.005, doi:10.1016/j.addma.2014.08.005. [58] Henrique de Amorim Almeida and Paulo Jorge da Silva Bártolo. Virtual topological optimisation of scaffolds for rapid prototyping. Medical Engineering & Physics, 32(7):775–782, 2010. URL: http: //dx.doi.org/10.1016/j.medengphy.2010.05.001, doi:10.1016/ j.medengphy.2010.05.001. 99 [59] Jan Deckers, Jef Vleugels, and Jean-Pierre Kruth. Additive manufacturing of ceramics: A review. Journal of Ceramic Science and Technology, 5(4):245–260, 2014. URL: http://dx.doi.org/10.4416/ JCST2014-00032, doi:10.4416/JCST2014-00032. [60] Olaf Diegel, Sarat Singamneni, Stephen Reay, and Andrew Withell. Tools for sustainable product design: Additive manufacturing. Journal of Sustainable Development, 3(3):68–75, 2010. URL: http://www.ccsenet.org/journal/index.php/jsd/article/ view/6456, doi:10.5539/jsd.v3n3p68. [61] Dimitar Dimitrov, Kristiaan Schreve, and N. de Beer. Advances in three dimensional printing – state of the art and future perspectives. Rapid Prototyping Journal, 12(3):136–147, 2006. URL: http://dx.doi.org/10.1108/13552540610670717, doi:10. 1108/13552540610670717. [62] Donghong Ding, Zengxi Pan, Dominic Cuiuri, and Huijun Li. Wire-feed additive manufacturing of metal components: technologies, developments and future interests. The International Journal of Advanced Manufacturing Technology, 81(1):465–481, 2015. URL: http://dx.doi.org/10.1007/s00170-015-7077-3, doi:10. 1007/s00170-015-7077-3. [63] Donghong Ding, Zengxi Pan, Dominic Cuiuri, Huijun Li, and Stephen van Duin. Advanced Design for Additive Manufacturing: 3D Slicing and 2D Path Planning, chapter 1, pages 3–23. InTech, 2016. URL: http://dx.doi.org/10.5772/63042, doi:10.5772/63042. [64] J. Ding, P. Colegrove, J. Mehnen, S. Ganguly, P. M. Sequeira Almeida, F. Wang, and S. Williams. Thermo-mechanical analysis of Wire and Arc Additive Layer Manufacturing process on large multi-layer parts. Computational Materials Science, 50(12):3315–3322, 2011. URL: http://dx.doi.org/10.1016/j.commatsci.2011.06. 023, doi:10.1016/j.commatsci.2011.06.023. [65] Kyle Dolinsky. CAD’s Cradle: Untangling Copyrightability, Derivative Works, and Fair Use in 3D Printing. Washington & Lee Law Review, 71(1):593–681, 2014. URL: http://scholarlycommons.law. wlu.edu/wlulr/vol71/iss1/14. 100 [66] Yucong Duan, Yuan Cao, and Xiaobing Sun. Various ”aas” of everything as a service. In Software Engineering, Artificial Intelligence, Networking and Parallel/Distributed Computing (SNPD), 2015 16th IEEE/ACIS International Conference on, pages 1–6, 6 2015. URL: http://dx.doi.org/10.1109/SNPD.2015.7176215, doi: 10.1109/SNPD.2015.7176215. [67] K. Efthymiou, A. Pagoropoulos, N. Papakostas, D. Mourtzis, and G. Chryssolouris. Manufacturing systems complexity review: Challenges and outlook - in: 45th cirp conference on manufacturing systems 2012. Procedia CIRP, 3:644–649, 2012. URL: http://dx.doi.org/ 10.1016/j.procir.2012.07.110, doi:10.1016/j.procir.2012.07. 110. [68] Salah A.M. Elmoselhy. Hybrid lean–agile manufacturing system technical facet, in automotive sector. Journal of Manufacturing Systems, 32(4):598–619, 2013. URL: http://dx.doi.org/10.1016/j.jmsy. 2013.05.011, doi:10.1016/j.jmsy.2013.05.011. [69] Asif Equbal, Anoop Kumar Sood, and S. S. Mahapatra. Prediction of dimensional accuracy in fused deposition modelling: a fuzzy logic approach. International Journal of Productivity and Quality Management, 7(1):22–43, 2011. URL: http://www. inderscienceonline.com/doi/abs/10.1504/IJPQM.2011.03773, doi:10.1504/IJPQM.2011.03773. [70] Azhar Equbal, Anoop Kumar Sood, and Mohammad Shamim. Rapid tooling: A major shift in tooling practice. Journal of Manufacturing and Industrial Engineering, 14(3–4):1–9, 2015. URL: http://dx.doi. org/10.12776/mie.v14i3-4.325, doi:10.12776/mie.v14i3-4.325. [71] Behzad Esmaeilian, Sara Behdad, and Ben Wang. The evolution and future of manufacturing: A review. Journal of Manufacturing Systems, 39:79–100, 4 2016. URL: http://dx.doi.org/10.1016/j.jmsy. 2016.03.001, doi:10.1016/j.jmsy.2016.03.001. [72] Daniel Eyers and Krassimir Dotchev. Technology review for mass customisation using rapid manufacturing. Assembly Automation, 30(1):39–46, 2010. URL: http://dx.doi.org/10.1108/ 01445151011016055, doi:10.1108/01445151011016055. 101 [73] Georges M. Fadel and Chuck Kirschman. Accuracy issues in cad to rp translations. Rapid Prototyping Journal, 2(2):4–17, 1996. URL: http://dx.doi.org/10.1108/13552549610128189, doi:10. 1108/13552549610128189. [74] Rouhollah Dermanaki Farahani, Kambiz Chizari, and Daniel Therriault. Three-dimensional printing of freeform helical microstructures: a review. Nanoscale, 6:10470–10485, 2014. URL: http://dx.doi.org/ 10.1039/C4NR02041C, doi:10.1039/C4NR02041C. [75] Sharon Flank, Gary E. Ritchie, and Rebecca Maksimovic. Anticounterfeiting Options for Three-Dimensional Printing. 3D Printing and Additive Manufacturing, 2(4):180–189, 12 2015. URL: http://dx.doi. org/10.1089/3dp.2015.0007, doi:10.1089/3dp.2015.0007. [76] Martina Flatscher and Andreas Riel. Stakeholder integration for the successful product–process co-design for next-generation manufacturing technologies. {CIRP} Annals - Manufacturing Technology, 65(1):181–184, 2016. URL: http://dx.doi.org/10.1016/j.cirp. 2016.04.055, doi:10.1016/j.cirp.2016.04.055. [77] Flavio S. Fogliatto, Giovani J.C. da Silveira, and Denis Borenstein. The mass customization decade: An updated review of the literature. International Journal of Production Economics, 138(1):14– 25, 2012. URL: http://dx.doi.org/10.1016/j.ijpe.2012.03.002, doi:10.1016/j.ijpe.2012.03.002. [78] Stephen Fox. Potential of virtual-social-physical convergence for project manufacturing. Journal of Manufacturing Technology Management, 25(8):1209–1223, 2014. URL: http://dx.doi.org/10.1108/ JMTM-01-2013-0008, doi:10.1108/JMTM-01-2013-0008. [79] William E. Frazier. Metal additive manufacturing: A review. Journal of Materials Engineering and Performance, 23(6):1917–1928, 2014. URL: http://dx.doi.org/10.1007/s11665-014-0958-z, doi: 10.1007/s11665-014-0958-z. [80] Luigi Maria Galantucci, Fulvio Lavecchia, and Gianluca Percoco. Study of compression properties of topologically optimized {FDM} made structured parts. {CIRP} Annals - Manufacturing Technology, 102 57(1):243–246, 2008. URL: http://dx.doi.org/10.1016/j.cirp. 2008.03.009, doi:10.1016/j.cirp.2008.03.009. [81] Jerry Gao, Xiaoying Bai, and Wei-Tek Tsai. Testing as a service (taas) on clouds. In Service Oriented System Engineering (SOSE), 2013 IEEE 7th International Symposium on, pages 212–223, 3 2013. doi:10.1109/ SOSE.2013.66. [82] R. Gao, L. Wang, R. Teti, D. Dornfeld, S. Kumara, M. Mori, and M. Helu. Cloud-enabled prognosis for manufacturing. {CIRP} Annals - Manufacturing Technology, 64(2):749–772, 2015. URL: http:// dx.doi.org/10.1016/j.cirp.2015.05.011, doi:10.1016/j.cirp. 2015.05.011. [83] Wei Gao, Yunbo Zhang, Devarajan Ramanujan, Karthik Ramani, Yong Chen, Christopher B. Williams, Charlie C. L. Wang, Yung C. Shin, Song Zhang, and Pablo D. Zavattieri. The status, challenges, and future of additive manufacturing in engineering. Computer-Aided Design, 69:65–89, 2015. URL: http://dx.doi.org/10.1016/j.cad.2015.04. 001, doi:10.1016/j.cad.2015.04.001. [84] Julien Gardan. Additive manufacturing technologies: state of the art and trends. International Journal of Production Research, 54(10):3118– 3132, 2016. URL: http://dx.doi.org/10.1080/00207543.2015. 1115909, doi:10.1080/00207543.2015.1115909. [85] Nicolas Gardan. Knowledge Management for Topological Optimization Integration in Additive Manufacturing. International Journal of Manufacturing Engineering, 2014:1–9, 2014. URL: http://dx.doi.org/ 10.1155/2014/356256, doi:10.1155/2014/356256. [86] Nicolas Gardan and Alexandre Schneider. Topological optimization of internal patterns and support in additive manufacturing. Journal of Manufacturing Systems, 37(1):417–425, 2015. URL: http://dx.doi. org/10.1016/j.jmsy.2014.07.003, doi:10.1016/j.jmsy.2014.07. 003. [87] Ashu Garg, Anirban Bhattacharya, and Ajay Batish. On Surface Finish and Dimensional Accuracy of FDM Parts after Cold Vapor Treatment. Materials and Manufacturing Processes, 31(4):522–529, 103 2016. URL: http://dx.doi.org/10.1080/10426914.2015.1070425, doi:10.1080/10426914.2015.1070425. [88] Andreas Gebhardt. Generative Fertigungsverfahren. Carl Hanser Verlag GmbH & Co. KG, 4., neu bearbeitete und erweiterte auflage edition, 2013. URL: http://www.hanser-elibrary.com/doi/book/10.3139/ 9783446436527, doi:10.3139/9783446436527. [89] Ian Gibson, David Rosen, and Brent Stucker. Additive Manufacturing Technologies - 3D Printing, Rapid Prototyping, and Direct Digital Manufacturing. Springer New York, 2 edition, 2015. URL: http://dx.doi.org/10.1007/978-1-4939-2113-3, doi:10. 1007/978-1-4939-2113-3. [90] Xibing Gong, Ted Anderson, and Kevin Chou. Review on powder-based electron beam additive manufacturing technology. In ASME/ISCIE 2012 International Symposium on Flexible Automation, pages 507–515, 2012. URL: http://dx.doi.org/10.1115/ ISFA2012-7256, doi:10.1115/ISFA2012-7256. [91] James Grimmelmann. Indistinguishable from Magic: A Wizard’s Guide to Copyright and 3D Printing. Washington & Lee Law Review, 71(1):683–698, 2014. URL: http://scholarlycommons.law. wlu.edu/wlulr/vol71/iss1/14. [92] Bethany C. Gross, Jayda L. Erkal, Sarah Y. Lockwood, Chengpeng Chen, and Dana M. Spence. Evaluation of 3D Printing and Its Potential Impact on Biotechnology and the Chemical Sciences. Analytical Chemistry, 86(7):3240–3253, 2014. URL: http://dx.doi.org/10. 1021/ac403397r, doi:10.1021/ac403397r. [93] Dongdong Gu, Wilhelm Meiners, Konrad Wissenbach, and Reinhart Poprawe. Laser additive manufacturing of metallic components: materials, processes and mechanisms. International Materials Reviews, 57(3):133–164, 2012. URL: http://dx.doi.org/10.1179/ 1743280411Y.0000000014, doi:10.1179/1743280411Y.0000000014. [94] Qing Gu and Patricia Lago. Exploring service-oriented system engineering challenges: a systematic literature review. Service Oriented Computing and Applications, 3(3):171–188, 2009. 104 URL: http://dx.doi.org/10.1007/s11761-009-0046-7, doi:10. 1007/s11761-009-0046-7. [95] Sofiane Guessasma, Weihong Zhang, Jihong Zhu, Sofiane Belhabib, and Hedi Nouri. Challenges of additive manufacturing technologies from an optimisation perspective. International Journal for Simulation and Multidisciplinary Design Optimization, 6, 2015. URL: http://dx. doi.org/10.1051/smdo/2016001, doi:10.1051/smdo/2016001. [96] Liang Guo. A system design method for cloud manufacturing application system. The International Journal of Advanced Manufacturing Technology, 84(1):275–289, 2016. URL: http://dx.doi.org/10. 1007/s00170-015-8092-0, doi:10.1007/s00170-015-8092-0. [97] Nannan Guo and Ming C. Leu. Additive manufacturing: technology, applications and research needs. Frontiers of Mechanical Engineering, 8(3):215–243, 2013. URL: http://dx.doi.org/10.1007/ s11465-013-0248-8, doi:10.1007/s11465-013-0248-8. [98] Vikas Gupta, V. K. Bajpai, and Puneet Tandon. Slice Generation and Data Retrieval Algorithm for Rapid Manufacturing of Heterogeneous Objects. Computer-Aided Design and Applications, 11(3):255–262, 2014. URL: http://dx.doi.org/10.1080/16864360.2014.863483, doi:10.1080/16864360.2014.863483. [99] Mervi Hämäläinen and Arto Ojala. Additive manufacturing technology: Identifying value potential in additive manufacturing stakeholder groups and business networks. In AMCIS 2015 : Proceedings of the Twenty-first Americas Conference on Information Systems, pages 1– 10. AIS Electronic Library (AISeL), 2015. URL: http://urn.fi/URN: NBN:fi:jyu-201508192705. [100] Hans Nørgaard Hansen, Jakob Skov Nielsen, Jakob Rasmussen, and David Bue Pedersen. Performance verification of 3D printers. In Proceedings of ASPE 2014 Spring Topical Meeting: Dimensional Accuracy and Surface Finish in Additive Manufacturing [16], pages 104–108. URL: http://findit.dtu.dk/en/catalog/2289698722. [101] Saad Hasan, Allan Rennie, and Jamal Hasan. The Business Model for the Functional Rapid Manufacturing Supply Chain. Studia commer105 cialia Bratislavensia, 6(24):536–552, 12 2013. URL: http://dx.doi. org/10.2478/stcb-2013-0008, doi:10.2478/stcb-2013-0008. [102] Wu He and Lida Xu. A state-of-the-art survey of cloud manufacturing. International Journal of Computer Integrated Manufacturing, 28(3):239–250, 2015. URL: http://dx.doi.org/10.1080/0951192X. 2013.874595, doi:10.1080/0951192X.2013.874595. [103] P. Hernández, M. D. Monzón, A. N. Benı́tez, M. Marrero, Z. Ortega, N. Dı́az, and F. Ortega. Rapid manufacturing experience in training. In New Frontiers in Manufacturing Engineering and Materials Processing Training and Learning, volume 759 of Materials Science Forum, pages 47–54. Trans Tech Publications, 7 2013. doi: 10.4028/www.scientific.net/MSF.759.47. [104] Jonathan Hiller and Hod Lipson. Design and analysis of digital materials for physical 3d voxel printing. Rapid Prototyping Journal, 15(2):137–149, 2009. URL: http://dx.doi.org/10.1108/ 13552540910943441, doi:10.1108/13552540910943441. [105] Jonathan D. Hiller and Hod Lipson. Multi Material Topological Optimization of Structures and Mechanisms. In Proceedings of the 11th Annual Conference on Genetic and Evolutionary Computation, GECCO ’09, pages 1521–1528, New York, NY, USA, 2009. ACM. URL: http: //doi.acm.org/10.1145/1569901.1570105, doi:10.1145/1569901. 1570105. [106] Neil Hopkinson and Phill Dickens. Rapid prototyping for direct manufacture. Rapid Prototyping Journal, 7(4):197–202, 2001. URL: http://dx.doi.org/10.1108/EUM0000000005753, doi: 10.1108/EUM0000000005753. [107] Neil Hopkinson and Phill Dickens. Analysis of rapid manufacturing — using layer manufacturing processes for production. Proceedings of the Institution of Mechanical Engineers, Part C: Journal of Mechanical Engineering Science, 217(1):31–39, 2003. URL: http://pic.sagepub.com/content/217/1/31.abstract, doi: 10.1243/095440603762554596. 106 [108] Neil Hopkinson, Richard J. M. Hague, and Phill M. Dickens, editors. Rapid Manufacturing: An Industrial Revolution for the Digital Age. John Wiley & Sons, Ltd, 1 edition, 2006. URL: http://dx.doi.org/ 10.1002/0470033991, doi:10.1002/0470033991. [109] Timothy J. Horn and Ola L. A. Harrysson. Overview of current additive manufacturing technologies and selected applications. Science Progress, 95(3):255–282, 2012. URL: http: //dx.doi.org/10.3184/003685012X13420984463047, doi:10.3184/ 003685012X13420984463047. [110] Jong-Uk Hou, Do-Gon Kim, Sunghee Choi, and Heung-Kyu Lee. 3D Print-Scan Resilient Watermarking Using a Histogram-Based Circular Shift Coding Structure. In Proceedings of the 3rd ACM Workshop on Information Hiding and Multimedia Security, IH&MMSec ’15, pages 115–121, New York, NY, USA, 2015. ACM. URL: http://doi.acm. org/10.1145/2756601.2756607, doi:10.1145/2756601.2756607. [111] Tsung-Jung Hsu and Wei-Hsiang Lai. Manufacturing parts optimization in the three-dimensional printing process by the Taguchi method. Journal of the Chinese Institute of Engineers, 33(1):121–130, 2010. URL: http://dx.doi.org/10.1080/02533839.2010.9671604, doi:10.1080/02533839.2010.9671604. [112] Bo hu Li, Lin Zhang, Shi long Wang, Fei Tao, Jun wei Cao, Xiao dan Jiang, Xiao Song, and Xu dong Chai. Cloud manufacturing:a new service-oriented networked manufacturing model. Computer Integrated Manufacturing Systems, 16(1), 2010. URL: http://www. cims-journal.cn/EN/Y2010/V16/I01/0. [113] Samuel H. Huang, Peng Liu, Abhiram Mokasdar, and Liang Hou. Additive manufacturing and its societal impact: a literature review. The International Journal of Advanced Manufacturing Technology, 67(5):1191–1203, 2013. URL: http://dx.doi.org/10.1007/ s00170-012-4558-5, doi:10.1007/s00170-012-4558-5. [114] Xiaorong Huang, Baigang Du, Libo Sun, Feng Chen, and Wei Dai. Service requirement conflict resolution based on ant colony optimization in group-enterprises-oriented cloud manufacturing. The International Journal of Advanced Manufacturing Technology, 84(1):183– 107 196, 2016. URL: http://dx.doi.org/10.1007/s00170-015-7961-x, doi:10.1007/s00170-015-7961-x. [115] Yong Huang, Ming C. Leu, Jyoti Mazumder, and Alkan Donmez. Additive manufacturing: Current state, future potential, gaps and needs, and recommendations. Journal of Manufacturing Science and Engineering, 137(1):014001–014011, 2 2015. URL: http://dx.doi.org/ 10.1115/1.4028725, doi:10.1115/1.4028725. [116] R. Ippolito, L. Iuliano, and A. Gatto. Benchmarking of rapid prototyping techniques in terms of dimensional accuracy and surface finish. CIRP Annals - Manufacturing Technology, 44(1):157–160, 1995. URL: http://dx.doi.org/10.1016/S0007-8506(07)62296-3, doi: 10.1016/S0007-8506(07)62296-3. [117] Iñigo Flores Ituarte, Eric Coatanea, Mika Salmi, Jukka Tuomi, and Jouni Partanen. Additive manufacturing in production: A study case applying technical requirements - in: 15th nordic laser materials processing conference, nolamp 15. Physics Procedia, 78:357–366, 2015. URL: http://dx.doi.org/10.1016/j.phpro.2015.11.050, doi:10. 1016/j.phpro.2015.11.050. [118] Olga Ivanova, Christopher Williams, and Thomas Campbell. Additive manufacturing (am) and nanotechnology: promises and challenges. Rapid Prototyping Journal, 19(5):353–364, 2013. URL: http://dx.doi.org/10.1108/RPJ-12-2011-0127, doi:10. 1108/RPJ-12-2011-0127. [119] Ron Jamieson and Herbert Hacker. Direct slicing of cad models for rapid prototyping. Rapid Prototyping Journal, 1(2):4–12, 1995. URL: http://dx.doi.org/10.1108/13552549510086826, doi: 10.1108/13552549510086826. [120] C. F. Jian and Y. Wang. Batch Task Scheduling-Oriented Optimization Modelling and Simulation in Cloud Manufacturing. International Journal of Simulation Modelling, 13(1):93–101, 2014. URL: http://dx. doi.org/10.2507/IJSIMM13(1)CO2, doi:10.2507/IJSIMM13(1)CO2. [121] Mathias Johanson, Magnus Löfstrand, and Lennart KARLSSON. Collaborative innovation through distributed engineering services. In Proceedings of International Multi-Conference 108 on Engineering and Technological Innovation, pages 10–13, 2009. URL: http://pure.ltu.se/portal/en/publications/ collaborative-innovation-through-distributed-engineering-services(e7027d30-af .html. [122] Min Jou and Jingying Wang. Observations of achievement and motivation in using cloud computing driven CAD: Comparison of college students with high school and vocational high school backgrounds. Computers in Human Behavior, 29(2):364–369, 2013. Advanced HumanComputer Interaction. URL: http://dx.doi.org/10.1016/j.chb. 2012.08.001, doi:10.1016/j.chb.2012.08.001. [123] Dalton Alexandre Kai, Edson Pinheiro de Lima, Marlon Wesley Machado Cunico, and Sergio Eduardo Gouvêa da Costa. Additive Manufacturing: A New Paradigm For Manufacturing. In H. Yang, Z. Kong, and M. D. Sarder, editors, Proceedings of the 2016 Industrial and Systems Engineering Research Conference, pages 1–6, 2016. URL: https://www.researchgate.net/publication/304148343_ Additive_Manufacturing_A_New_Paradigm_For_Manufacturing. [124] Hyoung Seok Kang, Ju Yeon Lee, SangSu Choi, Hyun Kim, Jun Hee Park, Ji Yeon Son, Bo Hyun Kim, and Sang Do Noh. Smart manufacturing: Past research, present findings, and future directions. International Journal of Precision Engineering and Manufacturing-Green Technology, 3(1):111–128, 2016. URL: http://dx.doi.org/10.1007/ s40684-016-0015-5, doi:10.1007/s40684-016-0015-5. [125] K. P. Karunakaran, Alain Bernard, S. Suryakumar, Lucas Dembinski, and Georges Taillandier. Rapid manufacturing of metallic objects. Rapid Prototyping Journal, 18(4):264–280, 2012. URL: http://dx.doi.org/10.1108/13552541211231644, doi:10. 1108/13552541211231644. [126] Ihab E. Katatny, S. H. Masood, and Y. S. Morsi. Evaluation and Validation of the Shape Accuracy of FDM Fabricated Medical Models. Advanced Materials Research, 83–86:275–280, 2010. URL: http: //dx.doi.org/10.4028/www.scientific.net/AMR.83-86.275, doi: 10.4028/www.scientific.net/AMR.83-86.275. 109 [127] Blake A. Kendrick, Vimal Dhokia, and Stephen T. Newman. Strategies to realize decentralized manufacture through hybrid manufacturing platforms. Robotics and Computer-Integrated Manufacturing, Robotics and Computer-Integrated Manufacturing, 2015. In Press. URL: http://dx.doi.org/10.1016/j.rcim.2015.11.007, doi:10. 1016/j.rcim.2015.11.007. [128] Jean-Pierre Kenné, Pierre Dejax, and Ali Gharbi. Production planning of a hybrid manufacturing–remanufacturing system under uncertainty within a closed-loop supply chain. International Journal of Production Economics, 135(1):81–93, 2012. Advances in Optimization and Design of Supply Chains. URL: http://dx.doi.org/10.1016/j.ijpe.2010. 10.026, doi:10.1016/j.ijpe.2010.10.026. [129] Olivier Kerbrat, Pascal Mognol, and Jean-Yves Hascoet. A new DFM approach to combine machining and additive manufacturing. Computers in Industry, 62(7):684–692, 9 2011. URL: http://dx.doi.org/ 10.1016/j.compind.2011.04.003, doi:10.1016/j.compind.2011. 04.003. [130] Siddhartha Kumar Khaitan and James D. McCalley. Design Techniques and Applications of Cyberphysical Systems: A Survey. IEEE Systems Journal, 9(2):350–365, 6 2014. URL: http://dx.doi.org/ 10.1109/JSYST.2014.2322503, doi:10.1109/JSYST.2014.2322503. [131] Siavash H. Khajavi, Jouni Partanen, and Jan Holmström. Additive manufacturing in the spare parts supply chain. Computers in Industry, 65(1):50–63, 2014. URL: http://dx.doi.org/10.1016/j.compind. 2013.07.008, doi:10.1016/j.compind.2013.07.008. [132] Ateeq Khan and Klaus Turowski. Proceedings of the First International Scientific Conference “Intelligent Information Technologies for Industry” (IITI’16) - Volume 1, volume 450 of Advances in Intelligent Systems and Computing, chapter A Survey of Current Challenges in Manufacturing Industry and Preparation for Industry 4.0, pages 15–26. Springer International Publishing, 2016. URL: http://dx.doi.org/10.1007/978-3-319-33609-1_2, doi:10. 1007/978-3-319-33609-1_2. 110 [133] Zhong Xun Khoo, Joanne Ee Mei Teoh, Yong Liu, Chee Kai Chua, Shoufeng Yang, Jia An, Kah Fai Leong, and Wai Yee Yeong. 3d printing of smart materials: A review on recent progresses in 4d printing. Virtual and Physical Prototyping, 10(3):103–122, 2015. URL: http://dx.doi.org/10.1080/17452759.2015.1097054, doi: 10.1080/17452759.2015.1097054. [134] Duck Bong Kim, Paul Witherell, Robert Lipman, and Shaw C. Feng. Streamlining the additive manufacturing digital spectrum: A systems approach. Additive Manufacturing, 5:20–30, 2014. URL: http://dx.doi.org/10.1016/j.addma.2014.10.004, doi:10.1016/ j.addma.2014.10.004. [135] D. King and T. Tansey. Alternative materials for rapid tooling. Journal of Materials Processing Technology, 121(2-3):313–317, 2002. URL: http://dx.doi.org/10.1016/S0924-0136(01)01145-1, doi: 10.1016/S0924-0136(01)01145-1. [136] Fritz Klocke. Fertigungsverfahren 5 - Gießen, Pulvermetallurgie, Additive Manufacturing. VDI-Buch. Springer Berlin Heidelberg, 4 edition, 2015. URL: http://link.springer.com/book/10.1007/ 978-3-540-69512-7, doi:10.1007/978-3-540-69512-7. [137] J.-P. Kruth, M. C. Leu, and T. Nakagawa. Progress in additive manufacturing and rapid prototyping. CIRP Annals - Manufacturing Technology, 47(2):525–540, 1998. URL: http://www. sciencedirect.com/science/article/pii/S0007850607632405, doi:10.1016/S0007-8506(07)63240-5. [138] Sylvain Kubler, Jan Holmström, Kary Främling, and Petra Turkama. Technological Theory of Cloud Manufacturing, pages 267–276. Springer International Publishing, Cham, 2016. URL: http://dx.doi.org/10. 1007/978-3-319-30337-6_24, doi:10.1007/978-3-319-30337-6_ 24. [139] Hermann Kuehnle. Distributed manufacturing (dm) - smart units and collaborative processes. International Journal of Social, Behavioral, Educational, Economic, Business and Industrial Engineering, 9(4):1230–1241, 2015. URL: http://waset.org/Publications?p= 100. 111 [140] Roland Lachmayer, Rene Bastian Lippert, and Thomas Fahlbusch, editors. 3D-Druck beleuchtet. Springer Berlin Heidelberg, 1 edition, 2016. URL: http://link.springer.com/book/10.1007/ 978-3-662-49056-3, doi:10.1007/978-3-662-49056-3. [141] Y. Laili, L. Zhang, and Fei Tao. Energy adaptive immune genetic algorithm for collaborative design task scheduling in cloud manufacturing system. In Industrial Engineering and Engineering Management (IEEM), 2011 IEEE International Conference on, pages 1912–1916, 12 2011. URL: http://dx.doi.org/10.1109/IEEM.2011.6118248, doi:10.1109/IEEM.2011.6118248. [142] Yuanjun Laili, Fei Tao, Lin Zhang, and Bhaba R. Sarker. A study of optimal allocation of computing resources in cloud manufacturing systems. The International Journal of Advanced Manufacturing Technology, 63(5):671–690, 2012. URL: http://dx.doi.org/10.1007/ s00170-012-3939-0, doi:10.1007/s00170-012-3939-0. [143] Hongbo Lan. Web-based rapid prototyping and manufacturing systems: A review. Computers in Industry, 60(9):643–656, 2009. URL: http://dx.doi.org/10.1016/j.compind.2009.05.003, doi: 10.1016/j.compind.2009.05.003. [144] Jorick Lartigau, Lanshun Nie, Xiaofei Xu, Dechen Zhan, and Tehani Mou. Scheduling Methodology for Production Services in Cloud Manufacturing. In Service Sciences (IJCSS), 2012 International Joint Conference on, pages 34–39, 5 2012. URL: http://dx.doi.org/10.1109/ IJCSS.2012.19, doi:10.1109/IJCSS.2012.19. [145] Bert Lauwers, Fritz Klocke, Andreas Klink, A. Erman Tekkaya, Reimund Neugebauer, and Don Mcintosh. Hybrid processes in manufacturing. {CIRP} Annals - Manufacturing Technology, 63(2):561– 583, 2014. URL: http://dx.doi.org/10.1016/j.cirp.2014.05.003, doi:10.1016/j.cirp.2014.05.003. [146] Martin Leary, Luigi Merli, Federico Torti, Maciej Mazur, and Milan Brandt. Optimal topology for additive manufacture: A method for enabling additive manufacture of support-free optimal structures. Materials & Design, 63:678–690, 2014. URL: http://dx.doi.org/10.1016/ j.matdes.2014.06.015, doi:10.1016/j.matdes.2014.06.015. 112 [147] Edward A. Lee. Cyber-Physical Systems - Are Computing Foundations Adequate. In Position Paper for NSF Workshop On Cyber-Physical Systems: Research Motivation, Techniques and Roadmap, volume 2, 2006. URL: http://citeseerx.ist.psu.edu/viewdoc/download? doi=10.1.1.84.8011&rep=rep1&type=pdf. [148] Jay Lee, Behrad Bagheri, and Hung-An Kao. A Cyber-Physical Systems architecture for Industry 4.0-based manufacturing systems. Manufacturing Letters, 3:18–23, 2015. URL: http://dx.doi.org/ 10.1016/j.mfglet.2014.12.001, doi:10.1016/j.mfglet.2014.12. 001. [149] Dirk Lehmhus, Thorsten Wuest, Stefan Wellsandt, Stefan Bosse, Toshiya Kaihara, Klaus-Dieter Thoben, and Matthias Busse. CloudBased Automated Design and Additive Manufacturing: A Usage Data-Enabled Paradigm Shift. Sensors, 15(12):32079–32122, 2015. URL: http://dx.doi.org/10.3390/s151229905, doi:10. 3390/s151229905. [150] Gideon N. Levy, Ralf Schindel, and J. P. Kruth. Rapid manufacturing and rapid tooling with layer manufacturing (lm) technologies, state of the art and future perspectives. CIRP Annals - Manufacturing Technology, 52(2):589–609, 2003. URL: http://dx.doi.org/10.1016/ S0007-8506(07)60206-6, doi:10.1016/S0007-8506(07)60206-6. [151] Hui-Hong JK Li, Yong Jiang Shi, Mike Gregory, and Kim Hua Tan. Rapid production ramp-up capability: a collaborative supply network perspective. International Journal of Production Research, 52(10):2999–3013, 2014. URL: http://dx.doi.org/10.1080/ 00207543.2013.858837, doi:10.1080/00207543.2013.858837. [152] Wenfeng Li, Ye Zhong, Xun Wang, and Yulian Cao. Resource virtualization and service selection in cloud logistics. Journal of Network and Computer Applications, 36(6):1696–1704, 2013. URL: http://dx.doi. org/10.1016/j.jnca.2013.02.019, doi:10.1016/j.jnca.2013.02. 019. [153] Feng Lin, Wei Sun, and Yongnian Yan. Optimization with minimum process error for layered manufacturing fabrication. Rapid Prototyp- 113 ing Journal, 7(2):73–82, 2001. URL: http://dx.doi.org/10.1108/ 13552540110386691, doi:10.1108/13552540110386691. [154] Hod Lipson and Melba Kurman. Fabricated - The New World of 3D Printing. John Wiley & Sons, Inc., 1 edition, 2013. URL: http://eu. wiley.com/WileyCDA/WileyTitle/productCd-1118416945.html. [155] Xiaowei Liu, Yun Yang, Xiaodong Xu, Changchun Li, and Lingpeng Ran. Research on profit mechanism of 3d printing cloud platform based on customized products. Applied Mechanics and Materials, 703:318–322, 2015. URL: http://dx.doi.org/10.4028/www. scientific.net/AMM.703.318, doi:10.4028/www.scientific.net/ AMM.703.318. [156] Yongkui Liu, Xun Xu, Lin Zhang, and Fei Tao. An Extensible Model for Multi-Task Service Composition and Scheduling in a Cloud Manufacturing System. Journal of Computing and Information Science in Engineering, 2016. URL: http://dx.doi.org/10.1115/1.4034186, doi:10.1115/1.4034186. [157] Ramón Medrano Llamas, Quentin Barrand, Johannes Elmsheuser, Federica Legger, Gianfranco Sciacca, Andrea Sciabà, and Daniel van der Ster. Testing as a Service with HammerCloud. Journal of Physics: Conference Series, 513(6):062031, 2014. URL: http://dx.doi.org/ 10.1088/1742-6596/513/6/062031, doi:10.1088/1742-6596/513/ 6/062031. [158] K. A. Lorenz, J .B. Jones, D. I. Wimpenny, and M. R. Jackson. A Review of Hybrid Manufacturing. In Proceedings of the Twenty-Sixth Solid Freeform Fabrication (SFF) Symposium, pages 96–108, 2015. URL: http://sffsymposium.engr.utexas.edu/2015TOC. [159] Yuqian Lu, Xun Xu, and Jenny Xu. Development of a hybrid manufacturing cloud. Journal of Manufacturing Systems, 33(4):551–566, 10 2014. URL: http://dx.doi.org/10.1016/j.jmsy.2014.05.003, doi:10.1016/j.jmsy.2014.05.003. [160] Yongliang Luo, Lin Zhang, Fei Tao, Lei Ren, Yongkui Liu, and Zhiqiang Zhang. A modeling and description method of multidimensional information for manufacturing capability in cloud manufacturing sys114 tem. The International Journal of Advanced Manufacturing Technology, 69(5):961–975, 2013. URL: http://dx.doi.org/10.1007/ s00170-013-5076-9, doi:10.1007/s00170-013-5076-9. [161] Mario Lušić, Kilian Schneider, and Rüdiger Hornfeck. A Case Study on the Capability of Rapid Tooling Thermoplastic Laminating Moulds for Manufacturing of {CFRP} Components in Autoclaves. Procedia CIRP, 50:390–395, 2016. 26th CIRP Design Conference. URL: http://dx. doi.org/10.1016/j.procir.2016.04.151, doi:10.1016/j.procir. 2016.04.151. [162] Hammad H. Malik, Alastair R. J. Darwood, Shalin Shaunak, Priyantha Kulatilake, Abdulrahman A. El-Hilly, Omar Mulki, and Aroon Baskaradas. Three-dimensional printing in surgery: a review of current surgical applications. Journal of Surgical Research, 199(2):512– 522, 2015. URL: http://dx.doi.org/10.1016/j.jss.2015.06.051, doi:10.1016/j.jss.2015.06.051. [163] Syed Hasan Masood. 10.04 - Advances in Fused Deposition Modeling. In Saleem Hashmi, Gilmar Ferreira Batalha, Chester J. Van Tyne, and Bekir Yilbas, editors, Comprehensive Materials Processing, pages 69–91. Elsevier, Oxford, 2014. URL: http://dx.doi.org/10.1016/ B978-0-08-096532-1.01002-5, doi:0.1016/B978-0-08-096532-1. 01002-5. [164] Elizabeth Matias and Bharat Rao. 3d printing: On its historical evolution and the implications for business. In 2015 Portland International Conference on Management of Engineering and Technology (PICMET), pages 551–558, 2015. URL: http://dx.doi.org/10. 1109/PICMET.2015.7273052, doi:10.1109/PICMET.2015.7273052. [165] Maria Mavri. Redesigning a Production Chain Based on 3D Printing Technology. Knowledge and Process Management, 22(3):141–147, 2015. URL: http://dx.doi.org/10.1002/kpm.1466, doi:10.1002/ kpm.1466. [166] Andrew D. Maynard. Navigating the fourth industrial revolution. Nature Nanotechnology, 10:1005–1006, 12 2015. URL: http://dx.doi. org/10.1038/nnano.2015.286, doi:10.1038/nnano.2015.286. 115 [167] Connor M. McNulty, Neyla Arnas, and Thomas A. Campbell. Toward the Printed World: Additive Manufacturing and Implications for National Security. Defense Horizons, 73:1– 16, 9 2012. URL: http://ctnsp.dodlive.mil/2012/09/01/ dh-073-toward-the-printed-world-additive-manufacturing-and-implications-for[168] Afshin Mehrsai, Hamid Reza Karimi, and Klaus-Dieter Thoben. Integration of supply networks for customization with modularity in cloud and make-to-upgrade strategy. Systems Science & Control Engineering: An Open Access Journal, 1:28–42, 2013. URL: http://dx. doi.org/10.1080/21642583.2013.817959, doi:10.1080/21642583. 2013.817959. [169] Ferry P. W. Melchels, Marco A. N. Domingos, Travis J. Klein, Jos Malda, Paulo J. Bartolo, and Dietmar W. Hutmacher. Additive manufacturing of tissues and organs. Progress in Polymer Science, 37(8):1079–1104, 2012. Topical Issue on Biorelated polymers. URL: http://www.sciencedirect.com/science/article/ pii/S0079670011001328, doi:10.1016/j.progpolymsci.2011.11. 007. [170] Ferry P. W. Melchels, Jan Feijen, and Dirk W. Grijpma. A review on stereolithography and its applications in biomedical engineering. Biomaterials, 31(24):6121–6130, 2010. URL: http:// dx.doi.org/10.1016/j.biomaterials.2010.04.050, doi:10.1016/ j.biomaterials.2010.04.050. [171] Peter Mell and Timothy Grance. The nist definition of cloud computing. NIST Special Publication 800-145, National Institute of Standards and Technology (NIST), 9 2011. URL: http://dx.doi.org/10.6028/ NIST.SP.800-145, doi:10.6028/NIST.SP.800-145. [172] Vladimir Mironov, Nuno Reis, and Brian Derby. Bioprinting: A beginning. Tissue Engineering, 12(4):631–634, 5 2006. URL: http: //dx.doi.org/10.1089/ten.2006.12.631, doi:10.1089/ten.2006. 12.631. [173] Pankhuri Mishra and Neeraj Tripathi. Testing as a Service, pages 149–176. Springer Singapore, Singapore, 2017. 116 URL: http://dx.doi.org/10.1007/978-981-10-1415-4_7, doi:10. 1007/978-981-10-1415-4_7. [174] Tihomir Mitev. Where is the Missing Matter?: A Comment on ”The Essence” of Additive Manufacturing. International Journal of Actor-Network Theory and Technological Innovation, 7:10–17, 2015. URL: http://dx.doi.org/10.4018/IJANTTI.2015010102, doi:10. 4018/IJANTTI.2015010102. [175] Mohsen Moghaddam, José Reinaldo Silva, and Shimon Y. Nof. Manufacturing-as-a-Service—From e-Work and Service-Oriented Architecture to the Cloud Manufacturing Paradigm - In: 15th IFAC Symposium onInformation Control Problems in Manufacturing. IFACPapersOnLine, 48(3):828–833, 2015. URL: http://dx.doi.org/ 10.1016/j.ifacol.2015.06.186, doi:10.1016/j.ifacol.2015.06. 186. [176] Omar A. Mohamed, Syed H. Masood, and Jahar L. Bhowmik. Optimization of fused deposition modeling process parameters: a review of current research and future prospects. Advances in Manufacturing, 3(1):42–53, 2015. URL: http://dx.doi.org/10.1007/ s40436-014-0097-7, doi:10.1007/s40436-014-0097-7. [177] Carlos Mota, Dario Puppi, Federica Chiellini, and Emo Chiellini. Additive manufacturing techniques for the production of tissue engineering constructs. Journal of Tissue Engineering and Regenerative Medicine, 9(3):174–190, 2015. URL: http://dx.doi.org/10.1002/term.1635, doi:10.1002/term.1635. [178] Dimitris Mourtzis, Michael Doukas, and Dimitra Bernidaki. Simulation in Manufacturing: Review and Challenges. In Procedia CIRP - 8th International Conference on Digital Enterprise Technology - DET 2014 Disruptive Innovation in Manufacturing Engineering towards the 4th Industrial Revolution, volume 25, pages 213–229, 2014. URL: http://dx.doi.org/10.1016/j.procir.2014.10.032, doi:10.1016/j.procir.2014.10.032. [179] Shawn Moylan, April Cooke, Kevin Jurrens, John Slotwinski, and M. Alkan Donmez. A review of test artifacts for additive manufacturing. NISTIR NISTIR 7858, National Institute of Standards and 117 Technology (NIST), 2012. URL: http://dx.doi.org/10.6028/NIST. IR.7858, doi:10.6028/NIST.IR.7858. [180] K. Muita, M. Westerlund, and R. Rajala. The evolution of rapid production: How to adopt novel manufacturing technology - in: 15th ifac symposium oninformation control problems in manufacturing. IFAC-PapersOnLine, 48(3):32–37, 2015. URL: http://dx.doi.org/ 10.1016/j.ifacol.2015.06.054, doi:10.1016/j.ifacol.2015.06. 054. [181] Javier Munguı́a, Joaquim de Ciurana, and Carles Riba. Pursuing successful rapid manufacturing: a users’ best-prcatices approach. Rapid Prototyping Journal, 14(3):173–179, 2008. URL: http://dx.doi.org/ 10.1108/13552540810878049, doi:10.1108/13552540810878049. [182] Lawrence E. Murr, Sara M. Gaytan, Diana A. Ramirez, Edwin Martinez, Jennifer Hernandez, Krista N. Amato, Patrick W. Shindo, Francisco R. Medina, and Ryan B. Wicker. Metal fabrication by additive manufacturing using laser and electron beam melting technologies. Journal of Materials Science & Technology, 28(1):1– 14, 2012. URL: http://www.sciencedirect.com/science/article/ pii/S1005030212600164, doi:10.1016/S1005-0302(12)60016-4. [183] Subramanian Senthilkannan Muthu and Monica Mahesh Savalani, editors. Handbook of Sustainability in Additive Manufacturing, volume 1 of Environmental Footprints and Eco-design of Products and Processes. Springer Singapore, 1 edition, 2016. URL: http://link.springer.com/book/10.1007/978-981-10-0549-7, doi:10.1007/978-981-10-0549-7. [184] Marcel Nagel, Felix Giese, and Ralf Becker. Flexible Gripper Design Through Additive Manufacturing, pages 455–459. Springer International Publishing, Cham, 2016. URL: http://dx.doi.org/10.1007/ 978-3-319-26378-6_37, doi:10.1007/978-3-319-26378-6_37. [185] Andrew Y. C. Nee. Handbook of Manufacturing Engineering and Technology. Springer London, 2015. URL: http://dx.doi.org/10.1007/ 978-1-4471-4670-4, doi:10.1007/978-1-4471-4670-4. 118 [186] Saigopal Nelaturi, Arvind Rangarajan, Christian Fritz, and Tolga Kurtoglu. Automated fixture configuration for rapid manufacturing planning. Computer-Aided Design, 46:160–169, 2014. 2013 SIAM Conference on Geometric and Physical Modeling. URL: http://dx.doi.org/ 10.1016/j.cad.2013.08.028, doi:10.1016/j.cad.2013.08.028. [187] Tiago Oliveira, Manoj Thomas, and Mariana Espadanal. Assessing the determinants of cloud computing adoption: An analysis of the manufacturing and services sectors. Information & Management, 51(5):497– 510, 7 2014. URL: http://dx.doi.org/10.1016/j.im.2014.03.006, doi:10.1016/j.im.2014.03.006. [188] William Oropallo and Les A. Piegl. Ten challenges in 3d printing. Engineering with Computers, 32(1):135–148, 2016. URL: http://dx.doi.org/10.1007/s00366-015-0407-0, doi:10. 1007/s00366-015-0407-0. [189] Deepankar Pal, Nachiket Patil, Kai Zeng, and Brent Stucker. An Integrated Approach to Additive Manufacturing Simulations Using Physics Based, Coupled Multiscale Process Modeling. Journal of Manufacturing Science and Engineering, 136(6):1–16, 12 2014. URL: http://dx.doi.org/10.1115/1.4028580, doi:10.1115/1.4028580. [190] Sangsung Park, Juhwan Kim, Hongchul Lee, Dongsik Jang, and Sunghae Jun. Methodology of technological evolution for three-dimensional printing. Industrial Management & Data Systems, 116(1):122–146, 2016. URL: http://dx.doi.org/10.1108/IMDS-05-2015-0206, doi: 10.1108/IMDS-05-2015-0206. [191] Christ P. Paul, Pankaj Bhargava, Atul Kumar, Ayukt K. Pathak, and Lalit M. Kukreja. Laser Rapid Manufacturing: Technology, Applications, Modeling and Future Prospects, pages 1–67. John Wiley & Sons, Inc., 2013. URL: http://dx.doi.org/10.1002/9781118562857.ch1, doi:10.1002/9781118562857.ch1. [192] Ratnadeep Paul and Sam Anand. Process energy analysis and optimization in selective laser sintering. Journal of Manufacturing Systems, 31(4):429–437, 2012. Selected Papers of 40th North American Manufacturing Research Conference. URL: http://dx.doi.org/10. 1016/j.jmsy.2012.07.004, doi:10.1016/j.jmsy.2012.07.004. 119 [193] Ratnadeep Paul and Sam Anand. A new Steiner patch based file format for Additive Manufacturing processes. Computer-Aided Design, 63:86– 100, 2015. URL: http://dx.doi.org/10.1016/j.cad.2015.01.002, doi:10.1016/j.cad.2015.01.002. [194] Ratnadeep Paul and Sam Anand. Optimization of layered manufacturing process for reducing form errors with minimal support structures. Journal of Manufacturing Systems, 36:231–243, 2015. URL: http://dx.doi.org/10.1016/j.jmsy.2014.06.014, doi:10. 1016/j.jmsy.2014.06.014. [195] Irene J. Petrick and Timothy W. Simpson. 3D Printing Disrupts Manufacturing: How Economies of One Create New Rules of Competition. Research-Technology Management, 56(6):12–16, 2013. URL: http://dx.doi.org/10.5437/08956308X5606193, doi: 10.5437/08956308X5606193. [196] Duc Truong Pham and Rosemary S. Gault. A comparison of rapid prototyping technologies. International Journal of Machine Tools and Manufacture, 38(10-11):1257–1287, 1998. URL: http://dx.doi.org/10.1016/S0890-6955(97)00137-5, doi: 10.1016/S0890-6955(97)00137-5. [197] Merissa Piazza and Serena Alexander. Additive manufacturing: A summary of the literature. Urban Publications 1319, Cleveland State University - Maxine Goodman Levin College of Urban Affairs, 2015. URL: http://engagedscholarship.csuohio.edu/urban_facpub/1319. [198] Andrew J. Pinkerton. [invited] lasers in additive manufacturing. Optics & Laser Technology, 78, Part A:25–32, 2016. URL: http: //dx.doi.org/10.1016/j.optlastec.2015.09.025, doi:0.1016/j. optlastec.2015.09.025. [199] R. Ponche, J. Y. Hascoet, O. Kerbrat, and P. Mognol. A new global approach to design for additive manufacturing. Virtual and Physical Prototyping, 7(2):93–105, 2012. URL: http://dx.doi.org/10.1080/ 17452759.2012.679499, doi:10.1080/17452759.2012.679499. [200] T. Qu, S. P. Lei, Z. Z. Wang, D. X. Nie, and X. Chen George Q. Huang. Iot-based real-time production logistics synchronization sys120 tem under smart cloud manufacturing. The International Journal of Advanced Manufacturing Technology, 84(1):147–164, 2016. URL: http://dx.doi.org/10.1007/s00170-015-7220-1, doi:10. 1007/s00170-015-7220-1. [201] Janaka Rajaguru, Mike Duke, and ChiKit Au. Development of rapid tooling by rapid prototyping technology and electroless nickel plating for low-volume production of plastic parts. The International Journal of Advanced Manufacturing Technology, 78(1):31–40, 2015. URL: http://dx.doi.org/10.1007/s00170-014-6619-4, doi: 10.1007/s00170-014-6619-4. [202] Shravya Ramisetty, Prasad Calyam, J. Cecil, Amit Rama Akula, Ronny Bazan Antequera, and Ray Leto. Ontology integration for advanced manufacturing collaboration in cloud platforms. In Proceedings of IFIP/IEEE International Symposium on Integrated Network Management (IM), pages 504–510, 2015. URL: http://dx.doi.org/10. 1109/INM.2015.7140329, doi:10.1109/INM.2015.7140329. [203] Farzad Rayegani and Godfrey C. Onwubolu. Fused deposition modelling (fdm) process parameter prediction and optimization using group method for data handling (gmdh) and differential evolution (de). The International Journal of Advanced Manufacturing Technology, 73(1):509–519, 2014. URL: http://dx.doi.org/10.1007/ s00170-014-5835-2, doi:10.1007/s00170-014-5835-2. [204] Thierry Rayna and Ludmila Striukova. A Taxonomy of Online 3D Printing Platforms, pages 153–166. Information Technology and Law Series. T.M.C. Asser Press, The Hague, 2016. URL: http://dx.doi.org/10.1007/978-94-6265-096-1_9, doi:10. 1007/978-94-6265-096-1\_9. [205] Lei Ren, Jin Cui, Ni Li, Qiong Wu, Cuixia Ma, Dongxing Teng, and Lin Zhang. Cloud-Based Intelligent User Interface for Cloud Manufacturing: Model, Technology, and Application. Journal of Manufacturing Science and Engineering, 137(4):1–7, 2015. URL: http: //dx.doi.org/10.1115/1.4030332, doi:10.1115/1.4030332. [206] Lei Ren, Jin Cui, Yongchang Wei, Yuanjun LaiLi, and Lin Zhang. Research on the impact of service provider cooperative 121 relationship on cloud manufacturing platform. The International Journal of Advanced Manufacturing Technology, pages 1–12, 2016. URL: http://dx.doi.org/10.1007/s00170-016-8345-6, doi:10. 1007/s00170-016-8345-6. [207] Fabian Rengier, Amit Mehndiratta, Hendrik Von Tengg-Kobligk, Christian Martin Zechmann, Roland Unterhinninghofen, Hans-Ulrich Kauczor, and Frederik L. Giesel. 3d printing based on imaging data: review of medical applications. International Journal of Computer Assisted Radiology and Surgery, 5(4):335–341, 2010. URL: http://dx.doi.org/10.1007/s11548-010-0476-x, doi:10. 1007/s11548-010-0476-x. [208] D. A. Roberson, D. Espalin, and R. B. Wicker. 3d printer selection: A decision-making evaluation and ranking model. Virtual and Physical Prototyping, 8(3):201–212, 2013. URL: http://dx.doi.org/10.1080/ 17452759.2013.830939, doi:10.1080/17452759.2013.830939. [209] Dieter Roller, M. Bihler, and Oliver Eck. Asn: Active, distributed knowledge base for rapid prototyping. In Dieter Roller, editor, Proceedings of 30th ISATA, Volume ”Rapid Prototyping in the Automotive Industries & Laser Applications in the Automotive Industries”, pages 253–262. Automotive Automation Ltd., Croydon, England, 1997. URL: http://citeseerx.ist.psu.edu/viewdoc/ summary?doi=10.1.1.87.9318. [210] David W. Rosen. Research supporting principles for design for additive manufacturing. Virtual and Physical Prototyping, 9(4):225–232, 2014. URL: http://dx.doi.org/10.1080/17452759.2014.951530, doi:10.1080/17452759.2014.951530. [211] Massimiliano Ruffo, Christopher John Tuck, and Richard J. M. Hague. Cost estimation for rapid manufacturing - laser sintering production for low to medium volumes. Proceedings of the Institution of Mechanical Engineers, Part B: Journal of Engineering Manufacture, 220(9):1417– 1427, 2006. URL: http://dx.doi.org/10.1243/09544054JEM517, doi:10.1243/09544054JEM517. [212] E. Sachs, M. Cima, and J. Cornie. Three-Dimensional Printing: Rapid Tooling and Prototypes Directly from a CAD Model. 122 CIRP Annals - Manufacturing Technology, 39(1):201–204, 1990. URL: http://dx.doi.org/10.1016/S0007-8506(07)61035-X, doi: 10.1016/S0007-8506(07)61035-X. [213] Ranjeet Kumar Sahu, S. S. Mahapatra, and Anoop Kumar Sood. A study on dimensional accuracy of fused deposition modeling (fdm) processed parts using fuzzy logic. Journal for Manufacturing Science & Production, 13(3):183–197, 2013. URL: http://dx.doi.org/10. 1515/jmsp-2013-0010, doi:10.1515/jmsp-2013-0010. [214] William J. Sames, F. A. List, S. Pannala, R. R. Dehoff, and Babu. The metallurgy and processing science of metal additive ufacturing. International Materials Reviews, 61(5):315–360, URL: http://dx.doi.org/10.1080/09506608.2015.1116649, 10.1080/09506608.2015.1116649. S. S. man2016. doi: [215] Luis M. Sanchez and Rakesh Nagi. A review of agile manufacturing systems. International Journal of Production Research, 39(16):3561– 3600, 2001. URL: http://dx.doi.org/10.1080/00207540110068790, doi:10.1080/00207540110068790. [216] David Sanderson, Nikolas Antzoulatos, Jack C. Chaplin, Dı́dac Buscuets, Jeremy Pitt, Carl German, Alan Norbury, Emma Kelly, and Svetan Ratchev. Advanced manufacturing: An industrial application for collective adaptive systems. In Self-Adaptive and Self-Organizing Systems Workshops (SASOW), 2015 IEEE International Conference on, pages 61–67, 9 2015. URL: http://dx.doi.org/10.1109/SASOW. 2015.15, doi:10.1109/SASOW.2015.15. [217] Carl Schubert, Mark C. van Langeveld, and Larry A. Donoso. Innovations in 3d printing: a 3d overview from optics to organs. British Journal of Ophthalmology, 2013. URL: http: //dx.doi.org/10.1136/bjophthalmol-2013-304446, doi:10.1136/ bjophthalmol-2013-304446. [218] Lui Sha, Sathish Gopalakrishnan, Xue Liu, and Qixin Wang. CyberPhysical Systems: A New Frontier, pages 3–13. Springer US, 2009. URL: http://dx.doi.org/10.1007/978-0-387-88735-7_1, doi:10. 1007/978-0-387-88735-7_1. 123 [219] Xiuqin Shang, Xiwei Liu, Gang Xiong, Changjian Cheng, Yonghong Ma, and Timo R. Nyberg. Social manufacturing cloud service platform for the mass customization in apparel industry. In Service Operations and Logistics, and Informatics (SOLI), 2013 IEEE International Conference on, pages 220–224, 7 2013. URL: http://dx.doi.org/10. 1109/SOLI.2013.6611413, doi:10.1109/SOLI.2013.6611413. [220] Seyed Farid Seyed Shirazi, Samira Gharehkhani, Mehdi Mehrali, Hooman Yarmand, Hendrik Simon Cornelis Metselaar, Nahrizul Adib Kadri, and Noor Azuan Abu Osman. A review on powder-based additive manufacturing for tissue engineering: selective laser sintering and inkjet 3D printing. Science and Technology of Advanced Materials, 16(3), 2015. URL: http://dx.doi.org/10.1088/1468-6996/16/ 3/033502, doi:10.1088/1468-6996/16/3/033502. [221] José Reinaldo Silva. New trends in manufacturing: Converging to service and intelligent systems. IFAC Proceedings Volumes, 47(3):2628–2633, 2014. 19th IFAC World Congress. URL: http: //dx.doi.org/10.3182/20140824-6-ZA-1003.02823, doi:10.3182/ 20140824-6-ZA-1003.02823. [222] Suryakumar Simhambhatla and K. P. Karunakaran. Build strategies for rapid manufacturing of components of varying complexity. Rapid Prototyping Journal, 21(3):340–350, 2015. URL: http://dx.doi.org/ 10.1108/RPJ-07-2012-0062, doi:10.1108/RPJ-07-2012-0062. [223] Swee Leong Sing, Jia An, Wai Yee Yeong, and Florencia Edith Wiria. Laser and electron-beam powder-bed additive manufacturing of metallic implants: A review on processes, materials and designs. Journal of Orthopaedic Research, 34(3):369–385, 2016. URL: http://dx.doi.org/10.1002/jor.23075, doi:10.1002/jor.23075. [224] Rupinder Singh. Three dimensional printing for casting applications: A state of art review and future perspectives. Advanced Materials Research, 83-86:342–349, 2010. URL: http://dx.doi.org/ 10.4028/www.scientific.net/AMR.83-86.342, doi:10.4028/www. scientific.net/AMR.83-86.342. [225] Johan Söderberg. Automating amateurs in the 3d printing community: connecting the dots between ‘deskilling’ and ‘user124 friendliness’. Work Organisation, Labour & Globalisation, 7(1):124– 139, 2013. URL: http://www.jstor.org/stable/10.13169/ workorgalaboglob.7.1.0124, doi:10.13169/workorgalaboglob.7. 1.0124. [226] Jacopo Soldani, Tobias Binz, Uwe Breitenbücher, Frank Leymann, and Antonio Brogi. Toscamart: A method for adapting and reusing cloud applications. Journal of Systems and Software, 113:395–406, 2016. URL: http://dx.doi.org/10.1016/j.jss.2015.12.025, doi: 10.1016/j.jss.2015.12.025. [227] R. Sreenivasan, A. Goel, and David L. Bourell. Laser assisted net shape engineering 6, proceedings of the lane 2010, part 1 sustainability issues in laser-based additive manufacturing. Physics Procedia, 5:81– 90, 2010. URL: http://dx.doi.org/10.1016/j.phpro.2010.08.124, doi:10.1016/j.phpro.2010.08.124. [228] Alexander Stanik, Matthias Hovestadt, and Odej Kao. Hardware as a service (haas): Physical and virtual hardware on demand. In Cloud Computing Technology and Science (CloudCom), 2012 IEEE 4th International Conference on, pages 149–154. IEEE, 2012. URL: http://dx.doi.org/10.1109/CloudCom.2012.6427579, doi:10.1109/CloudCom.2012.6427579. [229] L. D. Sturm, C. B. Williams, J. A. Camelio, J. White, and R. Parker. Cyber-Physical Vunerabilities in Additive Manufacturing Systems. In Proceedings of the Twenty-Fifth Solid Freeform Fabrication (SFF) Symposium, pages 951–963, 2014. URL: http://sffsymposium.engr. utexas.edu/2014TOC. [230] S. Subashini and V. Kavitha. A survey on security issues in service delivery models of cloud computing. Journal of Network and Computer Applications, 34(1):1–11, 2011. URL: http://dx.doi.org/10.1016/ j.jnca.2010.07.006, doi:10.1016/j.jnca.2010.07.006. [231] Jie Sun, Zhuo Peng, Weibiao Zhou, Jerry Y.H. Fuh, Geok Soon Hong, and Annette Chiu. A Review on 3D Printing for Customized Food Fabrication. Procedia Manufacturing, 1:308–319, 2015. URL: http://dx. doi.org/10.1016/j.promfg.2015.09.057, doi:10.1016/j.promfg. 2015.09.057. 125 [232] Jie Sun, Weibiao Zhou, Dejian Huang, Jerry Y. H. Fuh, and Geok Soon Hong. An overview of 3d printing technologies for food fabrication. Food and Bioprocess Technology, 8(8):1605–1615, 2015. URL: http://dx.doi.org/10.1007/s11947-015-1528-6, doi: 10.1007/s11947-015-1528-6. [233] Yunlong Tang, Jean-Yves Hascoet, and Yaoyao Fiona Zhao. Integration of Topological and Functional Optimization in Design for Additive Manufacturing. In ASME 2014 12th Biennial Conference on Engineering Systems Design and Analysis, volume 1, 2014. URL: http://dx. doi.org/10.1115/ESDA2014-20381, doi:10.1115/ESDA2014-20381. [234] Fei Tao, Ying Cheng, Li Da Xu, Lin Zhang, and Bo Hu Li. CCIoTCMfg: Cloud Computing and Internet of Things-Based Cloud Manufacturing Service System. IEEE Transactions on Industrial Informatics, 10(2):1435–1442, 5 2014. URL: http://dx.doi.org/10.1109/ TII.2014.2306383, doi:10.1109/TII.2014.2306383. [235] Fei Tao, Ying Cheng, L. Zhang, and A. Y. C. Nee. Advanced manufacturing systems: socialization characteristics and trends. Journal of Intelligent Manufacturing, pages 1–16, 2015. URL: http://dx.doi.org/ 10.1007/s10845-015-1042-8, doi:10.1007/s10845-015-1042-8. [236] Fei Tao, Yuanjun LaiLi, Lida Xu, and Lin Zhang. FC-PACO-RM: A Parallel Method for Service Composition Optimal-Selection in Cloud Manufacturing System. IEEE Transactions on Industrial Informatics, 9(4):2023–2033, 2013. URL: http://dx.doi.org/10.1109/TII.2012. 2232936, doi:10.1109/TII.2012.2232936. [237] Fei Tao, Lin Zhang, V. C. Venkatesh, Y. Luo, and Ying Cheng. Cloud manufacturing: a computing and service-oriented manufacturing model. Proceedings of the Institution of Mechanical Engineers, Part B: Journal of Engineering Manufacture, 000:1–8, 2011. URL: http://dx.doi.org/10.1177/0954405411405575, doi: 10.1177/0954405411405575. [238] Fei Tao, Y. Zuo, Li Da Xu, and Lin Zhang. IoT-Based Intelligent Perception and Access of Manufacturing Resource Toward Cloud Manufacturing. IEEE Transactions on Industrial Informatics, 10(2):1547–1557, 126 5 2014. URL: http://dx.doi.org/10.1109/TII.2014.2306397, doi: 10.1109/TII.2014.2306397. [239] Gustavo Tapia and Alaa Elwany. A review on process monitoring and control in metal-based additive manufacturing. Journal of Manufacturing Science and Engineering, 136(6), 2014. URL: http: //dx.doi.org/10.1115/1.4028540, doi:10.1115/1.4028540. [240] Frédéric Thiesse, Marco Wirth, Hans-Georg Kemper, Michelle Moisa, Dominik Morar, Heiner Lasi, Frank Piller, Peter Buxmann, Letizia Mortara, Simon Ford, and Tim Minshall. Economic Implications of Additive Manufacturing and the Contribution of MIS. Business & Information Systems Engineering, 57(2):139– 148, 2015. URL: http://aisel.aisnet.org/bise/vol57/iss2/7, doi:10.1007/s12599-015-0374-4. [241] Douglas S. Thomas. Economics of the u.s. additive manufacturing industry. NIST Special Publication 1163, National Institute of Standards and Technology (NIST), 8 2013. URL: http://dx.doi.org/10.6028/ NIST.SP.1163, doi:10.6028/NIST.SP.1163. [242] Douglas S. Thomas and Stanley W. Gilbert. Costs and cost effectiveness of additive manufacturing - a literature review and discussion. NIST Special Publication 1176, National Institute of Standards and Technology (NIST), 2014. URL: http://dx.doi.org/10.6028/NIST. SP.1176, doi:10.6028/NIST.SP.1176. [243] Kun Tong, Sanjay Joshi, and E. Amine Lehtihet. Error compensation for fused deposition modeling (fdm) machine by correcting slice files. Rapid Prototyping Journal, 14(1):4–14, 2008. URL: http://dx.doi.org/10.1108/13552540810841517, doi:10. 1108/13552540810841517. [244] Hong-Linh Truong and Schahram Dustdar. Iccs 2010 composable cost estimation and monitoring for computational applications in cloud computing environments. Procedia Computer Science, 1(1):2175–2184, 2010. URL: http://dx.doi.org/10.1016/j.procs.2010.04.243, doi:10.1016/j.procs.2010.04.243. 127 [245] Wei-Tek Tsai, Guanqiu Qi, Lian Yu, and Jerry Gao. TaaS (Testing-asa-Service) Design for Combinatorial Testing. In Software Security and Reliability (SERE), 2014 Eighth International Conference on, pages 127–136, 6 2014. doi:10.1109/SERE.2014.26. [246] Wei-Tek Tsai, Xin Sun, and Janaka Balasooriya. Service-oriented cloud computing architecture. In Information Technology: New Generations (ITNG), 2010 Seventh International Conference on, pages 684–689, 4 2010. URL: http://dx.doi.org/10.1109/ITNG.2010.214, doi:10. 1109/ITNG.2010.214. [247] Brian N. Turner and Scott A Gold. A review of melt extrusion additive manufacturing processes: Ii. materials, dimensional accuracy, and surface roughness. Rapid Prototyping Journal, 21(3):250– 261, 2015. URL: http://dx.doi.org/10.1108/RPJ-02-2013-0017, doi:10.1108/RPJ-02-2013-0017. [248] Brian N. Turner, Robert Strong, and Scott A. Gold. A review of melt extrusion additive manufacturing processes: I. process design and modeling. Rapid Prototyping Journal, 20(3):192– 204, 2014. URL: http://dx.doi.org/10.1108/RPJ-01-2013-0012, doi:10.1108/RPJ-01-2013-0012. [249] Hamilton Turner, Jules White, James A. Camelio, Christopher Williams, Brandon Amos, and Robert Parker. Bad parts: Are our manufacturing systems at risk of silent cyberattacks? IEEE Security Privacy, 13(3):40–47, 5 2015. URL: http://dx.doi.org/10.1109/ MSP.2015.60, doi:10.1109/MSP.2015.60. [250] Jumyung Um, Yong-Chan Choi, and Ian Stroud. Factory Planning System Considering Energy-efficient Process under Cloud Manufacturing. In Variety Management in Manufacturing – Proceedings of the 47th CIRP Conference on Manufacturing Systems, volume 17 of Procedia CIRP, pages 553–558, 2014. URL: http://dx.doi.org/10.1016/ j.procir.2014.01.084, doi:10.1016/j.procir.2014.01.084. [251] Iulia D. Ursan, Ligia Chiu, and Andrea Pierce. Three-dimensional drug printing: A structured review. Journal of the American Pharmacists Association, 53(2):136–144, 2013. URL: http://dx.doi.org/ 10.1331/JAPhA.2013.12217, doi:10.1331/JAPhA.2013.12217. 128 [252] Ben Utela, Duane Storti, Rhonda Anderson, and Mark Ganter. A review of process development steps for new material systems in three dimensional printing (3dp). Journal of Manufacturing Processes, 10(2):96–104, 2008. URL: http://dx.doi.org/10.1016/j.jmapro. 2009.03.002, doi:10.1016/j.jmapro.2009.03.002. [253] Mohammad Vaezi, Hermann Seitz, and Shoufeng Yang. A review on 3d micro-additive manufacturing technologies. The International Journal of Advanced Manufacturing Technology, 67(5):1721–1754, 2013. URL: http://dx.doi.org/10.1007/s00170-012-4605-2, doi: 10.1007/s00170-012-4605-2. [254] Omid Fatahi Valilai and Mahmoud Houshmand. A collaborative and integrated platform to support distributed manufacturing system using a service-oriented approach based on cloud computing paradigm. Robotics and Computer-Integrated Manufacturing, 29(1):110–127, 2 2013. URL: http://dx.doi.org/10.1016/j.rcim. 2012.07.009, doi:10.1016/j.rcim.2012.07.009. [255] Leo van Moergestel, Erik Puik, Daniël Telgen, and John-Jules Ch. Meyer. Implementing Manufacturing as a Service: A Pull-Driven Agent-Based Manufacturing Grid. In Proceedings of the 11th International Conference on ICT in Education, Research and Industrial Applications: Integration, Harmonization and Knowledge Transfer, volume 1356, pages 172–187. CEUR Workshop Proceedings, 2015. URL: http://dspace.library.uu.nl/handle/1874/315706. [256] Benjamin Vayre, Frédéric Vignat, and François Villeneuve. Metallic additive manufacturing: state-of-the-art review and prospects. Mechanics & Industry, 13(2):89–96, 2012. URL: http://dx.doi.org/ 10.1051/meca/2012003, doi:10.1051/meca/2012003. [257] Benjamin Vayre, Frédéric Vignat, and François Villeneuve. Designing for additive manufacturing. In 45th CIRP Conference on Manufacturing Systems, pages 632–637, 2012. URL: http://dx.doi.org/ 10.1016/j.procir.2012.07.108, doi:10.1016/j.procir.2012.07. 108. [258] Germano Veiga, Pedro Malaca, J. Norberto Pires, and Klas Nilsson. Separation of concerns on the orchestration of operations in 129 flexible manufacturing. Assembly Automation, 32(1):38–50, 2012. URL: http://dx.doi.org/10.1108/01445151211198700, doi:10. 1108/01445151211198700. [259] Maja Vukovic. Internet Programmable IoT: On the Role of APIs in IoT: The Internet of Things (Ubiquity Symposium). Ubiquity, 2015(November):1–10, 11 2015. URL: http://doi.acm.org/10.1145/ 2822873, doi:10.1145/2822873. [260] Gerald Walther. Printing Insecurity? The Security Implications of 3DPrinting of Weapons. Science and Engineering Ethics, 21(6):1435–1445, 2015. URL: http://dx.doi.org/10.1007/s11948-014-9617-x, doi: 10.1007/s11948-014-9617-x. [261] Lihui Wang. Machine availability monitoring and machining process planning towards Cloud manufacturing. CIRP Journal of Manufacturing Science and Technology, 6(4):263–273, 2013. URL: http://dx.doi.org/10.1016/j.cirpj.2013.07.001, doi:10.1016/ j.cirpj.2013.07.001. [262] Lihui Wang, Weiming Shen, and Sherman Lang. Wise-ShopFloor: a web-based and sensor-driven shop floor environment. In Computer Supported Cooperative Work in Design, 2002. The 7th International Conference on, pages 413–418, 2002. doi:10.1109/CSCWD.2002.1047724. [263] Lizhe Wang, Gregor von Laszewski, AND Xi He Andrew Younge, Marcel Kunze, Jie Tao, and Cheng Fu. Cloud Computing: a Perspective Study. New Generation Computing, 28(2):137–146, 2010. URL: http://dx.doi.org/10.1007/s00354-008-0081-5, doi:10. 1007/s00354-008-0081-5. [264] Tianri Wang, Shunsheng Guo, and Chi-Guhn Lee. Manufacturing task semantic modeling and description in cloud manufacturing system. The International Journal of Advanced Manufacturing Technology, 71(9):2017–2031, 2014. URL: http://dx.doi.org/10.1007/ s00170-014-5607-z, doi:10.1007/s00170-014-5607-z. [265] Xi Vincent Wang and Xun W. Xu. An interoperable solution for Cloud manufacturing. Robotics and Computer-Integrated Manufacturing, 29(4):232–247, 8 2013. URL: http://dx.doi.org/10.1016/j. rcim.2013.01.005, doi:10.1016/j.rcim.2013.01.005. 130 [266] Xi Vincent Wang and Xun W. Xu. An interoperable solution for cloud manufacturing. Robotics and Computer-Integrated Manufacturing, 29(4):232–247, 8 2013. URL: http://dx.doi.org/10.1016/j. rcim.2013.01.005, doi:10.1016/j.rcim.2013.01.005. [267] Christopher L. Weber, Vanessa Peña, Maxwell K. Micali, Elmer Yglesias, Sally A. Rood, Justin A. Scott, and Bhavya Lal. The Role of the National Science Foundation in the Origin and Evolution of Additive Manufacturing in the United States. IDA Paper P-5091, Science and Technology Policy Institute, 11 2013. URL: https://www.ida.org/idamedia/Corporate/Files/ Publications/STPIPubs/ida-p-5091.ashx. [268] Christian Weller, Robin Kleer, and Frank T. Piller. Economic implications of 3d printing: Market structure models in light of additive manufacturing revisited. International Journal of Production Economics, 164:43–56, 2015. URL: http://dx.doi.org/10.1016/j.ijpe.2015. 02.020, doi:10.1016/j.ijpe.2015.02.020. [269] Joel West and George Kuk. Proprietary Benefits from Open Communities: How MakerBot Leveraged Thingiverse in 3D Printing. In Proceedings of the 2014 Academy of Management Conference, 1 2014. URL: http://dx.doi.org/10.2139/ssrn.2544970, doi:10. 2139/ssrn.2544970. [270] B. T. Wittbrodt, A. G. Glover, J. Laureto, G. C. Anzalone, D. Oppliger, J. L. Irwin, and J. M. Pearce. Life-cycle economic analysis of distributed manufacturing with open-source 3D printers. Mechatronics, 23(6):713–726, 2013. URL: http:// dx.doi.org/10.1016/j.mechatronics.2013.06.002, doi:10.1016/ j.mechatronics.2013.06.002. [271] Kaufui V. Wong and Aldo Hernandez. A review of additive manufacturing. ISRN Mechanical Engineering, 2012:1–10, 2012. URL: http: //dx.doi.org/10.5402/2012/208760, doi:10.5402/2012/208760. [272] Dazhong Wu, M. J. Greer, David W. Rosen, and Dirk Schaefer. Cloud manufacturing: Strategic vision and state-of-the-art. Journal of Manufacturing Systems, 32(4):564–579, 2013. URL: http://dx.doi.org/ 10.1016/j.jmsy.2013.04.008, doi:10.1016/j.jmsy.2013.04.008. 131 [273] Dazhong Wu, Matthew J. Greer, David W. Rosen, and Dirk Schaefer. Cloud manufacturing: Drivers, current status, and future trends. In Proceedings of the ASME 2013 International Manufacturing Science and Engineering Conference, pages 1–10, 6 2013. URL: http://dx. doi.org/10.1115/MSEC2013-1106, doi:10.1115/MSEC2013-1106. [274] Dazhong Wu, David W. Rosen, and Dirk Schaefer. Cloud-Based Design and Manufacturing (CBDM) - A Service-Oriented Product Development Paradigm for the 21st Century, chapter Cloud-Based Design and Manufacturing: Status and Promise, pages 1–24. Springer International Publishing, 2014. URL: http://dx.doi.org/10.1007/ 978-3-319-07398-9_1, doi:10.1007/978-3-319-07398-9_1. [275] Dazhong Wu, David W. Rosen, Lihui Wang, and Dirk Schaefer. Cloudbased Manufacturing: Old Wine in New Bottles? In Hoda ElMaraghy, editor, Variety Management in Manufacturing – Proceedings of the 47th CIRP Conference on Manufacturing Systems, volume 17, pages 94–99. Elsevier B.V., 2014. URL: http://dx.doi.org/10.1016/j.procir. 2014.01.035, doi:10.1016/j.procir.2014.01.035. [276] Dazhong Wu, David W. Rosen, Lihui Wang, and Dirk Schaefer. Cloud-based design and manufacturing: A new paradigm in digital manufacturing and design innovation. Computer-Aided Design, 59:1– 14, 2 2015. URL: http://dx.doi.org/10.1016/j.cad.2014.07.006, doi:10.1016/j.cad.2014.07.006. [277] Dazhong Wu, Janis Terpenny, and Wolfgang Gentzsch. Economic Benefit Analysis of Cloud-Based Design, Engineering Analysis, and Manufacturing. Journal of Manufacturing Science and Engineering, 137(4):1–9, 8 2015. URL: http://dx.doi.org/10.1115/1.4030306, doi:10.1115/1.4030306. [278] Dazhong Wu, J. Lane Thames, David W. Rosen, and Dirk Schaefer. Towards a Cloud-Based Design and Manufacturing Paradigm: Looking Backward, Looking Forward. In ASME 2012 International Design Engineering Technical Conferences and Computers and Information in Engineering Conference, pages 315–328, 2012. URL: http://dx.doi. org/10.1115/DETC2012-70780, doi:10.1115/DETC2012-70780. 132 [279] Dazhong Wu, J. Lane Thames, David W. Rosen, and Dirk Schaefer. Enhancing the product realization process with cloud-based design and manufacturing systems. Journal of Computing and Information Science in Engineering, 13(4):1–14, 9 2013. URL: http: //dx.doi.org/10.1115/1.4025257, doi:10.1115/1.4025257. [280] Lei Wu and Chengwei Yang. A Solution of Manufacturing Resources Sharing in Cloud Computing Environment, pages 247– 252. Springer Berlin Heidelberg, Berlin, Heidelberg, 2010. URL: http://dx.doi.org/10.1007/978-3-642-16066-0_36, doi: 10.1007/978-3-642-16066-0_36. [281] Tong Wu and Edmund H. M. Cheung. Enhanced STL. The International Journal of Advanced Manufacturing Technology, 29(11):1143–1150, 2006. URL: http://dx.doi.org/10.1007/ s00170-005-0001-5, doi:10.1007/s00170-005-0001-5. [282] Xingxing Wu, Xuemei Jiang, Wenjun Xu, Qingsong Ai, and Quan Liu. A Unified Sustainable Manufacturing Capability Model for Representing Industrial Robot Systems in Cloud Manufacturing, pages 388–395. Springer International Publishing, Cham, 2015. URL: http://dx.doi.org/10.1007/978-3-319-22759-7_45, doi: 10.1007/978-3-319-22759-7_45. [283] Xun Xu. From cloud computing to cloud manufacturing. Robotics and Computer-Integrated Manufacturing, 28(1):75–86, 2 2012. URL: http://dx.doi.org/10.1016/j.rcim.2011.07.002, doi:10.1016/ j.rcim.2011.07.002. [284] Mark Yampolskiy, Todd R. Andel, J. Todd McDonald, William B. Glisson, and Alec Yasinsac. Intellectual Property Protection in Additive Layer Manufacturing: Requirements for Secure Outsourcing. In Proceedings of the 4th Program Protection and Reverse Engineering Workshop, PPREW-4, pages 1–9, New York, NY, USA, 2014. ACM. URL: http://doi.acm.org/10.1145/2689702.2689709, doi: 10.1145/2689702.2689709. [285] Minzhi Yan, Hailong Sun, Xu Wang, and Xudong Liu. Building a taas platform for web service load testing. In 2012 IEEE International 133 Conference on Cluster Computing, pages 576–579, 9 2012. doi:10. 1109/CLUSTER.2012.20. [286] Yongnian Yan, Shengjie Li, Renji Zhang, Feng Lin, Rendong Wu, Qingping Lu, Zhuo Xiong, and Xiaohong Wang. Rapid prototyping and manufacturing technology: Principle, representative technics, applications, and development trends. Tsinghua Science & Technology, 14, Supplement 1:1–12, 2009. URL: http://dx.doi.org/10.1016/ S1007-0214(09)70059-8, doi:10.1016/S1007-0214(09)70059-8. [287] Chen Yang, Weiming Shen, Tingyu Lin, and Xianbin Wang. A hybrid framework for integrating multiple manufacturing clouds. The International Journal of Advanced Manufacturing Technology, 86(1):895– 911, 2016. URL: http://dx.doi.org/10.1007/s00170-015-8177-9, doi:10.1007/s00170-015-8177-9. [288] Sheng Yang and Yaoyao Fiona Zhao. Additive manufacturing-enabled design theory and methodology: a critical review. The International Journal of Advanced Manufacturing Technology, 80(1):327–342, 2015. URL: http://dx.doi.org/10.1007/s00170-015-6994-5, doi: 10.1007/s00170-015-6994-5. [289] Xifan Yao and Yingzi Lin. Emerging manufacturing paradigm shifts for the incoming industrial revolution. The International Journal of Advanced Manufacturing Technology, 85(5–8):1665–1676, 2016. URL: http://dx.doi.org/10.1007/s00170-015-8076-0, doi: 10.1007/s00170-015-8076-0. [290] C. Y. Yap, C. K. Chua, Z. L. Dong, Z. H. Liu, D. Q. Zhang, L. E. Loh, and S. L. Sing. Review of selective laser melting: Materials and applications. Applied Physics Reviews, 2(4):1–21, 2015. URL: http: //dx.doi.org/10.1063/1.4935926, doi:10.1063/1.4935926. [291] Hae-Sung Yoon, Jang-Yeob Lee, Hyung-Soo Kim, Min-Soo Kim, EunSeob Kim, Yong-Jun Shin, Won-Shik Chu, and Sung-Hoon Ahn. A comparison of energy consumption in bulk forming, subtractive, and additive processes: Review and case study. International Journal of Precision Engineering and Manufacturing-Green Technology, 1(3):261– 279, 2014. URL: http://dx.doi.org/10.1007/s40684-014-0033-0, doi:10.1007/s40684-014-0033-0. 134 [292] Chunyang Yu, Xun Xu, and Yuqian Lu. Computer-Integrated Manufacturing, Cyber-Physical Systems and Cloud Manufacturing – Concepts and relationships. Manufacturing Letters, 6:5–9, 2015. URL: http://dx.doi.org/10.1016/j.mfglet.2015.11.005, doi: 10.1016/j.mfglet.2015.11.005. [293] Shiqiang Yu and Xun Xu. Development of a Product Configuration System for Cloud Manufacturing, pages 436–443. Springer International Publishing, Cham, 2015. URL: http://dx.doi.org/10.1007/ 978-3-319-22759-7_51, doi:10.1007/978-3-319-22759-7_51. [294] Steven Eric Zeltmann, Nikhil Gupta, Nektarios Georgios Tsoutsos, Michail Maniatakos Jeyavijayan Rajendran, and Ramesh Karri. Manufacturing and security challenges in 3d printing. JOM, 68(7):1872–1881, 2016. URL: http://dx.doi.org/10.1007/s11837-016-1937-7, doi: 10.1007/s11837-016-1937-7. [295] Yousif Zghair. Rapid Repair hochwertiger Investitionsgüter, pages 57–69. Springer Berlin Heidelberg, Berlin, Heidelberg, 2016. URL: http://dx.doi.org/10.1007/978-3-662-49056-3_6, doi:10. 1007/978-3-662-49056-3_6. [296] Lin Zhang, H Guo, Fei Tao, Y. L. Luo, and N. Si. Flexible management of resource service composition in cloud manufacturing. In Industrial Engineering and Engineering Management (IEEM), 2010 IEEE International Conference on, pages 2278–2282, 12 2010. URL: http://dx.doi.org/10.1109/IEEM.2010.5674175, doi:10.1109/IEEM.2010.5674175. [297] Lin Zhang, Yongliang Luo, Fei Tao, Bo Hu Li, Lei Ren, Xuesong Zhang, Hua Guo, Ying Cheng, Anrui Hu, and Yongkui Liu. Cloud manufacturing: a new manufacturing paradigm. Enterprise Information Systems, 8(2):167–187, 2014. URL: http://dx.doi.org/10.1080/17517575. 2012.683812, doi:10.1080/17517575.2012.683812. [298] Lin Zhang, Jingeng Mai, Bo Hu Li, Fei Tao, Chun Zhao, Lei Ren, and Ralph C. Huntsinger. Cloud-Based Design and Manufacturing (CBDM) - A Service-Oriented Product Development Paradigm for the 21st Century, chapter Future Manufacturing Industry with Cloud Manufacturing, pages 127–152. Springer International Publishing, 135 2014. URL: http://dx.doi.org/10.1007/978-3-319-07398-9_5, doi:10.1007/978-3-319-07398-9_5. [299] Yingfeng Zhang, George Q. Huang, T. Qu, Oscar Ho, and Shudong Sun. Agent-based smart objects management system for real-time ubiquitous manufacturing. Robotics and Computer-Integrated Manufacturing, 27(3):538–549, 2011. URL: http://dx.doi.org/10.1016/ j.rcim.2010.09.009, doi:10.1016/j.rcim.2010.09.009. [300] Yingfeng Zhang, Geng Zhang, Yang Liu, and Di Hu. Research on services encapsulation and virtualization access model of machine for cloud manufacturing. Journal of Intelligent Manufacturing, pages 1– 15, 2015. URL: http://dx.doi.org/10.1007/s10845-015-1064-2, doi:10.1007/s10845-015-1064-2. [301] Jianhua Zhou, Yuwen Zhang, and J. K. Chen. Numerical Simulation of Random Packing of Spherical Particles for Powder-Based Additive Manufacturing. Journal of Manufacturing Science and Engineering, 131(3):1–8, 6 2009. URL: http://dx.doi.org/10.1115/1.3123324, doi:10.1115/1.3123324. [302] Linan Zhu, Yanwei Zhao, and Wanliang Wang. A Bilayer Resource Model for Cloud Manufacturing Services. Mathematical Problems in Engineering, 2013, 2013. URL: http://dx.doi.org/10.1155/2013/ 607582, doi:10.1155/2013/607582. [303] Z. Zhu, V. Dhokia, and S. T. Newman. A novel process planning approach for hybrid manufacturing consisting of additive, subtractive and inspection processes. In 2012 IEEE International Conference on Industrial Engineering and Engineering Management, pages 1617–1621, 12 2012. URL: http://dx.doi.org/10.1109/IEEM.2012.6838020, doi:10.1109/IEEM.2012.6838020. [304] Zicheng Zhu, Vimal G. Dhokia, Aydin Nassehi, and Stephen T. Newman. A Methodology for the Estimation of Build Time for Operation Sequencing in Process Planning for a Hybrid Process, pages 159–171. Springer International Publishing, Heidelberg, 2013. URL: http://dx.doi.org/10.1007/978-3-319-00557-7_13, doi: 10.1007/978-3-319-00557-7_13. 136 [305] Zicheng Zhu, Vimal G. Dhokia, Aydin Nassehi, and Stephen T. Newman. A review of hybrid manufacturing processes - state of the art and future perspectives. International Journal of Computer Integrated Manufacturing, 26(7):596–615, 2013. URL: http://dx. doi.org/10.1080/0951192X.2012.749530, doi:10.1080/0951192X. 2012.749530. [306] Dimitrios Zissis and Dimitrios Lekkas. Addressing cloud computing security issues. Future Generation Computer Systems, 28(3):583–592, 2012. URL: http://dx.doi.org/10.1016/j.future.2010.12.006, doi:10.1016/j.future.2010.12.006. 137
3cs.SY
Extension Language Automation of Embedded System Debugging Dale Parson, Bryan Schlieder and Paul Beatty Demo: Exploiting Extension Language Capabilities in Hardware / Software Co-design and Co-verification Cathy Moeller, Dale Parson, Bryan Schlieder, Jay Wilshire Bell Laboratories / Lucent Technologies In M. Ducassé (ed), proceedings of the Fourth International Workshop on Automated Debugging (AADEBUG 2000), August 2000, Munich. COmputer Research Repository (http://www.acm.org/corr/), cs.SE/0011010; whole proceedings: cs.SE/0010035. Extension Language Automation of Embedded System Debugging Dale Parson [email protected] All authors: Bryan Schlieder [email protected] Paul Beatty [email protected] Bell Laboratories, Lucent Technologies 1247 South Cedar Crest Blvd. Allentown, Pa. 18103 Keywords extension language, embedded system, debugger, reflection, Tcl/Tk Abstract Embedded systems contain several layers of target processing abstraction. These layers include electronic circuit, binary machine code, mnemonic assembly code, and high-level procedural and object-oriented abstractions. Physical and temporal constraints and artifacts within physically embedded systems make it impossible for software engineers to operate at a single layer of processor abstraction. The Luxdbg embedded system debugger exposes these layers to debugger users, and it adds an additional layer, the extension language layer, that allows users to extend both the debugger and its target processor capabilities. Tcl is Luxdbg’s extension language. Luxdbg users can apply Tcl to automate interactive debugging steps, to redirect and to interconnect target processor input-output facilities, to schedule multiple processor execution, to log and to react to target processing exceptions, and to automate target system testing. Inclusion of an extension language like Tcl in a debugger promises additional advantages for distributed debugging, where debuggers can pass extension language expressions across computer networks. 1. Introduction Embedded system debugging involves more conceptual layers of a target system than debugging for time-sharing systems. Consider the case of debugging a C program within a time-sharing system. User-debugger interaction occurs almost entirely at a C language level of abstraction. Descent into assembly language and machine code representations of a target program is rare. Suspicions about a compiler bug may require inspection of generated assembly code. Inadvertent stepping into an optimized library subroutine leads to display of assembly mnemonics and binary numbers. Debugging concurrency problems in multi-threaded programs entails cognizance of time, but wellstructured multi-threaded programs limit temporal awareness to a few, isolated regions where multiple threads are allowed to interact. These examples are exceptions, and most programmers can debug their programs exclusively from a source language perspective. Embedded systems add several dimensions to debugging. Embedded systems include programmable physical devices that have no direct language counterparts at higher levels of abstraction. Their programming requires direct manipulation of registers and state machines. Assembly language programming is common for performance-critical modules. Temporal determinacy is fundamental to a real-time embedded system, eliminating the possibility of constraining temporal awareness to a few, isolated regions of code. Multiple, heterogeneous processors operating at different levels of abstraction, for example a microcontroller running Java™ or C++ teamed with one or more digital signal processors (DSPs) running a mix of C and assembly code, are commonplace within some classes of embedded systems. Mixing abstractions within design and debugging is typical. This paper is about the practical application of an additional layer of language abstraction, an extension language abstraction, to the aforementioned layers of embedded systems. An extension language serves a tool such as a debugger by providing a programming language, typically an interpreted language, for extending tool capabilities via composition at tool usage time. Basic tool capabilities ultimately constrain the power of extensions that users can compose. Luxdbg, the LUxWORKS tool suite’s debugger for embedded systems [1,2], exposes multiple layers of target system abstraction to debugger users and auxiliary tools. Lucent Microelectronics provides a production version of Luxdbg in support of Lucent’s digital signal processors and mixed microcontrollerDSP systems for embedded telecommunications and related applications [3]. Luxdbg is implemented in C++, and it uses Tcl as its built-in extension language [4]. Luxdbg application space has primarily been in the area of embedded telecommunications signal processing, a huge area that is seeing rapid growth in multiprocessing. Cellular basestations — the electronics connected to the towers one sees while traveling along the road — are coming to employ large banks of two- and three-core DSP chips that put hundreds of individual processing cores into a system. Customers designing circuit boards for these systems require a debugger that can connect to about one hundred processors at a time. Not all processors are being debugged at any given time, and many of the signal processing algorithms running on each processor involve only that processor. The DSPs process signals for parallel voice and data channels. Nevertheless, all processors are running at the same time, and any processor can exhibit a bug at any time, so the debugger must be capable of connecting and interacting with one or more of the one hundred at any time. At the other end of the cellular continuum, a cellular handset (cell phone) often contains a DSP and a microcontroller. The DSP handles signal processing for the voice and data channels within that handset, while the microcontroller controls the system and provides user level IO capabilities. The handset presents only two processors, but they are heterogeneous, i.e., they provide different programming architectures and instruction sets. They may be programmed in different languages, e.g., assembly language or C for the DSP and C, C++ or Java™ for the microcontroller. Handset debugging does not require the massive multiprocessor debugging features required by a basestation, but it does require the ability to debug heterogeneous instruction sets and languages. A detailed account of the signal processing and related control architectures of Luxdbg’s target embedded systems is outside the scope of this paper, and indeed it is unnecessary. Most embedded systems consist of an admixture of high level language programming processes, assembly code for performance-critical tasks, and hardware registers and special-purpose devices for accepting sensory input and producing sensory or sensorimotor output. Communications channels can be considered artificial, special-purpose sensory realms. Most of the programming examples in this paper come from multiprocessor signal processing systems, where a given processor reads an information-bearing signal frame, processes that frame (e.g., extracts information, encodes information, superimposes signal content on a carrier, encrypts, decrypts, removes noise or otherwise filters, etc.), and then sends the resulting frame of data on to the next stage. Human users usually attach at the endpoints of these distributed signal flows. Debugger users attach anywhere a bug surfaces. This paper constitutes an experience report in effective uses of an extension language within a multiple abstraction embedded system debugger. Section 2 gives an overview of using an extension language within an application. Section 3 examines the layers of embedded system abstraction for which Luxdbg supports debugging. Section 4 surveys the classes of extensions that users can employ in extending Luxdbg and its target embedded processors. Section 5 discusses related work. Section 6 gives conclusions and directions for upcoming work. Section 7 gives acknowledgments. Section 8 is an appendix containing a description of a Luxdbg demo that utilizes Tcl to model inter-processor communication hardware. 2. Extension language systems Figure 1 diagrams the interactions of an extension language in a system. The main system components are a client such as a user, extension script or auxiliary tool (e.g., GUI), an extension language interpreter such as Tcl[4] or Python [5], and an underlying application such as a debugger. Interaction begins at initialization time, when the application registers a number of primitive functions with the extension language interpreter. The interpreter adds these functions to its native command set. Client (e.g., user, extension script or auxiliary tool) textual command path application to the extension language interpreter. In an event-driven system it is possible for a user to associate an extension language expression with an event in the application layer. For example, in Luxdbg a user can associate a Tcl expression with a target processor breakpoint. When the breakpoint occurs, the debugger calls back to the Tcl interpreter, passing the expression to be evaluated and an identifier for the breakpoint as parameters. The interpreter evaluates the expression and returns the result to the debugger. Expression evaluation may include retrieval and modification of processor state. During a callback the extension language interpreter acts as a servant for the application layer, a reversal of their normal roles. Whereas the command path of Figure 1 allows the extension language to build extensions out of primitives, the callback path allows the extension language to extend primitives. For Luxdbg this means that users can extend the built-in debugging layers discussed in the next section. 3. Luxdbg layers of processor abstraction Extension language (e.g., Tcl) primitive function invocations primitive function registration; textual callback path Application (e.g., debugger) Figure 1: Extension language interactions After initialization the system enters its main interaction loop. It uses a command path to pass client commands to the extension language interpreter. The user may enter commands via a textual or graphical interface, or the user may write and invoke an extension language program (a.k.a. script). Built-in extension language primitives include control flow and data structuring constructs. The extension interpreter parses commands and executes scripts by invoking both its own primitives and application primitives. Typical debugger primitives include data retrieval, data modification and execution control for target processing systems. Figure 1 also shows a callback path from the Figure 2 illustrates the layers of abstraction available to a Luxdbg user. The extension language processor layer of Figure 2 is the extension language interpreter of Figure 1, augmented with Luxdbg debugging primitives. The remaining layers of Figure 2 constitute the application module of Figure 1. Each layer provides a C++ API that allows outer layers to build upon it. Luxdbg supports concurrent debugging of multiple, heterogeneous virtual processors, where each virtual processor is a hardware processor, a processor simulation model, or an operating system process that implements the layers of processing abstraction of Figure 2. Luxdbg represents each target processor as a C++ object with these layers. Each object includes public methods for access, modification, and execution control at these layers. The circuit layer represents integrated circuit pins, processor registers, memory regions, peripheral devices and timing information. This is the most physical layer, closest to the hardware. Embedded system programming entails access to devices such as digital-to-analog converters that control physical devices (e.g., speakers, heaters or motors), analog-todigital converters that allow the system to monitor sensors (e.g., microphones or temperature sensors), coder-decoders (codecs) that translate signals between computational and communications- extension language processor procedural code processor assembly code processor machine code processor circuit Figure 2: Layers of Luxdbg virtual machines oriented representations, and other devices that manipulate physical signals in a variety of ways. An embedded processor interacts with physical devices via registers that it retrieves and modifies using dedicated processor register slots and dedicated IO instructions, or by using memory-mapped registers, conventional fetch-store instructions and direct memory access (DMA). Embedded devices house state for a program that is outside the bounds of memory-oriented program variable state. An embedded system debugger must provide access to this state. The circuit layer in Luxdbg may be embodied by C++ circuit modeling objects such as memory or register models in a processor simulation model. A simulation model allows users to simulate execution of the instructions and IO operations of an embedded processor system before hardware is available. A simulation model supports debugger inspection of target system internal state and target system timing that may be inaccessible in a real, hardware system because it is hidden within the inside of a complex integrated circuit. The circuit layer may also be embodied by electronic circuits in a hardware processor. Hardware target systems typically provide dedicated debugger access pins and registers (hardware monitors) as well as target-resident debugger access library routines (software monitors) that allow a debugger to monitor and control program execution and target system state. Luxdbg users can interactively read and write circuit registers, memory, and other scalar and vector values using Luxdbg primitives. The machine code layer adds the concepts of an instruction stream and a system clock. Artifacts such as an instruction pointer (a.k.a. program counter), program memory, hardware interrupts and breakpoints become evident at this level. This layer consists of a programmable processor and the state contained in its circuit layer of abstraction, devoid of symbolic debugging information supplied by compilers, assemblers and linkers. With the machine code layer come Luxdbg primitives for allocating program memory and for determining execution location, primitives for setting and clearing breakpoints at machine program and data addresses, primitives for specifying breakpoint and processor exception handlers, and primitives for resetting, resuming, and interrupting program execution. System clock-based synchronization of multiple processor cores on a single chip also comes as part of the machine code layer. Timing is an important element of real-time embedded systems. Modern telecommunications embedded systems often employ multiple processors within a single silicon system on a chip (SoC). Each SoC houses multiple machine code processors. A SoC simulation model distributes a system-level clock that maintains precise timing relationships among contained processor cores. SoC hardware provides debugger access to execution cycles and instruction counts. Luxdbg can gain access to sub-instruction timing granularity, for cases of debugging interrupt latency or side effects of a visible instruction pipeline, when working with simulation models that represent these precise degrees of timing granularity. While the previous two layers reside in a target processing system that is being debugged, the remaining layers of Luxdbg reside in the debugger. The assembly code layer adds symbolic interpretation on top of programs running within the machine code abstraction. This is the first layer to relate binary run-time information to build-time source information. Unlike time-sharing systems, embedded systems typically do not carry much symbolic, source code information in the run-time environment. Often the run-time system lacks a loader; programs then reside in ROM. Luxdbg’s assembly layer adds a loader, symbol resolver and assembly expression evaluator to each machine being debugged. Primitives at this layer translate program symbolic names to machine code layer memory addresses and contents. The procedural code layer is a more powerful variant of the assembly code layer, adding constructs such as stack frames, data structures and objects that come with source languages such as C and C++. Both the assembly and procedural layers map usersupplied commands that are specified in source code terms to machine addresses and binary values. A C procedural layer, for example, maps a reference to a local C variable to a memory offset from a processor stack pointer in the machine code layer. These layers also map machine code event parameters such as breakpoint addresses up to source code terms such as source file-line number pairs and data structure member names, types and values. The extension language layer is the home of the extension language interpreter. The command set of the extension language layer includes extension language operations and Luxdbg primitives for the inner layers. By supplying primitives from all of these layers to the extension language layer, Luxdbg gives users and scripts access to several perspectives of a target processor. A target embedded processor is simultaneously a collection of embedded circuits, machine registers and memory locations, symbolic data structures and executable functions, and extension language operations. There are four categories of Luxdbg Tcl primitives. Processor management primitives allow Luxdbg to connect to a set of processors. These primitives include: • primitives to query the set of available processor simulation models, • primitives to query hardware debug servers for connected hardware processors, • primitives to construct a C++ processor model or to reserve a hardware debug connection, and to connect Luxdbg to one or more of these target processors, and • primitives to disconnect Luxdbg from target processors. Process access primitives allow Luxdbg users to read and write target processor state at all layers of abstraction. • An expression evaluator at each layer reads and writes target processor state, and combines state values within arithmetic expressions. Luxdbg’s fxpr expression evaluator primitive uses machine code level entities (e.g., registers and memory locations) and assembly level symbols (e.g. labels) to retrieve, compute and store values at these levels. The ce expression evaluator evaluates C expressions in the context of the procedural layer, translating symbolic references to machine references. Tcl provides its native expr expression evaluator with interactive C-like operations. Tcl can combine results from lower level expression evaluators using expr and other Tcl primitives. • Query primitives allow users to determine the identity of state-bearing entities within each layer of abstraction. Circuit level query allows Luxdbg users and Tcl scripts to determine the identity of registers, circuit signals, and blocks of physical memory in a specific processor. Machine code level query identifies the name of a processor’s program counter, a processor’s byte order, a processor’s native word size, and a processor’s program and data memory. (Program and data memory are distinct address arenas in many DSP architectures.) Unlike many debuggers, Luxdbg does not hard code processor-specific details like those listed above, but instead it queries processor simulation models to determine these details at run time. The assembly and procedural levels follow suit by allowing users to query for the identity and type of program symbols. • Signal logging primitives for simulation models store precise time-value transition tables for pins, registers, and other signals into log files. Time-triggered Tcl procedures can log procedure level information as well. Processor control primitives direct program execution. • There are primitives to set breakpoints, clear breakpoints, query breakpoints, reset processors, resume execution, stop execution, and to synchronize starting and stopping of multiple processors in a target system. • Control primitives accept both numeric addresses for the machine code layer as well as labels, function names, source fileline number pairs and data names from the procedural layer. Processor IO primitives connect processor models and hardware processors to data sources and sinks. • A loader primitive loads binary values into processor memory regions and loads symbol table information into assembly and procedural debugger layers. • There are primitives for connecting lowlevel device IO ports to debugger files and to Tcl callback procedures. IO at the procedural layer usually occurs via library calls, and Luxdbg can insert breakpoints into these calls and redirect library-based IO flow to and from files or Tcl procedures. Each layer of Luxdbg supports reflection [2]. Reflection refers to the ability of client code to interactively inspect the underlying contents of server code, in order to determine unique capabilities of a specific server at run time. Reflection forms the basis for Luxdbg query primitives. One example is a Luxdbg query to determine available processor model types: luxdbg: pssr models ; # query available models 16210i 16270i 16410c arm9 ... luxdbg: ? R ; # query registers in this processor {p0 0 s 32} {p1 1000 s 32} {r0 5 u 20} ... Querying registers yields name-value-typetagwidth 4-tuples in this example. As with any Tcl command, results from invocations of debugging primitives are available for use by Tcl scripts. For example this interactive Tcl loop uses the “? R” register query: foreach reg [? R] { # print register name & width puts “reg: [lindex $reg 0] width [lindex $reg 3]” } prints this result to Tcl’s standard output: reg: p0 width 32 reg: p1 width 32 reg: r0 width 20 ... Reflection allows Luxdbg to adapt its behavior as well as its user interface to a particular processor at run time. An outer layer can determine and manipulate not only the state of an underlying layer, but through reflection it can also determine the identity of state-bearing entities within that layer. A client of the circuit layer uses reflection to determine the identity and properties of pins, registers and memory blocks within that layer. A client of the machine code layer uses reflection to determine the name of the program counter register, program memory, and byte ordering within a multiple-byte instruction stream. Reflection for assembly and procedural layers exposes symbol names, types and addresses, stack frame conventions and source file identities. Reflection for an extension language such as Tcl provides information on the state of the interpreter, for example: info commands ; # queries Tcl command set next logsigs down resume ... Luxdbg uses reflection to adapt its operations to each target processor and program. Such flexibility is essential in debugging multiprocessor systems that have come to include an array of heterogeneous processor types and programming languages. Luxdbg’s expression evaluators rely heavily on reflection. Luxdbg’s fxpr, the machine code and assembly language expression evaluator, uses fixed syntax that is compatible with expr, Tcl’s built-in arithmetic expression evaluator. Fxpr operands, however, come from machine code entities (e.g., registers and memory) and assembly language symbols that fxpr identifies and reads or writes via reflection. Fxpr can thus adapt itself to different processor architectures and target programs by querying their reflection interfaces for operands available to fxpr. Likewise, Luxdbg’s C expression evaluator, ce, queries target programs for available types, variables, functions, etc. The extension language layer has access to all of this reflection and the primitives built using it. Each processor object has a textual instance name in Luxdbg. A user can invoke the processor new command to create a new processor simulation model or to connect to a remote processor or process, and to associate this processor with an instance name such as “dsp1” or “controller” or any user-selected name. Thereafter the user can use an instance name as a prefix to debugging commands. A Luxdbg primitive uses an instance name to set the current processor reference in C++. Commands nested within the dynamic scope of an instance name go to that processor object. For example, the Tcl command “p2 fxpr r0 = [p1 r3] * 2” retrieves the value of register r3 from processor p1, multiplies it by 2, and stores the result in register r0 of p2. Fxpr determines the semantics of its arithmetic operators by consulting its target machine code processor. Fixedpoint DSPs supply fixed-point semantics while microcontrollers supply mixed floating point / integer semantics similar to C expressions. A Luxdbg Tcl expression can defer specification of a target processor. Suppose, for example, Tcl procedure logRegisters were written, without a processor prefix, to write name-value pairs for all processor registers to standard output. Suppose further that Tcl procedure logAll were written, again without a processor prefix, to invoke logRegisters along with some other log procedures. Now suppose that Luxdbg is connected to a DSP instance that a user has named “dsp5,” and the user invokes “dsp5 logAll” in an interactive command or from within a Tcl script. Procedure logRegisters works with Luxdbg’s current processor, in this case the processor named dsp5. Primitives such as fxpr query dsp5 for state-bearing entities and their contents. The Tcl procedure logRegisters, while not a primitive, uses primitives to determine the identity and contents of registers within the current processor, without any hard-coded knowledge of that processor’s registers. A later invocation of “controller2 logAll” for microcontroller “controller2” would perform similarly for controller2, which might be an entirely different sort of processor. As long as logRegisters and logAll are written to use the reflection interface and target-neutral primitive commands, and to avoid making target processor assumptions, they can work for a variety of processors, selected by a user or script at run time. So far we have described the basic extension language, virtual processor and reflection machinery that provides the basis for Luxdbg’s debugging power. The next section catalogs a number of ways in which Luxdbg developers, field support staff and users can employ this machinery in extending the capabilities of Luxdbg as well as its target processors. 4. Luxdbg avenues of extension 4.1 Command and callback path mechanisms The command path of Figure 1 initiates activity in Luxdbg. All interactions start out when a user, a Tcl script or an auxiliary tool issues a set of textual commands to Tcl. Tcl, in turn, examines and modifies target processor state. Tcl sets breakpoints via breakpoint primitives; it causes target processor execution by calling the resume primitive. Tcl again interacts with processor state upon processor arrival at the next breakpoint. These are all examples of command path control mechanisms. Upper, client layers direct control. Callback path control comes about when a target processor object reacts to an event in the target processing environment by invoking a callback procedure. A callback may be a Tcl expression set by a user, script or auxiliary tool. A callback may also be a C++ method, built into Luxdbg, that reacts to target events. A target event causes its processor to stop at a breakpoint, and a callback can interact with the stopped processor as well as with any other Luxdbg processor that is at a breakpoint. Luxdbg sets the default current processor to the triggering processor during a callback. A single processor may provide multiple target events, thereby triggering multiple callbacks, during a single interaction with the debugger. If all events connect to callbacks, and if all callbacks invoke resume, then upon completion of all callbacks, the target processor resumes execution as though no breakpoint had occurred. Callbacks form the basis for conditional breakpoints. Command and callback operations have one important difference, part of which we have just seen. Invoking resume as a command operation causes a halted processor to begin execution. Invoking resume as part of a callback operation schedules that processor for resumption upon completion of all callbacks. A single callback invocation that does not invoke resume causes a break to the outer, command-invoking user, script or auxiliary tool upon callback completion. An outer, command resume invocation can start any processor, while a callback resume can schedule only the processor that triggered the callback. The major net effect of callbacks is the extension of target processor primitives at any of the layers of Figure 2. From the perspective of a command resume invocation, execution of a callback can appear as a seamless part of target processor execution. All of the examples of this section use callbacks to extend processor capabilities. 4.2 Conditional debugging and assertions Callbacks support incremental extension of conventional debugging activities, from providing small helper functions that eliminate manual activity, to providing sophisticated assertion checking mechanisms. Conditional breakpoints provide one example. Suppose a target C function exhibits an error after many invocations of that function. A simple breakpoint that stops on every function invocation becomes annoying because of the number of times that the debugger user must manually resume execution. Some debuggers provide breakpoint counters that a user can set in order to skip over breakpoints, but these debuggers do not provide means to determine the counter value in the first place. They also do not provide a means for sampling the triggered breakpoints, for example stopping on every tenth breakpoint. A user could insert extra debugging code into a target function to keep track of invocation counts, but this insertion involves time-consuming compilation, and it shifts the target program address space, possibly masking the error being debugged. Listing 1 shows Tcl procedure setCount that counts the number of invocations of target C function targetFunc. Assume that the user has issued the command “stop in targetFunc setCount,” which sets a breakpoint in targetFunc and associates setCount as the callback operation to pass to Tcl. Every target invocation of targetFunc triggers the breakpoint, which stops the target and invokes setCount via the callback path. Tcl interprets setCount, incrementing its counter and resuming target execution. Eventually the target error occurs, causing a breakpoint for which the user has not provided a callback, so control returns to the user. Now the user can interactively retrieve the counter value by issuing the “set setCounter” command to Tcl. set setCounter 0 ; # initialization proc setCount args { global setCounter incr setCounter ; # bump counter resume ; # continue target processor execution } Listing 1: Recording a target invocation count With a setCounter value in hand (e.g., 1233), the user could rewrite the “resume” line of procedure setCount to be a conditional: “if {$setCounter < 1230} resume.” Since Tcl is interpreted, the user can rewrite setCount interactively and use its new definition immediately to stop function targetFunc in the desired invocation by restarting the target application. Now setCount is the simple counted breakpoint feature built into some debuggers. Sampling every tenth breakpoint could be achieved by using Tcl’s modulo (“%”) operator: if {($setCounter % 10) != 0} resume In general, any callback expression of the form if {predicate} resume supports conditional breakpoints, where “predicate” could be the invocation of a Tcl procedure. Execution breaks to the user when a predicate is false. Predicate testing can occur at any level of abstraction of Figure 2. For example if {[fxpr r0 != endlocation]} resume uses fxpr to compare machine register r0 to the address of assembly label endlocation. Predicate if {[ce head_of_list != NULL]} resume uses the C expression evaluator to compare C variable head_of_list to the NULL value. Predicate if {[info commands $pname] == ““} resume uses Tcl’s info command to test for the existence of a command whose name is contained in variable pname. This technique is much more powerful than standard conditional breakpoints, because the latter allow tests only on the target program. A Luxdbg user can extend the test space available to predicates. The test space could be the saved results of previous target runs, allowing breakpoint callbacks to monitor regression test results. The test space may also be a set of assertions that a programmer expects to see upon entry or exit of a target function. By setting breakpoints at function invocation and exit points, and by coding assertions as Tcl predicate expressions, the programmer can check assertions without modifying target code, halting execution only when an assertion is violated. Since the assertion checker is a piece of Tcl code, it can print a message identifying the cause of failure to the user (e.g., print the assertion expression as a string). When control returns to the user, source code display identifies the location at which the assertion failed. 4.3 Extended input-output Callbacks support input-output extension for all of the layers of Figure 2. At the lowest layer, a processor simulation model can include peripheral models that take the place of actual IO hardware. Each peripheral model contains simulated registers and memory that represent their hardware counterparts. In addition, each peripheral model contains a callback hook that a user can connect to a Tcl procedure. Suppose a target processor executes the machine code instruction “r0 = pio1,” where pio1 is a parallel IO port register. In real hardware the processor would latch the value on the input pins of pio1 into a register and transfer that value to register r0. In a Luxdbg simulation where the user has connected pio1 to a Tcl procedure by using the srcfn command (to “source” an input from a function): srcfn pio1 myInputProc Luxdbg invokes a callback to the Tcl procedure myInputProc. The procedure can retrieve a value for pio1 from many places — a file, the user, an output port from a different processor instance, or from a random number generator. The return value from the Tcl procedure finds its way into simulated register pio1, and the simulation continues without interruption. Reversing the machine code instruction to its output equivalent, “pio1 = r0,” copies r0 to a parallel output port in real hardware. In a Luxdbg simulation where the user has connected pio1 to a Tcl procedure by using the sinkfn command (to “sink” an output to a function): sinkfn pio1 myOutputProc Luxdbg again invokes a callback. This time the callback procedure myOutputProc receives the output value as a parameter, and it can write the value to a file, user, or input port of another processor instance. Input-output redirection is not restricted to simulation models. Both models and real hardware can use memory access breakpoints (a.k.a. data breakpoints) to simulate memory-mapped IO. A read or write for a memory location with a breakpoint results in a callback that simulates memory-mapped IO. The stop command can specify breakpoints at the machine code, assembly or procedural levels of abstraction, supporting memory-mapped IO simulation at any of these layers. For example, if a C program contains a global variable called outport: int outport ; that the C program uses to simulate output, Luxdbg can set a data-write breakpoint on this variable: stop outport -write outportHandler and Tcl procedure outportHandler can use ce to retrieve outport for writing to a file: puts $logfile [ce outport %d] Comparable machine level memory-mapped IO on address 0x2000 would use “stop 0x2000 -write handler” to set the breakpoint and “fxpr *0x2000” within procedure handler to retrieve its value. Our trivial examples only hint at the possibilities. The appendix describes a simulation model for an entire application-specific IC block (ASIC) written as a set of Tcl functions. A multiple-processor chip could use such a hardware ASIC for inter-processor communications. We can simulate this interaction in Luxdbg by running real, discrete hardware processors, routing their communications through the Tcl ASIC model via breakpoint callbacks. Luxdbg supports IO redirection at higher levels of processor abstraction. A target embedded system might not support textual IO, but C printf statements remain a popular method of monitoring and debugging program execution, even in the presence of powerful debugging utilities. Because of the usefulness of streaming textual IO during software development, Luxdbg supports semi-hosted libraries for many of the standard C IO system calls and library functions. Listing 2 shows the very minimal portion of printf implemented for a target DSP16000. This assembly code links directly into an embedded application running in hardware or in a processor simulation model. It works by putting the printf function identifier into the processor’s i register, then invoking the icall 0 system call instruction. This system call traps the processor or operating system process, which then runs a breakpoint handler, and a breakpoint event arrives at Luxdbg. Listing 3 shows the beginning and end of the event callback for the breakpoint-based printf. It reads the printf format string from the top of the DSP16000 stack memory, iterates through a loop that reads value parameters and concatenates an output string (details not shown), sends this string to the debugger’s standard output, and finally returns the number of characters printed back to the target environment in register a0. #include “shlib.h” .rsect “.text” .align function ___printf( // IN: *(sp) = format string // IN: *(sp+N) = other arguments (if used) // OUT: a0= output length on success, else -1 ){ i = _SP_FUN_CODE(_SHLIB_PRINTF) icall 0 return } Listing 2: Printf hook in a DSP16000 target proc handle_printf {} { set top [sp @rd]; a0=-1 set sFormat [readstring [list ymem \ [readlong “ymem $top”]]] incr top 2; set skipme 1; set formatargs ““ foreach arg [split $sFormat %] { ... (Implementation not shown) } set output [eval format \$sFormat $formatargs] send_to_stdout $output a0=[string length $output] } Listing 3: Printf implementation snippet in Tcl Input-output handling at the client layer of Figure 1 takes the form of Tcl/Tk GUI extensions. Luxdbg gives users access to the full power of the Tcl/Tk graphical tool kit [4], with which they can create custom graphical widgets and bit-mapped graphical canvases. As with the other levels of IO redirection, users can connect event callbacks to GUI extensions, updating their graphical creations with processor information as changes occur. 4.4 Multiple processor scheduling Luxdbg becomes involved in processor scheduling when it is used to simulate communications within a multiprocessor system. Luxdbg loads one or more frames of input data to the first processor in a pipeline or other multiprocessor topology, then uses resume and breakpoint callbacks to run that processor until it fills an output buffer. Filling an output buffer triggers a breakpoint, and a breakpoint callback procedure copies the output buffer to the input buffer of a receiving processor. A Tcl level scheduler can then resume the receiving processor’s execution, causing it to contribute its part to system data flow. This model of multiprocessor communication forms the basis of the demo described in the appendix. Processor input-output handling works using the callback path of Figure 1. Processor scheduling takes us back to the top-down command path. Recall from Section 4.1 that invoking resume from above causes processor execution, while invoking resume from within a callback avoids taking an interactive breakpoint. Avoidance of callback resume is the key to Tcl schedulers. A breakpoint that has no Tcl callback, or a callback without resume, causes processor execution (initiated via resume) to stop, returning control to the outer resume’s caller. This outer resume may have come from a user, or it may have come from a Tcl scheduler script. Listing 4 shows a simple round-robin, cooperative scheduler for a list of processors passed as a parameter to this Tcl procedure. Each processor in the list runs until it hits a breakpoint, and the scheduler iterates over the list N times. Presumably the breakpoint is triggered on the completion of some task, e.g., completion of processing a data flow. A scheduler with uncooperative processors could substitute stepi $count for resume; the stepi command steps a target processor some number of machine level instructions; it is guaranteed to return. proc scheduler {processors N}{ # command path for {set i 0} {$i < $N} {incr i} { foreach p $processors { $p resume } } } Listing 4: Round-robin, cooperative scheduler Listing 5 gives a scheduler variation, this time a scheduler driven by processor output events. The scheduler starts out using parameter startproc to identify the processor to start, then it consults a global Tcl variable nextproc. Output breakpoint callback procedure output_callback is coded to write its output value to a neighboring processor’s input port — obtained via associative array neighbor, set up by the scheduler’s Tcl script, which is indexed on the current processor name obtained via primitive processor name — and then pass that neighbor’s name to the scheduler for execution via nextproc. The lack of resume in the callback guarantees return of control to the command path scheduler. Scheduling terminates when the last processor in the sequence is reached, signified by a blank slot (““) in the neighbor table. proc scheduler {startproc}{ # command path global nextproc $startproc resume while {$nextproc != ““} { # terminate on empty processor name $nextproc resume } } # output callback is attached to each processor’s # output breakpoint proc output_callback args { # callback path global nextproc neighbor set nextproc $neighbor([processor name]) if {$nextproc != ““} { # copy my outport to neighbor’s inport $nextproc fxpr inport = [fxpr outport] } # no resume means break to scheduler } Listing 5: IO event-driven scheduler Luxdbg originally provided only the blocking resume and stepi commands for execution resumption, allowing only one processor or multiprocessor chip to execute at one time. Serial scheduling was the only possibility. Luxdbg now includes the ability to run target processors in the background without blocking the debugger via the resume & command, named after the UNIX use of & for background execution. We are adding a wait command that will block until specified background processors have stopped at breakpoints. The combination of resume & and wait gives Luxdbg logical fork and join operations for concurrent target processors and processes. With these we will be able to write concurrent schedulers that interleave target processor execution, blocking the debugger until it is safe for it to act. 4.5 Exception logging and testing Luxdbg treats exception events in a target processor similarly to the way it treats breakpoints. Each exception has a unique identifier to which a Luxdbg user or script can attach a callback. Exceptions come in four levels of severity — note, warning, error and fatal. Default behavior for notes and warnings is for Luxdbg to print a message and issue resume, while default behavior for errors and fatal errors is to print a message and stop the processor. Callbacks can be attached to any exception type, and any non-fatal exception callback can successfully invoke resume. Users can use this mechanism to shut off unwanted notes and warnings, to log specific exceptions, and to perform processor exception handling in Tcl similar to breakpoint handling already discussed. Among other uses, an extension language such as Tcl provides an ideal basis for regression test machinery. Tcl has a complete set of file manipulation operations, making it possible to set up tests and compare results from files of text tables. Tcl provides a catch instruction that allows Tcl-level handling of failed instructions, so it is possible to set up degenerate conditions in a test script and test for proper Luxdbg reactions without crashing the script if Luxdbg operations fail. Luxdbg testing uses all of the extension language machinery discussed above within its regression test suite. 5. Related work Several other debuggers have used debugging languages or extension languages. The deet debugger for C programs [6] comes closest to Luxdbg in its use of Tcl as the user interaction language, its use of a user-extensible Tk GUI, and its application of Tcl for conditional breakpoints and testing. Deet builds atop cdb, an earlier, machine-independent debugger for C programs [7]. Luxdbg and deet differ in their use of Tcl primarily with respect to Luxdbg’s user association of arbitrary Tcl expressions with breakpoints and exceptions for callback interactions. Deet supports conditional breakpoint expressions that it evaluates using Tcl procedures, but deet appears not to have Luxdbg’s more general target processor event handling machinery. Much of this Luxdbg machinery finds application beyond debugging, for example in simulation, testing and prototyping, but event-driven callbacks are also useful for automating reactions to bugs. SmartGDB is another Tcl-based debugger [8]. In addition to adding GDB commands as primitives to a Tcl interpreter, SmartGDB provides the ability to associate a Tcl procedure with a breakpoint event. SmartGDB does not distinguish between the command path and callback path of Figure 1. Invoking the GDB continue primitive from with a breakpoint procedure causes immediate resumption of processor execution, resulting in loss of breakpoint context as well as loss of any concurrently triggered breakpoint procedures. Because of the lack of distinction between command and callback invocations of the Tcl interpreter, SmartGDB does not support seamless extension of debugger primitives via resume-bearing callbacks. DUEL [9] and ACID [10] are two debuggers with embedded, special-purpose debugging languages. These languages are not general-purpose scripting languages such as Tcl, but rather are dedicated to debugging specific types of target systems and languages. As with deet, both use top-down, command interactions from the debugger to a target system. Generalized path expressions [11] and the Formal Annotation Language (FORMAN) [12] are two query-oriented debugger languages that operate on program execution traces. Path expressions provide a special purpose notation for querying program execution paths and for specifying ordering and other constraints. FORMAN uses target processing events and a general event grammar to provide a language for automation of debugging, assertion checking and profiling. Both approaches operate at a higher level of abstraction than Luxdbg, providing mechanisms for searching and testing the execution history of a running process. In the issue of language selection, there is a trade-off between language applicability and language accessibility to a large programming population. Use of a special purpose language requires learning yet another programming language that is dedicated to a single stage of software development, debugging. Use of Tcl, on the other hand, transfers into areas beyond debugging, such as testing, user interface design, and other applications. Popular extension languages come with large utility libraries, commercial support, and a large user community from which to draw information. With modest efforts a user can build or collect Tcl procedures for Luxdbg that achieve some of the benefits of the debugger-specific languages. We have found that field application engineers and expert users of Luxdbg have built sophisticated, applicationoriented debugging infrastructure using Tcl that easily puts Luxdbg on par with dedicated debugging languages with respect to expressiveness. Tcl could provide a base for building automated debugging extensions similar to those of dedicated debugging languages. The Coca debugger has used a more widely accepted, interactive language — PROLOG — as the basis for a powerful engine that searches program trace information during target program execution [13]. Coca uses PROLOG’s backtracking on failure mechanism very effectively to allow users to explore a set of program execution states that satisfy query constraints. Coca avoids the storage-intensive performance problems of some relational debugging systems by using breakpoints and target systemresident program event extraction and analysis modules to perform its queries at target run time. With the ready availability of PROLOG interpreters, it would be possible to replace Tcl with PROLOG in a research version of Luxdbg that supports run-time selection of the extension language [14]. A novel requirement of Coca is extension of the symbol table information of a target program with annotations concerning various target programming constructs such as the location of for loops and if conditional constructs for language construct-driven specification of queries and corresponding placement of breakpoints. The ldb debugger uses PostScript as an extension language for communicating target program symbol table information among the compiler, target application and debugger [15]. It does not bring the extension language out to the debugger user. Luxdbg differs from all of these related projects in several regards. Luxdbg uses processor / process instance names, as Tcl command prefixes, to delimit the dynamic scope of debugging commands. Luxdbg provides debugging at the multiple layers of abstraction of Figure 2. It includes dedicated expression evaluators fxpr, ce and expr to delimit the scope of symbols within an expression. DUEL and ACID work directly in target system scope, at a single level of abstraction, while deet employs a single level of namespace indirection for C variables. The other debuggers cited use explicit scope to access variables at a single level of target language abstraction. Consequently Luxdbg could be viewed as a series of debuggers, for different levels of processor abstraction, with an expression evaluator for each. Commands that interact with more than one level of abstraction, such as stop for setting breakpoints at machine, assembly or procedural levels of abstraction, include command syntax for disambiguating context. Commands infer a default context of either a procedural language or assembly / machine code, based on a processor’s current breakpoint address and corresponding program scope. Many of the features of Luxdbg are orthogonal to the issue of extension languages. Virtual processor layers, reflection, multiple processor debugging and heterogeneous processor debugging are examples. Yet this orthogonality is a property that gives an extension language considerably more power in Luxdbg. An extension language user has access to all of these orthogonal capabilities, and a user can combine these capabilities via extension language scripts to create powerful custom debugging features. its use in testing, its use in constructing custom development environments, and its use in extensible GUI construction — find practical application in the field. Luxdbg’s application of Tcl remains one of the strongest aspects of this debugger. Ongoing work includes investigation of Java for upper debugger layers in order to take advantage of Java networking, dynamic loading, reflection and class library infrastructure. Luxdbg has used Java to parameterize the extension language, so that languages such as Python can be loaded at run-time in the place of Tcl [14]. Distributed debugging supported by distributed extension language interpreters is an area for research [16]. Passing expressions across the Internet to remote debugging sites is easily achieved with interpreted extension languages. The send command provides the basis for remote interpretation in Tcl [4]. By combining the debugging primitives of Luxdbg with communications primitives such as send, extension languages provide a powerful base for distributed debugging research and application. 6. Conclusions and directions Jerry Williams of Lucent Technologies is the originator of the C-level semi-hosted libraries for standard IO of Section 4.3. Lee Deschler of Lucent was responsible for developing the version of these libraries reported in this paper. Helen Zhang of Lucent deserves recognition for her ongoing efforts to refactor Luxdbg classes in the interest of maximum flexibility of this multi-level debugger. Luxdbg is being enhanced, supported and deployed by a team of engineers in Lucent Microelectronics. Its Tcl extension language features are very successful. All of the aspects of Tcl discussed in this paper — its use in mixed Cassembly-machine code-circuit debugging, its use in customizing embedded input-output operations and exception callbacks, its use in processor scheduling, 7. Acknowledgments 8. Appendix — Demonstration: Exploiting Extension Language Capabilities in Hardware / Software Co-design and Co-verification Cathy Moeller, Dale Parson, Bryan Schlieder, Jay Wilshire {cbmoeller,dparson,bryanschlieder,wilshire}@lucent.com Abstract Proper design of an embedded system requires the ability to analyze multiple implementation options to determine what parts of the system are best implemented in hardware and what parts are best implemented in software. Construction of a hardware prototype is both expensive and time consuming. In this demo we use the Tcl extension language to explore large parts of an embedded system design space, to debug and to optimize software before hardware is available, and to utilize existing hardware to accelerate the design process. The demo illustrates how abstracting differences between simulation and hardware emulation can minimize code size and maximize test software reuse. 8.1 Introduction The Lucent Technologies LUxWORKS [17] debugger, Luxdbg, uses Tcl/Tk [18] as its interactive command language and user interface construction library. The Luxdbg Graphical User Interface (GUI) is written entirely in standard Tcl/Tk and communicates with a modified Tcl command interpreter. The modified interpreter adds debugging commands to support debugging of both processor simulation models and target hardware systems that can be controlled through an emulation interface: either classic pin-based in-circuit emulation or serial IEEE 1149.1 test port (a.k.a. “JTAG”) [19] access. Luxdbg’s rich set of breakpoint capabilities, device state observation and control commands and graphic extensions enables complex interactions with either the device model, target hardware, or both. The Tcl extension language includes support for separately loadable packages and unique namespaces so that users can easily write application-specific Luxdbg extensions. Tcl serves as an interactive command language and as a programmable scripting language for initiating LUxWORKS debugging actions. In addition, Tcl serves as an event handling language for processor events such as breakpoints and exceptions. A user can associate a Tcl expression with a processor breakpoint or exception. When the associated processor event occurs during execution, the processor stops and Luxdbg invokes the corresponding Tcl expression as a callback. This Tcl callback can read, write, and copy processor state among the set of stopped processors. The callback can also resume execution of its stopped processor, or it can force a break to the user or outer Tcl script. Tcl/Tk allows users to customize the Luxdbg interface by creating and modifying menus, buttons, and windows and attaching them to user-defined scripts. The demonstration shows the flexibility and power of Tcl/Tk scripting by extending the LUxWORKS debugger and its target processor systems. We use Tcl/Tk to: • create an abstract model of an interprocessor communication channel in the form of a bidirectional shared-memory mailbox that is used with both simulation models and/or target hardware to study the effect of various mailbox architectures on key system performance factors such as latency (polling vs. interrupts), throughput, processor communication overhead, and application software complexity, • produce a reusable library of debugging and profiling scripts to verify the correctness and performance of the system, • provide high-level visibility into the workings (or non-workings) of various system configurations through a custom graphical interface built from freely available Tcl/Tk graphics packages [20]. RAM Processor 1 Mailbox Model Tcl/Tk RAM Processor 2 Figure 3: Demonstration Components 8.2 Approach Figure 3 shows the topology of the demonstration. The two processor building blocks are identical Luxdbg processor instances with access to conventional external RAM. Identical instances simplify implementation, but the demonstration easily extends to heterogeneous processor instances. The Mailbox Model is a simulation model implemented as a set of Tcl procedures that use breakpoint callbacks to gain control, and memory-tomemory transfers to give the appearance of a sharedmemory space. The processor instances are either device simulation models or actual devices on a circuit board controlled by Luxdbg that have access to external memory. The choice of simulated models, hardware targets or a combination is made at run time. Data buffers in conventional memory of the two processors hold message data and represent the control and status registers of the simulated sharedmemory mailbox circuitry. Data address breakpoints trap writes to the simulated mailbox control register of each device. When the sender issues a command, the Tcl callback associated with the breakpoint simulates mailbox hardware by copying data from the sender to the receiver’s memory, updating the receiver’s status register, and optionally redirecting the receiver to an interrupt service routine. Test software running on each processor exercises driver software tailored to specific simulated mail-box hardware. Both mailbox hardware and driver-software defects are detected by running automated simulations and/or hardware emulations. A library of test procedures written in Tcl helps the user explore the test space. Users select hardware/software configurations and run tests that: • send increasingly large messages in both directions simultaneously, • attempt to starve the receiver in a polled environment, • measure throughput, latency and processing overhead. A graphical interface controls and displays test parameters and displays test results. 8.3 Demo Details The target hardware is a Lucent DSP16210 demonstration board with 2 DSP16210 processors, one with 64 Kilobytes and one with 256 Kilobytes of external data memory. The only physical connection between the processors used in the demo is a shared JTAG serial test bus. In hardware mode, memory transfers pass data from one processor to the debugger-resident Tcl Mailbox Model over JTAG, and then down to the other processor over JTAG. The demo can also use simulation models of the DSP16210 processor, each including the necessary memory simulation models. The debugger interacts with each model instance via “software probes” that are C++ objects that read and write processor state- bearing objects. These software probes take the place of processor JTAG ports used for hardware debugging. Simulation within Luxdbg is single threaded, so dual-processor simulation requires a scheduler written in Tcl to pass control between two processor model instances. An extremely simple scheduler that advances each model by one instruction is implemented in six lines of Tcl: # Simulation mode step-based scheduler, # default step count is 1. proc advanceSim { p1 p2 { count 1 } } { for { set ii 0 } { $ii < $count } { incr ii } { $p1 stepi $p2 stepi } } P1 and p2 are Tcl variables that contain the processor instance names; count is the number of steps to advance. Even this simplistic advance procedure shows the power of Tcl: formal parameters p1 and p2 provide reusability and the default value 1 for count helps makes the syntax compact. In hardware mode, the advance procedure could also be implemented with a step command. However, each invocation of debugging primitive “stepi” entails flushing debugger state to the processor, stepping the target instruction, and then retrieving state to the debugger. Each transfer of hardware state involves communication overhead not entailed by simulation mode, since a simulated model and its probes reside in the debugger process. A more efficient approach is to run each hardware processor until its reaches a well-defined control point (e.g., write to a mailbox, or run until cycle count is exhausted), and then break to the debugger. Tcl procedure advanceHdw executes its target processors for count machine cycles; count gives a time slice for each processor. # Hardware mode cycle-based time-slice scheduler # Run processor p1 then p2 for count cycles proc advanceHdw { p1 p2 { count 1 } } { $p1 runProcessorForCycles $count $p2 runProcessorForCycles $count } The demo’s advance procedure uses both advanceSim and advanceHdw and also handles mixed modes with one device in hardware mode and one in simulation mode. Procedure runProcessorForCycles uses lowlevel, hardware-specific registers cycles and cyclec for counting and controlling execution cycles, and pseudo-registers tryCycles and elapsedCycles for tracking cycles. Users can add pseudo-registers at run time. Some low-level registers such as cyclec are inaccessible to typical users, but “configure hiddenregisters on” adds hidden registers to a processor’s reflection API, rendering these registers visible in Tcl. RunProcessorForCycles deals with the fact that cycle-counting hardware breakpoints have not been integrated into the Luxdbg at command that sets temporal breakpoints. RunProcessorForCycles sets hardware cycle counting registers directly, and it installs procedure expired as a callback handler for exception UNHANDLED_BP. A target processor throws UNHANDLED_BP when any target breakpoint occurs that was not explicitly set from the debugger via stop or at. In this case the cycle counter causes an UNHANDLED_BP exception because runProcessorForCycles bypasses at and sets cyclec and cycles directly. # advance the state of current hardware processor # - instance specific set UNHANDLED_BP 5067 proc runProcessorForCycles { docycles } { global UNHANDLED_BP # register the breakpoint exception callback except $UNHANDLED_BP expired configure -hiddenregisters on # request DEBUGMODE on cycle countdown cyclec = cyclec | 4 tryCycles = $docycles ;# record requested stride elapsedCycles = cycles ;# save # count up - rollover causes DEBUGMODE brkpoint cycles = 0 - tryCycles resume # wait for callback } Expressions such as “cyclec = cyclec | 4” in runProcessorForCycles are implicit invocations of fxpr. Luxdbg intercepts Tcl’s unknown command to determine whether an unknown command is a valid fxpr expression, and if so then the interceptor invokes fxpr. Callback procedure expired tests to determine whether the thrown exception matches the desired cycle count breakpoint exception, and if it does, expired then clears the breakpoint bit from the cyclec register, restores cycles from being a cycle breakpoint trigger to a cycle counter, and removes the hidden registers from the Tcl reflection API. # procedure to handle cycle counter expiration # - instance specific set CYCCNT_EXPIRED 2415919104 proc expired { errnum severity errstr } { global CYCCNT_EXPIRED # make sure this is our DEBUGMODE brkpoint regexp {^.*handle ([0-9]+) *$} “$errstr” match Value if { $Value == $CYCCNT_EXPIRED } { # clear DEBUGMODE request cyclec = cyclec & 0xfb # restore cycles, adjust for instruction boundary cycles = elapsedCycles + tryCycles + cycles configure -hiddenregisters off } } Comparing advanceSim and advanceHdw highlights the fact that advanceSim is implemented directly in terms of the machine code layer of Figure 2, while advanceHdw digs down into the circuit layer by calling runProcessorForCycles and expired. Each advanceSim invocation of “$p1 stepi” and “$p2 stepi” causes execution of one target machine codelevel instruction. Each advanceHdw invocation of runProcessorForCycles, on the other hand, runs a processor for a real-time slice by exposing and manipulating circuit-level registers that cause circuitlevel effects. This particular circuit-level effect, a time-out breakpoint, is not even integrated into Luxdbg’s official breakpoint machinery via the at command. But by handling an unknown breakpoint exception in Tcl procedure expired, which extracts cycle count status from circuit-level registers, a Luxdbg user is able to compensate for lack of integration of cycle breakpoints into at. Tcl procedures runProcessorForCycles and expired encapsulate circuit-level details within themselves, providing Tcl-interpreted support for the machine code-level semantics of advanceHdw. With advanceSim and advanceHdw we have the means to interleave the execution of our two processors, and we now go to the matter of communications via the mailbox. Here we give only the most general implementation of a mailbox mechanism, devoid of modeled circuitry and precise timing. The actual demo looks at alternative, circuitlevel implementations of the mailbox. Suppose the program on each of our target processors uses assembly level variables to simulate incoming and outgoing buffers in a mailbox. Memory arrays sendBuffer and recvBuffer are outgoing and incoming memory buffers. Assembly locations sendLock and recvLock hold booleans that control their buffers, and sendCount and recvCount hold the length of a buffered message stream. These assembly-specified storage locations simulate memory-mapped peripherals in a real device. A processor uses a test-and-set instruction on sendLock to gain control of the send buffer; a nonzero value for sendLock signifies an unlocked buffer, while a 0 signifies a lock held by the buffer’s processor or by the mailbox. A processor adds message data to the stream in sendBuffer only when the processor holds sendLock. Likewise, a processor drains message data from the stream in recvBuffer only when it holds recvLock. Conversely, the mailbox drains a sendBuffer when it holds the sending processor’s sendLock and it fills a recvBuffer when it holds the receiving processor’s recvLock. We can take advantage of the default, singlethreaded control mechanism of Luxdbg, and its use of breakpoint-driven control, to build a simple test driver that uses polling interaction between the mailbox and each processor. proc advance {p1 p2 {count 1} {isSim 1}} { # run the processors a time slice each if {$isSim} { # simulation mode advanceSim $p1 $p2 $count } else { # hardware mode advanceHdw $p1 $p2 $count } # now interleave mailbox polling pollMailbox $p1 $p2 pollMailbox $p2 $p1 } Procedure pollMailbox inspects the locks and counts for its sender’s and receiver’s buffers to ensure that a message is ready and that there is room for it. proc pollMailbox {sender receiver} { # Test-and-set is atomic because sender and receiver # are stopped; fine-grain simulation will require # more precise modeling of test-and-test. # fxpr “@rd” returns result to Tcl in decimal if {[$sender *sendLock != 0\ && *sendCount > 0 @rd]} { if {[$receiver *recvLock != 0 \ && *recvCount == 0 @rd]} { # memory vector copy via fxpr: $receiver fxpr recvBuffer(0) = \ $sender\::sendBuffer(0:*sendCount-1) $receiver *recvCount = [$sender *sendCount] $sender *sendCount = 0 } } } Inter-processor memory transfer uses fxpr’s ability to copy a block of memory contents between processors without bringing these values out to Tcl. Tcl stores its return values as strings, and copying memory vectors one-element-at-a-time in a Tcl loop would entail binary-to-ASCII conversion when reading a value and ASCII-to-binary conversion when writing it. Fxpr vector assignment copies binary values directly. This first-cut prototype of pollMailbox makes several simplifying assumptions: • Message transfer is all-or-none. A message transfers only when its receiver’s buffer is completely empty. • Receiving capacity is sufficient. There is no test on the size of the message. • Simulation is single threaded. The tests of sendLock and recvLock never set these locks to 0 as part of test-and-set. • Timing granularity is determined by driver procedure advance, and pollMailbox can transfer the entire message, and release its locks, within the allotted time. • Message transfer is implemented using polling. The demo progresses in a manner similar to real prototyping, by taking an overly simple solution and elaborating it into a realistic one. Progressive variations build finer timing resolution, overflow detection, a robust test-and-set operation and interrupt-driven control into the mailbox. Some Luxdbg simulation models support sub-instruction, phase-accurate timing. Such a model can return control to Tcl at every transition of the simulated hardware clock signal that drives the model’s state transitions. Using such a model, it would be possible to simulate precise timing relationships between mailbox message transfer and the instruction execution cycles on the two processors. Each invocation of the mailbox would perform only one portion of message testing and transfer, such as testand-setting a lock variable or transferring one buffer word (or multiple words when simulating direct memory access), tightly interwoven with subinstruction scheduling of the two processor models. The simple pollMailbox procedure shown here and the clock-driven, fine-grain approach discussed represent the boundaries of the range of Tcl-based simulation capabilities possible with Luxdbg. 8.4 Demo conclusion Modular design features of an extension language and periodic refactoring of the design leads to small but powerful extension libraries. We have shown that well engineered extensions allow primitive debug operations at different layers of embedded system abstraction to be combined to support hardware / software co-design and codebugging. In particular, this demonstration shows • a design environment for hardware/ software partitioning and rapid prototyping to quickly analyze multiple implementation options • a debugging environment for software before hardware availability, and • a test-bench for measuring and verifying system operation. 9. References 1. D. Parson, P. Beatty and B. Schlieder, “A Tclbased Self-configuring Embedded System Debugger.” Berkeley, CA: USENIX, The Fifth Annual Tcl/Tk Workshop ‘97 Proceedings, Boston, MA, July 14-17, 1997, p. 131-138. 2. D. Parson, P. Beatty, J. Glossner and B. Schlieder, “A Framework for Simulating Heterogeneous Virtual Processors.” Los Alamitos, CA: IEEE Computer Society, Proceedings of the 32nd Annual Simulation Symposium, IEEE Computer Society / Society for Computer Simulation International, San Diego, CA, April, 1999, p. 58-67. 3. DSP16000 LUxWORKS Debugger, Luxdbg Version 1.7.0, Lucent Technologies, December, 1998. 4. Brent Welch, Practical Programming in Tcl and Tk, Third Edition. Upper Saddle River, NJ: Prentice Hall PTR, 1999. 5. Guido van Rossum, Extending and embedding the Python interpreter. Amsterdam: Stichting Mathematisch Centrum, 1995, also at http:// www.python.org/doc/ext/ext.html. 6. D. R. Hanson and J. L. Korn, “A Simple and Extensible Graphical Debugger.” Berkeley, CA: Proceedings of the USENIX 1997 Annual Technical Conference, Anaheim, CA, January, 1997. 7. D. R. Hanson and M. Raghavachari, “A machineindependent debugger.” Software—Practice and Experience, 26(11) (Nov., 1996), p. 1277-1299. 8. University of Kansas SmartGDB project, http:// hegel.ittc.ukans.edu/projects/smartgdb/, June, 2000. 9. M. Golan and D. R. Hanson, “DUEL—a very high-level debugging language.” Berkeley, CA: Proceedings of the Winter 1993 USENIX Annual Technical Conference, San Diego, CA, January, 1993, p. 107-117. 10. Phil Winterbottom, “ACID: A debugger built from a language.” Berkeley, CA: Proceedings of the Winter 1994 USENIX Annual Technical Conference, San Francisco, CA, January, 1994, p. 211-222. 11. B. Bruegge and P. Hibbard, “Generalized Path Expressions: A High-Level Debugging Mechanism.” The Journal of Systems and Software, Volume 3, p. 265-276, Elsevier, 1983. 12. Mikhail Auguston, “A Language for Debugging Automation.” Proceedings of the 6th International Conference on Software Engineering and Knowledge Engineering, p. 108-115, 1994. 13. Mireille Ducassé, “Coca: An automated Debugger for C.” Proceedings of the 21st International Conference on Software Engineering, ACM Press, p. 504-513, May, 1999. 14. Dale Parson, “Using Java Reflection to Automate Extension Language Parsing.” Berkeley, CA: USENIX, Second Conference on Domain-Specific Languages Proceedings, Austin, Texas, October 35, 1999, p. 67-80. 15. N. Ramsey and D. R. Hanson, “A Retargetable Debugger.” ACM SIGPLAN ‘92 Conference on Programming Language Design and Implementation, in SIGPLAN Notices, 27(7):22-31, July 1992. 16. D. Parson, L. Herrera-Bendezú and J. Vollmer, “Distributed Source Code Debugging for Embedded Systems.” CSREA (Computer Science Research, Education and Applications) Press: Proceedings of the 2000 International Conference on Parallel and Distributed Processing Techniques and Applications, June 26-29, 2000, Las Vegas, Nevada. 17. LUxWORKS DSP16000 Software Tools Product Overview, Lucent Technologies, http:// www.lucent.com/micro/dsp/tdoc/swtools/ st16k.html, June, 2000. 18. Tcl Developer Xchange, http://dev.scriptics.com/ resource, June, 2000. 19. “1149.1&A & 1149.1B SET Supplement to Standard Test Access Port and Boundary-Scan Architecture,” IEEE, http://shop.ieee.org/store/ product.asp?prodno=SH16626, June, 2000. 20. “Tcl/Tk Resources on the Web,” http:// www.tcltk.com, June, 2000.
6cs.PL
DISTRIBUTED STOCHASTIC APPROXIMATION WITH LOCAL PROJECTIONS arXiv:1708.08246v1 [cs.SY] 28 Aug 2017 SUHAIL MOHMAD SHAH AND VIVEK S. BORKAR1 Department of Electrical Engineering, Indian Institute of Technology Bombay, Powai, Mumbai 400076, India. ([email protected], [email protected]). Abstract We propose a distributed version of a stochastic approximation scheme constrained to remain in the intersection of a finite family of convex sets. The projection to the intersection of these sets is also computed in a distributed manner and a ‘nonlinear gossip’ mechanism is employed to blend the projection iterations with the stochastic approximation using multiple time scales. Key words distributed algorithms; stochastic approximation; projection; differential inclusions; multiple time scales 1 Work supported in part by a grant for ‘Approximation of High Dimensional Optimization and Control Problems’ from the Department of Science and Technology, Government of India. 1 1 Introduction In a landmark paper, Tsitsiklis et al [20] laid down a framework for distributed computation, notably for distributed optimization algorithms. They developed it further in [3]. There was a lot of subsequent activity and variations, an extensive account of which can be found in [18]. The key idea of [20] was to combine separate iterations by different processors/agents with an averaging mechanism that couples them and leads to a ‘consensus’ among the separate processors, often on the desired objective (e.g., convergence to a common local minimum). The averaging mechanism itself has attracted much attention on its own as gossip algorithm for distributed averaging [19] and various models for dynamic coordination [16]. One way to view these algorithms is as a two time scale dynamics with averaging on the fast or ‘natural’ time scale dictated by the iterate count n = 1, 2, · · · itself, with the rest (e.g., a stochastic gradient scheme) being a regular perturbation thereof on a slower time scale, dictated by the chosen stepsize schedule. Then the convergence results can be viewed as the fast averaging process leading to the confinement of the slow dynamics to the former’s invariant subspace, which is the one dimensional space spanned by constant vectors. This is just a fancy way of interpreting consensus, but lends itself to some natural generalizations which were taken up in [14]. Here the averaging was replaced by some nonlinear operation with the conclusion that it forced asymptotic confinement of the slow iterates given by a stochastic approximation scheme (SA for short) to its invariant set. Our aim here is to leverage this viewpoint to propose a distributed algorithm for constrained computation wherein we want asymptotic confinement to the intersection of a finite family of compact convex sets. A prime example of such an exercise is constrained optimization, though the scheme we analyze covers the much broader class of projected stochastic approximation algorithms. In particular, the nonlinear operation gets identified with a distributed scheme for projection onto the intersection of a finite family of convex sets. To contrast this with the classical projected stochastic approximation [13], note that in the latter, a projection is performed at each step. In practice this may entail another iterative scheme to compute the projection as a subroutine, so that one waits for its near-convergence at each step. In our scheme, this iteration is embedded in the stochastic approximation iteration as a fast time scale component so that it can be carried out concurrently. Our scheme is inspired by the results of [14]. The results of [14], however, use strong regularity conditions such as Frechet differentiability of the nonlinear map (among others) which are unavailable in the present case, making the proofs much harder. An additional complication is that the ‘fast’ dynamics in one of the algorithms is itself a two time scale dynamics with stochastic approximation-like time-dependent iteration. This creates several additional difficulties. Thus the proofs of ibid. cannot be applied here directly. This is even more so for the test of stability in section 4, which requires a significantly different proof. Relevant literature : The literature on distributed algorithms is vast, mostly building upon the seminal work of [20]. The most relevant works for our purposes are [21]-[25], where distributed optimization algorithms with local constraints are considered. However, all of these are concerned primarily with convex optimization (and without noise). In [22], the convergence analysis is done for projected convex optimzation for the special case when the network is completely connected. The work in [24], [25] extends the algorithm of [22] and its analysis to a more general setting including the presence of noisy links. [4] considers distributed optimization for non-convex functions but again without distributed projection. 2 Contributions : The main contribution of this paper is that algorithms are provided for projected distributed SA where the projection component is distributed (so that only local constraints are required at the nodes). This is helpful when projection onto the entire constraint set is not possible (constraints are known only locally) or computationally prohibitive (a large number of constraints). Moreover, in our algorithms the projection is tackled on a faster time scale which is a new feature that has not been explored previously and is of independent interest. In both the algorithms proposed here, the projection component gives the exact projection of the point provided and not just a feasible point. This fact seems to be crucial in extending previous works, which mainly consider convex optimization with noiseless gradient measurements, to a fully distributed algorithm for the much more general case of a Robbins-Monro type stochastic approximation scheme. The feasibility and convergence properties of previous works depend critically on the specifics of convex optimization such as the convexity of the function being optimized. The main compromise here is that our convergence results are established under a stability assumption which would not be required for a compact constraint set if exact projection was performed at every step. The remainder of this section sets up the notation and describes our algorithm. The next section summarizes the algorithm and some key results from projected dynamical systems. Section 3 details the main convergence proof assuming boundedness of iterates. The latter is separately proved in section 4. Section 5 provides some numerical results. 1.1 Notation The projection operator onto a constraint set X is denoted by PX (·), i.e. PX (y) = arg min ky − xk x∈X is the Euclidean projection onto X . We will be considering the case where X = N \ Xi . i=1 The projection operator onto an individual constraint set Xi is denoted by P i (·). Since we are dealing with distributed computation, we use a stacked vector notation. In T T i particular xk = [(x1k )T · · · (xN k ) ] where xk is the value stored at the i’th node, so that the superscript indicates the node while the subscript the iteration count. Similarly any function T T under consideration denoted by h(·) : RN n → RN n represents h(xk ) = [h1 (x1k )T · · · hn (xN k ) ] i n n where each h : R → R is a component function. We let a bold faced P(·) denote the following operator on the space RN n : T T P(xk ) = [P 1 (x1k )T , · · ·, P N (xN k ) ] with P i as described above. Let 1 denote the constant vector of all 1’s of appropriate dimension. We let  denote the Kronecker product between two matrices and hxk i denote the average of xk , so that x1 + · · · + xN 1 k hxk i = (1T In )xk = k N N with a bold faced hxk i = [hxk iT , · · ·, hxk iT ]T . A differential inclusion is denoted as ẋ ∈ F (x) 3 where F (·) is a set valued map. Let F δ (·) denote the the following set :  F δ (x) = z ∈ Rn : ∃x0 such that kx − x0 k < δ, d(z, F (x0 )) < δ where d(z, A) = inf y∈A kz − yk is the distance of a point z from a set A. The notation f (x) = o(g(x)) is used to denote the fact f (x) lim → 0, x→∞ g(x) while f (x) = O(g(x)) represents lim sup x→∞ f (x) ≤M g(x) for some constant M < ∞. 2 Background 2.1 Set-up Suppose we have a network of N agents indexed by 1, ..., N. We associate with each agent i, a function hi : Rn → Rn and a constraint set Xi . The global constraint, given as the intersection of all Xi ’s, is denoted by X : n \ Xi . X = i=1 n n Also, let H : R → R denote H(·) := N 1 X i h (·). N i=1 (1) In many applications, one has hi (·) = f (·) ∀i. Let the communication network be modeled by a static undirected graph G ={V, E} where V = {1, ..., N } is the node set and E ⊂ V×V is the set of links (i, j) indicating that agent j can send information to agent i. All of the arguments presented here can be extended to a time-varying graph under suitable assumptions as in [17]. Here we deal only with a static network for ease of notation. We associate with the network a non-negative weight matrix Q = [[qij ]]i,j∈V such that qij > 0 ⇐⇒ (i, j) ∈ E. In addition, the following assumptions are made on the matrix Q and the constraint set : Assumption 1: i) [Convex constraints] For all i, Xi are convex and compact. Also, the set X has a non-empty interior. ii) [Double Stochasticity] 1T Q = 1T and Q1 = 1. iii) [Irreducibility and aperiodicity] We assume that the underlying graph is irreducible, i.e., there is a directed path from any node to any other node, and aperiodic, i.e., the g.c.d. of lengths 4 of all paths from a node to itself is one. It is known that the choice of node in this definition is immaterial. This property can be guaranteed, e.g., by making qii > 0 for some i. T This implies that the spectral norm γ of Q− 11 N satisfies γ < 1. This guarantees in particular that  k Qk − Q∗ uk ≤ κβ −k kuk (2) for some κ > 0, β > 1, with Q∗ denoting the matrix 2.2 11T N . Distributed Projection Algorithms We now give details of two algorithms for computing a distributed projection. “Distributed Projection” here means that the projection onto a particular constraint set Xi is performed by just one processor/agent and they communicate information with each other in order to compute projection onto the intersection X . A. Gradient Descent : The first approach involves viewing the projection problem as the minimization of the error norm subject to the appropriate constraints, so that the projection of a point x0 can be thought of as the solution to the following optimization problem : min kz − xo k2 z∈Rn (3) s.t. z ∈ X = ∩ Xi , i = 1, ..., N In the distributed setting we associate each constraint Xi with an agent i. To solve the projection problem in a distributed fashion we first re-cast it as : minz∈Rn kz − x0 k2 s.t. z ∈ X PN min{zi ∈Rn ,i=1,··· ,N } N1 i=1 kz i − x0 k2 s.t. z i ∈ X ∀ i z i = z j ∀ i, j ⇔ It is obvious that both the problems have the same unique minimizer. The problem on the right can be solved by using a distributed gradient descent of the form of equations 2a-2b, [21] which for our case becomes : i zk+1 = Pi N nX N o X qij zkj − bk [ qij zkj − x0 ] j=1 (4) j=1 P P 2 where bk satisfies k bk = ∞, inside the square brackets is k bk < ∞. Note that the term PN proportional to the gradient of the function in (3) evaluated at j=1 qij zkj . Lemma 1. For any x0 ∈ Rn the iteration (4) converges to the projection of x0 upon X , i.e., zki → PX (x0 ) ∀ i. Proof. The function being optimized is strongly convex so that the optimal point is unique. We can directly invoke Prop. 1 [21] which guarantees convergence to the unique minimum in the set X and this unique minimum is the projection point PX (x0 ). (Note that Assumption 1 here is necessary for the equations 2a-2b of [21] to converge to the projection point. Specifically Assumptions 1-5 of [21] are satisfied for our case.) 5 B. Distributed Boyle-Dykstra-Han : The algorithm originally proposed in [17] is as follows: Algorithm 1 Distributed Projection Scheme Input : y0 ∈ Rn ; 1: Set z0i = y0 and xi0 = 0 for all i. 2: for k=1,2,.... do 3: At each node i ∈ I : do 3: xik = PN j=1 qij  j xk−1 + P j (zkj ) − P i (zki ). i 4: zk+1 = zki + bk xik . 5: end for The step size bk is assumed to satisfy : X X bk = ∞, b2k < ∞ k k and for any  > 0, there exists an α ∈ (1, 1 + ) and some k0 such that αbk+1 ≥ bk , ∀k > k0 , (5) Let us write the above in vector notation as xk zk+1 = (Q  In ){xk−1 + P(zk )} − P(zk ) = zk + bk xk . (6) (7) The next theorem states that the above algorithm gives the exact projection of the initial point y0 . Theorem 2. Suppose z0i = y0 ∀ i. Then zk → z ∗ = [z1∗ , ..., zn∗ ], such that P i (zi∗ ) = P(y0 ). The detailed proof can be found in [17] where an ODE approximation is used along with the associated Lyapunov function z 7→ kz − z ∗ k2 . Remark 3. The above algorithm is inspired from a parallel version of Boyle-Dykstra-Han originally proposed in [12]. The main difference from [12] is that the weights in [17] are derived from the related graph of the communication network. The compromise is that a decaying time step is required to ensure convergence which may affect the convergence rate. We invite the reader to go through [17] to get some more intuition regarding the algorithm and what the exact roles of xk and zk are in the context of Boyle-Dykstra-Han algorithm. 6 2.3 The algorithm The first algorithm for distributed projected SA is stated below along with the assumptions on the various terms involved. Algorithm 2 Distributed SA with Gradient Descent (DSA-GD) 1: Initialize y0i and set zki = 0 for all i. 2: for k=1,2,.... do: 3: At each node i ∈ I : do a: [Fast Time Scale] Distributed Projection Step: i a1: zk+1 = Pi PN j j=1 qij zk  PN − bk ( j=1 qij zkj − yki ) i b: Derive a noisy sample "hi (yki ) + Mk+1 " of hi (yki ) from a sampling oracle. c: [Slow Time Scale] Distributed Stochastic Approximation Step: i c1: yk+1 = PN j j=1 qij yk i + ak (zki − yki ) + ak (hi (yki ) + Mk+1 ) 4: end for We make the following key assumptions : Assumption 2 : i) For each i, the function hi : Rn → Rn is Lipschitz Fki ii) For each i, {Mki } is a martingale difference sequence with respect to the the filtration := σ(y`i , M`i , ` ≤ k), i.e., it is a sequence of zero mean random variables satisfying:  i  E Mk+1 |Fki = 0. where E[ · | · ] denotes the conditional expectation. In addition we also assume a conditional variance bound   i E kMk+1 k2 |M`i , y`i , ` ≤ k ≤ K(1 + kyki k2 ) ∀k, i a.s. (8) for some constant K > 0. iii) Stepsizes {ak } and {bk } are positive scalars which satisfy : X X X ak = o(bk ), ak = bk = ∞, (a2k + b2k ) < ∞, k k k iv) The iterates yk are a.s. bounded, i.e sup kyk k < ∞ a.s. k 7 (9) As in classical analysis of stochastic approximation algorithms by the o.d.e. method, we prove convergence assuming the stability condition Assumption 2(iv). In Section 4 we give sufficient conditions for the latter to hold. We now give a variant of the above algorithm using the distributed Boyle-Dykstra-Han algorithm (Algorithm 1) : Algorithm 3 Distributed SA with Boyle-Dykstra-Han (DSA-BDH) 1: Initialize y0i and set zki = 0, xik = 0 for all i 2: for k=1,2,.... do: 3: At each node i ∈ I : do a: [Fast Time Scale] Distributed Projection Step: a1: xik = PN j j=1 qij {xk−1 + P j (zkj + ykj )} − P i (zki + yki ) i a2: zk+1 = zki + bk xik i b: Derive a noisy sample "hi (yki ) + Mk+1 " of hi (yki ) from a sampling oracle. c: [Slow Time Scale] Distributed Stochastic Approximation Step: c1: ȳki = P i (yki + zki ) i c2: yk+1 = PN j j=1 qij yk i + ak (ȳki − yki ) + ak (hi (yki ) + Mk+1 ) 4: end for Remark 4. The assumption of compact Xi is not necessary for Algorithm 2. As long as the iterates are assumed to be bounded (both yk and zk ), ‘compact sets’ can be replaced by ‘closed sets’. Remark 5. For the various terms involved in Algorithm 3, Assumption 2 continues to apply. The only addition is that Assumption 2(iii) now includes the condition (5). Remark 6. Both algorithms 2 and 3 have the same objective, i.e. distributed projected SA. For the rest of the paper we refer to Algorithm 2 as DSA-GD and Algorithm 3 as DSA-BDH. 2.4 Projected dynamical systems We analyze the algorithms using the ODE (for ‘Ordinary Differential Equations’) approach for analyzing stochastic approximation, extended to differential inclusions [2]. Define the normal cone NX (x) to be the set of outward normals at any point x ∈ ∂X where ∂X is the boundary of the set X , i.e., . NX (x) = {γ ∈ Rn : hγ, x − yi ≥ 0 ∀ y ∈ X } (10) with NX (x) = {0} for any point x in the interior of X . The relevant differential inclusion for our problem is ẋ ∈ H(x(t)) − NX (x(t)), (11) 8 x(t) ∈ X ∀t ∈ [0, T ] where H(·) is as in (1). This inclusion is identical to the well known "Projected Dynamical System" considered in [11] : ẋ = Π(x, h(x)) where Π(x, h(x)) is defined to be the following limit for any x ∈ X : PX (x + δh(x)) − x . Π(x, h(x)) = lim δ→0 δ The proof of the fact that the operator Π(·, ·) is identical to the RHS of (11) is provided in ([10], Lemma 4.6). The following theorem is borrowed from ([8], Corollary 2) and ([9], Theorem 3.1). Theorem 7. For a convex X , (11) is well posed, i.e. a unique solution exists. We recall the following notion from [2] where more general differential inclusions are considered: Definition 8. ([2]) Suppose F is a closed set valued map such that F (x) is a non-empty compact convex set for each x. Then a perturbed solution y to the differential inclusion ẋ ∈ F (x) (12) is an absolutely continuous function which satisfies: i) ∃ a locally integrable function t → U (t) such that for any T > 0, ˆ t+v lim sup U (s)ds = 0, t→∞ 0≤v≤T t ii) ∃ a function δ : [0, ∞) → [0, ∞) with δ(t) → 0 as t → ∞ such that ẏ − U (t) ∈ F δ(t) (y). There is no guarantee that the perturbed solution remains close to a solution of (12), however, the following assumption helps in establishing some form of convergence. Let Λ denote the equilibrium set of (11), assumed to be non-empty. Then : Λ ⊂ {x : H(x) ∈ NX (x)}. Assumption 3 : There exists a Lyapunov function for the set Λ, i.e., a continuously differentiable function V : Rn → R such that any solution x to (11) satisfies V (x(t)) ≤ V (x(0)) ∀t > 0 and the inequality is strict whenever x(0) ∈ / Λ. If this assumption does not hold, the asymptotic behavior is a bit more complex. Specifically, under reasonable assumptions, an SA scheme converges a.s. to an invariant internally chain 9 transitive set of the limiting o.d.e. This behavior extends to differential inclusions as well (see [2] or Chapter 5, [6]) and is what we would expect for our algorithm if we remove Assumption 3. For instance if H = −∇g for some continuously differentiable g, then the above set represents the KKT points and the function g itself will serve as a Lyapunov function for the set Λ. The following result is from ([2], Prop. 3.27) : Proposition 9. Let y be a bounded perturbed solution to (11) and there exist a Lyapunov function for a set Λ with V (Λ) having an empty interior. Then \  y [t, ∞) ⊂ Λ t≥0 Remark 10. To prove the main result, we shall show that the suitably interpolated iterates generated by the algorithm form a perturbed solution to the differential inclusion (11), so that using Theorem 7 and Proposition 9 (along with Assumption 3), the algorithm is shown to converge to its equilibrium set. To conclude this section, we provide some intuition behind the proposed algorithms. The SA part in DSA-GD is i yk+1 = N X i qij ykj + ak (zki − yki ) + ak (hi (yki ) + Mk+1 ) j=1 If the term zki asymptotically tracks the projection PX (yki ) (see Lemma 13), then this can be written as (modulo some asymptotically vanishing error) : i yk+1 ≈ N X qij ykj + ak (hi (yki ) + j=1 PX (yki ) − yki | {z } i +Mk+1 ) projection error term The projection error term strives to keep the iterates inside the constraint set (compare this to the inclusion (11) where the constraining term belongs to the normal cone). So although the above iteration may appear to behave like an unconstrained one, it achieves the same asymptotic behavior as what one would get by projecting onto the entire constraint set X at each step. An analogous intuition applies to DSA-BDH. 3 Convergence proof We first deal with DSA-GD, the proof details for DSA-BDH are nearly the same and we give a brief outline in the second part of this section. Assumptions 1,2 and 3 are assumed to hold throughout this section. A. Convergence of DSA-GD: We rewrite some of the main steps in DSA-GD with a stacked vector notation :  zk+1 = P (Q ⊗ IN )zk − bk ((Q ⊗ IN )zk − yk ) , (13) yk+1 = (Q  In )yk + ak (zk − yk ) + ak (h(yk ) + Mk+1 ). Our main convergence result is : 10 (14) Theorem 11. Under Assumptions 1-3, we have almost surely yk → {1y : y ∈ Λ} . The above theorem states that the variables {yki , i = 1, ..., N } achieve consensus as expected and moreover, their limit points lie in the equilibrium set Λ of (11). For distributed optimization, this set corresponds to the KKT points of the related minimization problem. Outline of the analysis: To analyze the above algorithm, we proceed in three steps: a) Consensus : We first show that the iterates yki achieve consensus (Lemma 12). This will help us analyze the algorithm by studying it in the average sense at each node, i.e., with PN yki ≈ hyk i := 1/N i=1 yki . b) Feasibility : Next, the condition ak = o(bk ) is exploited to do a two time scale analysis. Specifically, in the distributed projection scheme operating on a fast time scale, the variable yk , evolving on a slow time scale, is quasi-static, i.e., treated as a constant. In turn the (slow) stochastic approximation step sees the faster iterations (13) as quasi-equilibrated. Therefore it asymptotically behaves as its projected version where the projection is taken to be upon the entire set at each node rather than only its own particular constraint set. c) Convergence : Finally, using the the above analysis, the slow iterates are shown to track the desired projected dynamical system. We first show that the above algorithm achieves consensus, i.e., as k → ∞, kyki − hyk ik → 0. Lemma 12. limk maxi,j=1,..N kyki − ykj k = 0 a.s. Also, kyki − hyk ik → 0 ∀ i. Proof. Set Yk = zk − yk + h(yk ) + Mk+1 , so that we can write (14) as yk+1 = (Q  In )yk + ak Yk . We have, for a fixed k ≤ n and any large n, yn+k = = (Q  In )yn+k−1 + an+k−1 Yn+k−1 (Q2  In )yn+k−2 + an+k−2 (Q  In )Yn+k−2 + an+k−1 Yn+k−1 , where we have used the fact that (Q  In )(Q  In ) = (Q2  In ). Iterating the above equation further, we have yn+k = (Qk  In )yn + an (Qk−1  In )Yn + · · · , i.e., · · · + an+k−2 (Q  In )Yn+k−2 + an+k−1 Yn+k−1 yn+k = (Qk  In )yn + {Γ(Yn+k−1 , ..., Yn )} (15) where Γ(·) is some linear combination of its arguments. In view of Assumption 2(iv) (yk is bounded), kYk k ≤ M w.p. 1 11 for some random M < ∞. So we have, kΓ(Yn+k−1 , ..., Yn )k = k n+k−1 X i=n ≤M ai (Qn+k−1−i  In )Yi k n+k−1 X ai  ∵ k(Qn+k−1−i  In )k = 1  i=n = O( n+k−1 X ai ) i=n Subtracting (Q∗  In )yn from both sides in (15), we get yn+k − (Q∗  In )yn = [(Qk − Q∗ )  In ]yn + {Γ(Yn+k−1 , ..., Yn )} (16) Using equation (2) and taking norms in (16), we have : ∗ kyn+k − (Q  In )yn k = O(β −k n+k−1 X ) + O( ai ). i=n Letting n → ∞ followed by k → ∞, it follows that any limit point y∗ of the sequence {yk } satisfies y∗ = (Q∗  In )y∗ . (17) P N j That is, y∗i = N1 j=1 y∗ for any i, so that consensus is achieved and the consensus value is the average of all the node estimates. We next argue that the algorithm can be regarded as a two time scale iteration so that while analyzing the behavior of zk (fast variable), yk (slow variable) can be regarded as a constant (cf. [5] or [6], Chapter 6). We have  zk+1 = P (Q ⊗ IN )zk − bk ((Q ⊗ IN )zk − yk )  = P Q ⊗ IN )zk + bk (µ(zk , yk )) (18) for a suitably defined µ. The slow time scale iteration here is: yk+1 = = (Q  IN )yk + ak (zk − yk + h(yk ) + Mk+1 ) (Q  IN )yk + ak (ν(zk , yk ) + Mk+1 ) (19) for a suitably defined ν. Since ak = o(bk ) in (18)-(19), the above pair of equations form a two time scale iteration ([5] or [6], Chapter 6). So while analyzing (18), we can assume that yk is ≈ a constant, say hyi := [y, ...., y] (we take the same value at all the nodes because of consensus proved in Lemma 12), so that (18) becomes :  zk+1 = P (Q ⊗ IN )zk − bk ((Q ⊗ IN )zk − hyi) . (20) This can be viewed as iteration (4) for the problem (3) with x0 = hyi. So Lemma 1 implies zki → PX (hyi). Lemma 13. If z ∗ (hyi) is the limit point of (20) for any hyi, then z ∗ (hyi) = PX (hyi). Also for all i, kzki − PX (hyk i)k → 0. 12 Proof. This first statement follows directly from the above discussion. The second is a direct consequence of Lemma 1, Chapter 6, [6] . We now prove the main result whose proof uses the techniques of [2], [4]. Proof of Theorem 11 : Proof. The consensus part was already proved in Lemma 12. Multiplying both sides of (14) by 1 T N (1 ⊗ In ), and using the double stochasticity of Q, we have hyk+1 i = (1 − ak )hyk i + ak hzk i + ak (hh(yk )i + hMk+1 i) We used in the above the fact 1 T 1 (1 ⊗ In )(Q ⊗ In )yk = (1T ⊗ In )yk N N 1 = hyk i = (yk1 + .... + ykN ). N Adding and subtracting ak PX (hyk i) on the right hand side, hyk+1 i = (1 − ak )hyk i + ak PX (hyk i) + ak (hzk i − PX (hyk i) + hh(yk )i + hMk+1 i) (21) Note that, hyk i − PX (hyk i) ∈ NX (PX (hyk i)) Set Zk = hzk i − PX (hyk i) and pk = hh(yk )i − H(PX (hyk i)). So (21) becomes :   hyk+1 i ∈ hyk i + ak H(PX (hyk i)) − NX (PX (hyk i)) + pk + Zk + hMk+1 i (22) Pk Let t0 = 0 and tk = i=0 ai for any k ≥ 1, so that tk − tk−1 = ak−1 . Define the interpolated trajectory Θ : [0, ∞) → Rn as : Θ(t) = hyk i + (t − tk ) hyk+1 i − hyk i , t ∈ [tk , tk+1 ], k ≥ 1 tk+1 − tk By differentiating the above we have dΘ(t) hyk+1 i − hyk i = ∀ t ∈ [tk , tk+1 ] dt ak where we use the right, resp., left derivative at the end points. Now define the following set valued map F (x) = {H(x) − W : W ∈ N (x) , kW k ≤ K} (23) where 0 < K < ∞ is a suitable constant. We get from (22) using (23), dΘ(t) ∈ F (PX (hyk i)) + pk + Zk + hMk+1 i, t ∈ [tk , tk+1 ]. dt 13 (24) . To finish the proof, Θ(·) is first shown to be a perturbed solution of (11). Let η(t) = kpk k + kΘ(t) − PX (hyk i)k, t ∈ [tk , tk+1 ), k ≥ 0. Also define U (t) = Uk := Zk + hMk+1 i, for t ∈ [tk , tk+1 ), k ≥ 0. Then we have dΘ(t) − U (t) ∈ F η(t) (Θ(t)). dt (25) We have used the following fact in the above : for any set valued map F (·) we have ∀ (x, x̂) ∈ Rn × Rn , p + F (x) ⊂ F kpk+kx−x̂k (x̂). P If we show that k ak Uk < ∞ and η(t) → 0, then by (25) Θ(·) can be interpreted as a perturbed solution of the differential inclusion Ψ̇(t) ∈ F (Ψ(t)). Convergence to the set Λ then follows by Assumption 3 and the proof is complete. We first prove that P k ak Uk < ∞, implying : ˆ t+v lim sup t→∞ 0≤v≤T U (s)ds = 0. t for any T > 0. We have   U (t) = ak Zk + Mk+1 |{z} | {z } I II for t ∈ [tk , tk+1 ). We consider the contributions of the two terms separately. I: We know from Lemma 13 that the mapping y → PX (y) maps y to the y-dependent limit point of (20). Then we have :  khzk i − PX (hyk i)k = khzk i − hPX (hyk i)ik because PX (hyk i) = hPX (hyk i)i] =k N  1 X i zk − PX (hyk i) k N i=1 N   1 X i kzk − PX (hyk i)k Jensen’s Inequality N i=1   → 0 from Lemma 13 . ≤ For T > 0, let m(n) := min{k ≥ n : sup ` X Pn+k j=n aj ≥ T }, n ≥ 0. Then ak khzk i − PX (hyk i)k → 0 as n → ∞. `≤m(n) k=n Pk−1 i II: This term is the error induced by the noise. Note that the process m=0 am Mm+1 , k ≥ 1, i i i is a zero mean P square integrable martingale w.r.t. the increasing σ-fields F := σ(M , y ,m ≤ m m k   ∞ 2 i 2 i k), k ≥ 1, with m=0 am E kMm+1 k |Fm < ∞ by (8) and (9), along with the square-summability 14 of {am }. It follows from the martingale convergence theorem (Appendix C, [6]), that this martingale converges a.s. Therefore sup k `≤m(n) ` X i ak Mk+1 k → 0 a.s. ∀i k=n The claim follows for hMk+1 i. To prove that η(t) → 0, consider for t ∈ [tk , tk+1 ), k ≥ 0. η(t) = kpk k + kΘ(t) − PX (hyk i)k = khh(yk )i − H(PX (hyk i))k + khyk i − PX (hyk i)  t−t  k k + (hyk+1 i − hyk i) tk+1 − tk ≤ N 1 X i i kh (yk ) − hi (PX (hyk i))k + khyk i − PX (hyk i)k N i=1 + khyk+1 i − hyk ik ≤ kt − tk k ktk+1 − tk k N C X i ky − PX (hyk i)k + khyk i − PX (hyk i)k + O(ak ) N i=1 k where C > 0 is a common Lipschitz constant for the hi ’s. Note that if we prove that kPX (hyk i)− hyk ik → 0, all the terms in the above inequality go to zero as k ↑ ∞. So to finish the proof, we prove this fact : Claim : limk inf x∈X kyki − xk = 0 ∀ i, as k ↑ ∞ Proof. Let us first consider the following fixed point iteration : ỹk+1 = (1 − ak )ỹk + ak PX (ỹk ). By the arguments of [6], Chapter 2, this has the same asymptotic behavior as the o.d.e. ȳ˙ = PX (ȳ) − ȳ. Consider the Lyapunov function V (ȳ) = 21 kȳk2 . Then d V (ȳ(t)) = ȳ(t)T (PX (ȳ(t)) − ȳ(t)) dt = ȳ(t)T PX (ȳ(t)) − kȳ(t)k2 . For any v ∈ Rn , the non-expansive property of PX leads to kPX (v)k ≤ kvk. By the Cauchy-Schwartz inequality, d V (ȳ(t)) ≤ 0. dt 15 By Lasalle’s invariance principle we have any trajectory ȳ(·) converge to the largest invariant d V (ȳ(t)) = 0, which is precisely the set X . The claim for {ỹk } now follows by a set where dt standard argument as in Lemma 1 and Theorem 2, pp. 12-16, [6]. Next, define maps fk by fk (y) = (1 − ak )y + ak PX (y). Then (21) becomes hyk+1 i = fk (hyk i) + ak (hh(yk )i + Mk+1 + k ). (26) with k = hzk i − PX (hyk i). From the preceding discussion, we have the following: for any fixed k ≥ 0,   lim Fk,m (·) := fm+k ◦ · · ◦fk (·) → PX (·). (27) m↑∞ The family {Fk,m } of functions is non-expansive, therefore equi-continuous, and bounded (because {yk } is assumed to be bounded), hence relatively sequentially compact in C(Rn ) by the Arzela-Ascoli theorem. Hence the above convergence is uniform on compacts, uniformly in k. Consider any convergent subsequence of {yk } with limit (say) y ∗ and by abuse of notation, index it by {k} again. From (26), for any k, m we have, hym+k+1 i = fm+k (hym+k i) + am+k (hh(ym+k )i + Mm+k+1 + m+k ). (28) We also have, kfm+k (hym+k i) − fm+k ◦ fm+k−1 (hym+k−1 i)k ≤ khym+k i − fm+k−1 (hym+k−1 i)k (∵ fm+k is non-expansive.) = khym+k i − hym+k−1 i+  am+k−1 hym+k−1 i − PX (hym+k−1 i) k = O(am+k−1 ) = o(1). By iterating, we get : kfm+k (hym+k i) − fm+k ◦ · · ◦fk (hyk i)k = o(1). Combining this with (28), we have khym+k+1 i − fm+k ◦ · · ◦fk (hyk i)k = o(1). Let  > 0 and pick m large enough so that khym+k+1 i − fm+k ◦ · · ◦fk (hyk i)k < and from (27),  3  3 for all y ∈ a closed ball containing {hyk i} along the chosen subsequence. Along the same subsequence, choose k large enough so that kfm+k ◦ · · ◦fk (y) − PX (y)k < khyk i − hy ∗ ik < 16  . 3 Combining and using non-expansivity of projection, we have khym+k+1 i − PX (hy ∗ i)k ≤ khym+k+1 i − fm+k ◦ · · ◦fk (hyk i)k + kfm+k ◦ · · ◦fk (hyk i) − PX (hyk i)k + kPX (hyk i) − PX (hy ∗ i)k <    + + = 3 3 3 The claim follows. B. Convergence of DSA-BDH : The convergence analysis is similar to the previous case and Theorem 11 also holds for DSA-BDH. With a stacked vector notation, the main steps of the algorithm are : xk = zk+1 = yk+1 = (Q  In ){xk−1 + P(zk + yk )} − P(zk + yk ), (29) zk + bk xk , (30) (Q  In )yk + ak (P(yk + zk ) − yk ) + ak (h(yk ) + Mk+1 ). (31) The consensus part for yk is proved along the same lines as Lemma 12. All that is required to show is that kP(yk + zk ) − PX (yk )k → 0, then the proof of Theorem 11 goes through with only slight modification. (Here P(yk + zk ) performs the same job as zk of DSA-GD, i.e., asymptotically track the projection of yk .) We proceed to show this now with the help of the following lemma proved in the appendix. Lemma 14. kxk k is bounded and kxk − {(Q∗  In )P(zk + yk ) − P(zk + yk )}k → 0. Using Lemma 14 let us write (30) as  zk+1 = zk + bk (Q∗  In )P(zk + yk ) − P(zk + yk ) + o(1) (32) Since ak = o(bk ) in (31)-(32), they constitute a two time scale iteration ([5] or [6], Chapter 6). So while analyzing (30), we can assume that yk is ≈ a constant, say y := [y, ...., y]. Add y to both sides of (30) to obtain zk+1 + y i.e., rk+1 = zk + y + bk xk = rk + bk xk (33) with rk = zk + y. Thus (29), (33) can be written as xk rk+1 = (Q  In ){xk−1 + P(rk )} − P(rk ), = rk + bk xk . (34) (35) This is exactly the distributed Boyle-Dykstra-Han projection algorithm in the variable rk (see (6)-(7)). Lemma 15. If r∗ is any limit point of (35) (or equivalently, (30)) with r∗ = z ∗ (y) + y for some z ∗ and a fixed y, then P(rk ) → P(r∗ ) = PX (y). 17 Proof. Since rk = zk + y and z0 = 0, we have r0 = y. We first show that rk remains invariant under averaging. From (29), (Q∗  In )xk+1 = (Q∗  In )xk = · · · = (Q∗  In )x0 = 0. Multiply both sides of (35) by Q∗  In to get : (Q∗  In )rk+1 = (Q∗  In )rk . By iterating we get (Q∗  In )rk = (Q∗  In )r0 . Since z0i = 0 ∀i, we have (Q∗  In )rk = (Q∗  In )(zk + y) = (Q∗  In )(z0 + y) = y. P P That is, N1 i rki remains a constant equal to y and since r∗ is a limit point of {rn }, N1 i ri∗ = y. Furthermore, we have the existence of a point c ∈ Rn such that (see Lemma 4.4, [17]) ∗ P(r∗ ) = [P 1 (r1∗ ) , · · ·, P N (rN )] = [c , · · ·, c] 1 X i 1 X ∗ ri = r = y, N i N i k Since P i (ri∗ ) = c ∀i we have c ∈ X = ∩i Xi . This in turn implies for all i, PX (ri∗ ) = c because X ⊂ Xi . Hence for all i, ri∗ lie in the normal cone at the point c. Hence so does y. This means that c = PX (y) which proves the claim. For the original algorithm, this translates into: Corollary 16. kP(rk ) − PX (yk )k → 0 As in Lemma 13, this is a direct consequence of Lemma 1, Chapter 6, [6]. The rest of the analysis is exactly the same as for DSA-GD and is therefore omitted. 4 Stability In this section we give a sufficient condition for the proposed algorithms to satisfy Assumption 2(iv) (i.e., have a.s. bounded iterates). A. Stability of DSA-GD : Boundedness of zk is obvious because it is projected onto a compact set at every step. To establish stability of yk we adapt a stability test from [6], Chapter 3, which was originally proposed in [7]. Let hic (y i ) := hi (cy i ) . c Consider the following scaling limit for each i, assumed to exist: hi (cy i ) . c→∞ c hi∞ (y i ) := lim Note that the hic ’s have a common Lipschitz constant and hence are equicontinuous, implying that the above convergence is uniform on compact sets. Suppose for each i the following limiting ODE has the origin as the unique globally asymptotically stable equilibrium : ẏ i (t) = hi∞ (y i (t)) − y i (t). 18 Then if we let Hc (y) := 1 N PN i=1 hic (y i ) = 1 N PN i=1 hi (cy i ) , c c ≥ 1, y ∈ RnN , it will satisfy N 1 X i i Hc (y) → H∞ (y) := h (y ) as c → ∞ N i=1 ∞ uniformly on compacts. Consider the following limiting ODE in y(t) = [y 1 (t), ..., y N (t)], which will have the origin (0 ∈ RnN ) as the unique globally asymptotically stable equilibrium : ẏ(t) = h∞ (y(t)) − y(t) T =⇒ (1 ⊗ In )ẏ(t) = (1T ⊗ In ){h∞ (y(t)) − y(t)} =⇒ N N 1 X i i 1 X i ẏ (t) = {h (y (t)) − y i (t)}. N i=1 N i=1 ∞ If there is consensus so that y i (t) = y j (t) = hy(t)i, we can write the above as hẏ(t)i = H∞ (hy(t)i) − hy(t)i. (36) Again, (36) has the origin (0 ∈ Rn ) as the unique globally asymptotically stable equilibrium. Pm Let T0 = 0 and for n ≥ 0, Tn+1 = min{tm : tm > Tn + T } where T > 0 and tm = k=0 ak . Without loss of generality, let supk ak ≤ 1. Then we have Tn+1 ∈ [Tn + T, Tn + T + 1] ∀n. Also, we write Tn = tm(n) for a suitable m(n). Let y(t) = [y 1 (t), ..., y N (t)] define a continuous, piecewise linear trajectory linearly interpolated between y(tk ) := yk and y(tk+1 ) := yk+1 on [tk , tk+1 ]. We construct another piecewise linear trajectory ŷ(t) derived from y(t) by setting ŷ(t) = for t ∈ [Tn , Tn+1 ), where rn = maxi=1,...,N {ky i (Tn )k, 1}. This implies in particular that ŷ i (Tn ) ≤ 1 ∀ n, i. y(t) rn (37) Let y ∞ (t) denote a generic solution to the equation (36) and yn∞ (t) denote its solution which − starts at the point hŷ(Tn )i. For later use, we let ŷ(Tn+1 ) = y(Tn+1 )/rn . The following lemma is from [6] : Lemma 17. (i) ∃ T > 0 such that for all initial conditions y on the unit sphere, ky ∞ (t)k < 81 for all t > T . . Pk−1 ` (ii) The sequence ξk = p=0 ap M̂p+1 , k ≥ 1 with M̂` = M rn for m(n) ≤ ` < m(n + 1) is square integrable and a.s. convergent . Pk−1 (iii) The sequence ξˆk = p=0 ap Ap M̂p+1 , k ≥ 1 with {Ap }p≥0 being a sequence of doubly stochastic matrices is a.s. convergent Proof. The proof of (i) is the same as in Chapter 3, Lemma 1, [6], pp. 22-23, whereas (ii) is proved in Chapter 3, Lemma 5, [6], p. 25. The latter lemma establishes and uses the fact ∞ X h i a2p E kM̂p+1 k2 |Fp < ∞. p=0 To prove (iii), note that multiplication by a linear operator doesn’t affect the martingale property. Also, ∞ ∞ h i X h i X a2p E kAp M̂p+1 k2 |Fp ≤ a2p E kM̂p+1 k2 |Fp < ∞ a.s. p=0 p=0 Convergence follows from the martingale convergence theorem (Appendix C, [6]). 19 The following theorem proves that the iterates yk remain bounded. Since the proof is an adaptation of the arguments of [7] or [6], Chapter 2, we give only a sketch that highlights the significant points of departure. Theorem 18. supk kyk k < ∞. Proof. (Sketch) Suppose that ky i (t)k → ∞ for some i along a subsequence. We obtain a contradiction using the following argument : Claim : limn→∞ supt∈[Tn ,Tn+1 ] khŷ(t)i − yn∞ (t)k = 0 a.s. Proof. For m(n) < k < m(n + 1), we have, on dividing both sides of (14) by rn , ŷ(tk+1 ) = (Q  In )ŷ(tk ) + ak (hrn (ŷ(tk )) − ŷk (t) + M̂k+1 + k ), (38) zi where ik = rnk . Since zki is bounded, ik → 0 ∀i as n → ∞ (since rn → ∞ by assumption). Iterating the above equation we get, ŷ(tm(n)+k ) = (Qk  In )ŷ(tm(n) ) + k−1 X i=0  am(n)+i (Qk−i−1  In ) hrn (ŷ(tm(n)+i )) − ŷ(tm(n)+i ) + M̂m(n)+i+1 + m(n)+i . Taking norms in the above we have : kŷ(tm(n)+k )k ≤ kŷ(tm(n) )k + k−1 X  am(n)+i khrn (ŷ(tm(n)+i )) − ŷ(tm(n)+i ) + m(n)+i k i=0 +k k−1 X i=0 am(n)+i (Qk−i−1  In )M̂m(n)+i+1 k. (39) Let L be a common Lipschitz constant for the functions hrn (·) (which in fact is the same as that for h). Then we have the following bound on hrn (·) : khrn (ŷ(tk ))k ≤ khrn (0)k + Lkŷ(tk )k Using the above in (39), we have : kŷ(tm(n)+k )k ≤ kŷ(tm(n) )k + k−1 X  am(n)+i (L + 1)kŷ(tm(n)+i )k + km(n)+i k + khrn (0)k i=0 +k k−1 X i=0 We first prove that supk k ˆ {ξp } as : Pk−1 i=0 am(n)+i (Qk−i−1  In )M̂m(n)+i+1 k. am(n)+i (Qk−i−1 In )M̂m(n)+i+1 k < ∞. Define the sequence p−m(n)−1 ξˆp = ξˆm(n) + X i=0 am(n)+i (Qp−m(n)−i−1  In )M̂m(n)+i+1 20 if m(n) < p ≤ m(n + 1) with ξˆ0 = 0 and ξˆm(n) = n−1 X  m(j+1)−m(j)−1 X j=0 i=0 am(j)+i (Qm(j+1)−m(j)−i−1  In )M̂m(j)+i+1  The sequence {ξˆp } is convergent by Lemma 17(iii). Then k k−1 X i=0 am(n)+i (Qk−i−1  In )M̂m(n)+i+1 k = kξˆm(n)+k − ξˆm(n) k := Bn , where Bn → 0 a.s. Also P 0≤p≤m(n+1)−m(n) am(n)+p ≤ T + 1, so that kŷ(tm(n)+k )k ≤ kŷ(tm(n) )k + C + (L + 1) k−1 X am(n)+i kŷ(tm(n)+p )k, i=0 Pm(n+1)−m(n) where C ≥ (T + 1)kh(0)k + Bn + i=0 an+i kk+i k is a random constant. The last term is finite a.s. because the k term goes to zero as stated earlier. Since kŷ(tm(n) )k ≤ 1 by (37), we have k−1 X kŷ(tm(n)+k )k ≤ (C + 1) + (L + 1) am(n)+i kŷ(tm(n)+p )k, i=0 By discrete Gronwall inequality, we have sup kŷ(tm(n)+k )k ≤ [C + 1] exp{(L + 1)(T + 1)} ≡ K ∗ . (40) 0≤k≤m(n+1)−m(n) Since the bound is independent of n, we have that kŷ(tm(n)+k )k < ∞. (41) Now consider (38) again : ŷ(tk+1 ) = (Q  In )ŷ(tk ) + ak (hrn (ŷ(tk )) − ŷk (t) + M̂k+1 + k ). Multiply it on both sides by hŷ(tk+1 )i = = 1 T N (1 hŷ(tk )i + ak { ⊗ In ) to get N 1 X i h (ŷ i (tk )) − hŷ(tk )i + hM̂k+1 i + hk i} N i=1 rn hŷ(tk )i + ak {H∞ (hŷ(tk )i) − hŷ(tk )i + δk1 + δk2 + hM̂k+1 i + hk i}. (42) where PN PN a) δk1 = N1 i=1 hirn (ŷ i (tk )) − N1 i=1 hirn (hŷ i (tk )i). Since {hŷk i} is bounded by (41) we can adapt the arguments of Lemma 12 of Section 3 to show that we achieve consensus and hence kδk1 k → 0 : For any m(n) < k < m(n + 1) we have from (38) : ŷ(tm(n)+k ) = (Q  In )ŷ(tm(n)+k−1 ) + am(n)+k−1 Ŷm(n)+k−1 , where Ŷm(n)+k−1 = hrn (ŷ(tm(n)+k−1 )) − ŷ(tm(n)+k−1 ) + M̂m(n)+k + m(n)+k−1 . 21 Iterating this equation we get, ŷ(tm(n)+k ) = (Qk  In )ŷ(tm(n) ) + {Γ(Ŷm(n)+k−1 , ..., Ŷm(n) )}. where Γ(·) is defined as in Lemma 12 and is of order O( Pm(n)+k i=m(n) ai ) because ŷ(·) (and hence Ŷ ) is bounded. Then as in Lemma 12, we have, m(n)+k−1 ∗ kŷ(tm(n)+k ) − (Q  In )ŷ(tm(n) )k = O(β −k ) + O( X ai ), i=m(n) where the O(β −k ) term is uniform w.r.t. n. Taking the limit n → ∞ (which means m(n) → ∞) followed by k → ∞, we get that kŷ i (·) − hŷ i (·)ik → 0 and hence kδk1 k → 0. PN PN b) δk2 = N1 i=1 hirn (hŷ i (tk )i)− N1 i=1 hi∞ (hŷ i (tk )i). Since rn → ∞ , we have by assumption Hrn → H∞ uniformly on compact sets, so that by (41), kδk2 k → 0. Now we can use standard arguments, e.g., of Lemma 1 and Theorem 2, Chapter 2, of [6], pp. 12-15, which show that (42) has the same asymptotic behavior as the ODE (36) a.s., which proves the claim. The above claim gives the contradiction we require. Suppose without loss of generality that ky(Tn )k > 1 along the above subsequence, which we denote by {n} again by abuse of notation. Then rn → ∞ and we have a sequence Tn1 , Tn2 ... such that ky(Tnk )k ↑ ∞, i.e., rnk ↑ ∞. We have khŷ(Tn )ik = kyn∞ (Tn )k ≤ 1 and by Lemma 17(i) we may take kyn∞ (Tn+1 )k < 81 since Tn+1 > T + Tn . So by the above claim there exists an N 0 such that for all n > N 0 , we get − khŷ(Tn+1 )ik < 41 . Then for all sufficiently large n, − khŷ(Tn+1 )ik 1 khy(Tn+1 )ik = < . khy(Tn )ik khŷ(Tn )ik 4 We conclude that if ky(Tn )k > 1, ky(Tk )k for k ≥ n falls back to the unit ball at an exponential rate. Thus if ky(Tn )k > 1, ky(Tn−1 )k is either even greater than ky(Tn )k or inside the unit ball. Thus there must an instance prior to n when y(·) jumps from inside the unit ball to a radius of 0.9 rn . Then we have a sequence of jumps of y(Tn ), corresponding to the sequence rnk → ∞, from inside the unit ball to points increasingly far away from the origin. But, by a discrete Gronwall argument analogous to the one used in the above claim, it follows that there is a bound on the amount by which y(·) can increase over an interval of length T + 1 when it is inside the unit ball at the beginning of the interval. This leads to a contradiction, implying C̃ = supn ky(Tn )k < ∞. This implies by (40) that supn kyn k ≤ C̃K ∗ < ∞. B. Stability of DSA-BDH : The proof that yk remains stable for DSA-BDH is identical to Theorem 18. The stability of zk and xk can be handled as in [17] by minor modifications of the arguments therein. The proof uses a routine ODE approximation technique and we skip it here as it is quite lengthy. 5 Numerical Experiment In this section, we present some numerical results to validate the proposed algorithms. We demonstrate the results on a stochastic optimization problem known as the stochastic utility 22 problem. We consider this problem for a max function with linear arguments as the objective and the unit simplex as the constraint set (Section 4.2, [27]) : n n h X io i min E[F (y, ξ)] = E φ ( + ξ(i))y(i) y∈X n i=1 X = {y ∈ Rn : y(i) ≥ 0 ∀i , n X y(i) = 1}, ξ(i) ∈ N (0, 1) i=1 where y = [y(1), ...., y(n)] and φ(t) = max{v1 +s1 t, ....., vm +sm t} with vk and sk being constants. Also, ξ(i) are independent zero mean Gaussian random variables with unit standard deviation. The constants vk and sk are generated from a uniform distribution with m = 10. We test the DSA-GD algorithm with this setup for N = 10, 20 and 30, where N denotes the number of constraints (equal to n + 1) and hence the number T of nodes we require to do the projection. If we put the constraints in the intersection form i Xi , then Xi will be : ( {y ∈ Rn : y(i) ≥ 0}, for 1 ≤ i ≤ N − 1. Xi = PN {y ∈ Rn : i=1 y(i) ≥ 1}, for i = N. Node i is assigned the constraint set Xi in order to do a distributed projection. The matrix Q is generated using Metropolis weights 2 and for N = 10 is explicitly given as :   0.25 0.25 0 0 0 0 0 0.25 0 0.25   0.25 0.4167 0.333 0 0 0 0 0 0 0    0  0.333 0.333 0.333 0 0 0 0 0 0     0 0 0.333 0.333 0.333 0 0 0 0 0     0 0 0 0.333 0.333 0.333 0 0 0 0   Q=  0 0 0 0 0.333 0.333 0.333 0 0 0     0 0 0 0 0 0.333 0.4167 0.25 0 0     0.25 0 0 0 0 0 0.25 0.25 0.25 0    0 0 0 0 0 0 0 0.25 0.4167 0.333  0.25 0 0 0 0 0 0 0 0.333 0.4167 1 and The above matrix is consistent with Assumption 1. The time steps employed are bk = k0.7 1 i i i ak = k0.95 . Also, h (y , ξ) = ∂F (y , ξ), where ∂F denotes the sub-gradient. Being a sub-gradient descent, the problem does not satisfy the regularity hypotheses imposed in our analysis above, nevertheless the proposed schemes work well as we show below. We plot our results in Figures 1,2 and 3 : • Figure 1 shows the plot of the optimality error vs. the number of iterations. The optimality error is the difference kyk1 − y 1,∗ k, where y 1,∗ is the output after running the algorithm ky 1 −y 1 k k long enough (k > 104 ) and the error tolerance k+1 is sufficiently small. As expected, kyk k the number of iterations required increases with the dimension of the problem. • Figure 2 shows the feasibility error, kyk1 − PX (yk1 )k, against the iteration count. • Figure 3 shows the disagreement estimate, kyki − yjj k, between the various agents for i, j = 1, 2, 3, 4. 2 The code to generate it is borrowed from [28] 23 Figure 1: Optimality Error vs. Iteration Count Figure 2: Feasiblity Error vs. Iteration Count 24 Figure 3: Disagreement Estimate vs. Iteration Count Appendix The proof of Lemma 14 is along the same lines as in [17] and we provide it here for sake of completeness. Recall the condition (see eq. (5)) on bk : For any  > 0, there exists an α ∈ (1, 1 + ) and some k0 such that αbk+1 ≥ bk , ∀k > k0 . (43) Proof. For any n and k in (29), we have xn+k = (Q  In ){xn+k−1 + P(zn+k + yn+k )} − P(zn+k + yn+k ). Setting rk = zk + yk and iterating the above equation we get, xn+k = (Qk  In )xn − P(rn+k ) + k−1 X i=1 (Qi  In ){P(rn+k−i+1 ) − P(rn+k−i )} + (Qk  In )P(rn+1 ) Using the fact that (Q∗  In )xn = 0 and adding the telescopic sum inside the curly brackets, we have : xn+k = ((Qk − Q∗ )  In )xn − P(rn+k ) + k−1 X i=1 n − (Qi  In ){P(rn+k−i+1 ) − P(rn+k−i )} + (Qk  In )P(rn+1 ) + k−1 X i=1 ∗ ∗ (Q∗  In )(P(rn+k−i+1 ) − P(rn+k−i )) + (Q  In )P(rn+k ) − (Q  In )P(rn+1 ) 25 o =⇒ xn+k = ((Qk − Q∗ )  In )(xn + P(rn+1 )) + (Q∗  In )P(rn+k ) − P(rn+k ) + k−1 X i=1 ((Qi − Q∗ )  In ){P(rn+k−i+1 ) − P(rn+k−i )}. (44) Taking n = 0 in (44) and using kP(r)k ≤ C < ∞ and (2) to bound the norm of (Qi −Q∗ )In , we get k−1 X kxk k ≤ β −k kx0 + P(r1 )k + 2C + 2C κβ i . (45) i=1 Since the RHS in the above is uniformly bounded, we have xk uniformly bounded. Now consider (44) again: xn+k − (Q∗  In )P(rn+k ) + P(rn+k ) = ((Qk − Q∗ )  In )(xn + P(rn+1 )) {z } | (I) + k−1 X i=1 ((Qi − Q∗ )  In ){P(rn+k−i+1 ) − P(rn+k−i )} | {z (46) } (II) (I): This can be bounded by using (2) and (45): k((Qk − Q∗ )  In )(xn + P(rn+1 ))k ≤ κβ −k kxn + P(rn+1 )k = O(β −k ) (II): To bound this term, we first consider (30) and add yk+1 on both sides of zk+1 + yk+1 = zk + yk + bk xk + ak (P(rk ) − yk + h(yk ) + Mk+1 ) + (Q  In )yk − yk ak =⇒ rk+1 = rk + bk {xk + (P(rk ) − yk + h(yk ) + Mk+1 )} + (Q  In )yk − yk bk Since yk is bounded (cf. Assumption 2(iv)) and xk is bounded from (45), krk+1 − rk k ≤ bk Mx,y + k for some random constant Mx,y < ∞ a.s, with k = k(Q  In )yk − yk k. We have, by assumption (43) on the step size bk , that there exists an α ∈ (1, β) and k0 such that αn+k−i bn+k−i ≤ αn+k bn+k ∀ 1 ≤ i ≤ k − 1 Letting β̂ = k β α > 1, k−1 X i=1 (47) ((Qi − Q∗ )  In ){P(rn+k−i+1 ) − P(rn+k−i )}k ≤ ≤ k−1 X κβ −i kP(rn+k−i+1 ) − P(rn+k−i )k i=1 k−1 X κβ −i krn+k−i+1 − rn+k−i k i=1 ≤ k−1 X κβ −i Mx,y bn+k−i + n+k−i  i=1 X (47) k−1 ≤ i=1 κβ̂ −i Mx,y bn+k + k−1 X κβ −i n+k−i i=1 κ ≤ Mx,y bn+k + ¯n,k β−1 β̂ − 1 κ 26 where ¯n,k = sup{0≤i≤k−1} n+k−i → 0 as n → ∞. The lemma follows by substituting the above bounds on (I) and (II) in (46) and taking the limit n → ∞ followed by k → ∞ to obtain kxn+k − {(Q∗  In )P(rn+k ) − P(rn+k )}k → 0 References [1] J. P. Aubin and A. Cellina, “Differential Inclusions: Set-Valued Maps and Viability Theory”, New York: Springer (1984) [2] M. Benaim, J. Hofbauer, and S. Sorin, “Stochastic approximations and differential inclusions ”, SIAM J. Control Optim. 44(1), pp. 328–348, (2005) [3] D. P. Bertsekas and J. N. Tsitsiklis, “Parallel and Distributed Computation”, Englewood Cliffs, NJ: Prentice Hall (1989) [4] P. Bianchi and J. Jakubowicz, “Convergence of a multi-agent projected stochastic gradient algorithm for non-convex optimization”, IEEE Trans. Auto. Control 58(2), 391-405 (2013) [5] V. S. Borkar, “Stochastic approximation with two time scales ”, Systems and Control Letters 29(5), 291-294, (1997) [6] V. S. Borkar, “Stochastic Approximation: A Dynamical Systems Viewpoint ”, Hindustan Book Agency, New Delhi, and Cambridge Uni. Press, Cambridge, UK, (2008) [7] V. S. Borkar and S. P. Meyn, “The ODE method for convergence of stochastic approximation and reinforcement learning ” SIAM J. Control and Optim. 38(2), 447-469, (2000) [8] B. Brogliato, A. Daniilidis, C. Lemaréchal and V. Acary, “On the equivalence between complementarity systems, projected systems and differential inclusions”, Systems and Control Letters 55(1), 45-51, (2006) [9] M. G. Cojocaru and L. B. Jonker, “Existence of solutions to projected differential equations in Hilbert spaces”, Proc. Amer. Math. Soc. 132(1), 183-193, (2004) [10] P. Dupuis, “Large deviations analysis of reflected diffusions and constrained stochastic approximation algorithms in convex sets”, Stochastics 21(1), 63-96, (1987) [11] P. Dupuis and A. Nagurney, “Dynamical systems and variational inequalities”, Ann. Op. Research 44(1), 7-42, (1993) [12] A. N. Iusem and A. R. De Pierro, “On the convergence of Han’s method for convex programming with quadratic objective”, Math. Programming 52(1-3), 265-284, (1991) [13] H. J. Kushner, D. S. Clark, “Stochastic Approximation Methods for Constrained and Unconstrained Systems”, Springer, New York, (1978) [14] A. S. Mathkar and V. S. Borkar, “Nonlinear gossip”, SIAM J. Control and Optim. 54(3), 1535–1557, (2016) [15] A. Nedic, “Convergence rate of distributed averaging dynamics and optimization in networks”, Foundations and Trends in Systems and Control 2:1, (2015) 27 [16] R. Olfati-Saber, J. A. Fax and R. M. Murray, “Consensus and cooperation in networked multi-agent systems", Proc. IEEE 95, 215-233, (2007) [17] S. Phade, V. Borkar, “A Distributed Han–Boyle–Dykstra scheme”, accepted for publication in SIAM J. Optim. (2017) [18] A. Sayed, “Adaptation, learning, and optimization over networks”, Foundations and Trends in Machine Learning 7:4-5, (2014) [19] D. Shah, “Gossip algorithms”, Foundations and Trends in Networking 3, 1-125, (2009) [20] J. N. Tsitsiklis, D. P. Bertsekas and M. Athans, “Distributed asynchronous deterministic and stochastic gradient optimization algorithms”, IEEE Trans. Automatic Control 31(9), 803-812, (1986) [21] S. Lee and A. Nedic, “Distributed random projection algorithm for convex optimization”, IEEE J. of Selected topics in Signal Processing, 7(2), (2013) [22] A. Nedic and A. Ozdaglar, “Distributed subgradient methods for multi-agent optimization”, IEEE Trans. Autom. Control 54(1), 48–61, (2009). [23] A. Nedic , A. Ozdaglar and P. Parrilo, “Constrained consensus and optimization in multiagent networks”, IEEE Trans. Automatic Control 55(4), 922–938, (2010) [24] K. Srivastava, A. Nedic and and D. Stipanovic, “Distributed constrained optimization over noisy networks”, in Proc. of the 49th IEEE Conf. on Decision and Control (CDC), pp. 1945–1950, (2010) [25] K. Srivastava and A. Nedic, “Distributed asynchronous constrained stochastic optimization”, IEEE J. Selected Topics in Signal Processing 5(4), 772-790 (2011) [26] S. S. Ram, A. Nedic and V. V. Veeravalli, “Distributed stochastic subgradient projection algorithms for convex optimization”, J. Optim. Theory Appl. 147, 516–545, (2010) [27] A. Nemirovski, A. Juditsky, G. Lan, and A. Shapiro, “Robust stochastic approximation approach to stochastic programming”, SIAM J. Control and Optim. 19(4), 1574–1609, (2009) [28] A. Simonetto and H. Jamali-Rad, “Primal Recovery from consensus-based dual decomposition for distributed convex optimization”, J. Optim. Theory Appl. 168(1), 172–197, (2016) 28
3cs.SY
Published as a conference paper at ICLR 2015 U NDERSTANDING L OCALLY C OMPETITIVE N ETWORKS arXiv:1410.1165v3 [cs.NE] 9 Apr 2015 Rupesh Kumar Srivastava, Jonathan Masci, Faustino Gomez & Jürgen Schmidhuber Istituto Dalle Molle di studi sull’Intelligenza Artificiale (IDSIA) Scuola universitaria professionale della Svizzera italiana (SUPSI) Università della Svizzera italiana (USI) Lugano, Switzerland {rupesh, jonathan, tino, juergen}@idsia.ch A BSTRACT Recently proposed neural network activation functions such as rectified linear, maxout, and local winner-take-all have allowed for faster and more effective training of deep neural architectures on large and complex datasets. The common trait among these functions is that they implement local competition between small groups of computational units within a layer, so that only part of the network is activated for any given input pattern. In this paper, we attempt to visualize and understand this self-modularization, and suggest a unified explanation for the beneficial properties of such networks. We also show how our insights can be directly useful for efficiently performing retrieval over large datasets using neural networks. 1 I NTRODUCTION Recently proposed activation functions for neural networks such as rectified linear (ReL (Glorot et al., 2011)), maxout (Goodfellow et al., 2013a) and LWTA (Srivastava et al., 2013) are quite unlike sigmoidal activation functions. These functions depart from the conventional wisdom in that they are not continuously differentiable (and sometimes non-continuous) and are piecewise linear. Nevertheless, many researchers have found that such networks can be trained faster and better than sigmoidal networks, and they are increasingly in use for learning from large and complex datasets (Krizhevsky et al., 2012; Zeiler et al., 2013). Past research has shown observational evidence that such networks have beneficial properties such as not requiring unsupervised training for weight initialization (Glorot et al., 2011), better gradient flow (Goodfellow et al., 2013a) and mitigation of catastrophic forgetting (Srivastava et al., 2013; Goodfellow et al., 2014). Recently, the expressive power of deep networks with such functions has been theoretically analyzed (Pascanu et al., 2013). However, we are far from a complete understanding of their behavior and advantages over sigmoidal networks, especially during learning. This paper sheds additional light on the properties of such networks by interpreting them as models of models. A common theme among the ReL, maxout and LWTA activation functions is that they are locally competitive. Maxout and LWTA utilize explicit competition between units in small groups within a layer, while in the case of the rectified linear function, the weighted input sum competes with a fixed value of 0. Networks with such functions are often trained with the dropout regularization technique (Hinton et al., 2012) for improved generalization. We start from the observation that in locally competitive networks, a subnetwork of units has nonzero activations for each input pattern. Instead of treating a neural network as a complex function approximator, the expressive power of the network can be interpreted to be coming from its ability to activate different subsets of linear units for different patterns. We hypothesize that the network acts as a model that can switch between “submodels” (subnetworks) such that similar submodels respond to similar patterns. As evidence of this behavior, we analyze the activated subnetworks for a large subset of a dataset (which is not used for training) and show that the subnetworks activated for different examples exhibit a structure consistent with our hypothesis. These observations provide a unified explanation for improved credit assignment in locally competitive networks during training, which is believed to be the main reason for their success. Our new point of view suggests a link between these networks and competitive learning approaches of the past decades. We also show that 1 Published as a conference paper at ICLR 2015 1 2 3 Units 4 5 6 7 Figure 1: Comparison of rectified linear units (ReLUs), local winner-take-all (LWTA), and maxout activation functions. The pre- and postsynaptic activations of the units are shown on the left and right side of the units respectively. The shaded units are ‘active’ – non-zero activations and errors flow through them. The main difference between maxout and LWTA is that the post-synaptic activation can flow through connections with different weight depending on the winning unit in LWTA. For maxout, the outgoing weight is the same for all units in a block. 8 9 10 0 20 40 60 Examples 80 100 Figure 2: Subnetworks for 100 examples for 10 ReLUs. The examples activate many different possible subsets of the units, shown in dark. In this case, unit number 3 is inactive for all examples. a simple encoding of which units in a layer are activated for a given example (its subnetwork) can be used to represent the example for retrieval tasks. Experiments on MNIST, CIFAR-10, CIFAR-100 and the ImageNet dataset show that promising results are obtained for datasets of varying size and complexity. 2 L OCALLY C OMPETITIVE N EURAL N ETWORKS Neural networks with activation functions like rectified linear, maxout and LWTA are locally competitive. This means that local competition among units in the network decides which parts of it get activated or trained for a particular input example. For each unit, the total input or presynaptic activation z is first computed as z = wx + b, where x is the vector of inputs to the unit, w is a trainable weight vector, and b is a trainable bias. For the rectified linear function, the output or postsynaptic activation of each unit is simply max(z, 0), which can be interpreted as competition with a fixed value of 0. For LWTA, the units in a layer are considered to be divided into blocks of a fixed size. Then the output of each unit is Iz where I is an indicator which is 1 if the unit has the maximum z in its group and 0 otherwise. In maxout, the inputs from a few units compete using a max operation, and the block output is the maximum z among the units1 . A maxout block can also be interpreted as an LWTA block with shared outgoing weights among the units. A comparison of the 3 activation functions is shown in Figure 1. In each of the three cases, there is a local gating mechanism which allows non-zero activations (and errors during training) to propagate only through part of the network, i.e. a subnetwork. Consider the activation of a neural network with rectified linear units (ReLUs) in a single hidden layer. For each input pattern, the subset of units with non-zero activations in the hidden layer form a subnetwork, and an examination of the subnetworks activated for several examples shows that a large number of different subnetworks are activated (Figure 2). The result of training the network can interpreted in the following way: when training a single network with a local gating mechanism, a large number of linear subnetworks are trained on the dataset such that different examples are gated to different subnetworks, each getting trained to produce the desired output. At test time, the system generalizes in the sense that the appropriate subnetwork for a given example is activated. 3 S UBNETWORK A NALYSIS This section investigates how the model of models that is implemented though local competition self-organizes due to training. In order to visualize the organization of subnetworks as a result of training, they are encoded as bit strings called submasks. For the input pattern i, the submask 1 In our terminology, the terms unit and block correspond to the terms filter and units in Goodfellow et al. (2013a). 2 Published as a conference paper at ICLR 2015 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 (a) (b) Figure 3: 2-D visualization of submasks from the penultimate layer of a 3 hidden layer network with ReLUs on the MNIST test set. (a) shows the submasks from an untrained network layer which lacks any discernable structure. (b) shows submasks from a trained network layer, showing clearly demarcated clusters relevant to the supervised learning task. ‘Mistakes’ made by the network can also be observed, such as mistaking ‘4’s for ‘9’s. si ∈ {0, 1}u , where u is the number of units in the full network, represents the corresponding subnetwork by having a 0 in position j, j = 1..u, if the corresponding unit has zero activation, and 1 otherwise. The submasks uniquely and compactly encode each subnetwork in a format that is amenable to analysis through clustering, and, as we show in Section 4.2, facilitates efficient data retrieval. In what follows, the subnetworks that emerge during training are first visualized using the tSNE (Van der Maaten & Hinton, 2008) algorithm. This dimensionality reduction technique enables a good visualization of the relationship between submasks for several examples in a dataset by preserving the local structure. Later in this section, we examine the evolution of subnetworks during training, and show that the submasks obtained from a trained network can directly be used for classification using a simple nearest neighbors approach. All experiments in this section are performed on the MNIST (LeCun et al., 1998) dataset. This familiar dataset was chosen because it is relatively easy, and therefore provides a tractable setting in which to verify the repeatability of our results. Larger, more interesting datasets are used in section 4 to demonstrate the utility of techniques developed in this section for classification and retrieval. 3.1 V ISUALIZATION THROUGH D IMENSIONALITY R EDUCTION For visualizing the relationship between submasks for a large number of input patterns, we trained multiple networks with different activation functions on the MNIST training set, stopping when the error on a validation set did not improve. The submasks for the entire test set (10K examples) were then extracted and visualized using t-SNE. Since the competition between subnetworks is local and not global, subsets of units in deeper (closer to the output) layers are activated based on information extracted in the shallow layers. Therefore, like unit activations, submasks from deeper layers are expected to be better related to the task since deeper layers code for higher level abstractions. For this reason, we use only submasks extracted from the penultimate network layers in this paper, which considerably reduces the size of submasks to consider. Figure 3b shows a 2D visualization of the submasks from a 3 hidden layer ReL network. Each submask is a bitstring of length 1000 (the size of the network’s penultimate layer). Ten distinct clusters are present corresponding to the ten MNIST classes. It is remarkable that, irrespective of the actual activation values, the subnetworks which are active for the testing examples can be used to visually predict class memberships based on their similarity to each other. The visualization confirms that the subnetworks active for examples of the same class are much more similar to each other compared to the ones activated for the examples of different classes. Visualization of submasks from the same layer of a randomly initialized network does not show any structure (Figure 3a), but we observed some structure for the untrained first hidden layer (Appendix A.1). For trained networks, similar clustering is observed in the submasks from shallow layers in 3 Published as a conference paper at ICLR 2015 Average flips per unit 0.20 Network 0.15 ReL (no dropout) LWTA (dropout) Maxout (dropout) 0.10 0.05 0.00 0 10 20 30 Epochs 40 50 Figure 4: The plot shows mean of the fraction of examples (total 10K) for which units in the layer flip (turn from being active to inactive or vice-versa) after every pass through the training set. The units flip for upto 20% of the examples on average in the first few epochs, but quickly settle down to less than 5%. No. test errors Softmax kNN 161 158 142 154 116 131 Table 1: Some examples of classification results on the permutation invariant MNIST test set using softmax layer outputs vs. kNN on the submasks. All submasks are extracted from the penultimate layer. kNN results are close to the softmax results in each case. The maxout network was additionally trained on the validation set. Results vary slightly across experimental runs and were not cherry-picked for reporting. the network, though the clusters appear to be less separated and tight. The visualization also shows many instances where the network makes mistakes. The submasks for some examples lie in the cluster of submasks for the wrong class, indicating that the ‘wrong’ subnetwork was selected for these examples. The experiments in the next sections show that the organization of subnetworks is indicative of the classification performance of the full network. Other locally competitive activation functions such as LWTA and maxout result in similar clustering of submasks (visualizations included in Appendix A.1). For LWTA layers, the submasks can be directly constructed from the activations because there is no subsampling when going from presynaptic to postsynaptic activations, and it is reasonable to expect a subnetwork organization similar to that of ReL layers. Indeed, in a limited qualitative analysis, it has been shown previously (Srivastava et al., 2013) that in trained LWTA nets there are more units in common between subnetworks for examples of the same class than those for different class examples. For maxout layers, the situation is trickier at a first glance. The unit activations get pooled before being propagated to the next layer, so it is possible that the maximum activation value plays a much more important role than the identity of the winning units. However, using the same basic principle of credit assignment to subnetworks, we can construct submasks from maxout layers by binarizing the unit activations such that only the units producing the maximum activation are represented by a 1. Separation of subnetworks is necessary to gain the advantages of local competition during learning, and the visualization of the generated submasks produces results similar to those for ReLU and LWTA (included in Appendix A.1). 3.2 B EHAVIOR DURING T RAINING In order to measure how the subnetworks evolve over the course of training, the submasks of each sample in the training set were recorded at each epoch. Figure 4 characterizes the change in the subnets over time by counting the number of input patterns for which a unit flips from being on to being off, or vice-versa, from one epoch to the next. The curve in the figure shows the fraction of patterns for which an inter-epoch flip occurred, averaged across all units in the network. Higher values indicate that the assignment of subnets to patterns is not stable. The batch size for this experiment was 100, which means that each pass over the training set consists of 500 weight updates. For the run shown, the average fraction of flips starts at 0.2, but falls quickly below 0.05 and keeps falling as training proceeds, indicating that, the assignment of subnetworks to individual examples stabilizes quickly. In this case, after a brief (∼3 epochs) transient period, a fine-tuning period follows where the assigned subnetworks keep getting trained on their corresponding examples with little reassignment. 3.3 E VALUATING S UBMASKS Since the visualization of submasks for the test set shows task-relevant structure, it is natural to ask: how well can the submask represent the data that produced it? If the submasks for similar examples are similar, perhaps they can be used as data descriptors for tasks such as similarity-based 4 Published as a conference paper at ICLR 2015 retrieval. Sparse binary codes enable efficient storage and retrieval for large and complex datasets due to which learning to produce them is an active research area (Gong et al., 2013; Masci et al., 2014b;a; Grauman & Fergus, 2013). This would make representative submasks very attractive since no explicit training for retrieval would be required to generate them. To evaluate if examples producing similar binary codes are indeed similar, we train locally competitive networks for classification and use a simple k nearest neighbors (kNN) algorithm for classifying data using the generated submasks. This approach is a simple way to examine the amount of information contained in the submasks (without utilizing the actual activation values). We trained networks with fully connected layers on the MNIST training set, and selected the value of k with the lowest validation error to perform classification on the test set. Results are shown in Table 1. In each case, the kNN classification results are close to the classification result obtained using the network’s softmax layer. If we use the (non-pooled) unit activations from the maxout network instead of submasks for kNN classification, we obtain 121 errors. Submasks can also be obtained from convolutional layers. Using a convolutional maxout network, we obtained 52 errors on the MNIST test set when we reproduced the model from Goodfellow et al. (2013a). Since the penultimate layer in this model is convolutional, the submasks were constructed using the presynaptic unit activations from this layer for all convolutional maps. Visualization of these submasks showed similar structure to that obtained from fully connected layers, kNN classification on the submasks resulted in 65 errors. As seen before, for a well-trained network the kNN performance is close to the performance of the network’s softmax layer. 3.4 E FFECT OF D ROPOUT The dropout (Hinton et al., 2012) regularization technique has proven to be very useful and efficient at improving generalization for large models, and is often used in combination with locally competitive activation functions (Krizhevsky et al., 2012; Goodfellow et al., 2013a; Zeiler et al., 2013). We found that networks which were trained with dropout (and thus produced lower test set error) also yielded better submasks in terms of kNN classification performance. To observe the effect of dropout in more detail, we trained a 3 hidden layer network with 800 ReLUs in each hidden layer without dropout on MNIST starting from 5 different initializations until the validation set error did not improve. The networks were then trained again from the same initialization with dropout until the validation error matched or fell below the lowest validation error from the non-dropout case. In both cases, minibatch gradient descent with momentum was used for training the networks. A comparison of kNN classification error for the dropout and non-dropout cases showed that when dropout training is stopped at a point when validation error is similar to a no-dropout network, the submasks from both cases give similar results, but as dropout training continues (lowers validation set error), the submasks yield improved results. This supports the interpretation of dropout as a regularization technique which prevents “co-adaptation of feature detectors” (units) (Hinton et al., 2012), leading to better representation of data by the subnetworks. Another way to look at this effect can be that dropout improves generalization by injecting noise in the organization of subnetworks, making them more robust. 4 E XPERIMENTAL R ESULTS The following experiments apply the methods described in the previous section to more challenging benchmark problems: CIFAR-10, CIFAR-100, and ImageNet. For the CIFAR experiments, we used the models described in Goodfellow et al. (2013a) since they use locally competitive activations (maxout), are trained with dropout, and good hyperparameter settings for them are available (Goodfellow et al., 2013b). We report the classification error on the test set obtained using the softmax output layer, as well kNN classification on the penultimate layer unit activations and submasks. The best value of k is obtained using a validation set, though we found that k = 5 with distance weighting usually worked well. 4.1 CIFAR-10 & CIFAR-100 CIFAR-10 and CIFAR-100 are datasets of 32×32 color images of 10 classes. The results obtained on the test sets for these datasets are summarized in Table 2. We find that when comparing nearest neighbor classification performance with submasks to unit activation values, we lose an accuracy of 1.25% on the CIFAR-10 dataset, and 2.26% on the CIFAR-100 dataset on average. Figure 5a shows the 2-D visualization of the test set submasks for CIFAR-10. Some classes can be seen to have 5 Published as a conference paper at ICLR 2015 (a) (b) Figure 5: 2-D visualizations of the submasks from the penultimate layer of the trained maxout networks reported in Goodfellow et al. (2013a). (a) The CIFAR10 test set. The 10-cluster structure is visible, although the clusters are not as well separated as in the case of MNIST. This corresponds with the higher error rates obtained using both kNN and the full network. (b) The CIFAR100 test set. It is difficult to visualize any dataset with 100 classes, but several clusters are still visible. The separation between clusters is much worse, which is reflected in the high classification error. Dataset Network error CIFAR-10 CIFAR-100 9.94 ± 0.31% 34.49 ± 0.22% kNN (activations) 9.63 ± 0.21% 37.54 ± 0.14% kNN (pre-activations) 10.11 ± 0.16% 41.37 ± 0.26% kNN (submasks) 11.36 ± 0.22% 43.63 ± 0.18% Table 2: Classification errors on CIFAR datasets comparing maxout network performance, kNN on activation values, kNN on pre-activations (before maximum pooling) and kNN on binary submasks. Results are reported over 5 runs. highly representative submasks, while confusion between classes in the lower half is observed. The clusters of subnetworks are not as well-separated as in the case of MNIST, reflecting the relatively worse classification performance of the full network. Submask visualization for CIFAR-100 (Figure 5b) reflects the high error rate for this dataset. Although any visualization with 100 classes can be hard to interpret, many small clusters of submasks can still be observed. 4.2 I MAGE N ET The results of kNN classification and t-SNE visualization using submasks on small datasets of varying complexities show that the submasks contain substantial information relevant for image classification. In this section, the utility of the submasks obtained for a large convolutional network trained on the ImageNet Large Scale Visual Recognition Challenge 2012 (ILSVRC-2012) (Deng et al., 2012) dataset is evaluated. Our results show that submasks retain a large amount of information on this difficult large scale task, while greatly improving storage efficiency. For instance, 4096-dimensional submasks for the full ILSVRC-2012 training set can be stored in about 0.5 GB. Our experiments also indicate that submasks obtained from a better trained network result in better performance (Table 3). Krizhevsky et al. (2012) suggested that the activations from a trained convolutional network can be compressed to binary codes using auto-encoders. We show here that the submasks can be directly utilized for efficient retrieval of data based on high level similarity even though no pair-wise loss was used during training. We compare to DiffHash, a supervised similarity-preserving hashing approach proposed by Strecha et al. (2012), trained on the non-binarized features from the network. Supervision is represented in terms of similar and dissimilar pairs of points, for which a ground-truth similarity measure is known, i.e. sharing the same class or not. While it is beyond the scope of this paper to provide an 2 https://github.com/torontodeeplearning/convnet/ 6 Published as a conference paper at ICLR 2015 Network DeCAF Convnet2 1 DiffHash Submasks 0.9 Network error 19.2% 13.5% kNN on submasks 29.2% 20.38% Precision 0.8 Table 3: Top-5 Classification accuracy on validation set when performance of two different networks on ImageNet is compared to performance of submasks obtained from each of them. Note that as network accuracy improves by about 6%, submask accuracy improves by about 10%. 0.7 0.6 0.5 0.4 Technique Submasks Diffhash 0.3 0 0.2 0.4 0.6 0.8 1 Recall Figure 6: Comparison of precision-recall curves on ILSVRC-2012 when using binary codes obtained using different techniques. The performance of submasks is competitive and decays only for high recall values where supervised hashing obtains a better ranking of the results due to the pair-wise supervision. mAP@5 58.3 61.0 mAP@10 56.7 59.3 mAP@100 46.7 49.5 Table 4: Comparison of mean average precisions at various thresholds using binary codes obtained using different techniques on the ILSVRC-2012 dataset. Submasks are obtained directly from networks trained for classification without any further training. Up to mAP@100 the submasks show a constant performance degradation of about 3 points. exhaustive comparison or to introduce a new approach to supervised hashing, we nevertheless show very competitive performance w.r.t. a dedicated algorithm devised for this task. Precision-recall curves are shown in Figure 6 while Table 4 reports results for mean average precision; mAP = PR r=1 P (r) · rel(r), where rel(r) indicates the relevance of a result at a given rank r, P (r) the precision at r, and R the number of retrieved results. DiffHash learns a linear projection, which is one of the reason we decided to use it to limit impact of supervision. Thus we attribute the small performance gap to the input features already being very discriminative which left little room for improvement. For the purpose of this comparison, we did not investigate more sophisticated techniques which would have steered the focus to conventional hashing approaches. Sample retrieval results for examples from the ILSVRC-2012 dataset are shown in Figure 7. 5 D ISCUSSION Training a system of many networks on a dataset such that they specialize to solve simpler tasks can be quite difficult without combining them into a single network with locally competitive units. Without such local competition, one needs to have a global gating mechanism as in Jacobs et al. (1991). The training algorithm and the objective function also need modifications such that competition between networks is encouraged, and the system becomes hard to train. On the other hand, a locally competitive neural network can behave like a model composed of many subnetworks, and massive sharing of parameters between subnetworks enables better training. Stochastic gradient descent can be used to minimize the desired loss function, and the implementation is so simple that one does not even realize that a model of models is being trained. Figure 4 suggests that during optimization, the subnetworks get organized during an early transient phase such that subnetworks responding to similar examples have more parameters in common than those responding to dissimilar examples. This allows for better training of subnetworks due to reduced interference from dissimilar examples and shared parameters for similar examples. In the later fine-tuning phase, the parameters of subnetworks get adjusted to improve classification and much less re-assignment of subnetworks is needed. In this way, the gating mechanism induced by locally competitive activation functions accomplishes the purpose of global competition efficiently and no modifications to the error function are required. We believe that due to above advantages locally competitive networks have allowed easier and faster training on complex pattern recognition tasks compared to networks with sigmoidal or similar activation functions. These findings provide indirect evidence that low interference between subnetworks is a beneficial property for training large networks. The nature of organization of subnetworks is reminiscent of the data manifold hypothesis for classification (Rifai et al., 2011). Just like data 7 Published as a conference paper at ICLR 2015 Figure 7: Retrieval based on subnetworks on the ILSVRC-2012 dataset. The first image in each row is the query image; the remaining 5 are the responses retrieved using submasks. points of different classes are expected to concentrate along sub-manifolds, we expect that the organization of subnetworks that respond to the data points reflects the data manifold being modeled. An important take-away from these results is the unifying theme between locally competitive architectures, which is related to past work on competitive learning. Insights from past literature on this topic may be utilized to develop improved learning algorithms and neural architectures. This paper, to the best of our knowledge, is the first to show that useful binary data descriptors can be obtained directly from a neural network trained for classification without any additional training. These descriptors are not just results of a thresholding trick or unique to a particular activation function, but arise as a direct result of the credit assignment process. Our experiments on datasets of increasing complexity show that when the network performance improves, the performance gap to submaskbased classification closes. This suggests that in the near future, as training techniques continue to advance and yield lower errors on larger datasets, submasks will perform as well as activation values for retrieval and transfer learning tasks. Importantly, these binary representations will always be far more efficient for storage and retrieval than continuous activation vectors. R EFERENCES Batra, D., Agrawal, H., Banik, P., Chavali, N., and Alfadda, A. CloudCV: Large-Scale distributed computer vision as a cloud service. http://www.cloudcv.org, September 2013. URL http://www.cloudcv.org. Deng, Jia, Berg, Alex, Satheesh, Sanjeev, Hao, Su, Khosla, Aditya, and Li, Fei-Fei. ImageNet large scale visual recognition competition 2012 (ILSVRC2012). http://www.image-net.org/challenges/LSVRC/2012/, 2012. URL http://www.image-net.org/challenges/LSVRC/2012/. Donahue, Jeff, Jia, Yangqing, Vinyals, Oriol, Hoffman, Judy, Zhang, Ning, Tzeng, Eric, and Darrell, Trevor. DeCAF: a deep convolutional activation feature for generic visual recognition. arXiv:1310.1531 [cs], October 2013. URL http://arxiv.org/abs/1310.1531. Glorot, Xavier, Bordes, Antoine, and Bengio, Yoshua. Deep sparse rectifier networks. In Proceedings of the 14th International Conference on Artificial Intelligence and Statistics. JMLR W&CP, volume 15, pp. 315–323, 2011. URL http://eprints.pascal-network.org/archive/00008596/. 8 Published as a conference paper at ICLR 2015 Gong, Yunchao, Kumar, Sanjiv, Rowley, Henry A., and Lazebnik, Svetlana. Learning binary codes for highdimensional data using bilinear projections. In Computer Vision and Pattern Recognition (CVPR), 2013 IEEE Conference on, pp. 484–491. IEEE, 2013. URL http://ieeexplore.ieee.org/xpls/abs_ all.jsp?arnumber=6618913. Goodfellow, Ian, Warde-Farley, David, Mirza, Mehdi, Courville, Aaron, and Bengio, Yoshua. Maxout networks. In Proceedings of The 30th International Conference on Machine Learning, pp. 1319–1327, 2013a. URL http://jmlr.org/proceedings/papers/v28/goodfellow13.html. Goodfellow, Ian J., Warde-Farley, David, Lamblin, Pascal, Dumoulin, Vincent, Mirza, Mehdi, Pascanu, Razvan, Bergstra, James, Bastien, Frédéric, and Bengio, Yoshua. Pylearn2: a machine learning research library. arXiv:1308.4214 [cs, stat], August 2013b. URL http://arxiv.org/abs/1308.4214. Goodfellow, Ian J., Mirza, Mehdi, Da, Xiao, Courville, Aaron, and Bengio, Yoshua. An empirical investigation of catastrophic forgetting in gradient-based neural networks. In International Conference on Learning Representations, 2014. URL http://arxiv.org/abs/1312.6211. Grauman, Kristen and Fergus, Rob. Learning binary hash codes for large-scale image search. In Machine Learning for Computer Vision, pp. 49–87. Springer, 2013. URL http://link.springer.com/ chapter/10.1007/978-3-642-28661-2_3. Hinton, Geoffrey E., Srivastava, Nitish, Krizhevsky, Alex, Sutskever, Ilya, and Salakhutdinov, Ruslan R. Improving neural networks by preventing co-adaptation of feature detectors. arXiv:1207.0580 [cs], July 2012. URL http://arxiv.org/abs/1207.0580. Jacobs, Robert A., Jordan, Michael I., Nowlan, Steven J., and Hinton, Geoffrey E. Adaptive mixtures of local experts. Neural computation, 3(1):79–87, 1991. URL http://www.mitpressjournals.org/doi/ abs/10.1162/neco.1991.3.1.79. Krizhevsky, Alex and Hinton, Geoffrey. Learning multiple layers of features from tiny images. Computer Science Department, University of Toronto, Tech. Rep, 2009. URL http://citeseerx.ist.psu. edu/viewdoc/download?doi=10.1.1.222.9220&rep=rep1&type=pdf. Krizhevsky, Alex, Sutskever, Ilya, and Hinton, Geoffrey E. Imagenet classification with deep convolutional neural networks. In Advances in Neural Information Processing Systems, 2012. URL http://books. nips.cc/papers/files/nips25/NIPS2012_0534.pdf. LeCun, Yann, Bottou, Léon, Bengio, Yoshua, and Haffner, Patrick. Gradient-based learning applied to document recognition. Proceedings of the IEEE, 86(11):2278–2324, 1998. URL http://ieeexplore. ieee.org/xpls/abs_all.jsp?arnumber=726791. Masci, Jonathan, Bronstein, Alex M., Bronstein, Michael M., and Schmidhuber, Jürgen. Multimodal SimilarityPreserving Hashing. IEEE Transactions on Pattern Analysis and Machine Intelligence, 36(4), 2014a. Masci, Jonathan, Bronstein, Alex M., Bronstein, Michael M., Sprechmann, Pablo, and Sapiro, Guillermo. Sparse similarity-preserving hashing. In International Conference on Learning Representations, 2014b. URL http://arxiv.org/abs/1312.5479. arXiv: 1312.5479. Pascanu, Razvan, Montufar, Guido, and Bengio, Yoshua. On the number of response regions of deep feed forward networks with piece-wise linear activations. arXiv:1312.6098 [cs], December 2013. URL http: //arxiv.org/abs/1312.6098. arXiv: 1312.6098. Rifai, Salah, Dauphin, Yann, Vincent, Pascal, Bengio, Yoshua, and Muller, Xavier. The manifold tangent classifier. In Advances in Neural Information Processing Systems, pp. 2294–2302, 2011. URL https: //papers.nips.cc/paper/4409-the-manifold-tangent-classifier.pdf. Salakhutdinov, Ruslan and Hinton, Geoffrey. Semantic hashing. International Journal of Approximate Reasoning, 50(7):969–978, July 2009. doi: 10.1016/j.ijar.2008.11.006. URL http://linkinghub. elsevier.com/retrieve/pii/S0888613X08001813. Srivastava, Rupesh K., Masci, Jonathan, Kazerounian, Sohrob, Gomez, Faustino, and Schmidhuber, Jürgen. Compete to compute. In Advances in Neural Information Processing Systems, pp. 2310–2318, 2013. URL http://papers.nips.cc/paper/5059-compete-to-compute. Strecha, Christop, Bronstein, Alex M., Bronstein, Michael M., and Fua, Pascal. LDAHash: Improved Matching with Smaller Descriptors. IEEE Transactions on Pattern Analysis and Machine Intelligence, 34(1), 2012. Van der Maaten, Laurens and Hinton, Geoffrey. Visualizing data using t-SNE. Journal of Machine Learning Research, 9(11), 2008. Zeiler, Matthew D., Ranzato, M., Monga, R., Mao, M., Yang, K., Le, Q. V., Nguyen, P., Senior, A., Vanhoucke, V., and Dean, J. On rectified linear units for speech processing. In IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pp. 3517–3521. IEEE, 2013. URL http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=6638312. 9 Published as a conference paper at ICLR 2015 A A.1 S UPPLEMENTARY M ATERIALS E XTRA V ISUALIZATIONS 0 1 2 3 4 5 6 7 8 9 (a) Trained LWTA layer. 0 1 2 3 4 5 6 7 8 9 (b) Trained Maxout layer. Figure 8: 2-D visualization of submasks from the penultimate layer of 3 hidden layer LWTA and maxout networks on MNIST test set. Organization of submasks into distinct class specific clusters similar to ReL networks is observed. 0 1 2 3 4 5 6 7 8 9 (a) Untrained 1st LWTA layer. 0 1 2 3 4 5 6 7 8 9 (b) Untrained 1st ReL layer. Figure 9: 2-D visualization of submasks obtained before training from the 1st (closest to the input) hidden layer of 3 hidden layer LWTA and ReL networks on MNIST test set. B B.1 DATASET D ESCRIPTIONS CIFAR-10 AND CIFAR-100 CIFAR-10 is a dataset of 32×32 color images of 10 classes split into a training set of size 50,000 and testing set of size 10,000 (6000 images per class) (Krizhevsky & Hinton, 2009). CIFAR-100 is a similar dataset of color images but with 100 classes and 600 images per class, making it more challenging. The models from Goodfellow et al. (2013a) for these dataset utilize preprocessing using global contrast normalization and ZCA whitening as well as data augmentation using translational and horizontal reflections. B.2 I MAGE N ET (ILSVRC-2012) ILSVRC-2012 is a dataset of over a million natural images split into 1000 classes. An implementation of the network in Krizhevsky et al. (2012), with some minor differences (Donahue et al., 2013), is available publicly. For the experiments in this section, the penultimate-layer activations obtained using this model were downloaded from CloudCV Batra et al. (2013). The activations were obtained using the center-only option, meaning that only the activations for the central, 224×224 crop of each image were used. 10 Published as a conference paper at ICLR 2015 For each validation set example, 100 examples from the training set with the closest submasks were weighted by the inverse of the distance, then the classes with top-1 or top-5 weighted sums were returned as predictions. C N OTE ON S IGMOIDAL N ETWORKS In this paper we focused on improving our understanding of neural networks with locally competitive activation functions. We also obtained binary codes for efficient retrieval directly from neural networks trained for classification, but this was not the primary aim of our study. When this is the aim, we note here that it possible to use sigmoidal activation functions to obtain binary codes by thresholding the activation values after supervised or unsupervised (Salakhutdinov & Hinton, 2009) training. However it should be noted that: • The thresholding is somewhat arbitrary and the best threshold needs to be selected by trying various values. For locally competitive networks, the binarization is natural and inherent to the nature of credit assignment in these networks. • Since sigmoidal networks are hard and slow to train, the approach of thresholding their activations is impractical for large datasets which are common for retrieval tasks. Locally competitive networks have been crucial for the successful application of neural networks to such datasets. 11
9cs.NE
Stochastic Deconvolutional Neural Network Ensemble Training on Generative Pseudo-Adversarial Networks A Method for Minimising the Mode Collapse Problem Alexey Chaplygin & Joshua Chacksfield Data Science Research Group, Department of Analytics and Business Intelligence, PVH Corp. {alexey.chapligin, chacksfieldj}@gmail.com ABSTRACT The training of Generative Adversarial Networks (GANs) is a difficult task mainly due to the nature of the networks. One such issue is when the generator and discriminator start oscillating, rather than converging to a fixed point. Another case can be when one agent becomes more adept than the other which results in the decrease of the other agent’s ability to learn, reducing the learning capacity of the system as a whole. Additionally, there exists the problem of ‘Mode Collapse’ which involves the generators output collapsing to a single sample or a small set of similar samples. To train GANs a careful selection of the architecture that is used along with a variety of other methods to improve training. Even when applying these methods there is low stability of training in relation to the parameters that are chosen. Stochastic ensembling is suggested as a method for improving the stability while training GANs. Introduction Deep Networks have made great advances in the area of generative modes. These advances have been the result of a wide range of training losses and architectures, including but limited to Generative Adversarial Networks (GANs) [1]. Most deep generative models are trained by the use of two models. They are used to solve a minimax ‘game’, with a Generator sampling data, Discriminator classifying the data as real or generated. In theory these models are capable of modeling an arbitrarily complex probability distribution. The ability to train flexible generating functions have made GANs extremely successful in image generation [2]. In practice, however, GANs suffer from many issues, particularly during training. One common failure mode involves the generator collapsing to produce only a single sample or a small family of very similar samples. Another involves the generator and discriminator oscillating during training, rather than converging to a fixed point. In addition, if one agent becomes much more powerful than the other, the learning signal to the other agent becomes useless, and the system does not learn. A lot of attempts have been made to minimise the mode-collapse problem and improve variety on the output [3, 4, 5, 6]. However, some solutions are computationally expensive and treated mode-collapse problem symptomatically. The assumption behind the methodology described later is that the architecture of a typical GAN causes mode-collapse to occur. The Discriminator portion of the network constantly requires new samples from the Generator and due to how is defined, it never reaches a state for which the output of is satisfactory. This in turn results into two possible ways for the model to evolve. Firstly, in the case where is overly powerful the network can start oscillating. This is where even the slightest modification of parameters can result in significantly different outputs that the discriminator cannot “remember”. In this situation the output differs from epoch to epoch, at the cost of local variety inside of one epoch. We call this scenario the “soft-collapse” of a model. However, if is weaker the oscillation scenario cannot occur. In this instance a situation called “hard-collapse” may manifest. This is where after a small number of attempts to significantly modify the output and go into oscillation mode, it fails. The discriminator becomes absolute certain that the all samples are fake. This results with the loss of the generator being effectively infinite. This results in undefined gradients and it being impossible for the training to progress further. As we believe that mode-collapse is unavoidable situation another, synthetic way of solving this issue, is suggested. Proposed is the simple idea of Stochastic Ensembling, which can be described as random shuffling of filters on deep levels of the generator. This is comparable to creating a set of weak generators that can still suffer from the modecollapse problem, but still produce an acceptable output variety. The efficiency of the described method is demonstrated on another, Pseudo-GAN, where the role of discriminator is played by any pre-trained image classifier. This can be seen as a state of absolute mode-collapse from the beginning of training. Methodology The main difference between standard GAN architecture and one using Stochastic Ensembling is in the way that the deep layers are constructed within the Generator. In these layers, stochastic deconvolution is applied, the main idea of which is to Random uniform (-1, 1) 8x8 sdeconv, 576, 16x16 sdeconv, 512, 32x32 sdeconv, 256, 64x64 deconv, 128, 128x128 … deconv, 3, output size input filters output Figure 1. Example generator structure showing how at each ‘sdeconv’ (stochastic deconvolutional) layer the filters are being selected randomly. randomly select a set of filters from a fixed filter bank. In this architecture a stochastic deconvolution layer is constructed using filters of size 4, applied with a stride of size 2. (Parameterised Leaky ReLU function initialised to 0.2) was applied to improve model fitting [7] and weight normalization was also used to improve stability [8]. The higher level layers are left as standard deconvolution layers so as to provide refinement for the network and can be reused between different combinations of deep layers. Meanwhile different combinations of deep layers are available for covering the different distributions in the training dataset. An architecture that could achieve the same effect as Stochastic Ensembling is to split the generator into an ensemble of generators with shared upper layers. This increases the size of the networks requirements making it computationally expensive to train. On the other hand stochastic deconvolutions create different ‘routes’ through the use of only different filters in deep layers. From an intuitive point of view, the combination of paths covers different visual “topics” in the training distribution, for which high-level features are usually shared. This prevents the network from early collapse and describes the distribution more effectively. It does not guarantee that GANs based on stochastic deconvolution do not suffer from mode collapse, but does provide some redundancy. Even if each route of 4096 in the example above collapsed it would still provide some variety. Another benefit of using stochastic deconvolutional layers is that the size of filters can be kept smaller. This enables the discriminator to outperform each sub-generator and in the worst case scenario the sub-generator will start oscillations without experiencing hard mode collapse. We believe that stochastic ensembling can be beneficial outside of GAN models and can be useful for any problem that involves generative models. The approach could offer an avenue of further research for the application in non-generative models as an easily implemented alternative to other ensemble techniques. Apart from the stochastic ensembling architecture the rest of GAN is built to standard approach with only usage of weight normalization [8] and parametric ReLU additions. For the training of the architecture the standard cGAN loss was used, [ ( )] [ ( ( ))] Experiments Two experiments were performed to estimate the benefits of data variety with respect to the outputs of the model when using stochastic deconvolutional generator (SGAN). The comparison was made with an ‘adapted GAN’ described in ‘On the Effects of Batch and Weight Normalization in Generative Adversarial Networks’ [8] which is shown to be advantageous in regard to combating the mode collapse problem and increasing the variation within the output samples. The SGAN was constructed from the ‘adapted GAN’ by altering the first three generator layers. The layers were converted to stochastic deconvolutions with banks of 16 filters, which gave potential combinations of filters. With the absence of a common measurement technique the comparison was performed visually. However, the final results differed significantly when compared to the normal GAN approach that we believe no extra measurements were necessary. The first experiment used the MNIST dataset. The first notable difference was during training. It was required to restart the training of the ‘adapted GAN’ multiple times due to immediate collapse of the network output. This was due to wrong weight initialisation. However, when using the SGAN architecture, immediate collapse was never observed during the training process, irrespective of the initialisation. Figure 2. GAN loss Figure 3. SGAN loss The main method for comparing the output of the networks was visually inspecting the outputs. The following table shows the period output during training. The larger state of the SGAN architecture required training for a much longer period of time. ‘Adapted GAN’ Output SGAN Output Step 0 Step 0 Step 50 Step 50 Step 100 Step 250 Step 500 Step 100 Visual quality of alive paths is similar to step 100 of GAN Step 250 Initial signs of degradation occurs; model starts to decrease variety producing only “ones” Step 500 Recovered dead paths, no degradation observed Step 1000 Step 1000 Majority of outputs are 1s Step 1500 Step 1500 Degradation and collapse of sub-networks. Significantly better comparing to GAN Step 2000 Step 2000 Step 2667 Step 2500 Step 2667 Model was not able to recover, training stopped Last step of GAN model Still generating decent results with a minimal degradation Step 3000 slow degradation continues, however variety is not affected comparing to quality of the output SGAN Output (continued) Step 3500 The difference in stability can be seen in the progression and volatility of loss during the training of the two architectures. The SGAN is more stable (Figure 6) while the ‘adapted GAN’ starts to reach the practical max and 0 already (Figure 5) around step 1100. Step 4000 Step 4388 Still producing decent output. Sub-networks seem to suffer from a lack of variety, overall variety is intact. Tommy Hilfiger Instagram account Figure 5. Loss for adapted GAN architecture during training. The SGAN architecture was also compared to the adapted GAN [8] over a dataset consisting of images scraped from the official Tommy Hilfiger Instagram account. The dataset consisted of 2350 images of all kinds of topics (Figure 4). No data argumentation was applied except random horizontal swaps. None of the known GAN architectures would be able to produce decent results based on such a small training set with such an input data variety. Figure 6. Loss for SGAN architecture during training. Figure 4. Example training images from the Tommy Hilfiger Instagram account. ‘Adapted GAN’ output SGAN output Step 0 Step0 Step 50 Step 50 Greater variety observed Step 100 Step 100 Step 500 ‘Best’ results achieved Step 500 Step 654 Mode collapse Some sub-networks collapsed, variety is still high Step 654 Step 700 Decreased variety after recovering, started oscillating Step 824 Mode collapse again Step 871 Recovering with quality and variety degradation Step 956 Collapsed Step 1100, Recovering with a high level of variety and quality degradation Step 1250 Collapsed Step 1000 Recovered collapsed paths, sub-network its own “topic” Step 1426 Training ended, model not able to recover Step 1500 Degradation of local variety, overall variety is still present Step 2000 Sub-networks show signs of oscillation, overall variety still decent Step 2380 Sub-networks degradation, overall quality is superior to adapted GAN Generative Pseudo-Adversarial Network GAN architectures where the role of discriminator is being played by a pre-trained image classifier, can be thought of as being ‘perfectly’ collapsed. For any generated image, the discriminator cannot be fooled. In practice, such a network is not adversarial hence it is referred to as a Generative Pseudo-Adversarial Network (GPAN). Following the classic approach, such a model can never be trained and will become stuck at the very start with the theoretically infinite gradients of the generator. Suggested below is a model that behaves similarly to a typical adversarial model by applying stochastic ensembling and the ‘adapted PatchGAN’ described in ‘Another way of restoring distribution of an image classifier’ [9]. The suggested model follows the ‘adapted PatchGAN’, with minor modifications, applying stochastic ensembling on deep levels of the generator (Figure 7) and extending the output to a higher resolution of . In this architecture a stochastic deconvolution layer and convolutional layers are constructed using filters of size 4, applied with a stride of size 2. (Parameterised Leaky ReLU function initialised to 0.2) was applied to improve model fitting [7] unless Requested category vector 2x2x1 SDeconv(4), 520, 4x4 SDeconv(4), 468, 8x8 Conv, 8, 256x256 SDeconv(4), 416, 16x16 Conv, 8, 128x128 SDeconv(4), 208, 32x32 Conv, 16, 64x64 Conv, 16, 64x64 Substrate image, 512x512 SDeconv(4), 104, 64x64 Deconv, 208, 128x128 Deconv, 104, 256x256 Deconv, 52, 512x512 Deconv, 3, 1024x1024 Figure 7. Generator part of GPAN architecture featuring 5 SDeconv layers it was the last layer for which function was used. Weight normalization was also used, so as to improve stability [8]. In the construction of the GPAN, the generator part (Figure 7) used 5 stochastic deconvolution layers with filter banks consisting of 4 sets of filters. This gives a theoretical maximum variety of 1024 combinations. The discriminator remained unchanged, but received a resized, , copy of the output produced by generator. A few additions were made to the architecture to achieve better quality of the output. The importance regions, in accordance with the grad-cam methodology [10], of the pool5 layer in the VGG16 classifier were extracted and masked in a conditional GAN (cGAN) loss. The purpose of this was to allow the output to satisfy either the VGG or discriminator losses independently. In addition, to improve the output variety in each batch of images, the constraint to contain only one set of wanted categories from the classifier was applied. The same losses for the ‘adapted PatchGAN’ were used. For the cGAN part of the network, [ ( ( ( ( Conv, 128, 128x128 Conv, 256, 64x64 ( | | ) where is the loss for required classes not appearing in the output and is the loss associated with classes being identified that were not required. [9]. { } Let ( ) be the feature map from each sdeconv layer, with shape . Each feature map was compared between images in the same batch to construct a ‘Split Loss’. The purpose of this loss was to influence the network to develop different feature maps for each image in batch. Defining as the function which measures the element-wise difference between two 3-dimensional feature maps, ) )))] Conv, 64, 256x256 | As well as the same loss for the output activating the VGG classifier, ( The masking loss was applied to keep the background of the image as white as possible, Substrate image, 512x512 | )] [ Deconv, 3, 512x512 ( ) where ( ) is the masked output of the generator. The substrate loss to influence the model to generate an image as similar to the substrate as possible, | | ∑ (( For training with a batch as, ∑ | | (| | The term the layer : ) ) ) the split loss is defined ∑ ( ( ( ) ( ))) refers to a scaling factor dependant on Conv, 512, 32x32 , Conv, 512, 16x16 , Conv, 512, 15x15, stride = 1 Conv, 512, 14x14, stride = 1, sigmoid Figure 8. Discriminator part of GPAN architecture The combination of losses that was observed to be the most beneficial was was chosen giving the appearance of random behaviour. As a consequence even if the same target group is selected a PGAN generates different images at each run. Results In the following examples, the images were generated for each target category. Different paths were used for each image, resulting in the different patterns. Significant variety in the output data was achieved giving an impression of dynamic patterns generation as if produced by a classic generative adversarial network. At the each iteration, 1 out of 1024 paths Python Turtle Zebra and flamingo Conclusion Stochastic generative models can be beneficial for a wide range of applications where generative transformations have unlimited solutions. In such instances the suggested approach can help in covering a subset without making the model’s structure significantly bigger and/or complicated. In particular it can be useful for chatbot applications. Answers to the same question could be formulated in a different way giving the appearance of more human speech. References [1] I. Goodfellow, J. Pouget-Abadie, M. Mirza, B. Xu, D. Warde-Farley, S. Ozair, A. Courville and Y. Bengio, “Generative adversarial nets,” Advances in neural information processing systems , pp. 2672-2680, 2014. [2] A. Odena, C. Olah and J. Shlens, “Conditional image synthesis with auxiliary classifier gans,” arXiv preprint arXiv:1610.09585., 2016. [3] T. Karras, T. Aila, S. Laine and J. Lehtinen, “Progressive growing of gans for improved quality, stability, and variation,” arXiv preprint arXiv:1710.10196, 2017. [4] X. Mao, Q. Li, H. Xie, R. Lau, Z. Wang and S. Smolley, “Least squares generative adversarial networks,” IEEE International Conference on Computer Vision (ICCV), pp. 2813-2821, 2017. [5] L. Metz, B. Poole, D. Pfau and J. SohlDickstein, “Unrolled generative adversarial networks,” arXiv preprint arXiv:1611.02163., 2016. [6] K. Roth, A. Lucchi, S. Nowozin and T. Hofmann, “ Stabilizing training of generative adversarial networks through regularization,” Advances in Neural Information Processing Systems, pp. 2015-2025, 2017. [7] K. He, X. Zhang, S. Ren and J. Sun, “Delving deep into rectifiers: Surpassing human-level performance on imagenet classification,” Proceedings of the IEEE international conference on computer vision, pp. 1026-1034, 2015. [8] S. Xiang and H. Li, “On the Effects of Batch and Weight Normalization in Generative Adversarial Networks,” stat, no. 1050, p. 22, 2017. [9] A. Chaplygin and J. Chacksfield, “A Method for Restoring the Training Set Distribution in an Image Classifier,” arXiv preprint arXiv:1802.01435, 2018. [10] R. R. Selvaraju, M. Cogswell, A. Das, R. Vedantam, D. Parikh and D. Batra, “Grad-CAM: Visual Explanations from Deep Networks via Gradient-based Localization.,” https://arxiv. org/abs/1610.02391 v3., 2016.
1cs.CV
Low Rank Magnetic Resonance Fingerprinting Gal Mazor,1 Lior Weizman,1 Assaf Tal,2 and Yonina C. Eldar1 1) Department of Electrical Engineering, Technion - Israel Institue of Technology, arXiv:1701.07668v2 [physics.med-ph] 27 Jun 2017 Israel 2) Department of Chemical Physics, Weizmann Institute of Science, Rehovot, Israel 1 Purpose: Magnetic Resonance Fingerprinting (MRF) is a relatively new approach that provides quantitative MRI measures using randomized acquisition. Extraction of physical quantitative tissue parameters is performed off-line, without the need of patient presence, based on acquisition with varying parameters and a dictionary generated according to the Bloch equation simulations. MRF uses hundreds of radio frequency (RF) excitation pulses for acquisition, and therefore a high under-sampling ratio in the sampling domain (k-space) is required for reasonable scanning time. This under-sampling causes spatial artifacts that hamper the ability to accurately estimate the tissue’s quantitative values. In this work, we introduce a new approach for quantitative MRI using MRF, called magnetic resonance Fingerprinting with LOw Rank (FLOR). Methods: We exploit the low rank property of the concatenated temporal imaging contrasts, on top of the fact that the MRF signal is sparsely represented in the generated dictionary domain. We present an iterative scheme that consists of a gradient step followed by a low rank projection using the singular value decomposition. Results: Experimental results consist of retrospective sampling, that allows comparison to a well defined reference, and prospective sampling that shows the performance of FLOR for a real-data sampling scenario. Both experiments demonstrate improved parameter accuracy compared to other compressed-sensing and low-rank based methods for MRF at 5% and 9% sampling ratios, for the retrospective and prospective experiments, respectively. Conclusions: We have shown through retrospective and prospective experiments that by exploiting the low rank nature of the MRF signal, FLOR recovers the MRF temporal undersampled images and provides more accurate parameter maps compared to previous iterative methods. Keywords: MRF, Low rank, Compressed Sensing, QMRI 2 I. INTRODUCTION Quantitative Magnetic Resonance Imaging (QMRI) is widely used to measure tissue’s intrinsic spin parameters such as the spin-lattice magnetic relaxation time (T1) and the spin-spin magnetic relaxation time (T2)1 . Since tissue relaxation times vary in disease, QMRI enables the diagnosis of different pathologies, including multiple sclerosis (MS), Alzheimer, Parkinson, epilepsy and cancer2–7 . In addition, the knowledge of tissue relaxation times allows generation of many clinical MR imaging contrasts (such as FLAIR and STIR) off-line, and saves a significant amount of scanning time. Despite the advantages of QMRI, clinical MRI today mainly consists of weighted images. Values in weighted MR imaging are given in arbitrary units, since the signal strength is influenced by both intrinsic parameters (such as relaxation times and concentration of hydrogen atoms) and non-intrinsic ones. Non-intrinsic parameters include transmit and receive coils sensitivities, patient position in the scanner, vendor based scanner specific parameters, and local temperature. Weighted MRI images therefore lack quantitative information and as a result, different materials may exhibit similar or identical gray level values. In addition, weighted MRI contrast values vary between different follow-up scans of the same patient. This fact may impair disease monitoring, if based solely on those images. To date, weighted MRI scans are more common than QMRI in the clinic, due to the extremely long times often associated with QMRI using conventional techniques8–10 . A plethora of methods have been proposed for QMRI. Earlier approaches are based on a series of spin echo (SE) or inversion recovery (IR) images with varying repetition times (TR) and echo times (TE) to evaluate each magnetic parameter (T1 or T2) separately. After acquisition, the curve of intensities for each pixel is matched to the expected magnetic signal, representing the appropriate magnetic tissue parameters8 . Accelerated methods for QMRI consist of the popular driven equilibrium single pulse observation of T1 (DESPOT1)9 or T2 (DESPOT2)10 and the IR TrueFISP for simultaneous recovery of T1 and T2 quantitative maps1,11 . Both techniques do not require long waiting times between excitations to reach an equilibrium state, and therefore they are significantly faster. Later works shortened the acquisition time required by those methods by under-sampling the data in both spatial and temporal domains12–16 . However, obtaining accurate and high resolution QMRI in a reasonable clinical scanning time is still very challenging. An approach for QMRI called magnetic resonance fingerprinting (MRF) has drawn increased attention in the last few years17 . MRF uses pseudo-randomized acquisitions to generate many 3 different imaging contrasts, acquired at a high under-sampling ratio. It exploits the different acquisition parameters over time to produce a temporal signature, a “fingerprint”, for each material under investigation. By matching this unique signature to a pre-generated set of simulated patterns, the quantitative parameters can be extracted off-line. This approach saves valuable scan time compared to previous methods for accelerated QMRI, demonstrating promising efficient and reliable results. MRF utilizes the fact that each tissue responds differently to a given quasi-random pulse sequence. By varying the acquisition parameters (e.g. repetition time (TR), echo time (TE), and radio frequency flip angle (FA)), unique signals are generated from different tissues. After acquisition, a pattern recognition algorithm is used to match the acquired signal from each voxel to an entry from a dictionary of possible tissue candidates. The dictionary entries are created by simulating the tissue’s response to the sequence for a range of T1 and T2 parameter values, using the Bloch equations. The resulting dictionary contains the temporal signatures of various simulated materials, given the pseudo-random pulse sequence. The quantitative parameters, such as the tissue’s T1 and T2 relaxation times, can be retrieved from the data by matching the signature acquired to the most correlated entry in the dictionary. In MRI, data is acquired in the Fourier domain of the spatial image (a.k.a. k-space). The acquisition time of a high resolution, single contrast 3D MRI lasts a substantial amount of time. Since MRF is based on rapid acquisition of hundreds of different contrasts, severe under-sampling is performed in k-space to obtain the temporal resolution required for MRF. Figure 1 demonstrates the effect of fully sampled versus under-sampled data, acquired with spiral trajectories and recovered using the inverse non uniform fast Fourier transform (NUFFT)18 . It can be seen that the under-sampled data is blurred and introduces aliasing artifacts. Figure 2 illustrates the noise and under-sampling artifacts of a representative brain voxel intensity as function of time, where the data is acquired with an MRF sequence based on fast imaging with steady state precession (FISP)19 . Clearly, under-sampling also introduces a substantial level of noise in the time domain. In addition, MRF uses a dictionary with discrete values, while QMRI values are continuous. This leads to quantization error, depending on the values represented in the dictionary. While in the original MRF paper17 these imaging artifacts are not handled explicitly, recent works have implemented advanced reconstruction techniques to overcome under-sampling artifacts. Approaches based on exploiting the sparsity of the signal in some transform domain in a compressed sensing (CS)20,21 framework are examined by Davies et al.22 and Wang et al.23 . Zhao 4 et al.24 formulated MRF as a maximum likelihood (ML) problem, and developed an iterative reconstruction approach for each time point. While these techniques showed improved results compared to the original MRF method, they do not exploit the temporal similarity between adjacent time-points, which is intrinsic to the dynamic acquisition used in MRF. A common approach to exploit redundancy exists in dynamic MRI, based on modeling the acquired data as low-rank. This modelling was successfully applied for various dynamic MRI applications, such as cardiac imaging25 and functional MRI26 . In the context of MRF, early works use low-rank MRF to compress the dictionary for faster reconstruction27,28 . This saves reconstruction time, but does not necessarily improve the quality of the reconstructed maps or the acquisition time. The first introduction of a low-rank constraint for improved reconstruction in MRF was proposed by Zhao et al.29,30 followed by a sub-space constrained low-rank approach introduced by us31 . Extensions of these ideas include adding a sparse term to the low-rank-based reconstruction32 (a.k.a robust PCA33 ) and representing the data as low-rank in the k-space domain34,35 . Recently, a few approaches that utilize prior knowledge of the dictionary together with a low-rank constraint have been published. Zhao et al.36 presented an efficient algorithm that performs a singular value decomposition (SVD) on the dictionary and embeds the right singular vectors in the solution, to obtain better estimation of the temporal signatures. A similar approach was presented by Assländer et al.37 , who embed the left singular vectors in the solution. These methods show that exploiting the redundancy via a low-rank based solution improves the results compared to a sparsity approach. However, the obtained reconstructed maps still suffer from quantization error, due to the nature of a matched-filter based solution that matches a single dictionary atom to a single pixel. In addition, most of these methods are based on a fixed rank, set in advance, which may be difficult to determine in advance. In this paper we extend our initial idea presented in our conference paper31 and enforce a low-rank constraint in the image domain together with constraining the solution to the dictionary subspace. In particular, we exploit the low-rank property of the temporal MRF domain, via an iterative scheme that consists of a gradient step followed by a projection onto the subspace spanned by the dictionary elements in order to constrain the structure of the tissue behaviour simulated in the dictionary. The estimated images are then decomposed using SVD and the singular values are soft-thresholded to reduce the nuclear norm value in every step. Our approach, called magnetic resonance Fingerprinting with LOw Rank constraint (FLOR), incorporates three main advantages that were only partially introduced in previous work: 5 t t t t F IG . 1 Illustration of fully sampled (left) vs. spiral trajectory under-sampled (right) k-spaces and their corresponding reconstructed images using direct inverse Fourier transform. In MRF, we acquire many under-sampled images over time. When reconstructing by NUFFT, the under-sampled data is blurred and contains aliasing artifacts. • FLOR formulates the problem as a convex problem. The solution is then rigorously developed based on the incremental subgradient proximal method38. This technique is known to convergence to the global minimum, regardless of the initial starting point. • FLOR is based on a nuclear-norm solution, and does not require fixing the rank in advance. This leads to a solution that adapts the rank according to the nature of the specific dataset. • The subspace constraint in FLOR is not limited to dictionary items, but rather allows a solution that is spanned by the dictionary. This enables better reconstruction of the temporal imaging contrasts. It also allows generation of quantitative parameters that do not necessarily exist in the simulated dictionary, thereby reducing the quantization error of the resulting maps. While there are previous publications that introduce one or two of the advantages pointed above (e.g. Zhao et al.36 describes a subspace constraint that is not limited to the dictionary items), our work incorporates all of them together in a convenient optimization framework. Our reconstruction results are based on sampling with variable density spiral trajectories, using 5% and 9% sampling ratios, for retrospective and prospective experiments, respectively. We compare our results to the methods developed by Davies et al.22 and Zhao29 , and show that FLOR provides quantitative parameter maps with higher accuracy or correspondence to literature compared to those methods. This paper is organized as follows. Section II describes the MRF problem and provides a review of common reconstruction methods, followed by our low-rank based approach. Section III compares our results to previous MRF algorithms, using retrospective and prospective under6 voxel voxel intensity intensity tit voxel intensity voxel intensity t ti t F IG . 2 Illustration of a single brain voxel’s temporal signature acquired with an MRF approach based on the FISP sequence. Fully sampled (top) vs. noisy and under-sampled (bottom) at 15% sampling ratio. sampled MRF data of a human subject. Sections IV and V discuss experimental results using retrospective and prospective under-sampled MRF data, followed by conclusions. II. METHOD II.A. Problem formulation MRF data consists of multiple frames, acquired in the image’s conjugate Fourier domain (a.k.a k-space), where each frame results from different acquisition parameters. We stack the measurements into a Q × L matrix Y, where L is the number of frames and Q is the number of k-space samples in each frame. Every column in Y is an under-sampled Fourier transform of an image frame, X:,i : Y = [Fu {X:,1}, ..., Fu {X:,L }] + H (1) where Fu {·} denotes an under-sampled 2D Fourier transform and H denotes a zero mean complex Gaussian noise. The row Xj,: represents the temporal signature of a single pixel (assumed to correspond to a single tissue). The signature depends on the tissue’s relaxation times, T1 and T2, and its proton density (PD), grouped as a row vector: Θj1 = [T 1j , T 2j , P D j ], 1 ≤ j ≤ N. (2) 7 Each column, X:,i represents a response image acquired at a single time point with different acquisition parameters, stacked as a column vector: Θi2 = [T Ri , T E i , F Ai ]T , 1≤i≤L (3) where TR and TE are the repetition time and time to echo and FA represents the flip angle of the RF pulse. Therefore, Xj,: = f (Θj1 , Θ2 ), where f {·} represents the Bloch equations. Note that we omit the off resonance parameter (which appeared in Θ1 in the original MRF paper17 ), since the sequence used in our retrospective experiments is derived from the FISP sequence, which is insensitive to off resonance effects19 . The goal in MRF is to recover, from the measurements Y, the imaging contrasts X and the underlying quantitative parameters of each pixel defined in (2), under the assumptions that every pixel in the image contains a single type of tissue and that Θ2 is known. Recovery is performed by defining a dictionary that consists of simulating the signal generated from M tissues using the Bloch equations (represented as M different combinations of T1 and T2 relaxation times), when the length-L acquisition sequence defined in (3) is used. As a result, we obtain a dictionary D of dimensions M × L (M > L as the number of simulated tissues is greater than the sequence length). The PD is not simulated in the dictionary, as it is the gain used to match the Bloch simulation performed on a single spin to the signal obtained from a pixel containing multiple spins. It can be easily determined after the T1 and T2 maps are known. After successful recovery of X, each row in X is matched to a single row in the dictionary, and T1 and T2 are estimated as those used to generate the matched dictionary row. Each dictionary signature has its own unique T1 and T2 values stored in a look up table (LUT), represented as the matrix LUT of dimensions M × 2. II.B. Previous Methods The approach suggested in the original MRF paper17 is described in Algorithm 1, and uses matched filtering to match dictionary items to the acquired data. In the algorithm, F H {·} is the 2D inverse NUFFT operator. The parameters kj are the matching dictionary indices, j is a spatial index and i is the temporal index, representing the ith frame in the acquisition. The parameter maps are extracted from LUT, which holds the values of T1 and T2 for each kj . This approach 8 does not incorporate sparse based reconstruction, which has been proven to be very successful in MRI applications based on under-sampled data39–41 . Algorithm 1 Original MRF algorithm Input: A set of under-sampled k-space images: Y A pre simulated dictionary: D An appropriate look up table: LUT Output: d Magnetic parameter maps: Tb1 , Tb2 , P D Compute for every i and j: b :,i = F H {Y:,i } X b j,: i| |hDk ,X b kj = arg max ||Dk ||2 k  ) (  b j,: real Dkb ,X j j d ,0 P D = max ||Db ||2 kj 2 Tb1j , Tb2j = LUT(b kj ) Davies et al.22 suggested a method incorporating sparsity of the data in the dictionary domain (i.e. each pixel is represented by at most one dictionary item), referred to as the BLoch response recovery via Iterative Projection (BLIP) algorithm. This approach is based on the Projected Landweber Algorithm (PLA) which is an extension of the popular iterative hard thresholding method. BLIP (described here as Algorithm 2) consists of iterating between two main steps: A gradient step that enforces consistency with the measurements, and a projection that matches each row of X to a single dictionary atom. BLIP and a few other works that are based on it23 do not incorporate the temporal similarity across time points, which is a fundamental characteristic of the MRF sequence. In addition, there is a high degree of similarity across signatures in D. As a result, the imaging contrasts matrix X is typically a low-rank matrix. Low-rank based modelling for dynamic MRI in general25,26 and MRF in particular27 -37 has been proposed in the past. To demonstrate the low-rank property of X, we used T1, T2 and PD maps of size 128 × 128 (acquired using DESPOT42 ) as an input to a simulation of a FISP sequence19 , using L = 500 TRs. In addition, we used random TR and FA values that have been used in previous publications in the field of MRF17,19 . Note that the general assumption of X being a low-rank matrix holds as long as temporal similarity exist between time-frames in X, and multiple voxels 9 Log values Singular values Index # F IG . 3 Singular values of FISP MRF sequence images, in descending order, presenting an effectively low rank matrix. in the image belong to a single tissue, regardless of the specific acquisition parameters. Figure 3 shows the singular values of X. It can be seen that X is indeed low-rank, as most of the data is represented in the highest 15 singular values. This low-rank property of X can be exploited for improved reconstruction using the following optimization problem: minimize X,R 1 Σ kY:,i − Fu {X:,i }k22 2i (4) subject to rank(X) ≤ r X = R1 D where R1 is a matrix that matches each pixel (Xj,: ) with the dictionary signatures. In many previous implementations of low-rank for MRF, a matching of a single dictionary atom to a single pixel is enforced, which means that the rows of R1 are one-sparse vectors. The parameter r is the rank of the matrix, and is usually defined as a fixed pre-chosen parameter. Typically r is not known in advance and determining it upfront arise difficulty and may add error to the reconstruction scheme. 10 Algorithm 2 BLIP Input: A set of under-sampled k-space images: Y A pre simulated dictionary: D An appropriate look up table: LUT Output: d Magnetic parameter maps: Tb1 , Tb2 , P D 0 b Initialization: µ, X = 0 Iterate until convergence: •Gradient step for every i: b n+1 = X b n − µF H {Fu {X b n } − Y:,i } Z :,i :,i :,i •Project onto the dictionary subspace for every j: |hDk ,Zb j,: i| b kj = arg max ||Dk ||2 k j d P D = max (   b j,: real Dkb ,Z j ||Dkb ||22 j ,0 ) j b n+1 = P d X D Dbkj j,: j d kj ), P D Restore maps for every j: Tb1j , Tb2j = LUT(b 11 Algorithm 3 Model Based Iterative Reconstruction MRF (MBIR-MRF) Input: A set of under-sampled k-space images: Y A pre simulated dictionary: D An appropriate look up table: LUT Output: d Magnetic parameter maps: Tb1 , Tb2 , P D 0 Initialization: λ, p < 1, η1 , η2 , R , Z0 , Q0 , W0 = 0, b 0 = F H {Y:,i } for every i X :,i Iterate until convergence: •Find 1-sparse R as follows:  b kj = arg max Rn+1 = j,b k k  j    b n + 1 Qn Dk , X η 1 j,: ||Dk ||2    b n + 1 Qn Dkb , X η j 1 j,: ||Dkb ||22 j •Update Zn+1 by soft-thresholding the singular values:  bn + [U, S, V] = svd X 1 Wn η2  Soft-threshold the non-zero singular values {σ}j of S with parameter λσjp−1: ( σj − λσjp−1 σj > λσjp−1 σj = 0 otherwise b n+1 = USVH Z •Update Q and W Qn+1 = Qn + η1 (Xn − Rn+1 D), Wn+1 = Wn + η2 (Xn − Zn+1 ) •Update Xn+1 by solving the following minimization problem: minimize X 1 Σ kY:,i − Fu {X:,i}k22 + η1 Qn+1 − X + Rn+1 D 2i Restore maps for every j: n o j d Tb1j , Tb2j = LUT(b kj ), P D = max Rn+1 , 0 j,b k j 12 2 F + η2 Wn+1 − X + Zn+1 2 F Zhao et al.29 suggested an approximation for problem (4), using an ADMM formulation43 as follows: 1 Xn+1 , Rn+1 , Zn+1 = arg min Σ kY:,i − Fu {X:,i }k22 + λψ(Z) + η1 kQn − X + R1 Dk2F 1 X,R1 ,Z 2 i + η2 kWn − X + Zk2F Qn+1 = Qn + η1 Xn+1 − Rn+1 D 1  Wn+1 = Wn + η2 Xn+1 − Zn+1  (5) where the low rank constraint is applied via the function ψ(Z), defined as the p norm (p < 1) of the singular values of Z to the power of p. The matrices Q and W are the Lagrange multipliers. The algorithm, coined Model Based Iterative Reconstruction MRF (MBIR-MRF)29 is described in Algorithm 3. II.C. Proposed Method The constraint presented in previous approaches29 on R1 to have one sparse rows that contain the corresponding PD values for each row of X, is justified by the assumption that only a single dictionary item should match an acquired signature. However, in practice, we found that superior results (in terms of spatial resolution and correspondence to ground truth) are obtained by relaxing this constraint, and allowing X to be comprised of multiple dictionary elements at each step of the optimization algorithm, where at the final stage each voxel is matched to a single tissue. This allows for non-simulated signatures to be described by a linear combination of simulated ones. In addition, the relaxation enables formulating the problem as a convex problem, and saves the pattern recognition search time during reconstruction. The matching between X and the dictionary is done only at the final stage, after X is fully recovered by using a matched filter (MF), in order to extract the parameter maps. For brevity we write the constraint X = RD as X ∈ D where D = {X : N (X) ⊇ N (D)}, and we consider the next regularized form: minimize X∈D 1 Σ kY:,i − Fu {X:,i }k22 + λrank(X) 2i (6) for some fixed regularization parameter λ. Problem (6) is not convex due to the rank constraint. We therefore relax this constraint by 13 Reconstruction Error vs.vs. Iterations Reconstruction Error Iterations ReconstructionError error Reconstruction 2 Without Acceleration With Acceleration 1.5 1 0.5 0 0 5 10 15 20 25 30 Iteration## Iterations F IG . 4 Comparison between the convergence of accelerated (plus sign) and standard (asterisk) FLOR. replacing the rank of X with the nuclear norm kXk∗ , defined as the sum of the singular values of X44 . This results in the relaxed problem: minimize X∈D 1 Σ kY:,i − Fu {X:,i }k22 + λ kXk∗ . 2i (7) In order to solve (7) we use the incremental subgradient proximal method45 as described in Appendix A. Due to the convex modelling of the problem, we also introduce an improvement that significantly reduces convergence time. The improvement uses the acceleration approach suggested by Nesterov46 for minimizing a smooth convex function, and its extension for non smooth composite functions of Beck and Teboulle47,48 . Our final algorithm is detailed in Algorithm 4 and referred to as magnetic resonance Fingerprint with LOw Rank (FLOR), where the parameter λ is chosen experimentally. Note that by setting λ = 0, enforcing R to have one-sparse rows and eliminating the acceleration step, FLOR reduces to BLIP22 . Figure 4 shows the reconstruction error of FLOR as the number of iterations varies with and without the acceleration step. Note that the CPU time of both algorithms is similar. 14 Algorithm 4 FLOR - MRF with LOw Rank Input: A set of under-sampled k-space images: Y A pre simulated dictionary: D An appropriate look up table: LUT Output: d Magnetic parameter maps: Tb1 , Tb2 , P D 0 b Initialization: µ, λ, t0 = 1, X = 0, P = D† D Iterate until convergence: •Gradient step for every i: b n+1 = X b n − µF H {Fu {X b n } − Y:,i } Z :,i :,i :,i •Project onto the dictionary subspace and soft-threshold the singular values:   b n+1 P [U, S, V] = svd Z Soft-threshold the non-zero singular values {σ}j of S with parameter λµ: ( σj − λµ σj > λµ σj = 0 otherwise c n+1 = USVH M •Acceleration step: √ 1+ 1+4t2n tn+1 = 2 b n+1 = M c n+1 + X tn −1 tn+1  c n+1 − M cn M Restore maps for every j: b j,: i| |hDk ,X b kj = arg max ||Dk ||2 k  (  ) b j,: real Dkb ,X j j d P D = max ,0 2  ||Dkb ||2 j kj ) Tb1j , Tb2j = LUT(b II.D. Possible extension Conventional MRF algorithms use MF for the magnetic parameter extraction. MF introduces a quantization error since map values are continuous, as opposed to discrete dictionary values. A possible extension of FLOR is to add values to the dictionary by linear interpolation, in regions where a few candidates from the dictionary match a single signature from the data. We then select 15 F IG . 5 One of the spiral trajectories use for under-sampling a single image. Each time, the trajectories are rotated by 15 degrees. the dictionary signatures that exhibit a high correlation value (the ones above a certain threshold) and average their matching T1 and T2 values. This improvement expands the possible solutions to include ones that do not exist in the dictionary, and therefore exhibits improved accuracy compared to the conventional matching. The major benefit from this extension is reduced quantization errors that arise from conventional MF used in MRF. This extension, coined FLOR II, is examined in the first part of our experimental results in the next section. III. EXPERIMENTAL RESULTS This section describes two MRI experiments that were carried out using brain scans of a healthy subject. The first experiment is based on well known quantitative maps that were used, in a purely simulation environment to generate an MRF experiment with retrospectively sampled data. While this experiment is a simulation based on real quantitative maps, it allows accurate comparison of the results of the different algorithms using a well defined reference. In the second experiment, we used prospective sampled real MRF data that was used to generate the results in Ma et al.17 . While this experiment lacks a gold-standard for accurate error evaluation, it allows comparison between different algorithms in a realistic multi-coil acquisition. To compare between different algorithms, for prospective sampling, where no ground truth is available, we examined the performance of the various algorithms as a function of the total number of excitations, where correspondence to values provided in literature for various brain tissues is used 16 F IG . 6 Reconstruction results of T1, T2 in milliseconds and PD in arbitrary units. Left: Reference maps, reconstruction using conventional MRF from 100% of the noise free data, followed by BLIP, MBIR-MRF, and FLOR reconstruction with extension (as described in Section II.D) from 5% of the noisy data. for validation. In both experiments, variable density spiral trajectories were used for sampling. For quantitative error analysis, we calculated the normalized MSE (NMSE) between each quantitative map estimation and the reference map, defined as: NMSEi = ||θi − θ̂i ||2F P ||θi − N1 θij ||2F (8) j where θi , θ̂i represent a reference map (such as T1,T2 or PD) and its corresponding reconstructed map (respectively), N is the number of pixels in the map and j is a spatial index. In the first experiment, forward and inverse non-uniform Fourier transforms were applied using SPURS, which is a fast approach published recently49 . For the second experiment, we used the NUFFT package18 , to adhere with the reconstruction results of the original MRF paper17 . 17 Error Maps Fully Sampled MRF BLIP MBIR FLOR 500 [ms] 400 300 T1 200 100 NMSE=0.00059 NMSE=0.17985 NMSE=0.05199 NMSE=0.00869 0 100 [ms] T2 50 NMSE=0.01595 NMSE=0.3655 NMSE=0.12405 NMSE=0.02577 0 30 20 PD 10 NMSE=0.00172 NMSE=0.02829 NMSE=0.00793 NMSE=0.00159 0 F IG . 7 Error maps of the reconstruction of T1, T2 in milliseconds and PD in arbitrary units. Left: reconstruction using conventional MRF from 100% of the noise-free data, followed by BLIP, MBIR-MRF, and FLOR reconstruction with extension (as described in Section II.D) from 5% of the noisy data. III.A. Experiment 1: Retrospective undersampling of real data The data for this experiment was acquired with a GE Signa 3T HDXT scanner. The procedures involving human subjects described in this experiment were approved by the Institutional Review Board of Tel-Aviv Sourasky Medical Center, Israel. We generated our reference data by acquisition of Fast Imaging Employing Steady-state Acquisition (FIESTA) and Spoiled Gradient Recalled Acquisition in Steady State (SPGR) images, at 4 different flip angles (3◦ ,5◦ ,12◦ and 20◦ ), implementing the fast and well known DESPOT1 and DESPOT242 algorithms, after improvements as described in Liberman et al.50 , to generate T1,T2 and PD quantitative maps, each of size 128 × 128 pixels. While it is well known that the gold standard method for T1 measurement is the inversion 18 recovery spin echo with varying TIs and for T2 measurement is the spin echo sequences with varying TEs, in this experiment DESPOT was used as a reference thanks to its availability and its relatively fast acquisition time. The FISP pulse sequence has been applied for simulating acquisition of the reference. It was simulated with constant TE of 2ms, random TR values in the range of 11.5-14.5 ms, and a sinusoidal variation of FA (RF pulses) in the range of 0-70 degrees19 . To simulate noisy undersampled MRF samples, we added complex Gaussian zero-mean noise to the k-space data to obtain an SNR of 67dB in the undersampled measurement domain. Data was then under-sampled to acquire only 876 k-space samples in each TR with spiral trajectories. In particular, we used 24 variable density spirals with inner region size of 20 and FOV of 24. In every time frame, each spiral is shifted by 15 degrees. Figure 5 demonstrates the first spiral trajectory. We define the under-sampling ratio by the number of the acquired samples in the k-space domain divided by the number of pixels in the generated image. This leads to an undersampling ratio of ~5% in this experiment. For comparison, the under-sampling ratio of the original MRF paper17 is ~9%, since for each single spiral 1450 data points were acquired. We generated the dictionary using Bloch equations, simulating T1 values of [100:20:2000, 2300:300:5000] ms and T2 values of [20:5:100,110:10:200,300:200:1900] ms. This range covers the relaxation time values that can be found in a healthy brain scan51 . The tuning parameters were experimentally set as µ = 1 and λ = 5, after λ was tested in the range between 0 and 30. Data was fed as an input to BLIP, MBIR-MRF and the improved FLOR algorithm (described as Algorithms 2,3 above and Algorithm 4 with the additional extension of interpolating the parameter maps). In addition, we performed reconstruction using 100% of the data (without the addition of noise) via conventional MRF (Algorithm 1), for comparison purposes and to evaluate the error caused by the effect of discretized dictionary. All the iterative algorithms were run until the difference between consecutive iterations was below the same threshold. The MATLAB code for reproducing the experiment provided in this section can be be found at: http://webee.techni- on.ac.il/Sites/People/YoninaEldar/software det18.php. In this code, spiral sampling trajectories design was based on Lee et al.52 . Figure 6 shows the resulting maps for the recovery of T1, T2 and PD obtained with the various algorithms against the reference (left). The corresponding error maps of each method versus the reference are shown in Fig. 7. To allow detailed view of the reconstruction results for the reader, Fig. 6 shows a zoomed region for each map. It can be seen that both FLOR and MBIR-MRF outperform BLIP reconstruction results, when 19 using 5% of sampled data by utilizing the low rank property. In addition, FLOR provides a lower error compared to MBIR-MRF. The details in the FLOR maps are comparable to those obtained by the original MRF algorithm using 100% of the noise-free data. Due to the very low sampling ratio in our experiments (measured as the number of samples divided by the number of pixels in the image), conventional MRF using 5% of the data did not provide valuable reconstruction results and is therefore omitted in this analysis. We next implemented the MF improvement described in Section II.D. The results are shown in Fig. 8, with corresponding error maps in Fig. 9. These figures compare the recovery maps of FLOR without (FLOR I) and with (FLOR II) the proposed improvement. It can be seen that FLOR II improves the results of FLOR I and produces a smoother solution which better fits the reference maps. III.B. Experiment 2: In vivo prospective sampling experiment The experiment in this section was carried out using the data of the original MRF paper17 , which consisted of 48 spiral trajectories shifted by 7.5 degrees, where 1450 samples were acquired in each trajectory, leading to an underampling ratio of 9%. The data was acquired on a 1.5-T whole body scanner (Espree, SIEMENS Healthcare) using a 32-channel head receiver coil. Due to the lack of gold standard maps for this data, we are unable to provide quantitative error results (e.g. NMSE). Therefore, in this experiment we compare between the various algorithms by examining reconstruction results using 400 TRs (representing 40% of scanning time), to quantitative values of brain tissues from the literature. Since the results obtained in the original MRF experiment (using 1000 TRs) mostly correspond to quantitative values from the literature, the maps generated using 1000 TRs using the original MRF algorithm are provided in Fig. 10, for reference. The results of T1, T2 and PD maps for BLIP, MBIR-MRF and FLOR appear in Fig. 11. Since IR-bSSFP sequence has been used in this experiment, off-resonance frequency has also been computed and shown. We used 109 different values in the range between -250 and 240 Hz. It can be seen that for T1, all iterative algorithms provide similar results, and T1 values of grey matter (GM), white matter (WM) and cerebrospinal fluid (CSF) regions correspond to similar values that appear in the literature (see Table 1 in Ma et al.17 ) and in Fig. 10. While T2 results exhibit visible differences between the various methods, WM and GM values for all methods correspond to 20 F IG . 8 Comparison of FLOR recovery with regular MF (FLOR I), and FLOR recovery with extension (FLOR II, as described in Section II.D) out of 5% of the data. T1 and T2 maps are in milliseconds and PD is in arbitrary units. As can be seen in the magnified area, FLOR II demonstrates a smoother solution (with less quantization errors) which is more similar to the original reference maps. values that appear in the literature. However, both BLIP and MBIR MRF exhibit T2 values for CSF that are lower than those reported in the literature. This can be seen in Fig. 12, where the color scale for T2 is adjusted to 500-2000ms (T2 values for CSF are around 2000ms). Shortened T2 values in CSF were also reported in the original MRF experiment with 1000 TRs (and were justified as out-of-plane flow in this 2D experiment). In our case, using the same acquired data, it can be seen in Fig. 12 that FLOR provides CSF values that better correspond to literature values, 21 Error Maps Error maps FLOR II FLOR I 500 [ms] 400 300 200 100 NMSE=0.00869 NMSE=0.03313 0 300[ms] 200 100 NMSE=0.09647 NMSE=0.02577 0 30 20 10 NMSE=0.00247 NMSE=0.00159 0 F IG . 9 Error maps comparison, FLOR I vs. FLOR II. The T1 and T2 error maps are in milliseconds and PD is in arbitrary units. It can be seen that FLOR II outperforms FLOR I. T1 reference T2 reference PD reference 3000 300 2500 250 2000 200 1500 1000 500 150 100 50 df reference 1 0.9 200 0.8 150 0.7 100 0.6 50 0.5 0 0.4 -50 0.3 0.2 -100 -150 0.1 -200 0 0 0 F IG . 10 The maps obtained when applying the original MRF algorithm on 1000 TRs. T1 and T2 color scales are in milliseconds, PD in normalized color scale and df color scale in Hz. 22 when compared to the other methods. IV. DISCUSSION IV.A. Relation to previous works Although works that exploit the low rank structure of MRF sequences have been published in the past by others 27–30,32,35–37 and also by us31 , our solution is unique mainly in the combination of convex modelling and the ability to enable a solution with quantitative values that do not exist in the dictionary. Our solution is based on soft-thresholding the singular values44 , which is mathematically justified in Appendix A. Moreover, we compare our algorithm to both CS-based and low-rank based methods for MRF and demonstrate superior results. While BLIP treats the original MRF problem as an ℓ0 optimization problem, FLOR first solves the relaxed problem of (6) and only then uses MF to extract the magnetic parameters. It leads to some beneficial properties such as convergence guarantees, and the ability to use the acceleration step as described in Algorithm 4, which is also novel in MRF reconstruction methods. IV.B. Computational complexity FLOR is divided into two main components: The first recovers the imaging contrasts, and the second extracts the parameter maps from the recovered contrasts. The computational burden of FLOR lies in the low-rank projection step, or specifically, in the SVD calculation. This step does not exist in BLIP nor the original MRF reconstruction. However, there are efficient fast techniques to calculate the SVD53 , required by FLOR. Moreover, unlike BLIP, and other low rank based algorithms such as MBIR-MRF, FLOR does not require the pattern recognition calculation at every iteration. Another time consuming step that exists in all algorithms is the non uniform Fourier transform. By using the acceleration step, FLOR reduces significantly the number of iterations required for convergence and therefore saves computational cost. In addition, while previous implementations of CS-based reconstruction algorithms mainly use the inverse NUFFT (iNUFFT) algorithm, in our retrospective experiemtns we use SPURS49 . Based on our observations, SPURS provides improved image reconstruction with the same computational complexity compared to iNUFFT. 23 BLIP with 32 coils MBIR MRF with 32 coils 3000 3000 3000 2500 2500 2500 2000 2000 2000 1500 1500 1500 1000 1000 1000 500 500 500 0 0 0 300 300 300 250 250 250 200 200 200 150 150 150 100 100 100 50 50 50 0 0 0 1 1 1 0.9 0.9 0.9 0.8 0.8 0.8 0.7 0.7 0.7 0.6 0.6 0.6 0.5 0.5 0.5 0.4 0.4 0.4 0.3 0.3 0.3 0.2 0.2 0.2 0.1 0.1 0.1 0 0 0 T1 Reconstruction T2 Reconstruction PD Reconstruction df Reconstruction FLOR with 32 coils 200 200 200 150 150 150 100 100 100 50 50 50 0 0 -50 -50 -100 -100 -150 -150 -200 0 -50 -100 -150 -200 -200 -250 -250 F IG . 11 Comparison between BLIP, MBIR-MRF and FLOR reconstructions with data acquired out of 32 coils and 400 TRs. T1 and T2 color scales are in milliseconds, PD in normalized color scale and df color scale in Hz 24 T2 Reconstruction BLIP T2 with 32 coils MBIR MRF with 32 coils T2 FLOR with 32 coils T2 2000 2000 2000 1500 1500 1500 1000 1000 1000 500 500 500 F IG . 12 Comparison between T2 map reconstructions of BLIP, MBIR-MRF and FLOR with sequence length of 400 TRs. T2 color scales are above 500 milliseconds. It can be seen that FLOR provides T2 values for CSF that better match the literature values in this case. V. CONCLUSIONS We presented FLOR, a method for high quality reconstruction of quantitative MRI data using MRF, by utilizing the low-rank property of MRF data. Due to the fact that we exploit low-rank on top of the well known sparsity of MRF in the dictionary matching domain, we are able to obtain high quality reconstruction from highly under-sampled data. Our method is based on a convex minimization problem, leading to a solution in the dictionary subspace that overcomes its quantization error. We provide results that are comparable to fully sampled MRF, using only 5% of the data in a simulation environment. In addition, comparison against CS-based and low-rank based methods for MRF shows the added value of our approach in generating quantitative maps with less artifacts. Our results also consist of real-data, in-vivo experiments that exhibit FLOR superiority also for realistic multi-coil data acquisition. Future work will examine more sophisticated patch wise recoveries. ACKNOWLEDGEMENTS The authors wish to thank the Tel Aviv center for brain functions at Tel Aviv Sourasky Medical Center for providing the data required for experiment 1. We also wish to thank Dan Ma and Prof. Mark Griswold for providing the real data used in their experiments. This work was supported by the Ministry of Science, by the ISF I-CORE joint research center of the Technion and the Weizmann Institute, and by the European Union’s Horizon 2020 research and innovation programme 25 under grant agreement No. 646804-ERC-COG-BNYQ, Assaf Tal acknowledges the support of the Monroy-Marks Career Development Fund, the Carolito Stiftung Fund, the Leona M. and Harry B. Helmsley Charitable Trust and the historic generosity of the Harold Perlman Family. The authors have no relevant conflicts of interest to disclose. Appendix A The basic implementation of FLOR, as described in Algorithm 4 in the paper, aims to solve the following optimization problem: 1 argmin Σ kY:,i − Fu {X:,i}k22 + λ||X||∗ X∈D 2 i (A1) where Fu is the partial Fourier transform operator, X has dimensions N 2 × L and D = {X : N (X) ⊇ N (D)}. FLOR solves (A1) using the incremental proximal method45, which treats problems of the form: argmin {Σm i Fi (X)} (A2) X∈D where Fi (X) = fi (X) + hi (X). The function fi (X) is convex and non-differentiable, hi (X) is a convex function and D is a non-empty, closed, and convex subspace. The general step in solving (A2) is given by [27, (4.12)-(4.13)]: Zk = PD(Xk − µk gik ) Xk+1 = argmin fik (X) + X∈D (A3a) 1 kX − Zk k2F 2µk (A3b) where gik ∈ ∂hik (Xk ), µk is a positive step size, and PD is the projection operator onto D defined as 26 PD(X) = argminkZ − Xk2F . (A4) Z∈D The optimization problem, defined in the update step of Xk+1, is referred to as the proximal gradient calculation of the non-differentiable fik , under the constraint X ∈ D. Our problem in (A1) corresponds to m = 1 in (A2) and 1 1 h(X) = Σ kY:,i − Fu {X:,i }k22 = kY − Fu {X}k2F 2i 2 (A5) f (X) = λkXk∗. Therefore, ∂h(X) = FuH {Y − Fu {X}}, (A6) and, PD(X) = XD† D = XP. (A7) The solution of (A3b) for f (X) = λkXk∗ without the constraint X ∈ D, is the singular value soft-thresholding operator (SVT)44 defined as: SVTµk λ (Zk ) = Ur [Σr − µk λI]+ VrH . (A8) Here Σr is a diagonal matrix with the non-zero singular values of Zk on its diagonal, Ur and Vr are the r left and right singular vectors of the SVD of Zk , associated with the r non-zero singular values, and [x]+ = max(0, x). In our case, since Zk ∈ D (as follows from (A3a)) and the SVT calculation keeps the operand in the same subspace, the constraint X ∈ D can be omitted. Therefore, (A3b) reduces to Xk+1 = Ur [Σr − µk λI]+ VrH . (A9) Combining (A6), (A9) and (A7), the incremental subgradient-proximal method for solving 27 (A1) consists of two updates in each iteration: Zk = (Xk − µk FuH {Y − Fu {Xk }})P (A10a) Xk+1 = Ur [Σr − µk λI]+ VrH . (A10b) This constitutes the core of Algorithms 4. In our framework, the step sizes are set to constant, µk = µ, and λ is chosen experimentally. REFERENCES 1 Philipp Ehses, Nicole Seiberlich, Dan Ma, Felix A Breuer, Peter M Jakob, Mark A Griswold, and Vikas Gulani. IR TrueFISP with a golden-ratio-based radial readout: Fast quantification of T1, T2, and proton density. Magnetic resonance in medicine, 69(1):71–81, 2013. 2 Fabio Baselice, Giampaolo Ferraioli, and Vito Pascazio. A bayesian approach for relaxation times estimation in MRI. Magnetic resonance imaging, 34(3):312–325, 2016. 3 A Antonini, KL Leenders, D Meier, WH Oertel, P Boesiger, and M Anliker. T2 relaxation time in patients with parkinson’s disease. Neurology, 43(4):697–697, 1993. 4 Fabio Baselice, Giampaolo Ferraioli, Alessandro Grassia, and Vito Pascazio. Optimal configuration for relaxation times estimation in complex spin echo imaging. Sensors, 14(2):2182–2198, 2014. 5 Andreana P Haley, Jack Knight-Scott, Kathleen L Fuchs, Virginia I Simnad, and Carol A Manning. Shortening of hippocampal spin-spin relaxation time in probable alzheimer’s disease: a 1 h magnetic resonance spectroscopy study. Neuroscience letters, 362(3):167–170, 2004. 6 SV Mariappan, S Subramanian, N Chandrakumar, KR Rajalakshmi, and SS Sukumaran. Proton relaxation times in cancer diagnosis. Magnetic resonance in medicine, 8(2):119–128, 1988. 7 Joseph R Roebuck, Steven J Haker, Dimitris Mitsouras, Frank J Rybicki, Clare M Tempany, and Robert V Mulkern. Carr-purcell-meiboom-gill imaging of prostate cancer: quantitative T2 values for cancer discrimination. Magnetic resonance imaging, 27(4):497–502, 2009. 8 Juwhan Liu, Antti OK Nieminen, and Jack L Koenig. Calculation of T1, T2, and proton spin density images in nuclear magnetic resonance imaging. Journal of Magnetic Resonance (1969), 85(1):95–110, 1989. 9 John Homer and Martin S Beevers. Driven-equilibrium single-pulse observation of T1 relax28 ation. a reevaluation of a rapid new method for determining nmr spin-lattice relaxation times. Journal of Magnetic Resonance (1969), 63(2):287–297, 1985. 10 HJA Crooijmans, K Scheffler, and O Bieri. Finite RF pulse correction on DESPOT2. Magnetic resonance in medicine, 65(3):858–862, 2011. 11 Peter Schmitt, Mark A Griswold, Peter M Jakob, Markus Kotas, Vikas Gulani, Michael Flentje, and Axel Haase. Inversion recovery TrueFISP: quantification of T1, T2, and spin density. Magnetic resonance in medicine, 51(4):661–667, 2004. 12 Mariya Doneva, Peter Börnert, Holger Eggers, Christian Stehning, Julien Sénégas, and Alfred Mertins. Compressed sensing reconstruction for magnetic resonance parameter mapping. Magnetic Resonance in Medicine, 64(4):1114–1120, 2010. 13 Bo Zhao, Wenmiao Lu, T Kevin Hitchens, Fan Lam, Chien Ho, and Zhi-Pei Liang. Accelerated mr parameter mapping with low-rank and sparsity constraints. Magnetic resonance in medicine, 74(2):489–498, 2015. 14 Frederike H Petzschner, Irene P Ponce, Martin Blaimer, Peter M Jakob, and Felix A Breuer. Fast mr parameter mapping using k-t principal component analysis. Magnetic resonance in medicine, 66(3):706–716, 2011. 15 Chuan Huang, Christian G Graff, Eric W Clarkson, Ali Bilgin, and Maria I Altbach. T2 mapping from highly undersampled data by reconstruction of principal component coefficient maps using compressed sensing. Magnetic resonance in medicine, 67(5):1355–1366, 2012. 16 Julia V Velikina, Andrew L Alexander, and Alexey Samsonov. Accelerating mr parameter mapping using sparsity-promoting regularization in parametric dimension. Magnetic resonance in medicine, 70(5):1263–1273, 2013. 17 Dan Ma, Vikas Gulani, Nicole Seiberlich, Kecheng Liu, Jeffrey L Sunshine, Jeffrey L Duerk, and Mark A Griswold. Magnetic resonance fingerprinting. Nature, 495(7440):187–192, 2013. 18 Jeffrey A Fessler and Bradley P Sutton. Nonuniform fast fourier transforms using min-max interpolation. IEEE Transactions on Signal Processing, 51(2):560–574, 2003. 19 Yun Jiang, Dan Ma, Nicole Seiberlich, Vikas Gulani, and Mark A Griswold. MR fingerprinting using fast imaging with steady state precession (fisp) with spiral readout. Magnetic resonance in medicine, 74(6):1621–1631, 2015. 20 Yonina C Eldar and Gitta Kutyniok. Compressed sensing: theory and applications. Cambridge University Press, 2012. 21 Yonina C Eldar. Sampling Theory: Beyond Bandlimited Systems. Cambridge University Press, 29 2015. 22 Mike Davies, Gilles Puy, Pierre Vandergheynst, and Yves Wiaux. A compressed sensing framework for magnetic resonance fingerprinting. SIAM Journal on Imaging Sciences, 7(4):2623– 2656, 2014. 23 Zhe Wang, Hongsheng Li, Qinwei Zhang, Jing Yuan, and Xiaogang Wang. Magnetic resonance fingerprinting with compressed sensing and distance metric learning. Neurocomputing, 174: 560–570, 2016. 24 Bo Zhao, Kawin Setsompop, Huihui Ye, Stephen F Cauley, and Lawrence L Wald. Maximum likelihood reconstruction for magnetic resonance fingerprinting. IEEE transactions on medical imaging, 35(8):1812–1823, 2016. 25 Li Feng, Monvadi B Srichai, Ruth P Lim, Alexis Harrison, Wilson King, Ganesh Adluru, Edward VR Dibella, Daniel K Sodickson, Ricardo Otazo, and Daniel Kim. Highly accelerated real-time cardiac cine MRI using k–t sparse-sense. Magnetic resonance in medicine, 70(1): 64–74, 2013. 26 Mark Chiew, Stephen M Smith, Peter J Koopmans, Nadine N Graedel, Thomas Blumensath, and Karla L Miller. k-t faster: Acceleration of functional MRI data acquisition using low rank constraints. Magnetic resonance in medicine, 74(2):353–364, 2015. 27 Debra F McGivney, Eric Pierre, Dan Ma, Yun Jiang, Haris Saybasili, Vikas Gulani, and Mark A Griswold. Svd compression for magnetic resonance fingerprinting in the time domain. IEEE transactions on medical imaging, 33(12):2311–2322, 2014. 28 Christopher C. Cline, Xiao Chen, Boris Mailhe, Qiu Wang, and Mariappan Nadar. Model-based iterative reconstruction for magnetic resonance fingerprinting. In Proceedings of the International Society of Magnetic Resonance in Medicine (ISMRM), page 434, 2016. 29 Bo Zhao. Model-based iterative reconstruction for magnetic resonance fingerprinting. In Image Processing (ICIP), 2015 IEEE International Conference on, pages 3392–3396. IEEE, 2015. 30 Bo Zhao, Kawin Setsompop, Borjan Gagoski, Huihui Ye, Elfar Adalsteinsson, P. Ellen Grant, and Larry L. Wald. A model-based approach to accelerated magnetic resonance fingerprinting time series reconstruction. In Proceedings of the International Society of Magnetic Resonance in Medicine (ISMRM), page 871, 2016. 31 Gal Mazor, Lior Weizman, Yonina C. Eldar, and Assaf Tal. Low rank magnetic resonance fingerprinting. In Proceedings of the 38th international conference of the IEEE Engineering in Medicine and Biology (EMBC), pages 439–442. IEEE, 2016. 30 32 Congyu Liao, Xiaozhi Cao Cao, Huihui Ye, Ying Chen, Hongjian He, Song Chen, Qiuping Ding, Liu Hui, and Jianhui Zhong. Acceleration of mr fingerprinting with low rank and sparsity constraint. In Proceedings of the International Society of Magnetic Resonance in Medicine (ISMRM), page 4227, 2016. 33 Emmanuel J Candès, Xiaodong Li, Yi Ma, and John Wright. Robust principal component analysis? Journal of the ACM (JACM), 58(3):11, 2011. 34 Mariya Doneva, Thomas Amthor, Peter Koken, Karsten Sommer, and Peter Börnert. Low-rank matrix completion-based reconstruction for undersampled magnetic resonance fingerprinting. 35 Mariya Doneva, Thomas Amthor, Peter Koken, Karsten Sommer, and Peter Börnert. Matrix completion-based reconstruction for undersampled magnetic resonance fingerprinting data. Magnetic Resonance Imaging, 2017. 36 Bo Zhao, Kawin Setsompop, Elfar Adalsteinsson, Borjan Gagoski, Huihui Ye, Dan Ma, Yun Jiang, P Ellen Grant, Mark A Griswold, and Lawrence L Wald. Improved magnetic resonance fingerprinting reconstruction with low-rank and subspace modeling. Magnetic Resonance in Medicine, 2017. 37 Jakob Assländer, Martijn A Cloos, Florian Knoll, Daniel K Sodickson, Jürgen Hennig, and Riccardo Lattanzi. Low rank alternating direction method of multipliers reconstruction for mr fingerprinting. Magnetic Resonance in Medicine, 2017. 38 Angelia Nedic and Dimitri P Bertsekas. Incremental subgradient methods for nondifferentiable optimization. SIAM Journal on Optimization, 12(1):109–138, 2001. 39 Michael Lustig, David L Donoho, Juan M Santos, and John M Pauly. Compressed sensing MRI. Signal Processing Magazine, IEEE, 25(2):72–82, 2008. 40 Lior Weizman, Yonina C Eldar, and Dafna Ben Bashat. Compressed sensing for longitudinal MRI: An adaptive-weighted approach. Medical physics, 42(9):5195–5208, 2015. 41 Lior Weizman, Yonina C Eldar, and Dafna Ben Bashat. Reference-based MRI. Medical Physics, 43(10):5357–5369, 2016. 42 Sean CL Deoni, Terry M Peters, and Brian K Rutt. High-resolution T1 and T2 mapping of the brain in a clinically acceptable time with DESPOT1 and DESPOT2. Magnetic resonance in medicine, 53:237–241, 2005. 43 Stephen Boyd, Neal Parikh, Eric Chu, Borja Peleato, and Jonathan Eckstein. Distributed optimization and statistical learning via the alternating direction method of multipliers. Foundations and Trends® in Machine Learning, 3(1):1–122, 2011. 31 44 Jian-Feng Cai, Emmanuel J Candès, and Zuowei Shen. A singular value thresholding algorithm for matrix completion. SIAM Journal on Optimization, 20(4):1956–1982, 2010. 45 Suvrit Sra, Sebastian Nowozin, and Stephen J Wright. Optimization for machine learning. MIT Press, 2012. 46 Yurii Nesterov. A method of solving a convex programming problem with convergence rate o (1/k2). In Soviet Mathematics Doklady, volume 27, pages 372–376, 1983. 47 Amir Beck and Marc Teboulle. A fast iterative shrinkage-thresholding algorithm for linear inverse problems. SIAM journal on imaging sciences, 2(1):183–202, 2009. 48 Daniel P Palomar and Yonina C Eldar. Convex optimization in signal processing and communications. Cambridge university press, 2010. 49 Amir Kiperwas, Daniel Rosenfeld, and Yonina C Eldar. The spurs algorithm for resampling an irregularly sampled signal onto a cartesian grid. arXiv preprint arXiv:1603.04726, 2016. 50 Gilad Liberman, Yoram Louzoun, and Dafna Ben Bashat. T1 mapping using variable flip angle spgr data with flip angle correction. Journal of Magnetic Resonance Imaging, 40(1):171–180, 2014. 51 Josef Vymazal, Andrea Righini, Rodney A Brooks, Margherita Canesi, Claudio Mariani, Marco Leonardi, and Gianni Pezzoli. T1 and T2 in the brain of healthy subjects, patients with parkinson disease, and patients with multiple system atrophy: relation to iron content 1. Radiology, 211 (2):489–495, 1999. 52 Jin Hyung Lee, Brian A Hargreaves, Bob S Hu, and Dwight G Nishimura. Fast 3D imaging using variable-density spiral trajectories with applications to limb perfusion. Magnetic resonance in medicine, 50(6):1276–1285, 2003. 53 Zlatko Drmac and KREŠIMIR Veselic. New fast and accurate jacobi SVD algorithm: I. lapack working note 169, 2005. 32
7cs.IT
SafeGuardPF: Safety Guaranteed Reactive Potential Fields for Mobile Robots in Unknown and Dynamic Environments* arXiv:1609.07006v1 [cs.RO] 22 Sep 2016 Rafael Rodrigues da Silva1,2 , Samuel Silva1,2 , Grigoriy Dubrovskiy1 and Hai Lin1 Abstract— An autonomous navigation with proven collision avoidance in unknown and dynamic environments is still a challenge, particularly when there are moving obstacles. A popular approach to collision avoidance in the face of moving obstacles is based on model predictive algorithms, which, however, may be computationally expensive. Hence, we adopt a reactive potential field approach here. At every cycle, the proposed approach requires only current robot states relative to the closest obstacle point to find the potential field in the current position; thus, it is more computationally efficient and more suitable to scale up for multiple agent scenarios. Our main contribution here is to write the reactive potential field based motion controller as a hybrid automaton, and then formally verify its safety using differential dynamic logic. In particular, we can guarantee a passive safety property, which means that collisions cannot occur if the robot is to blame, namely a collision can occur only if the robot is at rest. The proposed controller and verification results are demonstrated via simulations and implementation on a Pioneer P3-AT robot. I. I NTRODUCTION The autonomous navigation of mobile robots in unknown environments is a complex task that still has much room for improvement. To be autonomous, a robot must be able to interpret what is being read of the environment and associate with its previous knowledge of the place to take actions towards the goal in an effective manner [11]. Furthermore, the robotic motion planning in unknown and dynamic environments can be applied to several areas, such as: intelligent vehicles on highways, air and sea traffic control, automated assembly and animation [24]. Existing motion planning approaches can be roughly divided into two categories: global path planning and local path planning [21]. A global path planning, such as symbolic motion planning[14], is usually based on a discretization of the working-space with an assumption of a static and known environments. On the other hand, a local path planner relies on local sensing and reaction to avoid collisions in possibly unknown environments. Typical examples include the potential field based navigation [10], dynamic window approaches [26], and sampling-based approaches [21]. Although these existing local path planning methods are widely applied and effective to handle uncertain and dynamic *The financial supports from NSF-CNS-1239222, NSF-CNS-1446288 and NSF- EECS-1253488 for this work are greatly acknowledged. 1 All authors are with Department of Electrical Engineering, University of Notre Dame, Notre Dame, IN 46556, USA.([email protected]; [email protected]; [email protected]; [email protected]) 2 The first and second authors would like to appreciate the scholarship support by CAPES/BR, BEX 13242/13-0 environments, they often lack formal safety guarantees. However, in many safety critical applications, such as the neutralization of mass destruction weapons or clean-up in a nuclear power plant meltdown, guaranteed safety cannot be overemphasized. Motivated by this gap, recent years have seen an increase of research activities on introducing formal methods into robotic motion planning. For example, the PASSVOID [3] computes an online verification algorithm which searches for safe controls that lead a mobile robot to avoid braking inevitable collision states (ICS). A braking ICS is a variant of the concept of ICS (inevitable collision states) [8] in which are considered the braking trajectories and the collision will not occur in the future when the vehicle is not at rest. The approach proposed by [1], [2] and [12] require the computation of a set of reachable trajectories. In [1], the authors proposed a probabilistic approach to rank these trajectories. In [2] and [12], the authors considered nonlinear controllers and bounded disturbances. These methods require searching for safe trajectories online, and hence can be computationally expensive. Differently, in [18] and [19], the authors presented an offline verification in differential dynamic logic dL [20] to guarantee a passive or passive friendly safety of motion planning for ground vehicles. A passive or passive friendly safety property is a specification for motion planning which considers that ICS-free maneuvers cannot be guaranteed because of the limited sensors range and elusive nature of the future [15]. Thus, the proposed verification considered two safety properties: passive safety, in which it was assumed to know only the maximum velocity of the moving obstacles; and passive friendly safety, in which was also assumed to know the obstacle braking power and delay to start braking. Although the offline verification allows avoiding online computation of the safe trajectories, it was applied for a Dynamic Window Approach (DWA) algorithm, which requires finding an optimized trajectory towards a goal position, and it can also be computationally costly. In this paper, we propose to adopt the reactive potential field approach for mobile robots. Artificial Potential Fields were first proposed in [13], where the obstacles were interpreted as repulsion fields and the goal as an attraction field, and the path was generated by following the optimal trajectory along the intersection of all fields in the environment. Artificial Potential Fields have been widely adopted in robotic motion planning, see e.g. [25], [5], [16] and the references therein. Our main goal is to formally prove that motion planning based on artificial potential fields is passive safe. Technically, we first model the controller based on potential fields as a hybrid automaton, and then use differential dynamic logic to formally verify the safety of controlled robotic motion dynamics. Its passive safety is achieved by leveraging results from [14,15] that give a constraint to the state variable that ensures the passive safety. In fact, we find the maximum safe velocity with this constraint. Thus, the potential fields are designed such that the robot heading points towards maximize this velocity while pointing towards the destination. The proposed approach was implemented on a Pioneer P3-AT robot, and simulation and experimental results are presented. Since this approach guarantees a safety property for moving obstacles, we call it SafeGuardPF (Safety Guaranteed reactive Potential Field). In summary, the contribution of this work is to propose a safety guaranteed reactive potential field for moving obstacles. This potential field approach is formally proven to ensure a passive safety while being computationally efficient which, to the best of our knowledge, has not been attempted before: • Unlike [6], [23] and [26], where the motion plan is formally verified for static obstacles, in our approach, the safety is ensured for moving obstacles. • Unlike [27] and [28], where potential field approaches were presented without safety verification, in our approach, the safety is formally proved. • Unlike [9], where a potential field approach for moving obstacles is proposed, the SafeGuardPF does not require full knowledge of those obstacles dynamics but only the maximum velocity. Further, the approach presented in this work is reactive, meaning that it takes into account the current sensor readings every control cycle. Thus, it is robust to a partially unknown and dynamic environment. • Unlike the approaches based on a verification presented in [3], [1], [2] and [12], where uses an online verification, in this approach, the state constraints that ensures the safety property is designed and verified offline. Thus, less online computation is required to guarantee the safety. • Unlike [18] and [19], which implement a formally proven DWA approach for moving obstacles, the potential field approach proposed here does not require online numerical optimization algorithms. Thus, it can be more computationally efficient. The rest of the paper is organized as follows. Section II presents background information on potential fields. Section III presents the scenario and problem formulation of this work. Section IV describes in details the proposed potential field approach. Simulation and experimental results are presented in Section V. Finally, Section VI concludes the paper. II. P RELIMINARIES A. Potential Fields As originally proposed in [13], the philosophy of the Artificial Potential Fields (APF) can be schematically described for mobile robot navigation as the agent moving in a field of forces where the position to be reached is an attractive pole and the obstacles are repulsive surfaces for the robot. In general, the field is a composition of this two fields ~tot = U ~att + U ~rep . U (1) Each field function can be defined in order to favor the movement of robots according to their own physical limitations or environmental limitations. Even though there are several modifications from the original potential functions proposed on [13], they all have some common parameters like Krep , Katt and p0 that define the variation of the field as well as its influence radius. In order to obtain the expression for the virtual force to which the agent is subject along the trajectory, the gradient of each field can be used, as seen in Equations (2) and (3) as below: ~att = −∇U ~att F ~rep = −∇U ~rep . ,F (2) (3) The attraction field should generate a vector field point towards the target in a manner that the further the agent is from the target, the bigger the attraction force. It was first proposed in [13] that the attraction field can be described as in Equation (4). ~att = 1/2 ∗ Katt ∗ (~urob − ~ugoal ), U (4) where Katt is the attraction gain, responsible for adjusting the intensity of the field, and the difference of the vectors ~urob and ~ugoal represents the distance between the robot and its goal. On the other hand, the repulsive field should generate forces that would push the robot to the opposite direction. In general each obstacle has an radius of influence and the field increases its repulsion intensity as decreases the distance between the obstacle and the robot. One of the most common repulsion field functions is shown below: ( 1 2 1 ~rep = 1/2 ∗ η ∗ ( ρ − ρ0 ) , if ρ ≤ ρ0 . (5) U 0, otherwise, where η is the repulsive gain, ρ is the shortest distance between the obstacle and the agent, and ρ0 is the limit distance that defines the influence range of the obstacle. Some methods have been proposed to obtain the coefficients of these equations, but as mentioned in [22], some artificial potential field methods have been extended to moving obstacles, though without rigorous justification. So there is no guarantee that they will always generate a safe trajectory. III. S YSTEM M ODEL AND P ROBLEM F ORMULATION This work considers a mobile ground robot whose workspace is unknown and dynamic, and the obstacles can be moving up to a known maximum velocity V . This robot can realize forward circular trajectories defined by translational v : v ≥ 0 and angular velocities ω that are controlled by a regulator. The translational acceleration a and the angular velocity are assumed to be bounded with known bounds (i.e. −b ≤ a ≤ A : b > 0 ∧ A ≥ 0 and −Ω ≤ ω ≤ Ω : Ω ≥ 0). This regulator changes its actuators signals cyclically with a non-deterministic period with known maximum value . Therefore, every control cycle, a pair of translational and angular velocity hv ∗ , ω ∗ i defines the mobile robot trajectory to be realized for a short range time . Several types of vehicles can realize this trajectory, such as differential drive, Ackermann drive, single wheel drive, synchro drive, or omni drive vehicles [4]. It is also assumed that the robot has a sensor to measure its relative distance to the obstacles in its environment. Since potential field approaches can lead to local minima for a certain configuration of obstacles and destinations, it is assumed to have a supervisory that provides a set of waypoints that describes a deadlock free trajectory to the destination. This trajectory can be found, for example, by using a SLAM (Simultaneous Localization And Mapping) system with an A∗ algorithm [7]. Furthermore, the distance measured with this sensor is adjusted to consider the robot shape and kinematics as presented in [17]. The system model abstracts the robot as a punctual and omnidirectional vehicle because we assume that the measured distance to an obstacle is adjusted to the robot shape and kinematics. Thus, the differential equations that model the robot trajectory are: x0 = v · cos θ, y 0 = v · cos θ, v 0 = a, θ0 = ω, ω 0 = rac , where x and y is the the two dimensional position of the robot, θ is the robot heading angle, rc is the circular trajectory radius such as rc = ωv0∗ and v0 is initial translational velocity. Now, we can formulate our problem as follows. Problem 1. Given the maximum acceleration A ≥ 0, deceleration b > 0, angular velocity Ω ≥ 0 and controller cycle time  > 0, find a trajectory defined by a pair of translational and angular velocity hv ∗ , ω ∗ i that optimizes the robot translational velocity towards a goal waypoint and ensures the passive safety. A. Verification In [18] and [19] the authors verified a hybrid control system modeled as a dL hybrid program in Model 2 [19], which abstracts a motion planning that ensures the passive safety. The transition system that represents this control system is shown in Fig. 1, where the Drive mode allows the regulator to take any transnational acceleration a in its domain (i.e. −b ≤ a ≤ A) and the robot must brake (i.e. a = −b) in the Brake mode. The initial constraint φps is that the robot start at rest (i.e. φps ≡ v = 0). The safe constraint saf e that ensures the passive safety ψps after any finite nondeterministic executions of the control system. ψps ≡v = 6 0→d>0 (6)    2 d v v A A 2 +V + +1  + (v + V ) , saf e ≡ √ > 2b b b 2 2 (7) where d is the euclidean distance to the closest obstacle point. saf e φps ∧ saf e φps Drive Brake saf e Fig. 1. Transition system that represents the hybrid control system verified in [18], [19]. Fig. 2. Translational and Rotational Behaviors. IV. C ERTIFIED R EACTIVE P OTENTIAL F IELD The main contribution of the current work is to provide a reactive potential field approach SafeGuardPF for mobile robots to avoid moving obstacles, which is formally verified to be passively safe. Formal guarantee is obtained ensuring that the robot controls are constrained by the hybrid control system presented in the Fig. 1. This control system was proved to guarantee the passive safety property in [18], [19]. The SafeGuardPF approach itself consists of two independently calculated components: Translational and Rotational Behaviors (see Fig. 2, where vi represent translational velocities and ωi represent rotational speed). Intuitively speaking, this logic is similar to the logic of a car driver: increase/decrease speed and rotation of the wheel. Translational Behavior is responsible for maximizing translational velocity while keeping it not beyond the value, for which the equation (7) holds. This equation gives an upper bound for safe distance to a moving obstacle with a maximum velocity equal to V . If we solve this equation for the translational velocity, we find the maximum safe translational velocity vmax . Proposition 1. The maximum velocity that the robot can assign any value to acceleration a such that −b ≤ a ≤ A is, r v < vmax = b  A  V2 √ d + 1 2 + 2 + 2 −V − +1 b b b b b (8) A Proof. First, the Equation (7) is rearranged as follows,  A  v A d v2 √ > +V + +1 2 + (v + V ) 2b b b 2 2  A  A  v2  V A d ⇒ + + + v+ +1 2 + V − √ 2b b b b 2 2 < 0. Let α, β and γ be the coefficients of a quadratic equation, thus, 1 α= 2b A  V β= + +1  b b A  A  d γ= +1 2 + V − √ b 2 2 ⇒αvl2 + βvl + γ < 0 Since α > 0, β > 0 and v ≥ 0, √ −β− ∆ 2α < 0 and, √ −β + ∆ 0≤v< , 2α such that, ∆ =β 2 − 4αγ V 2  A  A 1 h A d i = + + −4 +1 2 + V − √ b b 2b b 2 2 A  V  A2  V2 A = 2 +2 +1  + + 2 + 1 2 b b b b2 b  A2 A  V √ d A 2 − +  −2 +1  + 2 2 b b b b b A  V2 √ d 2 = +1  + 2 + 2 b b b Therefore, r  A  A V2 √ d 0≤v<b + 1 2 + 2 + 2 − V − + 1 b. b b b b This equation is a function of the robot’s upper bound on speed and relative position to the closest obstacle. Intuitively speaking, translational speed should be not greater than the bound for being able to come to a complete stop before the collision in the worst case scenario (if the closest obstacle would be approaching towards the controlled robot with a speed V). Proposition 2. The desired translational velocity v ∗ which assigns the maximum safe desired velocity is, ( vmax − δ + A, if saf e holds true, ∗ v = (9) 0, otherwise, where δ is a precision constant. Proof. From Model 2 [19], if a translational velocity v satisfies the condition saf e for a given position and parameters, then the acceleration can be any value between −b and A. Thus, if saf e holds true, the robot is allowed to accelerate up to A, and the desired velocity is the maximum safe velocity for the next control cycle which is vmax − δ + A. The precision constant δ is added to address the strict bound on the safe velocity. Otherwise, the robot must brake, and the desired velocity is zero. Meanwhile, Rotational Behavior is responsible for heading towards the destination, while avoiding obstacles. The force towards the destination is called attraction force and its ~att , which is calcuresulting field is the attraction field F lated based on the angle β towards the goal and attraction coefficient Katt . ~att =Katt ~urob − ~ugoal = Katt · ~uatt (10) F k ~urob − ~ugoal k ~uatt =hcos β, sin βi (11) β =∠(~urob − ~ugoal ), (12) where ~urob and ~ugoal are vectors representing the robot and destination position, respectively. This force is constant, meaning that the robot will turn towards the object with the same velocity independent of how far it is to the destination. The maximum translational velocity is proportional to vmax , and this velocity is an increasing function of distance to the closest obstacle point. Thus, it is possible to maximize the translational velocity if the desired angular velocity ω ∗ points towards the gradient of the maximum safe velocity, i.e. 5vmax . Hence, it is defined a force that maximizes the translational velocity and, consequently, avoids the obstacles ~rep . This field is calculated which is called repulsion field F based on the distance d and angle α to the closest obstacle and the parameter repulsion coefficient Krep . The Fig. 3 illustrates this repulsion field for a square obstacle and a mass point robot. Proposition 3. The potential field which drives the robot to the maximum safe velocity vmax is ~rep =Krep ∂vmax ~uobs , F (13) ∂d ~uobs =hcos α, sin αi. (14) Such that, ∂vmax = r ∂d A b 1  + 1 2 + V2 b2 + √ , (15) 2 db where xo and yo are the 2-dimensional position of the closest (max) obstacle point and maximum gradient 5vmax is a parameter that defines the maximum value that the gradient 5vmax can take. Proof. The repulsion field is proportional to the gradient of maximum safe distance vmax such that, ~rep =Krep 5 vmax F ∂vmax ∂vmax , i ∂x ∂y x − xo y − yo 1 = r h , i  √ d d A d 2 + V2 + + 1  2 2 b b b =h that,   ~ ~  |F| θ − ∠F ω ∗ = −Ω   Ω −Ω ≤ ω ∗ ≤ Ω ω ∗ < −Ω ω ∗ > Ω. (17) In summary, the SafeGuardPF approach finds a pair of desired translational and angular velocities hv ∗ , ω ∗ i which depends only on current robot states, i.e. speed and relative distance to the closest obstacle point. Furthermore, the desired translational velocity v ∗ ensures that the robot will not collide to any obstacle moving up to velocity V , or it will be at rest. Therefore, this algorithm is efficient, scalable and proven safe. V. S IMULATION AND E XPERIMENTAL R ESULTS Fig. 3. Repulsion field for a squared moving obstacle (V=0.75m/s). This force was sampled for positions in the range h[−10, 10], [−10, 10]i considering the following parameters: v = 1m/s, A = b = 0.3m/s2 , (max)  = 0.1s, Krep = 1 and 5vmax = 1. Fig. 4. Potential field for a squared moving obstacle (V=0.75m/s) for an attraction field towards the position h0, 5i. This force was sampled for positions in the range h[−10, 10], [−10, 10]i considering the following parameters: v = 1m/s, A = b = 0.3m/s2 ,  = 0.1s, Krep = 1 and Katt = 0.25. However, x − xo d y − yo sin α = d = hcos α, sin αi, cos α = Since ~uobs ~rep =Krep ∂vmax ~uobs F ∂d Finally, the sum of those two fields will define the desired heading that is used to calculate the desired angular velocity. ~ =F ~att + F ~rep F (16) ~ for a moving obstacle. The Fig. 4 shows a potential F Finally, the desired angular velocity ω ∗ is calculated based ~ such on the actual robot heading θ and the potential field F The mobile robots used in simulation and experiments are Pioneer P3-AT robots1 , which has a development kit called the Pioneer SDK2 . The SafeGuardPF was implemented in a custom C++ application using the libraries ARIA3 and ARNL4 . The ARIA library brings an interface to control and to receive data from MobileSim5 accessible via a TCP port and is the foundation for all other software libraries in the SDK such as the ARNL. The MobileSim permits to simulate all current and legacy models of MobileRobots/ActivMedia mobile robots including the Pioneer 3 AT. The ARNL Navigation library6 provides a MobileRobots’ proprietary navigation technology that is reliable, high quality and highly configurable and implements an intelligent localization capabilities to the robot. Different localization methods are available for different sensors such as LIDAR, Sonar and GPS. Finally, a Pioneer SDK implementation can be controlled by the MobileEye7 , which is a graphical interface that can send commands and read data from ARIA and ARNL to show the sensor readings and trajectories. Therefore, each controller is implemented in a C++ custom application that is connected via a TCP/IP port to a MobileEye application and runs on Linux Computers. The simulation testbed consists of a MobileSim which simulates each robot dynamics and also runs on Linux Computers, where each robot controller connects via a TCP port. In experimental results, the MobileSim is substituted by an actual robot. The Fig. 5 illustrate graphically the SafeGuardPF implementation used in the simulations and experiments. The simulated and real robots were equipped with laser sensor SICK LMS-500. This sensor was used to detect obstacles and for indoor localization. The Pioneer P3-AT robots 1 http://www.mobilerobots.com/ResearchRobots/P3AT.aspx, retrieved 0912-2016. 2 http://www.mobilerobots.com/Software.aspx, retrieved 09-12-2016. 3 http://www.mobilerobots.com/Software/ARIA.aspx, retrieved 09-122016. 4 http://www.mobilerobots.com/Software/NavigationSoftware.aspx, retrieved 05-18-2016. 5 http://www.mobilerobots.com/Software/MobileSim.aspx, retrieved 0912-2016. 6 http://www.mobilerobots.com/Software/NavigationSoftware.aspx, retrieved 09-12-2016. 7 http://www.mobilerobots.com/Software/MobileEyes.aspx, retrieved 0912-2016. Fig. 5. The SafeGuardPF implementation as Behavior-Based Robotics approach using Pioneer SDK development kit. The ARIA and ARNL libraries coordinate the behaviors and connect them to the robot. The MobileEye provides a graphical interface that allows monitoring and sending commands to the robot controller. Fig. 6. Simulation of collision avoidance for 2 Pioneer robots with lasers. shape can be approximated to a circle; thus, the distance to the closest obstacle point is the minimum measured distance minus the robot radius. Example 1 (Simulation with 2 Pioneer robots). In Fig. 6 are shown two Pioneer P3-AT robots (R1 and R2) with lasers, which are heading towards their destinations, while avoiding obstacles (as a demonstration of the implemented SafeGuardPF approach). The origin of the arrow shows the robot’s location, the length of the arrow - value of robot’s speed and arrow’s direction - the direction of the velocity vector. The shape and dimensions (roughly 4.5 by 4.5 meters) of the map duplicate the shape and dimensions of the arena for experimental implementation on real robots. The potential fields coefficients used were Katt = 0.04 and Krep = 0.09. In Fig. 7 on the top is shown the distance to the closest obstacle (from a laser sensor) and on the bottom are shown translational and angular velocities. In this scenario robot 1 had initial position close to a wall (Fig. 6) and its speed was limited because of the presence of a close obstacle (but, in fact, this assumption can be improved, as we treat all obstacles as obstacles which may have a maximum speed V, but in reality walls are usually not moving and as a future work we plan to distinguish movable and non-movable obstacles to be less conservative). As the robot moves and become farther from the wall, it is able to continuously increase its speed until it notices robot 2. As robot 1 approached to robot 2, it had to decrease its speed to prevent the collision by coming to a complete stop even in the worst case scenario (if the second robot will be approaching robot 1 with velocity V). At the same time robot 1 was looking for a better direction to go and decided to turn left. Because this direction was a good choice, the robot 1 was moving away from the robot 2 and as the distance to the closest obstacle was increasing, the robot 1 could increase its velocity and continue its movement towards the destination. Example 2 (Implementation on a real robot). During a demonstration of collision avoidance on a real Pioneer P3-AT robot, the robot had to move towards its destination, while avoiding an unpredictable moving obstacle (represented by a human), as shown in Fig. 8. The coefficients were set as Katt = 0.04 and Krep = 0.12 because in the real experiment the rotational velocity realization was less precise than during the simulation. In this scenario a human was approaching the robot on the right side, almost perpendicular to its movement. As the robot noticed the human, it had to decrease its speed (we can see it as a smaller length of the velocity vector in coordinates around 3000 in X and 1500 in Y in Fig. 8). The robot obeyed the rule that it had to always have enough distance to be able to come to a complete stop, if the human would be approaching the robot directly with velocity V. As the human was passing by, at first the robot decided to turn left (see Fig. 9, around 2 sec), but as the human completely passed by and he was noticed by a laser sensor to be on the left of the robot, the robot decided to turn right. After that the robot continued its path towards its destination. As it was approaching the destination, it noticed that the walls were close and started decreasing its speed to be safe for sure. Then the human was noticed again in the direction of the destination and robot had to greatly decelerate again (see Fig. 9, around 6 sec) and finish its path when the human left the destination. The experiments (in simulation and on real robots) were also done with sonar sensors only, and robots were always able to successfully prevent collisions, but localization precision was less accurate (it affected how close robots approached their destinations). A. Discussion As a practical result from the Section V, we may infer that the proposed approach is provable safe and practically implementable and hence might be used in safety critical environments (for example, in scenarios with human workers in a warehouse or a manufactory). The safety is ensured because the desired translational velocity v ∗ is bounded using the safe constraint presented in Equation (27) in Model 2 [19] which guarantees a passive safety property (see Propositions 1 and 2). Hence, the robot will always keep a speed that Fig. 7. Distance to the closest obstacle; translational and angular velocities of robot 1. Fig. 9. Distance to the closest obstacle; translational and angular velocities of the robot 1 during implementation on a real robot with an unpredictable obstacle (a human). obstacle future kinematics. VI. C ONCLUSION Fig. 8. Demonstration of collision avoidance for a Pioneer with a laser and an unpredictable obstacle (human). allows it to stop before colliding with a moving obstacle. Furthermore, it was not assumed to know intentions of the moving obstacle, but only its maximum velocity V . Thus, it can prevent collisions with obstacles having unpredictable intentions (e.g. human workers), if the maximum speed of the obstacles does not exceed V . Example 2 shows that a real robot crossing with a human could ensure a safe velocity. The proposed method is efficient because it is a reactive control system which safe trajectories were found using an offline verification and the desired trajectory hv ∗ , ω ∗ i does not require a numerical optimization. Furthermore, only the knowledge about the closest obstacle point is required to ensure the safety; thus, it is scalable because the number of agents in the environment does not affect the computation cost. For instance, Example 1 shows two robots with decentralized control systems (identical to each other) whose safe trajectories were found without knowledge of the other robot’s future kinematics. Therefore, at each computation cycle, the control system is able to find short term safe trajectories for a current state using only the current relative distance and its own velocity. This approach is less computationally expensive that an online estimation of the This paper presents an efficient and proven safe reactive potential field approach. The algorithm ensures the proved conditions presented in [18], [19] for ground mobile robots and uses it to find a potential field that leads the robot to maximized translational velocity towards to the destination. Since this potential field is found using only current robot states (i.e. translational velocity v, relative distance d and angle α to the closest obstacle point), it does not require costly computation. Furthermore, the safety is ensured for moving obstacles with maximum translational velocity V without requiring an online model predictive algorithm. Therefore, the SafeGuardPF approach brings a complex predictive behavior using simple and efficient behaviors to ground mobile robots. Moreover, there were presented results for simulated and real robots. Those experiments show the emerging behavior even in complex scenarios such as a robot sharing its workspace with a human. Since these behaviors require only the closest obstacle point to find the desired velocities (i.e. hv ∗ , ω ∗ i), the algorithm is scalable for multi-agent scenarios. R EFERENCES [1] Daniel Althoff, James J Kuffner, Dirk Wollherr, and Martin Buss. Safety assessment of robot trajectories for navigation in uncertain and dynamic environments. Autonomous Robots, 32(3):285–302, 2012. [2] Matthias Althoff and John M Dolan. Online verification of automated road vehicles using reachability analysis. IEEE Transactions on Robotics, 30(4):903–918, 2014. [3] Sara Bouraine, Thierry Fraichard, and Hassen Salhi. Provably safe navigation for mobile robots with limited field-of-views in dynamic environments. Autonomous Robots, 32(3):267–283, 2012. [4] Thomas Bräunl. Embedded robotics: mobile robot design and applications with embedded systems. Springer Science & Business Media, 2008. [5] Akshit Budhraja, Roopak Srivastava, and PM Pradhan. An approach to adaptive swarm surveillance using social potential fields. In 2016 IEEE 6th International Conference on Advanced Computing (IACC), pages 191–196. IEEE, 2016. [6] N Buniyamin, WAJ Wan Ngah, N Sariff, and Z Mohamad. A simple local path planning algorithm for autonomous mobile robots. International journal of systems applications, Engineering & development, 5(2):151–159, 2011. [7] František Duchoň, Andrej Babinec, Martin Kajan, Peter Beňo, Martin Florek, Tomáš Fico, and Ladislav Jurišica. Path planning with modified a star algorithm for a mobile robot. Procedia Engineering, 96:59–69, 2014. [8] Thierry Fraichard and Hajime Asama. Inevitable collision statesa step towards safer robots? Advanced Robotics, 18(10):1001–1024, 2004. [9] Shuzhi S. Ge and Yun J Cui. Dynamic motion planning for mobile robots using potential field method. Autonomous Robots, 13(3):207– 222, 2002. [10] Shuzhi Sam Ge and Yan Juan Cui. New potential functions for mobile robot path planning. IEEE Transactions on robotics and automation, 16(5):615–620, 2000. [11] M Hamani and A Hassam. Mobile robot navigation in unknown environment using improved apf method. In the 13th international conference in unknown environment using improved APF method, pages 0875–1812, 2012. [12] Daniel Heß, Matthias Althoff, and Thomas Sattel. Formal verification of maneuver automata for parameterized motion primitives. In 2014 IEEE/RSJ International Conference on Intelligent Robots and Systems, pages 1474–1481. IEEE, 2014. [13] Oussama Khatib. Real-time obstacle avoidance for manipulators and mobile robots. The international journal of robotics research, 5(1):90– 98, 1986. [14] Hai Lin. Mission accomplished: An introduction to formal methods in mobile robot motion planning and control. Unmanned Systems, 2(02):201–216, 2014. [15] Kristijan Macek, Dizan Alejandro Vasquez Govea, Thierry Fraichard, and Roland Siegwart. Towards safe vehicle navigation in dynamic urban scenarios. Automatika, 2009. [16] Fethi Matoui, Boumedyen Boussaid, and Mohamed Naceur Abdelkrim. Local minimum solution for the potential field method in multiple robot motion planning task. In 2015 16th International Conference on Sciences and Techniques of Automatic Control and Computer Engineering (STA), pages 452–457. IEEE, 2015. [17] Javier Minguez, Luis Montano, and José Santos-Victor. Abstracting vehicle shape and kinematic constraints from obstacle avoidance methods. Autonomous Robots, 20(1):43–59, 2006. [18] Stefan Mitsch, Khalil Ghorbal, and André Platzer. On provably safe obstacle avoidance for autonomous robotic ground vehicles. In Robotics: Science and Systems, 2013. [19] Stefan Mitsch, Khalil Ghorbal, David Vogelbacher, and André Platzer. Formal verification of obstacle avoidance and navigation of ground robots. arXiv preprint arXiv:1605.00604, 2016. [20] André Platzer. Logical analysis of hybrid systems: proving theorems for complex dynamics. Springer Science & Business Media, 2010. [21] P Raja and S Pugazhenthi. Optimal path planning of mobile robots: A review. International Journal of Physical Sciences, 7(9):1314–1320, 2012. [22] Andrey V Savkin, Alexey S Matveev, Michael Hoy, and Chao Wang. Safe Robot Navigation Among Moving and Steady Obstacles. Butterworth-Heinemann, 2015. [23] Miloš Šeda. Roadmap methods vs. cell decomposition in robot motion planning. In Proceedings of the 6th WSEAS International Conference on Signal Processing, Robotics and Automation, pages 127–132. World Scientific and Engineering Academy and Society (WSEAS), 2007. [24] Zvi Shiller, Frederic Large, and Sepanta Sekhavat. Motion planning in dynamic environments: Obstacles moving along arbitrary trajectories. In Robotics and Automation, 2001. Proceedings 2001 ICRA. IEEE International Conference on, volume 4, pages 3716–3721. IEEE, 2001. [25] Fanrong Sun and Songchen Han. A flight path planning method based on improved artificial potential field. In 2016 International Conference on Computer, Information and Telecommunication Systems (CITS), pages 1–5. IEEE, 2016. [26] D Fox W Burgard S Thrun, D Fox, and W Burgard. The dynamic window approach to collision avoidance. IEEE Transactions on Robotics and Automation, 4:1, 1997. [27] Prahlad Vadakkepat, Kay Chen Tan, and Wang Ming-Liang. Evolutionary artificial potential fields and their application in real time robot path planning. In Evolutionary Computation, 2000. Proceedings of the 2000 Congress on, volume 1, pages 256–263. IEEE, 2000. [28] Lu Yin, Yixin Yin, and Cheng-Jian Lin. A new potential field method for mobile robot path planning in the dynamic environments. Asian Journal of Control, 11(2):214–225, 2009.
3cs.SY
0 On the Complexity of the Orbit Problem arXiv:1303.2981v3 [cs.CC] 22 Jun 2016 VENTSISLAV CHONEV, Institute of Science and Technology Austria JOËL OUAKNINE, University of Oxford JAMES WORRELL, University of Oxford We consider higher-dimensional versions of Kannan and Lipton’s Orbit Problem—determining whether a target vector space V may be reached from a starting point x under repeated applications of a linear transformation A. Answering two questions posed by Kannan and Lipton in the 1980s, we show that when V has dimension one, this problem is solvable in polynomial time, and when V has dimension two or three, the problem is in NPRP . Categories and Subject Descriptors: F.2.1 [Analysis of Algorithms and Problem Complexity]: Numerical Algorithms and Problems – Computations on matrices, Number-theoretic computations; G.2.1 [Discrete Mathematics]: Combinatorics – Recurrences and difference equations General Terms: Algorithms, Theory, Verification Additional Key Words and Phrases: Linear transformations, matrix orbits, linear recurrence sequences, Skolem’s Problem, termination of linear programs ACM Reference Format: Ventsislav Chonev, Joël Ouaknine, and James Worrell, 2014. On the Complexity of the Orbit Problem. J. ACM 0, 0, Article 0 ( 2016), 40 pages. DOI: http://dx.doi.org/10.1145/2857050 1. INTRODUCTION The Orbit Problem was introduced by Harrison in [Harrison 1969] as a formulation of the reachability problem for linear sequential machines. The problem is stated as follows: Given a square matrix A ∈ Qm×m and vectors x, y ∈ Qm , decide whether there exists a non-negative integer n such that An x = y. The decidability of this problem remained open for over ten years, until it was shown to be decidable in polynomial time by Kannan and Lipton [Kannan and Lipton 1980]. In the conclusion of the journal version of their work [Kannan and Lipton 1986], the authors discuss a higher-dimensional extension of the Orbit Problem, as follows: Given a square matrix A ∈ Qm×m , a vector x ∈ Qm , and a subspace V of Qm , decide whether there exists a non-negative integer n such that An x ∈ V. As Kannan and Lipton point out, the higher-dimensional Orbit Problem is closely related to the Skolem Problem: given a square matrix A ∈ Qm×m and vectors x, y ∈ Qm , decide whether there exists a non-negative integer n such that y T An x = 0. Indeed, the Skolem Problem is the special case of the higher-dimensional Orbit Problem in Authors’ addresses: Ventsislav Chonev, IST Austria, Am Campus 1, 3400 Klosterneuburg, Austria {Joël Ouaknine, James Worrell}, Department of Computer Science, University of Oxford, Wolfson Building, Parks Road, Oxford OX1 3QD, UK Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]. c 2016 Copyright held by the owner/author(s). Publication rights licensed to ACM. 0004-5411/2016/-ART0 $15.00 DOI: http://dx.doi.org/10.1145/2857050 Journal of the ACM, Vol. 0, No. 0, Article 0, Publication date: 2016. 0:2 V. Chonev et al. which the target space V has dimension m − 1. The sequence of numbers hun i∞ n=0 given by un = y T An x is a linear recurrence sequence. A well-known result, the SkolemMahler-Lech Theorem, states that the set {n : un = 0} of zeros of any linear recurrence is the union of a finite set and finitely many arithmetic progressions [Mahler 1935; Lech 1953; Skolem 1934; Hansel 1986]. Moreover, it is known how to compute effectively the arithmetic progressions in question [Berstel and Mignotte 1976]. The main difficulty in deciding the Skolem Problem is thus to determine whether the finite component of the set of zeros is empty. The decidability of the Skolem Problem has been open for many decades [Halava et al. 2005; Tao 2008], and it is therefore unsurprising that there has been virtually no progress on the higher-dimensional Orbit Problem since its introduction in [Kannan and Lipton 1986]. In fact, decidability of the Skolem Problem for matrices of dimension three and four [Mignotte et al. 1984; Vereshchagin 1985] was only established slightly prior to the publication of [Kannan and Lipton 1986], and there has been no substantial progress on this front since.1 In terms of lower bounds, the strongest known result for the Skolem Problem is NP-hardness [Blondel and Portier 2002], which therefore carries over to the unrestricted version of the higher-dimensional Orbit Problem. Kannan and Lipton speculated in [Kannan and Lipton 1986] that for target spaces of dimension one the Orbit Problem might be solvable, “hopefully with a polynomialtime bound”. They moreover observed that the cases in which the target space V has dimension two or three seem “harder”, and proposed this line of research as an approach towards the Skolem Problem. In spite of this, to the best of our knowledge, no progress has been recorded on the higher-order Orbit Problem in the intervening two-and-a-half decades. Our main result is the following. We show that the higher-dimensional Orbit Problem is in PTIME if the target space has dimension one, and in NPRP if the target space has dimension two or three. While we make extensive use of the techniques of [Mignotte et al. 1984; Vereshchagin 1985] on the Skolem Problem, our results, in contrast, are independent of the dimension of the matrix A. Strictly speaking, Kannan and Lipton’s original work on the Orbit Problem concerned the case that the target was an affine subspace of dimension 0. Our main results entail an NPRP complexity bound in case the target is an affine subspace of dimension 1 or 2, simply by embedding into a vector-space problem one dimension higher. The following example illustrates some of the phenomena that emerge in the Orbit Problem for two-dimensional target spaces. Consider the following matrix and initial vector:     28 4 6 14 21  −14   −8 −2 −28 −7  x= A= −10  −2 −3 −6 −9  5 4 1 12 3 Then with target space V = {(u1 , u2 , u3 , u4 ) ∈ Q4 : 4u1 + 7u3 = 0, 4u2 + 7u4 = 0} it can be shown that An x ∈ V if and only if n has residue 2 modulo 6. Such periodic behaviour can be analysed in terms of the eigenvalues of the matrix A. These √ are λω, λω, λω and λω, where ω = eπi/3 is a primitive 6-th root of unity and λ = (−1 + i 39)/2. 1A proof of decidability of the Skolem Problem for linear recurrence sequences of order five was announced in [Halava et al. 2005]. However, as pointed out in [Ouaknine and Worrell 2012], the proof seems to have a serious gap. Journal of the ACM, Vol. 0, No. 0, Article 0, Publication date: 2016. On the Complexity of the Orbit Problem 0:3 The key observation is that the eigenvalues of A fall into only two classes under the equivalence relation ∼, defined by α ∼ β if and only if α/β is a root of unity. We handle such instances by analysing the equivalence classes of ∼. We show that, provided ∼ has sufficiently many equivalence classes, there is at most one exponent n such that An x ∈ V. Computable bounds on such an n are obtained utilising the work of [Mignotte et al. 1984; Vereshchagin 1985], quantifying and strengthening some of the bounds given for the Skolem Problem. In the case of a one-dimensional target subspace V, the resulting bound is polynomial in the size of the problem representation, allowing for all exponents n up to the bound to be checked directly and yielding a polynomialtime algorithm. Unfortunately, when V has dimension two or three, the bounds on n are exponential in the size of the input, leading to an NPRP guess-and-check procedure, in which an RP oracle is used to check whether An x ∈ V for a guessed value of n. Finally, the case in which the eigenvalues of A have fewer equivalence classes under ∼ is handled explicitly using a case analysis on the residue of n modulo the least common multiple of the orders of all ratios of eigenvalues which are roots of unity. For each such residue class, we show how to determine whether it contains exponents n for which An x ∈ V. Noting that there are at most exponentially many such residue classes, we can directly incorporate this case analysis into an NPRP algorithm. 1.1. Related Work Aside from its connection to the Skolem Problem, the higher-dimensional Orbit Problem is closely related to termination problems for linear programs (see, e.g., [Ben-Amram et al. 2012; Braverman 2006; Tiwari 2004]) and to reachability questions for discrete linear dynamical systems (cf. [Halava et al. 2005]). Another related problem is the Polyhedron Hitting Problem, which replaces the target space with an intersection of half-spaces. In [Tarasov and Vyalyi 2011], the Polyhedron Hitting Problem is related to decision problems in formal language theory. Some partial decidability results for this problem are given in [Chonev et al. 2015]. Let us also mention the more recent work of Arvind and Vijayaraghavan [Arvind and Vijayaraghavan 2011] which places the original Orbit Problem in the logspace counting hierarchy GapLH. Another generalisation of the Orbit Problem was considered in [Cai et al. 2000] and shown to be decidable in polynomial time. This asks, given commuting rational matrices A, B, and C, whether there exist integers i and j such that Ai B j = C. A continuous version of the Orbit Problem is considered in [Hainry 2008]. Here one studies linear differential equations of the form x′ (t) = Ax(t) for a rational matrix A. The problem is to decide, for a given initial condition x(0) and target vector v, whether there exists t such that x(t) = v. The main result of [Hainry 2008] shows decidability of this problem. 2. PAPER OUTLINE This work is based on our conference paper [Chonev et al. 2013]. The main technical results are the following theorems: T HEOREM 2.1. Suppose we are given an instance of the Orbit Problem, comprising a square matrix A ∈ Qm×m , a vector x ∈ Qm and a subspace V ⊆ Qm with dim(V) ≤ 3. Let kIk be the length of the description of the input data. There exists a bound N = 2O(||I||) such that if the instance is positive, then there exists a witness (that is, n ∈ N with An x ∈ V) such that n < N . T HEOREM 2.2. The Orbit Problem with dim(V) ≤ 3 is in NPRP . Further, if dim(V) = 1, then the problem is in PTIME. In this section we give a high-level overview of the argument. Journal of the ACM, Vol. 0, No. 0, Article 0, Publication date: 2016. 0:4 V. Chonev et al. Firstly, we must emphasise that the fixed-dimensional versions of the Orbit Problem referred to by Theorems 2.1 and 2.2 are closely related to the Skolem Problem for linear recurrence sequences of order at most four. In the interest of clarity, we have confined our treatment of the Skolem Problem to the Appendix. We employ two powerful tools from transcendence theory, due to Baker-Wüstholz and van der Poorten, as well as standard results from algebraic number theory, to prove our main result on the Skolem Problem, Theorem C.1, which shows the existence of effective bounds on the zeros of LRS of order at most four and upon which our results on the Orbit Problem build. We now outline the structure of the argument which establishes Theorems 2.1 and 2.2. The first step is a reduction to a similar problem, a polynomial version of the matrix power problem: given a rational square matrix A and polynomials P1 , . . . , Pd ∈ Q[x] such that P1 (A), . . . , Pd (A) are linearly independent over Q, determine whether there exists n such that An lies in the Q-vector space span{P1 (A), . . . , Pd (A)}. The reduction does not increase the dimension of the target space, so we will always have d ≤ 3. The reduction can be carried out in polynomial time and rests entirely on standard techniques from linear algebra. For the second step, we construct a Master System. This is a system of equations, based on the eigenvalues of A and the polynomials P1 , . . . , Pd . It has d + 1 unknowns: the exponent n and the coefficients κ1 , . . . , κd which witness the membership of An in span{P1 (A), . . . , Pd (A))}. The solutions (n, κ1 , . . . , κd ) of the Master System will be exactly the solutions of the matrix equation An = κ1 P1 (A) + · · · + κd Pd (A). The domain of n is N throughout. Since the input data is rational, any solution (n, κ1 , . . . , κd ) of the Master System will necessarily have κ1 , . . . , κd ∈ Q. Next, in Section 4, we give a polynomial-time decision procedure to determine whether the Master System for an instance with a one-dimensional target space has a solution. The algorithm explicitly manipulates the equations in the system, preserving the set of solutions at every step, to determine the existence of a solution in polynomial time, settling the one-dimensional case of Theorem 2.2. The section rests critically on Theorem C.1 for non-degenerate linear recurrence sequences of order 2, which allows us to bound the exponent in all cases when A has two eigenvalues whose ratio is not a root of unity. In all other situations, the given Orbit instance essentially reduces to a system of linear congruences, easily solved using the Chinese Remainder Theorem. The solution method yields the full set of witness exponents n when this set is finite, or a description of the witness set as an arithmetic progression when it is infinite. Thus, if the problem instance is positive, a witness exponent which is at most exponentially large is automatically guaranteed to exist, as promised by Theorem 2.1, by virtue of our ability to write it down using polynomially many bits. An important concept for the cases of two- and three-dimensional target spaces is the notion of degeneracy. An instance (A, x, V) of the Orbit Problem is defined as degenerate if there exist two distinct eigenvalues of A whose quotient is a root of unity, otherwise the instance is non-degenerate. In general, it is possible to reduce an arbitrary Orbit Problem instance to a set of non-degenerate instances. Let L be the least common multiple of the orders of all quotients of eigenvalues of A which are roots of unity. For each j ∈ {0, . . . , L − 1}, consider  separately the problem of deciding whether there exists n ∈ N such that (AL )n Aj x ∈ V. These instances are all non-degenerate,2 and the original problem instance is positive if and only if at least one of these L nondegenerate instances is positive. Unfortunately, this reduction to the non-degenerate the eigenvalues of AL are exactly λL where λi are the eigenvalues of A. If for any two distinct  i t L , we have λL /λL such eigenvalues, say λL = 6 λ = 1, then λi /λj must also be a root of unity. Then by i j i j 2 Indeed, L L L the definition of L, λL i /λj = 1, which gives the contradiction λi = λj . Journal of the ACM, Vol. 0, No. 0, Article 0, Publication date: 2016. On the Complexity of the Orbit Problem 0:5 case carries an exponential overhead, as L is, in general, exponentially large in the size of the input data. Instead, we adopt the following strategy for solving the Orbit Problem for possibly degenerate instances. Assume that as part of the input, we are given the residue r = n mod L. Thus, we are interested in determining whether the Master System has a solution (n, κ1 , . . . , κd ) with exponent n such that r = n mod L. We will prove that for any r, there exists a bound Nr such that if there exists such an exponent with residue r, then one exists which does not exceed the bound Nr . Furthermore, Nr = ′ 2O(||I ||) , where kI ′ k = kIk + krk is the length of the input augmented with the binary representation of r. This is clearly sufficient to prove Theorem 2.1: simply take N = max{Nr : r ∈ {0, . . . , L − 1}}. The case analysis on r simplifies the Master System considerably, effectively eliminating degeneracy as a concern, and allowing us to derive the existence of Nr using our results on the Skolem Problem for LRS of order 3 and 4. For each fixed r, algebraic manipulation yields either a ‘small’ witness n of the correct residue, or a non-degenerate linear recurrence sequence hun i∞ n=0 of low order such that if the Master System has a solution with exponent n with the desired residue r, then un = 0. The description of this linear recurrence sequence is computable in polynomial time from the input instance and r. Since krk = ||I||O(1) , it follows that the length of ′ O(1) the description of hun i∞ = ||I||O(1) , so by Theorem C.1, the desired n=0 is kuk = ||I || O(||I||) bound Nr exists and Nr = 2 . We must emphasise that this algebraic manipulation of the Master System and the calculation of the description of hun i∞ n=0 is not part of the decision procedure for the Orbit Problem. Rather its purpose is to prove the existence of the desired bounds Nr , and hence of N . We make use of the observation that this manipulation can, in princi′ ple, be carried out in polynomial time, to conclude Nr = 2O(||I ||) and N = 2O(||I||), and hence establish Theorem 2.1. Given the bound N of Theorem 2.1, we employ a guess-and-check procedure to obtain the complexity upper bounds of Theorem 2.2. Since N is at most exponentially large in the size of the input, an NP procedure can guess an exponent n such that n < N . Then we compute An x by iterated squaring, thereby using polynomially many arithmetic operations. Moreover, all integers that occur in this algorithm have a polynomial-sized representation via arithmetic circuits. Now, to verify An x ∈ V, we compute the determinant of B T B, where B is the matrix whose columns are An x and the basis vectors specifying V, also as an arithmetic circuit. Clearly, n is a witness to the problem instance if and only if this determinant is zero. This is easy to determine with an EqSLP oracle, so we have membership in NPEqSLP . It is known that EqSLP ⊆ coRP [Schönhage 1979], so we have membership in NPRP , thereby establishing Theorem 2.2. 3. REDUCTION 3.1. Matrix power problem Suppose we are given a matrix A ∈ Qm×m , a vector x ∈ Qm and a target vector space V ⊆ Qm specified by a basis of rational vectors y1 , . . . , yk . We wish to decide whether there exists n ∈ N such that An x ∈ V. Observe that we can rescale A in polynomial time by the least common multiple of all denominators appearing in A. This reduces the general problem to the sub-problem in which A is an integer matrix. Let ν = max{m | x, Ax, . . . , Am x are linearly independent}, B = {x, Ax, . . . , Aν x}, U = span(B) and D = [ x Ax . . . Aν x ]. It is clear that U is invariant under the linear transformation A, so consider the restriction of A to U. Suppose b = (b0 , . . . , bν )T are Journal of the ACM, Vol. 0, No. 0, Article 0, Publication date: 2016. 0:6 V. Chonev et al. the coordinates of Aν+1 x with respect to B, that is, Aν+1 x = Db. The restriction of A to U with respect to the basis B is described by the matrix   0 0 . . . 0 b0  1 0 . . . 0 b1   0 1 ... 0 b  2 . M =    0 0 . . . 0 ...  0 0 . . . 1 bν It is easy to check that DM = AD. Thus, if some vector z has coordinates z ′ with respect to B, so that z = Dz ′ , then Az has coordinates M z ′ with respect to B, so that Az = DM z ′ . By induction, for all n ∈ N, An x = DM n x′ , where x′ = (1, 0, . . . , 0)T . def Next we calculate a basis {w1 , . . . , wt } for W = U ∩ V. Then, if wi are such that wi = Dwi′ for all i, we have An x ∈ V ⇐⇒ An x ∈ W ⇐⇒ M n x′ ∈ span{w1′ , . . . , wt′ }. Notice that the matrix M describes a restriction of the linear transformation denoted by A, so its eigenvalues are a subset of the eigenvalues of A. In particular, since A was rescaled to an integer matrix, the eigenvalues of M are algebraic integers as well. Define the matrices T1 , . . . , Tt by Ti = [ wi′ M wi′ . . . M ν wi′ ] . We will show that M n x′ ∈ span{w1′ , . . . , wt′ } if and only if M n ∈ span{T1 , . . . , Tt }. If for some coefficients κi we have Mn = t X κi Ti , i=0 then considering the first column of both sides, we have M n x′ = t X κi wi′ . i=0 n Pt Conversely, suppose M x′ = i=0 κi wi′ . Then note that x′ , M x′ , . . . , M ν x′ are just the unit vectors of size ν + 1. Multiplying by M j for j = 0, . . . , ν gives M n+j x′ = P t j ′ n i=0 κi M wi . The left-hand side is exactly the (j + 1)-th column of M , whereas j ′ M wi on the right-hand side is exactly the (j + 1)-th column of Ti . So we have P M n = ti=0 κi Ti . Thus, we have reduced the Orbit Problem to the Matrix Power Problem: determining whether some power of a given matrix lies inside a given vector space of matrices. Now we will perform a further reduction step. It is clear that within the space def T = span {T1 , . . . , Tt } it suffices to consider only matrices of the shape P (M ) where def P ∈ Q[x]. We find a basis for the space P = {P (M ) | P ∈ Q[x]} and then a basis {P1 (M ), . . . , Ps (M )} for P ∩ T . Then M n ∈ T ⇐⇒ M n ∈ P ∩ T . We call the problem of determining, given M and P1 , . . . , Ps , whether there exists n ∈ N such that M n ∈ span{P1 (M ), . . . , Ps (M )}, the polynomial version of the matrix power problem. Observe that dim(V) ≥ dim(T ) ≥ dim(T ∩ P), so the dimension of the target vector space does not grow during the described reductions. All described operations may be performed in polynomial time using standard techniques from linear algebra. Journal of the ACM, Vol. 0, No. 0, Article 0, Publication date: 2016. On the Complexity of the Orbit Problem 0:7 3.2. Master System of equations Suppose now we have an instance (A, P1 , . . . , Ps ) of the polynomial version of the matrix power problem. Calculate the minimal polynomial of A and obtain canonical representations of its roots α1 , . . . , αk , that is, the eigenvalues of A. This may be done in polynomial time, see Section A.1. Throughout, for an eigenvalue αi we will denote by mul(αi ) the multiplicity of αi as a root of the minimal polynomial of the matrix. Fix an n ∈ N and coefficients κ1 , . . . , κs ∈ C and define the polynomials Pexponent s P (x) = i=1 κi Pi (x) and Q(x) = xn . It is easy to see that Q(A) = P (A) if and only if ∀i ∈ {1, . . . , k}.∀j ∈ {0, . . . , mul(αi ) − 1}.P (j) (αi ) = Q(j) (αi ). (1) Indeed, P − Q is zero at A if and only if the minimal polynomial of A divides P − Q, that is, each αi is a root of P − Q with multiplicity at least mul(αi ), or equivalently, each αi is a root of P − Q and its first mul (αi ) − 1 derivatives. Thus, in order Ps to decide whether there exists an exponent n and coefficients κi such that An = i=1 κi Pi (A), it is sufficient to solve the system of equations (1) where the unknowns are n ∈ N and κ1 , . . . , κs ∈ C. Each eigenvalue αi contributes mul(αi ) equations which specify that P (x) and its first mul (αi ) − 1 derivatives all vanish at αi . For brevity in what follows, we will denote by eq(αi , j) the j-th derivative equation contributed to the system by αi , that is, P (j) (αi ) = Q(j) (αi ). This notation is defined only for 0 ≤ j < mul(αi ). We will also denote by Eq(αi ) the set of equations contributed by αi to the system: Eq(αi ) = {eq(αi , 0), . . . , eq(αi , mul(αi ) − 1)} . For example, if the minimal polynomial of A has roots α1 , α2 , α3 with multiplicities mul(αi ) = i and the target space is span {P1 (A), P2 (A)} then the system contains six equations: αn1 = κ1 P1 (α1 ) + κ2 P2 (α1 ) αn2 = κ1 P1 (α2 ) + κ2 P2 (α2 ) nα2n−1 = κ1 P1′ (α2 ) + κ2 P2′ (α2 ) αn3 = κ1 P1 (α3 ) + κ2 P2 (α3 ) nα3n−1 = κ1 P1′ (α3 ) + κ2 P2′ (α3 ) n(n − 1)α3n−2 = κ1 P1′′ (α3 ) + κ2 P2′′ (α3 ) Then eq(α3 , 0) is the equation αn3 = κ1 P1 (α3 ) + κ2 P2 (α3 ) and Eq(α2 ) is the two equations αn2 = κ1 P1 (α2 ) + κ2 P2 (α2 ) nα2n−1 = κ1 P1′ (α2 ) + κ2 P2′ (α2 ) 4. ONE-DIMENSIONAL TARGET SPACE Suppose we are given a one-dimensional matrix power problem instance (A, P ) and wish to decide whether An ∈ span{P (A)} for some n. We have constructed a system of equations in the exponent n and the coefficient κ as in (1). For example, if the roots of Journal of the ACM, Vol. 0, No. 0, Article 0, Publication date: 2016. 0:8 V. Chonev et al. the minimal polynomial of A are α1 , α2 , α3 with multiplicities mul(αj ) = j, the system is: αn1 = κP (α1 ) αn2 = κP (α2 ) nα2n−1 = κP ′ (α2 ) αn3 = κP (α3 ) nα3n−1 = κP ′ (α3 ) n(n − 1)α3n−2 = κP ′′ (α3 ) In this section we will describe how such systems may be solved in polynomial time. First, we perform some preliminary calculations. (1) We check whether κ = 0 has a corresponding n which solves the matrix equation An = κP (A), that is, whether A is nilpotent. Otherwise, assume κ 6= 0. (2) Let k = maxj {mul(αj )}. We check for all n < k whether An is a multiple of P (A). If so, we are done. Otherwise, assume n ≥ k. (3) We check whether αj = 0 for some j. If so, then all of the equations Eq(αi ) are of the form 0 = κP (t) (0), which is equivalent to 0 = P (t) (0). We can easily check whether these equations are satisfied. If so, we dismiss them from the system without changing the set of solutions. If not, then there is no solution and we are done. Now we assume αj 6= 0 for all j. (4) Finally, we check whether the right-hand side κP (t) (αj ) of some equation is equal to 0, by dividing P (t) (x) by the minimal polynomial of αj . If this is the case, then the problem instance is negative, because the left-hand sides are all non-zero. Let eq(αi , k)/eq(αj , t) denote the equation obtained from eq(αi , k) and eq(αj , t) by asserting that the ratio of the left-hand sides equals the ratio of the right-hand sides, that is, n(n − 1) . . . (n − k + 1)αin−k P (k) (αi ) . = P (t) (αj ) n(n − 1) . . . (n − t + 1)αjn−t We compute representations of all quotients αi /αj , and consider three cases. Case I. Some quotient αi /αj is not a root of unity. Then eq(αi , 0) and eq(αj , 0) together imply eq(αi , 0)/eq(αj , 0), that is,  n αi P (αi ) . = αj P (αj ) In Section A.1, we discuss the efficient representation and manipulation of algebraic numbers. By Lemma A.1, we can compute representations of P (αi )/P (αj ) and αi /αj in polynomial time. Then by Lemma D.1 in Section D, n is bounded by a polynomial in the input. We check An ∈ span{P (A)} for all n up to the bound and we are done. Case II. All quotients αi /αj are roots of unity, and all roots of the minimal polynomial of A are simple. Then the system is equivalent to ^ eq(αi , 0) αn1 κ= ∧ . P (α1 ) i<j eq(αj , 0) It is sufficient to determine whether there exists some n which satisfies ^ eq(αi , 0) . eq(αj , 0) i<j (2) Journal of the ACM, Vol. 0, No. 0, Article 0, Publication date: 2016. On the Complexity of the Orbit Problem 0:9 Consider each equation eq(αi , 0)/eq(αj , 0):  n P (αi ) αi . = αj P (αj ) (3) Suppose αi /αj is an r-th root of unity. If the right-hand side of (3) is also an r-th root of unity, then the solutions of (3) are n ≡ t mod r for some t. If not, then (3) has no solution, so the entire system (1) has no solution, and the problem instance is negative. By Lemma A.1, we can determine in polynomial time whether the righthand side of (3) is a root of unity, and if so, calculate t. We transform each equation in (2) into an equivalent congruence in n. This gives a system of congruences in n which is equivalent to (2). We solve it using the Chinese Remainder Theorem. The problem instance is positive if and only if the system of congruences has a solution. Case III. All quotients αi /αj are roots of unity, and fA (x) has repeated roots. We transform the system into an equivalent one in the following way. First, we include in the new system all the quotients of equations eq(αi , 0) as in Case 2. Second, for each Vmul(α )−2 eq(αi , j)/eq(αi , j + 1). Third, repeated root αi of fA (x), we take the quotients j=0 i we include the equation κ = α1 /P (α1 ). ^ eq(αi , 0) ^ mul(α ^i )−2 eq(αi , j) α1 ∧ ∧κ= . eq(α , 0) eq(α , j + 1) P (α j i 1) i<j j=0 i We solve the first conjunct as in Case 2. If there is no solution, then we are done. Otherwise, the solution is some congruence n ≡ t1 mod t2 . For the remainder of the system, each ratio eq(αi , j)/eq(αi , j + 1) contributed by a repeated root αi has the shape which is equivalent to P (j) (αi ) αi = (j+1) , n−j P (αi ) n=j+ P (j+1) (αi ) αi . P (j) (αi ) (4) For each such equation (4), we calculate the right-hand side in polynomial time, using the methods outlined in Section A.1, and check whether it is in N. If not, then the system has no solution. Otherwise, (4) points to a single candidate n0 . We do this for all equations where n appears outside the exponent. If they point to the same value of n, then the system is equivalent to n ≡ t1 mod t2 n = n0 κ = αn1 /P (α1 ) We check whether n0 satisfies the congruence and we are done. 5. TWO-DIMENSIONAL TARGET SPACE Suppose we are given a rational square matrix A and polynomials P1 , P2 with rational coefficients such that P1 (A) and P2 (A) are linearly independent over Q. We want to decide whether there exists n ∈ N such that An lies in the Q-vector space span{P1 (A), P2 (A)}. We have derived a Master System of equations (1) in the unknowns (n, κ1 , κ2 ) whose solutions are precisely the solutions of the matrix equation An = κ1 P1 (A) + κ2 P2 (A). Journal of the ACM, Vol. 0, No. 0, Article 0, Publication date: 2016. 0:10 V. Chonev et al. In this section, we will show that there exists a bound N , exponentially large in the size of the input, such that if the problem instance is positive, then there exists a witness exponent n with n < N . This will be sufficient to show that the problem is in the complexity class NPRP , as outlined earlier. Notice that we may freely assume that the eigenvalues of A are non-zero. Indeed, if 0 is an eigenvalue, then consider eq(0, 0): 0 = κ1 P1 (0) + κ2 P2 (0). If at least one of P1 (0), P2 (0) is non-zero, then we have a linear dependence between κ1 , κ2 . Then we express one of the coefficients κ1 , κ2 in terms of the other, obtaining a Master System of dimension 1, and then the claim follows inductively. Otherwise, if P1 (0) = P2 (0) = 0, then eq(0, 0) is trivially satisfied for all n, κ1 , κ2 , so we remove eq(0, 0) from the Master System without altering the set of solutions. We examine in this way all equations contributed by 0, either removing them from the system, or obtaining a lower-dimensional system which then yields the required bound N inductively. As outlined in Section 2, we show the existence of the bound N by performing a case analysis on n mod L, where L = lcm{order(λi /λj ) : λi , λj eigenvalues of A and λi /λj root of unity}. We will show that for any fixed value r ∈ {0, . . . , L − 1}, there exists a bound Nr , exponentially large in the size of the input, such that if the Master System has a solution with exponent of residue r modulo L, then it has a solution with exponent n such that n < Nr . To obtain the bounds Nr , we show how the Master System can be manipulated algebraically in polynomial time to yield a non-degenerate linear recurrence sequence of order 3 whose zeros are a superset of the exponents n which solve the Master System. This manipulation is a proof technique to show the existence of the bound Nr , not a feature of the algorithm. The decision method is instead the guess-and-check procedure explained in Section 2. Thus, from here onwards, we assume we are given a fixed r, which increases the input size only polynomially, and are interested solely in exponents n with n mod L = r. Since we admit degenerate problem instances, we need to consider the relation ∼ on the eigenvalues of A, defined by α ∼ β if and only if α/β is a root of unity. It is clear that ∼ is an equivalence relation. The equivalence classes C1 , . . . , Ck of ∼ are of two kinds. First, a class can be its own image under complex conjugation: Ci = {α | α ∈ Ci } Each such self-conjugate class {α1 , . . . , αs } has the form {αω1 , . . . , αωs } where ωi are roots of unity, and |αj | = α ∈ R ∩ A. Call this α the representative of the equivalence class Ci . Second, if an equivalence class is not self-conjugate, then its image under complex conjugation must be another equivalence class of ∼. Thus, the remaining equivalence classes of ∼ are grouped into pairs (Ci , Cj ) such that Ci = {x | x ∈ Cj } = Cj . In this case, we can write Ci and Cj as Ci = {λω1 , . . . , λωs } Cj = {λω1 , . . . , λωs } where ωi are roots of unity, λ ∈ A and arg(λ) is an irrational multiple of 2π. Call λ the representative of Ci and λ the representative of Cj . Observe that the representatives of self-conjugate classes are distinct positive real numbers, and that no ratio of representatives can be a root of unity. Recall also that Journal of the ACM, Vol. 0, No. 0, Article 0, Publication date: 2016. On the Complexity of the Orbit Problem 0:11 we can assume the eigenvalues of A are algebraic integers, as a by-product of the reduction from the Orbit Problem. Since roots of unity and their multiplicative inverses are algebraic integers, it follows that the representatives of equivalence classes must also be algebraic integers. Let [ Eq(C) = Eq(α) α∈C denote the set of equations contributed to the system by the eigenvalues in C, and let [ Eq(C, i) = {eq(α, i)} α∈C mul (α) > i denote the set of i-th derivative equations contributed by the roots in C. To show the existence of the required bound Nr , we will perform a case analysis on the number of equivalence classes of ∼. Case I. Suppose ∼ has exactly one equivalence class C = {αω1 , . . . , αωs }, necessarily self-conjugate, with representative α. Consider the set of equations Eq(C, 0): (αω1 )n = κ1 P1 (αω1 ) + κ2 P2 (αω1 ) .. . (αωs )n = κ1 P1 (αωs ) + κ2 P2 (αωs ) For our fixed r, the values of ω1n , . . . , ωsn are easy to calculate in polynomial time, since ωi are roots of unity whose order divides L. Then the equations Eq(C, 0) are equivalent to  n α   κ1  ..  (5)  . =B κ , 2 n α where B is an s × 2 matrix over A which, given r, is computable in polynomial time. Next we subtract the first row of (5) from rows 2, . . . , s, obtaining   0   κ1  ..  n α = c1 κ 1 + c2 κ 2 ∧  .  = B ′ . κ2 0 Here (c1 , c2 ) is the first row of the matrix B, and B ′ is the result of subtracting (c1 , c2 ) from each of the bottom s − 1 rows of B. Thus, Eq(C, 0) is equivalent to αn = c1 κ1 + c2 κ2 together with the constraint that (κ1 , κ2 )T must lie in the nullspace of B ′ . We now consier the nullspace of B ′ . If its dimension is less than 2, then we have a linear constraint on κ1 , κ2 . This constraint is of the form κ1 = χκ2 when the nullspace of B ′ has dimension 1, and is κ1 = κ2 = 0 when the nullspace is of dimension 0. In both cases, the Master System is equivalent to a lower-dimensional one which may be computed in polynomial time, so the existence of the bound Nr follows inductively. In the case when the nullspace of B ′ has dimension 2, then the linear constraint is vacuous, and Eq(C, 0) is equivalent to αn = c1 κ1 + c2 κ2 . In the same way, for this fixed r, Eq(C, 1) reduces to a single first-derivative equation: nαn−1 = c3 κ1 + c4 κ2 . Journal of the ACM, Vol. 0, No. 0, Article 0, Publication date: 2016. 0:12 V. Chonev et al. We do this for all Eq(C, i), obtaining a system of equations equivalent to (1) based on the representative of C, rather than the actual eigenvalues in C. Denote the resulting set of equations by F (Eq(C)). If some eigenvalue x ∈ C has mul(x) ≥ 3, then F (Eq(C)) contains the following triple of equations:   " # " # αn c2 c1 n−1   = κ 1 c3 + κ 2 c4 . nα (6) c6 c5 n(n − 1)αn−2 If the vectors on the right-hand side of (6) are linearly independent over A, then they specify a plane in A3 , and the triple states that the point on the left-hand side must lie on this plane. Letting (A1 , A2 , A3 )T be the normal of the plane, we obtain A1 αn + A2 nαn−1 + A3 n(n − 1)αn−2 = 0 ⇐⇒ A1 α2 + A2 nα + A3 n(n − 1) = 0. This is a quadratic equation in n. It has at most two roots, both at most exponentially large in the size of the input, so we just take Nr to be the greater root. If the vectors on the right-hand side of (6) are linearly dependent over A, then the exponents n which solve (6) are precisely those which solve:   " # αn c1   = κ 1 c3 . nαn−1 c5 n(n − 1)αn−2 We divide the first equation by the second to obtain α c1 = , n c3 which limits n at most one, exponentially large, candidate value αc3 /c1 . If all eigenvalues x in C have mul(x) ≤ 2 and at least one has mul(x) = 2, then F (Eq(C)) consists of exactly two equations:       αn c c1 (7) + κ2 2 . = κ1 c4 c3 nαn−1 If (c1 , c3 )T and (c2 , c4 )T are linearly independent over A, then the right-hand side of (7) spans all of A2 as κ1 , κ2 range over A. Then (7) is solved by all n ∈ N, so we can take Nr = L. Otherwise, the exponents n which solve (7) are exactly those which solve     αn c = κ1 1 . c3 nαn−1 This limits n to at most one candidate value αc3 /c1 , which is exponentially large in the input size. Finally, if all eigenvalues x in C have mul(x) = 1, then F (Eq(C)) contains only the equation αn = κ1 c1 + κ2 c2 , which is solved by all n ∈ N if at least one of c1 , c2 is non-zero, and has no solutions if c1 = c2 = 0. Either way, we take Nr = L and are done. Case II. Suppose ∼ has exactly two equivalence classes, C1 and C2 , with respective representatives α and β, so that C1 = {αω1 , . . . , αωs }, Journal of the ACM, Vol. 0, No. 0, Article 0, Publication date: 2016. On the Complexity of the Orbit Problem 0:13 C2 = {βω1′ , . . . , βωl′ }. The classes could be self-conjugate, in which case α, β ∈ A ∩ R, or they could be each other’s image under complex conjugation, in which case α = β. In both cases, α/β is not a root of unity. As in Case I, we transform the system Eq(C1 ) ∧ Eq(C2 ) into the equivalent system F (Eq(C1 )) ∧ F (Eq(C2 )). If all eigenvalues x of A have mul(x) = 1, then the resulting system consists of two equations, one for each equivalence class of ∼: αn = κ1 c1 + κ2 c2 β n = κ 1 c3 + κ 2 c4 If (c1 , c3 )T and (c2 , c4 )T are linearly independent over A, then there is a solution for each n, so just take Nr = L. Otherwise, it suffices to look for n which satisfies αn = κ1 c1 β n = κ 1 c3 and hence  n c1 α = . β c3 A bound on n follows from Lemma D.1. This argument relies crucially on the fact that α/β is not a root of unity. If some eigenvalue x of A has mul(x) ≥ 2, say x ∈ C1 , then the system contains the following triple of equations:   " # " # αn c2 c1  nαn−1  = κ1 c3 + κ2 c4 . (8) c6 c5 βn If the vectors on the right-hand side of (8) are linearly dependent over A, so that the right-hand side describes a space of dimension 1, it suffices to look for solutions to   " # αn c1  nαn−1  = κ1 c3 . c5 βn Then dividing we obtain α c1 = , n c3 which limits n to at most one, exponentially large candidate value αc3 /c1 . Otherwise, if the vectors on the right-hand side of (8) are linearly independent over A, we calculate the normal (A1 , A2 , A3 )T to the plane described by them and obtain A1 αn + A2 nαn−1 + A3 β n = 0. A bound on n which is exponential in the size of the input follows from Lemma F.4. This again relies on the fact that α/β cannot be a root of unity. Case III. Suppose ∼ has at least three equivalence classes. Then we can choose eigenvalues α, β, γ, each from a distinct equivalence class, and consider eq(α, 0), eq(β, 0) and eq(γ, 0): # " # " " n# P2 (α) P1 (α) α n β = κ1 P1 (β) + κ2 P2 (β) . P2 (γ) P1 (γ) γn Journal of the ACM, Vol. 0, No. 0, Article 0, Publication date: 2016. 0:14 V. Chonev et al. If the vectors on the right-hand side are linearly independent over A, we eliminate κ1 , κ2 to obtain A1 αn + A2 β n + A3 γ n = 0. The left-hand side is a non-degenerate linear recurrence sequence of order 3, so a bound on n follows from Lemmas F.1, F.2, F.3. If the vectors on the right-hand side are not linearly independent over A, then we may equivalently consider # " " n# P1 (α) α n β = κ1 P1 (β) , P1 (γ) γn which gives  n α P1 (α) = . β P1 (β) An exponential bound on n follows from Lemma D.1, because α/β is not a root of unity. Thus, we have now shown that for any r ∈ {0, . . . , L−1}, the required bound Nr exists and is at most exponential in the size of the input. Then N = max{Nr : r ∈ {0, . . . , L − 1}} exists and is exponentially large, so the Orbit Problem with two-dimensional target space is in NPRP , by the complexity argument of Section 2. 6. THREE-DIMENSIONAL TARGET SPACE Suppose we are given a rational square matrix A and polynomials P1 , P2 , P3 with rational coefficients such that P1 (A), P2 (A), P3 (A) are linearly independent over Q. We want to decide whether there exists n ∈ N such that An lies in the Q-vector space span{P1 (A), P2 (A), P3 (A)}. We have derived a Master System of equations (1) in the unknowns (n, κ1 , κ2 , κ3 ) whose solutions are precisely the solutions of the matrix equation An = κ1 P1 (A) + κ2 P2 (A) + κ3 P3 (A). In this section, we will show that there exists a bound N , exponentially large in the size of the input, such that if the problem instance is positive, then there exists a witness exponent n with n < N . This will be sufficient to show that the problem is in the complexity class NPRP , as outlined earlier. The eigenvalues of A may be assumed to be non-zero algebraic numbers: if 0 is an eigenvalue, then eq(0, 0) gives a linear dependence between the coefficients κ1 , κ2 , κ3 , yielding a lower-dimensional Master System, so the existence of the bound N follows inductively. Following the strategy of the two-dimensional case, we will perform a case analysis on the residue of n modulo L: let n mod L = r be fixed throughout this section. To obtain the required bound N , it is sufficient to derive a bound Nr , also exponentially large in the size of the input, such that if there exists a witness exponent of residue r modulo L, then such a witness may be found which does not exceed Nr . As in the twodimensional case, we will select tuples of equations and obtain a bound on n using the results for the Skolem Problem for recurrences of order 4 in Section G. We will again perform a case analysis on the equivalence classes of the relation ∼. Case I. Suppose there are at least two pairs of classes (Ci , Ci ), (Cj , Cj ) which are not self-conjugate. Then let α ∈ Ci , β = α ∈ Ci , γ ∈ Cj , δ = γ ∈ Cj . Then we consider the tuple of equations        n P3 (α) P2 (α) P1 (α) α n  P3 (β)   P2 (β)   P1 (β)  β  (9)  γ n  = κ1  P (γ)  + κ2  P (γ)  + κ3  P (γ)  . 3 2 1 n P3 (δ) P2 (δ) P1 (δ) δ Journal of the ACM, Vol. 0, No. 0, Article 0, Publication date: 2016. On the Complexity of the Orbit Problem 0:15 If the vectors on the right-hand side are linearly dependent over A, then we rewrite the right-hand side as a linear combination of at most two vectors and obtain the required bound on n by considering a linear recurrence sequence of order 2 or 3. If the vectors on the right-hand side of (9) are linearly independent over A, then we calculate the normal of the three-dimensional subspace of A4 that they span, obtaining an equation A1 αn + A2 β n + A3 γ n + A4 δ n = 0 (10) and hence an exponential bound on n from Lemmas G.3 and G.4. We are relying on the fact that the ratios of α, β, γ, δ are not roots of unity. Notice that we need (α, β) and (γ, δ) to be pairwise complex conjugates in order to apply Lemma G.4. Notice also that we may assume without loss of generality that α, β, γ, δ are algebraic integers, as Lemma G.4 requires. Indeed, as remarked at the beginning of Section 3, the input data may be assumed to be over Z, instead of Q, with the simple technique of scaling the input by an integer chosen so as to ‘clear the denominators’. Then A is an integer matrix, so its eigenvalues are algebraic integers. Case II. Suppose now that there is exactly one pair of classes (Ci , Ci ) which are not self-conjugate. In general, for any eigenvalue x of A we must have mul(x) = mul(x). Therefore, if any eigenvalue α ∈ Ci has mul (α) > 1, we can select the tuple of equations eq(α, 0), eq(α, 1), eq(α, 0), eq(α, 1):         αn P1 (α) P2 (α) P3 (α) n  P1 (α)    α  P2 (α)   P3 (α)   nαn−1  = κ1  P ′ (α)  + κ2  P ′ (α)  + κ3  P ′ (α)  . 1 2 3 P1′ (α) P2′ (α) P3′ (α) nαn−1 This gives a non-degenerate linear recurrence sequence of order 4 over A for a recurrence sequence with two repeated characteristic roots: A1 αn + A2 αn + A3 nαn−1 + A4 nαn−1 = 0. An exponential bound N on n follows from Lemma G.1, since α/α is not a root of unity. We can now assume that eigenvalues in Ci and Ci contribute exactly one equation to the system. Now we use the fixed value of r to transform Eq(Ci ) ∧ Eq(Ci ) into F (Eq(Ci ))∧F (Eq (Ci )). Since all eigenvalues in Ci and Ci contribute one equation each, F (Eq(Ci )) ∧ F (Eq(Ci )) is just λn = κ1 c1 + κ2 c2 + κ3 c3 n λ = κ 1 c4 + κ 2 c5 + κ 3 c6 where λ, λ are the representatives of Ci and Ci . We do the same to all self-conjugate classes as well, reducing the system of equations to an equivalent system based on the representatives of the equivalence classes, not the actual eigenvalues of A. This is beneficial, because the representatives cannot divide to give roots of unity, so we can use 4-tuples of equations to construct non-degenerate linear recurrence sequences of order 4. If there are at least two self-conjugate equivalence classes, with respective representatives α, β, we take the tuple λn = κ1 c1 + κ2 c2 + κ3 c3 n λ = κ 1 c4 + κ 2 c5 + κ 3 c6 αn = κ1 c7 + κ2 c8 + κ3 c9 β n = κ1 c10 + κ2 c11 + κ3 c12 Journal of the ACM, Vol. 0, No. 0, Article 0, Publication date: 2016. 0:16 V. Chonev et al. and obtain the following equation, where the left-hand side is a non-degenerate linear recurrence sequence: n A1 λn + A2 λ + A3 αn + A4 β n = 0. Then we have an exponentially large bound Nr from Lemmas G.3 and G.4. Similarly, if there is only one self-conjugate equivalence class, with representative α, but some of its eigenvalues are repeated, we use the tuple λn = κ1 c1 + κ2 c2 + κ3 c3 n λ = κ 1 c4 + κ 2 c5 + κ 3 c6 αn = κ1 c7 + κ2 c8 + κ3 c9 nαn−1 = κ1 c10 + κ2 c11 + κ3 c12 to obtain the non-degenerate instance n A1 λn + A2 λ + A3 αn + A4 nαn−1 = 0, which gives an exponential bound Nr according to Lemma G.2. If there is exactly one self-conjugate class, with representative α, containing no repeated roots, then the system consists of three equations: λn = κ1 c1 + κ2 c2 + κ3 c3 n λ = κ 1 c4 + κ 2 c5 + κ 3 c6 αn = κ1 c7 + κ2 c8 + κ3 c9 Depending on whether the vectors (c1 , c4 , c7 )T , (c2 , c5 , c8 )T , (c3 , c6 , c9 )T are linearly independent over A, either this triple is solved by all n ∈ N (in which case set Nr = L), or it reduces to a lower-dimensional Master System, yielding the claim inductively. Finally, if there are no self-conjugate classes, the system consists of only two equations: λn = κ1 c1 + κ2 c2 + κ3 c3 n λ = κ 1 c4 + κ 2 c5 + κ 3 c6 Again, depending on the dimension of       c1 c c span , 2 , 3 , c4 c5 c6 we can either set the bound Nr to L (because the transformed Master System is solved by all n ∈ N), or obtain Nr inductively from a lower-dimensional Master System. Case III. All equivalence classes of ∼ are self-conjugate. The techniques used for this case are identical to the ones already presented. We use the fixed value of r to reduce to a non-degenerate system based on the representatives of the classes, with the number of equations contributed by each class determined by the maximum multiplicity of an eigenvalue in that class. If there are less than four equations, then we study the dimension of the vector space spanned by the vectors on the right-hand side: if it has full dimension, then we see the Master System is satisfied by all n of the correct residue r, so we can just set Nr = L. Otherwise, we obtain the bound inductively from a lower-dimensional non-degenerate Master System. On the other hand, if there are at least four equations, then we can choose four equations which have a solution for n if and only if an effectively computable nondegenerate LRS of order 4 vanishes at n. We then employ the bounds of Theorem C.1 concerning LRS of order 4 to obtain the desired Nr . Journal of the ACM, Vol. 0, No. 0, Article 0, Publication date: 2016. On the Complexity of the Orbit Problem 0:17 We remark here that it is only for this final case that we need the representatives of self-conjugate classes to be real, necessitating the choice of the magnitude of the eigenvalues in the class for representative, regardless of whether this magnitude is itself an eigenvalue. The reason for this technical point is that Lemma G.4, which gives a bound on the index of zeros of an LRS of order 4 with four distinct characteristic roots, requires that the characteristic roots be closed under complex conjugation. No strengthening of Lemma G.4 is known which avoids this precondition – as we remark in Section G, this is the reason why the Skolem Problem is open for LRS of order 4 over A. If we had chosen the representative of a self-conjugate class to be an arbitrary (possibly complex) eigenvalue, we would obtain LRS of order 4 whose characteristic roots do not satisfy the precondition on Lemma G.4, and we would not be able to obtain our bound Nr here. ELECTRONIC APPENDIX The electronic appendix for this article can be accessed in the ACM Digital Library. Received September 2015; revised ; accepted A. MATHEMATICAL TECHNIQUES A.1. Algebraic numbers: representation and manipulation A complex number α is algebraic if there exists a polynomial P ∈ Q[x] such that P (α) = 0. The set of algebraic numbers, denoted by A, is a subfield of C. The minimal polynomial of α is the unique monic polynomial of least degree which vanishes at α. The degree of α ∈ A is defined as the degree of its minimal polynomial and is denoted by deg(α). The height of α, denoted by Hα , is defined as the maximum absolute value of the coefficients of the integer polynomial obtained by scaling the minimal polynomial of α by the least common multiple of the denominators of its coefficients. The roots of the minimal polynomial of α (including α) are called the Galois conjugates of α. The absolute norm of α, denoted Nabs (α), is the product of the Galois conjugates of α. By Viete’s laws, we have a Nabs (α) = (−1)deg(α) b where a, b are respectively the constant term and the leading coefficient of the minimal polynomial of α. It follows that Nabs (α) ∈ Q. An algebraic integer is an algebraic number whose minimal polynomial has integer coefficients. The set of algebraic integers, denoted OA , is a ring under the usual addition and multiplication. The algebraic integers are integrally closed, that is, the roots of any monic polynomial with coefficients in OA are all algebraic integers. For any α ∈ A, it is possible to find β ∈ OA and m ∈ Z such that α = β/m. The canonical representation of an algebraic number α is its minimal polynomial, along with a numerical approximation of ℜ(α) and ℑ(α) of sufficient precision to distinguish α from its Galois conjugates [Cohen 1993, Section 4.2.1]. More precisely, we represent α by the tuple (P, x, y, R) ∈ (Q[x] × Q3 ) meaning that α is the unique root of the irreducible (over Q) polynomial P which lies inside the circle centred at (x, y) in the complex plane with radius R. A bound due to Mignotte [Mignotte 1982] states that for roots αj 6= αk of a polynomial P (x), √ 6 |αj − αk | > (d+1)/2 d−1 , (11) d H Journal of the ACM, Vol. 0, No. 0, Article 0, Publication date: 2016. 0:18 V. Chonev et al. where d and H are the degree and height of P , respectively. Thus, if R is restricted to be less than half the root separation bound, the representation is well-defined and allows for equality checking. Observe that given its minimal polynomial, the remaining data necessary to describe α is polynomial in the length of the input. Given P ∈ Q[x] and k ∈ N, it is known how to obtain k bits of the roots of P in time polynomial in the length of the description of P and in the length of the binary representation of k [Pan 1996]. When we say an algebraic number α is given, we assume we have a canonical description of α. We will denote by kαk the length of this description, assuming that integers are expressed in binary and rationals are expressed as pairs of integers. Observe that |α| is an exponentially large quantity in kαk whereas log |α| is polynomially large. Notice also that 1/ log |α| is at most exponentially large in kαk. For a rational a, kak is just the sum of the lengths of its numerator and denominator written in binary. Pdeg(P ) For a polynomial P ∈ Q[x], kP k will denote j=0 kpj k, where pj are the coefficients of P . L EMMA A.1. Given canonical representations of α, β ∈ A and a polynomial P ∈ Q[x], it is possible to compute canonical descriptions of α ± β, αβ ±1 and P (α) in time polynomial in the length of the input (that is, in kαk + kβk + kP k). P ROOF. Let R, Q be the minimal polynomials of α and β, respectively. Then the resultant of R(x − y) and Q(y), interpreted as polynomials in y with coefficients in Q[x], is a polynomial in x which vanishes at α + β. We compute it in polynomial time using the Sub-Resultant algorithm (see Algorithm 3.3.7 in [Cohen 1993]) and factor it into irreducibles using the LLL algorithm [Lenstra et al. 1982]. Finally, we approximate the roots of each irreducible factor to identify the minimal polynomial of α + β. The degree deg(α) deg(β) of α + β is at most deg(α) deg(β), while its height is bounded by Hα+β ≤ Hα Hβ [Zippel 1997]. Therefore, by (11), a polynomial number of bits suffices to describe α + β unambiguously. Similarly, we can compute canonical representations of α − β, αβ and α/β in polynomial time using resultants, see [Cohen 1993]. To calculate P (α) we repeatedly use addition and multiplication. It suffices to prove that all intermediate results may be represented in polynomial space. It is clear that their degrees are at most deg(α), but it is not obvious how quickly the coefficients of their minimal polynomials grow. However, there is a simple reason why their representation is polynomially bounded. Let A be the companion matrix of the minimal polynomial of α. Then P (α) is an eigenvalue of P (A). We can calculate P (A) using only polynomial space. Then from the Leibniz formula det(λI − P (A)) = X σ∈Sn sign(σ) n Y i=1 (λI − P (A))i,σ(i) , it is evident that the coefficients of the characteristic polynomial of P (A) are exponentially large in the length of the input, so their representation requires only polynomial space. This characteristic polynomial may be factored into irreducibles in polynomial time, so the description of P (α) and of all intermediate results is polynomially bounded. It is trivial to check whether α = β and whether α belongs to one of N, Z, Q. It takes only polynomial time to determine whether α is a root of unity, and if so, to calculate its order and phase. A.2. Number fields and ideals In this section, we recall some terminology and results from algebraic number theory. For more details, see [Cohen 1993; Stewart and Tall 2002]. We also define the idealJournal of the ACM, Vol. 0, No. 0, Article 0, Publication date: 2016. On the Complexity of the Orbit Problem 0:19 counting function vP , which is a notion of magnitude of algebraic numbers distinct from the usual absolute value. We follow the presentation of [Halava et al. 2005]. An algebraic number field is a field extension K of Q which, considered as a Q-vector space, has finite dimension. This dimension is called the degree of the number field and is denoted by [K : Q]. Given two algebraic numbers α and β, the Field Membership Problem is to determine whether β ∈ Q(α) and, if so, to return a polynomial P with rational coefficients such that β = P (α). This problem can be solved using the LLL algorithm, see [Cohen 1993, Section 4.5.4]. For any number field K, there exists an element θ ∈ K such that K = Q(θ). Such a θ is called a primitive element of K and satisfies deg(θ) = [K : Q]. The proof is constructive: there is always a primitive element for Q(α1 , α2 ) of the form α1 + lα2 for some small integer l ≤ deg(α1 ) deg(α2 ). Thus, repeatedly using an algorithm for the Field Membership Problem for different l is guaranteed to yield a primitive element for Q(α1 , α2 ), and therefore by induction, for any number field K = Q(α1 , . . . , αk ) specified by algebraic numbers α1 , . . . , αk . Also using an algorithm for the Field Membership Problem, one can represent each αj as a polynomial in θ and thereby determine a maximal Qlinearly independent subset of {α1 , . . . , αk }. There exist exactly deg(θ) monomorphisms from K into C, given by θ → θj , where θj are the Galois conjugates of the primitive element θ. If α ∈ K, then deg(α)| deg(θ). Moreover, if σ1 , . . . , σdeg(θ) are the monomorphisms from K into C then σ1 (α), . . . , σdeg(θ) (α) are exactly the Galois conjugates of α, each repeated deg(θ)/ deg(α) times. The norm of α relative to K is defined as deg(θ) NK/Q (α) = Y σj (α) = (Nabs (α))deg(θ)/ deg(α) j=1 For a number field K, the set OK = OA ∩ K of algebraic integers in K forms a ring under the usual addition and multiplication. The ideals of OK are finitely generated, and form a commutative ring under the operations IJ = [{xy | x ∈ I, y ∈ J}] I + J = {x + y | x ∈ I, y ∈ J}, with unit OK and zero {0}, where [S] denotes the ideal generated by S. An ideal P is prime if P = AB implies A = P or A = [1]. The fundamental theorem of ideal theory states that each non-zero ideal may be represented uniquely (up to reordering) as a product of prime ideals. This theorem gives rise to the following ideal-counting function vP : OK \{0} → N. For a fixed prime ideal P , we define vP (α) to be the number of times P appears in the factorisation into prime ideals of [α]. That is, vP (α) = k if and only if P k | [α] and P k+1 ∤ [α] We also define vP (0) = ∞. The function satisfies the following properties: — vP (αβ) = vP (α) + vP (β) — vP (α + β) ≥ min{vP (α), vP (β)} — If vP (α) 6= vP (β), then vP (α + β) = min{vP (α), vP (β)}. For any α ∈ K we can find an algebraic integer β ∈ OK and a rational integer n ∈ Z ⊆ OK such that α = β/n. We extend vP to K by defining vP (α) = vP (β) − vP (n). The first of the three properties of vP above guarantees that this value is independent of the choice of β, n, making the extension of vP to K well-defined. Note that the extension preserves the above three properties. Journal of the ACM, Vol. 0, No. 0, Article 0, Publication date: 2016. 0:20 V. Chonev et al. For an ideal I 6= {0}, the quotient ring OK /I is finite. The norm of I, denoted N (I), is defined as |OK /I|. We define also N ([0]) = ∞. Notice that N (I) = 1 if and only if I = OK , otherwise N (I) ≥ 2. Each prime ideal P contains a unique prime number p, and N (P ) = pf for some natural number f ≥ 1. In general, |NK/Q (α)| = N ([α]) ≥ 2vP (α) since N (P ) ≥ 2 for any prime ideal P . Hence, vP (α) ≤ log2 |NK/Q (α)| ≤ log2 |Nabs (α)|d where d = [K : Q]. Thus, if we are given K = Q(α1 , . . . , αk ) for canonically represented algebraic numbers αj and a canonically represented α ∈ K, we can observe that d is at most polynomially large in the length of the input and |Nabs (α)| is at most exponentially large in the length of the input. Therefore, vP (α) is only polynomially large. The following lemma is simple, but useful: L EMMA A.2. Let K be a number field and α ∈ K with α ∈ / OK . Then there exists a prime ideal P of OK such that vP (α) 6= 0. P ROOF. There exist β ∈ OK and m ∈ Z such that α = β/m. If [β] = [m], then β and m are associates, so α must be a unit of OK . Since α ∈ / OK , it follows that [β] 6= [m], so the factorisations of [β] and [m] into prime ideals must differ. Therefore, vP (β) 6= vP (m) for some prime ideal P , so vP (α) 6= 0. A.3. Transcendental number theory We now move to some techniques from Transcendental Number Theory on which our results depend in a critical way. First, we state a powerful result due to Baker on linear forms of logarithms of algebraic numbers. T HEOREM A.3. [Baker 1975, Theorem 3.1] Let α1 , . . . , αm be non-zero algebraic numbers with degrees at most d and heights at most A. Further, let β0 , . . . , βm be algebraic numbers with degrees at most d and heights at most B ≥ 2. Write Λ = β0 + β1 log(α1 ) + . . . + βm log(αm ) . Then either Λ = 0 or |Λ| > B −C , where C is an effectively computable number depending only on m, d, A and the chosen branch of the complex logarithm. Various quantitative versions of this theorem are known with explicit constants, as well as sharper lower bounds for restricted cases. Of these, in the present paper we make use of the following result, due to Baker and Wüstholz, concerning the homogeneous case with (rational) integer coefficients: T HEOREM A.4. [Baker and Wüstholz 1993] With the notation as in Theorem A.3, suppose β0 = 0, α1 , . . . , αm 6= 1, β1 , . . . , βm ∈ Z and A, B ≥ e. Let also log be the principal branch of the natural logarithm, defined by log(z) = log |z| + i arg(z), where −π < arg(z) ≤ π. Let also D be the degree of the extension field Q(α1 , . . . , αm ) over Q. Then if Λ 6= 0, then log |Λ| > −(16mD)2(m+2) (log(A))m log(B). The next theorem, due to van der Poorten [van der Poorten 1977] is analogous to Baker’s bound, but with respect to P -adic valuations instead of the usual Archimedean absolute value. T HEOREM A.5. [van der Poorten 1977] Let α1 , . . . , αm be algebraic numbers of degree at most d belonging to a number field K and with heights at most A. Let P be a Journal of the ACM, Vol. 0, No. 0, Article 0, Publication date: 2016. On the Complexity of the Orbit Problem 0:21 prime ideal of K containing the rational prime p. Let also β1 , . . . , βm be rational integers with absolute values at most B ≥ e2 . If α1β1 αβ2 2 . . . αβmm 6= 1, then vP (αβ1 1 . . . αβmm − 1) ≤ (16(m + 1)d)12(m+1) (pd / log(p))(log(A))m (log(B))2 . A.4. Algebraic integers near the unit circle Suppose α 6= 0 is an algebraic integer. It is easy to see that it is impossible for all the Galois conjugates of α to be strictly within the unit circle: just notice that the product of all Galois conjugates of α must be a non-zero integer by Viete’s laws. Further, an old result due to Kronecker [Kronecker 1875] establishes that unless α is a root of unity, then at least one of its Galois conjugates must be strictly outside the unit circle. In this paper, we make use of the following theorem, due to Blanksby and Montgomery [Blanksby and Montgomery 1971], which strengthens Kronecker’s result by providing an effective separation between this Galois conjugate and the unit circle. T HEOREM A.6. Let α be an algebraic integer of degree d ≥ 2. Then there is a Galois conjugate σ(α) of α such that |σ(α)| > 1 + 1/(30d2 log(6d)). A.5. Linear recurrence sequences We now recall some basic properties of linear recurrence sequences. For more details, we refer the reader to [Everest et al. 2003; Halava et al. 2005]. Let F be R or C throughout this section. A linear recurrence sequence (LRS) over F is an infinite sequence hun i∞ n=0 of terms in F such that there exists a natural number k and numbers a1 , . . . , ak ∈ F such that ak 6= 0 and hun i∞ n=0 satisfies the linear recurrence equation un+k = a1 un+k−1 + a2 un+k−2 + · · · + ak un . (12) The recurrence (12) is said to have order k. Note that the same sequence can satisfy different recurrence relations, but it satisfies a unique recurrence of minimum order. The characteristic polynomial of the sequence hun i∞ n=0 is P (x) = xk − a1 xk−1 − a2 xk−2 − · · · − ak and its roots are called the characteristic roots of the sequence. If A ∈ Fk×k is a square matrix and v, w ∈ Fk are column vectors, then it can be shown that the sequence un = v T An w satisfies a linear recurrence of order k. Indeed, by the Cayley-Hamilton Theorem, A satisfies its own characteristic equation det(A − xI) = 0, which gives a recurrence relation on hun i∞ n=0 with coefficients matching those of the characteristic polynomial det(A − xI) of A. Conversely, any LRS may be expressed in this way. Given a linear recurrence relation (12), it is sufficient to take A to be:   a1 a2 . . . ak−1 ak 0   1 0 ... 0  0 1 ... 0 0  .  A= .. ..   ... ... . . . . .  0 0 ... 1 0 Then if w is the vector (uk−1 , . . . , u0 )T of initial terms of hun i∞ n=0 in reverse order and v is the unit vector (0, . . . , 0, 1)T , we have un = v T An w. The characteristic polynomial of the LRS is the characteristic polynomial of A, and the characteristic roots of the LRS are precisely the eigenvalues of A. By converting to the Jordan form, from the matrix expression un = v T An w we can obtain a closed-form solution for the n-th term of the linear recurrence sequence in Journal of the ACM, Vol. 0, No. 0, Article 0, Publication date: 2016. 0:22 V. Chonev et al. terms of the eigenvalues λ1 , . . . , λl of A: un = l X Pj (n)λnj (13) j=0 for all n ≥ 0, where Pj ∈ F[x] are univariate polynomials of degree strictly less than the multiplicity of λj as a root of the characteristic polynomial of A. In the case F = R, the set of characteristic roots is closed under complex conjugation. Thus, if ρ1 , . . . , ρl ∈ R are the real roots of P (x) and γ1 , γ 1 , . . . , γm , γ m ∈ C are the complex ones, the sequence is given by un = l X Aj (n)ρnj + j=1 m X Cj (n)γjn + Cj (n)γj n j=1  (14) for all n ≥ 0, where Aj ∈ R[x] and Cj ∈ C[x]. The coefficients of Pj in (13) and of Aj , Cj in (14) are algebraic numbers, effectively computable in polynomial time from the description of the LRS. A linear recurrence sequence is called degenerate if for some pair of distinct characteristic roots λ1 , λ2 of its minimum-order recurrence, the ratio λ1 /λ2 is a root of unity, otherwise the sequence is non-degenerate. As pointed out in [Everest et al. 2003], the study of arbitrary LRS can be reduced effectively to that of non-degenerate LRS by partitioning the original LRS into finitely many non-degenerate subsequences. Specifically, for a given degenerate linear recurrence sequence hun i∞ n=0 with characteristic roots λj and matrix form un = v T An w, let L be the least common multiple of the orders of all ratios λi /λj which are roots of unity. Then for each j ∈ {0, . . . , L − 1}, consider the sequence T nL+j w = v T (AL )n (Aj w). u(j) n = v A Each of these sequences has characteristic roots λL i and is therefore non-degenerate. L L Indeed, if λ1 and λ2 are distinct eigenvalues of AL , and (λ1 /λ2 )L is a k-th root of unity for some k, then λ1 /λ2 is an Lk-th root of unity, so Lk | order(λ1 /λ2 ). But by L the definition of L, we also have order(λ1 /λ2 ) | L, so k = 1. This yields λL 1 = λ2 , a contradiction. p From the crude lower bound ϕ(r) ≥ r/2 on Euler’s totient function, it follows that if α ∈ A has degree d and is a primitive r-th root of unity, then r ≤ 2d2 . There are ||A||O(1) ratios λi /λj to consider, and if a ratio is a root of unity then its order is ||A||O(1) , so it follows that L = 2O(||A||) . Thus, non-degeneracy can be ensured by considering at most exponentially many subsequences of the original LRS. B. SKOLEM PROBLEM: INTRODUCTION In the rest of the Appendix, we study the Skolem Problem: given a linear recurrence sequence (LRS) hun i∞ n=0 , determine whether there exists a natural number n such that un = 0. The sequence may be real- or complex-valued, but to make the problem welldefined, we shall require that the sequence be given in some effective form. For this reason, we take all the linear recurrence sequences to be over the algebraic numbers, at times restricting further to real-valued or rational sequences. The connection to the Orbit Problem becomes evident if we recall the matrix repren T sentation of linear recurrence sequences. If hun i∞ n=0 is given by un = y A x for a d × d n ⊥ matrix A and vectors x and y, then un = 0 if and only if A x ∈ {y} . That is, the orbit of x under A intersects the (d − 1)-dimensional hyperplane {y}⊥ if and only if the linear recurrence sequence hun i∞ n=0 of order d contains zero as an element. Journal of the ACM, Vol. 0, No. 0, Article 0, Publication date: 2016. On the Complexity of the Orbit Problem 0:23 The Skolem Problem has a history dating back to the 1930s, as evidenced by the celebrated Skolem-Mahler-Lech Theorem, a powerful result which characterises the zero sets of linear recurrence sequences: T HEOREM B.1. (Skolem-Mahler-Lech) Let hun i∞ n=0 be a linear recurrence sequence over a field with characteristic 0. Then the zero set of hun i∞ n=0 , Z(u) = {n ∈ N : un = 0}, is semilinear, that is, the union of a finite set and finitely many arithmetic progressions. This result was originally established in the case of rational LRS in [Skolem 1934], then strengthened to include LRS over the algebraic numbers in [Mahler 1935], and finally extended to any field of characteristic 0 [Lech 1953; Mahler and Cassels 1956]. These proofs rely heavily on p-adic analysis and unfortunately do not yield constructive methods to compute the zero set of a given linear recurrence, nor to determine its emptiness. Nonetheless, later work [Berstel and Mignotte 1976] established an effective procedure to explicitly calculate the arithmetic progressions mentioned in the theorem for LRS over the rationals. This immediately renders decidable the problem of deciding finiteness of the zero set of a rational LRS. In a similar vein, it is also decidable whether the zero set of a rational LRS is equal to N, and whether it has a finite complement [Salomaa and Soittola 1978, Section II.12]. Whilst the computation of the infinite component of the zero set is a significant advancement, no effective method is known to compute the finite component or to decide its emptiness. Thus, the decidability of the Skolem Problem remains open and is an outstanding question in number theory and theoretical computer science; see, for example, the exposition of [Tao 2008, Section 3.9]. Efforts towards an upper complexity bound have yielded only partial results: decidability for LRS over A of order at most 3 and for LRS over R ∩ A of order 4 in references [Vereshchagin 1985; Mignotte et al. 1984]. The decision method relies crucially on sophisticated results in transcendental number theory, specifically, Baker’s lower bounds on the magnitudes of linear forms in logarithms of algebraic numbers and van der Poorten’s analogous results in the context of p-adic valuations. Recently, a proof of decidability for LRS of order 5 was announced in [Halava et al. 2005]. However, as pointed out in [Ouaknine and Worrell 2012], the proof incorrectly addresses the case of LRS of the form: un = Aλn1 + Aλn1 + Bλn2 + Bλn2 + Crn , with one real and four complex characteristic roots with magnitudes satisfying |λ1 | = |λ2 | > |r|. Another paper [Litow 1997] claims decidability for all orders, but is also flawed [Ouaknine and Worrell 2012]. In terms of lower bounds, the strongest known result for the Skolem Problem is NP-hardness [Blondel and Portier 2002]. Reference [Litow 1997] claims PSPACEhardness, but this has also been shown incorrect [Ouaknine and Worrell 2012]. C. SKOLEM PROBLEM: MAIN RESULT AND OUTLINE The main technical result of the Appendix of this paper is the following: T HEOREM C.1. Let hun i∞ n=0 be a non-degenerate LRS of order d over A which is not identically zero and whose description has size kuk. (1) If d = 2, then there exists a bound N = ||u||O(1) such that if un = 0, then n < N . (2) If d = 3, then there exists a bound N = 2O(||u||) such that if un = 0, then n < N . O(||u||) (3) If d = 4 and hun i∞ such that n=0 is over R ∩ A, then there exists a bound N = 2 if un = 0, then n < N . Journal of the ACM, Vol. 0, No. 0, Article 0, Publication date: 2016. 0:24 V. Chonev et al. References [Mignotte et al. 1984; Vereshchagin 1985] show the existence of similar bounds, but make no attempt to quantify them in terms of the description of the input, thereby showing the problems decidable, but obtaining no more specific complexity upper bound. Our contribution is to show the bounds are at most exponential in the size of the input, and in fact, polynomial for LRS of order 2. This permits us to obtain the following complexity bounds for the Skolem Problem for rational LRS: T HEOREM C.2. For LRS over Q of order at most 4, the Skolem Problem is in the complexity class NPRP . Further, for LRS over Q of order 2, the problem is in PTIME. Two points need to be addressed: how to reduce from arbitrary LRS to nondegenerate, non-zero LRS, and how to obtain the complexity results of Theorem C.2 from the bounds of Theorem C.1. On the first point, as we showed in Section A.5, the study of arbitrary LRS can be reduced effectively to the non-degenerate case. This uses the technique of partitioning a given LRS into L non-degenerate subsequences, where L = lcm{order(λi /λj ) : λi , λj characteristic roots and λi /λj root of unity }. (15) (j) ∞ Specifically, if hun i∞ n=0 is given, then we consider the sequences hvn in=0 defined by (j) vn = uLn+j for j = 0, . . . , L − 1. These subsequences are non-degenerate, so for the purposes of showing decidability, non-degeneracy may be assumed without loss of generality. However, when attempting to establish a more precise complexity upper bound, the size of L needs to be taken into account. Recall that if α is an algebraic number of degree d and a root of unity of order r, then T n r ≤ 2d2 . In particular, if hun i∞ n=0 is an LRS defined by un = x A y described using kuk = kxk + kAk + kyk bits, and λi , λj are characteristic roots such that λi /λj is a root of unity, then order(λi /λj ) = ||u||O(1) . Since (15) takes the least common multiple of the orders of O(kuk2 ) ratios λi /λj and each order is polynomially large in the size of the input, it follows that L = 2O(||u||). Moreover, this is not an over-approximation: it is easy to construct LRS where the ratios λi /λj are roots of unity of mutually coprime orders, thereby making L at least exponential in the size of the input. Thus, for arbitrary LRS, applying this technique to eliminate non-degeneracy carries an exponential overhead. However, in this paper, we restrict our attention to LRS of order at most 4. Therefore, in (15), the number of ratios considered is bounded by an absolute constant, so L is the least common multiple of a fixed number of polynomially large orders, hence L = ||u||O(1) . Furthermore, if the LRS is over Q, then the degree of each characteristic root λi is at most 4, since we know a priori that the characteristic polynomial of the sequence has rational coefficients. Then the degrees of all ratios λi /λj are also absolutely bounded, so L = O(1). Therefore, in our context of rational LRS of bounded order, non-degeneracy may be obtained by considering a constant number of subsequences, whose matrix representation may be computed from that of hun i∞ n=0 in polynomial time. (j) ∞ Some of the non-degenerate subsequences hvn in=0 could potentially be identically zero, resulting in the zero set of the original degenerate sequence hun i∞ n=0 containing an entire arithmetic progression. For each subsequence, we check directly whether this is the case by examining its first d terms, and if so, then the problem instance is immediately positive. Otherwise, the instance has been reduced to a polynomiallylarge (or constant, in the rational case) number of problem instances, each featuring a non-degenerate LRS which is not the zero sequence. The second point is how to obtain the complexity upper bounds. For non-degenerate n T rational LRS hun i∞ n=0 defined by un = x A y, let N denote the bound provided by Journal of the ACM, Vol. 0, No. 0, Article 0, Publication date: 2016. On the Complexity of the Orbit Problem 0:25 Theorem C.1. If the sequence is of order 2, then N is only polynomial in the size of the input. Thus, we simply calculate un for all n < N . All intermediate results are rational numbers, and we only ever raise A to a polynomially large power, so the representation of all intermediate results stays polynomially bounded. Thus, the PTIME upper bound for LRS of order 2 follows directly. For rational LRS of order 3 or 4, the bound N is at most exponential in the size of the input. We argue the problem is in NPEqSLP , where EqSLP is the complete class for the following problem: given a division-free straight-line program (or equivalently, an arithmetic circuit) producing an integer M , determine whether M = 0. Since the bound N is at most exponentially large in the size of the input, an NP algorithm can guess the index of a purported zero: n ∈ N with n < N . Thus, we only need to verify that un = 0. Direct calculation is not an option, since n is exponential in the size of the input, whilst the entries of An are doubly-exponential in magnitude, requiring an exponential number of bits to write down. However, we can easily represent the entries of An as polynomially-sized arithmetic circuits, using the technique of repeated squaring. Then verifying un = 0 reduces to checking whether a polynomially-large arithmetic circuit evaluates to 0, which can be solved by an EqSLP oracle. The bound NPEqSLP follows directly. Finally, it is known that EqSLP ⊆ coRP [Schönhage 1979], so we also have membership in NPRP , as Theorem C.2 claims. Therefore, all that remains is to prove Theorem C.1. We devote the rest of the Appendix to the technical details of the proof. Sections D, F and G address LRS of order 2, 3 and 4, respectively. Section E shows two applications of Baker’s Theorem which are crucially important for orders 3 and 4. D. LRS OF ORDER TWO In this section, we consider the problem of whether a linear recurrence sequence hun i∞ n=0 of order 2 over A contains zero as a term. The characteristic equation of the recurrence may have one repeated root θ, or two distinct roots θ1 , θ2 . Thus, the n-th term of the sequence is given by one of the following: un = (A + Bn)θn un = Aθ1n + Bθ2n (where A, B, θ ∈ A and B, θ 6= 0) (where A, B, θ1 , θ2 ∈ A and A, B, θ1 , θ2 6= 0) (16) (17) Solving the Skolem Problem for LRS of the form (16) is trivial: simply determine whether the unique root of A + Bx is a natural number. We therefore concentrate on LRS of the form (17). In this case, un = 0 if and only if (θ1 /θ2 )n = −B/A. Thus, the problem reduces to the algebraic number power problem: decide whether there exists n ∈ N such that αn = β (18) hun i∞ n=0 for given α, β ∈ A. The assumption of non-degeneracy of allows us to assume α is not a root of unity3 . The algebraic number power problem is decidable [Halava et al. 2005]. Reference [Kannan and Lipton 1986] proved a polynomial bound on n when β has the form P (α) for a given P ∈ Q[x]. We give a brief recapitulation of the decidability proof of [Halava et al. 2005] and sharpen it to extract a polynomial bound on n. 3 Notice in passing that if α is a root of unity, then the algebraic number power problem is easy to decide: simply determine whether β is an r-th root of unity, where r is the order of α. If this is indeed the case, however, then there exists no bound of the kind promised by Theorem C.1, since αn = β holds periodically. Journal of the ACM, Vol. 0, No. 0, Article 0, Publication date: 2016. 0:26 V. Chonev et al. L EMMA D.1. Suppose α, β ∈ A. If α is not a root of unity, then there exists a bound N such that if (18) holds, then n < N . Moreover, N = ||I||O(1) , where kIk = kαk + kβk is the length of the input. P ROOF. Let K = Q(α, β). If α is not an algebraic integer, then by Lemma A.2 there exists a prime ideal P in the ring OK such that vP (α) 6= 0. Then if αn = β, we have vP (αn ) = nvP (α) = vP (β). If vP (α) and vP (β) have different signs, then we are done. Otherwise, n= vP (β) ≤ |vP (β)| ≤ log2 |NK/Q (β)| ≤ log2 |Nabs (β)|d , vP (α) where d = [Q(α, β) : Q] is at most polynomially large in kαk + kβk. It follows that the bound on n is polynomially large in the length of the input. Suppose therefore that α is an algebraic integer. It is not a root of unity by the premise of the Lemma, so by Theorem A.6 (Blanksby and Montgomery), α has a Galois conjugate σ(α) such that |σ(α)| > 1 + 1 , 30d2 log(6d) where d is the degree of α. This implies 1 < 60d2 log(6d). log |σ(α)| Recall that σ is a monomorphism on K, so σ(αn ) = (σ(α))n . Then if αn = β, we have n= log |σ(β)| < log |σ(β)|60d2 log(6d). log |σ(α)| Observe that if we are given canonical descriptions of α and β, then 60d2 log(6d) is at most polynomially large in kαk, and log |σ(β)| is at most polynomially large in kβk. It follows that the bound on n is polynomial in the length of the input. E. APPLICATION OF BAKER’S THEOREM Before we proceed to LRS of order 3 and 4, we make a brief diversion to show two pertinent applications of Baker’s Theorem. They essentially capture the technically difficult core of the Skolem Problem for LRS of order 3 or 4, so for clarity, they are exhibited here first, prior to their use in the context of LRS. The first application concerns powers λn (n ∈ N) of an algebraic number λ on the unit circle. We show that for large n and any fixed b ∈ A, the distance |λn − b| cannot be ‘too small’, unless λ is a root of unity. L EMMA E.1. Let λ, b ∈ A, where |λ| = 1 and λ is not a root of unity. Suppose φ(n) is a function from N to C for which there exist a, χ ∈ Q such that χ ∈ (0, 1) and |φ(n)| ≤ aχn . There exists a bound N such that if λn = φ(n) + b, (19) then n < N . Moreover, N is at most exponential in the length of the input kIk = kλk + kbk + kak + kχk. P ROOF. The left-hand side of (19) describes points on the unit circle, whereas the right-hand side tends to b. If |b| 6= 1, then for n large enough, the right-hand side of Journal of the ACM, Vol. 0, No. 0, Article 0, Publication date: 2016. On the Complexity of the Orbit Problem 0:27 (19) will always be off the unit circle. This happens when n> log(||b| − 1|/a) . log(χ) The difficult case is when b is on the unit circle. Here we will use Baker’s Theorem to derive a bound on n. Consider the angle Λ between λn and b. Since λ is not a root of unity, by Lemma D.1, this angle can be zero for at most one value of n, which is polynomially large in kIk. Otherwise, write Λ = log λn = n log(λ) − log(b) + 2kn log(−1) 6= 0, b where kn is an integer chosen so that Λ = iτ for some τ ∈ [0, 2π). Then 2n is an upper bound on the height of the coefficients in front of the logarithms (because kn ≤ n), H = max{Hλ , Hb , 3} is a height bound for the arguments to the logarithms and d = max{deg(λ), deg(b)} is a bound on the degrees. Then by Theorem A.4 (Baker-Wüstholz), we have which is equivalent to log |Λ| > −(48d)10 log2 H log(2n), |Λ| > (2n)−(48d) 10 log2 H . This is a lower bound on the length of the arc between λn and b. The length of the chord is at least half of the bound: |λn − b| ≥ |Λ|/2. So in the equation λn − b = φ(n), the left-hand side is bounded below by an inverse polynomial in n. However, the righthand side shrinks exponentially quickly in n. For all n large enough, the right-hand side will be smaller in magnitude than the left-hand side. We will now quantify the bound on n. Let p1 = (48d)10 log2 H and p2 = 2. Observe that p1 , p2 = ||I||O(1) . Then (19) cannot hold if 1 (p2 n)−p1 ≥ aχn , 2 which is equivalent to − log(2) − log(a) − p1 log(p2 ) − p1 log(n) ≥ n log(χ). Define p3 = log(2) + log(a) + p1 log(p2 ) and p4 = max{p3 , p1 } = ||I||O(1) . Then it suffices to have n p4 ≤ , − log(χ) 1 + log(n) which is guaranteed by √ n≥ p4 . − log(χ) Observe that −1/ log(χ) is at most exponentially large in kχk. Therefore, the bound on n is exponential in the size of the input. Continuing in the same line, we next consider two algebraic numbers, λ1 and λ2 , whose powers define discrete trajectories embedded in two circles in the complex plane: aλn1 and bλn2 + c as n varies over N. The following lemma shows that unless λ1 , λ2 are roots of unity, then for large n, the n-th points of the two trajectories are never ‘too close’ to each other. Journal of the ACM, Vol. 0, No. 0, Article 0, Publication date: 2016. 0:28 V. Chonev et al. L EMMA E.2. Suppose λ1 , λ2 , a, b, c ∈ A are non-zero, where |λ1 | = |λ2 | = 1 and λ1 , λ2 are not roots of unity. Let φ(n) be a function from N to C such that 0 < |φ(n)| ≤ wχn for some w, χ ∈ Q, χ ∈ (0, 1). Then there exists a bound N such that if aλn1 = bλn2 + c + φ(n), (20) then n < N . Moreover, N = 2O(||I||), where kIk = kλ1 k+kλ2 k+kak+kbk+kck+kwk+kχk. P ROOF. Multiplying the equation by c/|c||a| allows us to assume that |a| = 1 and c ∈ R+ . Let f (n) = aλn1 , g(n) = bλn2 + c. It is clear that f (n) describes points on the unit circle O1 , whilst g(n) describes points on the circle O2 with centre c on the real line and radius |b|. If these circles do not intersect, then for n large enough, |φ(n)| will be forever smaller than the smallest distance between the circles. This happens when n> log(c − |b| − 1) − log(w) , log(χ) which is an exponential lower bound on n in the size of the input. Suppose now the circles intersect in two points, z1 and z2 . Let L1 be the horizontal line through z1 and L2 the horizontal line through z2 . Let L1 ∩ O1 = {x1 , z1 }, L1 ∩ O2 = {y1 , z1 }, L2 ∩ O1 = {x2 , z2 } and L2 ∩ O2 = {y2 , z2 }. It is trivial that z2 = z1 , x2 = x1 , y2 = y1 . O2 x1 O1 z1 L1 y1 c x2 z2 L2 y2 We first argue that for n large enough, (20) can hold only if for some intersection point zi , ℜ(zi ) lies between ℜ(f (n)) and ℜ(g(n)), or ℑ(zi ) lies between ℑ(f (n)) and ℑ(g(n)). This can only be violated in two symmetric situations: either (1) f (n) is on the arc z1 z2 of O1 which lies inside O2 and g(n) is on the arc y1 y2 of O2 which lies outside O1 , or (2) f (n) is on the arc x1 x2 of O1 which lies outside O2 and g(n) is on the arc z1 z2 of O2 which lies inside O1 . In the first situation, when g(n) is on the arc y1 y2 of O2 outside O1 , we have |f (n) − g(n)| ≥ |g(n)| − 1 ≥ |y1 | − 1. Since the point y1 is strictly to the right of 1 on the complex plane, this lower bound is positive, and moreover it is independent of n, so (20) cannot hold for n large enough Journal of the ACM, Vol. 0, No. 0, Article 0, Publication date: 2016. On the Complexity of the Orbit Problem 0:29 because φ(n) tends to zero exponentially quickly. In particular, (20) does not hold if n> log(|y1 | − 1) − log(w) , log(χ) which is exponentially large in the size of the input. The second situation is analogous. Therefore, we can assume that one of the intersection points zi separates f (n) and g(n) horizontally or vertically in the figure. That is, zi satisfies ℜ(f (n)) ≤ ℜ(zi ) ≤ ℜ(g(n)) or ℑ(f (n)) ≤ ℑ(zi ) ≤ ℑ(g(n)). We will show a lower bound on |f (n)−g(n)| which shrinks slower than exponentially. The real (horizontal) and imaginary (vertical) cases are completely analogous. We show the working for the real case. Assume that ℜ(zi ) lies between ℜ(f (n)) and ℜ(g(n)). Clearly, |f (n) − g(n)| ≥ |ℜ(g(n) − f (n))| = |ℜ(zi − f (n))| + |ℜ(g(n) − zi )|. Let α = arg(λ1 ), γ = arg(a) and β = arg(zi ). Then |ℜ(zi − f (n))| = | cos(nα + γ) − cos(β)| = 2 sin β − nα − γ β + nα + γ sin . 2 2 Let un , vn be appropriately chosen integers so that h π πi β − nα − γ , + un π ∈ − , 2 2 2 Then using the inequality h π πi β + nα + γ . + vn π ∈ − , 2 2 2 | sin(x)| ≥ we have h π πi |x| , for x ∈ − , π 2 2 sin β − nα − γ 1 β − nα − γ + πun , ≥ 2 π 2 sin β + nα + γ 1 β + nα + γ + πvn . ≥ 2 π 2 Both of these expressions are sums of logarithms of algebraic numbers, non-zero for n exceeding a polynomially large bound in kIk by Lemma D.1, so we can give lower bounds for them using Theorem A.4 (Baker-Wüstholz) as in Lemma E.1: |ℜ(zi − f (n))| ≥ (p1 n)−p2 for some p1 , p2 > 0 which are independent of n and at most polynomially large in the input. A similar lower bound holds for |ℜ(g(n) − zi )|. If δ = arg(λ2 ), η = arg(b) and θ = arg(zi − c), we have |ℜ(g(n) − zi )| = |b|(cos(nδ + η) − cos(θ)) ≥ (p3 n)−p4 , where p3 , p4 > 0 are independent of n and have at most polynomial size in the input. Hence we have |f (n) − g(n)| ≥ 2(p5 n)−p6 , where p5 = max{p1 , p3 } and p6 = max{p2 , p4 }. Since φ(n) shrinks exponentially quickly, a bound on n follows past which (20) cannot hold. In the manner of Lemma E.1, we can Journal of the ACM, Vol. 0, No. 0, Article 0, Publication date: 2016. 0:30 V. Chonev et al. show that this bound is exponentially large in the size of the input. The vertical case is analogous, except that considering imaginary parts gives sines instead of cosines, so we shift all angles by π/2 and proceed as above. If the circles are tangent and neither lies inside the other, then the intersection point separates f (n) and g(n) horizontally, so we are done by the above analysis. Finally, suppose that the circles are tangent and one lies inside the other: |b| + c = 1. The argument of f (n) is γ + nα. By the law of cosines applied to the triangle with vertices f (n) and the centres of the circles, we have |f (n) − c|2 = c2 + 1 − 2c cos(γ + nα). Therefore, the shortest distance from f (n) to a point on O2 is p h(n) = c2 + 1 − 2c cos(γ + nα) − (1 − c). p Let A(n) = c2 + 1 − 2c cos(γ + nα) and B = 1 − c. Since A ≤ 1 + c, we have A + B ≤ 2, so h(n) = A − B = A2 − B 2 ≥ c(1 − cos(γ + nα)) A+B Let kn be an integer, so that γ + nα + kn 2π ∈ [−π, π). By Lemma D.1, this is zero for at most one, polynomially large in kIk, value of n. For larger n, a lower bound on this angle follows from Theorem A.4 (Baker-Wüstholz): |γ + nα + kn 2π| ≥ (p7 n)−p8 for some constants p7 , p8 > 0 which are polynomially large in the input. Then cos(γ + nα) ≤ cos((p7 n)−p8 ), so h(n) ≥ c(1 − cos((p7 n)−p8 )). From the Taylor expansion of cos(x), it follows easily that 1 − cos(x) ≥ 11 2 x for x ≤ 1. 24 Since p7 , p8 ≥ 1, we have (p7 n)−p8 ≤ 1. Therefore, h(n) ≥ c 11 (p7 n)−2p8 . 24 This lower bound on h(n) shrinks inverse-polynomially as n grows. Recall that h(n) is the smallest distance from f (n) to O2 . It follows that for n large enough, |φ(n)| < h(n) forever, so f (n) = g(n) + φ(n) cannot hold. In the manner of Lemma E.1, we can show that the bound on n is exponentially large in the input. F. LRS OF ORDER THREE We now move to the problem of determining whether a linear recurrence sequence hun i∞ n=0 of order 3 over A contains zero as an element. The characteristic equation of such a sequence may have either three distinct (real or complex) roots, or one repeated real root and one simple real root, or one real root of multiplicity 3. Thus, the n-th Journal of the ACM, Vol. 0, No. 0, Article 0, Publication date: 2016. On the Complexity of the Orbit Problem 0:31 element of the sequence is given by one of the following: un = Aαn + Bβ n + Cγ n un = (A + Bn)αn + Cβ n un = (Cn2 + Bn + A)αn (where A, B, C, α, β, γ ∈ A are all non-zero) (where A, B, C, α, β ∈ A with B, C, α, β 6= 0) (where A, B, C, α ∈ A with C, α 6= 0) (21) (22) (23) Finding the zeros of LRS of the form (23) is trivial: simply check whether the quadratic Cn2 + Bn + A has roots which are natural numbers. Thus, we focus on the remaining two possibilities. We will consider only non-degenerate sequences: the ratios of the roots α, β, γ are not roots of unity. First we consider hun i∞ n=0 given by (21). Notice that A, B, C, α, β, γ are all non-zero, otherwise the sequence satisfies a recurrence relation of lower order. Thus, we can rearrange un = 0 to obtain:  n β C  γ n A =− − . (24) α B α B Assume without loss of generality |α| ≥ |β| ≥ |γ|. In Lemmas F.1, F.2, F.3 below, we consider separately the cases |α| > |β|, |α| = |β| > |γ| and |α| = |β| = |γ|, and obtain a bound on n which is exponential in the length of the description of the sequence and beyond which un = 0 cannot hold. L EMMA F.1. Suppose hun i∞ n=0 is given by (21). If |α| > |β|, then there exists a bound N such that if un = 0, then n < N . Moreover, N = 2O(||I||), where kIk is the length of the input kAk + kBk + kCk + kαk + kβk + kγk. P ROOF. This follows straightforwardly from the dominance of α. If   log |A/2B| log |A/2C| n > max , , log |β/α| log |γ/α| then B − A  n  n β C  γ n B β C  γ n 1 1 − ≤ + < + = 1. α A α A α A α 2 2 L EMMA F.2. Suppose hun i∞ n=0 is given by (21). If |α| = |β| > |γ|, then there exists a bound N such that if un = 0, then n < N . Moreover, N = 2O(||I||), where kIk is the length of the input kAk + kBk + kCk + kαk + kβk + kγk. P ROOF. This is a direct application of Lemma E.1 to equation (24). L EMMA F.3. Suppose hun i∞ n=0 is given by (21). If |α| = |β| = |γ|, there exist at most two values of n such that un = 0. Moreover, they are at most exponential in the length of the input kAk + kBk + kCk + kαk + kβk + kγk and are computable in polynomial time. P ROOF. The left-hand side of (24) as a function of n describes points on the unit circle in the complex plane, whereas the right-hand side describes points on a circle centred at −A/B with radius |C/B|. Note these circles do not coincide, because A 6= 0. We can obtain their equations and compute their intersection point(s). If they do not intersect, then equation (24) can never hold. Otherwise, the equation can only hold if the two sides are simultaneously equal to the same intersection point. For each of the (at most two) intersection points θ, let   n  β S1 = n =θ , α Journal of the ACM, Vol. 0, No. 0, Article 0, Publication date: 2016. 0:32 V. Chonev et al. S2 =   C  γ n A − =θ . n − B α B Observe that |Si | ≤ 1, because β/α and γ/α are not roots of unity. We compute S1 and S2 from the bound in Lemma D.1 and check whether S1 ∩ S2 is non-empty. Next, we consider LRS of the form (22). We will assume that B, C, α, β are all nonzero, otherwise the sequence satisfies a linear recurrence of lower order. L EMMA F.4. Suppose hun i∞ n=0 is given by (22). There exists a bound N such that if un = 0, then n < N . Moreover, N = 2O(||I||), where kIk is the length of the input kAk + kBk + kCk + kαk + kβk. P ROOF. We wish to solve for n ∈ N the equation: (A + Bn)αn + Cβ n = 0. If |α| ≥ |β|, then for n> we have so (25) |A| + |C| , |B| |C| < |B|n − |A| ≤ |A + Bn|, |Cβ n | < |(A + Bn)αn |, therefore (25) cannot hold. Now suppose |α| > |β| and rewrite (25) as  n A + Bn β . =− C α Equation (25) implies β α n = A + Bn A B ≤ + n. C C C However, we will show that for all n large enough, this fails to hold. Indeed, the inequality β α n > A B + n C C is implied by d (n + 1) < β α n , where d = max{|A/C|, |B/C|}. Taking logarithms, we see that it suffices to have f n > , 1 + log(n + 1) log |β/α| √ where f = max{log(d), 1}. Noting that 1 + log(n + 1) < 2 n for all n ≥ 1, we see that it suffices to have n > 4f 2 / log2 |β/α| to guarantee that (25) cannot hold. This is an exponential bound on n in the length of the input. Journal of the ACM, Vol. 0, No. 0, Article 0, Publication date: 2016. On the Complexity of the Orbit Problem 0:33 G. LRS OF ORDER FOUR We now proceed to the problem of determining whether a linear recurrence sequence hun i∞ n=0 of order 4 over A contains zero as an element. As before, we assume nondegeneracy of the sequence. Depending on the roots of the characteristic polynomial, the n-th term of the sequence is given by one of the following (where A, B, C, D, α, β, γ, δ are algebraic): un = Aαn + Bβ n + Cγ n + Dδ n un = (A + Bn)αn + Cβ n + Dγ n un = (A + Bn)αn + (C + Dn)β n un = (A + Bn + Cn2 )αn + Dβ n 2 3 (where A, B, C, D 6= 0) (where B, C, D 6= 0) (where B, D 6= 0) (26) (27) (28) (where D 6= 0) (30) (where C, D 6= 0) n un = (A + Bn + Cn + Dn )α hun i∞ n=0 (29) Solving un = 0 in the case of given by (30) is trivial: just calculate canonical descriptions of the roots of A + Bx + Cx2 + Dx3 and check whether any are natural numbers. In the case of hun i∞ n=0 given by (29), rearrange un = 0 as  n α (A + Bn + Cn2 ) = −D. β The left-hand side tends to 0 or ∞ in magnitude, depending on whether |α| < |β|. In both cases, since C, D 6= 0, a bound on n follows which is at most exponential in the size of the input. The remaining three cases, where hun i∞ n=0 is of the form (26), (27) or (28) are more involved. They are the subject of Lemmas G.1, G.2, G.3 and G.4, which show the existence of a bound N which is at most exponentially large in the size of the input and beyond which un = 0 cannot hold. Note that for complex algebraic LRS given by (26) with characteristic roots all of the same magnitude, the Skolem Problem is not known to be decidable. Thus, our final technical result, Lemma G.4 will require the simplifying assumption that un ∈ R ∩ A for all n. This is the only reason why Theorem C.1 insists that LRS of order 4 be real algebraic. In all other cases, as shown by Lemmas G.1, G.2 and G.3, an exponential bound on n exists even for complex algebraic LRS. L EMMA G.1. Suppose hun i∞ n=0 is non-degenerate and is given by (28). There exists a bound N = 2O(||I||) such that if un = 0, then n < N , where kIk is the length of the input kAk + kBk + kCk + kDk + kαk + kβk. P ROOF. We wish to solve for n ∈ N the equation: Rearrange (31) as (A + Bn)αn + (C + Dn)β n = 0 (where B, D 6= 0). λn = − (C + Dn) , (A + Bn) (31) (32) where λ = α/β is not a root of unity. The right-hand side of (32) tends to −D/B as n tends to infinity. If λ is an algebraic integer, then by Theorem A.6 (Blanksby and Montgomery), it has a Galois conjugate σ(λ) such that |σ(λ)| > 1 + 1 , 30d2 log(6d) Journal of the ACM, Vol. 0, No. 0, Article 0, Publication date: 2016. 0:34 V. Chonev et al. where d is the degree of λ. Assume the monomorphism σ has been applied to both sides of (32), so |λ| is bounded away from 1 by an inverse polynomial in the size of the input. By the triangle inequality, if n≥ then |BC| + |AD| + |AB| def = N1 = 2O(||I||), |B|2 D |D|n + |C| C + Dn ≤ ≤ + 1. A + Bn |B|n − |A| B Following the reasoning of Lemma D.1 and relying on the Blansky and Montgomery bound, we see there exists a bound N2 ∈ ||I||O(1) such that if n > N2 , then |λn | > |D/B| + 1. Therefore, for n > max{N1 , N2 } = 2O(||I||), equation (32) cannot hold. Second, suppose λ is not an algebraic integer. Then by Lemma A.2 there exists a prime ideal P in the ring of integers of K = Q(α, β, A, B, C, D) such that vP (λ) 6= 0. Without loss of generality, we can assume vP (λ) > 0 (if vP (λ) < 0, swap α with β, A with C, and B with D). Applying vP to (32) gives vP (λn ) = nvP (λ)   C + Dn = vP − A + Bn   C + Dn ≤ log NK/Q − A + Bn   C + Dn ≤ [K : Q] log Nabs − A + Bn [K:Q] = [K : Q] log Y σi (C) + σi (D)n , σi (A) + σi (B)n i=1 where σ1 , . . . , σ[K:Q] are the monomorphisms from K into C. As in the previous case, if n> then we have |σi (BC)| + |σi (AD)| + |σi (AB)| def = Ni = 2O(||I||), |σi (B)|2 σi (C) + σi (D)n σi (D) def ≤ + 1 = ei = 2O(||I||). σi (A) + σi (B)n σi (B) It follows therefore that if n > maxi {Ni }, we have   [K:Q] X C + Dn def log ei = M = ||I||O(1) . ≤ [K : Q] vP − A + Bn i=1 Then for n > maxi {Ni } and n > M , we have whereas so equation (32) cannot hold. vP (λn ) = nvP (λ) ≥ n > M,   C + Dn ≤ M, vP − A + Bn Journal of the ACM, Vol. 0, No. 0, Article 0, Publication date: 2016. On the Complexity of the Orbit Problem 0:35 L EMMA G.2. Suppose hun i∞ n=0 is non-degenerate and is given by (27). There exists a bound N = 2O(||I||) such that if un = 0, then n < N , where kIk is the length of the input kAk + kBk + kCk + kDk + kαk + kβk + kγk. P ROOF. We wish to solve for n ∈ N the equation: (A + Bn)αn + Cβ n + Dγ n = 0 (where B, C, D 6= 0). (33) n First suppose |α| ≥ |β|, |γ|. Then the term (A + Bn)α is dominant. More precisely, rewrite (33) as  n  γ n β −D A + Bn = −C α α and observe that if n> then |A| + |C| + |D| , |B| |A + Bn| ≥ |B|n − |A| > |C| + |D| ≥ −C  n  γ n β −D , α α so (33) cannot hold due to the strictness of the above inequality. Second, suppose that |β| > |α|, |γ|. Then the term Cβ n is dominant. More precisely, rewrite (33) as  n  n γ α +D = −C. (34) (A + Bn) β β We show that for n sufficiently large, the inequalities  n γ |C| D < β 2 and (A + Bn)  n |C| α < β 2 both hold, rendering (34) impossible. The former inequality holds for n > log |C/2D|/ log |γ/β|, which is at most exponentially large in the input. The latter inequality is implied by  n α |C| (n + 1) < , β 2M where M = max{|A|, |B|}. Now let r = ⌈− log(2)/ log(α/β)⌉, so that  r α 1 ≤ , β 2 and consider only n of the form n = kr for k ∈ Z+ . If k> and k ≥ 5, we have log |C/4M r| log(7/8)  k  k  kr |C| 1 7 α k< (k + 1) < < , β 2 8 4M r Journal of the ACM, Vol. 0, No. 0, Article 0, Publication date: 2016. 0:36 V. Chonev et al. so  n  n |C| α α (n + 1) ≤ 2n < . β β 2M It is clear that r is at most exponentially large in the size of the input, whereas the bound on k is polynomial. Therefore, the bound on n is exponential. Finally, suppose |β| = |γ| > |α|. Rewrite (33) as  n  n β D A + Bn α =− − . γ C C γ Then an exponential bound on n follows from Lemma E.1, because the right-hand side is a constant plus an exponentially decaying term, whereas the left-hand side is on unit circle. L EMMA G.3. Suppose hun i∞ n=0 is non-degenerate and is given by (26). Suppose that α, β, γ, δ do not all have the same magnitude. There exists a bound N = 2O(||I||) such that if un = 0, then n < N , where kIk is the length of the input kAk + kBk + kCk + kDk + kαk + kβk + kγk + kδk. P ROOF. We wish to solve for n ∈ N the equation: Aαn + Bβ n + Cγ n + Dδ n = 0 (where A, B, C, D 6= 0). (35) n Let |α| ≥ |β| ≥ |γ| ≥ |δ|. First, if |α| > |β|, then Aα is the dominant term in (35). Rewrite the equation as  n  n B β C  γ n D δ + + = −1 A α A α A α and observe that if n > max then B A  log |3B/A| log |3C/A| log |3D/A| , , log |α/β| log |α/γ| log |α/δ|  ,  n  n β C  γ n D δ 1 1 1 + + < + + = 1. α A α A α 3 3 3 Second, if |α| = |β| > |γ|, then rewrite (35) as  n  n β A C  γ n D δ =− − . − α B B α B α (36) The left-hand side of (36) is on the unit circle, whereas the right is a constant plus exponentially decaying terms. An exponential bound on n follows from Lemma E.1. Finally, if |α| = |β| = |γ| > |δ|, then an exponential bound on n follows from Lemma E.2 applied to equation (36). Thus, the only outstanding problem is to solve un = 0 in the case of hun i∞ n=0 given by (26) when |α| = |β| = |γ| = |δ|. This case is difficult for general algebraic α, β, γ, δ: it is in fact the reason why the Skolem Problem is open for LRS of order 4 over A. However, for real LRS, the set of characteristic roots is closed under complex conjugation, so complex roots come in conjugate pairs. Another simplifying observation which is helpful for this last outstanding case is ∞ that for any LRS hun i∞ n=0 over A, one can find another LRS hvn in=0 over OA such that un = 0 if and only if vn = 0. Indeed, recall that for any algebraic number α, it is Journal of the ACM, Vol. 0, No. 0, Article 0, Publication date: 2016. On the Complexity of the Orbit Problem 0:37 possible to find an algebraic integer β and a rational integer M such that α = β/M : it is sufficient to choose M to be the least common multiple of all denominators of the coefficients of the minimal polynomial of α. Then suppose the sequence hun i∞ has Pd−1 n=0 initial terms u0 , . . . , ud−1 ∈ A and satisfies a recurrence equation un = j=0 aj un−j−1 with a0 , . . . , ad−1 ∈ A. Let M ∈ Z be chosen so that M aj ∈ OA and M uj ∈ OA for n+1 un j = 0, . . . , d−1. Then it is easy to see that the sequence hvn i∞ n=0 defined by vn = M has the same zero set as hun i∞ , has algebraic integer initial terms and satisfies a n=0 linear recurrence relation of order d with algebraic integer coefficients. Since M can be written down using only polynomial space, this reduction to the integer case can be carried out in polynomial time. Therefore, by the integral closure of OA , we can assume the characteristic roots α, β, γ, δ are algebraic integers. With these two observations in place, we proceed to the final technical result concerning the Skolem Problem for LRS of order 4 over R ∩ A: L EMMA G.4. Suppose hun i∞ n=0 is non-degenerate and is given by (26). Suppose that α, β, γ, δ are algebraic integers with |α| = |β| = |γ| = |δ|. Suppose also {α, β, γ, δ} is closed under complex conjugation. There exists a bound N = 2O(||I||) such that if un = 0, then n < N , where kIk is the length of the input kAk + kBk + kCk + kDk + kαk + kβk + kγk + kδk. P ROOF. Let K = Q(α, β, γ, δ, A, B, C, D). We have to solve for n ∈ N the equation: Aαn + Bβ n + Cγ n + Dδ n = 0 (where A, B, C, D 6= 0). (37) The closure of {α, β, γ, δ} under complex conjugation, the equality |α| = |β| = |γ| = |δ| and the non-degeneracy of the LRS imply that the characteristic roots are two pairs of complex conjugates, so assume without loss of generality that β = α and γ = δ. If α/β is an algebraic integer, then since it is not a root of unity, there exists a monomorphism σ from K to C such that |σ(α)| 6= |σ(β)|. Applying σ to (37) leads to a Skolem instance of order 4 with roots whose magnitudes are not all the same. A bound on n follows from Lemma G.3. Suppose then that α/β is not an algebraic integer. By the reasoning of Lemma A.2, there exists a prime ideal P in OK such that vP (α) 6= vP (β) and at least one of vP (α) and vP (β) is strictly positive. Assume without loss of generality that Since αβ = γδ = |α|2 , we have vP (α) > vP (β) ≥ 0. vP (α) + vP (β) = vP (γ) + vP (δ). Therefore, at most two of the roots are smallest under the valuation vP . If one root, say β, is strictly smaller under vP than the rest, then rewrite (37) as Aαn + Bβ n = −Cγ n − Dδ n (38) Since vP (β) < vP (α), for n > vP (A/B)/vP (β/α) we have vP (Aαn + Bβ n ) = vP (B) + nvP (β), whereas vP (−Cγ n − Dδ n ) ≥ vP (C) + nvP (γ). Therefore, for n > vP (B/C)/vP (γ/β), we have that the left-hand side of (38) is strictly smaller under vP than the right-hand side, so (37) cannot hold. This bound on n is polynomial in the input size. Journal of the ACM, Vol. 0, No. 0, Article 0, Publication date: 2016. 0:38 V. Chonev et al. Now suppose that there are two roots with strictly smallest valuation with respect to vP : 0 ≤ vP (β) = vP (γ) < vP (α) = vP (δ). Then rewrite (37) as   n   γ C − 1 = Aαn + Dδ n . (39) − Bβ n B β Since γ/β is not a root of unity, the term (−C/B)(γ/β)n − 1 can be zero for at most one value of n. This value is at most polynomially large in the input size (by Lemma D.1). For all other n, we use Theorem A.5 to this term. Let p be the unique prime rational integer in the ideal P , and let d = [K : Q]. Let H be an upper bound for the heights of −C/B and γ/β. Then by Theorem A.5 (van der Poorten), we have    n  C γ pd − vP − 1 ≤ (48d)36 (log H)2 (log n)2 . (40) B β log p It is classical that N (P ) = pf for some positive integer f , so N (P ) ≥ p. Moreover, since α is an algebraic integer, all prime ideals P1 , . . . , Ps in the factorisation of [α] appear with positive exponents k1 , . . . , ks : [α] = P1k1 . . . Psks . Since N (Pi ) ≥ 2 for all Pi , we have |NK/Q (α)| = N ([α]) ≥ N (P ) ≥ p. Therefore, p is at most exponentially large in the input size. Then we can write (40) as   n   C γ − − 1 ≤ E1 (log n)2 , vP B β where E1 is exponentially large in the input size and independent of n. Now we apply vP to both sides of equation (39): and vP (LHS ) ≤ vP (B) + nvP (β) + E1 (log n)2 Equation (37) cannot hold if vP (RHS ) ≥ vP (A) + nvP (α). vP (B) + nvP (β) + E1 (log n)2 < vP (A) + nvP (α), which is implied by vP (B/A) + E1 (log n)2 < n, since vP (α) > vP (β). Let E2 = max{vP (B/A), E1 }, then this is implied by E2 ((log n)2 + 1) < n. Since (log n)2 + 1 < for all n ≥ 1, it suffices to have √ 5 n 2 2 5 E2 . 2 This bound on n is exponential in the size of the input. n>  Journal of the ACM, Vol. 0, No. 0, Article 0, Publication date: 2016. On the Complexity of the Orbit Problem 0:39 REFERENCES V. Arvind and T. Vijayaraghavan. 2011. The orbit problem is in the GapL hierarchy. J. Comb. Optim. 21, 1 (2011), 124–137. Alan Baker. 1975. Transcendental number theory. Cambridge University Press, Cambridge. A. Baker and G. Wüstholz. 1993. Logarithmic Forms and Group Varieties. Jour. Reine Angew. Math. 442 (1993), 19–62. Amir M Ben-Amram, Samir Genaim, and Abu Naser Masud. 2012. On the termination of integer loops. ACM Transactions on Programming Languages and Systems (TOPLAS) 34, 4 (2012), 16. Jean Berstel and Maurice Mignotte. 1976. Deux propriétés décidables des suites récurrentes linéaires. Bulletin de la Société Mathématique de France 104 (1976), 175–184. P. Blanksby and H. Montgomery. 1971. Algebraic integers near the unit circle. Acta Arith. (1971), 355–369. Vincent D. Blondel and Natacha Portier. 2002. The presence of a zero in an integer linear recurrent sequence is NP-hard to decide. Linear Algebra Appl. 351 (2002), 91 – 98. M. Braverman. 2006. Termination of Integer Linear Programs. In Proceedings of the 18th International Conference on Computer Aided Verification (CAV, LNCS 4144). Springer, 372–385. Jin-yi Cai, Richard J Lipton, and Yechezkel Zalcstein. 2000. The complexity of the ABC problem. SIAM J. Comput. 29, 6 (2000), 1878–1888. Ventsislav Chonev, Joël Ouaknine, and James Worrell. 2013. The orbit problem in higher dimensions. In STOC. ACM, 941–950. Ventsislav Chonev, Joël Ouaknine, and James Worrell. 2015. The Polyhedron-hitting Problem. In Proceedings of the Twenty-Sixth Annual ACM-SIAM Symposium on Discrete Algorithms (SODA ’15). SIAM, 940–956. http://dl.acm.org/citation.cfm?id=2722129.2722193 H. Cohen. 1993. A Course in Computational Algebraic Number Theory. Springer. Graham Everest, Alf van der Poorten, Thomas Ward, and Igor Shparlinski. 2003. Recurrence Sequences. American Mathematical Society. Emmanuel Hainry. 2008. Reachability in linear dynamical systems. In Logic and Theory of Algorithms. Springer, 241–250. V. Halava, T. Harju, M. Hirvensalo, and J. Karhumäki. 2005. Skolem’s Problem – On the Border between Decidability and Undecidability. Technical Report 683. Turku Centre for Computer Science. G. Hansel. 1986. Une démonstration simple du théorème de Skolem-Mahler-Lech. Theoretical Computer Science 43 (1986), 91 – 98. Michael A. Harrison. 1969. Lectures on Linear Sequential Machines. New York: Academic Press. R. Kannan and R. Lipton. 1986. Polynomial-Time Algorithm for the Orbit Problem. J. ACM 33, 4 (1986), 808–821. Ravindran Kannan and Richard J. Lipton. 1980. The orbit problem is decidable. In Proceedings of the twelfth annual ACM symposium on Theory of computing (STOC). ACM, 252–261. L. Kronecker. 1875. Zwei Sätze über Gleichungen mit ganzzahligen Koeffizienten. J. Reine Angew. Math. 53 (1875), 173–175. Christer Lech. 1953. A note on recurring series. Arkiv för Matematik 2 (1953), 417–421. A. K. Lenstra, H. W. Lenstra, and L. Lovász. 1982. Factoring polynomials with rational coefficients. Math. Ann. 261 (1982), 515–534. B Litow. 1997. A decision method for the rational sequence problem. In Electronic Colloquium on Computational Complexity (ECCC), Vol. 4. K. Mahler. 1935. Eine arithmetische Eigenschaft der Taylor-Koeffizienten rationaler Funktionen. Proc. Akad. Wet. Amsterdam 38 (1935), 51–60. K. Mahler and J. W. S. Cassels. 1956. On the Taylor coefficients of rational functions. Mathematical Proceedings of the Cambridge Philosophical Society 52 (1 1956), 39–48. Issue 01. DOI:http://dx.doi.org/10.1017/S0305004100030966 M. Mignotte. 1982. Some Useful Bounds. Computer Algebra (1982), 259–263. M. Mignotte, T. Shorey, and R. Tijdeman. 1984. The distance between terms of an algebraic recurrence sequence. Jour. Reine Angew. Math. 349 (1984), 63 – 76. Joël Ouaknine and James Worrell. 2012. Decision Problems for Linear Recurrence Sequences. In Reachability Problems, Alain Finkel, Jérôme Leroux, and Igor Potapov (Eds.). Lecture Notes in Computer Science, Vol. 7550. Springer Berlin Heidelberg, 21–28. DOI:http://dx.doi.org/10.1007/978-3-642-33512-9_3 V. Pan. 1996. Optimal and nearly optimal algorithms for approximating polynomial zeros. Computers & Mathematics with Applications 31, 12 (1996), 97 – 138. Journal of the ACM, Vol. 0, No. 0, Article 0, Publication date: 2016. 0:40 V. Chonev et al. Arto Salomaa and Matti Soittola. 1978. Automata-theoretic aspects of formal power series. Springer-Verlag Berlin. Arnold Schönhage. 1979. On the power of random access machines. In Automata, Languages and Programming, Hermann Maurer (Ed.). Lecture Notes in Computer Science, Vol. 71. Springer Berlin / Heidelberg, 520–529. Th. Skolem. 1934. Ein Verfahren zur Behandlung gewisser exponentialer Gleichungen und diophantischer Gleichungen. Skand. Mat. Kongr. 8 (1934), 163–188. I. Stewart and D. Tall. 2002. Algebraic Number Theory and Fermat’s Last Theorem (3rd ed.). A. K. Peters. T. Tao. 2008. Structure and randomness: pages from year one of a mathematical blog. American Mathematical Society. Sergey Tarasov and Mikhail Vyalyi. 2011. Orbits of Linear Maps and Regular Languages. In Computer Science – Theory and Applications, Alexander Kulikov and Nikolay Vereshchagin (Eds.). Lecture Notes in Computer Science, Vol. 6651. Springer Berlin Heidelberg, 305–316. DOI:http://dx.doi.org/10.1007/978-3-642-20712-9_24 Ashish Tiwari. 2004. Termination of linear programs. In Computer Aided Verification. Springer, 70–82. Alfred Jacobus van der Poorten. 1977. Linear forms in logarithms in the p-adic case. Transcendence Theory: Advances and Applications (1977), 29–57. N. Vereshchagin. 1985. Occurrence of zero in a linear recursive sequence. Mathematical Notes 38 (1985), 609–615. Richard Zippel. 1997. Zero testing of algebraic functions. Inform. Process. Lett. 61, 2 (1997), 63 – 67. Journal of the ACM, Vol. 0, No. 0, Article 0, Publication date: 2016.
8cs.DS
An Open Challenge Problem Repository for Systems Supporting Binders Amy Felty Alberto Momigliano Brigitte Pientka School of Electrical Engineering and Computer Science University of Ottawa Ottawa, Canada [email protected] Dipartimento di Informatica Università degli Studi di Milano Milano, Italy [email protected] School of Computer Science McGill University Montreal, Canada [email protected] A variety of logical frameworks support the use of higher-order abstract syntax in representing formal systems; however, each system has its own set of benchmarks. Even worse, general proof assistants that provide special libraries for dealing with binders offer a very limited evaluation of such libraries, and the examples given often do not exercise and stress-test key aspects that arise in the presence of binders. In this paper we design an open repository ORBI (Open challenge problem Repository for systems supporting reasoning with BInders). We believe the field of reasoning about languages with binders has matured, and a common set of benchmarks provides an important basis for evaluation and qualitative comparison of different systems and libraries that support binders, and it will help to advance the field. 1 Introduction A variety of logical frameworks support the use of higher-order abstract syntax (HOAS) in representing formal systems; however, each system has its own set of benchmarks, often encoding the same object logics with minor differences. Even worse, general proof assistants that provide special libraries for dealing with binders often offer only a very limited evaluation of such libraries, and the examples given often do not exercise and stress-test key aspects that arise in the presence of binders. The P OPL M ARK challenge [2] was an important milestone in surveying the state of the art in mechanizing the meta-theory of programming languages. We ourselves proposed several specific benchmarks [8] that are crafted to highlight the differences between the designs of various meta-languages with respect to reasoning with and within a context of assumptions, and we compared their implementation in four systems: the logical framework Twelf [23], the dependently-typed functional language Beluga [17, 18], the two-level Hybrid system [6, 15] as implemented on top of Coq and Isabelle/HOL, and the Abella system [10]. Finally, several systems that support reasoning with binders, in particular systems concentrating on modeling binders using HOAS, also provide a large collection of examples and case studies. For example, Twelf’s wiki (http://twelf.org/wiki/Case_studies), Abella’s library (http://abella-prover.org/examples), Beluga’s distribution, and the Coq implementation of Hybrid (http://www.site.uottawa.ca/~afelty/HybridCoq/) contain sets of examples that highlight the many issues surrounding binders. As the field matures, we believe it is important to be able to systematically and qualitatively evaluate approaches that support reasoning with binders. Having benchmarks is a first step in this direction. In this paper, we propose a common infrastructure for representing challenge problems and a central, Open challenge problem Repository for systems supporting reasoning with BInders (ORBI) for sharing benchmark problems based on the notation we have developed. I. Cervesato and K. Chaudhuri (Eds.): Tenth International Workshop on Logical Frameworks and Meta-Languages: Theory and Practice EPTCS 185, 2015, pp. 18–32, doi:10.4204/EPTCS.185.2 c A. Felty, A. Momigliano & B. Pientka This work is licensed under the Creative Commons Attribution License. A. Felty, A. Momigliano & B. Pientka 19 ORBI is designed to be a human-readable, easily machine-parsable, uniform, yet flexible and extensible language for writing specifications of formal systems including grammar, inference rules, contexts and theorems. The language directly upholds HOAS representations and is oriented to support the mechanization of benchmark problems in Twelf, Beluga, Abella, and Hybrid, without hopefully precluding other existing or future HOAS systems. At the same time, we hope it also is amenable to translations to systems using other representation techniques such as nominal ones. We structure the language in two parts: 1. the problem description, which includes the grammar of the object language syntax, inference rules, context schemas, and context relations 2. the logic language, which includes syntax for expressing theorems and directives to ORBI2X1 tools. We begin in Sect. 2 with a running example. We consider the untyped lambda-calculus as an object logic (OL), and present the syntax, some judgments, and sample theorems. In Sect. 3, we present ORBI by giving its grammar and explaining how it is used to encode our running example; Sect. 3.1 and Sect. 3.2 present the two parts of this specification as discussed above. We discuss related work in Sect. 4. We consider the notation that we present here as a first attempt at defining ORBI (Version 0.1), where the goal is to cover the benchmarks considered in [8]. As new benchmarks are added, we are well aware that we will need to improve the syntax and increase the expressive power—we discuss limitations and some possible extensions in Sect. 5. 2 A Running Example The first question that we face when defining an OL is how to describe well-formed objects. Consider the untyped lambda-calculus, defined by the following grammar: M ::= x | lam x. M | app M1 M2 . To capture additional information that is often useful in proofs, such as when a given term is closed, it is customary to give inference rules in natural deduction style for well-formed terms using hypothetical and parametric judgments. However, it is often convenient to present hypothetical judgments in a localized form, reducing some of the ambiguity of the two-dimensional natural deduction notation, and providing more structure. We therefore introduce an explicit context for bookkeeping, since when establishing properties about a given system, it allows us to consider the variable case(s) separately and to state clearly when considering closed objects, i.e., an object in the empty context. More importantly, while structural properties of contexts are implicitly present in the natural deduction presentation of inference rules (where assumptions are managed informally), the explicit context presentation makes them more apparent and highlights their use in reasoning about contexts. is tm x ∈ Γ tm v Γ ⊢ is tm x 1 Following Γ, is tm x ⊢ is tm M tml Γ ⊢ is tm (lam x. M) Γ ⊢ is tm M1 Γ ⊢ is tm M2 tma Γ ⊢ is tm (app M1 M2 ) TPTP’s nomenclature [25], we call “ORBI2X” any tool taking an ORBI specification as input; for example, the translator for Hybrid described in [13] turns syntax, inference rules, and context definitions of ORBI into input to the Coq version of Hybrid, and it is designed so that it can be adapted fairly directly to output Abella scripts. ORBI 20 Traditionally, a context of assumptions is characterized as a sequence of formulas A1 , A2 , . . . , An listing its elements separated by commas [12, 19]. In [7], we argue that this is not expressive enough to capture the structure present in contexts, especially when mechanizing object logics, and we define context schemas to introduce the required extra structure: Atom A Block of declarations D ::= A | D; A Context Γ ::= · | Γ, D Schema S ::= Ds | Ds + S A context is a sequence of declarations D where a declaration is a block of individual atomic assumptions separated by ’;’.2 The ’;’ binds tighter than ’,’. We treat contexts as ordered, i.e., later assumptions in the context may depend on earlier ones, but not vice versa—this in contrast to viewing contexts as multi-sets. Just as types classify terms, a schema will classify meaningful structured sequences. A schema consists of declarations Ds , where we use the subscript s to indicate that the declaration occurring in a concrete context having schema S may be an instance of Ds . We use + to denote the alternatives in a context schema. For well-formed terms, contexts have a simple structure where each block contains a single atom, expressed as the following schema declaration: Sx := is tm x. We write Φx to represent a context satisfying schema Sx (and similarly for other context schemas appearing in this paper). Informally, this means that Φx has the form is tm x1 , . . . , is tm xn where n ≥ 0 and x1 , . . . , xn are distinct variables. (See [7] for a more formal account.) For our running example, we consider two more simple judgments. The first is algorithmic equality for the untyped lambda-calculus, written (aeq M N). We say that two terms are algorithmically equal provided they have the same structure with respect to the constructors. aeq x x ∈ Γ aev Γ ⊢ aeq x x Γ, is tm x; aeq x x ⊢ aeq M N ael Γ ⊢ aeq (lam x. M) (lam x. N) Γ ⊢ aeq M1 N1 Γ ⊢ aeq M2 N2 aea Γ ⊢ aeq (app M1 M2 ) (app N1 N2 ) The second is declarative equality written (deq M N), which includes versions of the above three rules called dev , del , and dea , where aeq is replaced by deq everywhere, plus reflexivity, symmetry and transitivity shown below.3 Γ ⊢ deq M M der Γ ⊢ deq N M des Γ ⊢ deq M N Γ ⊢ deq M L Γ ⊢ deq L N det Γ ⊢ deq M N These judgments give rise to the following schema declarations: Sxa := is tm x; aeq x x Sxd := is tm x; deq x x Sda := is tm x; deq x x; aeq x x 2 This is an oversimplification, since there are well-known specifications where contexts have more structure, see the solution to the P OPL M ARK challenge in [16] and the examples in [26]. In fact, those are already legal ORBI specs. 3 We acknowledge that this definition of declarative equality has a degree of redundancy: the assumption deq x x in rule de l is not needed, since rule der plays the variable role. However, this formulation exhibits issues, such as context subsumption, that would otherwise require more complex benchmarks. A. Felty, A. Momigliano & B. Pientka 21 The first two come directly from the ael and del rules where declaration blocks come in pairs. The third combines the two, and is used below in stating one of the example theorems. When stating properties, we often need to relate two judgments to each other, where each one has its own context. For example, we may want to prove statements such as “if Φx ⊢ J1 then Φxa ⊢ J2 .” The proofs in [8] use two approaches.4 In the first, the statement is reinterpreted in the smallest context that collects all relevant assumptions; we call this the generalized context approach (G). The above statement becomes “if Φxa ⊢ J1 then Φxa ⊢ J2 .” As an example theorem, we consider the completeness of declarative equality with respect to algorithmic equality, of which we only show the interesting left-to-right direction. Theorem 2.1 (Completeness, G Version ) Admissibility of Reflexivity If Φxa ⊢ is tm M then Φxa ⊢ aeq M M. Admissibility of Symmetry If Φxa ⊢ aeq M N then Φxa ⊢ aeq N M. Admissibility of Transitivity If Φxa ⊢ aeq M N and Φxa ⊢ aeq N L then Φxa ⊢ aeq M L. Main Theorem If Φda ⊢ deq M N then Φda ⊢ aeq M N. In the second approach, we state how two (or more) contexts are related via context relations. For example, the following relation captures the fact that is tm x will occur in Φx in sync with an assumption block containing is tm x; aeq x x in Φxa . Φx ∼ Φxa Φx , is tm x ∼ Φxa , is tm x; aeq x x . ∼. Similarly, we can define Φxa ∼ Φxd . . ∼. Φxa ∼ Φxd Φxa , is tm x; aeq x x ∼ Φxd , is tm x; deq x x We call this the context relations approach (R). The theorems are then typically stated as: “if Φx ⊢ J1 and Φx ∼ Φxa then Φxa ⊢ J2 .” We can then revisit the completeness theorem for algorithmic equality together with the necessary lemmas as follows. Theorem 2.2 (Completeness, R Version) Admissibility of Reflexivity Assume Φx ∼ Φxa . If Φx ⊢ is tm M then Φxa ⊢ aeq M M. Admissibility of Symmetry If Φxa ⊢ aeq M N then Φxa ⊢ aeq N M. Admissibility of Transitivity If Φxa ⊢ aeq M N and Φxa ⊢ aeq N L then Φxa ⊢ aeq M L. Main Theorem Assume Φxa ∼ Φxd . If Φxd ⊢ deq M N then Φxa ⊢ aeq M N. 3 ORBI ORBI aims to provide a common framework for systems that support reasoning with binders. Currently, our design is geared towards systems supporting HOAS, where there are (currently) two main approaches. On one side of the spectrum we have systems that implement various dependently-typed 4 In proofs on paper, the differences between the two approaches usually do not appear; they are present in the details that are left implicit, but must be made explicit when mechanizing proofs. For example, on-paper versions of the admissibility of reflexivity that make these distinctions explicit appear in [7] as proofs of Theorems 7 and 8. ORBI 22 calculi. Such systems include Twelf, Beluga, and Delphin [20]. All these systems also provide, to various degrees, built-in support for reasoning modulo structural properties of a context of assumptions. These systems support inductive reasoning over terms as well as rules. Often it is more elegant in these systems to state theorems using the G-version [8]. On the other side there are systems based on a proof-theoretic foundation, which typically follow a two-level approach: they implement a specification logic (SL) inside a higher-order logic or type theory. Hypothetical judgments of object languages are modeled using implication in the SL and parametric judgments are handled via (generic) universal quantification. Contexts are commonly represented explicitly as lists or sets in the SL, and structural properties are established separately as lemmas. For example substituting for an assumption is justified by appealing to the cut-admissibility lemma of the SL. These lemmas are not directly and intrinsically supported through the SL, but may be integrated into a system’s automated proving procedures, usually via tactics. Induction is usually only supported on derivations, but not on terms. Systems following this philosophy include Hybrid and Abella. Often these systems are better suited to proving R-versions of theorems. The desire for ORBI to cater to both type and proof theoretic frameworks requires an almost impossible balancing act between the two views. For example, contexts are first-class and part of the specification language in Beluga; in Twelf, schemas for contexts are part of the specification language, which is an extension of LF, but users cannot explicitly quantify over contexts and manipulate them as first-class objects; in Abella and Hybrid, contexts are (pre)defined using inductive definitions on the reasoning level. We will describe next our common infrastructure design, directives, and guidelines that allow us to cater to existing systems supporting HOAS. 3.1 Problem Description in ORBI ORBI’s language for defining the grammar of an object language together with inference rules is based on the logical framework LF; pragmatically, we have adopted the concrete syntax of LF specifications in Beluga, which is almost identical to Twelf’s. The advantage is that specifications can be directly parsed and more importantly type checked by Beluga, thereby eliminating many syntactically correct but meaningless expressions. Object languages are written according to the EBNF grammar in Fig. 1, which uses certain standard conventions: {a} means repeat a production zero or more times, and comments in the grammar are enclosed between (* and *). The token id refers to identifiers starting with a lower or upper case letter. These grammar rules are basically the standard ones used both in Twelf and Beluga and we do not discuss them in detail here. We only note that while the presented grammar permits general dependent types up to level n, ORBI specifications will only use level 0 and level 1. Intuitively, specifications at level 0 define the syntax of a given object language, while specifications at level 1 (i.e., type families that are indexed by terms of level 0) describe the judgments and rules for a given OL. We exemplify the grammar relative to the example of algorithmic vs. declarative equality. For more example specifications, we refer the reader to our survey paper [8] or to https://github.com/pientka/ORBI.5 Syntax An ORBI file starts in the Syntax section with the declaration of the constants used to encode the syntax of the OL in question, here untyped lambda-terms, which are introduced with the declarations: 5 The observant reader will have noticed that ORBI’s concrete syntax for schemas differs from the one that we have presented in Sect. 2, in so much that blocks are separated by commas and not by semi-colons. This is forced on us by our choice to re-use Beluga’s parsing and checking tools. A. Felty, A. Momigliano & B. Pientka 23 sig ::= {decl | s_decl} (* declaration *) (* schema declaration *) decl ::= id ":" tp "." | id ":" kind "." (* constant declaration *) (* type declaration *) op_arrow ::= "->" | "<-" kind ::= type | tp op_arrow kind | "{" id ":" tp "}" kind tp term (* A <- B same as B -> A *) (* A -> K *) (* Pi x:A.K *) ::= id {term} | tp op_arrow tp | "{" id ":" tp "}" tp (* a M1 ... M2 *) (* Pi x:A.B *) ::= id | "\" id "." term | term term (* constants, variables *) (* lambda x. M *) (* M N *) s_decl ::= schema s_id "=" alt_blk ";" s_id ::= id alt_blk ::= blk {"+" blk} blk ::= block id ":" tp {"," id ":" tp} Figure 1: ORBI grammar for syntax, judgments, inference rules, and context schemas %% Syntax tm: type. app: tm -> tm -> tm. lam: (tm -> tm) -> tm. The declaration introducing type tm along with those of the constructors app and lam fully specify the syntax of OL terms. We represent binders in the OL using binders in the HOAS meta-language. Hence the constructor lam takes in a function of type tm -> tm. For example, the OL term (lam x. lam y. app x y) is represented as lam (\x. lam (\y. app x y)), where “\” is the binder of the metalanguage. Bound variables found in the object language are not explicitly represented in the meta-language. Judgments and Rules These are introduced as LF type families (predicates) in the Judgments section followed by object-level inference rules for these judgments in the Rules section. In our running example, we have two judgments: %% Judgments aeq: tm -> tm -> type. ORBI 24 deq: tm -> tm -> type. Consider first the inference rule for algorithmic equality for application, where the ORBI text is a straightforward encoding of the rule: ae_a: aeq M1 N1 -> aeq M2 N2 -> aeq (app M1 M2) (app N1 N2). Γ ⊢ aeq M1 N1 Γ ⊢ aeq M2 N2 aea Γ ⊢ aeq (app M1 M2 ) (app N1 N2 ) Uppercase letters such as M1 denote schematic variables, which are implicitly quantified at the outermost level, namely {M1:tm}, as is commonly done for readability purposes in Twelf and Beluga. The binder case is more interesting: ae_l: ({x:tm} aeq x x -> aeq (M x) (N x)) -> aeq (lam (\x. M x)) (lam (\x. N x)). Γ, is tm x; aeq x x ⊢ aeq M N ael Γ ⊢ aeq (lam x. M) (lam x. N) We view the is tm x assumption as the parametric assumption x:tm, while the hypothesis aeq x x (and its scoping) is encoded within the embedded implication aeq x x -> aeq (M x) (N x) in the current (informal) signature augmented with the dynamic declaration for x. As is well known, parametric assumptions and embedded implication are unified in the type-theoretic view. Note that the “variable” case, namely rule aev , is folded inside the binder case. We list here the rest of the Rules section: %% Rules de_a: deq M1 N1 -> deq M2 N2 -> deq (app M1 M2) (app N1 N2). de_l: ({x:tm} deq x x -> deq (M x) (N x)) -> deq (lam (\x. M x)) (lam (\x. N x)). de_r: deq M M. de_s: deq N M -> deq M N. de_t: deq M L -> deq L N -> deq M N. Schemas A schema declaration s_decl is introduced using the keyword schema. A blk consists of one or more declarations and alt_blk describes alternating schemas. For example, schemas mentioned in Sect. 2 appear in the Schemas section as: %% Schemas schema xG = schema xaG = schema xdG = schema daG = block block block block (x:tm); (x:tm, u:aeq x x); (x:tm, u:deq x x); (x:tm, u:deq x x, v:aeq x x); To illustrate alternatives in contexts, consider extending our OL to the polymorphically typed lambdacalculus, which includes a new type tp in the Syntax section, and a new judgment: atp: tp -> tp -> type. representing equality of types in the Judgments section (as well as type constructors and rules for wellformed types and type equality, omitted here). With this extension, the following two examples replace the first two schemas in the Schemas section. schema xG = block (x:tm) + block (a:tp); schema xaG = block (x:tm, u:aeq x x) + block (a:tp, v:atp a a); A. Felty, A. Momigliano & B. Pientka 25 While we type-check the schema definitions using an extension of the LF type checker (as implemented in Beluga), we do not verify that the given schema definition is meaningful with respect to the specification of the syntax and inference rules; in other words, we do not perform “world checking” in Twelf lingo. Definitions So far we have considered the specification language for encoding formal systems. ORBI also supports declaring inductive definitions for specifying context relations. We start with the grammar for inductive definitions (Fig. 2). Although we plan to provide syntax for specifying more general inductive definitions, in this version of ORBI we only define context relations inductively, that is n-ary predicates between contexts of some given schemas. Hence the base predicate is of the form id {ctx} relating different contexts. For example, the Definitions section defines the relations Φx ∼ Φxa and def_dec ::= "inductive" id ":" r_kind "=" def_body ";" r_kind ::= "prop" | "{" id ":" s_id "}" r_kind def_body ::= "|" id ":" def_prp {def_body} def_prp ::= id {ctx} | def_prp "->" def_prp ctx ::= [] | [id] | ctx "," id ":" blk Figure 2: ORBI grammar for inductive definitions describing context relations Φxa ∼ Φxd . To illustrate, only the former is shown below. %% Definitions inductive Rxa : {g:xG} {h:xaG} prop = | Rxa_nl: Rxa [] [] | Rxa_cs: Rxa [g] [h] -> Rxa [g, b:block (x:tm)] [h, b: block (x:tm, u:aeq x x)]; This kind of relation can be translated fairly directly to inductive n-ary predicates in systems supporting the proof-theoretic view. In the type-theoretic framework underlying Beluga, inductive predicates relating contexts correspond to recursive data types indexed by contexts; in fact ORBI adopts Beluga’s concrete syntax, so as to directly type-check those definitions as well. Twelf’s type theoretic framework, however, is not rich enough to support inductive definitions. 3.2 Theorems and Directives in ORBI While the elements of an ORBI specification detailed in the previous subsection were relatively easy to define in a manner that is well understood by all the different systems we are targeting, we illustrate in this subsection those elements that are harder to describe uniformly due to the different treatment and meaning of contexts in the different systems. ORBI 26 Theorems We list the grammar for theorems in Fig. 3. Our reasoning language includes a category prp that specifies the logical formulas we support. The base predicates include false,true, term equality, atomic predicates of the form id {ctx}, which are used to express context relations, and predicates of the form [ctx |- J], which represent judgments of an object language within a given context. Connectives and quantifiers include implication, conjunction, disjunction, universal and existential quantification over terms, and universal quantification over context variables. thm ::= "theorem" id ":" prp ";" prp ::= | | | | | | | | quantif ::= "{" id ":" s_id "}" | "{" id ":" tp "}" | "<" id ":" tp ">" id {ctx} "[" ctx "|-" id {term} "]" term "=" term false true prp "&" prp prp "||" prp prp "->" prp quantif prp (* (* (* (* (* (* (* (* (* Context relation *) Judgment in a context *) Term equality *) Falsehood *) Truth *) Conjunction *) Disjunction *) Implication *) Quantification *) (* universal over contexts *) (* universal over terms *) (* existential over terms *) Figure 3: ORBI grammar for theorems To illustrate, the reflexivity lemmas and completeness theorems for both the G and R versions as they appear in the Theorems section are shown below. These theorems are a straightforward encoding of those stated in Sect. 2. %% Theorems theorem reflG: {h:xaG}{M:tm} [h |- aeq M M]; theorem ceqG: {g:daG}{M:tm}{N:tm} [g |- deq M N] -> [g |- aeq M N]; theorem reflR: {g:xG}{h:xaG}{M:tm} Rxa [g] [h] -> [h |- aeq M M]; theorem ceqR: {g:xdG}{h:xaG}{M:tm}{N:tm} Rda [g] [h] -> [g |- deq M N] -> [h |- aeq M N]; As mentioned, we do not type-check theorems; in particular, we do not define the meaning of [ctx |- J], since several interpretations are possible. In Beluga, every judgment J must be meaningful within the given context ctx; in particular, terms occurring in the judgment J must be meaningful in ctx. As a consequence, both parametric and hypothetical assumptions relevant for establishing the proof of J must be contained in ctx. Instead of the local context view adopted in Beluga, Twelf has one global ambient context containing all relevant parametric and hypothetical assumptions. Systems based on proof-theory such as Hybrid and Abella distinguish between assumptions denoting eigenvariables (i.e., parametric assumptions), which live in a global ambient context and proof assumptions (i.e., hypothetical assumptions), which live in the context ctx. While users of different systems understand how to interpret [ctx |- J], reconciling these different perspectives in ORBI is beyond the scope of A. Felty, A. Momigliano & B. Pientka 27 this paper. Thus for the time being, we view theorem statements in ORBI as a kind of comment, where it is up to the user of a particular system to determine how to translate them. Directives In ORBI, directives are comments that help the ORBI2X tools to generate target representations of the ORBI specifications. The idea is reminiscent of what Ott [24] does to customize certain declarations, e.g., the representation of variables, to the different programming languages/proof assistants it supports. The grammar for directives is listed in Fig. 4. dir ::= ’%’ sy_set what decl {"," decl} {dest} ’.’ | ’%%’ sepr ’.’ sy_id ::= sy_set ::= ’[’ sy_id {’,’ sy_id} ’]’ what ::= dest ::= ’in’ ctx | ’in’ s_id | ’in’ id sepr ::= hy | ab | bel | tw wf | explicit | implicit Syntax | Judgments | Rules | Schemas | Definitions | Directives | Theorems Figure 4: ORBI grammar for directives The sepr directives, such as Syntax, are simply means to structure ORBI specifications. Most of the other directives that we consider in this version of ORBI are dedicated to help the translations into proof-theoretical systems, although we also include some to facilitate the translation of theorems to Beluga. The set of directives is not intended to be complete and the meaning of directives is systemspecific. The directives wf and explicit are concerned with the asymmetry in the proof-theoretic view between declarations that give typing information, e.g., tm:type, and those expressing judgments, e.g., aeq:tm -> tm -> type. In Abella and Hybrid, the former may need to be reified in a judgment, in order to show that judgments preserve the well-formedness of their constituents, as well as to provide induction on the structure of terms; yet, in order to keep proofs compact and modular, we want to minimize this reification and only include them where necessary. The Directives section of our sample specification includes, for example, % [hy,ab] wf tm. which refers to the first line of the Syntax section where tm is introduced, and indicates that we need a predicate (e.g., is_tm) to express well-formedness of terms of type tm. Formulas expressing the definition of this predicate are automatically generated from the declarations of the constructors app and lam with their types. The keyword explicit indicates when such well-formedness predicates should be included in the translation of the declarations in the Rules section. For example, the following formulas both represent possible translations of the ae_l rule to proof-theoretic systems. We use Abella’s concrete syntax to exemplify: aeq (lam M) (lam N) :- pi x\ is_tm x => aeq x x => aeq (M x) (N x). aeq (lam M) (lam N) :- pi x\ aeq x x => aeq (M x) (N x). ORBI 28 where the typing information is explicit in the first and implicit in the second. By default, we choose the latter, that is well-formed judgments are assumed to be implicit, and require a directive if the former is desired. Consider, for example, that we want to conclude that whenever a judgment is provable, the terms in it are well-formed, e.g., if aeq M N is provable, then so are is_tm M and is_tm N. Such a lemma is indeed provable in Abella and Hybrid from the implicit translation of the rules for aeq. Proving a similar lemma for the deq judgment, on the other hand, requires some strategically placed explicit well-formedness information. In particular, the two directives: % [hy,ab] explicit (x : tm) in de_l. % [hy,ab] explicit (M : tm) in de_r. require the clauses de_l and de_r to be translated to the following formulas: deq (lam M) (lam N) :- pi x\ is_tm x => deq x x => deq (M x) (N x). deq M M :- is_tm M. The case for schemas is analogous. In the systems based on proof-theoretic approaches, contexts are typically represented using lists and schemas are translated to unary inductive predicates that verify that these lists have a particular regular structure. We again leave typing information implicit in the translation unless a directive is included. For example, the xaG schema with no associated directive will be translated to the following inductive definition in Abella: Define aG : olist -> prop by xaG nil; nabla x, xaG (aeq x x :: As) := xaG As. The directive % [hy,ab] explicit (x : tm) in daG will yield this Hybrid definition: Inductive daG : list atm -> Prop := | nil_da : daG nil | cns_da : forall (Gamma:list atm) (x:uexp), proper x -> daG Gamma -> daG (is_tm x :: deq x x :: aeq x x :: Gamma). Similarly, directives in context relations, such as: % [hy,ab] explicit (x : tm) in g in Rxa. also state which well-formedness annotations to make explicit in the translated version. In this case, when translating the definition of Rxa in the Definitions section, they are to be kept in g, but skipped in h. Keeping in mind that we consider the notion of directive open to cover other benchmarks and different systems, we offer some speculation about directives that we may need to translate theorems for the examples and systems that we are considering. For example, theorem reflG is proven by induction over M. As a consequence, M must be explicit. % [hy,ab,bel] explicit (M : tm) in h in reflG. The ORBI2Hybrid and ORBI2Abella tools will interpret the directive by adding an explicit assumption, as illustrated by the result of the ORBI2Abella translation: forall H M, xaG H -> {H |- is_tm M} -> {H |- aeq M M}. In Beluga, the directive is interpreted as: {h:xaG} {M:[h |- tm]} [h |- aeq M M]. A. Felty, A. Momigliano & B. Pientka 29 where M will have type tm in the context h. Moreover, since the term M is used in the judgment aeq within the context h, we associate M with an identity substitution, which is not displayed. In short, the directive allows us to lift the type specified in ORBI to a contextual type that is meaningful in Beluga. In fact, Beluga always needs additional information on how to interpret terms—are they closed or can they depend on a given context? For translating symG for example, we use the following directive to indicate the dependence on the context: % [bel] implicit (M : tm), (N : tm) in h in symG. 3.3 Guidelines In addition, we introduce a set of guidelines for ORBI specification writers, with the goal of helping translators generate output that is more likely to be accepted by a specific system. ORBI 0.1 includes four such guidelines, which are motivated by the desire to avoid putting too many constraints in the grammar rules. First, as we have seen in our examples, we use as a convention that free variables which denote schematic variables in rules are written using upper case identifiers; we use lower case identifiers for eigenvariables in rules and for context variables. Second, while the grammar does not restrict what types we can quantify over, the intention is that we quantify over types of level-0, i.e., objects of the syntax level, only. Third, in order to more easily accommodate systems without dependent types, Pi should not be used when writing non-dependent types; an arrow should be used instead. (In LF, for example, A -> B is an abbreviation for Pi x:A.B for the case when x does not occur in B. Following this guideline means favoring this abbreviation whenever it applies.) Fourth, when writing a context (grammar ctx), distinct variable names should be used in different blocks. 4 Related Work Our approach to structuring contexts of assumptions takes its inspiration from Martin-Löf’s theory of judgments, especially in the way it has been realized in Edinburgh LF. However, our formulation owes more to Beluga’s type theory, where contexts are first-class citizens, than to the notion of regular world in Twelf. The creation and sharing of a library of benchmarks has proven to be very beneficial to the field it represents. The brightest example is TPTP [25], whose influence on the development, testing and evaluation of automated theorem provers cannot be underestimated. Clearly our ambitions are much more limited. We have also taken some inspiration from its higher-order extension THF0 [3], in particular in its construction in stages. The success of TPTP has spurred other benchmark suites in related subjects, see for example SATLIB [14]; however, the only one concerned with induction is the Induction Challenge Problems (http:// www.cs.nott.ac.uk/~lad/research/challenges), a collection of examples geared to the automation of inductive proof. The benchmarks are taken from arithmetic, puzzles, functional programming specifications, etc. and as such have little connection with our endeavor. On the other hand, the examples mentioned earlier coming from Twelf’s wiki, Abella’s library, Beluga’s distribution, and Hybrid’s web page contain a set of examples that highlight the issues around binders. As such they are prime candidates to be included in ORBI. Other projects have put forward LF as a common ground: the goal of Logosphere’s (http://www. logosphere.org) was the design of a representation language for logical formalisms, individual theories, and proofs, with an interface to other theorem proving systems that were somewhat connected, but ORBI 30 the project never materialized. SASyLF [1] originated as a tool to teach programming language theory: the user specifies the syntax, judgments, theorems and proofs thereof (albeit limited to closed objects) in a paper-and-pencil HOAS-friendly way and the system converts them to totality-checked Twelf code. The capability to express and share proofs is of obvious interest to us, although such proofs, being a literal proof verbalization of the corresponding Twelf type family, are irremediably verbose. Finally, work on modularity in LF specifications [21] is of critical interest to give more structure to ORBI files. Why3 (http://why3.lri.fr) is a software verification platform that intends to provide a frontend to third-party theorem provers, from proof assistants such as Coq to SMT-solvers. To this end Why3 provides a first-order logic with rank-1 polymorphism, recursive definitions, algebraic data types and inductive predicates [9], whose specifications are then translated to the several systems that Why3 supports. Typically, those translations are forgetful, but sometimes, e.g., with respect to Coq, they add some annotations, for example to ensure non-emptiness of types. Although we are really not in the same business as Why3, there are several ideas that are relevant; to name one, the notion of a driver, that is, a configuration file to drive transformations specific to a system. Moreover, Why3 provides an API for users to write and implement their own drivers and transformations. Ott [24] is a highly engineered tool for “working semanticists,” allowing them to write programming language definitions in a style very close to paper-and-pen specifications; then those are compiled into LATEX and, more interestingly, into proof assistant code, currently supporting Coq, Isabelle/HOL, and HOL. Ott’s metalanguage is endowed with a rich theory of binders, but at the moment it favors the “concrete” (non α -quotiented) representation, while providing support for the nameless representation for a single binder. Conceptually, it would be natural to extend Ott to generate ORBI code, as a bridge for Ott to support HOAS-based systems. Conversely, an ORBI user would benefit from having Ott as a front-end, since the latter view of grammar and judgment seems at first sight general enough to support the notion of schema and context relation. In the category of environments for programming language descriptions, we mention PLT-Redex [5] and also the K framework [22]. In both, several large-scale language descriptions have been specified and tested. However, none of those systems has any support for binders, let alone context specifications, nor can any meta-theory be formally verified. Finally, there is a whole research area dedicated to the handling and sharing of mathematical content (MMK http://www.mkm-ig.org) and its representation (OMDoc https://trac.omdoc.org/ OMDoc), which is only very loosely connected to our project. 5 Conclusion We have presented the preliminary design of a language, and more generally, of a common infrastructure for representing challenge problems for HOAS-based logical frameworks. The common notation allows us to express the syntax of object languages that we wish to reason about, as well as the context schemas, the judgments and inference rules, and the statements of benchmark theorems. We strongly believe that the field has matured enough to benefit from the availability of a set of benchmarks on which qualitative and hopefully quantitative comparison can be carried out. We hope that ORBI will foster sharing of examples in the community and provide a common set of examples. We also see our benchmark repository as a place to collect and propose “open” challenge problems to push the development of meta-reasoning systems. The challenge problems also play a role in allowing us, as designers and developers of logical frameworks, to highlight and explain how the design decisions for each individual system lead to differences A. Felty, A. Momigliano & B. Pientka 31 in using them in practice. Additionally, our benchmarks aim to provide a better understanding of what practitioners should be looking for, as well as help them foresee what kind of problems can be solved elegantly and easily in a given system, and more importantly, why this is the case. Therefore the challenge problems provide guidance for users and developers in better comprehending differences and limitations. Finally, they serve as an excellent regression suite. The description of ORBI presented here is best thought of as a stepping stone towards a more comprehensive specification language, much as THF0 [3] has been extended to the more expressive formalism T HFi, adding for instance, rank-1 polymorphism. Many are the features that we plan to provide in the near future, starting from general (monotone) (co)inductive definitions; currently we only relate contexts, while it is clearly desirable to relate arbitrary well-typed terms, as shown for example in [4] and [11] with respect to normalization proofs. Further, it is only natural to support infinite objects and behavior. However, full support for (co)induction is a complex matter, as it essentially entails fully understanding the relationship between the proof-theory behind Abella and Hybrid and the type theory of Beluga. Once this is in place, we can “rescue” ORBI theorems from their current status as comments and even include proof sketches in ORBI. Clearly, there is a significant amount of implementation work ahead, mainly on the ORBI2X tools side, but also on the practicalities of the benchmark suite. Finally, we would like to open up the repository to other styles of formalization such as nominal, locally nameless, etc. References [1] Jonathan Aldrich, Robert J. Simmons & Key Shin (2008): SASyLF: An Educational Proof Assistant for Language Theory. In: International Workshop on Functional and Declarative Programming in Education, ACM Press, pp. 31–40, doi:10.1145/1411260.1411266. [2] Brian E. Aydemir, Aaron Bohannon, Matthew Fairbairn, J. Nathan Foster, Benjamin C. Pierce, Peter Sewell, Dimitrios Vytiniotis, Geoffrey Washburn, Stephanie Weirich & Steve Zdancewic (2005): Mechanized Metatheory for the Masses: The P OPL M ARK Challenge. In: Eighteenth International Conference on Theorem Proving in Higher Order Logics, LNCS 3603, Springer, pp. 50–65, doi:10.1007/11541868_4. [3] Christoph Benzmüller, Florian Rabe & Geoff Sutcliffe (2008): THF0—The Core of the TPTP Language for Higher-Order Logic. In: Fourth International Joint Conference on Automated Reasoning, LNCS 5195, Springer, pp. 491–506, doi:10.1007/978-3-540-71070-7_41. [4] Andrew Cave & Brigitte Pientka (2012): Programming with Binders and Indexed Data-Types. In: ThirtyNinth Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, ACM Press, pp. 413–424, doi:10.1145/2103656.2103705. [5] Matthias Felleisen, Robert Bruce Findler & Matthew Flatt (2009): Semantics Engineering with PLT Redex. The MIT Press. [6] Amy P. Felty & Alberto Momigliano (2012): Hybrid: A Definitional Two-Level Approach to Reasoning with Higher-Order Abstract Syntax. Journal of Automated Reasoning 48(1), pp. 43–105, doi:10.1007/ s10817-010-9194-x. [7] Amy P. Felty, Alberto Momigliano & Brigitte Pientka (2015): The Next 700 Challenge Problems for Reasoning with Higher-Order Abstract Syntax Representations: Part 1—A Common Infrastructure for Benchmarks. CoRR abs/1503.06095. Available at http://arxiv.org/abs/1503.06095. [8] Amy P. Felty, Alberto Momigliano & Brigitte Pientka (2015): The Next 700 Challenge Problems for Reasoning with Higher-Order Abstract Syntax Representations: Part 2—A Survey. Journal of Automated Reasoning. (to appear). 32 ORBI [9] Jean-Christophe Filliâtre (2013): One Logic To Use Them All. In: Twenty-Fourth International Conference on Automated Deduction, LNCS 7898, Springer, pp. 1–20, doi:10.1007/978-3-642-38574-2_1. [10] Andrew Gacek (2008): The Abella Interactive Theorem Prover (System Description). In: Fourth International Joint Conference on Automated Reasoning, LNCS 5195, Springer, pp. 154–161, doi:10.1007/ 978-3-540-71070-7_13. [11] Andrew Gacek, Dale Miller & Gopalan Nadathur (2012): A Two-Level Logic Approach to Reasoning About Computations. Journal of Automated Reasoning 49(2), pp. 241–273, doi:10.1007/s10817-011-9218-1. [12] J.-Y. Girard, Y. Lafont & P. Tayor (1990): Proofs and Types. Cambridge University Press. [13] Nada Habli & Amy P. Felty (2013): Translating Higher-Order Specifications to Coq Libraries Supporting Hybrid Proofs. In: Third International Workshop on Proof Exchange for Theorem Proving, EasyChair Proceedings in Computing 14, pp. 67–76. [14] Holger H. Hoos & Thomas Stützle (2000): SATLIB: An Online Resource for Research on SAT. In: SAT 2000: Highlights of Satisfiability Research in the Year 2000, Frontiers in Artificial Intelligence and Applications 63, IOS Press, pp. 283–292. [15] Alberto Momigliano, Alan J. Martin & Amy P. Felty (2008): Two-Level Hybrid: A System for Reasoning Using Higher-Order Abstract Syntax. In: Second International Workshop on Logical Frameworks and MetaLanguages: Theory and Practice, LFMTP 2007, ENTCS 196, Elsevier, pp. 85–93, doi:10.1016/j.entcs. 2007.09.019. [16] Brigitte Pientka (2007): Proof Pearl: The Power of Higher-Order Encodings in the Logical Framework LF. In: Twentieth International Conference on Theorem Proving in Higher-Order Logics, LNCS, Springer, pp. 246–261, doi:10.1007/978-3-540-74591-4_19. [17] Brigitte Pientka & Andrew Cave (2015): Inductive Beluga:Programming Proofs (System Description). In: Twenty-Fifth International Conference on Automated Deduction, Springer. [18] Brigitte Pientka & Joshua Dunfield (2010): Beluga: A Framework for Programming and Reasoning with Deductive Systems (System Description). In: Fifth International Joint Conference on Automated Reasoning, LNCS 6173, Springer, pp. 15–21, doi:10.1007/978-3-642-14203-1_2. [19] Benjamin C. Pierce (2002): Types and Programming Languages. MIT Press. [20] Adam Poswolsky & Carsten Schürmann (2009): System Description: Delphin—A Functional Programming Language for Deductive Systems. In: Third International Workshop on Logical Frameworks and MetaLanguages: Theory and Practice (LFMTP 2008), ENTCS 228, Elsevier, pp. 113–120, doi:10.1016/j. entcs.2008.12.120. [21] Florian Rabe & Carsten Schürmann (2009): A Practical Module System for LF. In: Fourth International Workshop on Logical Frameworks and Meta-Languages: Theory and Practice, ACM Press, pp. 40–48, doi:10.1145/1577824.1577831. [22] Grigore Roşu & Traian Florin Şerbănuţă (2010): An Overview of the K Semantic Framework. Journal of Logic and Algebraic Programming 79(6), pp. 397–434, doi:10.1016/j.jlap.2010.03.012. [23] Carsten Schürmann (2009): The Twelf Proof Assistant. In: Twenty-Second International Conference on Theorem Proving in Higher Order Logics, LNCS 5674, Springer, pp. 79–83, doi:10.1007/ 978-3-642-03359-9_7. [24] Peter Sewell, Francesco Zappa Nardelli, Scott Owens, Gilles Peskine, Thomas Ridge, Susmit Sarkar & Rok Strniša (2010): Ott: Effective Tool Support for the Working Semanticist. Journal of Functional Programming 20(1), pp. 71–122, doi:10.1017/S0956796809990293. [25] Geoff Sutcliffe (2009): The TPTP Problem Library and Associated Infrastructure. Journal of Automated Reasoning 43(4), pp. 337–362, doi:10.1007/s10817-009-9143-8. [26] Yuting Wang, Kaustuv Chaudhuri, Andrew Gacek & Gopalan Nadathur (2013): Reasoning About HigherOrder Relational Specifications. In: Fifteenth International ACM SIGPLAN Symposium on Principles and Practice of Declarative Programming, ACM Press, pp. 157–168, doi:10.1145/2505879.2505889.
6cs.PL
QUANTUM NON DEMOLITION MEASUREMENTS: PARAMETER ESTIMATION FOR MIXTURES OF MULTINOMIALS arXiv:1707.06074v1 [quant-ph] 19 Jul 2017 T. BENOIST, F.GAMBOA, AND C. PELLEGRINI Abstract. In Quantum Non Demolition measurements, the sequence of observations is distributed as a mixture of multinomial random variables. Parameters of the dynamics are naturally encoded into this family of distributions. We show the local asymptotic mixed normality of the underlying statistical model and the consistency of the maximum likelihood estimator. Furthermore, we prove the asymptotic optimality of this estimator as it saturates the usual Cramér Rao bound. 1. Introduction Measuring directly a small quantum sized physical system is done by letting it interact with a macroscopic instrument. This procedure can result in the destruction of the measured system. For example photons are absorbed to create an electronic signal. To avoid the destruction of the measured system, one relies then on indirect measurements. The system first interacts with an auxiliary system, or probe, that is then measured. The goal is then to infer the system state from the information obtained through this indirect measurement. Though, from the laws of quantum mechanics, this procedure induces a back action on the system that may change its state. Moreover, the measurement outcome being inherently random, the system state may become random itself. Hence, if one aims at measuring indirectly a physical quantity of the system, the indirect measurement must be tuned such that, if the system state corresponds to an almost sure value of the physical quantity of interest, then, indirectly measuring it will not modify its state. This kind of indirect measurements is called Quantum Non Demolition (QND) measurements. It has been introduced in the eighties as a technique for precise measurements [6]. Maybe one of the experiment illustrating best QND measurements is Haroche’s group one. By sending atoms through a supra conducting cavity containing a monochromatic electromagnetic field, and measuring the atoms, it is possible to measure the number of photons inside the cavity whithout destroying them[8]. To increase the amount of information on the system state obtained through a QND measurement, the procedure is repeated. The system evolution is then described by an unobserved Markov chain (φn ) (see Section 5 for the complete description). The only handy observation is the sequence of the measurement results denoted by (Xn ). Baye’s law maps the information of (Xn ) in the evolution of the Markov chain. In general, the sequence of random variables (Xn ) is not i.i.d. (even not Markovian). Therefore, statistical inference for QND measurement cannot fully rely on standard results on i.i.d. models. Efficient parameter estimation is of course crucial for these Date: July 20, 2017. 1 2 T. BENOIST, F.GAMBOA, AND C. PELLEGRINI experiments. Particularly if one hopes to have a faithful estimation of the system state Markov chain (φn ). In this paper, we show that the QND model enters perfectly in the framework of the usual statistical asymptotic theory. More precisely, we provide a complete study in terms of local asymptotic mixed normality (LAMN) of the model (we refer to [14] for the whole theory). It is worth noticing that a quantum analog of local asymptotic normality (LAN) called quantum local asymptotic normality (QLAN) has been developed in the context of quantum statistics [9, 12]. Similarly quantum extensions of classical notions such as Quantum Fisher Information and Cramér Rao bound have been developed [11, Section 2.2.5]. Here, we will not follow this approach and will concentrate on more classical statistical properties. Our results rely on the fact that our model, thanks to the QND condition, is actually a mixture of i.i.d. statistical models. More precisely, it has been show in [2, 3, 4, 5, 1] that the probability space describing these experiments can be divided into asymptotic events (belonging to the tail algebra) such that (Xn ) conditioned to one of such asymptotic event is a sequence of i.i.d. random variables. So that, the law of (Xn ) is a mixture of i.i.d. laws. The weights involved into the mixture depends on the initial state of the system. The conditioning making (Xn ) an i.i.d. sequence is highly exploited in order to derive the LAMN property. To our knowledge this is the first time that the LAMN property is shown in this context. After proving the LAMN property we study the maximum likelihood estimation and prove that it is optimal in the sense that the Cramér Rao bound is achieved asymptotically. Note that parametric estimation for indirect measurements has been previously investigated in [10, 7, 13] with different assumptions. But, the theory of asymptotic likelihood has not been studied therein. The paper is organised as follows. In Section 2, we discuss the model of multinomial mixture studied along the paper. In Section 3 we show the local asymptotic mixed normality. Section 4 is devoted to the results for the maximum likelihood estimator (consistency and saturation of the Cramér Rao bound). Finally in Section 5 we work on the QND model underlining the link with multinomial mixtures. Further, some numerical simulations illustrate our results on a QND toy model inspired by [8]. 2. Mixture of multinomials Let A = {1, . . . , l}, P = {1, . . . , d} and Θ be a compact subset of RD with a non empty interior. For any α ∈ P and θ ∈ Θ, the quantity P (pθ (j|α))j∈A denotes a probability distribution over A, that is pθ (j|α) ∈ (0, 1) and j∈A pθ (j|α) = 1. In the sequel for any j ∈ A and α ∈ P the notation p. (j|α) holds for the function θ 7→ pθ (j|α). L−P Let P be a probability distribution, we will use the notation = to mean equality in distribution when the underlying probability space is endowed with P. This notation L−P will also be used for convergence in distribution writing sometimes = n when a family of probability measures (Pn ) is involved. In the paper the notation N (m, σ 2 ) is used for the Gaussian distribution of mean m and variance σ 2 . For any x ∈ RD and any subset A ⊂ RD , the set A + x will denote A + x = {y + x, y ∈ A}. Let us now describe the probability model that we will study. Let Ω = AN and let F be the smallest σ-algebra containing the cylinder sets {ω ∈ Ω|ωk = jk , ∀k ≤ n}. All QND: PARAMETER ESTIMATION FOR MIXTURES OF MULTINOMIALS 3 the measures introduced afterwards are defined on the measurable space (Ω, F) without mentioning it. For any θ ∈ Θ and for each α ∈ P, let Pθ|α be the multinomial probability measure built on the weights (pθ (j|α))j∈A . Namely, for any n-tuple (j1 , . . . , jn ) ∈ An , Pθ|α (j1 , j2 , . . . , jn ) = n Y k=1 pθ (jk |α). Let (q(α))α∈P be a probability measure on P, we denote by Pqθ the probability measure defined as a convex combination of the measure Pθ|α with weights (q(α))α∈P : X Pqθ = q(α)Pθ|α α∈P Without loss of generality, we shall always assume that q(α) > 0 for all α ∈ P. Indeed, one can reduce the set P if needed. We study the statistical model (Pqθ , θ ∈ Θ). As we shall see, under the identifiability condition below, our results will be independent of q. Hence, in the sequel we shall alleviate the notation replacing Pqθ by Pθ . Our main assumption on the different multinomials is the following: Assumption ID: For any (α, θ) and (β, θ ′ ) ∈ P × Θ such that (α, θ) 6= (β, θ ′ ), ∃j ∈ A such that, pθ (j|α) 6= pθ′ (j|β). Remark: If for every θ ∈ Θ, Assumption ID does not hold for two couples (α, θ) and (β, θ), it can be enforced by reducing P, identifying the elements giving the same distributions pθ (·|α/β). From now on, we will denote by θ ∗ ∈ Θ the true value of the parameter θ. We assume that θ ∗ is in the interior of Θ. The following definition will be usefull. Definition 1. For any θ ∗ ∈ Θ and γ ∈ P, let, Ωθ∗ |γ := supp Pθ∗ |γ and Γθ∗ := X γ∈P γ1Ωθ∗ |γ . When it does not lead to confusion we may omit the index θ ∗ for both the sets Ωθ∗ |γ and the random variable Γθ∗ . Remark: It is a direct consequence of Assumption ID that Pθ∗ (Ωθ∗ |γ ) = Pθ∗ (Γθ∗ = γ) = q(γ). At this stage we need to introduce some quantities quantifying the information and proximity in our models. In particular, we shall use many times the Shannon entropy given a parameter θ and the Kullback–Leibler divergence given θ with respect to θ ′ . For α, β ∈ P and θ, θ ′ ∈ Θ, let X (1) Sθ (α) := − pθ (j|α) ln pθ (j|α), j∈A be the Shannon entropy and (2) Sθ|θ′ (α|β) := X j∈A  pθ (j|α) ln pθ (j|α) − ln pθ′ (j|β) , 4 T. BENOIST, F.GAMBOA, AND C. PELLEGRINI be the Kullback–Leibler divergence. In Eq (2), when θ = θ ′ we just write Sθ , that is for α, γ ∈ P and θ ∈ Θ X pθ (j|α) . (3) Sθ (α|γ) = Sθ|θ (α|γ) = pθ (j|α) ln pθ (j|γ) j∈A Remark: Note that assumption ID ensures that (2) and (3) are strictly positive. We now state a technical lemma which is a key tool to all our proofs (the arguments are closely related to the one used in [3]). Lemma 1. Assume that ID holds. (1) Almost sure convergence Let (Xnγ ), be a sequence of random variables depending on γ ∈ P. If for any γ ∈ P lim Xnγ = X γ , n Pθ∗ |γ − a.s. Then lim XnΓθ∗ = X Γθ∗ , n Pθ − a.s (2) Convergence in distribution Let (θn∗ ) be a sequence in Θ and (Xnγ ) as in (1). If for any γ ∈ P lim Xnγ L−Pθn ∗ |γ n = Xγ Then, lim XnΓθ∗ n L−Pθn ∗ = X Γ, where Γ is a r.v. whose distribution is given by Pr(Γ = γ) = q(γ). Proof. Assume that (Xnγ ) converges almost surely towards X γ w.r.t Pθ∗ |γ . Then, Pθ∗ |γ (∩N ∪n0 ∩n≥n0 {|Xnγ − X γ | < 1/N }) = 1. Since Γ = γ Pθ∗ |γ -a.s., Pθ∗ |γ (∩N ∪n0 ∩n≥n0 {|XnΓ − X Γ | < 1/N }) = 1. This is true for any γ ∈ P. Since Pθ∗ is convex combination of the measures Pθ∗ |γ , Pθ∗ (∩N ∪n0 ∩n≥n0 {|XnΓ − X Γ | < 1/N }) = 1 and (1) holds. Assume that (Xnγ ) converges weakly towards X γ w.r.t. (Pθn∗ |γ ). Then, lim Eθn∗ |γ (f (Xnγ )) = E(f (X γ )) n→∞ for any continuous and bounded function f . Since Pθn∗ |γ (Γθn∗ = γ) = 1 and Pθn∗ = P ∗ |α , α∈P q(α)Pθn X lim Eθn∗ (f (XnΓθ∗ )) = q(α)E(f (X α )). n→∞ That convergence yields (2). α∈P  QND: PARAMETER ESTIMATION FOR MIXTURES OF MULTINOMIALS 5 In the sequel we shall use the process (Nn (j))j∈A where for all n ∈ N and all j ∈ A Nn (j)(ω) = n X 1ωk =j , k=1 for all ω ∈ Ω,Pwhich counts the number of times the result j appears before time n. 1 Remark that j∈A Nn (j) = n. The strong law of large number for i.i.d L random variables involves that Nn (j) = pθ (j|α), Pθ|α − a.s., (4) lim n→∞ n for all α ∈ P, all j ∈ A and all θ ∈ Θ. 3. Local Asymptotic Mixed Normality We first prove that the statistical model (Pθ , θ ∈ Θ) is asymptotically equivalent to a mixture of Gaussian models. Let us first recall the definition of local mixed asymptotic normality that we shall prove for our model. Definition 2 (Local Asymptotic Mixed Normality(LAMN)[14]). A sequence of statistical models (Qθ |Fn |θ ∈ Θ) is said to be LAMN at θ ∗ if, there exits ∆θ∗ and Jθ∗ two random variables such that for any h ∈ Θ − θ ∗ lim ln Qθ∗ +h/√n (ω1 , . . . , ωn ) n→∞ Qθ∗ (ω1 , . . . , ωn ) L−Qθ∗ = 1 hT ∆θ∗ − hT Jθ∗ h, 2 where the law of ∆θ∗ conditioned on Jθ∗ = J is N (0, J). The LAMN property for our model follows from next lemma. It reduces the problem to local asymptotic normality for i.i.d. multinomials. Lemma 2. Assume that ID holds and that for any (j, α) ∈ A × P the function p. (j|α) is continuous in θ ∗ . Let (θn ) ∈ Θ be a sequence of random variables such that limn θn = θ ∗ , (Pθ∗ |γ − a.s). Then, (5) Pθn (ω1 , . . . , ωn ) − 1 = o(n−1/2 ), q(γ)Pθn |γ (ω1 , . . . , ωn ) Pθ∗ |γ − a.s. Proof. We prove the stronger result that the convergence is exponential but we will only need the convergence at order o(n−1/2 ). From the definition of Pθn ,   X X (j|α) p Pθn (ω1 , . . . , ωn ) θ . Qn = q(γ) + Nn (j)(ω) ln n q(α) exp  (ω |γ) p p k θn (j|γ) k=1 θn α6=γ j∈A The strong law of large numbers (4) and the continuity assumption on the functions p. (j|α) imply pθ (j|α) 1X Nn (j) ln n = −Sθ∗ (γ|α), Pθ∗ |γ − a.s. lim n→∞ n pθn (j|γ) j∈A 6 T. BENOIST, F.GAMBOA, AND C. PELLEGRINI Recall that Assumption ID implies Sθ∗ (γ|α) > 0 for any α 6= γ. Therefore, there exists s > 0 independent of γ, α and of the sequence (θn ) such that,   X X pθ (j|α)  = 0, Pθ∗ |γ − a.s. lim ens Nn (j) ln n q(α) exp  n→∞ pθn (j|γ) j∈A α6=γ Now,   X (j|α) p 1 X Pθn (ω1 , . . . , ωn ) θ , Nn (j) ln n q(α) exp  −1= q(γ)Pθn |γ (ω1 , . . . , ωn ) q(γ) pθn (j|γ) j∈A α6=γ so that the result follows.  Now we state our main result. Theorem 1 (LAMN). Assume that ID holds and that for any (j, α) ∈ A × P the function p. (j|α) is differentiable at θ ∗ . Then, the sequence (Pθ |Fn |θ ∈ Θ) is LAMN in θ ∗ with   X Jθ∗ := pθ∗ (j|Γ) ∇θ ln pθ (j|Γ)(∇θ ln pθ (j|Γ))T =: Iθ∗ (Γ). |θ=θ∗ j∈A Proof. Fix γ ∈ P. From standard results on parameter estimation for i.i.d. models, the sequence of models (Pθ|γ |Fn |θ ∈ Θ) is locally asymptotic normal in θ ∗ (see [14]). Namely, there exists a r.v. Z γ ∼ N (0, Iθ∗ (γ)) such that, for any h ∈ Θ − θ ∗ , n X pθ∗ + √h (ωk |γ) 1 hT Z γ − hT Iθ∗ (γ)h. 2 k=1 √ From Lemma 2 setting θn = θ ∗ and θn = θ ∗ + h/ n, lim n→∞ lim ln n→∞ ln n pθ∗ (ωk |γ) Pθ∗ + √h (ω1 , . . . , ωn ) n P (ω1 , . . . , ωn ) θ∗ It follows that, lim ln n→∞ − L−Pθ∗ |γ n X = ln pθ∗ + √h (ωk |γ) n p (ωk |γ) θ∗ k=1 Pθ∗ + √h (ω1 , . . . , ωn ) n Pθ∗ (ω1 , . . . , ωn ) L−Pθ∗ |γ = = 0, Pθ∗ |γ − a.s. 1 hT Z γ − hT Iθ∗ (γ)h, 2 so that Lemma 1 yields the Proposition.  4. Maximum likelihood estimation This section is devoted to the study of the maximum likelihood estimator. For ω ∈ Ω at step n the log likelihood is defined as 1 ℓn (θ)(ω1 , . . . , ωn ) = ln Pθ (ω1 , . . . , ωn ). n We study the maximum likelihood estimator defined as θ̂n := argmaxθ∈Θ ℓn (θ). QND: PARAMETER ESTIMATION FOR MIXTURES OF MULTINOMIALS 7 4.1. Consistency. We define the function ℓθ∗ ,γ (θ) = −Sθ∗ (γ) − min Sθ∗ |θ (γ|α), (6) α∈P for all γ ∈ P and all θ ∈ Θ. The following Lemma shows the almost sure uniform convergence of the sequence of log likelihood functions. Lemma 3. Assume that ID holds and that for any couple (j, α) ∈ A × P the function p. (j|α) is continuous. Then for any γ ∈ P, lim sup |ℓn (θ) − ℓθ∗ ,γ (θ)| = 0, n→∞ θ∈Θ Pθ∗ |γ − a.s., and ℓθ∗ ,γ is such that, for any ǫ > 0 ℓθ∗ ,γ (θ ∗ ) > (7) sup θ:d(θ,θ ∗ )≥ǫ ℓθ∗ ,γ (θ). Proof. Since Θ is compact and that for any (j, α) ∈ A × P the function p. (j|α) is continuous and positive, we get max sup | ln pθ (j|α)| < ∞. (j,α)∈A×P θ∈Θ Furthermore, the strong law of large numbers (4) implies that for any α ∈ P, X Nn (j)  pθ (j|α)  lim sup ln + Sθ∗ |θ (γ|α) = 0, Pθ∗ |γ − a.s. n→∞ θ∈Θ n pθ∗ (j|γ) j∈A Hence, lim sup n→∞ θ∈Θ Pθ|α(ω1 , . . . , ωn ) 1 ln + Sθ∗ |θ (γ|α) = 0, n Pθ∗ |γ (ω1 , . . . , ωn ) Pθ∗ |γ − a.s. It follows then from a repeated application of Lemma 5 (its statement and proof are postponed to the Appendix), that lim sup |ℓn (θ) − ℓθ∗ ,γ (θ)| = 0, n→∞ θ∈Θ Pθ∗ |γ − a.s. Since ℓθ∗ ,γ (θ) = −Sθ∗ (γ) − minα∈P Sθ∗ |θ (γ|α), Assumption ID implies the inequality (7) and the lemma is proved.  The consistency of the maximum likelihood estimator follows now from standard arguments. Proposition 1. Assume that Assumption ID holds and that for any (j, α) ∈ A × P the function p. (j|α) is continuous. Then, lim θ̂n = θ ∗ , n→∞ Pθ∗ − a.s. Proof. From Lemma 3, classical results of parametric estimation (see [14, Theorem 5.7]) give, lim θ̂n = θ ∗ , Pθ∗ |γ − a.s. n→∞ So that, Lemma 1 yields the consistency w.r.t. Pθ∗ .  8 T. BENOIST, F.GAMBOA, AND C. PELLEGRINI 4.2. Saturation of Cramér–Rao bound. It is well know that if a model is LAMN, it verifies an asymptotic Cramér-Rao bound. Namely if (Tn ) is a sequence of estimators such that L−Pθ∗ +h/√n √ √ = T lim n(Tn − (θ ∗ + h/ n)) n→∞ P for any h ∈ Θ − θ ∗ , then, E(T T T ) − α∈P q(α)Iθ−1 (α) is positive semi definite [14, Corollary 9.9]. We now prove that the maximum likelihood estimator saturates this asymptotic bound. We prove it comparing θ̂n with θ̂nγ defined by θ̂nγ := argmaxθ∈Θ ℓγn (θ), where ℓγn (θ)(ω1 , . . . , ωn ) = 1 ln Pθ|γ (ω1 , . . . , ωn ) n for all θ ∈ Θ and all ω ∈ Ω. Lemma 4. Assume that ID holds and that for any (j, α) ∈ A × P the function p. (j|α) is twice continuously differentiable in a neighborhood of θ ∗ . Assume further that for each γ ∈ P, Iθ∗ (γ) is not singular. Then, √ lim n(θ̂n − θ̂nγ ) = 0, Pθ∗ |γ − a.s. n→∞ Proof. Standard results of parametric estimation for i.i.d. random variables and our assumption ID imply limn→∞ θ̂nγ = θ ∗ Pθ∗ |γ -a.s. From the definition of the maximum likelihood estimators, (8) ∇ℓγn (θ̂nγ ) − ∇ℓγn (θ̂n ) = ∇ℓn (θ̂n ) − ∇ℓγn (θ̂n ) Let O be a sufficiently small neighborhood of θ ∗ (on which p. is regular). The consistency of θ̂n and θ̂nγ ensures that Pθ∗ |γ -a.s., for n large enough, the likelihood estimators θ̂n and θ̂nγ belong to O. Hence, since by assumption ℓγn is twice differentiable in a neighborhood of θ ∗ , there exists a sequence of random variable ξn lying in the segment with extremity θ̂n and θ̂nγ such that Pθ∗ |γ − a.s., for n large enough, ∇2 ℓγn (ξn )(θ̂n − θ̂nγ ) = ∇ℓγn (θ̂n ) − ∇ℓn (θ̂n ). The last equality comes from (8) and the Mean Value Theorem. Now note that using explicit derivation and the strong law of large number (4), we have lim ∇2 ℓγn (ξn ) = Iθ∗ (γ), Pθ∗ |γ − a.s. n→∞ Since Iθ∗ (γ) is assumed to be non singular and θ 7→ Iθ (γ) is continuous in a neighborhood of θ ∗ , the previous convergence implies that for n large enough ∇2 ℓγn (ξn ) is invertible. It follows that for n large enough, (9) |θ̂n − θ̂nγ | = |[∇2 ℓγn (ξn )]−1 (∇ℓγn (θ̂n ) − ∇ℓn (θ̂n ))| Pθ∗ |γ − a.s. Let us now prove that ∇ℓγn (θ̂n ) − ∇ℓn (θ̂n )) = o(n−1/2 ) Pθ∗ |γ -a.s. QND: PARAMETER ESTIMATION FOR MIXTURES OF MULTINOMIALS 9 Explicit differentiation leads to, X X Nn (j) ∇ℓγn (θ̂n ) − ∇ℓn (θ̂n ) = n α∈P j∈A ∇pθ̂n (j|γ) pθ̂n (j|γ) − ∇pθ̂n (j|α) pθ̂n (j|α) ! q(α)Pθ̂n |α (ω1 , . . . , ωn ) Pθ̂n (ω1 , . . . , ωn ) . From the consistency of θ̂n and the continuous differentiability of p. (j|α) in a neighborhood of θ ∗ , it follows that, there exists C > 0 such that for n large enough, ! q(γ)Pθ̂n |γ (ω1 , . . . , ωn ) |∇ℓγn (θ̂n ) − ∇ℓn (θ̂n ))| ≤ C 1 − Pθ∗ |γ − a.s. Pθ̂n (ω1 , . . . , ωn ) Equation (9) combined with the Pθ∗ |γ -a.s. convergence limn→∞ ∇2 ℓγn (ξn ) = Iθ∗ (γ), and  with the Lemma 2 yields the result. Proposition 2. Assume that ID holds and that for any (j, α) ∈ A × P the function p. (j|α) is three times continuously differentiable in a neighborhood of θ ∗ . Assume further that for any γ ∈ P, Iθ∗ (γ) is not singular. Let Z ∼ N (0, Id ) and Γ be a random variable independent of Z and taking value in P such that Pr(Γ = γ) = q(γ).Then, for any h ∈ Θ − θ∗, L−Pθ∗ +h/√n √ √ 1 = Iθ∗ (Γ)− 2 Z. lim n(θ̂n − (θ ∗ + h/ n)) n→∞ Proof. From standard results in parameter estimation[14], under Assumption ID the statistical model (Pθ|γ , θ ∈ Θ) is LAN. Moreover, for any h ∈ Θ − θ ∗ , under the assumptions of the proposition, (10) lim n→∞ √ √ L−Pθ∗ |γ 1 n(θ̂nγ − (θ ∗ + h/ n)) = Iθ∗ (γ)− 2 Z − h. Actually, the proof of (Pθ|γ , θ ∈ Θ) being LAN and the weak convergence (10) are based on the same Central Limit Theorem. It follows that,   Pθ∗ +h/√n|γ (ω1 , . . . , ωn ) √ √ γ ∗ n(θ̂n − (θ + h/ n)), ln lim n→∞ Pθ∗ |γ (ω1 , . . . , ωn )  1  L−Pθ∗ |γ 1 1 T −2 T = Iθ∗ (γ)Z − h, h Iθ∗ (γ) 2 Z − h Iθ∗ (γ)h . 2 It follows then from Lemmas 2 and 4 that,   Pθ∗ +h/√n (ω1 , . . . , ωn ) √ √ n(θ̂n − (θ ∗ + h/ n)), ln lim n→∞ Pθ∗ (ω1 , . . . , ωn )   1 L−Pθ∗ |γ 1 1 T −2 T = Iθ∗ (γ)Z − h, h Iθ∗ (γ) 2 Z − h Iθ∗ (γ)h . 2 Now, from Le Cam’s third Lemma we get lim n→∞ L−Pθ∗ +h/√n √ √ 1 = Iθ∗ (γ)− 2 Z. n(θ̂n − (θ ∗ + h/ n)) So that, Lemma 1 yields the proposition.  10 T. BENOIST, F.GAMBOA, AND C. PELLEGRINI 5. Applications to Quantum non-Demolition Measurement As mentioned in the Introduction, the above development is motivated by some applications in quantum physics. In particular, as we will see, the above estimation results can be applied in the context of QND measurement. For the sake of completeness we recall briefly the QND model. For a complete overview of this model we refer to [2, 3]. Let {eα | α ∈ P} and {ψj | j ∈ A} be orthonormal basis of respectively Cd and Cl . These last spaces are endowed with their canonical Hilbert space structure. In the context of quantum physics, these basis will be associated with some physical quantities. Each vector of these basis describes the physical state corresponding to an almost sure value of said physical quantities. The Hilbert space Cd describes the quantum system that one aims to measure indirectly. The Hilbert space Cl describes a probe that will be used to measure indirectly. Now, we detail the usual setup of indirect measurement. It consists in measuring something on the probe after some interaction between the system and the probe. More precisely, the interaction is described through a unitary operator U on Cd ⊗ Cl . For QND measurements, this operator may be written as X U= π e α ⊗ Uα . α∈P Here, πeα is the projector on the line Ceα and (Uα )α∈P are unitary operators on Cl . (Uα ) depends on the unknown parameters of the experiment. The state of the system is represented by the unit vector1 φ0 ∈ Cd . This vector may be expanded on the first basis: X φ0 = heα , φ0 i eα . α The state of the probe is represented by a unit vector ψ ∈ Cl . After the interaction the joint system–probe state is the unit vector U (φ0 ⊗ ψ) ∈ Cd ⊗ Cl . This vector may be expanded as, X U (φ0 ⊗ ψ) = heα , φ0 i eα ⊗ Uα ψ. α We are now in position to see how multinomial mixtures encompass the law of sequence of measurement results in QND measurements. To begin with, let us assume that φ0 = eα for some α ∈ P. Then, q0 (α) := |heα , φ0 i|2 = 1. Further, from the definition of U , U (φ0 ⊗ ψ) = eα ⊗ Uα ψ. This property justifies the denomination non demolition explained in the Introduction. If the system state is eα before the interaction it remains eα after the interaction. Quantum mechanics tells that measuring a physical state in {ψj | j ∈ A} has the following probability distribution P[observing ψj ] = |hψj , Uα ψi|2 . 1Actually the state corresponds to the line given by the direction φ . Particularly two states are 0 equivalent if they differ only by a phase. We no longer mention it and always mean equality up to a phase when comparing two states. QND: PARAMETER ESTIMATION FOR MIXTURES OF MULTINOMIALS 11 We set p(j|α) := |hψj , Uα ψi|2 . We will later see how Uα depends on the unknown parameter θ (and will add an index θ to this notation). If φ0 6∈ {eα | α ∈ P}, the probe measurement outcome is ψj with probability X π0 (j) = P[observing ψj ] = |heα , φ0 i|2 |hψj , Uα ψi|2 α = X q0 (α)p(j|α) α The quantum mechanics projection postulate implies that if ψj is the measurement outcome then the joint system–probe state becomes P hφ0 , αihUα ψ, ji φ̃1 (j) = α p ⊗ ψj π0 (j) Hence, the system state goes from φ0 to P hφ0 , αihUα ψ, ji . (11) φ1 (j) = α p π0 (j) In others words, this is the new system state conditioned on the outcome ψj (for the probe). This system state update leads to the update of q0 (α), q1 (α) := |heα , φ1 i|2 = q0 (α) p(j|α) π0 (j) This procedure results in the definition of random variables φ1 and (q1 (α))α∈P whose laws are images of the law P[observing ψj ] = π0 (j). Now, we repeat the previous steps. Let (Xn ) be the resulting sequence of outcome (identifying ψj and j). We have X (12) P[X1 = j] = π0 (j) = q0 (α)p(j|α), (j ∈ A), α (13) ′ P[X1 = j, X2 = j ] = X q0 (α)p(j|α)p(j ′ |α), X q0 (α) α (14) P[X1 = j1 , . . . , Xn = jn ] = α n Y k=1 p(jk |α), (j, j ′ ∈ A), (n ∈ N∗ ; j1 , · · · , jn ∈ A). Using Kolomgorov’s consistency Theorem we thus have defined the law of the random sequence (Xn ). For α ∈ P, let Pα be the probability measure such that n Y (15) Pα [{(j1 , . . . , jn , ω) : ω ∈ Ω}] = p(jk |α). k=1 P Then the law of (Xn ) is the mixture of multinomials α q0 (α)Pα . Let turn now to the statistical model. For any α ∈ P, the unitary operator Uα = Uα (θ) depends on the unknown parameter θ. Hence, we wish to study the statistical model (Pθ ) with X Pθ := q0 (α)Pθ,α α 12 T. BENOIST, F.GAMBOA, AND C. PELLEGRINI where Pθ,α is defined in (15) with pθ (j|α) = |hUα (θ)ψ, ji|2 . Now, all the results developed in the last sections hold whenever the regularity assumptions are assumed directly on (Uα (·))α∈P . Let us now unravel what is the Fisher information for the QND measurement model. Let α ∈ P and Θ be some given non empty open subset of an Euclidean space. Further, let Hα (·) be a differentiable function on Θ taking its values in the set of self-adjoint l × l matrices. For α ∈ P, set Uα (·) := exp(−iHα (·)). Then, a direct differentiation gives,   h∂θk Hα (·)Uα (·)ψ, ψj i ∂θk ln(p· (i|α)) = 2 Im . hUα (·)ψ, ψj i It follows that, (I· (α))kl = 4 X j∈A p· (j|α) Im  h∂θk Hα (·)Uα (·)ψ, ψj i hUα (·)ψ, ψj i  Im  h∂θl Hα (·)Uα (·)ψ, ψj i hUα (·)ψ, ψj i  . More particularly, in the relevant one dimensional case d = 1 where Hα (θ) = θHα for some self adjoint matrices Hα ,   hHα Uα (θ)ψ, ψj i . ∂θ ln(pθ (i|α)) = 2 Im hUα (θ)ψ, ψj i So that, Iθ (α) = 4 X j∈A pθ (j|α) Im 2  hHα Uα (θ)ψ, ψj i hUα (θ)ψ, ψj i  . Toy QND example: We conclude our paper by an illustration of our results on the Haroche’s group experiment [8] mentionned in the Introduction. In that experiment d = 8 and A = {0, 1} × {0, 1, 2, 3} hence l = 8 and j is defined through a bijection j ≡ (x, a). The expression of p(j|α) is provided in [8]. Expressed in our notations we have here,2 pθ (x, a|α) = (θ5 + θ6 cos(αθ4 + θa + xπ))/8. Hence, dim Θ = 7. The ideal values of the parameters are θ5 = θ6 = 1, θ4 = π/4 and θa = (2 − a)π/4. Experimentally some imperfections imply that θ6 is smaller than 1. It is close to θ = 0.674 ± 0.004. Besides this limitation in [8] the authors find parameters close to their target values using a best fit to the empirical distribution. Setting θ6 = 0.674, it is easy to check that ID holds for the ideal parameters and in a small enough but sufficiently large neighborhood of the true parameters. Moreover, all the functions θ 7→ pθ (x, a|α) are entire analytic. We limit ourselves to the estimation of θ4 the other parameters are fixed to their true values except θ6 . We set θ6 = 0.674. Further, we take Θ = [π/8, 3π/8] and, pθ (x, a|α) := (1 + 0.674 cos(αθ + (2 − a)π/4 + xπ))/8. 2Remark that in [8] α = 0, . . . , 7 so Assumption ID is not verified for α = 0. More precisely θ may 4 not be identifiable. Though for the ideal value of θ = π/4, α = 0 is equivalent to α = 8 so we use this value. Hence, we identify the zero photon state with the eight one at the opposite of what is done in [8]. QND: PARAMETER ESTIMATION FOR MIXTURES OF MULTINOMIALS 13 1.6 1.4 1.2 θn 1.0 0.8 0.6 0.4 0.2 0.0 0 50 100 150 n 200 250 300 Figure 1. Numerical simulation of 10 realizations of (θn ) for the toy model described in the text with q(α) proportional to 3.46α /α! for α ∈ {1, . . . , 8}. The black line corresponds to the target value θ ∗ = π/4. It follows that Iθ (α) = 3 X a=0 α2 sin2 (αθ + (2 − a)π/4) 0.6742 . 4 1 − 0.6742 cos2 (αθ + (2 − a)π/4) Fisher information is not singular at θ = π/4. Figure 1 depicts some simulations of (θ̂n ) for this toy model. Acknowledgments T.B and C.P are supported by ANR project StoQ ANR-14-CE250003-01 and CNRS InFIniTi project MISTEQ. The research of T.B. has been supported by ANR-11-LABX-0040-CIMI within the program ANR-11-IDEX-0002-02. References [1] M. Ballesteros, M. Fraas, J. Fröhlich and B. Schubnel, Indirect acquisition of information in quantum mechanics. J. Stat. Phys. 162 (2016) 924–958. 2 [2] M. Bauer and D. Bernard, Convergence of repeated quantum nondemolition measurements and wave-function collapse. Phys. Rev. A 84 (2011) 044103 2, 10 [3] M. Bauer, T. Benoist and D. Bernard, Repeated quantum non-demolition measurements: convergence and continuous time limit. Ann. Henri Poincaré 14 (2013) 639–679. 2, 4, 10 [4] M. Bauer, D. Bernard and T. Benoist, Iterated stochastic measurements. J. Phys. A 45 (2012) 494020. 2 [5] T. Benoist and C. Pellegrini, Large time behavior and convergence rate for quantum filters under standard non demolition conditions. Comm. Math. Phys. 331 (2014) 703–723. 2 [6] V. B. Braginsky, YI. Vorontsov and K. S. Thorne. Quantum nondemolition measurements. Science, 209(4456) (1980) 547–57. 1 14 T. BENOIST, F.GAMBOA, AND C. PELLEGRINI [7] C. Catana, L. Bouten and M. Guţă, Fisher informations and local asymptotic normality for continuous-time quantum Markov processes. J. Phys. A 48 (2015) 365301. 2 [8] C. Guerlin, J. Bernu, S. Deleglise, C. Sayrin, S. Gleyzes, S. Kuhr, M. Brune, J. M. Raimond and S. Haroche, Progressive field-state collapse and quantum non-demolition photon counting Nature 448 (2007) 889–893. 1, 2, 12 [9] M. Guţă and A. Jenčová, Local asymptotic normality in quantum statistics Commun. Math. Phys., 276 (2007) 34–379. 2 [10] M. Guţă and J. Kiukas, Equivalence classes and local asymptotic normality in system identification for quantum Markov chains. arXiv preprint arXiv:1402.3535 (2014). 2 [11] A. S. Holevo, Statistical structure of quantum theory. Springer, 2003. 2 [12] J. Kahn and M. Guţă, Local asymptotic normality and optimal estimation for finite dimensional quantum systems in Quantum stochastics and information: Statistics, Filtering and Control, V. P. Belavkin and M. Guţă editors, World Scientific 2008. 2 [13] P. Six, P. Campagne-Ibarcq, L. Bretheau, B. Huard and P. Rouchon, Parameter estimation from measurements along quantum trajectories, Proc. IEEE Conf. on Decision and Control, (2015) 7742– 7748. 2 [14] A. W. van der Vaart, Asymptotic Statistics Cambridge Series in Statistical and Probabilistic Mathematics, Cambridge University Press 1998 2, 5, 6, 7, 8, 9 Appendix A. Uniform convergence of logarithm of sums of uniformly convergent sequences Lemma 5. Let (an ) and (bn ) be two sequence of strictly positive functions with common domain of definition such that there exists two functions ℓa and ℓb such that, lim n→∞ 1 n ln an − ℓa ∞ =0 lim and n→∞ 1 n ln bn − ℓb ∞ =0 with k · k∞ the sup norm. Then, 1 n lim n→∞ ln(an + bn ) − max(ℓa , ℓb ) ∞ = 0. Proof. Let D be the common domain of definition of the functions. Assumptions imply there exists a sequence (ǫn ) of strictly positive numbers such that limn→∞ ǫn = 0 and max 1 n ln an − ℓa ∞ , 1 n ln bn − ℓb ∞  ≤ ǫn . Since the function ln is non decreasing, we deduce first that for any x ∈ D, 1 n ln(an (x) + bn (x)) − max(ℓa (x), ℓb (x)) ≤ ǫn + 1 n ln 2. Second, let c(x) be such that ℓc = max(ℓa , ℓb ). Then for any x ∈ D, −ǫn ≤ 1 n ln cn (x) − ℓc (x) ≤ and the Lemma holds. 1 n ln(an (x) + bn (x)) − max(ℓa (x), ℓb (x))  QND: PARAMETER ESTIMATION FOR MIXTURES OF MULTINOMIALS 15 Institut de Mathématiques de Toulouse UMR5219, Université de Toulouse ; CNRS, Équipe de Statistique et Probabilités, Université Paul Sabatier, 31062 Toulouse Cedex 9, France E-mail address: [email protected] Institut de Mathématiques de Toulouse UMR5219, Université de Toulouse ; CNRS, Équipe de Statistique et Probabilités, Université Paul Sabatier, 31062 Toulouse Cedex 9, France E-mail address: [email protected] Institut de Mathématiques de Toulouse UMR5219, Université de Toulouse ; CNRS, Équipe de Statistique et Probabilités, Université Paul Sabatier, 31062 Toulouse Cedex 9, France E-mail address: [email protected]
10math.ST
On the Optimality of Tape Merge of Two Lists with Similar Size Qian Li1,2 , Xiaoming Sun1,2 , and Jialin Zhang1,2 arXiv:1610.03266v1 [cs.CC] 11 Oct 2016 1 CAS Key Lab of Network Data Science and Technology, Institute of Computing Technology, Chinese Academy of Sciences, 100190, Beijing, China. 2 University of Chinese Academy of Sciences, Beijing, 100049, China., {liqian, sunxiaoming, zhangjialin}@ict.ac.cn Abstract The problem of merging sorted lists in the least number of pairwise comparisons has been solved completely only for a few special cases. Graham and Karp [18] independently discovered that the tape merge algorithm is optimal in the worst case when the two lists have the same size. In the seminal papers, Stockmeyer and Yao [28], Murphy and Paull [25], and Christen [6] independently showed when the lists to be merged are of size m and n satisfying m ≤ n ≤ b 23 mc + 1, the tape merge algorithm is optimal in the worst case. This paper extends this result by showing that the tape merge algorithm is optimal in the worst case whenever the size of one list is no larger than 1.52 times the size of the other. The main tool we used to prove lower bounds is Knuth’s adversary methods [18]. In addition, we show that the lower bound cannot be improved to 1.8 via Knuth’s adversary methods. We also develop a new inequality about Knuth’s adversary methods, which might be interesting in its own right. Moreover, we design a simple procedure to achieve constant improvement of the upper bounds for 2m − 2 ≤ n ≤ 3m. 1 Introduction Suppose there are two disjoint linearly ordered lists A and B: a1 < a2 < · · · < am and b1 < b2 < · · · < bn respectively, where the m + n elements are distinct. The problem of merging them into one ordered list is one of the most fundamental algorithmic problems which has many practical applications as well as important theoretical significance. This 1 problem has been extensively studied under different models, such as comparisonbased model [18], parallel model [9], in-place merging model [11] etc. In this paper we focus on the classical comparison-based model, where the algorithm is a sequence of pairwise comparisons. People are interested in this model due to two reasons. Firstly, it is independent to the underlying order relation used, no matter it is "<" in R or another abstract order relation. Secondly, it is unnecessary to access the value of elements in this model. Such a restriction could come from security or privacy concerns where the only operation available is a zero-knowledge pairwise comparison which reveals only the ordering relation between elements. The main theoretical question in this merge problem is to determine M(m, n), the minimum number of comparisons which is always sufficient to merge the lists [18]. Given any algorithm g1 to solve the (m, n) merging problem (i.e. where |A| = m and |B| = n), let Mg (m, n) be the number of comparisons required by algorithm g in the worst case, then M(m, n) = min Mg (m, n). g An algorithm g is said to be optimal on (m, n) if Mg (m, n) = M(m, n). By symmetry, it is clear that M(m, n) = M(n, m). To much surprise, this problem seems quite difficult in general, and exact values are known for only a few special cases. Knuth determined the value of M(m, n) for the case m, n ≤ 10 in his book [18]. Graham [18] and Hwang and Lin [16] completely solved the case m = 2 independently. The case m = 3 is quite a bit harder and was solved by Hwang [15] and Murphy [24]. Mönting solved the case m = 4 and also obtained strong results about m = 5 [26]. In addition, Smith and Lang [27] devised a computer program based on game solver techniques such as alpha beta search to compute M(m, n). They uncovered many interesting facts including M(7, 12) = 17, while people used to believe M(7, 12) = 18. Several different algorithms have been developed for the merge problem, among them tape merge or linear merge might be the simplest and most commonly used one. In this algorithm, two smallest elements (initially a1 and b1 ) are compared, and the smaller one will be deleted from its list and placed on the end of the output list. Then repeat the process until one list is exhausted. It’s easy to see that this algorithm requires m+n−1 comparisons in the worst case, hence M(m, n) ≤ m+n−1. However, when m is much smaller than n, it is obvious that this algorithm becomes quite inefficient. For example, when m = 1, the merging problem is equivalent to an insertion problem and the rather different binary insertion procedure is optimal, i.e. M(1, n) = dlg(n + 1)e. One nature question is "when is tape merge optimal?". By symmetry, we can assume n ≥ m and define α(m) be the maximum integer n(≥ m) such that tape merge is optimal, i.e. α(m) = max{n ∈ N | M(m, n) = m + n − 1, n ≥ m}. 1 We only consider deterministic algorithms in this paper. 2 Assume a conjecture proposed by Knuth [18], which asserts that M(m, n + 1) ≤ M(m, n) + 1 ≤ M(m + 1, n), for m ≤ n, is correct, it’s easy to see tape merge is optimal if and only if n ≤ α(m), and α(m) is monotone increasing. Graham and Karp [18] independently discovered that M(m, m) = 2m − 1 for m ≥ 1. Then Knuth [18] proved α(m) ≥ 4 for m ≤ 6. Stockmeyer and Yao [28], Murphy and Paull [25], and Christen [6] independently significantly improved the lower bounds by showing α(m) ≥ b 23 mc + 1, that is M(m, n) = m + n − 1, for m ≤ n ≤ b 32 mc+1. On the other hand, Hwang [14] showed that M(m, 2m) ≤ 3m−2, which implies α(m) ≤ 2m − 1. For m ≤ n ≤ 2m − 1, the best known merge algorithm is tape merge algorithm. It is conjectured by Fernandez et al. [8] that √ 1+ 5 α(m) = 2 m ± o(m). For general n ≥ m, Hwang and Lin [14] proposed an in-between algorithm called binary merge, which excellently compromised between binary insertion and tape merge in such a way that the best features of both are retained. It reduces to tape merge when n ≤ 2m, and reduces to binary insertion when m = 1. Let Mbm (m, n) be the worst-case complexity of this algorithm. They showed that Mbm (m, n) = m(1 + blg n n c) + b blg n c c − 1. m 2 m Hwang and Deutsch [13] designed an algorithm which is optimal over all insertive algorithms including binary merge, where for each element of the smaller list, the comparisons involving it are made consecutively. However, the improvement for fixed n/m over binary merge increases more slowly than linearly in m [23]. Here we say that algorithm A1 with complexity MA1 (m, n) is significantly faster for some fixed ratio n/m than algorithm A2 with complexity MA2 (m, n), if MA2 (m, n) − MA1 (m, n) = Ω(m). The first significant improvement over binary merge was proposed by Manacher [23], which can decrease the number of com31 parisons by 336 m for n/m ≥ 8, and Thanh and Bui [31] further improved this num13 ber to 84 m. In 1978, Christen [5] proposed an elegant algorithm, called forward testing and backward insertion, which is better than binary merge when n/m ≥ 3 P and saves at least kj=1 b m−1 c comparisons over binary merging, for n ≥ 4k m. Thus 4j it saves about m/3 comparisons when n/m → ∞. Moreover, Christen’s procedure is optimal for 5m − 3 ≤ n ≤ 7m, i.e. M(m, n) = b(11m + n − 3)/4c. On the lower bound side, there are two main techniques in proving lower  bounds. The first one is the information theoretic lower bound I(m, n) = dlg m+n m e. Hwang and Lin [14] have proved that I(m, n) ≤ M(m, n) ≤ Mbm (m, n) ≤ I(m, n) + m. The second one is called Knuth’s adversary methods [18]. The idea is that the optimal merge problem can be viewed as a two-player game with perfect information, in which the algorithm chooses the comparisons, while the adversary chooses(consistently) the results of these comparisons. It is easy to observe that M(m, n) is actually the min-max value of this game. Thus a given strategy of the 3 adversary provides a lower bound for M(m, n). Mainly because of the consistency condition on the answers, general strategies are rather tedious to work with. Knuth proposed the idea of using of "disjunctive" strategies, in which a splitting of the remaining problem into two disjoint problems is provided, in addition to the result of the comparison. With this restricted adversary, he used term .M.(m, n) to represent the minimum number of comparisons required in the algorithm, which is also a lower bound of M(m, n). The detail will be specified in Section 2. 1.1 Our Results In this paper, we first improve the lower bounds of α(m) from b 32 mc + 1 to b 38 25 mc by using Knuth’s adversary methods. Theorem 1. M(m, n) = m + n − 1, if m ≤ n ≤ 38 25 m. We then show limitations of Knuth’s adversary methods. Theorem 2. .M.(m, n) < m + n − 1, if n ≥ 9dm/5e. This means that by using Knuth’s adversary methods, it’s impossible to show α(m) ≥ 9dm/5e ≈ 59 m for any m. When m ≤ n ≤ 3m, binary merge is the best known algorithm, which reduces to tape merge for n ∈ [m, 2m] and gives Mbm (m, 2m+k) = 3m+bk/2c−1 for k ∈ [0, m]. In this paper, we give improved upper bounds for M(m, n) for 2m − 2 ≤ n ≤ 3m. In particular, it also improves the upper bounds of α(m), that is, α(m) ≤ 2m − 3 for m ≥ 7. Theorem 3. (a) M(m, 2m + k) ≤ 3m + bk/2c − 2 = Mbm (m, 2m + k) − 1, if m ≥ 5 and k ≥ −1. (b) M(m, 2m−2) ≤ 3m−4 = Mbm (m, 2m−2)−1, if m ≥ 7. That is α(m) ≤ 2m−3 for m ≥ 7. (c) M(m, 2m) ≤ 3m − 3 = Mbm (m, 2m) − 2, if m ≥ 10. 1.2 Related work Besides the worst-case complexity, the average-case complexity has also been investigated for merge problems. Tanner [29] designed an algorithm which uses at most 1.06I(m, n) comparisons on average. The average case complexity of insertive merging algorithms as well as binary merge has also been investigated [7, 8]. Bui et al. [30] gave the optimal randomized algorithms for (2, n) and (3, n) merge problems and discovered that the optimal expected value differs from the optimal worst-case value by at most 1. Fernandez et al. [8] designed a randomized merging algorithm which performs well for any ratio n/m and is significantly faster 4 √ than binary merge for n/m > ( 5 + 1)/2 ≈ 1.618. More preciously, they showed that     sn + (1 + s)m, i f 1 + s ≤ n/m ≤ 2 + s, MF (m, n) =  (1) √   2 mn, i f 2 + s ≤ n/m ≤ 2r, √ √ √ Where s = ( 5 − 1)/2 ≈ 0.618 and r = ( 2 − 1 + 2s)2 ≈ 1.659. Nathan Linial [21] studied a more general problem where partial order relations are already known. He showed the information-theoretic lower bound is good, √ that is, an algorithms exists which merges A and B in no more than (lg( 5 + 1)/2)−1 lg N0 comparisons, where N0 is the number of extensions of the partial order on A ∪ B. They also pointed out that this bound is tight, and the computation needed for finding the appropriate queries can be done in time polynomial in m + n. Sorting, merging, selecting and searching are always closely related to each other. Manacher et al. [22] used efficient merge algorithms to improve FordJohnson sorting algorithm, which was conjectured to be optimal for almost twenty years. Linial and Saks [20] observed that M(m, n) is equivalent to the minimum number of pairwise comparisons to search an entry in a m × n matrix in which distinct entries are known to be increasingly ordered along rows and columns. They also studied the generalized problem in monotone multi-dimensional arrays, and their result was further improved by Cheng et al. [4]. Ajtai et al. [1] considered the problem of sorting and selection with imprecise comparisons. The non-uniform cost model has also been investigated [3, 10, 12, 17], for example, Huang et al. [12] studied the sorting problem where only a subset of all possible pairwise comparisons is allowed. For practical use, Brown and Tarjan [2] gave a merging procedure which runs in O(I(m, n)) time on a real computer. Organization. We introduce some notations and explain Knuth’s adversary methods in Section 2. In Section 3 we provide some properties of Knuth’s adversary methods which will be used. In Section 4 we improve the lower bounds for α(m) via Knuth’s adversary methods. Then we show limitations of this method in Section 5. Section 6 improves the upper bounds for M(m, 2m + k). We conclude the paper with some open problems in Section 7. 2 Preliminaries In this section, we introduce Knuth’s adversary methods and present some notations. We use the notations λMρ proposed by Knuth in this paper. The detailed definitions can be found in Knuth’s comprehensive monograph [18]. Yao et al. [28] gave an example to illustrate the use of that. Here, we briefly introduce the idea. The basic idea of Knuth’s adversary methods is to restrict the possible adversary strategies. In general, the adversary can arbitrarily answer the comparison query from the algorithm as long as there are no contradictions in his answer. But in Knuth’s adversary methods, after each comparison query between ai and b j , 5 the adversary is required to split each sorted list into two parts A = A1 ∪ A2 and B = B1 ∪ B2 (Figure 1). The adversary guarantees that each element in A1 or B1 is smaller than any element in A2 or B2 . It is also guaranteed that ai and b j are not in the same subproblem, i.e. neither ai ∈ A1 , b j ∈ B1 nor ai ∈ A2 , b j ∈ B2 , thus, the comparison result between ai and b j is determined after the splitting. Then the merge problem will be reduced to two subproblems (A1 , B1 ) and (A2 , B2 ) with different left or right constraints. For example, in case 2, the constraint for subproblem (A1 , B1 ) is a right constraint bl < ak since ak ∈ A2 while bl ∈ B1 . (a) Case 1 (b) Case 2 (c) Case 3 Figure 1: The Adversary’s Splitting Strategies Knuth introduced notation λMρ to represent nine kinds of restrict adversaries, where λ, ρ ∈ {., \, /} are the left and right constraint. In general, the constraint notation 0 .0 means no left (or right) constraint. Left constraint λ = \ or / means that outcomes must be consistent with a1 < b1 or a1 > b1 respectively. Similarly, right constraint ρ = \(/) means the outcomes must be consistent with am < bn (or am > bn respectively). Thus, merge problem λMρ(A, B) will reduce to subproblem λM.(A1 , B1 ) and .Mρ(A2 , B2 ) in case 1, to subproblem λM/(A1 , B1 ) and \Mρ(A2 , B2 ) in case 2, and to subproblem λM\(A1 , B1 ) and /Mρ(A2 , B2 ) in case 3. For convenience, we say the adversary adopts a simple strategy if he splits the lists in the way of case 1, otherwise the adversary adopts a complex strategy (case 2 or 3). There are obvious symmetries, such as /M.(m, n) = .M\(m, n) = \M.(n, m) = .M/(n, m), /M/(m, n) = \M\(m, n), and /M\(m, n) = \M/(n, m), which means we can deduce the nine functions to four functions: .M., /M., /M\, and /M/. These functions can be calculated by a computer rather quickly, and the values for all m, n ≤ 150 and the program are available in [19]. Note M(m, n) ≥ .M.(m, n), but M(m, n) is not equal to .M(m, n). in general, since we restrict the power of adversary in the decision tree model by assuming there is a (unknown) division of the lists after each comparison. But this restrict model still covers many interesting cases. For example, when m ≤ n ≤ b 32 mc + 1 [6, 25, 28] or 5m − 3 ≤ n ≤ 7m [5], .M(m, n). = M(m, n). Let λMi, j ρ(m, n) denote the number of comparisons resulted from adversary’s best strategy if the first comparison is ai and b j , thus λMρ(m, n) = mini, j λMi, j ρ(m, n). The following notation is also used in our paper. Definition 1. Let .M.(m, n) be the difference of the number of comparisons required 6 by tape merge in the worst case and .M.(m, n), i.e. .M.(m, n) , m+n−1−.M.(m, n). 3 Inequalities about Knuth’s adversary methods In this section, we list several inequalities about λMρ, which will be used in Section 4 and Section 5. Lemma 1. For any λ, ρ ∈ {., /, \}, we have (a) .Mρ(m, n) ≥ λMρ(m, n); (b) /Mρ(m, n) ≤ .Mρ(m, n − 1) + 1. Proof. Part (a) is obvious, the adversary can perform at least as well on less restrictions. In Part (b), if the first comparison is a1 and b1 for /Mρ(m, n), the adversary has to claim a1 > b1 , thus it reduces to .Mρ(m, n − 1). Therefore we have /Mρ(m, n) ≤ /M1,1 ρ(m, n) = 1 + .Mρ(m, n − 1).  In the following, we will show that if .M.(m, n) = m + n − 1, then tape merge is optimal for any (m0 , n0 ) satisfying m0 ≥ m, n0 ≤ n and m0 ≤ n0 . That is Lemma 2. For any m, n ≥ 0, m + n ≥ 1 and m ≤ n, we have .M.(m + 1, n) ≥ .M.(m, n) + 1 ≥ .M.(m, n + 1) or .M.(m + 1, n) ≤ .M.(m, n) ≤ .M.(m, n + 1). In order to prove this lemma, We show the following lemma first: Lemma 3. .M.(m + 1, n + 1) ≥ .M.(m, n) + 2, for any m, n ≥ 0 and m + n ≥ 1. Proof. The proof is by induction on m and n. The starting values for m, n ≤ 3 can be easily checked in [18]. Now suppose the theorem holds for any m0 , n0 satisfying m0 ≤ m, n0 ≤ n and m0 + n0 < m + n, we then prove the case (m, n). Note that our task is to design a strategy for the adversary for (m + 1, n + 1). Suppose an algorithm begins by comparing ai and b j , where i ≤ m, j = n + 1. The adversary claims that ai < b j , and follows the simple strategy, yielding .Mi, j .(m + 1, n + 1) ≥ 1 + .M.(m, n) + .M.(1, 1) ≥ .M.(m, n) + 2 If i = m + 1 and j ≤ n, the adversary claims that ai > b j , and uses the simple strategy. This leads to .Mi, j .(m + 1, n + 1) ≥ 1 + .M.(m, n) + .M.(1, 1) ≥ .M.(m, n) + 2 If i ≤ m and j ≤ n, assume that if we compare ai and b j in .M.(m, n), the adversary’s best strategy is 1 + .Mρ(p, q) + λM.(s, t), where ρ, λ ∈ {., /, \} and s + t ≥ 1 if λ = . and s, t ≥ 1 if λ = {/, \}. Then the adversary uses the same strategy here, and we get .Mi, j .(m + 1, n + 1) ≥ 1 + .Mρ(p, q) + λM.(s + 1, t + 1) ≥ 1 + .Mρ(p, q) + λM.(s, t) + 2 = .M.(m, n) + 2 7 by applying the induction hypothesis and Lemma 4. If i = m + 1 and j = n + 1, we can handle this case as well by reversing the order of the elements in A and B. Therefore adversary can always find a strategy which results the number of comparisons not smaller than .M.(m, n) + 2, no matter what the first comparison is. This completes our proof.  Now we are ready to prove Lemma 2. Proof. We induce on m and n. The case for 1 ≤ m + n ≤ 10 are given in [18]. Now suppose that m + n ≥ 11 and the lemma is already established for any (m0 , n0 ) satisfying m0 + n0 < m + n. Part (a). If m = 1, we have .M.(1, n + 1) ≤ .M1,n+1 .(1, n + 1) = max{1, 1 + .M.(1, n)} = 1+.M.(1, n). If m ≥ 2, then .Mm,n+1 .(m, n+1) = max{.M.(m−1, n+1), .M.(m, n)}+1, and by the induction we know .M.(m, n) ≥ .M.(m − 1, n) + 1 ≥ .M.(m − 1, n + 1), thus .M.(m, n+1) ≤ .Mm,n+1 .(m, n+1) ≤ max{.M.(m−1, n+1), .M.(m, n)}+1 = .M.(m, n)+1. Part (b). When m = n, .M.(m + 1, m) ≥ .M.(m, m − 1) + 2 ≥ .M.(m − 1, m − 2) + 4 ≥ · · · ≥ .M.(2, 1) + 2m − 2 = 2m according to Lemma 3, thus .M.(m + 1, m) ≥ .M.(m, m) + 1, since .M.(m, m) ≤ 2m − 1. When m < n, we have .M.(m + 1, n) ≥ .M.(m, n − 1) + 2 ≥ .M.(m, n) + 1. The first inequality is due to Lemma 3, and the second one is by the induction hypothesis.  We can show a similar statement about /M. function as well. The proof is very similar, and we give it as well for sake of completeness. Lemma 4. For any m, n ≥ 1, we have (a) /M.(m + 1, n + 1) ≥ /M.(m, n) + 2 [28]; and for any m, n ≥ 1 and m ≤ n, we have (b) /M.(m, n + 1) ≤ /M.(m, n) + 1; (c) /M.(m + 1, n) ≥ /M.(m, n) + 1, except (m, n) = (1, 1), (2, 2) or (3, 3). Proof. We induce on m and n. The case for 1 ≤ m + n ≤ 10 are given in [18]. Now suppose that m + n ≥ 11 and the lemma is already established for any (m0 , n0 ) satisfying m0 + n0 < m + n. Part (b). 8 If m = 1, we have /M.(1, n+1) ≤ /M1,n+1 .(1, n+1) = max{1, 1+/M.(1, n)} = 1+ /M.(1, n). If m ≥ 2, then /Mm,n+1 .(m, n + 1) = max{/M.(m − 1, n + 1), /M.(m, n)} + 1, and by the induction we know /M.(m, n) ≥ /M.(m − 1, n) + 1 ≥ /M.(m − 1, n + 1), thus /M.(m, n+1) ≤ /Mm,n+1 .(m, n+1) ≤ max{/M.(m−1, n+1), /M.(m, n)}+1 = /M.(m, n)+1. Part (c). When m = n, /M.(m + 1, m) ≥ /M.(m, m − 1) + 2 ≥ /M.(m − 1, m − 2) + 4 ≥ · · · ≥ /M.(5, 4) + 2m − 8 = 2m according to Part (a), thus /M.(m + 1, m) ≥ /M.(m, m) + 1, since /M.(m, m) ≤ 2m − 1. When m < n, we have /M.(m + 1, n) ≥ /M.(m, n − 1) + 2 ≥ /M.(m, n) + 1. The first inequality is due to Part(a), and the second one is by the induction hypothesis.  4 Lower bounds for α(m) The key step is to show that .M.(m + 25, n + 38) ≥ .M.(m, n) + 63, which directly implies Theorem 1. Since it’s unavoidable to show similar statements for other restricted adversaries λMρ, we prove them by induction in parallel. In addition, by symmetry, we have /M.(m, n) = .M\(m, n), \M.(m, n) = .M/(m, n), and /M/(m, n) = \M\(m, n) , so the following theorem is enough for our goal. The idea is similar with Lemma 3. We suggest readers to read the proof the Lemma 3 at first as a warmup. Theorem 4. For m, n ≥ 0 and m + n ≥ 1, we have (a) .M.(m + 25, n + 38) ≥ .M.(m, n) + 63; and for m, n ≥ 1, we have (b) /M.(m + 25, n + 38) ≥ /M.(m, n) + 63; (c) \M.(m + 25, n + 38) ≥ \M.(m, n) + 63; (d) /M\(m + 25, n + 38) ≥ /M\(m, n) + 63; (e) \M\(m + 25, n + 38) ≥ \M\(m, n) + 63, except (m, n) = (1, 1); (f) \M/(m + 25, n + 38) ≥ \M/(m, n) + 63, except (m, n) = (2, 1). Proof. The proof is by induction on m and n. The starting values for m, n ≤ 50 are given in [19]. Now suppose the theorem holds for any m0 , n0 satisfying m0 ≤ m, n0 ≤ n and m0 + n0 < m + n, we then prove the case (m, n) where m ≥ 51 or n ≥ 51. Recall that our task is to design a strategy for the adversary for (m + 25, n + 38). 9 Part (a). Suppose an algorithm begins by comparing ai and b j , if i ≤ m and j ≥ n + 1, then the adversary claims ai < b j and follows the simple strategy, yielding .Mi, j .(m + 25, n + 38) ≥ 1 + .M.(m, n) + .M.(25, 38) = .M.(m, n) + 63. If i ≥ m+1 and j ≤ n, the adversary claims ai > b j and uses the simple strategy. This leads to .Mi, j .(m + 25, n + 38) ≥ 1 + .M.(m, n) + .M.(25, 38) = .M.(m, n) + 63. If i ≤ m and j ≤ n, assume if we compare ai and b j in .M.(m, n), the adversary’s best strategy is 1 + .Mρ(p, q) + λM.(s, t) where λ, ρ ∈ {., /, \}, then adversary uses the same strategy here, and we get .Mi, j .(m + 25, n + 38) ≥ 1 + .Mρ(p, q) + λM.(s + 25, t + 38) ≥ 1 + .Mρ(p, q) + λM.(s, t) + 63 ≥ .M.(m, n) + 63 by using the induction hypothesis. If i ≥ m+1 and j ≥ n+1, then i ≤ 25 and j ≤ 38 cannot happen simultaneously, thus there are only three possible cases: (i ≥ 26, j ≤ 38), (i ≤ 25, j ≥ 39), or (i ≥ 26, j ≥ 39). Reversing the order of the elements in A and B maps all these three cases to the above ones, so we can handle these cases as well by symmetry. Therefore no matter which two elements are chosen to compare at the first step, the adversary can always find a strategy resulting the value not smaller than .M.(m, n) + 63. This completes the proof of Part (a). Part (b). Suppose an algorithm begins by comparing ai and b j , if i ≤ m and j ≥ n + 1, then the adversary claims ai < b j and follows the simple strategy, yielding /Mi, j .(m + 25, n + 38) ≥ 1 + /M.(m, n) + .M.(25, 38) = /M.(m, n) + 63. If i ≥ m+1 and j ≤ n, the adversary claims ai > b j and uses the simple strategy. This leads to /Mi, j .(m + 25, n + 38) ≥ 1 + /M.(m, n) + .M.(25, 38) = /M.(m, n) + 63. If i ≤ m and j ≤ n, assume if we compare ai and b j in /M.(m, n), the adversary’s best strategy is 1 + /Mρ(p, q) + λM.(s, t) where λ, ρ ∈ {., /, \}, then adversary uses the same strategy here, and we get /Mi, j .(m + 25, n + 38) ≥ 1 + /Mρ(p, q) + λM.(s + 25, t + 38) ≥ 1 + /Mρ(p, q) + λM.(s, t) + 63 ≥ /M.(m, n) + 63 by using the induction hypothesis. 10 If i ≥ m+1 and j ≥ n+1, then i ≤ 25 and j ≤ 38 cannot happen simultaneously, so we only need to consider the following cases: If i ≤ 25 and j ≥ 39, or i ≥ 26 and j ≤ 38, the adversary uses the simple strategy, yielding /Mi, j .(m+25, n+38) ≥ 1+/M.(25, 38)+.M.(m, n) ≥ 1+62+.M.(m, n) ≥ /M.(m, n)+63. If i ≥ 26 and j ≥ 39: assume if we compare ai−25 and b j−38 in /M.(m, n), the adversary’s best strategy is 1 + /Mρ(p, q) + λM.(s, t). If (p, q, ρ) , (1, 1, /), the adversary uses the same strategy, and we get /Mi, j .(m + 25, n + 38) ≥ 1 + /Mρ(p + 25, q + 38) + λM.(s, t) ≥ 1 + /Mρ(p, q) + 63 + λM.(s, t) ≥ /M.(m, n) + 63 by the induction hypothesis. If (p, q, ρ) = (1, 1, /), then we know that i ≥ 27 and j = 39, and the adversary can use the simple strategy, yielding /Mi, j .(m + 25, n + 38) ≥ 1 + /M.(25, 39) + .M.(m, n − 1) = 1 + 63 + .M.(m, n − 1) ≥ 63 + /M.(m, n). The last inequality is due to Lemma 1. Therefore the adversary can always find a strategy resulting the value not smaller than /M.(m, n) + 63, no matter what the first comparison is. This completes the proof of Part (b). Part (c). Suppose an algorithm begins by comparing ai and b j , if i ≤ m and j ≥ n + 1, then the adversary claims ai < b j and follows the simple strategy, yielding \Mi, j .(m + 25, n + 38) ≥ 1 + \M.(m, n) + .M.(25, 38) = \M.(m, n) + 63. If i ≥ m+1 and j ≤ n, the adversary claims ai > b j and uses the simple strategy. This leads to \Mi, j .(m + 25, n + 38) ≥ 1 + \M.(m, n) + .M.(25, 38) = \M.(m, n) + 63. If i ≤ m and j ≤ n, assume if we compare ai and b j in .M.(m, n), the adversary’s best strategy is 1 + \Mρ(p, q) + λM.(s, t) where λ, ρ ∈ {., /, \}, then adversary uses the same strategy here, and we get \Mi, j .(m + 25, n + 38) ≥ 1 + \Mρ(p, q) + λM.(s + 25, t + 38) ≥ 1 + \Mρ(p, q) + λM.(s, t) + 63 ≥ .M.(m, n) + 63 by using the induction hypothesis. Similar with the above argument, if i ≥ m + 1 and j ≥ n + 1, we only need to investigate the following cases: 11 If i ≤ 25 and j ≥ 39, or i ≥ 27 and j ≤ 38, the adversary uses the complex strategy with a26 in both subproblems. This leads to \Mi, j .(m + 25, n + 38) ≥ 1 + \M/(26, 38) + \M.(m, n) = 1 + 62 + \M.(m, n) = \M.(m, n) + 63. If i = 26 and j ≤ 38, since i ≥ m + 1 and j ≥ n + 1, then m ≤ 25 and n ≤ 37 and these cases have been checked as starting values. If i ≥ 26 and j ≥ 39: assume if we compare ai−25 and b j−38 in \M.(m, n), the adversary’s best strategy is 1 + \Mρ(p, q) + λM.(s, t). If (p, q, ρ) , (1, 1, \) or (2, 1, /), the adversary uses the same strategy, yielding \Mi, j .(m + 25, n + 38) ≥ 1 + \Mρ(p + 25, q + 38) + λM.(s, t) ≥ 1 + \Mρ(p, q) + 63 + λM.(s, t) ≥ \M.(m, n) + 63 by the induction hypothesis. If (p, q, ρ) = (1, 1, \), we have i = 26 and j ≥ 40. The adversary claims ai < b j and follows the simple strategy, yielding \Mi, j .(m + 25, n + 38) ≥ 1 + \M.(26, 38) + .M.(m − 1, n) = 1 + 63 + .M.(m − 1, n) ≥ 63 + \M.(m, n) by using Lemma 1. If (p, q, ρ) = (2, 1, /), we have i ≥ 28 and j = 39 or i = 26 and j > 39, since the case where i = 26 and j > 39 has already been considered, we only need to investigate the case where i ≥ 28 and j = 39. Notice that j ≥ n + 1, i.e. n ≤ 38, hence m ≥ 50. If i > 28, the adversary claims ai > b j and follows the complex strategy with a28 in both subproblems. This leads to \Mi, j .(m + 25, n + 38) ≥ 1 + \M/(28, 39) + \M.(m − 2, n − 1) = 1 + 66 + \M.(m − 2, n − 1) ≥ 66 + \M.(m − 1, n − 1) ≥ 63 + 1 + \M/(2, 1) + \M.(m − 1, n − 1) = 63 + \Mi−25,1 .(m, n) ≥ \M.(m, n) + 63. The second inequality is according to Lemma 4 and the second equality is the assumption of the best strategy for the adversary. If i = 28 and j = 39, we have m ≤ 27 and n ≤ 38, which have been checked as starting values. Therefore the adversary can always find a strategy resulting the value not smaller than \M.(m, n) + 63. This completes the proof of Part (c). Part (d). If i ≤ 25 and j ≥ 39, or i ≥ 26 and j ≤ 38, the adversary uses the simple strategy, yielding /Mi, j \(m + 25, n + 38) ≥ 1 + /M.(25, 38) + .M\(m, n) ≥ 1 + 62 + .M\(m, n) ≥ /M\(m, n) + 63. If i ≥ 26 and j ≥ 39: assume if we compare ai−25 and b j−38 in /M\(m, n), the adversary’s best strategy is 1 + /Mρ(p, q) + λM\(s, t). If (p, q, ρ) , (1, 1, /), the 12 adversary uses the same strategy, and we get /Mi, j \(m + 25, n + 38) ≥ 1 + /Mρ(p + 25, q + 38) + λM\(s, t) ≥ 1 + /Mρ(p, q) + 63 + λM\(s, t) = /M\(m, n) + 63 by the induction hypothesis. If (p, q, ρ) = (1, 1, /), then we know that i ≥ 27 and j = 39, and the adversary can use the simple strategy, yielding /Mi, j \(m + 25, n + 38) ≥ 1 + /M.(25, 39) + .M\(m, n − 1) ≥ 1 + 63 + .M\(m, n − 1) ≥ 63 + /M\(m, n). The last inequality is due to Lemma 1. If i ≤ 25 and j ≤ 38, reserving the order of the elements maps this case to the above cases, thus we can handle this case as well by symmetry. Therefore the adversary can always find a strategy which is not smaller than /M\(m, n) + 63, no matter which the first comparison is. So Part (d) is true. Part (e). If i ≥ m + 1 and j ≤ n, or i ≤ m and j ≥ n + 1, the adversary uses the simple strategy, yielding \Mi, j \(m + 25, n + 38) ≥ 1 + \M.(m, n) + .M\(25, 38) = \M\(m, n) + 63. If i ≤ m and j ≤ n: assume if we compare ai and b j in \M\(m, n), the adversary’s best strategy is 1 + \Mρ(p, q) + λM\(s, t). If (s, t, λ) , (1, 1, \), the adversary uses the same strategy, and we get \Mi, j \(m + 25, n + 38) ≥ 1 + \Mρ(p, q) + λM\(s + 25, t + 38) ≥ 1 + \Mρ(p, q) + λM\(s, t) + 63 = \M\(m, n) + 63 by the induction hypothesis. If (s, t, λ) = (1, 1, \), then we know that i ≤ m − 1 and j = n, and the adversary can use the simple strategy, yielding \Mi, j \(m + 25, n + 38) ≥ 1 + \M.(m, n − 1) + .M\(25, 39) ≥ 1 + .M\(m, n − 1) + 63 ≥ 63 + \M\(m, n). The last inequality is due to Lemma 1. If i ≥ m+1 and j ≥ n+1, then i ≤ 25 and j ≤ 38 cannot happen simultaneously, so we only need to investigate the following cases: If i ≤ 25 and j > 38, or i ≥ 27 and j ≤ 38, the adversary uses the complex strategy with a26 in both subproblems. This leads to \Mi, j \(m + 25, n + 38) ≥ 1 + \M/(26, 38) + \M\(m, n) = \M\(m, n) + 63. If i = 26 and j ≤ 38, then m ≤ 25 and n ≤ 38, which have been checked as starting values. 13 If i ≥ 26 and j ≥ 39: assume if we compare ai−25 and b j−38 in \M\(m, n), the adversary’s best strategy is 1 + \Mρ(p, q) + λM\(s, t). If (p, q, ρ) , (1, 1, \) or (2, 1, /), the adversary uses the same strategy, yielding \Mi, j \(m + 25, n + 38) ≥ 1 + \Mρ(p + 25, q + 38) + λM\(s, t) ≥ \M\(m, n) + 63 by the induction hypothesis. If (p, q, ρ) = (1, 1, \), we have i = 26 and j > 39. The adversary claims ai < b j and uses the simple strategy, leading to \Mi, j \(m + 25, n + 38) ≥ 1 + \M.(26, 38) + .M\(m − 1, n) = 64 + .M\(m − 1, n) ≥ 63 + \M\(m, n) by using Lemma 1. If (p, q, ρ) = (2, 1, /), the case where i ≥ 28 and j = 39 is the only unconsidered case. If we compare a2 with b1 in \M\(m, n), and the adversary claims a2 > b1 , then the best strategy must be 1 + \M.(1, 1) + .M\(m − 1, n − 1), otherwise the adversary claims a2 < b1 , and the best strategy must be 1 + .M\(m − 2, n). So we get \M\(m, n) ≤ \M2,1 \(m, n) = max{1 + .M\(m − 2, n), 2 + .M\(m − 1, n − 1)}. If .M\(m − 2, n) ≥ 1 + .M\(m − 1, n − 1), then .M\(m − 2, n) + 1 ≥ \M\(m, n), and the adversary splits the problem \M\(m+25, n+38) into two independent subproblems \M.(27, 38) and .M\(m − 2, n) before the algorithm begins, and this leads to \M\(m + 25, n + 38) ≥ \M.(27, 38) + .M\(m − 2, n) ≥ 63 + \M\(m, n) Otherwise (.M\(m − 2, n) < 1 + .M\(m − 1, n − 1)), then 2 + .M\(m − 1, n − 1) ≥ \M\(m, n) and the adversary claims ai > b j and uses the simple strategy, yielding \M\(m + 25, n + 38) ≥ \M.(26, 39) + .M\(m − 1, n − 1) + 1 ≥ \M\(m, n) + 63. Therefore the adversary can always find a strategy resulting the value not smaller than \M\(m, n) + 63. This completes the proof of Part (e). Part (f). If n > 50, we can assume j ≥ b 38+n 2 c ≥ 44 by symmetry. If i ≤ 25, the adversary claims ai < b j and uses the complex strategy with a26 in both subproblems. This leads to \M/(m + 25, n + 38) ≥ 1 + \M/(26, 38) + \M/(m, n) = 63 + \M/(m, n). If i ≥ 26: assume that if we compare ai−25 and b j−38 in \M\(m, n), the adversary’s best strategy is 1 + \Mρ(p, q) + λM/(s, t). If (p, q, ρ) , (1, 1, \), (2, 1, /), adversary uses the same strategy, yielding \Mi, j /(m + 25, n + 38) ≥ 1 + \Mρ(p + 25, q + 38) + λM/(s, t) ≥ \M/(m, n) + 63 by using the induction hypothesis. If (p, q, ρ) = (1, 1, \), we have i = 26 and j ≥ 40. The adversary claims ai < b j and use the simple strategy, yielding \Mi, j /(m + 25, n + 38) ≥ 1 + \M.(26, 28) + .M/(m − 1, n) = 64 + .M/(m − 1, n) ≥ 63 + \M/(m, n) 14 by using Lemma 1. If (p, q, ρ) = (2, 1, /), we have i ≥ 28 and j = 39, violating the assumption j ≥ 44. If n ≤ 50, then m > 50 and we can assume i ≥ b 25+m 2 c ≥ 38 by symmetry. If j ≤ 38, the adversary claims ai > b j , and uses the complex strategy with a26 in both subproblems, yielding \M/(m + 25, n + 38) ≥ 1 + \M/(26, 38) + \M/(m, n) ≥ 63 + \M/(m, n). If j ≥ 39: assume if we compare ai−25 and b j−38 in \M\(m, n), the adversary’s best strategy is 1 + \Mρ(p, q) + λM/(s, t). If (p, q, ρ) , (1, 1, \) or (2, 1, /), then adversary uses the same strategy, thus \Mi, j /(m + 25, n + 38) ≥ 1 + \Mρ(p + 25, q + 38) + λM/(s, t) ≥ \M/(m, n) + 63 by using the induction hypothesis. If (p, q, ρ) = (2, 1, /), we have j = 39. Similar with the argument in Part (e), we get \M/(m, n) ≤ \M2,1 /(m, n) = max{1+.M/(m− 2, n), 2+.M/(m−1, n−1)}. If .M/(m−2, n) ≥ 1+.M/(m−1, n−1), the adversary splits the problem \M/(m + 25, n + 38) into two independent subproblems \M.(27, 38) and .M/(m − 2, n) before the first comparison begins, and this leads to \M/(m + 25, n + 38) ≥ \M.(27, 38) + .M/(m − 2, n) ≥ 63 + \M/(m, n). Otherwise (.M/(m−2, n) < 1+.M/(m−1, n−1)), then the adversary claims ai > b j , and uses the simple strategy, yielding \M/(m + 25, n + 38) ≥ \M.(26, 39) + .M/(m − 1, n − 1) + 1 ≥ 65 + .M/(m − 1, n − 1) ≥ \M/(m, n) + 63. If (p, q, ρ) = (1, 1, \), then i = 26, violating the assumption i ≥ 38. Therefore the adversary can always find a strategy resulting the value not smaller than \M/(m, n) + 63. This completes the proof of Part (f).  Now, we are ready to prove Theorem 1. Proof. The small cases 1 ≤ m ≤ 25 and 1 ≤ n ≤ 38 are given in [19]. Given any pair (m, n) satisfying m ≤ n ≤ 38 25 m, let m = 25p + s, n = 38q + t where 0 < s ≤ 25, 25 0 < t ≤ 38, and observe that m ≥ 25q + d 38 te, thus 25 .M.(m, n) = .M.(25p + s, 38q + t) ≤ .M.(25q + d 25 38 te, 38q + t) ≤ .M.(d 38 te, t) = 0. The first inequality is due to Lemma 2 and the second one is due to Theorem 4.  5 Limitations of Knuth’s adversary methods In this section, we prove Theorem 2, which shows Knuth’s adversary methods can not provide lower bounds beyond α(m) ≥ 9dm/5e. Actually, we prove a stronger result: 15 Theorem 5. .M.(5k, 9k + 12t) ≤ 14k + 11t − 2, for k, t ≥ 0 and t + k ≥ 1. With this theorem, Theorem 2 is obvious, since if n ≥ 9dm/5e, .M.(m, n) ≥ .M.(m, 9dm/5e) ≥ 1. Proof. The proof is by induction on k and t. We verify the case k ≤ 10 first: when t ≥ k/10 + 2/5, we have .M.(5k, 9k + 12t) ≤ M(5k, 10k + 12t − k) ≤ Mbm (5k, 10k + 12t − k) ≤ 14k + 11t − 2. When t < k/10 + 2/5, these finite cases can be checked in [19]. Now suppose k ≥ 11 and we have already proven this theorem for any (k0 , t0 ) satisfying k0 < k, or k0 = k and t0 < t. Since .M.(m, n) = mini, j .Mi, j .(m, n) ≤ .M50,79 .(m, n), thus it’s enough to show .M50,79 .(5k, 9k + 12t) ≤ 14k + 11t − 2. In other word, an algorithm which begins by comparing a50 with b79 can "beat" the adversary. We’ll prove it by enumerating the adversary’s best strategy. Case(a). The adversary claims a50 < b79 and follows three possible strategies. (i). The adversary uses the simple strategy, then .M50,79 .(5k, 9k + 12t) = 1 + .M.(50 + x, 78 − y) + .M.(5k − 50 − x, 9k + 12t − 78 + y), where x, y ≥ 0. Thus it’s sufficient to show .M.(50+x, 78−y)+.M.(5k−50−x, 9k+12t−78+y) ≥ .M.(5k−50, 9k−78+12t) ≥ t+2. The first inequality is according to Lemma 2 and the second one is by the induction hypothesis. (ii). The adversary uses the complex strategy, with a51+x in both subproblems. .M50,79 .(5k, 9k + 12t) = 1 + .M/(51 + x, 78 − y) + \M.(5k − 50 − x, 9k + 12t − 78 + y) ≤ 1 + .M.(51 + x, 78 − y) + .M.(5k − 50 − x, 9k + 12t − 78 + y), where x, y ≥ 0. Thus it’s equivalent to show .M.(51+x, 78−y)+.M.(5k−50, 9k+12t−78+y)−1 ≥ .M.(5k−50, 9k−78+12t)−1 ≥ t+1. (iii). The adversary uses the complex strategy with b78−y in both subproblems. .M50,79 .(5k, 9k + 12t) = 1 + .M\(50 + x, 78 − y) + /M.(5k − 50 − x, 9k + 12t − 77 + y) ≤ 1 + .M.(50 + x, 78 − y) + .M.(5k − 50 − x, 9k + 12t − 77 + y), where x, y ≥ 0. Thus it’s equivalent to show .M.(50+x, 78−y)+.M.(5k−50−x, 9k+12t−77+y)−1 ≥ .M.(5k−50, 9k−78+12t)−1 ≥ t+1. Case(b). The adversary claims a50 > b79 and follows three possible strategies. (i). The adversary uses the simple strategy, then .M50,79 .(5k, 9k +12t) = 1+.M.(49− x, 79+y)+.M.(5k −50+1+ x, 9k +12t −79−y), 16 where x, y ≥ 0. Thus it’s sufficient to show .M.(49 − x, 79 + y) + .M.(5k − 50 + 1 + x, 9k + 12t − 79 − y) ≥ t + 2. Let 5p ≤ x ≤ 5p + 4 and 12q − 10 ≤ y ≤ 12q + 1, then we claim that .M.(49 − x, 79 + y) ≥ p + q + 1. If q ≤ 2, these finite cases can be checked in [19]. Otherwise (q ≥ 3), then 79 + y > 2 × (49 − 5p), and .M.(49 − 5p, 81 + 12(q − 1)) ≤ Mbm (49 − 5p, 81 + 12(q − 1)) ≤ 127 + 11(q − 1) − 6p. Therefore .M.(49 − x, 79 + y) ≥ .M.(49 − 5p, 81 + 12(q − 1)) ≥ 1 + p + q due to Lemma 2. Since .M.(49 − x, 79 + y) ≥ p + q + 1, if p + q ≥ t + 1, we’ve done. If p + q ≤ t, according to Lemma 2 and the induction hypothesis, we have .M.(5k−50+1+x, 9k+12t−79−y) ≥ .M.(5k−50+5p+5, 9k−90+9p+9+12(t−q−p)) ≥ t − p − q + 1. Thus .M.(49 − x, 79 + y) + .M.(5k − 50 + 1 + x, 9k + 12t − 79 − y) ≥ t + 2. (ii). The adversary uses the complex strategy with a49−x in both subproblems, then .M50,79 .(5k, 9k + 12t) = 1 + .M/(49 − x, 79 + y) + \M.(5k − 50 + 2 + x, 9k + 12t − 79 − y) ≤ 2 + .M.(49 − x, 79 + y) + 1 + .M.(5k − 50 + 1 + x, 9k + 12t − 79 − y) ≤ 14k + 11t − 2, where x, y ≥ 0. (iii). The adversary uses the complex strategy with b80+y in both subproblems, then .M50,79 .(5k, 9k + 12t) = 1 + .M\(49 − x, 80 + y) + /M.(5k − 50 + 1 + x, 9k + 12t − 79 − y) ≤ 2 + .M.(49 − x, 79 + y) + .M.(5k − 50 + 1 + x, 9k + 12t − 79 − y) ≤ 14k + 11t − 2, where x, y ≥ 0. 6  Upper bounds for α(m) In this section, we give better upper bounds for α(m) by proposing a simple procedure. This procedure only involves the first two elements in each A and B and can be viewed as a modification of binary merge. It is easy to see that this procedure induces the following recurrence relation: M(m, n) ≤ max{M(m, n−2)+1, M(m−1, n−2)+3, M(m−2, n)+3, M(m−2, n−1)+4}. In the following, we’ll use the induction to give better upper bounds for n ∈ [2m − 2, 3m]. The following proofs are very similar, but we give all the details for sake of completeness. 17 Algorithm 1 Modified Binary Merge Compare a1 and b2 if a1 > b2 then merge (m, n − 2). else compare a2 and b2 if a2 > b2 then compare a1 and b1 , then merge (m − 1, n − 2). else compare a2 and b1 if a2 > b1 then compare a1 and b1 , then merge (m − 2, n − 1) . else merge (m − 2, n). end if end if end if Theorem 6. M(m, 2m + 2k) ≤ 3m + k − 2, for m ≥ 3 and k ≥ −1. Proof. We induce on k and m. The case for k = −1 just follows tape merge algorithm. The case for m = 3 are given by Hwang [15] and Murphy [24]. Now suppose that m ≥ 4 and k ≥ 0, and the claim has already been proven for any (m0 , k0 ) satisfying m0 + k0 ≤ m + k − 1. According to the procedure, we have M(m, 2m + 2k) ≤ max{ M(m, 2m + 2(k − 1)) + 1, M(m − 1, 2m + 2k − 2) + 3, M(m − 2, 2m + 2k) + 3, M(m − 2, 2m + 2k − 1) + 4} ≤ max{3m + k − 2 (the induction hypothesis), 3(m − 1) + k − 2 + 3 (the induction hypothesis), 3(m − 2) + 1 + k + 3 (binary merge), 3(m − 2) + k + 4 (binary merge)} ≤ 3m + k − 2.  Theorem 7. M(m, 2m + 2k − 1) ≤ 3m + k − 3, for m ≥ 5 and k ≥ −1. Proof. We induce on k and m. The case for k = −1 just follows tape merge algorithm. The case for m = 5 are given by Mönting [26]. Now suppose that m ≥ 6 and k ≥ 0, and the claim has already been proven for any (m0 , k0 ) satisfying m0 + k0 ≤ m + k − 1. According to the procedure, we have M(m, 2m + 2k − 1) ≤ max{ M(m, 2m + 2(k − 1) − 1) + 1, M(m − 1, 2m + 2k − 1 − 2) + 3, M(m − 2, 2m + 2k − 1) + 3, M(m − 2, 2m + 2k − 2) + 4} ≤ max{3m + k − 3 (the induction hypothesis), 3(m − 1) + k − 3 + 3 (the induction hypothesis), 3(m − 2) + k + 3 (binary merge), 3(m − 2) + k − 1 + 4 (Theorem 6)} ≤ 3m + k − 3.  18 Theorem 8. M(m, 2m − 2) ≤ 3m − 4, for m ≥ 7. Proof. We induce on m. The case for m = 7 has been verified by Smith and Lang [27]. Now suppose that m ≥ 8 and the claim has already been proven for m − 1. According to S, we have M(m, 2m − 2) ≤ max{ M(m, 2m − 4) + 1, M(m − 1, 2m − 4) + 3, M(m − 2, 2m − 2) + 3, M(m − 2, 2m − 3) + 4} ≤ max{3m−4(tape merge), 3(m−1)−4+3 (the induction hypothesis), 3(m−2)−1+3 (Theorem 6), 3(m − 2) − 2 + 4 (Theorem 7)} ≤ 3m − 4.  Theorem 9. M(m, 2m) ≤ 3m − 3, for m ≥ 10. Proof. We do the induction on m. Smith and Lang [27] have verified the case for m = 10. Now suppose that m ≥ 11 and the claim has already been proven for m−1. According to the procedure, we have M(m, 2m) ≤ max{ M(m, 2m − 2) + 1, M(m − 1, 2m − 2) + 3, M(m − 2, 2m) + 3, M(m − 2, 2m − 1) + 4} ≤ max{3m − 3 (Theorem 8), 3(m − 1) − 3 + 3 (the induction hypothesis), 3(m − 2) + 3 (Theorem 6), 3(m − 2) − 1 + 4 (Theorem 7)} ≤ 3m − 3.  Finally, we put together the above theorems to get Theorem 3. As we can see in the proofs, if better basic cases can be provided, we can get better upper bounds by using this procedure. However, there is a barrier of this approach: if we want to show α(m) ≤ 2m − k or M(m, 2m − k + 1) < 3m − k, it’s necessary to obtain α(m − 1) ≤ 2(m − 1) − k or M(m − 1, 2m − 2 − k + 1) < 3m − 3 − k at first, thus it is impossible to show α(m) ≤ 2m − ω(1) via this approach. 7 Conclusion In this paper we improve the lower bounds for α(m) from b 23 mc + 1 to b 38 25 mc via Knuth’s adversary methods. We also show that it is impossible to get α(m) ≥ 9dm/5e ≈ 95 m for any m by using this methods. We then design an algorithm which saves at least one comparison compared to binary merge for 2m − 2 ≤ n ≤ 3m. Specially, for the case M(m, 2m − 2), our algorithm uses one comparison less than tape merge or binary merge, which means we can improve the upper bounds of α(m) by 1. We wonder whether there exists a universal efficient algorithm to give significantly better upper bounds for M(m, n) in the case n ≤ 2m, or maybe it’s intrinsically hard to compute M functions since there doesn’t exist general patterns or underlying structures in the corresponding decision trees. Besides that, we are also curious about the following conjectures proposed by Knuth [18]: Conjecture 1. M(m + 1, n + 1) ≥ 2 + M(m, n). 19 Via a similar proof with Lemma 4, the above conjecture implies the following conjecture which has been mentioned in Section 1. Conjecture 2. M(m + 1, n) ≥ 1 + M(m, n) ≥ M(m, n + 1), for m ≤ n. In the attempt to prove these two conjectures, we introduced the notation .M (k) .(m, n). Roughly speaking, .M k .(m, n) is the adversary which can delay k steps to give the splitting strategy, and .M.(m, n) = .M 0 .(m, n) ≤ .M 1 .(m, n) · · · ≤ .M m+n−2 .(m, n) = M(m, n). In the case k = 0, it is exactly Lemma 3, but it seems much harder even for k = 1. References [1] Miklós Ajtai, Vitaly Feldman, Avinatan Hassidim, and Jelani Nelson. Sorting and selection with imprecise comparisons. In Proceedings of the 36th International Colloquium on Automata, Languages and Programming: Part I, ICALP ’09, pages 37–48, 2009. [2] Mark R. Brown and Robert E. Tarjan. A fast merging algorithm. J. ACM, 26(2):211–226, 1979. [3] Jean Cardinal and Samuel Fiorini. On Generalized Comparison-Based Sorting Problems, pages 164–175. Springer Berlin Heidelberg, 2013. [4] Yongxi Cheng, Xiaoming Sun, and Yiqun Lisa Yin. Searching monotone multi-dimensional arrays. Discrete Mathematics, 308(11):2213 – 2221, 2008. [5] C. Christen. Improving the bounds on optimal merging. In Proc 19th IEEE conf on the foundations of computer science, pages 259–266, 1978. [6] C. Christen. On the optimality of the straight merging algorithm, 1978. [7] W. Fernandez de la Vega, M. A. Frieze, and M. Santha. Average-case analysis of the merging algorithm of hwang and lin. Algorithmica, 22(4):483–489, 1998. [8] Wenceslas Fernandez de la Vega, Sampath Kannan, and Miklos Santha. Two probabilistic results on merging. SIAM Journal on Computing, 22(2):261– 271, 1993. [9] Fănică Gavril. Merging with parallel processors. 18(10):588–591, 1975. Commun. ACM, [10] A. Gupta and A. Kumar. Sorting and selection with structured costs. In Proceedings of the 42nd IEEE Symposium on Foundations of Computer Science, page 416, 2001. 20 [11] Bing-Chao Huang and Michael A. Langston. Practical in-place merging. Commun. ACM, 31(3):348–352, 1988. [12] Z. Huang, S. Kannan, and S. Khanna. Algorithms for the generalized sorting problem. In Proceedings of the 52nd IEEE Symposium on Foundations of Computer Science, pages 738–747, 2011. [13] F. K. Hwang and D. N. Deutsch. A class of merging algorithms. J. ACM, 20(1):148–159, 1973. [14] Frank Hwang and Shen Lin. A simple algorithm for merging two disjoint linearly ordered sets. SIAM Journal on Computing, 1(1):31–39, 1972. [15] Frank K. Hwang. Optimal merging of 3 elements with n elements. SIAM Journal on Computing, 9(2):298–320, 1980. [16] Frank K. Hwang and Shen Lin. Optimal merging of 2 elements with n elements. Acta Informatica, 1(2):145–158, 1971. [17] Sampath Kannan and Sanjeev Khanna. Selection with monotone comparison costs. In Proceedings of the Fourteenth Annual ACM-SIAM Symposium on Discrete Algorithms, SODA ’03, pages 10–17, 2003. [18] Donald Knuth. The art of computer programming. Sorting and searching, 3:197–207, 1999. [19] Qian Li, Xiaoming Sun, and Jialin Zhang. Tables of λmρ and the program. http://theory.ict.ac.cn/liqian, 2016. [20] N. Linial and M. Saks. Searching ordered structures. Journal of Algorithms, 6(1):86–103, 1985. [21] Nathan Linial. The information-theoretic bound is good for merging. SIAM Journal on Computing, 13(4):795–801, 1984. [22] G. K. Manacher, T. D. Bui, and T. Mai. Optimum combinations of sorting and merging. J. ACM, 36(2):290–334, 1989. [23] Glenn K. Manacher. Significant improvements to the hwang-lin merging algorithm. J. ACM, 26(3):434–440, 1979. [24] P. E. Murphy. A problem in optimal meging. Technical Report DCS-TR-69, Rutgers University, Dept. of Computer Sciences, 1978. [25] Paul E. Murphy and Marvin C. Paull. Minimum comparison merging of sets of approximately equal size. Information and Control, 42(1):87–96, 1979. [26] Jürgen Schulte Mönting. Merging of 4 or 5 elements with n elements. Theoretical Computer Science, 14(1):19–37, 1981. 21 [27] Warren D. Smith and Kevin J. Lang. Values of the merging function and algorithm design as a game. 1994. [28] Paul K. Stockmeyer and F. Frances Yao. On the optimality of linear merge. SIAM Journal on Computing, 9(1):85–90, 1980. [29] R. Michael. Tanner. Minimean merging and sorting: An algorithm. SIAM Journal on Computing, 7(1):18–38, 1978. [30] Mai Thanh, V.S. Alagar, and T.D. Bui. Optimal expected-time algorithms for merging. Journal of Algorithms, 7(3):341 – 357, 1986. [31] Mai Thanh and T.D. Bui. An improvement of the binary merge algorithm. BIT Numerical Mathematics, 22(4):454–462, 1982. 22
8cs.DS
arXiv:1409.3184v1 [cs.PL] 10 Sep 2014 Characterization of Termination for Linear Loop Programs Rachid Rebiha∗ Arnaldo Vieira Moura† Nadir Matringe ‡ March 26, 2018 Abstract We present necessary and sufficient conditions for the termination of linear homogeneous programs. We also develop a complete method to check termination for this class of programs. Our complete characterization of termination for such programs is based on linear algebraic methods. We reduce the verification of the termination problem to checking the orthogonality of a well determined vector space and a certain vector, both related to loops in the program. Moreover, we provide theoretical results and symbolic computational methods guaranteeing the soundness, completeness and numerical stability of the approach. Finally, we show that it is enough to interpret variable values over a specific countable number field, or even over its ring of integers, when one wants to check termination over the reals. 1 Introduction Static program analysis [1, 2, 3] is used to check that a software is free of defects, such as buffer overflows or segmentation faults, which are safety ∗ Instituto de Computação, Universidade Estadual de Campinas, 13081970 Campinas, SP. Pesquisa desenvolvida com suporte financeiro da FAPESP, processos 2011089471 e FAPESP BEPE 2013047349 † Instituto de Computação, Universidade Estadual de Campinas, 13081970 Campinas, SP. ‡ Université de Poitiers, Laboratoire Mathématiques et Applications and Institue de Mathematiques de Jussieu Université Paris 7-Denis Diderot, France. 1 properties, or termination, which is a liveness property. Verification of temporal properties of infinite state systems [4] is another example. Proving termination of while loop programs is necessary for the verification of liveness properties that any well behaved and engineered system, or any safety critical embedded system, must guarantee. We could list here many verification approaches that are only practical depending on the facility with which termination can be automatically determined. More recent work on automated termination analysis of imperative loop programs has focused on partial decision procedures based on the discovery and synthesis of ranking functions. Such functions map the loop variable to a well-defined domain where their value decreases at each iteration of the loop [5, 6]. Several interesting approaches, based on the generation of linear ranking functions, have been proposed [7, 8] for loop programs where the guards and the instructions can be expressed in a logic supporting linear arithmetic. For the generation of such functions there are effective heuristics [9, 6] and, in some cases, there are also complete methods [10]. On the other hand, it is easy to generate a simple linear terminating loop program that does not have a linear ranking function. In these cases, complete synthesis methods [10] fail to provide a conclusion about the termination or nontermination of such programs. In this work we are motivated by the termination problem for linear while loop programs. In this class of loop programs, the loop condition is a conjunction of linear inequalities and the assignments to each of the variables in the loop instruction block are of an affine or linear form. In matrix notation, linear loop programs can be represented as while (Bx > b), {x := Ax + c}, for x and c in Rn , b in Rm , and A and B real matrices of size n × n and m × n, respectively. The termination analysis for this class of linear programs can be reduced to the termination problem of homogeneous programs with one loop condition, i.e. when m = 1, b is zero and c is a zero vector [11, 12]. The really difficult step being the reduction to m = 1, while the reduction to b and c being zero is immediate. We focus on the termination of this type of program with one loop condition, and obtain results as sharp and complete as one could hope. At this point, it is worth mentioning some recent work on asymptotically non-terminating initial variable values generation techniques [13]. Amongst many other results, we obtain methods that can be adapted here in order to extend our termination analysis for general linear programs, i.e. when m is arbitrary. 2 Despite tremendous progress over the years [11, 14, 15, 16, 17, 18, 19, 20], the problem of finding a practical, sound and complete method for determining termination or non termination remains very challenging for this class of programs, and for all initial variable values. We also note that some earlier works [21, 22] have inspired the methods developed here. We summarize our contributions as follows: Preliminary result: First we prove a sufficient condition for the termination of homogeneous linear programs. This result is also stated in [12], but some shortcomings in that proof sketch require further elaboration. We closed those gaps in a solid mathematical way, with some obstacles not being so easy to overcome. We return to this point in more detail at Remark 3.1. Our new proof of this sufficient condition requires nontrivial topological and algebraic arguments. On the other hand, this sufficient condition is not a necessary condition for termination of linear homogeneous programs. Before we list our main contributions, it is important to note that the works [12, 11] produce some decidability results for this type of programs. However, for programs with one loop condition, our characterization of termination is much simpler, very explicit, and straightforwardly leads to much faster algorithm for checking termination. See also Section 7 for a more detailed comparison. Main contributions: (i) We give a necessary and sufficient condition (NSC, for short) for the termination of linear homogeneous programs with one loop condition. In fact, this NSC exhibits a complete characterization of termination for such programs, and gives decidability results for all initial variable values. (ii) Moreover, departing from this NSC, we show the scalability of our approach by demonstrating that one can directly extract a sound and complete computational method to determine termination of such programs. We reduce the termination analysis to the problem of checking if a specific vector, related to the loop encoding condition, belongs to a specific vector space related to the eigenvalues of the matrix encoding assignments to the loop variables. The analysis of our associated algorithms shows that our method has a much better computational time complexity. We show that the method, based on three computational steps running in polynomial time complexity, is of a lower complexity 3 than basic routines that form the mathematical foundations of previous methods [12, 11]. (iii) We provide theoretical results guaranteeing the soundness and completeness of the termination analysis while restricting variable interpretations over a specific countable sub-ring of Rn . In other words, we show that it is enough to interpret variable values over a specific countable field — a number field, or even its ring of integers, — when one wants to check the termination over the reals. By so doing, we circumvent difficulties such as rounding errors. Those results enable our symbolic computational methods to rely on closed-form algebraic expression and numbers. The rest of this article is organized as follows. Section 2 is a preliminary section where we introduce our computational model for programs, the notations for the rest of the paper, and some key notions of linear algebra used to develop our computational methods. Section 3 develops our theoretical results and a very useful necessary and sufficient condition, in Subsection 3.2, which allows us to propose the complete computational method illustrated in Section 4, and fully described in Section 5. In the important Section 6, we show that it is enough to interpret the variable values over a countable field in order to determine program termination over the reals. We provide a discussion of related works in Section 7. Finally, Section 8 concludes the paper. 2 Linear Algebra and Linear Loop Programs We recall classical facts from linear algebra. Let E be a real vector space and A ∈ EndR (E), the space of R-linear maps from E to itself. Let E ⋆ be the set of linear functionals in E.We denote by M(p, q, R) the space of p × q matrices, and if p = q we simply write M(p, R). We will denote by K the R or C fields. If A ∈ M(m, n, K), with entry ai,j in position (i, j), we will sometimes denote it by (ai,j ). If B is a basis for E, we denote by AB = MatB (A) the matrix of A in the basis B, and we have AB ∈ M(n, R). Let In be the identity matrix in M(n, R), and idE the identity of E. The transpose of the matrix A = (ai,j ) is the matrix A⊤ = (bi,j ) where bi,j = aj,i . The kernel of A, also called its nullspace and denoted by Ker(A), is the set {v ∈ Kn | A · v = 0Km }. Let A be a square matrix in M(n, K). A nonzero 4 vector x ∈ K is an eigenvector of A associated with an eigenvalue λ ∈ K if A · x = λx, i.e., (A − λIn ) · x = 0. The nullspace of (A − λIn ) is called the eigenspace of A associated with eigenvalue λ. A non-zero vector x is said to be a generalized eigenvector of A corresponding to λ if (A − λIn )k · x = 0 for some positive integer k. The spaces Ker((A−λIn )k ) form an increasing larger sequence of subspaces of E, which is stationary for k ≥ e, for some e ≤ n. We call the subspace Ker((A − λIn )e ) = Ker((A − λIn )n ) the generalized eigenspace of A associated with λ, and its nonzero elements are exactly the generalized eigenvectors. We denote by h , i the canonical scalar product on Rn . As it is standard in static program analysis, a primed symbol x′ refers to the next state value of x after a transition is taken. Next, we present transition systems as representations of imperative programs and automata as their computational models. Definition 2.1. In a transition system hx, L, T , l0 , Θi, x = (x1 , ..., xn ) is a set of variables, L is a set of locations and l0 ∈ L is the initial location. A state is given by an interpretation of the variables in x. A transition τ ∈ T is given by a tuple hlpre , lpost , qτ , ρτ i, where lpre and lpost designate the pre- and post-locations of τ , respectively, and the transition relation ρτ is a first-order assertion over x ∪ x′ . The transition guard qτ is a conjunction of inequalities over x. Θ is the initial condition, given as a first-order assertion over x. The transition system is said to be linear when ρτ is an affine form. A loop program, defined next, is a special kind of transition system. We also establish some matrix notations to represent loop programs, where the effects of sequential linear assignments are described as simultaneous updates. Departing from sequential instructions, we use syntatic and common propagation procedures to obtain the equivalent simultaneous systems expressed in matrix notations (see Definition 2.2.). Definition 2.2. Let P = hx, {l}, T , l, Θi be a transition system with x = (x1 , ..., xn ) and T = {hl, l, qτ , ρτ i}. Then P is a linear loop program if: • The transition guard is a conjunction of linear inequalities. We represent the loop condition in matrix form as F x > b where F ∈ M(m, n, R) and b ∈ Rm . Which means that each coordinate of the vector F x is greater than the corresponding coordinate of vector b. • The transition relation is an affine or linear form. We represent the linear assignments in matrix form as x := Ax + c, where A ∈ M(n, R) and c ∈ Rn . 5 The most general linear loop program P = P (A, F, b, c) is thus written while (F x > b) {x := Ax + c}. In this work, one needs first to focus mainly on the following class of linear loop programs. Definition 2.3. We denote by P H the set of programs where all linear assignments consist of homogeneous expressions, and where the linear loop condition consists of at most one inequality. If P is in P H , then P will be interpreted in matrix terms as while (hf, xi > 0) {x := Ax}, where f is a (n × 1)-vector corresponding to the loop condition, and A ∈ M(n, R) is related to the list of assignments in the loop. In this case, we say that P has a homogeneous form and it will be identified as P (A, f ). Consider a program P (A, f ), where A ∈ M(n, R), f ∈ M(1, n, R). Alternatively, we may consider A ∈ EndR (E), f ∈ E ∗ and write P (A, f) : while (f(x) > 0){x := A x}. Fixing a basis B of E we can write A = MatB (A), f = MatB (f), x = MatB (x), and so on. We now define termination for such programs. Definition 2.4. Program P (A, f) terminates on input x ∈ E if and only if there exists k ≥ 0 such that f(Ak (x)) is not positive. Alternatively, for A ∈ Mn (R), and f ∈ M1,n (R), we say that P (A, f ) terminates on input x ∈ Rn , if and only if there exists k ≥ 0, such that hAk x, f i is not positive. Thus, a program P (A, f) is non-terminating if and only if there exists an input x ∈ E such that f(Ak (x)) > 0 for all k ≥ 0. In matrix terms, P (A, f ) is non-terminating on input x ∈ Rn if and only if hAk x, f i > 0 for all k ≥ 0. 3 Linear Program Termination First we prove a sufficient condition for the termination of homogeneous linear programs, already stated in [12]. We note that he proof of sufficiency in [12] does not go through, and needed to be amended, which was not a trivial task. Then we present the main result, which provides the first necessary and sufficient condition for the termination problem for the class of linear homogeneous programs. 6 3.1 Sufficiency and Homogeneous Linear Programs We prove a sufficient condition for the termination of programs P (A, f ) ∈ P H , written while (f ⊤ x > 0) {x := Ax}. Theorem 3.1. Let n be a positive integer, and let P (A, f ) ∈ P H . If P (A, f ) is non-terminating, then A has a positive eigenvalue. In the following discussion, we provide the complete proof of Theorem 3.1. Before we complete the proof, which is a mix of topological and algebraic arguments, we need first to state the following lemmas and propositions. We first recall some basic facts about generalized eigenspaces. Let E be an R-vector space of finite dimension, and let A ∈ EndR (E). Let E ′ be a subspace of E. We say that E ′ is A-stable if A(E ′ ) ⊆ E ′ . If λ ∈ R, we denote by Eλ (A) the subspace {x ∈ E|∃k ≥ 0, (A −λidE )k (x) = 0}. This space is non zero if and only if the input vector x is an eigenvector of A. In this case, it is called the generalized eigenspace corresponding to λ. If χA is the characteristic polynomial of A, if dλ is the multiplicity of the monomial (X − λ) in χA (X), which may be 0 if λ is not an eigenvalue, then Eλ (A) = Ker(A −λidE )dλ . It is obvious that Eλ (A) is A-stable. We denote by Spec(A) the set of real eigenvalues of A. The following property of generalized eigenspaces was stated in the preliminaries. Proposition 3.1. Let E be an R-vector space of finite dimension, and let A belong to EndR (E). Then Eλ (A) = Ker(A −λidE )dλ , for some dλ ≤ n. In particular, Eλ (A) = Ker(A −λidE )n . Proof. We just said that one can choose dλ to be such that (X − λ)dλ \χA . Hence, dλ ≤ d◦ (χA ) = n (with d◦ beeing the standart notation for polynomial degree.). We will also need the following lemma. Lemma 3.1. Let E ∗ be the space HomR (E, R), where E is a finite dimensional vector space, and f0 , . . . , fm be linear forms in E ∗ . Then this family spans E ∗ if and only if ∩m i=0 Ker(fi ) = {0}. Proof of Lemma 3.1. In the following we use the notation V ect(v1 , ..., vu ) to describe the vector space spaned by the elements v1 , ..., vu . Suppose that f0 , . . . , fm spans E ∗ . If x belongs to ∩m i=0 Ker(fi ), then x belongs to the 7 kernel of any element of E ∗ . But then, if B = (e1 , . . . , en ) is a basis of E, and B ∗ = (e∗1 , . . . , e∗n ) is its dual basis, we have x = x1 .e1 + · · · + xn .en , and e∗i (x) = xi = 0. Hence, x = 0. Conversely, if ∩m i=0 Ker(fi ) = {0}, let g1 , . . . , gr be a maximal linearly independent family in f0 , . . . , fm . Hence, V ect(g1 , . . . , gr ) = V ect(f0 , . . . , fm ). We thus have r ≤ n because dim(E ∗ ) = dim(E) = n and ∩ri=1 Ker(gi ) = {0}. If r was strictly smaller than n, then ∩ri=1 Ker(gi ) would be an intersection of r subspaces of co-dimension 1. Hence, it would be of co-dimension at most r, i.e., ∩ri=1 Ker(gi ) would be of dimension at least n − r > 0, which is a contradiction. Thus r = n, and (g1 , . . . , gr ) is a basis of E ∗ . It follows that V ect(f0 , . . . , fm ) = E ∗ . Before proving Lemma 3.3, we recall and prove the following standard lemma. Lemma 3.2. Let A be an endomorphism of a real vector space E, and let λ be an eigenvalue of A. There is a supplementary space E ′ of Eλ (A), i.e., E = Eλ (A) ⊕ E ′ ), and two polynomials C and D in R[X], such that C(A) is the projection on Eλ (A) with respect to E ′ , and D(A) is the projection on E ′ with respect to Eλ (A). In particular E ′ is also A-stable, and for any A-stable subspace L of E, we have L = L ∩ Eλ (A) ⊕ L ∩ E ′ . Proof. Let χA = (X − λ)d Q, with Q(λ) 6= 0. By the kernel decomposition lemma, we have E = Ker(A −λId )d ⊕ Ker(Q(A)). We set E ′ = Ker(Q(A)). It is thus A-stable. Moreover, by Bezout’s identity, there are P and P ′ in R[X], such that P (u) ◦ (A −λId )d + P ′ (u) ◦ Q(A) = Id . We set C = P (X − λ)d , and D = P ′ (A) ◦ Q(u). Finally, if L is A-stable, we always have L ∩ Eλ (A) ⊕ L ∩ E ′ ⊂ L. Now write an element l of L as l1 + l2 , with l1 ∈ Eλ (A), and l2 ∈ E ′ . We get B(A)(l) = l1 . But L being A-stable, it is also D(A)-stable as well. Hence, l1 ∈ L. Similarly we have l2 ∈ L, thus L = L ∩ Eλ (A) ⊕ L ∩ E ′ , completing the proof. 8 We will use the following result about quotient vector spaces. Lemma 3.3. Let E be an R-vector space, let A ∈ EndR (E), and suppose that L is a A-stable subspace of E. Let A : E/L → E/L be the element of EndR (E/L) defined by A(x + L) = A(x) + L. Then Spec(A) ⊂ Spec(A). More generally, for any λ ∈ Spec(A), the generalized eigenspace Eλ (A) maps surjectively to Eλ (A) in E/L. Proof of Lemma 3.3. Let B1 be a basis for L, and B2 be a basis for any supplementary space. Call B2 the image of the elements of B2 in E = E/L. Then B2 is a basis of E. With B = B1 ∪ B2 , MatB (A) is of the form   X Y . 0 Z Then X = MatB1 (A|L ), Z = MatB2 (A), and the second statement follows from this second fact. Now if x belongs to Eλ (A), then (A − λId )a x = 0 for some a ≥ 0. This means that (A − λId )a x ∈ L. We write x = xλ + x′ ∈ Eλ (A) ⊕ E ′ , for E ′ as in Lemma 3.2. Then (A − λId )a x = (A − λId )a xλ + (A − λId )a x′ , with (A − λId )a xλ ∈ Eλ (A), and (A − λId )a x′ ∈ E ′ . Let d be the multiplicity of λ as a root of χA . For k large enough such that kd ≥ a, we have (A − λId )kd xλ = 0 and (A − λId )kd x = (A − λId )kd x′ . Taking P ∈ R[X] as in the proof of Lemma 3.2, we have that P (A) ◦ (A − λId )d is the identity when restricted to E ′ . In particular, this implies that x′ = P (A)k (A − λId )kd x, and thus x′ ∈ L. Finally, we obtain x = xλ , and this concludes the proof, as xλ ∈ Eλ (A). We say that a subset of Rn is a convex cone if it is convex, and it is also stable under multiplication by elements of R>0 . It is obvious that an intersection of convex cones is still a convex cone, and so one can speak of the convex cone spanned by a subset of Rn . Proposition 3.2. Let C be a convex cone of Rn . Assume that C is non reducible to zero, and is contained in the closed cone ∆ = {x = (x1 , ..., xn ) ∈ Rn | ∀ i, xi ≥ 0}. If A is an invertible endomorphism of Rn , with A(C) ⊂ C, then A has a positive eigenvalue. 9 Proof. Consider C ′ = C − {0}. Then C ′ is also a convex cone. It is obviously still stable under multiplication by elements of R>0 . Moreover, if x and y belong to C ′ , then the vector tx + (1 − t)y belongs to C by convexity, for t ∈ [0, 1]. But it cannot be equal to zero, as both x and y have non negative coefficients, this would imply that x or y is null, which is a contradiction. Now let H1 be the affine hyperplane H1 = {x ∈ Rn , x1 + . . . xn = 1}, and let f be the linear form on Rn defined by f : x 7→ x1 + · · · + xn , so that H = f −1 ({1}). This linear form is positive on ∆, and so we can define the projection p : ∆ − {0} → H given by x 7→ 1 x. f (x) i It is obviously continuous. We call C1 the set p(C ′ ). We claim that C1 = C ′ ∩ H1 and, in particular, it is convex. Indeed, C1 ⊂ H1 by definition, and C1 ⊂ C ′ because C ′ is stable under R>0 . Conversely, the restriction of p to C ′ ∩ H1 is the identity, and so C1 contains C ′ ∩ H1 = p(C ′ ∩ H1 ). It is also clearly stable under the continuous map s = p ◦ A : ∆ − {0} → H1 , as A(C ′ ) ⊂ C ′ . In particular, its closure C1 is stable under s as well. It is convex and compact, as a closed subset of the compact set {x ∈ Rn , ∀ i, xi ≥ 0, x1 + · · · + xn = 1}. According to Brouwer’s fixed point theorem, this implies that s has a fixed x point in C1 ⊂ ∆ − {0}. But we then have A(x) = f (x)x. As f (x) > 0 for any x in ∆ − {0}. This proves the lemma. Finally we will prove the following statement equivalent to Theorem 3.1. We just rewrite the statement of Theorem 3.1 in terms of morphisms, which are more convenient to work with. Theorem 3.2. Let E be an R-vector space of dimension n, let A be a endomorphism of E, and let f be a nonzero linear form on E. If there exists a vector x ∈ E such that f(Ak (x)) > 0 for all k ≥ 0, then A has a positive eigenvalue. 10 Proof. We prove the result by induction on n. When n = 1, we can identify E with R. Then A is of the form x 7→ tA .x, for some nonzero tA , and {f > 0} is either R>0 , or R<0 . Hence, x belongs to R>0 , or to R<0 , and tkA .x belongs to the same half-space for every k ≥ 0. Hence, tA > 0. Now if A is non invertible, we can replace E by the image of A, Im(A), and x by A(x), so that the hypothesis are still verified by A’s restriction to Im(A). But since Im(A) is a subspace of E of strictly smaller dimension, we get the result using the induction hypothesis. We are thus left with the case when A is invertible. Let m be the maximal non negative integer such that (f, f ◦ A, . . . , f ◦ Am ) is a linearly independent family of E ∗ . It is easy to see k that L = ∩k≥0 Ker(f ◦ Ak ) is equal to ∩m k=0 Ker(f ◦ A ). Hence, it is A-stable. The space L is a proper subspace of E because it is contained in Ker(f). Taking the quotient space E = E/L, the linear map A induces A : E → E, and f induces a linear form f on E. By letting x̄ be the image of x in E, the quadruplet (E, A, f, x̄) still satisfies the hypothesis of the theorem. If L is not zero, using the induction we conclude that the linear map A has a positive eigenvalue λ > 0. But λ is necessarily an eigenvalue of A by Lemma 3.3, and we are done in this case. Finally, assume that L = {0}. Then (e∗1 = f, e∗2 = f ◦ A, . . . , e∗n = f ◦ Am ) is a basis of E ∗ . In particular m = n − 1, according to Lemma 3.1. Take (e1 , . . . , en ) as its dual basis in E, and identify E with Rn , given this basis. Then Ak (x) belongs to the space {v | ∀i, vi > 0} ⊂ ∆ for all k ≥ 0. Hence, the convex cone C is spanned by this family as well. It is clearly A-stable, and is not reduced to zero as it contains x. We conclude by applying Proposition 3.2. This also concludes the proof of Theorem 3.1, as Theorem 3.2 is an equivalent statement written in terms of the morphisms A = MatB (A)) and f = MatB (f). Theorem 3.1 says that the linear program terminates when A has no positive eigenvalue. But one cannot conclude on the termination problem using Theorem 3.1 when A has at least one positive eigenvalue. As we already mentioned, Theorem 3.1 is stated in [12]. But the proof given therein contains certain flaws that we now expose. Remark 3.1. The argument of [12] applies the Brouwer’s fixed point theorem to a subspace of the projective space P (Rn ), and not Rn−1 as stated in [12]. However, this is not an Euclidian space, and so convexity is not well defined in it. Hence, one cannot apply Brouwer’s fixed point theorem to such a set. Moreover, using notation as in the proof of Theorem 1 in [12], the closure NT ′ of the set NT can contain zero. For example as soon as all, real or 11 /* ... */ while (3 x - y > 0) { x := 3x - 2 y ; y := 4/3 x - 5/3 y ; } /* ... */ /* ... */ while ( z > 0) { x := x + y ; z := -z ; } /* ... */ (a) (b) Figure 1: Examples of homogeneous linear programs complex, eigenvalues of A have their module less than 1. Hence, its image in P (Rn ) is not well defined. The case of NT ′ containing zero raises a serious problem that needs to be treated carefully. We circumvent it by taking quotients by L in our proof. Theorem 3.1 provides a sufficient condition for the termination of linear programs. In other words, Theorem 3.1 says that the linear program terminates when there is no positive eigenvalues. But one can not conclude on the termination problem using Theorem 3.1 if there exists at least one positive eigenvalue. Intuitively, we could say that Theorem 3.1 provides us with a decidability result for the termination problem considering the subclass of linear program where the associated assignment matrix A has no positive eigenvalues. In the following example, we illustrate situations where Theorem 3.1 applies and when it does not. Example 3.1. Consider the homogeneous linear program 1a denoted by   3 −2 P (A, v), and depicted in Figure 1. The associated matrix A = 4 −1 correspond to the simultaneous updates representing the sequential loop assignments, and the vector v encoding the loop condition, is v = (3, −1)⊤ . The eigenvalues of A are the complex numbers: 1 + 2i and 1 − 2i. As S does not have any positive eigenvalues, we can use Theorem 3.1 and conclude that program P (A, v) terminates on all possible inputs. Example 3.2. Now consider the homogeneous linear program 1b depicted in Figure 1, denoted by P (A1 , v1 ). The associated matrix   A1 representing 1 1 0 the simultaneous updates is given by A1 = 0 1 0  . Its eigenvalues 0 0 −1 12 are 1 and −1. As A has a positive eigenvalues, one can not determine the termination of P (A1 , v1 ) using Theorem 3.1. In the following sections we will see how to handle this case in an automated and efficient. In the next subsection we generalize Theorem 3.1, obtaining stronger results. 3.2 Necessity and Sufficiency for Termination of Linear Programs Theorem 3.3 provides a necessary and sufficient condition for the termination of programs P (A, f ) ∈ P H while (f ⊤ x > 0) {x := Ax}. Theorem 3.3. Let A ∈ Mn (R) and let f 6= 0 be in Rn . Then program P (A, f ) while (f ⊤ x > 0) {x := Ax} terminates if and only if for every positive eigenvalue λ of A, the generalized eigenspace Eλ (A) is orthogonal to f , i.e., f ⊤ Eλ (A) = hf, Eλ (A)i = 0. In order to prove Theorem 3.3 we first restate it in equivalent linear algebraic terms. Theorem 3.4. Let E be an R-vector space of finite dimension n, let A be an endomorphism of E, and let f be a nonzero linear form on E. Then there exists a vector x ∈ E with f(Ak (x)) > 0 for all k ≥ 0 if and only if there is λ > 0 in Spec(A) such that Eλ (A) 6⊂ Ker(f). Proof. First suppose that there is a λ > 0 in Spec(A) with Eλ (A) 6⊂ Ker(f). Then there is some r ≥ 1 such that Ker(A −λidE )r−1 ⊂ Ker(f). But we also have Ker(A −λidE )r 6⊂ Ker(f). Let x be an element of Ker(A −λidE )r − Ker(f) such that f(x) > 0. This is always possible because Ker(A −λidE )r − Ker(f) is stable under y 7→ −y. Because x ∈ Ker(A −λidE )r , it is clear that A(x) − λx ∈ Ker(A −λidE )r−1 . Let L be Ker(A −λidE )r−1 , and let E = E/L. As L is A-stable, A is well defined, and A(x) = λx because A(x) − λx ∈ k L. Moreover, L ⊂ Ker(f). Hence, f is well defined and f(A (x)) = f(Ak (x)) k for every k ≥ 0. As A (x) = λk x, we deduce that f(Ak (x)) = λk f (x) > 0 for all k ≥ 0. 13 Conversely, suppose that there exists a vector x ∈ E, such that f(Ak (x)) > 0 for all k ≥ 0. We prove by induction on n that A has an eigenvalue λ > 0 such that Eλ (A) is not contained in Ker(f). If n = 1, then A : t 7→ λt for λ ∈ R, and so, λk (f(x)) > 0 for all k ≥ 0. This implies λ > 0, and so Eλ (A) = E is not be contained in Ker(f). If n > 1, according to Theorem 3.2 we know that A admits a positive eigenvalue µ. If Eµ (A) is not a subset of Ker(f) we are done. If L = Eµ (A) ⊂ Ker(f), we consider E = E/L. This k vector space is of dimension less than n and so f (A (x)) = f(Ak (x)) > 0 for all k ≥ 0. By the induction hypothesis, there is some λ > 0 in Spec(A) such that Eλ (A) 6⊂ Ker(f). But λ belongs to Spec(A) according to Lemma 3.3, and Eλ (A) maps surjectively on Eλ (A) according to this same Lemma. In particular, we have f (Eλ (A)) = f(Eλ (A)), but the left hand side is not reduced to zero in this equality. Hence, f(Eλ (A)) 6= {0}, i.e., Eλ (A) 6⊂ Ker(f), concluding the proof. This argument proves Theorem 3.3 as it is a direct corollary of Theorem 3.4 with A = MatB (A) and f = MatB (f). Theorem 3.3 gives a necessary and sufficient condition that we can use as the foundation to build a complete procedure for checking termination. In order to determine termination, we have to check, for each positive eigenvalue, if the vector f , encoding the loop condition, is orthogonal to the associated generalized eigenspace. In other words we want to verify if f is orthogonal to the nullspace Ker((A − λIn )n ). Example 3.3. Consider the program 1b depicted in Figure 1 that we denoted as P (A1 , v1 ). The matrix A1 is given in Example 3.1. The vector encoding the loop condition is v1 = e3 = (0, 0, 1)⊤. We recall that A1 has eigenvalues 1 and −1. The generalized eigenspace E1 (A1 ) is equal to V ect(e1 , e2 ), where e1 and e2 are the first two vectors of the canonical basis of R3 . Hence E1 (A1 ) is orthogonal to v1 . According to Theorem 3.3, program P (A, w) terminates. Example 3.4. Now we change the loop condition of program 1b, depicted in Figure 1, to (y > 0). Then, we obtain the program P (A1 , v2 ) with the new considered loop condition encoded as v2 = e2 = (0, 1, 0)⊤ . The eigenvalues of A1 are (still) 1 and −1, and the generalized eigenspace E1 (A1 ) = V ect(e1 , e2 ). Hence E1 (A) is not orthogonal to v2 , because it contains v2 . Theorem 3.3 tells us the program P (A1 , v2 ) does not terminate. In both of these examples, we are able to determine the termination or nontermination of the corresponding program using Theorem 3.3. On the 14 other hand, Theorem 3.1 does not allow us to conclude anything about the termination of these programs, since the assignment matrix A′ exhibit at least one positive eigenvalue. In order to avoid the computation of basis for generalized eigenspaces, we first introduce the space Row Space(M), and use the next lemma. If M ∈ M(m, n, R), then Row Space(M) denotes the vector subspace of Rn spanned by the row vectors of M. Lemma 3.4. Let M be a matrix in M(m, n, K). Then every vector in the nullspace of M is orthogonal to every vector in Row Space(M). Proof. Let w ∈ Ker(M), and let v be in the column space of M ⊤ . We denote by {c1 , ..., cm } the set of column vectors of M ⊤ . Then, there exists a vector k ∈ Rm such that v = M ⊤ · k, since v is a linear combination of the column vectors of M ⊤ . Now we have < w, v >= w ⊤ · v = w ⊤ · M ⊤ · k = (M · w)⊤ · k = 0, because w ∈ Ker(M) and M · w = 0. From Lemma 3.4, a basis of Row Space(M) is a basis of the orthogonals of Ker(M). Thus, for the square matrix A, a vector v is orthogonal to Ker((A − λIn )n ), i.e., < Eλ (A), v >= 0, if an only if v ∈ Row Space((A − λIn )n ). We directly deduce the following corollary. Corollary 3.1. Let A ∈ Mn (R) and v 6= 0 ∈ Rn . The program P (A, v) terminates if and only if for every positive eigenvalue λ of A v is in the vector space Row Space((A − λId )n ). Proof. By Lemma 3.4, the basis of Row Space((A − λId )n )) is a basis of the orthogonals of Ker((A − λId )n )). We then apply Theorem 3.3. 4 Running Example In practice, we can use Corollary 3.1 to support three fast computational steps, as illustrated in the following example. Example Consider    a program P (A, v) where  4.1. (Running example) −1 2 −1 0 0 −1 −1 2 −1 0    A=  0 −1 2 1, and v =  1 . 1 0 0 0 2 Step 1: We compute the list eλ of positive eigenvalues for A. The result is: 15 [[2 - sqrt(2), sqrt(2) + 2,2], [1, 1, 2]] √ Hence, we have three positive eigenvalues, namely, λ = 2, λ = 2 − 2, λ3 = 1 2 √ 2 + 2, with multiplicities 2, 1 and 1, respectively. √ Step 2: We compute the matrix Eλ = (A − λIn )n for λ = 2 + 2. The result is: (A - (e[i])*Id_m)^d [ 18 16*sqrt(2) [ 16*sqrt(2) 32 [ 14 16*sqrt(2) [ 0 0 14 -4*sqrt(2)] 16*sqrt(2) -14] 18 -12*sqrt(2)] 0 4] Step 3: We check if v ∈ Row Space(Eλ ): Here we use a standard procedure from linear algebra to check if a given vector belongs to a vector-space spanned by a given set of vectors. We compute the unique reduced row echelon form of matrix Eλ⊤ . For that we run a Gaussian elimination on the rows using the Gauss-Jordan elimination algorithm. The generated matrix, below on the left, provides us with a linearly independent basis for Row Space(Eλ ). We remove the rows containing only zero entries, and we augment the computed basis with the vector v ⊤ by appending it as the last row. We obtain the matrix below on the right. (E[i]).echelon_form() [ 1 0 -1 [ 0 1 sqrt(2) [ 0 0 0 [ 0 0 0 0] 0] 1] 0] block_matrix([[Er[i]], [V.T]]) [ 1 0 -1 0] [ 0 1 sqrt(2) 0] [ 0 0 0 1] [-------------------------------] [ -1 -1 1 1] Finally, we generate its reduced row echelon form obtaining matrix R Sλ : block_matrix([[Er[i]], [V.T]]).echelon_form() [1 0 0 0] [0 1 0 0] [0 0 1 0] [-------] [0 0 0 1] 16 From the Gauss-Jordan elimination properties, it is well-known that v belongs to the space Row Space(Eλ ) if and only if R Sλ (n, n + 1) = 0. Here we have R Sλ (n, n + 1) = 1, which means that v is not in Row Space(Eλ ). Thus, by Corollary 3.1, we conclude that program P (A, v) is nonterminating. As we show in Example 4.1, we avoid the computation of generalized eigenspaces in practice. Instead, use the exact algorithm associated to Corollary 3.1. 5 A Complete Procedure to Check Termination We use the necessary and sufficient conditions provided by Theorem 3.3 and its related practical Corollary 3.1 to build a sound and complete procedure to check the termination of linear programs. Moreover, the method so obtained is based on few computational steps associated with fast numerical algorithms. The pseudo code depicted in Algorithm 1 illustrates the strategy. It takes as input the number of variables, the chosen field where the variables are interpreted, the assignment matrix A and the vector w encoding the loop condition. We first compute the list of positive eigenvalues (lines 1 and 2 in 1). If this list is empty we can then state that the loop is terminating (lines 3 and 4). Otherwise, we continue the analysis using the nonempty list of positive eigenvalues. For each positive eigenvalues e′ [i] we first need to compute the matrix Ei = (A − e′ [i]In )n (line 6). Using Corollary 3.1, we know that the loop is terminating if and only if w is in the Row Space of (A − e′ [i]In )n for every positive eigenvalue e′ [i]. In other words, for each positive eigenvalue, we have to check if w is in the vector space spanned by the basis of the Row Space of the associated matrix Ei . In order to do so, one first needs to consider the linearly independent vectors {r1 , ..., rn } that form a basis of the Row Space. This basis is obtained from the list of the non-zero row vectors of the computed reduced row echelon form of Ei (lines 7 and 8). The efficient way to check if w is in the vector space spanned by the basis {r1 , ..., rn } comprises the following computational steps: (i) We build the augmented matrix EA formed by the row vectors r1 , ..., rn and w ⊤ (line 9); (ii) We compute the reduced row echelon form of matrix EA (line 8). For that we apply Gaussian elimination on the rows. This reduced, canonical form is 17 unique and is computed exactly by the Gauss-Jordan elimination method; (iii) We know that the added vector w is in the vector space spanned by r1 , ..., rn if and only if the bottom right entry of the reduced row echelon matrix ER is null. Thus if ER (n, n + 1) 6= 0, we conclude that there exists a positive eigenvalue e′ [i] such that w is not in Row Space(A − e′ [i]In )n , which is equivalent to saying that the loop is nonterminating (lines 11 and line 12). Otherwise if he have exhausted the list of positive eigenvalues and always found that w is in the Row Space of the associated matrix, we conclude that the loop is terminating (line 13). Algorithm 1: Termination linear Loop (n, K, A, w) /*Checking the termination for linear homogeneous programs.*/; Data: n the number of program variables, K the field, P (A, w) ∈ P H where A ∈ M(n, K) and w ∈ M(n, 1, K) Result: Determine the Termination/Nontermination begin 1 {e[1], ..., e[r]} ←− eigenvalues(A); 2 {e′ [1], ..., e′ [s]} ←− striclty positives({e[1], ..., e[r]}); 3 if {e′ [1], ..., e′ [s]} = ∅ then there is no positive eigenvalues. 4 return TERMINANT; 12 for i = 1 to s do E ←− (A − e′ [i]In )n ; Errf ←− echelon form(E); E′ rrf ←− remove zero row(Errf ); EA ←− augment row(E′ rrf , w ⊤ ); ER ←− echelon form(EA ); if ER (n, n + 1) 6= 0 then return NONTERMINANT; 13 return TERMINANT; 5 6 7 8 9 10 11 The function echelon form computes the reduced row echelon form by Guass-Jordan elimination, and its time complexity is of order O(n3 ). We interpret the variables in a specified field, i.e. an extension of Q, chosen according to the discussion in Section 6. By using efficient mathematical packages, e.g. Maple, Mathematica, Sage, Lapack or Eispack, one can ob18 tain the eigenvalues as closed-form algebraic expressions, i.e. the solution of an algebraic equation in terms of its coefficients, relying only on addition, subtraction, multiplication, division, and the extraction of roots. Also, it is well known that with n < 5, the eigenvalues computed by the function eigenvalues are already exhibited as such algebraic numbers. Moreover, the algorithm for eigenvalue computation has a time complexity that is of order O(n3 ), and so the overall time complexity of the algorithm Termination linear Loop remains of the same order of time complexity. In Table 1 we list some experimental results. The column Set-i refers to a set of loops generated randomly. The column #Loops gives the number of loops treated. We use the countable subsets described in Section 6. The column Dim refers to the dimension of the initial systems, i.e, the number of variables. The column #T shows the number of programs found to be terminating, and the column #NT gives the number of loop programs found to be non-terminating. Finally, column CPU/s[T] refers to cpu time results while checking all the terminating loop programs, and column CPU/s[N] gives the cpu time taken to check nontermination. The column CPU/s[total] gives cpu time results, in seconds, for deciding about termination for the given set of 500 loops. We have implemented our prototype using Sage [23] with interfaces written in Python. By so doing, we were able to access several useful mathematical packages. As expected, we can see that more nonterminating programs were found, as they are easier to write. Note also that it takes much more time to prove termination than to prove nontermination. 6 Variables Over Countable Sets In this section, we show that to check the termination of a linear program P (A, v) with one loop condition over Rn , we can restrict the analysis to the case where the variable belongs to a countable subset of Rn , depending on A. First, we study an example, which is already interesting in itself, and which will prove that we cannot restrict the interpretation of the variable over the field Q of rational numbers if we want √ to prove the termination for all real inputs. We start with two√elements of Q( 2)−Q, which are conjugate under the Galois group GalQ (Q( 2)), of opposite signs, and the negative one of absolute value strictly greater √ than the positive one. For instance, take √ − + λ = −1 − 2, and λ = −1 + 2. They are the roots of the polynomial 19   0 1 P (X) = (X − λ )(X − λ ) = X + 2X − 1. Now let A = be 1 −2 the associated companion matrix, so that its characteristic polynomial is P , and its eigenvalues are λ− and λ+ . Its generalized eigenspaces are  to  easy 1 and compute. We find Eλ− (A) = R.e− and Eλ+ (A) = R.e+ with e− = λ−   1 + . Now let v = (1, 0)⊤ . We have < v, e+ >= 1 and so, according e = λ+ to Theorem 3.3, the program P1 = P (A, v), associated to A and v, does not terminate. We can actually find the points of R2 for which the program is not terminating. − + 2 Proposition 6.1. Let A, v and P1 be as above. Then program P1 does not terminate for an initial condition x ∈ R2 if and only if x ∈ Eλ+ (A) and hx, vi > 0, i.e. x ∈ R>0 .e+ . k Proof. If x = t.e+ , with t > 0, then Ak (x) = tλ+ .x, and < v, Ak (x) >= k tλ+ > 0 for all k ≥ 0. Hence, the program does not terminate with such an x as initial condition. Conversely, suppose that x satisfies hv, Ak (x)i > 0 for all k ≥ 0. Decompose x on the basis (e− , e+ ). Then x = s.e− + t.e+ , and k k k k Ak (x) = sλ− .e− +tλ+ .e+ , so that < v, Ak (x) >= sλ− +tλ+ . Suppose that s is not zero. As |λ− | > |λ+ |, for k large enough, the scalar < v, Ak (x) > will k be of the same sign as sλ− , which alternates positive and negative. Since k this is absurd, s = 0. Now as < v, Ak (x) >= tλ+ , this implies that t > 0, and so the proposition holds. Proposition 6.1 leads us to the following corollary. Corollary 6.1. With A and v as above, program P1 is terminating on Q2 , but not on R2 Proof. We already saw that P1 does not terminate on R2 . Now let x be an element of Q2 . If P1 was not terminating with x as an initial value, this would imply that x is in R>0 .e+ , according to Lemma 6.1. However, no element of Q2 belongs to R>0 .e+ because the quotient of the coordinates of e+ is irrational. This implies that P1 terminates on Q2 . This proves that even if A and v are rational, one cannot guarantee the termination over the reals if the interpretation of the variables are restricted 20 to rationals. It is clear that one cannot hope to produce any valid conjecture of this type if A and v have wild coefficients, like transcendentals, for example. However, when A and v have algebraic coefficients, using Corollary 3.1, one can find a simple remedy. It is indeed enough to replace Q by a finite extension of the field Q. Such an extension K is called a number field, and is known to be countable. Indeed, it is a Q-vector space of finite dimension, i.e., K = Q.k1 ⊕ · · · ⊕ Q.kl for some l ≥ 1, and elements ki in K. It is, moreover, known that K is the fraction field of its ring of integers OK , which is a free Z-module of finite type. In fact OK = Z.o1 ⊕ · · · ⊕ Z.ol for the same l ≥ 1, and where the elements oi can be chosen equal to the ki , for well chosen ki ’s. We say that a number field is real if it is a subfield of R. Notice that in the mathematical literature a totally real number field is a number field with only real embeddings in C. Here what we call real is thus weaker than totally real. Theorem 6.1. Let A ∈ Mn (R), v 6= 0 ∈ Rn , and suppose that their coefficients are actually in Q or, more generally, in a real number field K. Then there is a well-determined real finite extension L of Q, or of K in the general case, which is contained in R and such that the program P (A, v), associated to A and v, terminates if and only if it terminates on the countable set Ln . We can choose L to be the extension Q(λ1 , . . . , λt ) of Q, or K(λ1 , . . . , λt ) in general, spanned by the positive eigenvalues (λ1 , . . . , λt ) of A. It is actually enough to check the termination of the program on OLn . Proof. We deal with the general case. The reader not familiar with field extensions can just replace K by Q. It is obvious that if the program terminates, it terminates on Ln for any subset L of R. Now let λ1 , . . . , λr be the positive eigenvalues of A. They are all roots of the minimal (or characteristic) polynomial Q of A, which is in K[X]. Hence they are all algebraic on K, and so also on Q as K/Q is finite. Let L = K(λ1 , . . . , λr ) ⊂ R. Suppose that the program P1 does not terminate. Then there is some i ∈ {1, . . . , r}, such that < Eλi , v >6= 0 according to Corollary 3.3. Let r be the positive integer such that Ker((A − λi In )r ) 6⊂ v ⊥ , but Ker((A − λi In )r−1 ) ⊂ v ⊥ . As in the proof of Theorem 3.4, for any x in Ker((A − λi In )r ) − Ker((A − λi In )r−1 ), such that < v, x >> 0, the program does not terminate. We fix such an x. Since both spaces Ker((A − λi In )r ) and Ker((A − λi In )r−1 ) are defined by linear equations with coefficients in L, there is a basis of Ker((A − λi In )r ) with coefficients in Ln containing a basis of Ker((A − λi In )r−1 ) with coefficients in Ln . It is easy to see that this implies that Ln ∩ [Ker((A − λi In )r ) − 21 Ker((A − λi In )r−1 )] is dense in Ker((A − λi In )r ) − Ker((A − λi In )r−1 ), because L contains Q which is dense in R. Hence, there is a sequence xk in Ln ∩ [Ker((A − λi In )r ) − Ker((A − λi In )r−1 )] which approaches x. In particular, hv, xk i > 0 for k large enough. Thus the program does not terminate on xk when k is such that hv, xk i > 0. This shows that P1 does not terminate on Ln . The fact that P1 does not terminate on OL is a trivial consequence of the fact that any element of L is the quotient of two elements of Ol . In particular, if P1 does not terminate on x ∈ Ln , take a > 0 in OL such that ax ∈ OLn . Then the program does not terminate on ax. We now show how Theorem 6.1 applies on our previous example.   0 1 Example 6.1. For the program associated to matrix A = and 1 −2 √ √ vector v = (1, 0)⊤ , we get L = Q(λ+ ) = Q( 2) = {a + √ b 2 : a ∈ Q, b ∈ Q}. √ Its ring of integers is OL = Z(λ+ ) = Z( 2) = {a + b 2 : a ∈ Z, b ∈ Z}. Theorem 6.1 asserts that, as the program P (A, v) is non terminating, it is already on OL2 . Indeed, take x+ as an initial value, then  non terminating  1√ x+ = is in OL2 , and we saw that P (A, v) does not terminate on −1 + 2 x+ . 7 Discussion The important papers [11, 12], treating homogeneous linear programs, can be seen, at first, as closely related to our results. The sufficient condition fully proved and established as our preliminary results in section 3.1, was first stated in [12]. On the other hand, the sufficient conditions proposed in [11, 12] are not necessary conditions for the termination of homogeneous linear programs and, thus, it is not obvious that one can obtain from those results a direct encoding leading deterministically to a practical algorithm. The treatment in [12] can be divided in two parts. First, the interesting sketch of the proof for the sufficient condition leaves space for elaboration. We completed it in a solid mathematical way. We found obstacles that were not obvious how to circumvent. Like applying Brouwer’s fixed point theorem to appropriate spaces, and having 0 in the closure of the orbit of a variable under the action of the transition matrix. The second part provides a lengthy procedure to check for termination. It comprises 3 reductions, a case 22 analysis, and long and costly symbolic computations (whose complexities are max(O(n6 ), O(nm+3 )) where n is the number of variables and m the number of conditions [24].). Also ideas presented in [11] are based on the approach proposed in [12], while considering termination analysis over the integers. Similar points could be raised concerning the work in [11], that is, a complex procedure is proposed, one that appears lengthy and costly. In fact, it is not clear to us if those approaches give rise to simple and fast algorithms. Instead, we have a more direct and clear statement which naturally provides a simple algorithm to check termination, as illustrated by our examples, and with much better complexity. Moreover, we show that it is enough to interpret the variable values over a countable number field, or over its ring of integers, in order to determine program termination over the reals. In a recent work about asymptotically nonterminating values (ANT ) generation [13], we also provided new and efficient techniques to extend our results to general affine loop programs, i.e., programs with several loop conditions. We defer this discussion to another companion article, where more practical details will be presented, together with some experiments. The generated ANT set can be used directly as preconditions for termination or it can be intersected efficiently with another given preconditions, provided by other static analysis methods for instance. Our main results, Theorem 3.3 and its Corollary 3.1, with a direct encoding as in Algorithm 1, together with the results in Section 6, guaranteeing the symbolic computation while circumventing rounding errors, are evidences of the novelty of our approach. 8 Conclusions We presented the first necessary and sufficient condition for the termination of linear homogeneous loop programs. This condition leads to a sound and complete procedure for checking termination for this class of programs. The analysis of the associated algorithms shows that the new method operates in fewer computational steps than all known routines that support the mathematical foundations of previous methods. Section 6, and especially the example therein, introduces the important notion of the locus of initial variables values for which a linear program terminates. In that example, it allowed us to decide if the program terminates on all rational initial variables values. Actually, these methods can be vastly generalized in order to treat 23 the termination problem for linear programs on rational initial values. However, we suspect that this development it will involve some Galois theory, as well as our results on asymptotically non terminating variable values [13], and so we prefer to pursue this investigation in the near future. References [1] Cousot, P., Cousot, R.: Abstract interpretation and application to logic programs. Journal of Logic Programming 13(2–3) (1992) 103–179 [2] Manna, Z.: Mathematical Theory of Computation. McGrw-Hill (1974) [3] Cousot, P., Halbwachs, N.: Automatic discovery of linear restraints among variables of a program. In: Conference Record of the Fifth Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, Tucson, Arizona, ACM Press, New York, NY (1978) 84–97 [4] Sipma, H.B., Uribe, T.E., Manna, Z.: Deductive model checking. Form. Methods Syst. Des. 15(1) (July 1999) 49–74 [5] Colon, M., Sipma, H.: Synthesis of linear ranking functions. In: Proceedings of the 7th International Conference on Tools and Algorithms for the Construction and Analysis of Systems. TACAS 2001, London, UK, UK, Springer-Verlag (2001) 67–81 [6] Col’on, M.A., Sipma, H.B.: Practical methods for proving program termination. In: In CAV2002: Computer Aided Verification, volume 2404 of LNCS, Springer (2002) 442–454 [7] Bradley, A.R., Manna, Z., Sipma, H.B.: Linear ranking with reachability. In: In CAV, Springer (2005) 491–504 [8] Bradley, A.R., Manna, Z., Sipma, H.B.: Termination analysis of integer linear loops. In: In CONCUR, Springer-Verlag (2005) 488–502 [9] Dams, D., Gerth, R., Grumberg, O.: A heuristic for the automatic generation of ranking functions. In: Workshop on Advances in Verification. (2000) 1–8 24 [10] Podelski, A., Rybalchenko, A.: A complete method for the synthesis of linear ranking functions. In: VMCAI. (2004) 239–251 [11] Braverman, M.: Termination of integer linear programs. In: In Proc. CAV06, LNCS 4144, Springer (2006) 372–385 [12] Tiwari, A.: Termination of linear programs. In Alur, R., Peled, D., eds.: Computer Aided Verification, 16th International Conference, CAV 2004, Boston, MA, USA. Volume 3114 of Lecture Notes in Computer Science., Springer (2004) 70–82 [13] Rebiha, R., Matringe, N., Moura, A.V.: Automated generation of asymptotically non-terminant initial variable values for linear programs. Technical Report IC-14-03, Institute of Computing, University of Campinas (January 2014) [14] Bradley, A.R., Manna, Z., Sipma, H.B.: Termination of polynomial programs. In: In VMCAI’2005: Verification, Model Checking, and Abstract Interpretation, volume 3385 of LNCS, Springer (2005) 113–129 [15] Chen, H.Y., Flur, S., Mukhopadhyay, S.: Termination proofs for linear simple loops. In: Proceedings of the 19th international conference on Static Analysis. SAS’12, Berlin, Heidelberg, Springer-Verlag (2012) 422– 438 [16] Cousot, P.: Proving program invariance and termination by parametric abstraction, lagrangian relaxation and semidefinite programming. In: Sixth International Conference on Verification, Model Checking and Abstract Interpretation (VMCAI’05), Paris, France, LNCS 3385, Springer, Berlin (January 17–19 2005) 1–24 [17] Cousot, P., Cousot, R.: An abstract interpretation framework for termination. SIGPLAN Not. 47(1) (January 2012) 245–258 [18] Cook, B., Podelski, A., Rybalchenko, A.: Termination proofs for systems code. SIGPLAN Not. 41(6) (June 2006) 415–426 [19] Ben-Amram, A.M., Genaim, S., Masud, A.N.: On the termination of integer loops. In: VMCAI. (2012) 72–87 25 [20] Ben-Amram, A.M., Genaim, S.: On the linear ranking problem for integer linear-constraint loops. In: Proceedings of the 40th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languages. POPL ’13, New York, NY, USA, ACM (2013) 51–62 [21] Rebiha, R., Matringe, N., Moura, A.V.: Necessary and sufficient condition for termination of linear programs. Technical Report IC-13-07, Institute of Computing, University of Campinas (February 2013) [22] Rebiha, R., Matringe, N., Moura, A.V.: A complete approach for termination analysis of linear programs. Technical Report IC-13-08, Institute of Computing, University of Campinas (February 2013) [23] Stein, W., Joyner, D.: SAGE: System for Algebra and Geometry Experimentation. ACM SIGSAM Bulletin, volume 39, number 2, pages 61–64 (2005) [24] Xia, B., Yang, L., Zhan, N., Zhang, Z.: Symbolic decision procedure for termination of linear programs. Formal Asp. Comput. 23(2) (2011) 171–190 26 Table 1: Experimental results on randomly generated linear loop programs RandSet Set-1 Set-2 Set-3 Set-4 Set-5 Set-6 Set-7 Set-8 Set-9 Set-10 Set-11 Set-12 Set-13 Set-14 Set-15 Set-16 Set-17 Set-18 Set-19 Set-20 Set-21 Set-22 Set-23 Set-24 Set-25 Set-26 Set-27 #Loops 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 Dim 3 3 3 3 3 3 4 4 4 4 4 4 5 5 5 5 5 5 6 6 6 6 6 6 7 7 7 #T 152 195 233 223 246 222 122 184 145 171 185 176 183 227 178 161 174 158 141 173 192 188 227 184 171 139 166 #NT 348 305 267 277 254 278 378 316 355 329 315 324 317 273 322 339 326 342 359 327 308 312 273 316 329 361 334 27 CPU/s[T] 10.02 8.97 15.07 12.49 12.52 13.30 27.8 42,67 31.91 41.16 43.03 40.36 126.24 155.80 103.90 169.92 171.92 174.91 236.0 387.80 342.70 352.40 402.71 385.00 851.18 699.03 876.62 CPU/s[N] 8.79 9.11 12, 78 10.42 11.59 10.35 16.51 21.90 18.05 22.37 24.22 19.95 66.95 81.29 43.47 54.00 66.75 70.32 70.19 105.69 101.89 165.41 174.56 190.94 194.21 174.65 238.94 CPU/s[total] 18.24 18.08 27.85 22.91 24.11 23.66 44.31 53.80 49.97 63.54 67.25 60.32 193.20 237.10 146.57 223.92 238.68 254.24 306.20 493.50 444.59 517.81 577.28 575.94 1044.39 873.68 1115.56
6cs.PL
A hardness result and new algorithm for the longest common palindromic subsequence problem arXiv:1612.07475v1 [cs.DS] 22 Dec 2016 Shunsuke Inenaga† and Heikki Hyyrö‡ † Department of Informatics, Kyushu University, Japan, [email protected] ‡ School of Information Sciences, University of Tampere, Finland, [email protected] Abstract The 2-LCPS problem, first introduced by Chowdhury et al. [Fundam. Inform., 129(4):329–340, 2014], asks one to compute (the length of) a longest palindromic common subsequence between two given strings A and B. We show that the 2-LCPS problem is at least as hard as the well-studied longest common subsequence problem for 4 strings. Then, we present  a new algorithm which solves the 2-LCPS problem in O σM 2 + n time, where n denotes the length of A and B, M denotes the number of matching positions between A and B, and σ denotes the number of distinct characters occurring in both A and B. Our new algorithm is faster than Chowdhury et al.’s sparse algorithm when σ = o(log2 n log log n). 1 Introduction Given k ≥ 2 string, the longest common subsequence problem for k strings (k-LCS problem for short) asks to compute (the length of) a longest string that appears as a subsequence in all the k strings. Whilst the problem is known to be NP-hard for arbitrary many strings [16], it can be solved in polynomial time for a constant number of strings (namely, when k is constant). The 2-LCS problem that concerns two strings is the most basic, but also the most widely studied and used, form of longest common subsequence computation. Indeed, the 2-LCS problem and similar two-string variants are central topics in theoretical computer science and have applications e.g. in computational biology, spelling correction, optical character recognition and file versioning. The fundamental solution to the 2-LCS problem is based on dynamic programming [18] and takes O(n2 ) for two given 1 strings of length n1 . Using the so-called “Four Russians” technique [2], one can solve the 2-LCS problem for strings over a constant alphabet in O(n2 / log2 n) time [17]. For a non-constant alphabet, the 2-LCS problem can be solved in O(n2 log log n/ log2 n) time [9]. Despite much effort, these have remained as the best known algorithms to the 2-LCS problem, and no strongly sub-quadratic time 2-LCS algorithm is known. Moreover, the following conditional lower bound for the 2-LCS problem has been shown: For any constant λ > 0, an O(n2−λ )-time algorithm which solves the 2-LCS problem over an alphabet of size 7 refutes the so-called strong exponential time hypothesis (SETH) [1]. In many applications it is reasonable to incorporate additional constraints to the LCS problem (see e.g. [4, 3, 12, 15, 6, 7, 20, 8, 21, 22]). Along this line of research, Chowdhury et al. [5] introduced the longest common palindromic subsequence problem for two strings (2-LCPS problem for short), which asks one to compute (the length of) a longest common subsequence between strings A and B with the additional constraint that the subsequence must be a palindrome. The problem is equivalent to finding (the length of) a longest palindrome that appears as a subsequence in both strings A and B, and is motivated for biological sequence comparison [5]. Chowdhury et al. presented two algorithms for solving the 2-LCPS problem. The first is a conventional dynamic programming algorithm that runs in O(n4 ) time and space. The second uses sparse dynamic programming and runs in O(M 2 log2 n log log n + n) time and O(M 2 ) space2 , where M is the number of matching position pairs between A and B. The contribution of this paper is two-folds: Firstly, we show a tight connection between the 2-LCPS problem and the 4-LCS problem by giving a simple linear-time reduction from the 4-LCS problem to the 2-LCPS problem. This means that the 2-LCPS problem is at least as hard as the 4-LCS problem, and thus achieving a significant improvement on the 2-LCPS problem implies a breakthrough on the well-studied 4-LCS problem, to which all existing solutions [14, 11, 13, 10, 19] require at least O(n4 ) time in the worst case. Secondly, we propose a new algorithm for the 2-LCPS problem which runs in O(σM 2 + n) time and uses O(M 2 + n) space, where σ denotes the number of distinct characters occurring in both A and B. We remark that our new algorithm is faster than Chowdhury et al.’s sparse algorithm with O(M 2 log2 n log log n + n) running time [5] when σ = o(log2 n log log n). 1 For simplicity, we assume that input strings are of equal length n. However, all algorithms mentioned and proposed in this paper are applicable for strings of different lengths. 2 The original time bound claimed in [5] is O(M 2 log2 n log log n), since they assume that the matching position pairs are already computed. For given strings A and B of length n each over an integer alphabet of polynomial size in n, we can compute all matching position pairs of A and B in O(M + n) time. 2 2 2.1 Preliminaries Strings Let Σ be an alphabet. An element of Σ is called a character and that of Σ∗ is called a string. For any string A = a1 a2 · · · an of length n, |A| denotes its length, that is, |A| = n. For any string A = a1 · · · am , let AR denote the reverse string of A, namely, AR = am · · · a1 . A string P is said to be a palindrome iff P reads the same forward and backward, namely, P = P R . A string S is said to be a subsequence of another string A iff there exist increasing positions 1 ≤ i1 < · · · < i|S| ≤ |A| in A such that S = ai1 · · · ai|S| . In other words, S is a subsequence of A iff S can be obtained by removing zero or more characters from A. A string S is said to be a common subsequence of k strings (k ≥ 2) iff S is a subsequence of all the k strings. S is said to be a longest common subsequence (LCS ) of the k strings iff other common subsequences of the k strings are not longer than S. The problem of computing (the length of) an LCS of k strings is called the k-LCS problem. A string P is said to be a common palindromic subsequence of k strings (k ≥ 2) iff P is a palindrome and is a subsequence of all these k strings. P is said to be a longest common palindromic subsequence (LCPS ) of the k strings iff other common palindromic subsequences of the k strings are not longer than P . In this paper, we consider the following problem: Problem 1 (The 2-LCPS problem) Given two strings A and B, compute (the length of) an LCPS of A and B. For two strings A = a1 · · · an and B = b1 · · · bn , an ordered pair (i, j) with 1 ≤ i, j ≤ n is said to be a matching position pair between A and B iff ai = bj . Let M be the number of matching position pairs between A and B. We can compute all the matching position pairs in O(n + M ) time for strings A and B over integer alphabets of polynomial size in n. 3 Reduction from 4-LCS to 2-LCPS In this section, we show that the 2-LCPS problem is at least as hard as the 4-LCS problem. Theorem 1 The 4-LCS problem can be reduced to the 2-LCPS problem in linear time. Proof Let A, B, C, and D be 4 input strings for the 4-LCS problem. We wish to compute an LCS of all these 4 strings. For simplicity, assume 3 |A| = |B| = |C| = |D| = n. We construct two strings X = AR ZB and Y = C R ZD of length 4n + 1 each, where Z = $2n+1 and $ is a single character which does not appear in A, B, C, or D. Then, since Z is a common palindromic subsequence of X and Y , and since |Z| = 2n + 1 while |A| + |B| = |C| + |D| = 2n, any LCPS of X and Y must be at least 2n + 1 long containing Z as a substring. This implies that the alignment for any LCPS of X and Y is enforced so that the two Z’s in X and Y are fully aligned. Since any LCPS of X and Y is a palindrome, it must be of form T R ZT , where T is an LCS of A, B, C, and D. Thus, we can solve the 4-LCS problem by solving the 2-LCPS problem.  Example 1 Consider 4 strings A = aabbccc, B = aabbcaa, C = aaabccc, and D = abcbbbb of length 7 each. Then, an LCPS of X = cccbbaa$15 aabbcaa and Y = cccbaaa$15 abcbbbb is cba$15 abc, which is obtained by e.g., the following alignment: cccbbaa $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ aabbcaa cccbaaa $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ abcbbbb Observe that abc is an LCS of A, B, C, and D. A new algorithm for 2-LCPS 4 In this section, we present a new algorithm for the 2-LCPS problem. 4.1 Finding rectangles with maximum nesting depth Our algorithm follows the approach used in the sparse dynamic programming algorithm by Chowdhury et al. [5]: They showed that the 2-LCPS problem can be reduced to a geometry problem called the maximum depth nesting rectangle structures problem (MDNRS problem for short), defined as follows: Problem 2 (The MDNRS problem) Input: A set of integer points (i, k) on a 2D grid, where each point is associated with a color c ∈ Σ. The color of a point (i, k) is denoted by ci,k . Output: A largest sorted list L of pairs of points, such that 1. For any h(i, k), (j, ℓ)i ∈ L, ci,j = cj,ℓ , and 2. For any two adjacent elements h(i, k), (j, ℓ)i and h(i′ , k′ ), (j ′ , ℓ′ ) in L, i′ > i, k′ > k, j ′ < j, and ℓ′ < ℓ. 4 Consider two points (i, k), (j, ℓ) in the grid such that i < j and k < ℓ (see also Figure 1). Imagine a rectangle defined by taking (i, k) as its lower-left corner and (j, ℓ) as its upper-right corner. Clearly, this rectangle can be identified as the pair h(i, k), (j, ℓ)i of points. Now, suppose that i and k are positions of one input string A = a1 · · · am and j and ℓ are positions of the other input string B = b1 · · · bn for the 2-LCPS problem. Then, the first condition ci,j = cj,ℓ for any element in L implies that ai = aj = bk = bℓ , namely, i, j, k, ℓ are matching positions in A and B. Meanwhile, the second condition i′ > i, k′ > k, j ′ < j, and ℓ′ < ℓ implies that i′ , j ′ , k′ , ℓ′ are matching positions that are “inside” i, j, k, ℓ. Hence if we define the set of 2D points (i, k) to consist of the set of matching position pairs between A and B and then solve the MDNRS problem, the solution list L describes a set of rectangles with maximum nesting depth, and the characters that correspond to the lower-left and upper-right corner matching position pairs define an LCPS between the input strings A and B. Recall that M is the number of such pairs. As here the lower-left and upper-right corners of each rectangle corresponding to matching position pairs, the overall number of unique rectangles in this type of MDNRS problem is O(M 2 ). n+1 j i c A B i’ c’ j’ c’ j c j’ i’ k c k’ c’ l’ c’ l c i 0 k k’ l’ l n+1 Figure 1: Illustration for the relationship between the 2-LCPS problem and the MDNRS problem. The two nesting rectangles defined by h(i, k), (j, ℓ)i and h(i′ , k′ ), (j ′ , ℓ′ )i correspond to a common palindromic subsequence cc′ c′ c of A and B, where c = ci,k = cj,ℓ and c′ = ci′ ,k′ = cj ′ ,ℓ′ . 4.2 Our new algorithm Consider the MDNRS over the set of 2D points (i, k) defined by the matching position pairs between A and B, as described above. The basic strategy of our algorithm is to process from larger rectangles to smaller ones. Given a rectangle R = h(i, k), (j, ℓ)i, we locate for each character c ∈ Σ a maximal sub-rectangle h(i′ , k′ ), (j ′ , ℓ′ )i in R that is asso- 5 ciated to character c (namely, ci′ ,k′ = cj ′ ,ℓ′ = c). The following lemma is important: Lemma 1 For any character c ∈ Σ, its maximal sub-rectangle is unique (if it exists). Proof Assume on the contrary that there are two distinct maximal subrectangles h(i′ , k′ ), (j ′ , ℓ′ )i and h(i′′ , k′′ ), (j ′′ , ℓ′′ )i both of which are associated to character c. Assume w.o.l.g. that i′ > i′′ , k′ < k ′′ , j ′ < j ′′ and ℓ′′ > ℓ′ . Then, there is a larger sub-rectangle h(i′′ , k′ ), (j ′ , ℓ′′ )i of R which contains both of the above rectangles, a contradiction. Hence, for any character c, a maximal sub-rectangle in R is unique if it exists.  Lemma 1 permits us to define the following recursive algorithm for the MDNRS problem: We begin with the initial virtual rectangle h(0, 0), (n+1, n+1)i. Suppose we are processing a rectangle R. For each character c ∈ Σ, we compute its maximal sub-rectangle Rc in R and recurse into Rc until we meet one of the following conditions: (1) There remains only a single point in Rc , (2) There remains no point in Rc , or (3) Rc is already processed. The recursion depth clearly corresponds to the rectangle nesting depth, and we associate each R with its maximum nesting depth dR . Whenever we meet a rectangle Rc with Condition (3), we do not recurse inside Rc but simply return the already-computed maximum nesting depth dRc . Initially, every rectangle R is marked non-processed, and it gets marked processed as soon as the recursion for R is finished and R receives its maximum nesting depth. Each already processed rectangle remains marked processed until the end of the algorithm. Theorem 2 Given two strings A and B of length n over an integer alphabet of polynomial size in n, we can solve the MDNRS problem (and hence the 2LCPS problem) in O(σM 2 + n) time and O(M 2 + n) space, where σ denotes the number of distinct characters occurring in both A and B. Proof To efficiently perform the above recursive algorithm, we conduct the following preprocessing (alphabet reduction) and construct the two following data structures. Alphabet reduction: First, we reduce the alphabet size as follows. We radix sort the original characters in A and B, and replace each original character by its rank in the sorted order. Since the original integer alphabet 6 is of polynomial size in n, the radix sort can be implemented with O(1) number of bucket sorts, taking O(n) total time. This way, we can treat A and B as strings over an alphabet [1, 2n]. Further, we remove all characters that occur only in A from A, and remove all characters that occur only in B from B. Let  = â1 · · · âm̂ and B̂ = b̂1 · · · b̂n̂ be the resulting strings, respectively. It is clear that we can compute  and B̂ in O(n) time. The key property of the shrunk strings  and B̂ is that since all M matching position pairs in the original strings A and B are essentially preserved in  and B̂, it is enough to work on strings  and B̂ to solve the original problem. If σ is the number of distinct characters occurring in both A and B, then  and B̂ are strings over alphabet [1, σ]. It is clear that σ ≤ min{m̂, n̂} ≤ n. Data structure for finding next maximal sub-rectangles: For each character c ∈ [1, σ], let PÂ,c and PB̂,c be the set of positions of  and B̂ which match c, namely, PÂ,c = {i | ai = c, 1 ≤ i ≤ m̂} and PB̂,c = {k | bk = c, 1 ≤ k ≤ n̂}. Then, given a rectangle R, finding the maximal subrectangle Rc for character c reduces to two predecessor and two successor queries on PÂ,c and PB̂,c . We use two tables of size σ × m̂ each, which answer predecessor/successor queries on  in O(1) time. Similarly, we use two tables of size σ × n̂ each, which answer predecessor/successor queries on B̂ in O(1) time. Such tables can easily be constructed in O(σ(m̂ + n̂)) time and occupy O(σ(m̂ + n̂)) space. Notice that for any position i in  there exists a matching position pair (i, k) for some position k in B̂, and vice versa. Therefore, we have max{m̂, n̂} ≤ M . Since σ ≤ min{m̂, n̂} ≤ max{m̂, n̂}, we have σ(m̂ + n̂) = O(M 2 ). Hence the data structure occupies O(M 2 ) space and can be constructed in O(M 2 ) time. Data structure for checking already processed rectangles: To construct a space-efficient data structure for checking if a given rectangle is already processed or not, we here associate each character  and B̂ with the following character counts: For any position i in Â, let cnt (i) = |{i′ | âi′ = âi , 1 ≤ i′ ≤ i}| and for any position k in B̂, let cntB̂ (k) = |{k′ | B̂k′ = B̂k , 1 ≤ k′ ≤ k}|. For each character c ∈ [1, σ], let Mc denotes the number of matching position pairs between  and B̂ for character c. We maintain the following table Tc of size Mc × Mc : For any two matching positions pairs (i, k) and (j, ℓ) for character c (namely, âi = b̂k = âj = b̂ℓ = c), we set Tc [cnt (i), cntB̂ (k), cnt (j), cnt (ℓ)] = 0 if the corresponding rectangle h(i, k), (j, ℓ)i is non-processed, and set Tc [cnt (i), cntB̂ (k), cnt (j), cnt (ℓ)] = 1 if the corresponding rectangle is processed. Clearly, this table tells us whether a given rectangle is processed or not in O(1) time. The total size P for these tables is c∈[1,σ] Mc2 = O(M 2 ). We are now ready to show the complexity of our recursive algorithm. Main routine: A unique visit to a non-processed rectangle can be charged to itself. On the other hand, each distinct visit to a processed rectangle R can be charged to the corresponding rectangle which contains R as one of its 7 maximal sub-rectangles. Since we have O(M 2 ) rectangles, the total number of visits of the first type is O(M 2 ). Also, since we visit at most σ maximal sub-rectangles for each of the M 2 rectangles, the total number of visits of the second type is O(σM 2 ). Using the two data structures described above, we can find each maximal sub-rectangle in O(1) time and can check if it is already processed or not in O(1) time. For each rectangle after recursion, it takes O(σ) time to calculate the maximum nesting depth from all of its maximal sub-rectangles. Thus, the main routine of our algorithm takes a total of O(σM 2 ) time. Overall, our algorithm takes O(σM 2 + n) time and uses O(M 2 + n) space.  5 Conclusions and further work In this paper, we studied the problem of finding a longest common palindromic subsequence of two given strings, which is called the 2-LCPS problem. We proposed a new algorithm which solves the 2-LCPS problem in O(σM 2 + n) time and O(M 2 + n) space, where n denotes the length of two given strings A and B, M denotes the number of matching position pairs of A and B, and σ denotes the number of distinct characters occurring in both A and B. Since the 2-LCPS problem is at least as hard as the well-studied 4-LCS problem, and since any known solution to the 4-LCS problem takes at least O(n4 ) time in the worst case, it seems a big challenge to solve the 2-LCPS problem in O(M 2−λ ) or O(n4−λ ) time for any constant λ > 0. This view is supported by the recent result on a conditional lowerbound for the k-LCS problem: If there exists a constant λ > 0 and an integer k ≥ 2 such that the k-LCS problem over an alphabet of size O(k) can be solved in O(nk−λ ) time, then the famous SETH (strong exponential time hypothesis) fails [1]. We also remark that our method should have a good expected performance. Consider two random strings A and B of length n each over an alphabet of size σ. Since roughly every σ-th character matches between A and B, we have M = O(n2 /σ). Hence our method runs in O(σM 2 + n) = O(n4 /σ) expected time. On the other hand, the conventional dynamic programming algorithm of Chowdhury et al. [5] takes Θ(n4 ) time for any input strings of length n each. Thus, our method achieves a σ-factor speed-up in expectation. As an open problem, we are interested in whether the space requirement of our algorithms can be reduced, as this could be of practical importance. 8 References [1] A. Abboud, A. Backurs, and V. V. Williams. Tight hardness results for LCS and other sequence similarity measures. In FOCS 2015, pages 59–78, 2015. [2] V. Arlazarov, E. Dinic, M. Kronrod, and I. Faradzev. On economical construction of the transitive closure of a directed graph. Soviet Math. Dokl., 11:1209–1210, 1970. [3] A. N. Arslan. Regular expression constrained sequence alignment. J. Discrete Algorithms, 5(4):647–661, 2007. [4] F. Y. L. Chin, A. D. Santis, A. L. Ferrara, N. L. Ho, and S. K. Kim. A simple algorithm for the constrained sequence problems. Inf. Process. Lett., 90(4):175–179, 2004. [5] S. R. Chowdhury, M. M. Hasan, S. Iqbal, and M. S. Rahman. Computing a longest common palindromic subsequence. Fundam. Inform., 129(4):329–340, 2014. [6] S. Deorowicz. Quadratic-time algorithm for a string constrained LCS problem. Inf. Process. Lett., 112(11):423–426, 2012. [7] E. Farhana and M. S. Rahman. Doubly-constrained LCS and hybridconstrained LCS problems revisited. Inf. Process. Lett., 112(13):562– 565, 2012. [8] E. Farhana and M. S. Rahman. Constrained sequence analysis algorithms in computational biology. Inf. Sci., 295:247–257, 2015. [9] S. Grabowski. New tabulation and sparse dynamic programming based techniques for sequence similarity problems. Discrete Applied Mathematics, 212:96–103, 2016. [10] K. Hakata and H. Imai. The longest common subsequence problem for small alphabet size between many strings. In ISAAC 1992, pages 469–478, 1992. [11] W. J. Hsu and M. W. Du. Computing a longest common subsequence for a set of strings. BIT, 24(1):45–59, 1984. [12] C. S. Iliopoulos and M. S. Rahman. New efficient algorithms for the LCS and constrained LCS problems. Inf. Process. Lett., 106(1):13–18, 2008. [13] R. W. Irving and C. Fraser. Two algorithms for the longest common subsequence of three (or more) strings. In CPM 1992, pages 214–229, 1992. 9 [14] S. Y. Itoga. The string merging problem. BIT, 21(1):20–30, 1981. [15] G. Kucherov, T. Pinhas, and M. Ziv-Ukelson. Regular language constrained sequence alignment revisited. Journal of Computational Biology, 18(5):771–781, 2011. [16] D. Maier. The complexity of some problems on subsequences and supersequences. J. ACM, 25(2):322–336, 1978. [17] W. J. Masek and M. Paterson. A faster algorithm computing string edit distances. J. Comput. Syst. Sci., 20(1):18–31, 1980. [18] R. A. Wagner and M. J. Fischer. The string-to-string correction problem. J. ACM, 21(1):168–173, 1974. [19] Q. Wang, D. Korkin, and Y. Shang. A fast multiple longest common subsequence (MLCS) algorithm. IEEE Trans. Knowl. Data Eng., 23(3):321–334, 2011. [20] D. Zhu and X. Wang. A simple algorithm for solving for the generalized longest common subsequence (LCS) problem with a substring exclusion constraint. Algorithms, 6(3):485–493, 2013. [21] D. Zhu, Y. Wu, and X. Wang. An efficient algorithm for a new constrained LCS problem. In ACIIDS 2016, pages 261–267, 2016. [22] D. Zhu, Y. Wu, and X. Wang. An efficient dynamic programming algorithm for STR-IC-STR-EC-LCS problem. In GPC 2016, pages 3– 17, 2016. 10
8cs.DS
PROC. OF THE 6th EUR. CONF. ON PYTHON IN SCIENCE (EUROSCIPY 2013) 29 High-Content Digital Microscopy with Python Fabrice Salvaire∗† arXiv:1404.6385v2 [cs.CE] 29 Apr 2014 F Abstract—High-Content Digital Microscopy enhances user comfort, data storage and analysis throughput, paving the way to new researches and medical diagnostics. A digital microscopy platform aims at capturing an image of a cover slip, at storing information on a file server and a database, at visualising the image and analysing its content. We will discuss how the Python ecosystem can provide such software framework efficiently. Moreover this paper will give an illustration of the data chunking approach to manage the huge amount of data. Index Terms—high-content microscopy, digital microscopy, high-throughput scanner, virtual slide, slide viewer, multi-processing, HDF5, ZeroMQ, OpenGL, data chunking 1 I NTRODUCTION Since early times optical microscopy plays an important role in biology research and medical diagnostic. Nowadays digital microscopy is a natural evolution of the technology that provides many enhancements on user comfort, data storage and analysis throughput. First, in comparison to binocular microscopy where the low light emission intensity of the specimens causes sever stress to the eyes, the digital microscopy monitor display offers greater comfort to the users. Second, the digitization of the output allows to freeze and store information for short to long term storage, to compress the data, and to easily duplicate it, to protect its integrity (by checksum) and its confidentiality (by cryptography). On the other hand, optical microscopy implies conservation of the specimens themselves at low temperature and in the dark. Last, the automation of a high content application provides a considerable scale-up of the data processing throughput, thus paving the way to new researches and medical diagnostics. We will discuss in this paper how the Python ecosystem can provide efficiently a software framework for the digital microscopy. Our discussion will first present the data acquisition method, then we will describe the data storage and finally the image viewer. 2 DATA ACQUISITION The first challenge of high-content digital microscopy is the quantity of data. Let us first evaluate how large the data is, * Corresponding author: [email protected] † Genomic Vision SA c 2014 Fabrice Salvaire. This is an open-access article disCopyright ○ tributed under the terms of the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited. http://creativecommons.org/licenses/by/3.0/ and enlighten our reader of the reasons of such quantity of data. To reach the required resolution to see the details of a specimen, optical microscopes use objectives magnifying up to the diffraction limit which is about 100×. Nowadays the pixel size for a CCD and sCMOS camera is about 6.5 um, thus we reach a resolution of 162.5 nm at a magnification of 40×. Now consider a specimen put on a cover slip: a glass square surface of 18 mm wide (we will later relate the support and the specimen by the more generic word slide, which corresponds to a larger glass surface). Consequently to cover this surface at such magnification we have to acquire an area larger than 100 000 px wide, thus of the order of 10 billion of pixels. This is roughly 300 times larger than the actual largest professional digital camera (36 Mpx). In light of foregoing digital microscopy are big data similar to spatial images and involve a software framework similar to the wellknown Google Map. For scientific application, we preferably use monochrome camera so as to avoid the interpolation of a Bayer mosaic. Instead, to capture the entire colour spectrum at the same time, colours are captured sequentially by placing a filter of the colour’s corresponding wave length transmission in front of the camera. These shots are called colour fields of view here. Figure 1 shows the schematic of an application of this acquisition method called an epifluorescence microscope. A camera like the Andor Neo sCMOS features a sensor of resolution 2560 × 2160 px and a surface of 416 × 351 um. Thus to cover the whole specimen surface we have to capture a mosaic of fields of view of size 43 × 51 (2193 tiles) using an automated stagger. We will also refer to the fields of view as tiles or images according to the context. To observe the specimen in several colours, two strategies can be used to acquire the mosaic: one is to acquire a mosaic per colour and the other is to acquire several colours per field of view. Both methods have advantages and drawbacks. One of the differences is the uncertainty that occurs on the registration of the colour fields of view. When capturing several colours per field of view at the same staging position, the relative positioning error is due to the optical path. When capturing a mosaic per colour, the error is also due to the reproducibility of the stagger. On the other hand the accuracy of the tile positions is always due to the stagger precision. So as to perform a field of view registration without black zone in the reconstructed image, we drive the stagger with a sufficient overlapping zone on both directions. Another irregularity on the mosaic is due to the camera alignment error according to the stagger axes that draw a sheared mosaic pattern (figure 2). The shearing 30 PROC. OF THE 6th EUR. CONF. ON PYTHON IN SCIENCE (EUROSCIPY 2013) camera emission filter excitation filter light source dichroic mirror of view weights 10.5 MB and our mosaic weights 23 GB per colour. Depending of the intensity dynamic of the specimen and the zero-padding arising from the DAC, most of the pixels can have many zeros on the most significant bits. Therefore, the amount of data can be efficiently reduced using a lossless compression algorithm in conjunction with a bit shuffling to group the zeros together and form long zero sequences in the byte stream. 3 objective specimen on cover slip Fig. 1: Schematic of an epifluorescence microscope. Specimens are labelled with fluorescent molecules so called fluorophores. In this example we are capturing an image for a fluorophore having an excitation wave length in the blue and an emission wave length in the green. The filters are used to restrict the excitation and filter the emission, respectively. doesn’t have any serious effect on the reconstructed image since it only displaces systematically the fields of view in the mosaic frame. Cover Slip Area Field of View Centre V IRTUAL S LIDE F ORMAT AND S TORAGE We can now define the data structure of an acquisition so called later a virtual slide. A virtual slide is made of a mosaic of fields of view and a set of attributes that constitute the so called slide header. Examples of attributes are a slide identifier, a date of acquisition or a type of assay. The mosaic is a set of colour fields of view made of a mosaic index (r, c), a stagger position (x, y, z), a colour index w and an image array of unsigned 16-bit integers. From this mosaic of field of views, we can imagine to reconstruct the slide image once and for all and produce a giant image, where we could use for this purpose the BigTIFF [BigTIFF] extension to the TIFF format. But if we want to keep raw data without information loss we have to imagine a way to store the original fields of view and process them online. This case is particularly important when the registration matters for the interpretation of the reconstructed image. The HDF5 [HDF5] library and its h5py [h5py] Python binding are perfectly suited for this purpose. The content of an HDF5 file is self-defined and the library is open source which guaranties a long term access to the data. The structure of an HDF5 file is similar to a file system having folder objects so called groups and N-dimensional array objects so called dataset that corresponds here to files. Each of these objects can have attached attributes. This virtual file system provides the same flexibility than a real file system similar to a UNIX loop device. Figure 3 shows an example. / Mosaic Frame Stagger Frame group1 Fig. 2: Field of View Mosaic showing a sheared effect due to the camera misalignment. The tiles are rotated in the stagger frame but not in the mosaic frame. dataset1 All these uncertainties can be studied using fluorescent beads with an appropriate density on the cover slip and an image registration algorithm. The third dimension of a specimen can be observed using the vertical focus axis of the microscope so as to perform a so called z-stack of images that enlarge the depth of field virtually and thus improve the focus accuracy. The Neo camera features a standard amplifier-DAC stage with a 12-bit resolution and another stage with a combination of two amplifier-DACs to achieve a 16-bit resolution for high dynamic image. Thus image pixels must be encoded using an unsigned 16-bit integer data type. It means a colour field group2 dataset2 group3 dataset3 Fig. 3: HDF5 Virtual File System. Attributes can be attached to each node. The h5py module provides a Pythonic API and map Numpy [Numpy] arrays to datasets and reciprocally. The Numpy library is well appropriate to store images in memory since it maps efficiently a C linear array data structure on Python. The following code snippet gives an overview of its usage: import numpy as np import h5py HIGH-CONTENT DIGITAL MICROSCOPY WITH PYTHON slide_file = h5py.File(’slide.hdf5’, ’w’) slide_file.attrs[’slide_name’] = u’John Doe’ root_group = slide_file[’/’] image_group = root_group.create_group(’images’) n = 1000 image_dataset = image_group.create_dataset( ’image1’, shape=(100*n, 100*n), dtype=np.uint16) data = np.arange(n*n, dtype=np.uint16).reshape((n,n)) image_dataset[n:2*n,n:2*n] = data As usual when large data sets are involved, the HDF5 library implements a data blocking concept so called chunk which is an application of the divide-and-conquer paradigm. Indeed the data compression as well as the efficiency of the data transfer requires datasets to be splitted in chunks. This feature is a cornerstone for many features. It permits to read and write only a subset of the dataset (a hyperslab), providing means for Python to map concepts such view and broadcasting. Moreover it permits to implement a read-ahead and cache mechanism to speed up the data transfer from storage to memory. Another cornerstone of the HDF5 library is the implementation of a modular and powerful data transfer pipeline shown on figure 4 whose aim is to decompress the data from chunks stored on disk, scatter-gather the data and transform them, for example to apply a scale-offset filter. The h5py module provides the classic GZIP compression as well its faster counterpart LZF [LZF] and other compression algorithms can be added easily as plugins. storage memory 31 smoothed by the fact the images are stored on disk as chunks. tile (0,0) tile (1,0) tile (0,1) tile (1,1) Fig. 5: A dataset for a 2×2 mosaic, chunks are represented by dotted squares. However if we want to load at the same time a set of consecutive tiles, then we can use this linear dataset shape (RC Nw H,W ) and index the image using the linearised index rC + c. Figure 6 shows an example of a linearised mosaic. For example the code to get the fields of view in the slice [10, 20 : 30] would be: lower_index = 10*C + 20 upper_index = 10*C + 30 field_of_view_step = NW * H lower_r = lower_index * field_of_view_step upper_r = upper_index * field_of_view_step memory_map = image_dataset[lower_r:upper_r,:] And to get from here the wth colour plane of the ith field of view, the code would be: row_offset = i * field_of_view_step + w * H colour_image = memory[row_offset:row_offset +H,:] decompress scatter/gather transform If the mosaic is sparse we can still pack the mosaic and use a bisection algorithm to perform a binary search to get the corresponding linear index used for the storage. Fig. 4: HDF5 Data Transfer Pipeline. W The flexibility of HDF5 permits to use different strategies to store our fields of view according to our application. The guideline is to think how images will be retrieved and used. For example if we want to get the fields of view as a planar image then we should use the same shape for the dataset, i.e. if the image shape is (H,W ) then the dataset shape should be (Nw H,W ) where Nw is the number of colour planes. Like this we can map directly the data from storage to memory. The planar format is usually more suited for analysis purpose, but if we want to privilege the display then we should choose an interleaved format. However we cannot use an interleaved format in practice if we consider there is an offset between the colour fields of view. To store the mosaic we can use a dataset per field of view or pack everything in only one dataset. This second approach would be the natural choice if we had reconstructed the slide image. For example if the mosaic shape is (R,C) then we can create a dataset of shape (R Nw H,CW ) with a chunk size of (h, w) where (H,W ) = (n h, n w) and n ∈ Z∗+ . Figure 5 shows an example of a packed mosaic. The induced overhead will be p(r, c) = (r C + c)(Nw H) w0 p(r, c, w) = p(r, c) + w H w1 w2 Fig. 6: A linear dataset for an acquisition having 3 colours where the pointer to a tile and a plane are shown. One can argue this approach is not natural, but encapsulating the slice computation in a virtual slide API allows for efficient ways to store and retrieve the data. A better approach would 32 PROC. OF THE 6th EUR. CONF. ON PYTHON IN SCIENCE (EUROSCIPY 2013) be to have a direct access to the chunks, but actually the HDF5 API does not provide such facility (it only provides direct chunk write up to now). Thus if we do not want to rewrite or extend the library, the hyperslab mechanism is a nice alternative. However if we dislike this packing method, we can still use the following dataset layout (R,C, Nw , H,W ) with this chunk layout (1, 1, 1, H,W ), where the slicing is more natural. Anyway the right approach is to test several dataset layouts and measure the I/O performance, using the tool h5perf provided with the HDF5 SDK. More details about chunking can be found in the reference [HDF5-Chunking]. This storage method can be easily extended to a more complicated acquisition scheme having z-stacks or a time dimension. 3.1 Remote Virtual Slide We have now defined a framework to store our virtual slide based on top of the stack HDF5/h5py that relies on an HDF5 file stored on a local system or a network file system to work in a client-server manner. This framework works perfectly, but a network file system has some limitations in comparison to a real client-server framework. In particular a network file system is complex and has side effects on an IT infrastructure, for example the need to setup an authentication mechanism for security. Moreover we cannot build a complex network topology made of a virtual slide broadcast server and clients. We will now introduce the concept of remote virtual slide so as to add a real client-server feature to our framework. We have two types of data to send over the network, the slide header and the images. Since images are a flow of bytes, it is easy to send them over the network and use the Blosc [Blosc] real-time compression algorithm to reduce the payload. For the slide header, we can serialise the set of attributes to a JSON [JSON] string, since the attributes data types are numbers, strings and tuples of them. For the networking layer, we use the ZeroMQ [ZMQ] library and its Python binding PyZMQ [PyZMQ]. ZeroMQ is a socket library that acts as a concurrency framework, carries message across several types of socket and provides several connection patterns. ZeroMQ is also an elegant solution to the global interpreter lock [GIL] of the CPython interpreter that prevent real multi-threading. Indeed the connection patterns and the message queues offer a simple way to exchange data between processes and synchronise them. This library is notably used by IPython [IPython] for messaging. The remote virtual slide framework is build on the requestreply pattern to provide a client-server model. This pattern can be used to build a complex network topology with data dealer, router and consumer. have to consider these constrains. The first one is due to the fact that the producer does not run at the same speed than the consumer. Indeed we want to maximise the scanner throughput and at the same time maximise the data compression which is a time consuming task. Thus there is a contradiction in our requirements. Moreover the GIL prevents real time multithreading. Thus we must add a FIFO buffer between the producer and the consumer so as to handle the speed difference between them. This FIFO is called slide proxy and acts as an image cache. The second constraint is due to the fact that the slide writer can complete its job after the end of scan. It means the slide writer will not be ready to process another slide immediately, which is a drawback if we want to scan a batch of slides. Thus we need a third process called slide manager whose aim is to fork a slide writer for each scan that will itself fork the slide proxy. Due to this fork mechanism, these three processes, slide manager, slide writer and slide proxy must run on same host so called slide server. For the other component, all the configurations can be envisaged. The last component of this framework is the slide database whose aim is to store the path of the HDF5 file on the slide server so as to retrieve the virtual slide easily. Scanner raw image M ICROSCOPE I NTERCONNECTION As a first illustration of the remote virtual slide concept, we will look at the data flow between the automated microscope so called scanner and the software component, so called slide writer, whose aim is to write the HDF5 file on the file server. This client-server or producer-consumer framework is shown on figure 7. To understand the design of this framework, we Req Req Slide Server Rep Slide Proxy Rep fork fork Rep Slide Manager Req Rep Req Slide Writer Slide DataBase path HDF5 File Server XFS on RAID 6 Fig. 7: Virtual Slide Writer Architecture. 5 4 blosc S LIDE V IEWER G RAPHIC E NGINE The slide viewer graphic engine works as Google Map using image tiles and follows our concept to reconstruct the slide image online. We can imagine several strategies to reconstruct the slide image. The first one would be to perform all the computation on CPU. But nowadays we have GPU that offer a higher level of parallelism for such a task. GPUs can be programmed using several API like CUDA, OpenCL and HIGH-CONTENT DIGITAL MICROSCOPY WITH PYTHON OpenGL [OpenGL]. The first ones are more suited for an exact computation and the last one for image rendering. In the followings we are talking about modern OpenGL where the fixed pipeline is deprecated in favour of a programmable pipeline. The main features of the slide viewer are to manage the viewport, the zoom level and to provide an image processing to render a patchwork of 16-bit images. All these requirements are fulfilled by OpenGL. The API provides a way to perform a mapping of a 2D texture to a triangle and by extension to a quadrilateral which is a particular form of a triangle strip. This feature is perfectly suited to render a tile patchwork. The OpenGL programmable pipeline is made of several stages. For our topic, the most important ones are the vertex shader, the rasterizer and the fragment shader, where a fragment corresponds to a pixel. The vertex shader is mainly used to map the scene referential to the OpenGL window viewport. Then the rasterizer generates the fragments of the triangles using a scanline algorithm and discards fragments which are outside the viewport. Finally a fragment shader provides a way to perform an image processing and to manage the zoom level using a texture sampler. Figure 8 shows an illustration of the texture painting on the viewport. 2 discarded fragment 33 want to register the colour on-line, then the texture lookup is any more efficient. To render the viewport, the slide viewer must perform several tasks. First it must find the list of tiles that compose the viewport and load these tiles from the HDF5 file. Then it must prepare the data for the corresponding textures and load them to OpenGL. The time consuming tasks are the last three ones. In order to accelerate the rendering, it would be judicious to perform these tasks in parallel, which is not simple using Python. For the tile loading, we can build on our remote virtual slide framework in order to perform an intelligent read-ahead and to eventually prepare the data for the texture. The parallelisation of the texture loading is the most difficult part and it relies of the OpenGL implementation. Modern OpenGL Extension to the X Window server (GLX) supports texture loading within a thread, but this approach cannot be used efficiently in Python due to the GIL. Moreover we cannot use a separate process to do that since it requires processes could share an OpenGL context, which is only available for indirect rendering (glXImportContextExt). Also we cannot be sure the multi-threading would be efficient in our case due to the fact we are rendering a subset of the mosaic at a time and thus textures have a short life time. And the added complexity could prove to be a drawback. Since our mosaic can be irregular, we cannot found by a simple computation which tiles are in the viewport. Instead we use an R-tree for this purpose. All the tiles boundaries are filled in the R-tree. And to get the list of tiles within the viewport, we perform an intersection query of the R-tree with the viewport boundary. viewport 5.1 1 Slide Viewer Architecture 3 texture anchor LRU Texture Cache OpenGL Client/Server LRU Tile Cache Fig. 8: OpenGL viewport and texture painting. The overlapped black rectangles represent the mosaic of tiles. The red rectangle shows the viewport area. And the blue rectangle illustrates the rendering of a texture for a tile which is partially out of the viewport area. The horizontal line represents the sampling of the triangle defined by the vertexes (1, 2, 3) using a scanline algorithm. Pixels out of the viewport are discarded. A texture can have from one to four colour components (RGBA), which make easy to render a slide acquisition with up to four colours. To render more colours, we just need more than one texture by tile and a more complicated fragment shader. If the tiles are stored in a planar format then we have to convert them to an interleaved format, we call this task texture preparation. However we can also use a texture per colour but in this case we have to take care to the maximal number of texture slots provided by the OpenGL implementation, else we have to perform a framebuffer blending. The main advantage of using a multi-colour texture is for efficiency since the colour processing is vectorised in the fragment shader. However if we Slide Viewer Slide DataBase Virtual Slide API Remote File Req path Rep Tile Dealer HDF5 File Server XFS on RAID 6 NFS PCI-e SSD Local Cache Fig. 9: Slide Viewer Architecture. Figure 9 shows the architecture of our slide viewer where the virtual slide API can access the data through the HDF5 34 PROC. OF THE 6th EUR. CONF. ON PYTHON IN SCIENCE (EUROSCIPY 2013) file or the remote framework. In our IT infrastructure, HDF5 files are stored on a file server that can provide a network file system to access files remotely. The remote virtual slide can be used in two different ways according to the machine where the process of the server side, called tile dealer, is executed. If this process runs on the same host as the slide viewer, then we can use it to implement a read-ahead mechanism to parallelise the tile loading. And if it runs on the file server, then we can use it as an alternative to the network file system in a similar way as a virtual slide broadcast service. This second example demonstrates the remote virtual slide is a fundamental software component in our framework that open the way to many things. Another way to access efficiently the data, it to use a local cache to store temporally the virtual slide. Nowadays we can build on a very fast locale cache using a PCI-e SSD card, which commonly reach a read/write bandwidth of 1000 MB/s and thus outperforms most of the hardware RAID. The slide viewer implements two Least Recently Used caches to store the tiles and the textures. These caches are a cornerstone for the fluidity of the navigation within the slide, since it helps to reduce the viewer latency. Nowadays we can have on a workstation 64 GB of RAM for a decent cost, which open the way to a large in memory cache in complement to a PCI-e SSD cache. In this way we can build a 3-tier system made of a file server to store tera bytes of data, a PCI-e SSD cache to store temporally slides and an in memory cache to store a subset of the virtual slide. 5.2 Vertex and Fragment Shader In modern OpenGL all the computations must be performed by hand from the viewport modelling to the fragment processing, excepted the texture sampling which is provided by the OpenGL Shading Language. Since we are doing a two dimensional rendering, it simplifies considerably the viewport model and the coordinate transformation. OpenGL discards all the fragment that are outside the [−1, 1] × [−1, 1] interval. Thus to manage the viewport, we have to transform the slide frame coordinate using the following model matrix:  x +x     2 0 0 − xinsupf −xsup xs x xsup −xin f in f  y +y  y   2   ys  0 0 − yinsupf −ysup   = ysup −yin f  in f   z    0  0 0 1 0 1 w 0 0 0 1 (1) where [xin f , xsup ] × [yin f , ysup ] is the viewport interval and (xs , ys ) is a coordinate in the slide frame. OpenGL represents fragment colour by a normalised float in the range [0, 1] and values which are outside this range are clamped. Thus to transform our 16-bit pixel intensity we have to use this formula: l − Iin f (2) lˆ = Isup − Iin f where 0 ≤ Iin f < Isup < 216 . This normalisation can be used to perform an image contrast by adjusting the values of Iin f and Isup . The fact OpenGL supports the unsigned 16-bit data type for texture permits to load the raw data directly in the fragment shader without information loss. According to the configuration of OpenGL, the RAMDAC of the video adapter will convert the normalised floats to an unsigned 8-bit intensity for a standard monitor or to 10-bit for high-end monitor like DICOM compliant models. As soon as we have converted our pixel intensities to float, we can apply some image processing treatments like a gamma correction for example. In the previous paragraphs, we told we can load in a texture up to four colour components using RGBA textures. Since monitors can only render three colour components (RGB), we have to transform a four components colour space to a three components colour space using a mixer matrix. This computation can be easily extended to any number of colours using more than one texture. The mixer matrix coefficients should be choose so as to respect the normalised float range. Another important feature of the slide viewer is to permit to the user to select which colours will be displayed on the screen. This feature is easily implemented using a diagonal matrix so called status matrix with its coefficients set to zero or one depending of the colour status. We can now write the matrix computation for the rendering of up to four colours:       s lˆ0 0 r mr0 . . . mr3   ..  ..  g  =  mg0 . . . mg3    .   . b mb0 . . . mb3 s3 lˆ3 {z }| | {z } mixer matrix status matrix (3) If we consider a GPU with more than 1024 cores, then most of the rows of our display will be processed in parallel which is nowadays impossible to perform with a multi-core CPU. It is why our approach to render a mosaic of tiles is so efficient and the rendering is nearly done in real time. 5.3 Zoom Layer When the texture must be magnified, it is important to enlarge the pixel without interpolation. In OpenGL it is achieved by using the GL_NEAREST mode for the texture magnification filter. Despite GPU are very powerful, there is a maximal number of tiles in the viewport that can be reasonably processed. The amount of memory of the GPU is an indicator of this limitation. If we consider a GPU with 2048 MB, then we can load 66 textures having a layout of 2560 × 2160 px and a 16bit RGB format. It means we can display a mosaic of 8 × 8 at the same time. If we want to display more tiles at the same time, then we have to compute a so called mipmaps which is a pyramidal collection of mignified textures. Usually we perform a geometric series that corresponds to divide by two the size of the texture recursively. Due to the power of the GPU, it is not necessary to compute the entire pyramid, but just some levels. In our case we can compute the levels 8 and 16. For higher levels according to the size of the mosaic, it could be more efficient to compute a reconstructed image. HIGH-CONTENT DIGITAL MICROSCOPY WITH PYTHON 35 6 Fig. 10: Cell displayed in the slide viewer. The slide was acquired with an epifluorescence-microscope at magnification 40× with a camera of resolution 1392 × 1040 px and with four colours. The size of the part of the mosaic shown on the viewport is 19 × 22 , which corresponds to 418 tiles and thus around 595 Mpx. The dimension of the visible surface is around 4.9 × 3.1 mm. Here the slide image is rendered at magnification 2.5× and the zoom layer corresponds to a mignification of level 24 = 16 and thus to a texture of dimension 87 × 65 px. So there is around 2 Mpx to process. These mignified textures can be computed online using CUDA or stored in the HDF5 files. Our slide viewer implements a zoom manager in order to control according to the current zoom which zoom layer is active and to limit the zoom amplitude to an appropriate range. Moreover we can implement some excluded zoom ranges and force the zoom to the nearest authorised zoom according to the zoom direction. 5.4 Detection Layer Our slide viewer is not limited to display raw images, but can also display tiles from an image processing pipeline. When the viewer render a viewport, it first looks which tiles compose the viewport, then for each tile, it looks if the OpenGL LRU cache has a texture for the corresponding tile and image processing pipeline, if the texture does not exists yet then it cascades the request to the tile LRU cache and finally it will asks the image processing pipeline to generate the image. The tile loading from the virtual slide corresponds to the so called raw image pipeline and each zoom layer owns its image pipeline. Moreover each pipeline can have its own fragment shader to customise the rendering. 5.5 Benchmark Figure 10 show a reconstructed image made of 418 tiles. For a tile dimension of 1392 × 1040 px and a four colours acquisition, our slide viewer needs around 2 s to render the zoom layer 16 and 6 s for the layer 8 (100 raw tiles) on a workstation with a Xeon E5-1620 CPU, a GeForce GTX-660 GPU and the HDF5 file stored on a local SATA hard disk. The required time to load a tile form the HDF5 file is around 50 ms, thus the tile loading account for 80 % of the full rendering time. C ONCLUSION This paper gives an overview how the Python ecosystem can be used to build a software platform for high-content digital microscopy. Our achievement demonstrates Python is well suited to build a framework for big data. Despite Python is a high level language, we can handle a large amount of data efficiently by using powerful C libraries and GPU processing. First we gave an overview how to store and handle virtual slides using Python, Numpy and the HDF5 library. Different methods to store the images of the fields of view within a dataset was discussed. In particular the case where we do not reconstruct an image of slide once and for all, but rather perform an on-line reconstruction from the raw images. Despite our method to store the images works well, it would be interesting to look deeper in the HDF5 library to see if we could do something still better. We described the concept of remote virtual slide which is a client-server model build on top of our virtual slide framework. We gave two examples of utilisation of this clientserver model, the scanner interconnection with the slide writer and the tile dealer. Also we shown how this architecture solve the GIL problem and enhance the performance. Finally we described our slide viewer architecture based on the OpenGL programmable pipeline and a texture patchwork rendering. We gave an overview on the vertex and the fragment shader. Thanks to the power of GPU, this method can render more than three colours in quasi real time. Moreover we explained how to manage the zoom level efficiently so as to overcome the limited amount of RAM of the GPU. In a near future, it would be interesting to see how the JIT Python interpreter PyPy will enhance the performance of this framework. Up to now the lake of support of C library like Numpy and Qt prevents to run the code with it. The Git repository https://github.com/FabriceSalvaire/ PyOpenGLV4 provides an oriented object API on top of PyOpenGL to work with the OpenGL programmable pipeline. This module is used in our slide viewer. R EFERENCES [BigTIFF] [Blosc] Ole Eichhorn of Aperio, http://bigtiff.org Francesc Alted, http://blosc.org, https://github.com/ FrancescAlted/python-blosc [GIL] http://www.dabeaz.com/python/UnderstandingGIL.pdf [HDF5] HDF Group, http://www.hdfgroup.org/HDF5 [h5py] Andrew Collette and contributers, http://www.h5py.org [HDF5-Chunking] http://www.hdfgroup.org/HDF5/doc/Advanced/Chunking/ index.html, http://www.hdfgroup.org/HDF5/doc/ Advanced/Chunking/Chunking_Tutorial_EOS13_2009. pdf, http://www.hdfgroup.org/HDF5/doc/Advanced/ DirectChunkWrite/UsingDirectChunkWrite.pdf [IPython] http://ipython.org/ipython-doc/stable/development/ messaging.html [JSON] http://www.json.org [LZF] Andrew Collette http://www.h5py.org/lzf, Marc Lehmann http://oldhome.schmorp.de/marc/liblzf.html [Numpy] Travis Oliphant and Numpy developers, http://www. numpy.org [OpenGL] Khronos Group, http://www.opengl.org [PyOpenGL] http://pyopengl.sourceforge.net [PyZMQ] https://github.com/zeromq/pyzmq [ZMQ] iMatix Corporation, http://zeromq.org 36 PROC. OF THE 6th EUR. CONF. ON PYTHON IN SCIENCE (EUROSCIPY 2013)
6cs.PL
arXiv:1703.06264v3 [q-bio.NC] 25 Mar 2017 Non-Associative Learning Representation in the Nervous System of the Nematode Caenorhabditis elegans Ramin M. Hasani* , Magdalena Fuchs* , Victoria Beneder** and Radu Grosu* * Cyber-Physical-Systems Group, Vienna University of Technology, Austria ** University of Natural Resources and Life Sciences, Vienna, Austria {ramin.hasani, radu.grosu}@tuwien.ac.at [email protected] [email protected] March 25, 2017 Abstract Caenorhabditis elegans (C. elegans) illustrated remarkable behavioral plasticities including complex non-associative and associative learning representations. Understanding the principles of such mechanisms presumably leads to constructive inspirations for the design of efficient learning algorithms. In the present study, we postulate a novel approach on modeling single neurons and synapses to study the mechanisms underlying learning in the C. elegans nervous system. In this regard, we construct a precise mathematical model of sensory neurons where we include multi-scale details from genes, ion channels and ion pumps, together with a dynamic model of synapses comprised of neurotransmitters and receptors kinetics. We recapitulate mechanosensory habituation mechanism, a non-associative learning process, in which elements of the neural network tune their parameters as a result of repeated input stimuli. Accordingly, we quantitatively demonstrate the roots of such plasticity in the neuronal and synaptic-level representations. Our findings can potentially give rise to the development of new bio-inspired learning algorithms. 1 Learning the Learning Mechanisms Origin of many deep learning techniques can be traced back to nature [LeCun et al., 2015]. For instance, convolutional neural nets [LeCun et al., 1990], are inspired by the concept of simple and complex cells in the cat’s visual cortex [Hubel and Wiesel, 1962]. In this study, we further investigate the sources of learning within the nervous system of small species such as C. elegans, by deriving detailed mathematical models of the elements of the nervous system. C. elegans is a 1mm-long, bodily transparent worm which dwells in soil and is considered the world’s best understood organism [Ardiel and Rankin, 2010]. An adult’s stereotypic nervous system comprises exactly 302 neurons connected through 8000 chemical and electrical synapses [White et al., 1986]. The worm, at first, seemed to be a hardwired model organism that can simply crawl forward and backward. Later, it proved otherwise by illustrating fantastic behavioral plasticity. Evidence of expressing well-founded non-associative and associative learning behaviors has been observed in C. elegans. Examples include habituation (short term and long term memory) to mechanical stimulation [Wicks and Rankin, 1997, Kindt et al., 2007, Cai et al., 2009], in the context of non-associative learning, and decision making over various favorable environmental stimuli such as food, temperature and oxygen in the form of associative learning [Saeki et al., 2001, Mohri et al., 2005, Tsui and van der Kooy, 2008]. 1 Model of Learning in C. elegans C. elegans is highly responsive to experience. This indicates that learning can be mediated from every sensory modality. For instance, mechanosensory habituation is a plasticity for the tap-withdrawal (TW) neural circuit (a neural network responsible for generating a reflexive response as a result of a mechanical tap on the petri dish in which the worm swims [Islam et al., 2016]), where the amplitude and the speed of the reflex can be modified as a result of periodic tap stimulation [Wicks and Rankin, 1997]. Detailed studies on such non-associative type of learning in the TW circuit, reveal fundamental notes underliying learning principles in the C. elegans, such as: • Sensory (input) neurons within the network are subjected to a mediation during the non-associative training process (repeated tap stimulation) [Kindt et al., 2007]. • A single gene’s function during learning can interact with multiple postsynaptic connections. Such genes can potentially induce synaptic reconfiguration in several layers during memory consolidation [Stetak et al., 2009]. • Effects of certain genes are local within a neuron; They do not influence the synaptic pathways distributed from that sensory neuron [Ohno et al., 2014]. • During the learning process, change in the amount of neurotransmitter release is notable and is an indicator of learning and memory [Jin et al., 2016]. • Within a neural circuit, only some of the interneurons are proposed to be the substrate of memory [Sugi et al., 2014]. Biological experiments on the principles of learning in C. elegans, from high-level behavioral features, to the dynamics of neural circuits, to the gene functional effect on the characteristic of ion channels in a neuron, have demonstrated the remarkable capability of C. elegans for learning and memory [Ardiel and Rankin, 2010]. In the present study, we aim to mathematically model the fundamental roots of learning mechanisms within the brain of the worm. Our findings in such attempt presumably enable machine-learning experts to get grounding inspirations towards development of novel learning algorithms. We utilize SIM-CE [Hasani et al., 2017], our simulation platform for performing physiological analysis on neurons and synapses, to explore the non-associative learning principles originated from autonomous gene modifications, variation of neurotransmitters concentrations and mediation of the ion channels activation and deactivation rates. Accordingly, we hypothesize the computational origins of such class of learning within two paradigms of neuronal habituation and synaptic plasticities. 2 Neuronal Habituation In neurons, electrical signals are being generated and propagate as a result of transportation of ions through ion channels [Salkoff et al., 2005]. Figure 1A graphically represents a simplified structure of a neuron of C. elegans in which we include voltage-gated calcium channel, calcium pump together with two different potassium channels and a leak channel to be the main mechanism responsible for the dynamics. Neurons can get excited by external sensory stimulus or chemical and electrical synapses from a presynaptic neuron. Considering the total membrane current, one can compose kinetics of the membrane potential and current as follows: dV = −(ICa + IK + Isk + ILeak ) + Σ(ISyn + Igap + Istimuli ), (1) Cm dt where Cm is the membrane capacitance and V represents the membrane potential. ICa , IK , Isk and ILeak stand for the calcium current, potassium current, intercellular calcium-gated potassium channel current and leakage current respectively [Kuramochi and Iwasaki, 2010]. Each ion channel’s dynamics is precisely modeled with an inspiration from Hodgkin-Huxley channel modeling technique where the current-voltage relationship is developed based on Ohm’s law, Iion = Gion (Eion − V ), while conductance of the ion channel, 2 Model of Learning in C. elegans A ISK Stimulus IK B Ileak ICa Ca2+ Pump Postsynaptic neuron Gap junction C D Chemical synapses Presynaptic neuron Figure 1: Learning the learning representation. A) Structure of a neuron B) Habituation of a real sensory neuron (reprinted with permission from [Kindt et al., 2007]) C) Model of a neuronal habitation D) Response of an interneuron habituated and dishabituated with synaptic plasticities. Gion is considered to be the product of a constant maximum conductance with a dynamic parameter which is a function of the membrane potential [Hodgkin and Huxley, 1952]. In order to model the gene modification effects and the corresponding learning, we consider the maximum conductance of some ion channels to be a dynamic variable as a function of the input stimulus maximum value in time. In order to evaluate our assumption, we compare our result to the real sensory neuron habituation. A real sensory neuron habituates to repeated mechanical pulses on the body of the worm. The effect appears in the form of a reduction in the level of intracellular calcium concentration shown in Figure 1B. In our simulation such behavior is captured by modifying the maximum potassium channel conductance to be a dynamic function of the input tap-stimulus and time (Figure 1C). Key finding 1: The state of the activation of an input neuron can be modified by repeatedly induced stimuli through an intrinsic parameter which is dynamically altered based on the input amplitude and frequency. 2.1 Synaptic Plasticity Fundamentally, many learning mechanisms originate from the alternation of the amount of neurotransmitters concentration. Information propagates from a postsynaptic neuron to a presynaptic cell through chemical and electrical synapses. The information transportation process depends on several circumstances; the amount of available neurotransmitters, Gmax , at the presynaptic end, the state of the activation of the presynaptic cell which causes the neurotransmitter secretion tone G(Vpre ), number of available receptors at the postsynaptic neuron and the probability of the neurotransmitters binding to the postsynaptic receptors, S(t). A detailed model of a chemical synapse’s current therefore can be derived as follows: ISyn = Gmax G(Vpre )S(t)(ESyn − Vpost ), (2) where ESyn represents the reversal potential of a synapse [Schutter, 2009]. Variables in Eq. 2 are dynamically modeled by partial differential equations where the steady state and the time-constant of each variable can be tuned in order to capture synaptic plasticity in C. elegans. Rankin and Wicks [2000] showed that the glutamate concentration considereably modifies the habituation responses in touch sensory neurons. Such 3 Model of Learning in C. elegans behavior is captured as a property of a synapse where simultaneous alternation of the parameters inside Gmax and S(t), results in the similar tap-withdrawal response (See Figure 1D). Key finding 2: Synapses with an internal state can autonomously modify the behavior of the system. Synapses can presumably be involved in completion of a habituation process, dishabituation process (See Figure 1D the second calcium spike train) and propagation of a neuronal habituation to the rest of the neural circuit. 3 Final Note Learning is an essential attribute for survival. C. elegans demonstrates optimal adaptive behavior to react to the environmental circumstances for survival. Learning how the animal learns and adapts not only is a notable step forward towards decoding the human brain’s principles but can also lead us to the development of better learning algorithms.1 References E. L. Ardiel and C. H. Rankin. An elegant mind: learning and memory in caenorhabditis elegans. Learning & Memory, 17(4):191–201, 2010. S.-Q. Cai, Y. Wang, K. H. Park, X. Tong, Z. Pan, and F. Sesti. Auto-phosphorylation of a voltage-gated k+ channel controls non-associative learning. The EMBO journal, 28(11):1601–1611, 2009. R. M. Hasani, V. Beneder, M. Fuchs, D. Lung, and R. Grosu. Sim-ce: An advanced simulink platform for studying the brain of caenorhabditis elegans. arXiv preprint arXiv:1703.06270, 2017. A. L. Hodgkin and A. F. Huxley. A quantitative description of membrane current and its application to conduction and excitation in nerve. The Journal of physiology, 117(4):500, 1952. D. H. Hubel and T. N. Wiesel. Receptive fields, binocular interaction and functional architecture in the cat’s visual cortex. The Journal of physiology, 160(1):106–154, 1962. M. A. Islam, Q. Wang, R. M. Hasani, O. Balún, E. M. Clarke, R. Grosu, and S. A. Smolka. Probabilistic reachability analysis of the tap withdrawal circuit in caenorhabditis elegans. In High Level Design Validation and Test Workshop (HLDVT), 2016 IEEE International, pages 170–177. IEEE, 2016. X. Jin, N. Pokala, and C. I. Bargmann. Distinct circuits for the formation and retrieval of an imprinted olfactory memory. Cell, 164(4):632–643, 2016. K. S. Kindt, K. B. Quast, A. C. Giles, S. De, D. Hendrey, I. Nicastro, C. H. Rankin, and W. R. Schafer. Dopamine mediates context-dependent modulation of sensory plasticity in c. elegans. Neuron, 55(4): 662–676, 2007. M. Kuramochi and Y. Iwasaki. Quantitative modeling of neuronal dynamics in c. elegans. In Neural Information Processing. Theory and Algorithms, pages 17–24. Springer, 2010. B. B. LeCun, J. Denker, D. Henderson, R. Howard, W. Hubbard, and L. Jackel. Handwritten digit recognition with a back-propagation network. In Advances in Neural Information Processing Systems. Citeseer, 1990. Y. LeCun, Y. Bengio, and G. Hinton. Deep learning. Nature, 521(7553):436–444, 2015. A. Mohri, E. Kodama, K. D. Kimura, M. Koike, T. Mizuno, and I. Mori. Genetic control of temperature preference in the nematode caenorhabditis elegans. Genetics, 169(3):1437–1450, 2005. 1A comprehensive version of this work, will be published soon elsewhere. 4 Model of Learning in C. elegans H. Ohno, S. Kato, Y. Naito, H. Kunitomo, M. Tomioka, and Y. Iino. Role of synaptic phosphatidylinositol 3-kinase in a behavioral learning response in c. elegans. Science, 345(6194):313–317, 2014. C. H. Rankin and S. R. Wicks. Mutations of the caenorhabditis elegansbrain-specific inorganic phosphate transporter eat-4affect habituation of the tap–withdrawal response without affecting the response itself. Journal of Neuroscience, 20(11):4337–4344, 2000. S. Saeki, M. Yamamoto, and Y. Iino. Plasticity of chemotaxis revealed by paired presentation of a chemoattractant and starvation in the nematode caenorhabditis elegans. Journal of Experimental Biology, 204 (10):1757–1764, 2001. L. Salkoff, A. Wei, B. Baban, A. Butler, G. Fawcett, G. Ferreira, and C. M. Santi. Potassium channels in c. elegans. 2005. E. D. Schutter. Computational modeling methods for neuroscientists. The MIT Press, 2009. A. Stetak, F. Horndli, A. V. Maricq, S. van den Heuvel, and A. Hajnal. Neuron-specific regulation of associative learning and memory by magi-1 in c. elegans. PloS one, 4(6):e6019, 2009. T. Sugi, Y. Ohtani, Y. Kumiya, R. Igarashi, and M. Shirakawa. High-throughput optical quantification of mechanosensory habituation reveals neurons encoding memory in caenorhabditis elegans. Proceedings of the National Academy of Sciences, 111(48):17236–17241, 2014. D. Tsui and D. van der Kooy. Serotonin mediates a learned increase in attraction to high concentrations of benzaldehyde in aged c. elegans. Learning & Memory, 15(11):844–855, 2008. J. White, E. Southgate, J. Thomson, and S. Brenner. The structure of the nervous system of the nematode caenorhabditis elegans: the mind of a worm. Phil. Trans. R. Soc. Lond, 314:1–340, 1986. S. R. Wicks and C. H. Rankin. Effects of tap withdrawal response habituation on other withdrawal behaviors: the localization of habituation in the nematode caenorhabditis elegans. Behavioral neuroscience, 111(2): 342, 1997. 5
9cs.NE
A Web-based Tool for Identifying Strategic Intervention Points in Complex Systems∗ Sotiris Moschoyiannis Nicholas Elia Alexandra S. Penn Department of Computer Science Extended-Content Solutions Department of Sociology University of Surrey, GU2 7XH, UK London, SE1 9RT, UK University of Surrey, GU2 7XH, UK [email protected] [email protected] [email protected] David J. B. Lloyd and Chris Knight Department of Mathematics University of Surrey, GU2 7XH, UK [email protected] Steering a complex system towards a desired outcome is a challenging task. The lack of clarity on the system’s exact architecture and the often scarce scientific data upon which to base the operationalisation of the dynamic rules that underpin the interactions between participant entities are two contributing factors. We describe an analytical approach that builds on Fuzzy Cognitive Mapping (FCM) to address the latter and represent the system as a complex network. We apply results from network controllability to address the former and determine minimal control configurations subsets of factors, or system levers, which comprise points for strategic intervention in steering the system. We have implemented the combination of these techniques in an analytical tool that runs in the browser, and generates all minimal control configurations of a complex network. We demonstrate our approach by reporting on our experience of working alongside industrial, local-government, and NGO stakeholders in the Humber region, UK. Our results are applied to the decision-making process involved in the transition of the region to a bio-based economy. 1 Introduction We investigate a generic type of system that consists of a number of participating entities, including human and software agents acting for themselves or on behalf of organisations, which interact with one another and the environment. The interactions happen at multiple levels (micro and macro) and often reflect interdependencies between participating entities. The resulting complex system may evolve over time in often unpredictable ways. A range of systems in biology (brain, immune system, cell), nature (social insect, ant colonies), but also business and socio-technical systems, e.g., see [2], [7], [12], have been approached using complexity theory [13]. We describe such a system in more detail, within the Humber region real world case study, as it might be instructive to look at an example of a real industrial ecosystem which can be understood in terms of a complex system. The study was carried out within the Evolution and Resilience of Industrial Ecosystems (ERIE) project1 , which is an interdisciplinary project aimed at combining computational tools and techniques with complexity science to produce decisionmaking frameworks for stakeholders and policy makers in industrial networks. ∗ This work was partly funded by the UK Research Council EPSRC, under the project Evolution and Resilience of Industrial Ecosystems (ERIE), Contract No. EP/H021779/1. 1 http://www.surrey.ac.uk/erie T. Brihaye, B. Delahaye, L. Jezequel, N. Markey, J. Srba (Eds.): Cassting Workshop on Games for the Synthesis of Complex Systems and 3rd International Workshop on Synthesis of Complex Parameters (Cassting’16/SynCoP’16). EPTCS 220, 2016, pp. 39–52, doi:10.4204/EPTCS.220.4 c S. Moschoyiannis, N. Elia, A. S. Penn, D. J.B. Lloyd & C. Knight This work is licensed under the Creative Commons Attribution License. 40 A tool for exploring strategic intervention points Case Study: the Humber region, UK. Within the context of ERIE, we have been working with the industrial ecosystem of the Humber region. We provide a brief outline here, more details can be found in [15]. The Humber region comprises strategic energy generation facilities and infrastructure based around fossil fuels. The transition to a low-carbon economy is seen as an opportunity for the region. The required infrastructure and support industries largely exist already while feedstock is available from the substantial agricultural hinterland and bulk imports via the large local ports. The move is underlined by new investment in large-scale renewable energy technologies. A number of biodiesel and bio-ethanol facilities already exist and more are under construction. The region is expected to become the centre of a UK biofuel industry responsible for 50% of UK production within the next 5 years. Significant investment is under way in energy from biomass and bio-waste facilities, alongside developments in biorefinery to produce high-value chemicals. The estuary is also of national and international biodiversity and conservation importance, and due to climate change presents increasing flood risk management issues; both of these issues can cause friction over proposed development. Furthermore, neighbouring communities face significant socio-economic problems including unemployment and fuel poverty. It can be seen that development of the Humber region and its economy touches upon a number of factors which are entangled in a web of biophysical, industrial, economic, social, and governance systems, populated by many diverse actors or stakeholder groups. This makes automated analysis of the causal structure inherently challenging. Our motivation for gaining an understanding of the causal structure of this system is that various stakeholders involved want to steer or influence it. Typically, there are multiple objectives in such systems, e.g., one might want to increase certain aspects such as the bio-based energy production and jobs and, perhaps, decrease others such as flood risk. The objective of our work is to produce computational techniques to aid in designing contextappropriate system interventions that can steer the system towards a chosen set of goals. This is a challenging problem and the reason is twofold. Firstly, it is usually impractical - or at least expensive to attempt to control or influence every factor within the system directly. Also, some factors are easier to control than others - factors such as ’international instability’ and ’fossil fuel price’ are largely influenced by factors outside the boundary of our focal system and therefore harder to control. This motivates the investigation of control theory [20], and more specifically structural controllability [8], in an attempt to exploit the causal structure of the network of factors, without knowledge of the underlying dynamics. The idea is to identify a smaller subset that act as system levers, in the sense that a lever factor can be used to control numerous others; hence, the impact of one’s input effort is maximised. Secondly, attempting to control or alter any one factor will influence other factors in the system and altering some factors will have more influence on the system than others. This points to the importance of identifying the connections between the different factors in a complex system. However, the lack of a specification of the system or scientific data leaves this aspect open to suggestion. Our experience with complex industrial networks such as that of the Humber region suggests that the decisions of the stakeholders play a key role in determining the outcome of the system’s development. This means that it is paramount that the various stakeholders are involved in constructing a model of the system and setting up the links between factors. This motivates the investigation of participatory modelling and in particular, the application of Fuzzy Cognitive Mapping (FCM) [6] in arriving at a weighted directed network that makes all the local knowledge of the system dynamics, and any underlying assumptions, explicit. In this paper, we describe an analytical tool that can be used to aid stakeholder groups in not only exploring the effects of certain courses of action but also in determining the strategic points of intervention in a complex network. Recent developments in network controllability [10] concerning the reworking of the problem of finding minimal control configurations allow the use of the polynomial time HopcroftKarp algorithm [3] instead of exponential time solutions. Drawing upon [10], we adapt the algorithm to S. Moschoyiannis, N. Elia, A. S. Penn, D. J.B. Lloyd & C. Knight 41 i) work with a directed graph rather than a bipartite graph, and ii) produce all minimal control configurations rather than merely find one, and iii) determine the factors in each such configuration rather than only calculate the size (cf Section 3). This underpins the analytical tool we have been developing for cooperative and strategic reasoning in complex systems (cf Section 4). The so-called CCTool, for Complex Control Tool, runs inside the browser and can be accessed at http://cctool.herokuapp.com. The remainder of this paper is structured as follows. Section 2 describes the use of FCM in a participatory modelling setting. Section 3 outlines the application of structural controllability to networks. The combination of FCM and network controllability for strategic intervention is illustrated by means of our analytical tool in Section 4. Section 5 concludes the paper and outlines possible extensions of this work. 2 Participatory modelling for adversarial and cooperative decision-making Fuzzy Cognitive Mapping (FCM) [6] is widely used for problem-solving in situations where numerous interdependencies are thought to exist between the important components of a system, but quantitative, empirically-tested information about the forms of these interdependencies is unavailable [19], [21]. The method aims to encapsulate the qualitative knowledge of expert participants or system stakeholders in order to rapidly construct a simple systems-dynamics model of a specified issue. It is particularly useful when decisions of stakeholders play an important role in determining the outcome of a system’s development and in situations where stakeholder participation is desirable or even required [14]. The process of model construction consists of several stages: First, stakeholders generate and select key concepts/factors that are important influences on, or parts of, the system of interest. Factors can be from any domain (social, economic, physical, etc.) and may be qualitative or quantifiable. Second, causal influences between factors (’positive’ (+) or ’negative’ (-) links, depending on whether an increase in one factor causes an increase or decrease in the other) are discussed and decided on. Finally, participants rank and verbally describe the strengths of these influences between factors, ultimately producing a directed graph with weighted links, which we refer to as the cognitive map or FCM. As mentioned in the introduction, we are part of a team studying the Humber region in the UK. We held a one-day participatory workshop with stakeholder groups (13 participants representing industry, local authorities, and NGOs) who collaboratively produced a single cognitive map, shown in Figure 1. A verification and scenario generation session was held 3 months later at a local environmental managers’ meeting. The participant group had similar composition with a few newcomers. Participants produced distinct, alternative structures for the cognitive map for two scenarios, namely local and nonlocal feedstock production. The full details of the workshop methodology are found in [16] while the map output including transient dynamics (under both linear and sigmoidal mappings) are detailed in [15]. The FCM shown in Fig. 1 is a representation of the non-local feedstock supply scenario for the Humber region bio-based economy. In this scenario feedstock is imported via the local port rather than grown locally, meaning that there is no direct competition for land between feedstock production and industrial development. Availability of land is constrained by Habitat Regulations however. Factors shown in a rectangle with a green outline were added to the original FCM as a result of the verification exercise. International Instability (vs. UK stability), Flood Risk, and Habitat Regulations were identified as key external drivers of the Humber ecosystem. A driver is understood as a factor/node with outgoing links only. The thickness of links in Figure 1 denotes the strength of the influence (as done in [15]). The conversion of the FCM to an iterative map was done using two standard methodologies, creating a linear FCM and a sigmoidal FCM. With parameters chosen appropriately, as described in [5], each of 42 A tool for exploring strategic intervention points Weak Ecological Sustainability - - - Strong - Infrastructure Flood Risk - + Land Availability -Development - - Policy - Habitat Regulations Policy - Positive + International Instability + + + Feedstock + + + + + - + Existing Industries By-products + Competitiveness + Fossil Fuel Price + Funding + + Jobs BBE Energy + + Community Acceptance - + + + Land Availability -Feedstock Medium + + + Technology + Knowledge + Figure 1: FCM for the Humber region ecosystem - non-local feedstock production scenario these iterative maps had a unique ordering of the factors at fixed points. In [15] these orderings were used as a measure of importance via a form of sensitivity analysis. We compared the two orderings and if a factor was near the top of both rankings we said that that factor was one of the most important to the development of a bio-based energy economy in the Humber region. Similarly if a factor was near the bottom of both rankings then we described it as one of the factors of least importance (among the stakeholders’ key concepts). This analysis revealed five factors consistently near the top of the rankings; Bio-based energy production (BBE Energy), By-products, Feedstock availability, Competitiveness and Jobs. It also revealed three factors as being of least importance; Land availability - development, Existing symbiotic industries and Ecological sustainability. Simple dynamical models of fuzzy cognitive maps are commonly produced by transforming the weighted directed graph produced by stakeholders into an iterated map with the graph structure represented as an adjacency matrix and used to update a vector of arbitrary factor ”values” xn+1 = f (Axn ) where x0 is given, A is the weighted connectivity matrix, f is the thresholding function or functional mapping (which may take a variety of forms), and n is the discrete time step. The state vector xn contains real values for all the key factors identified by participants. The outputs of such models are often used to ”sense check” the graph structure, with the output used to rank factors in terms of relative importance. Despite the utility of dynamical models in aiding discussion, we found that different functional mappings gave inconsistent results when applied to the same map structure: often having more impact on model output than changes in the map itself (see [15], [5]). We thus decided to analyse our maps using graph theoretical methods. This means our analysis relies only on the structural information provided by stakeholders and avoids the introduction of artifactual dynamics. Graph theory or network analysis has proved to be a useful tool in understanding whether specific network structures are vulnerable to failure and which particular nodes in a given network exert S. Moschoyiannis, N. Elia, A. S. Penn, D. J.B. Lloyd & C. Knight 43 a strong influence on its processes, e.g., [12]. A network analytic approach (cf Section 3) can be usefully applied to the causal inter-relations between factors produced in an FCM process as long as care is taken in the interpretation of results. Further, we note that the approach to FCM described here differs to other approaches that use FCMs in non-participatory contexts (e.g., see [9]). The latter rely on exact functions used in the FCM process and seek to incrementally drive the system to a specific desired outcome. In a subjective setting however, where participating entities may represent physical, social, economic concepts (factors), it is impossible to represent the system in the level of accuracy that would be needed. Further, specifying exactly how a given factor should be controlled can be problematic in some cases (e.g., fossil fuel price). We argue, however, that it is another matter to determine which concepts should be controlled, i.e., what are the key points in the cognitive map where intervention can be strategic and most effective. The participatory methodology blended with FCM, as proposed here, enables the engagement of particular groups of stakeholders in determining which set of factors is the ’easiest’ for them to influence in order to steer the complex system. This drives the investigation in the direction of control theory as applied to network analytics. 3 Network controllability: control configurations of minimum size Control theory [20] largely advocates the ability to guide a system’s behaviour towards a desired state, through a suitable choice of inputs. Previous work on applying control theory to communication networks suggests that for most networks there exist various subsets of nodes (or factors, in our case) that can be used to control the whole network, in what is often referred to as control configurations. Trying to steer or control every possible node in a network is often infeasible and therefore it is useful to characterise these control configurations in a given network. A network will typically have more than one control configuration and these will be of different sizes, i.e., containing a different number of nodes. Thus it seems appropriate to focus on minimal control configurations, i.e., those containing the least number of nodes. The minimal control node optimisation problem can be posed as an integer programming problem. We adopt the control notation from [10], and assume the dynamics on the network can be linearised to yield the linear control problem dx(t) = Ax(t) + Bu(t), (1) dt where x(t) = (x1 (t), x2 (t), . . . , xN (t))T is the vector of the state of the N nodes of the network at time t, A is the N × N weighted transposed adjacency matrix (where ai j is equal to the strength of the link (easy = 0.2, medium = 0.5, strong = 0.7) and zero otherwise), and u(t) = (u1 (t), u2 (t), . . . , uM (t))T is the M control inputs, and B is the N × M (M ≤ N) input matrix that identifies the nodes that are to be controlled (where the j-th column of B, bi j is equal to ui ). We are interested in structural controllability where it is possible to choose non-zero weights of A and B such that the controllability matrix C = (B, AB, A2 B, . . . , AN−1 B), (2) has full rank. We write this as rank(struct(C)) = N. We may now define the minimal control node optimisation problem as the integer programming problem min (M), struct(B) subject to rank(struct(C)) = N, (3) 44 A tool for exploring strategic intervention points where we wish to find the minimal number of control inputs required, over the structure of the set of input matrices B (defined as struct(B)), subject to the system (1) being structurally controllable. Liu et al in [10] investigate how the topology of a complex network affects its controllability. They show that there is a one-to-one mapping between control configurations of minimum size in a network and the maximum matching of the network. A maximum matching in a network refers to the maximum set of links that do not share start or end nodes. A node is said to be matched if a link in the maximum matching points at it. The importance of this development lies with turning a hard structural controllability problem to an equivalent geometrical problem on the network. A network is fully controlled iff i) all unmatched nodes can be directly controlled2 , and ii) there are directed paths from the inputs provided to all matched nodes [23]. Finding a maximum matching is a colouring problem on the network where the objective is to colour the maximum number of links across the network while respecting the constraint that there can be a maximum of one coloured link entering and a maximum of one coloured link leaving each node. Liu et al [10] showed that for a maximum matching the set of nodes which do not have a coloured link entering them form a control configuration of minimum size. There may be more than one such minimal control configurations. This reworking of the problem of finding a minimal control configuration allows to apply the well known Hopcroft-Karp algorithm [3], which is a polynomial time algorithm instead of exponential time. Note that for sparse graphs (which one typically gets from FCMs) the HopcroftKarp algorithm has the best worst case complexity among other standard solutions. We exploit these developments in the algorithm applied to FCM maps of complex networks given as input to our analytical tool, discussed in the sequel. We have seen that Liu et al. in [10] showed that for a maximal matching the set of nodes (factors) which do not have a coloured edge entering them form a minimal control configuration. This reworking of the problem of finding a minimal control configuration as a colouring exercise on the network allowed the application of the well known polynomial time Hopcroft-Karp algorithm [3] in place of existing exponential time algorithms. The Hopcroft-Karp algorithm finds the size of the maximum matching in a given network and it does so by finding one such matching. According to the developments in [10], this gives the size of the minimal control configurations of the network. However, for our purpose of identifying ’levers’ which can be used to exert strategic influence on the network towards a specific state, we need to examine all possible control configurations rather than one (which is sufficient for the purposes of [10] as it is adequate to give the size of a control configuration). In addition, and given the challenges of controlling a factor in practice as discussed in Section 2, we also want to know which nodes belong to each control configuration, although in the current work presented here we might have to make some concessions in this respect. The different combinations of factors to control comprise the potential alternative ways of steering the system towards a specific outcome. Finding all possible control configurations of minimum size is likely to be an NP-complete problem in the worst case scenario and hence the approach may not be applicable to larger networks. However, the work in [22] suggests otherwise as in its study of upland peat management it has considered networks comprising more than 200 nodes. FCMs tend to be sparse rather than dense networks. In any case, for larger networks we settle for getting an idea of how influential a factor or node is. This is given by how many control configurations each node appears in. In fact, finding that a node is in all configurations or none can be done in polynomial time. This is the first stage in the algorithm we have implemented 2 By ’directly controlled’ we mean that each unmatched node is controlled by an independent time-varying input vector external to the network as defined previously. In practice, this refers to control exercised by some factor external to the system, e.g., stakeholder groups such as regional policy makers, industry actors, NGOs. S. Moschoyiannis, N. Elia, A. S. Penn, D. J.B. Lloyd & C. Knight 45 for finding all possible control configurations of minimum size. The algorithm is outlined below, more details can be found in [4]. 1. Split graph into its connected components and treat each of these graphs separately, then combine the control configurations for the separate graphs in all possible combinations. 2. Run Hopcroft-Karp algorithm on graph of size N to find the size of a maximum matching (Gm ) 3. If Gm = 0 then there are N control configurations, each consisting of one node. Return. 4. Find every node which is never in a control configuration: • For every node i: – Create a subgraph S by removing all incoming edges to node i in G. – Run Hopcroft-Karp algorithm on S to find the size of a maximum matching (Sm ). – If Sm 6= Gm then i is never in a control configuration; otherwise, i is in some control configuration. • Return all nodes which are never in a control configuration NN . 5. Find every node which is in all control configurations: • For every node i ∈ NN . For every node j which has an edge pointing to i (in G): – Create a subgraph S by removing all outgoing edges from node j and all incoming edges to node i in G. – Run Hopcroft-Karp algorithm on S to find the size of a maximum matching (Sm ). – If Sm = Gm − 1 then i is not in all control configurations. • Return all nodes which are in all control configurations NA . (Those where Sm 6= Gm − 1 for all j in the above.) 6. For every choice of Gm − |NA |(CN ) nodes from the nodes of G − (NA ∪ NN ): • Create a subgraph S by removing all edges which point towards the nodes in CN in G. • Run Hopcroft-Karp algorithm on S to find the size of a maximum matching (Sm ). • If Sm = Gm , then CN ∪ NA is a control configuration of minimum size. 7. Return list of all control configurations of minimum size.  The Hopcroft-Karp algorithm is designed to run on bipartite graphs [3]. The network representation of the FCM for the complex system of the Humber region is a directed graph. To run the algorithm on this type of graph, we draw on [10] and make two copies of each node, one in the ’top’ layer of the bipartite graph and one in the ’bottom’ layer. Edges from the directed graph are then added with the outgoing node in the ’top’ layer of the bipartite graph and the incoming node at the ’bottom’ layer. The worst case complexity of the Hopcroft-Karp algorithm is N 5/2 for dense graphs. The subsequent search of all the branches / matches is 2N . Hence, the complexity of the algorithm is 2N N 5/2 to find the minimal control configurations. However, if the graph is too large3 it quickly becomes too expensive to calculate the all possible control configurations. For this reason, the algorithm given above can be stopped before Step 6, in which case the complexity is N 9/2 . This truncated polynomial time algorithm can be used to classify which nodes are in i) all, ii) none, or iii) some control configuration(s). Next, we describe how this computational technique has been coded up as the engine behind our analytical tool for complex systems and how this can used by stakeholders to design effective interventions. 3A network whose control configurations would take more than one minute to compute on a standard personal computer is understood as a ’large’ network here. The different networks we have trialled it with in the Humber region take less than one second to compute. This amount of time allows the tool to be used effectively and seamlessly within a one-day participatory workshop to construct the input FCM. 46 4 A tool for exploring strategic intervention points Using CCTool to identify points for strategic intervention The main functionality of the tool is to take the FCM output of a participatory modelling workshop as its input, analyse the causal structure of the corresponding graph representation, and then generate and display all minimal control configurations to facilitate deliberations on the most effective courses of action. The Complex Control tool, CCTool4 , we have been developing is available as a web service for stakeholders, national and regional policy-makers, and researchers to use in cooperative decision-making in the process of steering complex systems. It is therefore important that the tool is i) easy-to-use with a professional ’look and feel’, and ii) widely available from anywhere without the need for installation files on personal devices. To achieve these objectives we have implemented CCTool as a responsive web tool. The prototype version demonstrated in this paper is built in Python using Django, a Python web framework for rapid development. The web presence is built using latest web technologies (HTML5, CSS3, JavaScript) which gives a fresh look and feel. To further enhance the user experience, we used the JSNetworkX (http://jsnetworkx.org) library which is based on the Python graph library NetworkX. This is largely responsible for the construction of the complex networks. In order to also provide a Web browsable API, we used the Django-Rest-Framework (http://www.djangoproject.com). The key aspects of the architecture of the tool as shown in Figure 2. Figure 2: Architectural view of the CCTool at http://cctool.herokuapp.com The tool supports all latest versions of modern web browsers and is accessible by any device which can run a browser (responsive design using the Bootstrap framework (http://getbootstrap.com)). We now demonstrate how our analytical tool supports the exploration of the most effective points for intervention in a complex network. Figure 3 shows the graph representation of the FCM for the Humber region we saw in Figure 1 (from Section 2). Such a graph can be added using the ’+’ icon at the bottom right of the CCTool window. . The colouring on the nodes follows the traffic light scheme in denoting the controllability of the corresponding factor - green for easy, orange for medium, and red for hard to control. This can be set during the workshop using the menu on the right pane as shown in Figure 3. A similar scheme is applied to the links between nodes, with green denoting positive, red denoting negative and grey for neutral. The thickness of the link denotes the strength of the influence (weak, medium, strong). The drop down menu at the top right of the graph pane lists the actions available to the user (analyse, edit, duplicate, etc.). 4 Available at http://cctool.herokuapp.com, please use username: CASSTING16 and password: demo S. Moschoyiannis, N. Elia, A. S. Penn, D. J.B. Lloyd & C. Knight 47 Figure 3: The FCM represented as a directed weighted graph in the ComplexControl tool A control configuration for the graph of Figure 3, corresponding to the non-local feedstock supply scenario for the Humber region in our case study is generated by applying the technique described in Section 3. The result is shown in Figure 4. Nodes drawn in grey colour belong to the minimal control configuration shown here. The colour of the outline here denotes the ease of controllability of the corresponding node (green - easy, orange - medium, red - hard). Figure 4: A control configuration for the graph of Fig. 3 Hence, the factors Policy - Habitat Regulations, International Instability, Infrastructure, Flood Risk, Land availability - feedstock, and Knowledge have been identified as control nodes within this complex network of factors at play in the industrial ecosystem of the Humber region. Note that the size of a node in Figure 4 denotes how frequently that node appears in a control configuration, e.g., Flood risk here appears in more control configurations than Land availability - feedstock. 48 A tool for exploring strategic intervention points It is also worth pointing out that there are more control configurations as indicated by the numbers 1-6) appearing in the blue ribbon above the control configuration in Fig. 4. In fact, the Humber region complex system (for the non-local feedstock scenario, shown in Figure 3) has six distinct minimal control configurations. The controllability of each control factor (grey node) is used in our tool to produce a total score for each configuration. Compiling the results of the stakeholders’ estimation of controllability, we ranked the control configurations (1-6) based on ’ease of control’. Due to space limitations, we only include the most controllable configuration here, as produced by the tool, shown in Figure 4. The ease of controllability (weak, medium, strong) assigned to any particular factor will inevitably vary between stakeholder groups as different types of actors can exert different types and extents of influence. In our particular case study of the Humber region (Section 2), it is instructive to consider the difference in controllability scores assigned by different groups of stakeholders, namely industrialists and local authorities, as shown in Figure 5. Figure 5: Stakeholders’ differing opinions on the controllability of certain factors If rather than using average controllability scores we examine the differences between different actors’ perspectives we can gain useful information on for example, potential collaborators who might need to be brought on-board for a control strategy to be effective. Highlighting such differences between actors in a workshop context also serves as a means to increase understanding between different groups of their diverse perspectives and possibilities for action. The effect on the corresponding graphs is shown in Figure 6. Views diverged on a number of factors, including some potential control nodes, meaning that the controllability ranking of control configurations would differ according to different stakeholder perspectives. Figure 7 shows the control configurations of the respective graphs in Figure 6. As By-products and Infrastructure are both labelled as hard to control by local authorities, analysing the graph from this perspective suggests that all the most controllable configurations contain only one easy to control factor, Knowledge, and one with medium controllability, Flood risk. All other possible control nodes, Fossil fuel price, International instability, Habitat regulations and Infrastructure are considered as hard to control. This could evidently leave these stakeholders feeling that they have few options. From the Industry stakeholders’ perspective on the other hand, By-products are considered easy and Infrastructure medium to control and these two factors form the backbone of their optimal control configurations. Combining, or even communicating, the two approaches, with local authorities influence over Flood risk and Knowledge, and Industry’s perspective on Land availability and By-product manipulation leads to a broadening of the feasible options and opportunity for more effective intervention. The CCTool can also be used to compare different possible system scenarios represented as different graph structures. For example, in our participatory modelling workshops stakeholders produced the original graph in which feedstock for the Humber bio-based economy was assumed to be imported via the local ports. However, additional alternative scenarios were generated in follow-up workshops and discussion, including a locally-produced feedstock scenario. In this possible situation (shown in Figure 8), Land availability for feedstock is subject to the same local influences as Land availability for S. Moschoyiannis, N. Elia, A. S. Penn, D. J.B. Lloyd & C. Knight 49 Figure 6: Comparing the resulting graph structures; Local authority (left), Industry (right) development, that is, Habitat regulations and Flood risk. There also exists a negative interaction between Land availabilities for feedstock and development, as we assume that a finite amount of land is available. On calculating the control configurations for these two different scenarios, we can immediately see a large difference. Land availability for feedstock is no longer a possible control node in the second scenario and the minimum control configurations for local feedstock scenario comprise sets of 5 control nodes rather than 6. There are also fewer possible configurations, only 3 rather than 6, meaning that there are fewer possible strategies that could be employed to steer the whole network. The most controllable configuration in the local feedstock scenario contains Knowledge, Infrastructure and Flood risk as well as the hard to control Habitat regulations and International instability. Whereas the most controllable configurations in the imported feedstock scenario contain Land availability for feedstock in addition, with either By-products or Infrastructure as possible local control nodes (the one shown in Figure 8 contains Infrastructure). The reduction in number of options for full and effective control is interestingly accompanied by a need for fewer sources of control. Such differences can be used as a basis for discussion on the advantages and disadvantages of different scenarios from the perspective of system intervention. 5 Concluding remarks and future work The representation of sets of interactions or relationships between interacting entities as a network or graph has become widespread in numerous fields [1, 17]. Network analysis has proved to be a useful tool in understanding whether specific network structures are vulnerable to failure and which particular nodes in a given network exert a strong influence on its processes [18]. In this paper we have shown how a network analytic approach can be applied to the causal interrelations between factors produced in an FCM process as long as care is taken in the interpretation of results. For example, the findings in [10] suggest that driver factors in complex networks tend to avoid hubs. 50 A tool for exploring strategic intervention points Figure 7: Comparing the resulting control configurations; Local authority (left), Industry (right) Preliminary analysis on the structure of the weighted, directed graphs suggests that the method for finding all possible minimal control configurations is sensitive to certain patterns in the graph such as self-loops or dilations - the latter are also discussed in [11]. One way to identify such cases in an automated manner is to check whether the controllability matrix has a full rank. A non-full rank implies that minimal control configurations break down to smaller ones; effectively, different parts of the network (stems) spring out of each control node. It would appear that determining such stems is still useful as indication of what part of the network can be controlled from each node. This is a direction that deserves further investigation. Currently, our analytical tool produces the minimal control configurations for graphs without such features, each suggesting a way in which the system can be steered to exhibit some form of desired behaviour. We have based the analysis of the input FCM on its causal structure rather than functional mappings and combined this approach with results from network controllability. We have implemented this analytical technique in a web tool that can automatically identify subsets of nodes that can be used as levers to steer the whole system. The idea is that the information produced by our tool can be used imminently by stakeholders, during the participatory workshop, in deciding which course of action to take, e.g., based on how easy the factors in question are to influence or, more generally, how effective an intervention might be. The ranking between different minimal configurations is done in the current version of CCTool by considering the characterisation of the factors in terms of ease of control (easy, medium, hard). In some settings the interest might be in whether the system is vulnerable to external shocks, in which case we would be asking the expert participants to characterise or rank the factors based on how susceptible they are to shock effects. In other settings the interest might be in the (speed of) spread of a disease, so factors might be ranked by experts in terms of how likely they are to transmit to other factors in the network. The weights are currently only used in the analysis of teh FCM but not in determining the associated minimum control configurations, i.e., we work with a directed, not a weighted graph. There is leverage in incorporating different, perhaps more sophisticated, and customised mechanisms to accommodate other S. Moschoyiannis, N. Elia, A. S. Penn, D. J.B. Lloyd & C. Knight 51 Figure 8: Directed graphs for the FCM of the 2 scenarios: non-local (left) and local feedstock (right). criteria for factors laid out by stakeholders in different problem domains. One limitation of the proposed approach is that it is not applicable when the factors have internal dynamics, i.e., when the nodes in the graph have self-loops. Preliminary analysis indicates that this is a challenging direction for future investigation. Another limitation has to with the sensitivity of the output to changes in the causal structure of the FCM. It would be interesting to investigate the effect of taking a node out of the network, by deleting the corresponding link. This would impact on the rankings and could possibly alter the control structure of the system. The extent of the effect, possibly in relation to the characteristics of the removed node, as well as the interplay with certain characteristics of the network (connectivity, sparsity, degree distribution) pose some challenging questions in future extensions of this work and versions of our analytical tool. Another limitation perhaps is that our approach will identify the most influential points for steering the system to a desired state, but it will not prescribe how to control or influence a factor. Although International Instability was indeed seen as impossible to control in the Humber case study, the other two drivers, Habitat Regulations and Flood Risk, were revealed to be somewhat controllable. In fact, the reasoning on imperfect information afforded by our computational tool in this instance revealed that the Flood Risk driver could be indirectly controlled via Land management or Infrastructure factors. The aim of this analytical work is to provide a thinking tool for stakeholders in a given system so they can start to explore possibilities for effective management or policy interventions. The outputs of this control analysis on stakeholders’ cognitive maps of their own systems can be used as the beginning of an intervention design process, involving further fact-finding and possibly empirical research and more detailed modelling. The control configurations provide a focus for such research. Although this work is at preliminary stages there are numerous ways in which stakeholders can use control information and the map construction functionality of CCTool to gain insight into their system. 52 A tool for exploring strategic intervention points References [1] S.P. Borgatti, A. Mehra, D.J. Brass & G. Labianca (2009): Network Analysis in the Social Sciences. Science 323, pp. 892–5, doi:10.1126/science.1165821. [2] Nicholas M. Gotts (2007): Resilience, Panarchy, and World-Systems Analysis. Ecology and Society 12(1). [3] J. E. Hopcroft & R. M. Karp (1973): An n5/2 algorithm for maximum matchings in bipartite graphs. SIAM J. Comput. 2, pp. 225–231, doi:10.1137/0202019. [4] C. Knight (2013): Extending an FCM Using Control Nodes. Technical Report, University of Surrey. [5] C. Knight, D.J.B. Lloyd & A. Penn (2014): Linear and Sigmoidal fuzzy cognitive maps: An analysis of fixed points. Applied Soft Computing 15, pp. 193–202, doi:10.1016/j.asoc.2013.10.030. [6] B. Kosko (1986): Fuzzy Cognitive Maps. doi:10.1016/S0020-7373(86)80040-2. Int’l Journal of Man-Machine Studies 24, pp. 65–75, [7] P.J. Krause, A. Razavi, S. Moschoyiannis & A. Marinos (2009): Stability and Complexity in Digital Ecosystems. In: IEEE DEST 2009, pp. 85–90, doi:10.1109/DEST.2009.5276757. [8] C-T. Lin (1974): Structural Controllability. doi:10.1109/TAC.1974.1100557. IEEE Trans. Autom. Contr. 19, pp. 201–208, [9] C.M Lin (2008): Using Fuzzy Cognitive Map for System Control. WSEAS Transactions on Systems 12(7), pp. 1504–1505. [10] Y-Y. Liu, J-J. Slotine & A-L Barabasi (2011): Controllability of Complex Networks. Nature 473, pp. 167–173, doi:10.1038/nature10011. [11] Y-Y. Liu, J-J. Slotine & A-L Barabasi (2011): Controllability of Complex Networks. Supplementary Information. [12] R. M. May, S. A. Levin & G. Sugihara (2008): Complex Systems: Ecology for Bankers. Nature 451, pp. 893–895, doi:10.1038/451893a. [13] E. Mitleton-Kelly (2003): Complex systems and evolutionary perpsectives on organisations: the application of complexity theory to organisations. Elsevier Science Ltd, Oxford, UK. [14] U. Ozesmi & LS Ozesmi (2004): Ecological models based on people’s knowledge: a multi-step fuzzy cognitive mapping approach. Ecological Modelling 15, pp. 43–64, doi:10.1016/j.ecolmodel.2003.10.027. [15] A. Penn, C. Knight, D.J. Lloyd, D. Avitabile, K. Kok, F. Schiller, A. Woodward, A. Druckman & L. Basson (2013): Participatory Development and Analysis of a Fuzzy Cognitive Map of the Establishment of a BioBased Economy in the Humber Region. PLOS ONE, doi:10.1371/journal.pone.0078319.t001. [16] A. Penn et al. (2016): Extending Participatory Fuzzy Cognitive Mapping with a Control Nodes Methodology: A Case Study of the Development of a Bio-based Economy in the Humber Region, UK. In S. Gray, M. Paolisso & R. Jordan, editors: Environmental Modeling with Stakeholders, Springer. [17] S.R. Proulx, D.E.L. Promislkow & P.C. Philips (2005): Network Thinking in Ecology and Evolution. Trends in Ecology and Evolution 20, pp. 345–353, doi:10.1016/j.tree.2005.04.004. [18] A. Razavi, S. Moschoyiannis & P.J. Krause (2009): An Open Digital Environment to support Business Ecosystems. Peer-to-Peer Networking and Applications 2(4), pp. 367–397, doi:10.1007/s12083-009-0039-5. [19] M. Schneider, E. Shnaider, A. Kandel & G. Chew (1998): Automatic construction of FCMs. Fuzzy Sets and Systems 93, pp. 161–172, doi:10.1016/S0165-0114(96)00218-7. [20] J-J. Slotine & W. Li (1991): Applied Nonlinar Control. Prentice Hall. [21] LS Soler, K. Kok, G Camara & A. Veldkamp (2012): Using fuzzy cognitive maps to describe current system dunamics and develop land cover scenarios: a case study in the Brazilian Amazon. Journal of Land Use Science 7, pp. 149–175, doi:10.1080/1747423X.2010.542495. [22] Dylan Young (2015): Carbon, Communities and Contestation. Ph.D. thesis, University of Leeds. [23] W. Yu, G. Chen, M. Cao & J. Kurths (2010): Second-order consensus for multiagent systems with directed topologies and nonlinear dynamics. IEEE Trans. Syst. Man Cybern. B 40, pp. 881–891, doi:10.1109/TSMCB.2009.2031624.
3cs.SY
arXiv:1404.6218v3 [cs.DC] 6 Oct 2014 A Parallel Task-based Approach to Linear Algebra Ashkan Tousimojarad Wim Vanderbauwhede School of Computing Science University of Glasgow Email: [email protected] School of Computing Science University of Glasgow Email: [email protected] Abstract—Processors with large numbers of cores are becoming commonplace. In order to take advantage of the available resources in these systems, the programming paradigm has to move towards increased parallelism. However, increasing the level of concurrency in the program does not necessarily lead to better performance. Parallel programming models have to provide flexible ways of defining parallel tasks and at the same time, efficiently managing the created tasks. OpenMP is a widely accepted programming model for shared-memory architectures. In this paper we highlight some of the drawbacks in the OpenMP tasking approach, and propose an alternative model based on the Glasgow Parallel Reduction Machine (GPRM) programming framework. As the main focus of this study, we deploy our model to solve a fundamental linear algebra problem, LU factorisation of sparse matrices. We have used the SparseLU benchmark from the BOTS benchmark suite, and compared the results obtained from our model to those of the OpenMP tasking approach. The TILEPro64 system has been used to run the experiments. The results are very promising, not only because of the performance improvement for this particular problem, but also because they verify the task management efficiency, stability, and flexibility of our model, which can be applied to solve problems in future many-core systems. I. I NTRODUCTION Task-based parallel programming models are evolving rapidly. With the emerge of many-core processors, they can compete with data-parallel approaches, while offering more flexibility, because of their MIMD nature. A task is any form of computation that can be run in parallel with other tasks, if their data dependencies allow. Most of these programming models provide the programmer with some keywords to express parallelism in an imperative language such as C/C++. Pure functional programming languages on the other hand provide native parallelism, but compared to mainstream languages such as C++ and Java, none of them have found widespread adoption. Even if a many-core programming language would find wide adoption, it would in the short term obviously be impossible to rewrite the vast amount of single-core legacy code libraries, nor would it be productive. Our mission is therefore to propose a programming model that can be integrated into existing codes in imperative languages, while offering native parallelism, similar to functional languages. Before going into the details of our approach, the Glasgow Parallel Reduction Machine (GPRM), we would like to briefly review some of the available models in the market, namely Clojure, Chapel, Intel Cilk Plus, Intel Threading Building Blocks (TBB), and OpenMP. Parallel programming is not as simple as sequential programming. In addition to what to compute, the programmer should specify how to coordinate the computation. Clojure [1] –also called a modern Lisp– is a functional programming language that targets the Java Virtual Machine (JVM). Clojure’s syntax is based on S-expressions, i.e. lists where the first element represents the operation and the other elements the operands. GPRM uses a similar approach for the internal representation of its communication code. OpenCL [2] is an industrial standard for heterogeneous architectures. It basically defines a set of core functionality that is supported by all devices, and allow vendors to expose more programming interfaces as well as hardware features. It is however not as easy to use as the following models for shared memory architectures. Intel Cilk Plus which is based on the Cilk++ [3] is an extension to C/C++ to provide both task and data parallelism. Is has become popular because of its simplicity. It has _Cilk_spawn and _Cilk_sync keywords to spawn and synchronise the tasks. _Cilk_for loop is a parallel replacement for sequential loops in C/C++. Intel Cilk Plus starts a pool of threads in the beginning of the program which is analogous to the GPRM thread pool. Intel Threading Building Blocks (TBB) is another wellknown approach for expressing task-based parallelism [4]. Intel TBB is an object-oriented C++ runtime library that contains data structures and algorithms to be used in parallel programs. It abstracts the low-level threading details, which is similar to the GPRM design consideration. However, the tasking comes along with an overhead. Conversion of the legacy code to TBB requires restructuring certain parts of the program to fit the TBB templates. One of the advantages of TBB over OpenMP and Cilk Plus is that it does not require specific compiler support. OpenMP can be called the most widely used programming standard in the shared-memory architectures. Since the release of OpenMP 3.0 [5], irregular parallelism can be expressed by means of the OpenMP tasks. Moreover, OpenMP works very well with predictable data parallel situations compared to Cilk Plus and TBB. This makes it a challenging competitor for new programming models such as GPRM. We have compared the performance of GPRM with that of OpenMP in 2 different scenarios: first a micro-benchmark which has structured parallelism, and second, a linear algebra problem which fits very well into less structured task-based parallelism. It has been studied in [6]–[9] that OpenMP performs poorly for fine-grained tasks. It indicates that the programmer is responsible to figure out how a problem with specific input parameters would fit on a particular platform. As a common solution, programmers use a cutoff value when creating OpenMP tasks to avoid composing fine-grained tasks. Firstly, finding a proper cutoff value is not straightforward, and sometimes needs a comprehensive analysis of the program. It often depends on the application structure and the input data set [10]. Secondly, only in some special cases, such as recursion, the cutoff value can be controlled by the user code. Leaving the decision to the runtime system has been proposed as an alternative. The idea is to aggregate tasks by not creating some of the user specified tasks and instead executing them serially. Adaptive Task Cutoff (ATC) [6] implemented in the Nanos runtime system –a research OpenMP runtime system– is a scheme to modify the cutoff dynamically based on profiling data collected early in the program’s execution. This, however, cannot be done without any overhead at all, plus the scheme needs to be extended to find all interesting situations for cutoff. Instead, in GPRM there is a technique to specify which task would initially run on which thread. This reduces the overhead of tasks considerably. Moreover, there are some worksharing constructs that can be used along with tasks to avoid generating too many fine-grained tasks. The trade-off between task granularity and the number of tasks in OpenMP is covered in [8]. The authors suggest that tasks should have sufficient granularity and the granularity should be increased as the number of consumer threads increases. This is to ensure that all threads are kept busy doing some useful work. They have also explored that the number of tasks has an effect on the load balance, which means programmers have to trade-off between the number of tasks and granularity in order to get a fair load balance, hence a good performance. For the purposes of this paper, we will show how OpenMP fails to operate normally for fine-grained tasks, while the proposed model copes with such situations naturally (See Section V). Furthermore, we will introduce a hybrid worksharingtasking approach to avoid creating too many tasks (See Section Section VI). In other words, a hybrid methodology for exploiting both task and data parallelism will be employed to solve an LU Factorisation problem on a homogeneous many-core processor . Lower-Upper factorisation over sparse matrices is a fundamental linear algebra problem. Due to the sparseness of the matrix, conventional worksharing solutions are not enough, since a lot of load imbalance exists. As a well-known testcase, we have used the SparseLU benchmark from the the Barcelona OpenMP Tasks Suite (BOTS) [11]. In this problem, the matrix is organised in blocks that may not be allocated. More information along with the source code is openly available. II. GPRM The Glasgow Parallel Reduction Machine (GPRM) [9] provides a task-based approach to many-core programming. The programmer structures programs into task code, written as C++ classes, and communication code, written in a restricted subset of C++. A task is a list of bytecodes representing an S-expression, e.g. (S1 (S2 10) 20) represents a task S1 taking two arguments, the first argument is the task S2 which takes as argument the numeric constant 10, and the second argument is the numeric constant 20. GPRM executes the corresponding list of bytecodes with concurrent evaluation of function arguments. For more details on the compilation of the S-expressions and the bytecode see [9]. In our parlance, a task node consists of a task kernel and a task manager. A task kernel is typically a complex, self-contained entity offering a specific functionality to the system, which on its own is not aware of the rest of the system. The task kernel has run-to-completion semantics. The corresponding task manager provides an interface to the kernel. The computational task kernels are written as C++ classes. This means that the end user simply creates classes in the GPRM::Kernel namespace. Conceptually, GPRM consists of a set of tiles connected over a network. Each tile consists of a task node and a FIFO queue for incoming packets. Every tile runs in its own thread and blocks on the FIFO. The system is event driven, with two possible types of events: arrival of a packet, or the events generated by the task kernel. The latter is either creation of a packet or modification of the local state. The reduction engine, i.e. the task manager evaluates the bytecode via parallel dispatch of packets requesting computations to other tiles. Threads in GPRM are treated as execution resources. Therefore, for each processing core there is a thread with its own task manager. At the beginning, a pool of threads is created before the actual program starts. It has been pointed out in the Introduction that GPRM offers an effective way of combining tasks with worksharing constructs to avoid creating fine-grained tasks. For instance, instead of creating tasks in a loop which is common in the OpenMP tasking approach [5], one can create as many tasks as the concurrency level in GPRM, each of which with their own indices. These indices can be then used by a worksharing construct to specify which elements of the loop belongs to which thread. The concurrency level is defined as the number of jobs that can be theoretically run simultaneously in the system. Normally, when the tasks are fairly equal, the best result can be obtained by choosing the concurrency level as the same as the number of threads, which is itself as the same as the number of cores in GPRM. Although in Section VI tasks are not equal, as a solution one can use the GPRM parallel loops to balance the load amongst threads. This solution, as will be shown, works very well when medium size or large sparse matrices are used. III. PARALLEL L OOPS We have created a number of useful parallel loop constructs for use in GPRM. These worksharing constructs corresponds to the for worksharing construct in OpenMP, in the sense that they are used to distribute different parts of a work among different threads. However, there is a big difference in how they perform the operation. In OpenMP, the user marks a loop as an OpenMP for with a desirable scheduling strategy, and the OpenMP runtime decides which threads should run which part of the loop; in GPRM, multiple instances of the same task –normally as many as the concurrency level– are generated, each with a different index (similar to the global_id in OpenCL). Each of these tasks calls the parallel loop passing in their own index to specify which parts of the work should be performed by their host thread. The par_for construct is used to parallelise a single loop. It distributes the work in a Round-Robin fashion to the threads. A par_nested_for treats a nested loop as a single loop and follows the same pattern to distribute the work. Alternatively, the contiguous method gives every thread an m/n chunk, and the remainder m%n is distributed one-by-one to the foremost threads. These methods are shown in Fig 1. The need to parallelise nested loops arises often, e.g. in situations where there are variable size loops such as the SparseLU benchmark in Section VI. t e m p l a t e <typename T c l a s s , typename Param1> int par nested for ( int start1 , int size1 , int s t a r t 2 , i n t s i z e 2 , i n t i n d , i n t CL , T c l a s s ∗ TC , i n t ( T c l a s s : : ∗ w o r k f u n c t i o n ) ( i n t , i n t , i n t , i n t , i n t , i n t , Param1 ) , Param1 p1 ) { 3 i n t t u r n =0; 4 f o r ( i n t i = s t a r t 1 ; i < s i z e 1 ; i ++) { 5 for ( int j = s t a r t 2 ; j < size2 ; ) { 6 i f ( ( t u r n >= 0 ) && ( t u r n % CL == i n d ) ) { 7 ( TC−>∗w o r k f u n c t i o n ) ( i , j , s t a r t 1 , s i z e 1 , s t a r t 2 , s i z e 2 , p1 ) ; 8 j = j + CL ; 9 i f ( j >= s i z e 2 ) t u r n = s i z e 2 − j + i n d ; 10 } 11 else { 12 j ++; 13 t u r n ++; 14 } 15 } 16 } 17 return ; 18 } 1 2 Listing 2: Implementation of the par_nested_for IV. E XPERIMENTAL S ETUP Fig. 1: Partitioning a nested m(3 × 3) or a single m(9) loop amongst n(4) threads. a) Step size of 1, as in the par_for and par_nested_for, b) Contiguous t e m p l a t e <typename T c l a s s , typename Param1> i n t p a r f o r ( i n t s t a r t , i n t s i z e , i n t i n d , i n t CL , T c l a s s ∗ TC , i n t ( T c l a s s : : ∗ w o r k f u n c t i o n ) ( i n t , i n t , i n t , Param1 ) , Param1 p1 ) { 3 / ∗ i n d : I n d e x , CL : C o n c u r r e n c y L e v e l ∗ / 4 i n t t u r n =0; 5 for ( int i = s t a r t ; i < size ; ) { 6 i f ( t u r n % CL == i n d ) { 7 ( TC−>∗w o r k f u n c t i o n ( i , s t a r t , s i z e , p1 ) ; 8 i = i + CL ; 9 } 10 else { 11 i ++; 12 t u r n ++; 13 } 14 } 15 return ; 16 } 1 2 Listing 1: Implementation of the par_for The par_for and par_nested_for loops in GPRM are implemented using C++ templates and member-function pointers. The implementation of these worksharing constructs are given in Listing 1 and 2. They would be our worksharing constructs by default. The Contiguous parallel loops have similar implementations. We denote Contiguous parallel loops as Contiguous GPRM approaches. Another useful worksharing construct is a parallel nested loop. Since the GPRM par_nested_for is implemented with minimum overhead, it is a significantly useful worksharing construct, as we will see in the next sections. The Tilera TILEPro64 Tile Processor is a 32-bit VLIW multicore with 64 tiles, interconnected via multiple 8 × 8 mesh networks. It provides distributed cache-coherent shared memory by default. It has 16GB of DDR memory, but in order to use the global address space shared among all tiles, addressing is limited to 32-bit, i.e. 4GB. It has per-core L1 caches of 8KB, and L2 caches of 64KB. The union of all L2 caches across the chip comprises the distributed L3 cache. The operating frequency of the cores is 866MHz. Out of 64 tiles, one is used for the PCI communication, and the other 63 tiles have been used for our experiments. For our experiments in this study, we have used the tile-g++ compiler provided by MDE 3.0 from the Tilera Corporation, and is based on the GCC version 4.4.3. The compiler flags -O2 and -std=c++0x have been specified. It is worth stating that the TILEPro64 runs Tile Linux which is based on the standard open-source Linux version 2.6.36. V. M ATRIX M ULTIPLICATION M ICRO - BENCHMARK In this section, we use a naive matrix multiplication algorithm with a triple nested loop as a micro-benchmark to evaluate the overhead of the OpenMP approach compared to the model we use to solve matrix problems. The code is given at Listing 3. As our aim is to use this micro-benchmark to identify the most important barriers on the way, we change the interpretation of the problem to performing multiple jobs. Suppose that the product of an m × n matrix A and an n × p matrix B is the m × p matrix C. We want to parallelise the first loop of the triple nested loop, which loops on m, therefore m becomes the number of jobs for this problem. The size of each job is identified by the sizes of the next two loops in the triple nested loop, i.e. p ∗ n. We have chosen n = p to make the problem more regular. We end up with matrices with the following specification: A : m × n, B : n × n, and C : m × n. Due to the poor data locality of this algorithm, one should not expect to see a linear speedup. f o r ( i n t i = 0 ; i < m; i ++) { f o r ( i n t j = 0 ; j < p ; j ++) { 3 f o r ( i n t k = 0 ; k <n ; k ++) { 4 C [ i ∗p+ j ] += A[ i ∗n+k ] ∗ B [ k∗p+ j ] ; 5 } 6 } 7 } 1 2 Listing 3: Matrix Multiplication Micro-benchmark Four approaches are selected for the comparison: I) The OpenMP for worksharing construct, II) The OpenMP for with dynamic schedule and chunk size of 1, III) The OpenMP Tasks, and IV) The GPRM par_for construct. Figure 2 shows the performance measurement for different job sizes. GPRM outperforms OpenMP in all cases but especially for the small job case (even then, the job size is still not small enough to show the real overhead of having fine-grained tasks in OpenMP). To our best understanding, the performance difference is due to the overhead of thread scheduling, which is more visible in the small job cases with short execution times. In order to investigate the effect of task granularity on the behaviour of the OpenMP’s performance, we decrease the size of the tasks even more. We also looked at the influence of the cutoff value on the performance. Since the behaviours of the OpenMP worksharing constructs were fairly similar, only the default omp for is used for the next experiment. To improve the behaviour of the tasking approach, we added a cutoff value for the tasks, such that only m/cutoff tasks were created. This is similar to sequencing multiple tasks. Fig 3 compares the speedup of a tuned version of the OpenMP taskbased model with the other alternatives. We believe that the regularity of GPRM in assigning tasks to its threads and the lower overhead of its tasks make it the winner. compared to the sequential implementation if no cutoff is used at all. Figure 4 shows that a good choice of the cutoff value gives the speedup of 38.6× against the case with no cutoff and 7.8× against the sequential version, for the job size of 50 × 50 with 63 threads. The speedup for the job size of 100 × 100 is also improved by 10.8× compared to the case with no cutoff and 8.2× compared to the sequential runtime. VI. S PARSE LU FACTORISATION The SparseLU benchmark from the BOTS suite, which computes an LU factorisation over sparse matrices, is a proper example of matrix operations with load imbalance. In the OpenMP approach, a task is created for each non-empty block. The main SparseLU code from [5] (omitting the details of the OpenMP task-based programming, such as dealing with shared and private variables) is copied in Fig 5. The number of tasks and the granularity of them depends on the number of nonempty blocks and the size of each block, hence a cutoff value cannot be defined inside the user-written OpenMP code. As has also been discussed in [5], using OpenMP tasks results in better performance compared to using the for worksharing construct with dynamic scheduling. Therefore, we use the tasking approach for the comparison. The code for the SparseLU benchmark in GPRM can be found in Listing 5. # i n c l u d e <GPRM/ API . h> u s i n g namespace GPRM : : API ; 3 GPRM : : K e r n e l : : SpLU s p ; 1 2 4 v o i d f w d b d i v t a s k s ( i n t kk , f l o a t ∗∗ A, c o n s t i n t CL ) { 7 #pragma gprm u n r o l l 8 f o r ( i n t n = 1 ; n < ( CL / 2 ) ; n ++) { 9 s p . f w d t ( kk , A, n −1, CL / 2 ) ; / / fwd t a s k 10 s p . b d i v t ( kk , A, n −1, CL / 2 ) ; / / b d i v t a s k 11 } 12 } 5 6 13 v o i d b m o d t a s k s ( i n t kk , f l o a t ∗∗ A, c o n s t i n t CL ) { #pragma gprm u n r o l l 16 f o r ( i n t n = 1 ; n < CL ; n ++) { 17 s p . bmod t ( kk , A, n −1, CL ) ; / / bmod t a s k 18 } 19 } 14 15 f o r ( i n t i = 0 ; i < (m/ c u t o f f ) ; i ++) { #pragma omp t a s k f i r s t p r i v a t e ( i ) 3 f o r ( i n t t = 0 ; t < c u t o f f ; t ++) { 4 f o r ( i n t j = 0 ; j < p ; j ++) { / / p=n 5 f o r ( i n t k = 0 ; k < n ; k ++) { 6 C [ ( i ∗ c u t o f f + t ) ∗p+ j ] += A [ ( i ∗ c u t o f f + t ) ∗n+k ] ∗ B [ k∗p+ j ] ; 7 } 8 } 9 } 10 } 1 2 Listing 4: Matrix Multiplication Micro-benchmark with a cutoff value Figure 3 shows that the poor behaviour of fine-grained tasks can be remedied to a considerable extent by using a proper cutoff value. The OpenMP approaches gradually becomes better when the size of the job is increased. We have chosen the first two cases to show the effect of using a cutoff in more detail, because these cases show degraded performance 20 v o i d GPRM : : Compute LU ( ) { #pragma gprm s e q 23 { / ∗ GPRM e v a l u a t e s i n p a r a l l e l unless otherwise s t a t e d ∗/ 24 f l o a t ∗∗ A = i n i t t a s k ( ) ; 25 f o r ( i n t kk =0 , kk<NB, i ++) { / / NB : # B l o c k s 26 #pragma gprm s e q 27 { 28 l u 0 t a s k ( kk , A) ; 29 f w d b d i v t a s k s ( kk , A, 6 3 ) 30 b m o d t a s k s ( kk , A, 6 3 ) 31 } 32 } 33 } 34 return ; } 21 22 Listing 5: SparseLU code in GPRM, Concurrency Level: 63 Matrix Multiplication with 63 threads OMP for OMP for (dynamic,1) Matrix Multiplication with 63 threads 35 OMP Tasks GPRM parallel-for OMP for OMP for (dynamic,1) Matrix Multiplication with 63 threads 35 OMP Tasks GPRM parallel-for 30 30 25 25 25 20 15 Speedup 30 Speedup Speedup 35 20 15 15 10 10 5 5 5 1000 1500 2000 2500 3000 0 500 3500 Matrix Dimension (m) as the number of jobs 1000 1500 2000 2500 3000 Matrix Dimension (m) as the number of jobs (a) 500 × 500 - Small jobs (b) 1000 × 1000 - Medium jobs 3500 OMP Tasks GPRM parallel-for 20 10 0 500 OMP for OMP for (dynamic,1) 0 500 1000 1500 2000 2500 3000 3500 Matrix Dimension (m) as the number of jobs (c) 1500 × 1500 - Large jobs Fig. 2: Matrix Multiplication: GPRM par_for vs. different OpenMP approaches Matrix Multiplication with 63 threads fine-grained jobs 50 OMP Tasks OMP Tasks, Cut-off 32 OMP for GPRM parallel-for Speedup 40 30 20 10 0 50x50 100x100 150x150 200x200 250x250 300x300 n x n as the size of jobs Fig. 3: Speedup measurement for fine-grained jobs, Number of the jobs: 200,000 The effect of the cut-off value 10 50x50 100x100 Speedup 8 6 4 Fig. 5: Main code of the SprseLU benchmark, without revealing OpenMP programming details [5] 2 0 1 2 4 8 16 32 64 Cut-off value Fig. 4: Speedup improvement by using a cutoff value for the fine-grained OpenMP tasks. Number of the jobs: 200,000. Size of the jobs: 50×50 - 100×100 The unroll pragma results in compile-time evaluation of any control construct in which any of the variable in the argument list occurs. In the example, this means that the for loop will be unrolled. By default, expressions in non-kernel GPRM code are evaluated in parallel. The seq pragma forces sequential evaluation of the block it precedes. It is worth mentioning that we have not changed the initialisation phase of generating sparse matrices in the BOTS benchmark suite. The matrices become sparser as the number of blocks increases. For example, in the case of 50×50 blocks, the matrices are 85% sparse, while for the cases with 100×100 blocks, the matrices become 89% sparse. To obtain a fair distribution of the matrix elements amongst different threads –bearing in mind the sparseness of the matrix– we have used a par_nested_for, because the numbers of iterations are not fixed in this problem. The loops become smaller as kk grows, which means that using a par_for would, after a few iterations when outer iters > concurrency level, lead to starvation of some of the threads. By using a par_nested_for the threads can get some work as long as the outer iters∗inner iters > concurrency level. Therefore, in order to implement the fwd, bdiv, and bmod tasks, one can use the GPRM APIs for the parallel loops, as shown in Listing 6. 13 less than 20×20, there is a significant performance degradation if the number of threads is set to the default value of 63. For example, the execution time becomes 12.25× worse than the best time for the last case. However, it is clear that GPRM reaches its best execution time without the need to tune the number of threads –here, the number of threads and concurrency level are the same for GPRM–. This is again due to the fact that instead of creating very small tasks, GPRM offers an efficient way of distributing the work amongst threads. The speedup diagrams for the SparseLU benchmark have been shown in Fig 7. We increased the concurrency level up to 128 to show how regular our approach is, in the sense that it gets its best performance with the factors of the number of cores. This is not surprising, since the problem has been partitioned amongst threads regularly, and therefore they can exploit the underlying architecture more efficiently. Since the OpenMP tasking model is different from ours, we simply increased the number of threads in that case. 15 TABLE I: Number of threads for the best results 1 2 # i n c l u d e <GPRM/ API . h> u s i n g namespace GPRM : : API ; 3 i n t SpLU : : f w d t ( i n t kk , f l o a t ∗∗ A, i n t i n d , i n t CL ) { r e t u r n p a r f o r ( kk +1 ,NB, i n d , CL , t h i s , 6 &SpLU : : fwd work , A) ; } 4 5 7 i n t SpLU : : b d i v t ( i n t kk , f l o a t ∗∗ A, i n t i n d , i n t CL ) { r e t u r n p a r f o r ( kk +1 ,NB, i n d , CL , t h i s , 10 &SpLU : : bdiv work , A) ; } 8 9 11 i n t SpLU : : bmod t ( i n t kk , f l o a t ∗∗ A, i n t i n d , i n t CL ) { r e t u r n p a r n e s t e d f o r ( kk +1 ,NB, kk +1 ,NB, i n d , CL , 14 t h i s ,&SpLU : : bmod work , A) ; } 12 / ∗ The fwd f u n c t i o n h e r e i s t h e same a s fwd i n t he c i t e d paper ∗/ 17 i n t SpLU : : fwd work ( i n t j j , i n t kk , i n t NB, 18 f l o a t ∗∗ A) { 19 i f (A [ ( kk −1)∗NB+ j j ] ! = NULL) 20 fwd (A [ ( kk −1)∗NB+kk −1] ,A [ ( kk −1)∗NB+ j j ] ) ; 21 return 0; 22 } 16 Number of Blocks 50 100 200 400 500 OpenMP tasks GPRM 64 63 63 63 32 63 16 63 8 63 VII. D ISCUSSIONS Listing 6: Implementation of the member functions of the SparseLU class. Work functions can also be defined similar to the phases in [5] SparseLU Benchmark, NBxBS = 4000 Best Results 120 OMP Tasks GPRM-Default Time(s) 100 80 60 40 20 0 100 200 300 400 500 Number of blocks in each dimension Fig. 6: Execution time of sparse matrices of size 4000 with variable block sizes Figure 6 shows a sparse matrix of 4000×4000 divided into blocks of varying size. It is again clear that with larger numbers of blocks in each dimension which results in smaller block sizes, the OpenMP’s performance drops drastically. GPRM can deal with tiny 8×8 blocks 6.2× better than the best result obtained by OpenMP. Table I reveals that the best results for the OpenMP approach is not obtained with the default setting, which is as many threads as the number of cores. Besides the large difference in execution times when the block size becomes A. OpenMP Performance Bottlenecks We have identified a number of performance bottlenecks when programming with OpenMP. The first is the thread migration overhead. This overhead can often be removed by statically mapping (pinning) the OpenMP threads to the execution cores. Using static thread mapping (pinning) in a platform with per-core caches could be very useful, particularly for load balanced data parallel problems, in which the portion of the work to be done by each thread is fairly equal, and therefore CPU time and local caches can be effectively utilised. Our study [12] shows that for such a platform, static thread mapping is often a good practice in single-program environments, but for multiprogramming environments, in which different programs compete for the resources, it is not always efficient. We refer the readers to [12]–[14] for detailed discussions on thread mapping (pinning) for OpenMP programs. Another barrier is to find a proper cutoff point to avoid creating overly fine-grained tasks. Programmers have to be very careful about the granularity of the tasks, otherwise the results maybe totally unexpected. It has also been observed that there is no guarantee that running an OpenMP program with the maximum number of threads –equal to the number of cores– will result in the best performance. B. Comparison of OpenMP and GPRM Approaches For the SparseLU problem, although creating OpenMP tasks for non-empty blocks is a smart solution, it is not working very well for all matrices. The first reason is that a single thread SparseLU: 50x50 GPRM-Default SparseLU: 100x25 GPRM-Contiguous 40 OpenMP Tasks 35 35 30 30 25 25 Speedup Speedup 40 20 GPRM-Contiguous OpenMP Tasks 20 15 15 10 10 5 5 0 GPRM-Default 0 16 32 48 64 80 96 112 128 Concurrency Level (a) 50 × 50 16 32 48 64 80 96 112 128 Concurrency Level (b) 100 × 25 Fig. 7: SparseLU Factorisation: GPRM approaches vs. OpenMP Tasks, on the TILEPro64 with 63 available cores explores the whole matrix and creates relatively small tasks for non-empty blocks, while in the proposed solution implemented in GPRM, multiple threads look into their portions of the work in parallel. The difference in performance can be noticeable especially in the bmod phase with a nested loop. As also reported in [15], combining the OpenMP for worksharing construct with tasks, as implemented in sparselu_for in the BOTS benchmark suite, is not a viable approach with OpenMP 3.0. Secondly, in GPRM, every thread has specific work based on the program’s task description file. If needed, runtime decisions will be applied to improve the performance, while OpenMP creates the tasks dynamically and all decisions are taken dynamically at runtime, which makes its task management less efficient when the numbers of tasks and/or threads become larger. Moreover, the overhead of task management becomes significant when the tasks become more fine-grained, as made clear by the Matrix Multiplication micro-benchmark. In GPRM, using a par_nested_for construct in order to partition the matrix in a non-contiguous manner results in a good load balance. Furthermore, our hybrid worksharingtasking technique is pretty much straightforward. There is no pressure on the programmer to worry about private and shared variables, in contrast to many other parallel programming models, including OpenMP. The proposed programming toolkit, GPRM is stable, scalable, low-overhead, and flexible compared to OpenMP. Stable, as there is no need to change the default configurations, such as the number of threads in order to get the optimal performance. It scales as expected, which is showing continuous speedup as the concurrency level increases up to the number of cores. The overhead of task management is negligible, even for finegrained tasks. It is flexible, because the number of tasks can be easily controlled by the programmer. It is also straightforward to specify which task to be run on which thread initially. If required, the runtime system can change the host thread dynamically. VIII. C ONCLUSION Many-core systems have emerged to solve the existing problems faster. Giving the same amount of work to more execution resources simply means having more fine-grained tasks. In this paper, we have proposed a regular task composition approach which can address both regular and irregular parallel problems. We have shown that it fits naturally to the systems with percore caches, which consequently makes it very promising for future many-cores. In this paper, our new model is used to solve a fundamental linear algebra problem, namely lower-upper factorisation over sparse matrices. We used a matrix multiplication microbenchmark to highlight the differences between the proposed model and OpenMP. For the small jobs, GPRM outperformed OpenMP by 2.8× to 11×. For the medium-sized jobs, the speedup improvement ranged from 1.5× to 3.3×. As the jobs get larger the difference became less significant. For the large jobs, the speedup ranged from 1.3× to 2.2×. As a real-world example we used the SparseLU testcase from the BOTS benchmark suite. We used a sparse matrix of 4000×4000 divided into blocks of varying size. We demonstrated that for the larger numbers of blocks, i.e. smaller block sizes, the difference is considerable. The main advantage of GPRM is that it does not need to be tuned it terms of the number of threads. By contrast, tuning is crucial for OpenMP, otherwise for fine-grained tasks a huge drop in performance is inevitable. We also investigated the impact of the concurrency level on speedup. Again, GPRM scaled 2× better than the best result obtained using OpenMP for both the 50×50 and 100×100 cases. For concurrency level=63, which is the default setting, the speedup improvements were respectively 2.1× and 4.9×. As GPRM can offer a hybrid task-data parallelism, utilising it on hybrid CPU-GPU systems remains an open research area. ACKNOWLEDGMENT The first author would like to thank the Scottish Informatics and Computer Science Alliance (SICSA) for supporting his research studies. R EFERENCES [1] R. Hickey, “The clojure programming language,” in Proceedings of the 2008 symposium on Dynamic languages. ACM, 2008, p. 1. [2] J. E. Stone, D. Gohara, and G. Shi, “Opencl: A parallel programming standard for heterogeneous computing systems,” Computing in science & engineering, vol. 12, no. 3, p. 66, 2010. [3] C. E. Leiserson, “The cilk++ concurrency platform,” The Journal of Supercomputing, vol. 51, no. 3, pp. 244–257, 2010. [4] J. Reinders, Intel threading building blocks: outfitting C++ for multicore processor parallelism. O’Reilly Media, Inc., 2007. [5] E. Ayguadé, N. Copty, A. Duran, J. Hoeflinger, Y. Lin, F. Massaioli, X. Teruel, P. Unnikrishnan, and G. Zhang, “The design of openmp tasks,” Parallel and Distributed Systems, IEEE Transactions on, vol. 20, no. 3, pp. 404–418, 2009. [6] A. Duran, J. Corbalán, and E. Ayguadé, “An adaptive cut-off for task parallelism,” in High Performance Computing, Networking, Storage and Analysis, 2008. SC 2008. International Conference for. IEEE, 2008, pp. 1–11. [7] A. Podobas and M. Brorsson, “A comparison of some recent task-based parallel programming models,” in Proceedings of the 3rd Workshop on Programmability Issues for Multi-Core Computers,(MULTIPROG’2010), Jan 2010, Pisa, 2010. [8] X. Teruel, C. Barton, A. Duran, X. Martorell, E. Ayguadé, P. Unnikrishnan, G. Zhang, and R. Silvera, “Openmp tasking analysis for programmers,” in Proceedings of the 2009 Conference of the Center for Advanced Studies on Collaborative Research. IBM Corp., 2009, pp. 32–42. [9] A. Tousimojarad and W. Vanderbauwhede, “The glasgow parallel reduction machine: Programming shared-memory many-core systems using parallel task composition,” EPTCS, vol. 137, pp. 79–94. [10] A. Duran, J. Corbalán, and E. Ayguadé, “Evaluation of openmp task scheduling strategies,” in OpenMP in a new era of parallelism. Springer, 2008, pp. 100–110. [11] A. Duran, X. Teruel, R. Ferrer, X. Martorell, and E. Ayguade, “Barcelona openmp tasks suite: A set of benchmarks targeting the exploitation of task parallelism in openmp,” in Parallel Processing, 2009. ICPP’09. International Conference on. IEEE, 2009, pp. 124–131. [12] A. Tousimojarad and W. Vanderbauwhede, “An efficient thread mapping strategy for multiprogramming on manycore processors,” in International Conference on Parallel Computing (ParCo 2013). IOS Press, 2013, pp. 63–71. [13] A. Mazouz, S. Touati, and D. Barthou, “Performance evaluation and analysis of thread pinning strategies on multi-core platforms: Case study of spec omp applications on intel architectures,” in High Performance Computing and Simulation (HPCS), 2011 International Conference on. IEEE, 2011, pp. 273–279. [14] A. Tousimojarad and W. Vanderbauwhede, “Cache-aware parallel programming for manycore processors,” ACM SIGARCH Computer Architecture News, vol. 41, 2013. [15] S. L. Olivier, A. K. Porterfield, K. B. Wheeler, and J. F. Prins, “Scheduling task parallelism on multi-socket multicore systems,” in Proceedings of the 1st International Workshop on Runtime and Operating Systems for Supercomputers. ACM, 2011, pp. 49–56.
6cs.PL
On Approximation for Fractional Stochastic Partial Differential Equations on the Sphere✩ Vo V. Anha,b , Philip Broadbridgec , Andriy Olenkoc , Yu Guang Wangc,d,∗ arXiv:1707.09825v2 [math.ST] 1 Mar 2018 a School of Mathematical Sciences, Queensland University of Technology, Brisbane, QLD, 4000, Australia b School of Mathematics and Computational Science, Xiangtan University, Hunan, 411105, China c Department of Mathematics and Statistics, La Trobe University, Melbourne, VIC, 3086, Australia d School of Mathematics and Statistics, The University of New South Wales, Sydney, NSW, 2052, Australia Abstract This paper gives the exact solution in terms of the Karhunen-Loève expansion to a fractional stochastic partial differential equation on the unit sphere S2 ⊂ R3 with fractional Brownian motion as driving noise and with random initial condition given by a fractional stochastic Cauchy problem. A numerical approximation to the solution is given by truncating the Karhunen-Loève expansion. We show the convergence rates of the truncation errors in degree and the mean square approximation errors in time. Numerical examples using an isotropic Gaussian random field as initial condition and simulations of evolution of cosmic microwave background (CMB) are given to illustrate the theoretical results. Keywords: stochastic partial differential equations, fractional Brownian motions, spherical harmonics, random fields, spheres, fractional calculus, Wiener noises, Cauchy problem, cosmic microwave background, FFT 2010 MSC: 35R11, 35R01, 35R60, 60G22, 33C55, 35P10, 60G60, 41A25, 60G15, 35Q85, 65T50 1. Introduction Fractional stochastic partial differential equations (fractional SPDEs) on the unit sphere S2 in R3 have numerous applications in environmental modelling and astrophysics, see [3, 8, 10, 15, 20, 26, 32, 41, 43, 48, 51, 52]. One of the merits of fractional SPDEs is that they can be used to maintain long range dependence in evolutions of complex systems [4, 6, 27, 28, 35], such as climate change models and the density fluctuations in the primordial universe as inferred from the cosmic microwave background (CMB). In this paper, we give the exact and approximate solutions of the fractional SPDE on 2 S (1.1) dX(t, x) + ψ(−∆S2 )X(t, x) = dBH (t, x), t ≥ 0, x ∈ S2 . Here, for α ≥ 0, γ > 0, the fractional diffusion operator ψ(−∆S2 ) := (−∆S2 )α/2 (I − ∆S2 )γ/2 (1.2) is given in terms of Laplace-Beltrami operator ∆S2 on S2 with ψ(t) := tα/2 (1 + t)γ/2 , t ∈ R+ . (1.3) This research was supported under the Australian Research Council’s Discovery Project DP160101366. Corresponding author. Email addresses: [email protected] (Vo V. Anh), [email protected] (Philip Broadbridge), [email protected] (Andriy Olenko), [email protected] (Yu Guang Wang) ✩ ∗ The noise in (1.1) is modelled by a fractional Brownian motion (fBm) BH (t, x) on S2 with Hurst index H ∈ [1/2, 1) and variances Aℓ at t = 1. When H = 1/2, BH (t, x) reduces to the Brownian motion on S2 . The equation (1.1) is solved under the initial condition X(0, x) = u(t0 , x), where u(t0 , x), t0 ≥ 0, is a random field on the sphere S2 , which is the solution of the fractional stochastic Cauchy problem at time t0 : ∂u(t, x) + ψ(−∆S2 )u(t, x) = 0 ∂t u(0, x) = T0 (x), (1.4) where T0 is a (strongly) isotropic Gaussian random field on S2 , see Section 4.1. For simplicity, we will skip the variable x if there is no confusion. The fractional diffusion operator ψ(−∆S2 ) on S2 in (1.4) and (1.2) is the counterpart to that in R3 . We recall that the operator A := − (−∆)α/2 (I − ∆)γ/2 , which is the inverse of the composition of the Riesz potential (−∆)−α/2 , α ∈ (0, 2], defined by the kernel Jα (x) = Γ (3/2 − α) 2α−3 |x| , π 3/2 4α Γ (α) x ∈ R3 and the Bessel potential (I − ∆)−γ/2 , γ ≥ 0, defined by the kernel Z ∞ 2 ds −1 γ Iγ (x) = [(4π) Γ (γ)] e−π|x| /s e−s/4π s(−3/2+γ) , s 0 x ∈ R3 of a strongly continuous bounded holomorphic (see [50]), is the infinitesimal generator  semigroup of angle π/2 on Lp R3 for α > 0, α + γ ≥ 0 and any p ≥ 1, as shown in [5]. This semigroup defines the Riesz-Bessel distribution (and the resulting Riesz-Bessel motion) if and only if α ∈ (0, 2], α + γ ∈ [0, 2]. When γ = 0, the fractional Laplacian − (−∆)α/2 , α ∈ (0, 2], generates the Lévy α-stable distribution. While the exponent of the inverse of the Riesz potential indicates how often large jumps occur, it is the combined effect of the inverses of the Riesz and Bessel potentials that describes the non-Gaussian behaviour of the process. More precisely, depending on the sum α + γ of the exponents of the inverses of the Riesz and Bessel potentials, the Riesz-Bessel motion will be either a compound Poisson process, a pure jump process with jumping times dense in [0, ∞) or the sum of a compound Poisson process and an independent Brownian motion. Thus the operator A is able to generate a range of behaviours of random processes [5]. The equations (1.1) and (1.4) can be used to describe evolutions of two-stage stochastic systems. The equation (1.4) determines evolutions on the time interval [0, t0 ] while (1.1) gives a solution for a system perturbed by fBm on the interval [t0 , t0 +t]. CMB is an example of such systems, as it passed through different formation epochs, inflation, recombinatinon etc, see e.g. [15]. The exact solution of (1.1) is given in the following expansion in terms of spherical harmonics Yℓ,m , or the Karhunen-Loève expansion: ℓ ∞  X X d e−ψ(λℓ )(t+t0 ) (T X(t) = 0 )ℓm Yℓ,m ℓ=0 m=−ℓ + p Aℓ Z t 0 1 (u) Yℓ,0 e−ψ(λℓ )(t−u) dβℓ0 Z t ℓ √ X 1 e−ψ(λℓ )(t−u) dβℓm (u) ReYℓ,m + 2 m=1 + 0 Z t −ψ(λℓ )(t−u) e 0 2 2 (u) dβℓm ImYℓ,m   . (1.5) Rt i (s) is an fBm with mean zero Here, each fractional stochastic integral 0 e−ψ(λℓ )(t−s) dβℓm 2 (u)), m = 0, . . . , ℓ, ℓ ∈ N , 1 and variance explicitly given, see Section 4.2, where (βℓm (u), βℓm 0 is a sequence of real-valued independent fBms with Hurst index H and variance 1 (at t = 1), and ψ(λℓ ) are the eigenvalues of ψ(−∆S2 ), see Section 2.1. By truncating the expansion (1.5) at degree ℓ = L, L ≥ 1, we obtain an approximation XL (t) of the solution X(t) of (1.1). Since the coefficients in the expansion (1.5) can be fast simulated, see e.g. [31, Section 12.4.2], the approximation XL (t) is fully computable and the computation is efficient using the FFT for spherical harmonics Yℓ,m , see Section 5. We prove that the approximation XL (t) of X(t), t > 0 (in L2 norm on the product space −r of the probability space Ω and the sphere S2 ) has the convergence > 1, if the P∞rate L , r 2r+1 H variances Aℓ of the fBm B satisfy the smoothness condition ℓ=0 Aℓ (1 + ℓ) < ∞. This shows that the numerical approximation by truncating the expansion (1.5) is effective and stable. We also prove that X(t + h) has the mean square approximation errors (or the mean quadratic variations) with order hH from X(t), as h → 0+, for H ∈ [1/2, 1) and t ≥ 0. When H = 1/2, the Brownian motion case, the convergence rate can be as high as h for t > 0 (up to a constant). This means that the solution of the fractional SPDE (1.1) evolves continuously with time and the fractional (Hurst) index H affects the smoothness of this evolution. All above results are verified by numerical examples using an isotropic Gaussian random field as the initial random field. CMB is electromagnetic radiation propagating freely through the universe since recombination of ionised atoms and electrons around 370, 000 years after the big bang. As the map of CMB temperature can be modelled as a random field on S2 , we apply the truncated solution of the fractional SPDE (1.1) to explore evolutions of the CMB map, using the angular power spectrum of CMB at recombination which was obtained by Planck 2015 results [44] as the initial condition of the Cauchy problem (1.4). This gives some indication that the fractional SPDE is flexible enough as a phenomenological model to capture some of the statistical and spectral properties of the CMB that is in equilibrium with an expanding plasma through an extended radiation-dominated epoch. The paper is organized as follows. Section 2 makes necessary preparations. Some results about fractional Brownian motions are derived in Section 3. Section 4 gives the exact solution of the fractional SPDE (1.1) with fractional Brownian motions and random initial condition from the fractional stochastic Cauchy problem (1.4). In Section 4.3, we give the convergence rate of the approximation errors of truncated solutions in degree and the mean square approximation errors of the exact solution in time. Section 5 gives numerical examples. 2. Preliminaries Let R3 be the real 3-dimensional Euclidean space with the inner product x · y for √ x, y ∈ R3 and the Euclidean norm |x| := x · x. Let S2 := {x ∈ R3 : |x| = 1} denote the unit sphere in R3 . The sphere S2 forms a compact metric space, with the geodesic distance dist(x, y) := arccos(x · y) for x, y ∈ S2 as the metric. Let (Ω, F, P) be a probability space. Let L2 (Ω, P) be the L2 -space on Ω with respect to the probability measure P, endowed with the norm k·kL2 (Ω) . Let X, Y be two random variables on (Ω, F, P). Let E [X] be the expected value of X, cov (X, Y ) := E [(X − E [X])(Y − E [Y ])] be the covariance between X and Y and Var [X] := cov (X, X) be the variance of X.   Let L2 Ω × S2 := L2 Ω × S2 , P ⊗ µ2 be the real-valued L2 -space on the product space of Ω and S2 , where P ⊗ µ2 is the corresponding product measure. 3 2.1. Functions on S2 Let L2 (S2 ) = L2 (S2 , µ) be a space of all real-valued functions that are square-integrable with respect to the normalized Riemann surface measure µ on S2 (that is, µ(S2 ) = 1), endowed with the L2 -norm 1/2 Z 2 . |f (x)| dµ(x) kf kL2 (S2 ) := S2 The space L2 (S2 ) is a Hilbert space with the inner product Z f (x)g(x) dµ(x), f, g ∈ L2 (S2 ). hf, gi := hf, giL2 (S2 ) := S2 A spherical harmonic of degree ℓ, ℓ ∈ N0 := {0, 1, 2, . . . }, on S2 is the restriction to S2 of a homogeneous and harmonic polynomial of total degree ℓ defined on R3 . Let Hℓ (S2 ) denote the set of all spherical harmonics of exact degree ℓ on S2 . The dimension of the linear space Hℓ (S2 ) is 2ℓ + 1. The linear span of Hℓ (S2 ), ℓ = 0, 1, . . . , L, forms the space PL (S2 ) of spherical polynomials of degree at most L. 2 ) is the difor ℓ 6= ℓ′ ∈ N0 is L2 -orthogonal, PL (SL Since each pair Hℓ (S2 ), Hℓ′ (S2 ) L L ∞ 2 2 2 2 rect sum of Hℓ (S ), i.e. PL (S ) = ℓ=0 Hℓ (S ). The infinite direct sum ℓ=0 Hℓ (S ) is dense in L2 (S2 ), see e.g. [54, Ch.1]. For x ∈ S2 , using spherical coordinates x := (sin θ sin ϕ, sin θ cos ϕ, cos θ), θ ∈ [0, π], ϕ ∈ [0, 2π), the Laplace-Beltrami operator on S2 at x is   ∂ 1 ∂2 1 ∂ , sin θ + ∆S2 := sin θ ∂θ ∂θ sin2 θ ∂ϕ2 see [12, Eq. 1.6.8] and also [38, p. 38]. Each member of Hℓ (S2 ) is an eigenfunction of the negative Laplace-Beltrami operator −∆S2 on the sphere S2 with the eigenvalue (2.1) λℓ := ℓ(ℓ + 1). For α ≥ 0 and γ > 0, using (1.3), the fractional diffusion operator ψ(−∆S2 ) in (1.2) has the eigenvalues α/2 (2.2) ψ(λℓ ) = λℓ (1 + λℓ )γ/2 , ℓ ∈ N0 , see [13, p. 119–120]. By (2.1) and (2.2), ψ(λℓ ) ≍ (1 + ℓ)α+γ , ℓ ∈ N0 , (2.3) where aℓ ≍ bℓ means c bℓ ≤ aℓ ≤ c′ bℓ for some positive constants c and c′ . A zonal function is a function K : S2 × S2 → R that depends only on the inner product of the arguments, i.e. K(x, y) = K(x · y), x, y ∈ S2 , for some function K : [−1, 1] → R. Let Pℓ (t), −1 ≤ t ≤ 1, ℓ ∈ N0 , be the Legendre polynomial of degree ℓ. From [53, Theorem 7.32.1], the zonal function Pℓ (x · y) is a spherical polynomial of degree ℓ of x (and also of y). Let {Yℓ,m : ℓ ∈ N0 , m = −ℓ, . . . , ℓ} be an orthonormal basis for the space L2 (S2 ). The basis Yℓ,m and the Legendre polynomial Pℓ (x · y) satisfy the addition theorem ℓ X m=−ℓ Yℓ,m (x)Yℓ,m (y) = (2ℓ + 1)Pℓ (x · y). (2.4) In this paper, we focus on the following (complex-valued) orthonormal basis, which are used in physics. Using the spherical coordinates (θ, φ) for x, s (2ℓ + 1)(ℓ − m)! (m) Pℓ (cos θ)eimϕ , ℓ ∈ N0 , −ℓ ≤ m ≤ ℓ, (2.5) Yℓ,m (x) := (ℓ + m)! 4 (m) where Pℓ (t), t ∈ [−1, 1] is the associated Legendre polynomial of degree ℓ and order m. The Fourier coefficients for f in L2 (S2 ) are Z f (x)Yℓ,m (x) dµ(x), ℓ ∈ N0 , m = −ℓ, . . . , ℓ. (2.6) fbℓm := S2 Since Yℓ,m = (−1)m Yℓ,−m and fbℓm = (−1)m fbℓ,−m , for f ∈ L2 (S2 ), in L2 (S2 ) sense, ! ∞ ℓ   X X Re fbℓm ReYℓ,m − Im fbℓm ImYℓ,m . (2.7) f= fbℓ0 Yℓ,0 + 2 m=1 ℓ=0 Note that the results of this paper can be generalized to any other orthonormal basis. For r ∈ R+ , the generalized Sobolev space Wr2 (S2 ) is defined as the set of all functions f ∈ L2 (S2 ) satisfying (I − ∆S2 )r/2 f ∈ L2 (S2 ). The Sobolev space Wr2 (S2 ) forms a Hilbert space with norm kf kWr (S2 ) := (I − ∆S2 )r/2 f L2 (S2 ) . We let W02 (S2 ) := L2 (S2 ). 2 2.2. Isotropic random fields on S2 Let B(S2 ) denote the Borel σ-algebra on S2 and let SO(3) be the rotation group on R3 . Definition 2.1. An F ⊗ B(S2 )-measurable function T : Ω × S2 → R is said to be a real-valued random field on the sphere S2 . We will use T (x) or T (ω) as T (ω, x) for brevity if no confusion arises. We say T is strongly isotropic if for any k ∈ N and for all sets of k points x1 , · · · , xk ∈ S2 and for any rotation ρ ∈ SO(3), joint distributions of T (x1 ), . . . , T (xk ) and T (ρx1 ), . . . , T (ρxk ) coinside. all x ∈ S2 the second moment of T (x) is finite, i.e.  We say  T is 2-weakly isotropic if for 2 2 E |T (x)| < ∞ and if for all x ∈ S and for all pairs of points x1 , x2 ∈ S2 and for any rotation ρ ∈ SO(3) it holds E [T (x)] = E [T (ρx)] , E [T (x1 )T (x2 )] = E [T (ρx1 )T (ρx2 )] , see e.g. [1, 33, 36]. In this paper, we assume that a random field T on S2 is centered, that is, E [T (x)] = 0 for x ∈ S2 . Now, let T be 2-weakly isotropic. The covariance E [T (x)T (y)], because it is rotationally invariant, is a zonal kernel on S2 G(x · y) := E [T (x)T (y)] . This zonal function G(·) is said to be the covariance function for T . The function Pcovariance ∞ G(·) is in L2 ([−1, 1]) and has a convergent Fourier expansion G = ℓ=0 Cℓ (2ℓ + 1)Pℓ in L2 ([−1, 1]). The set of Fourier coefficients Z 1 Z 1 G(x · y)Pℓ (x · y) dµ(x) = G(t)Pℓ (t) dt Cℓ := 2π −1 S2 is said to be the angular power spectrum for the random field T , where the second equality follows by the properties of zonal functions. By the addition theorem in (2.4) we can write E [T (x)T (y)] = G(x · y) = ∞ X ℓ=0 Cℓ (2ℓ + 1)Pℓ (x · y) = 5 ∞ X ℓ=0 Cℓ ℓ X m=−ℓ Yℓ,m(x)Yℓ,m (y). (2.8) We define Fourier coefficients for a random field T by, cf. (2.6), Tbℓm := hT, Yℓ,m i, ℓ ∈ N0 , m = −ℓ, . . . , ℓ. (2.9) The following lemma, from [36, p. 125] and [22, Lemma 4.1], shows the orthogonality of the Fourier coefficients Tbℓm of T . Lemma 2.2 ([22, 36]). Let T be a 2-weakly isotropic random field on S2 with angular power spectrum Cℓ . Then for ℓ, ℓ′ ≥ 0, m = −ℓ, . . . , ℓ and m′ = −ℓ′ , . . . , ℓ′ , i h (2.10) E Tbℓm Tbℓ′ m′ = Cℓ δℓℓ′ δmm′ , where δℓℓ′ is the Kronecker delta. We say T a Gaussian random field on S2 if for each k ∈ N and x1 , . . . , xk ∈ S2 , the vector (T (x1 ), . . . , T (xk )) has a multivariate Gaussian distribution. We note that a Gaussian random field is strongly isotropic if and only if it is 2-weakly isotropic, see e.g. [36, Proposition 5.10(3)]. 3. Fractional Brownian motion Let H ∈ (1/2, 1) and σ > 0. A fractional Brownian motion (fBm) B H (t), t ≥ 0, with index H and variance σ 2 at t = 1 is a centered Gaussian process on R+ satisfying h i 2 B H (0) = 0, E B H (t) − B H (s) = |t − s|2H σ 2 . The constant H  is called the Hurst index. See e.g. [7]. By the above definition, the variance of B H (t) is E |B H (t)|2 = t2H σ 2 . For convenience, we use B 1/2 (t) (with σ = 1) to denote the Brownian motion (or the Wiener process) on R+ . Definition 3.1. Let H ∈ [1/2, 1). Let β 1 (t) and β 2 (t) be independent real-valued fBms with the Hurst index H and variance 1 (at t = 1). A complex-valued fractional Brownian motion B H (t), t ≥ 0, with Hurst index H and variance σ 2 can be defined as  B H (t) = β 1 (t) + iβ 2 (t) σ. We define the L2 (S2 )-valued fractional Brownian motion BH (t) as follows, see Grecksch and Anh [24, Definition 2.1]. P Definition 3.2. Let H ∈ [1/2, 1). Let Aℓ > 0, ℓ ∈ N0 satisfying ∞ ℓ=0 (2ℓ + 1)Aℓ < ∞. H Let Bℓm (t), t ≥ 0, ℓ ∈ N0 , m = −ℓ, . . . , ℓ be a sequence of independent complex-valued fractional Brownian motions on R+ with Hurst index H, and variance Aℓ at t = 1 and H (t) = 0 for ℓ ∈ N , t ≥ 0. For t ≥ 0, the L (S2 )-valued fractional Brownian motion ImBℓ0 0 2  is defined by the following expansion (in L2 Ω × S2 sense) in spherical harmonics with H (t) as coefficients: fBms Bℓm H B (t, x) := ∞ X ℓ X H (t)Yℓ,m (x), Bℓm ℓ=0 m=−ℓ x ∈ S2 . We also call BH (t, x) in Definition 3.2 a fractional Brownian motion on S2 . The fBm BH (t, x) in (3.1) is well-defined since for t ≥ 0, by Parseval’s identity, E h BH (t, ·) 2 L2 (S2 ) i ≤ ∞ X ℓ X ℓ=0 m=−ℓ ∞ i h X 2 H = t2H E Bℓm (t) (2ℓ + 1)Aℓ < ∞. ℓ=0 6 (3.1) We let in this paper BH (t, x) be real-valued. For ℓ ∈ N0 , let p 1 2 H 1 (t), (t) := βℓ0 (t), βℓ0 (t) := Bℓ0 Aℓ βℓ0 r r Aℓ 1 Aℓ 2 H H H (t), (t), (t) = ImBℓm βℓm (t) := ReBℓm β (t) := −ImBℓm 2 2 ℓm m = 1, . . . , ℓ, 1 , β 2 ), m = 0, . . . , ℓ, ℓ ∈ N , is a sequence of independent fBms with in law. Then, (βℓm 0 ℓm Hurst index H and variance 1 (at t = 1).  By (2.7), we can write (3.1) as, for t ≥ 0, in L2 Ω × S2 sense, ! ℓ ∞ p X √ X  1 2 1 H (3.2) Aℓ βℓ0 (t)Yℓ,0 + 2 βℓm (t) ReYℓ,m + βℓm (t) ImYℓ,m . B (t) = m=1 ℓ=0 Remark. For a Hilbert space H, Duncan et al. [18, 19] introduced an H-valued cylindrical fractional Brownian motion, whereas our approach yields Q-fractional Brownian motions for a kernel operator Q. But Duncan et al.’s results can be modified for Q-fractional Brownian motions. Remark. We give the covariance of BH (t, x), as follows. As in Definition 3.2, H ∈ P∞ H (t)|ℓ ∈ N , m = −ℓ, . . . , ℓ} is a sequence of [1/2, 1), Aℓ > 0, ℓ=0 (2ℓ + 1)Aℓ < ∞, {Bℓm 0 centered independent fBms with Hurst index H. Note that  H   H  E |Bℓm (1)|2 = Aℓ , E Bℓm (t) = 0, for t ≥ 0 and all ℓ ∈ N0 , m = −ℓ, . . . , ℓ, ℓ ∞ X X ℓ=0 m=−ℓ ∞ X  H  2 2H (2ℓ + 1)Aℓ . E |Bℓm (t)| = t ℓ=0 Then, for t ≥ 0, x, y ∈ S2 , "∞ ℓ # ∞ ℓ′ X X X X  H E BH (t, x)BH (t, y) = E BℓH′ m′ (t)Yℓ′ ,m′ (y) (t)Yℓ,m (x) Bℓm  ℓ=0 m=−ℓ = ∞ X ∞ X ℓ X ℓ′ =0 m′ =−ℓ′ ℓ′ X ℓ=0 ℓ′ =0 m=−ℓ m′ =−ℓ′ = ∞ X ℓ X ℓ=0 m=−ℓ ∞ X 2H =t ℓ=0   H (t)BℓH′ m′ (t) Yℓ,m (x)Yℓ′ ,m′ (y) E Bℓm  H  (t)|2 Yℓ,m (x)Yℓ,m (y) E |Bℓm (2ℓ + 1)Aℓ Pℓ (x · y), (3.3) where the last equality uses (2.4). For aR bounded measurable function g on R+ (which is deterministic), the stochastic t H (u) can be defined as a Riemann-Stieltjes integral, see [34]. The integral s g(u) dBℓm Rt L2 (S2 )-valued stochastic integral s g(u) dBH (u) can then be defined as an expansion in Rt H (u), as follows. spherical harmonics with coefficients s g(u) dBℓm Definition 3.3. Let H ∈ [1/2, 1) and let BH (t) be an L2 (SR2 )-valued fBm with the Hurst t H index H. For t > s ≥ 0, the fractional stochastic integral s g(u) dB (u) for a bounded  measurable function g on R+ is defined by, in L2 Ω × S2 sense, Z t s g(u) dBH (u) := Z ∞ X ℓ X ℓ=0 m=−ℓ 7 t s  H (u) Yℓ,m . g(u) dBℓm The following theorem [24, Lemma 2.3] provides an upper bound for Rt s g(u) dBH (u). PropositionR 3.4. Let H ∈ [1/2, 1). Let g be a bounded measurable function on R+ , and tRt if H > 1/2, s s g(u)g(v)|u − v|2H−2 du dv < ∞. For t > s ≥ 0, the fractional stochastic Rt integral s g(u) dBH (u) given by Definition 3.3 satisfies " Z # 2H X Z t ∞ 2 t 1 H (2ℓ + 1)Aℓ , E g(u) dB (u) |g(u)| H du ≤C s s L2 (S2 ) ℓ=0 where the constant C depends only on H. 4. Fractional SPDE This section studies the Karhunen-Loève expansion of the solution to the fractional SPDE (1.1) with the fractional diffusion (Laplace-Beltrami) operator ψ(−∆S2 ) in (1.2) and the L2 (S2 )-valued fractional Brownian motion BH (t) given in Definition 3.2. The random initial condition is a solution of the fractional stochastic Cauchy problem (1.4). We will give the convergence rates for the approximation errors of the truncated Karhunen-Loève expansion in degree and the mean square approximation errors in time of the solution of (1.1). 4.1. Random initial condition as a solution of fractional stochastic Cauchy problem Let T0 (x) := ∞ X ℓ X ℓ=0 m=−ℓ d (T 0 )ℓm Yℓ,m (x), x ∈ S2 (4.1) be a centered, 2-weakly isotropic Gaussian random field on S2 . Let the sequence {Cℓ }ℓ∈N0 be the angular power spectrum of T0 . Let  C0 , ℓ = 0, ′ (4.2) Cℓ := Cℓ /2, ℓ ≥ 1. ′ d Then, (T 0 )ℓm follows the normal distribution N (0, Cℓ ). Let α ≥ 0, γ > 0. By [16, Theorem 3], the solution to the fractional stochastic Cauchy problem (1.4) is ∞ X ℓ X d u(t, x) = e−ψ(λℓ )t (T (4.3) 0 )ℓm Yℓ,m (x). ℓ=0 m=−ℓ Remark. A time-fractional extension of Cauchy problem (1.4) and its solution (4.5) was studied by D’Ovidio, Leonenko and Orsingher [17]. In this paper, we do not consider the initial condition from a time-fractional Cauchy problem. For t ≥ 0, u(t, x) is a 2-weakly isotropic Gaussian random field, as shown by the following theorem. Proposition 4.1. Let u(t, x) be the solution in (4.3) of the fractional stochastic Cauchy problem (1.4). Then, for any t ≥ 0, u(t, x) is a 2-weakly isotropic Gaussian random field on S2 , and its Fourier coefficients satisfy for ℓ, ℓ′ ∈ N0 , m = −ℓ, . . . , ℓ and m′ = −ℓ′ , . . . , ℓ′ , i h d u(t) d ′ ′ = e−2ψ(λℓ )t C ′ δℓℓ′ δmm′ , (4.4) E u(t) ℓ ℓm ℓm d := (u(t)) \ for simplicity and C ′ is given by (4.2). where we let u(t) ℓm ℓm ℓ 8 4.2. Solution of fractional SPDE The following theorem gives the exact solution of the fractional SPDE in (1.1) under the random initial condition X(0) = u(t0 ) for t0 ≥ 0. Theorem 4.2. Let H ∈ [1/2, 1), α ≥ 0, γ > 0. Let BH (t) be a fractional Brownian motion on the sphere S2 with Hurst index H and variances Aℓ . Let u(t, x) be the solution in (4.3) of the fractional stochastic Cauchy problem (1.4). Then, for t0 ≥ 0, the solution to the equation (1.1) under the random initial condition X(0) = u(t0 ) is for t ≥ 0, ∞  X ℓ X d X(t) = e−ψ(λℓ )(t+t0 ) (T 0 )ℓm Yℓ,m ℓ=0 m=−ℓ + p Aℓ Z t 0 1 e−ψ(λℓ )(t−u) dβℓ0 (u) Yℓ,0 Z t ℓ √ X 1 (u) ReYℓ,m + 2 e−ψ(λℓ )(t−u) dβℓm 0 m=1 Z + Let t −ψ(λℓ )(t−u) e 0 2 dβℓm (u) ImYℓ,m   . Z 1 1 ta−1 e−zt dt, Rea > 0, z ∈ C Γ(a) 0 be the incomplete gamma function, see e.g. [14, Eq. 8.2.7]. For ℓ ∈ N0 , t ≥ 0 and H ∈ [1/2, 1), let    H 2 σℓ,t := HΓ(2H)t2H e−2ψ(λℓ )t γ ∗ (2H, −ψ(λℓ )t) + γ ∗ (2H, ψ(λℓ )t) . (4.5) γ ∗ (a, z) :=  H and σ 2 := σ H 2 if no confusion arises. We write σℓ,t := σℓ,t ℓ,t ℓ,t For H = 1/2, the formula (4.6) reduces to   ℓ = 0,  t, 1/2 2 −2ψ(λ )t ℓ = σℓ,t 1−e  , ℓ ≥ 1.  2ψ(λℓ ) For t ≥ 0, the fractional stochastic integrals Z t i (u), e−ψ(λℓ )(t−u) dβℓm i = 1, 2, (4.6) (4.7) (4.8) 0 in the expansion (4.5) in Theorem 4.2 are normally distributed with means zero and vari2 , as a consequence of the following proposition. ances σℓ,t Proposition 4.3. Let H ∈ [1/2, 1), α ≥ 0, γ > 0, and ψ(λℓ ) be given by (2.2). Let t > s ≥ 0. For m = 0, . . . , ℓ, ℓ ∈ N0 and i = 1, 2, each fractional stochastic integral Z t i e−ψ(λℓ )(t−u) dβℓm (u) (4.9) s 2 is normally distributed with mean zero and variance σℓ,t−s as given by (4.6). Moreover, for 1/2 < H < 1, # "Z 2 t 2 i =E σℓ,t−s (u) e−ψ(λℓ )(t−u) dβℓm s = Z t s 2 i e−ψ(λℓ )(t−u) dβℓm (u) L2 (Ω) 2H ≤ C(t − s) , 9 (4.10) where the constant C depends only on H. Remark. By the expansion of solution X(t, x) in (4.5) of (1.1) under the initial condition X(0, x) = T0 (x) and the distribution coefficients of the expansion given by Proposition 4.3, the covariance of X(t, x) can be obtained using the techniques of Proposition 4.4 and (3.3). The solution of a Cauchy problem defined by the Riesz-Bessel operator yields an α-stable type solution, which is non-Gaussian. But, when we bring the fBm noise into the model, Theorem 4.7 shows that convergence is dominated by fBm, and under the condition of this theorem, the fBm driving the equation has a continuous version, hence the solution X(t) swings, but would not jump. It is not safe to assume that the solution is non-Gaussian (jumpy). The following proposition shows the change rate of the variance of fractional stochastic integral (4.8) with respect to time. Proposition 4.4. Let H ∈ [1/2, 1), α ≥ 0, γ > 0, and ψ(λℓ ) be given by (2.2). For t ≥ 0, 2 of the fractional stochastic integral m = 0, . . . , ℓ, ℓ ∈ N0 and i = 1, 2, the variance σℓ,t (4.8) satisfies as h → 0+: (i) for H = 1/2, when t = 0, |σℓ,t+h − σℓ,t | ≤ h1/2 , when t > 0, |σℓ,t+h − σℓ,t | ≤ C1 h, where the constant (ii) for H ∈ (1/2, 1),  1   √ , ℓ = 0,    2 t s C1 :=  ψ(λℓ )    e−2ψ(λℓ )t , ℓ ≥ 1;  2(1 − e−2ψ(λℓ )t )  |σℓ,t+h − σℓ,t | ≤ C2 1 + ψ(λℓ )tH h1−H hH , where the constant C2 depends only on H. Proposition 4.4 implies the following common upper bound for all H ∈ [1/2, 1). Corollary 4.5. Let H ∈ [1/2, 1), α ≥ 0, γ > 0, and ψ(λℓ ) be given by (2.2). For t ≥ 0, 2 of the fractional stochastic integral m = 0, . . . , ℓ, ℓ ∈ N0 and i = 1, 2, the variance σℓ,t (4.8) satisfies as h → 0+, |σℓ,t+h − σℓ,t | ≤ C(1 + ψ(λℓ ))hH , where the constant C depends only on H, α, γ and t. 4.3. Approximation to the solution In this section, we truncate the Karhunen-Loève expansion of the solution X(t) in (4.5) of the fractional SPDE (1.1) for computational implementation. We give an estimate for the approximation error of the truncated expansion. We also derive an upper bound for the mean square approximation errors in time for the solution X(t). 10 4.3.1. Truncation approximation to Karhunen-Loève expansion Definition 4.6. For t ≥ 0 and L ∈ N0 , the Karhunen-Loève approximation XL (t) of (truncation) degree L to the solution X(t) is XL (t) = L  X ℓ X ℓ=0 m=−ℓ + e−ψ(λℓ )t hu(t0 ), Yℓ,m iYℓ,m p Z Aℓ t 0 1 e−ψ(λℓ )(t−u) dβℓ0 (u) Yℓ,0 Z t ℓ √ X 1 + 2 (u) ReYℓ,m e−ψ(λℓ )(t−u) dβℓm 0 m=1 + Z t 0 2 e−ψ(λℓ )(t−u) dβℓm (u) ImYℓ,m For ℓ ∈ N0 , let X1,ℓ (t) := ℓ X m=−ℓ X2,ℓ (t) := p Aℓ   e−ψ(λℓ )t hu(t0 ), Yℓ,m iYℓ,m , Z 0 t . (4.11) (4.12a) 1 e−ψ(λℓ )(t−u) dβℓ0 (u) Yℓ,0 Z t ℓ √ X 1 (u) ReYℓ,m + 2 e−ψ(λℓ )(t−u) dβℓm m=1 0 + Z t 0 2 e−ψ(λℓ )(t−u) dβℓm (u) ImYℓ,m  . (4.12b) By [36, Remark 6.13], X1,ℓ (t) and X2,ℓ (t), t ≥ 0, ℓ ∈ N0 , are centered Gaussian random fields. The following theorem shows that the convergence rate of the Karhunen-Loève approximation in (4.11) of the exact solution in (4.5) is determined by the convergence rate of variances Aℓ of the fBm BH (t) (with respect to ℓ). SPDE in (1.1) with X(0) = Theorem 4.7. Let X(t) be the solution (4.5) to the fractionalP H 2r+1 < ∞ for u(t0 ), t0 ≥ 0, and the fBm B (t) whose variances Aℓ satisfy ∞ ℓ=0 Aℓ (1 + ℓ) r > 1. Let L ≥ 1 and let XL (t) be the Karhunen-Loève approximation of X(t) given in (4.11). For t > 0, the truncation error kX(t) − XL (t)kL2 (Ω×S2 ) ≤ CL−r , (4.13) where the constant C depends only on α, γ, t0 , t and r. Remark. Given t1 > 0, the truncation error in (4.13) is uniformly bounded on [t1 , +∞): sup kX(t) − XL (t)kL2 (Ω×S2 ) ≤ CL−r , t≥t1 where the constant C depends only on α, γ, t0 , t1 and r. The condition r > 1 comes from the Sobolev embedding theorem (into the space of continuous functions) on S2 , see [29]. This implies that the random field BH (t, ·), t ≥ 0, has a representation by a continuous function on S2 almost surely, which allows numerical computations to proceed, see [2, 33]. 11 4.3.2. Mean square approximation errors in time 1 (t), U 2 (t))|m = 0, . . . , ℓ, ℓ ∈ N } be a sequence of independent and For t ≥ 0, let {(Uℓm 0 ℓm standard normally distributed random variables. Let 1 Uℓ (t) := Uℓ0 (t) Yℓ0 + ℓ √ X  1 2 2 Uℓm (t) ReYℓ,m + Uℓm (t) ImYℓ,m . (4.14) m=1 P This is a Gaussian random field and the series ∞ ℓ=0 Uℓ (t) converges to a Gaussian random 2 2 field P∞ on S (in L2 Ω × S sense), see [36, Remark 6.13 and Theorem 5.13]. Let U(t) := ℓ=0 Uℓ (t). By Lemma 2.2, i h d U(t) d ′ ′ = δℓℓ′ δmm′ , (4.15) E U(t) ℓm ℓm d \ where we let U(t) ℓm := (U(t))ℓm for brevity. Let X1,ℓ (t) and X2,ℓ (t) be given in (4.12a) and (4.12b) respectively. We let Xℓ (t) := X1,ℓ (t) + X2,ℓ (t). (4.16) For t ≥ 0 and h > 0, the following theorem shows that Xℓ (t + h) can be represented by Xℓ (t) and Uℓ (t). Lemma 4.8. Let H ∈ [1/2, 1) and ℓ ∈ N0 . Let Xℓ (t) be given by (4.16). Then, for t ≥ 0 and h > 0, p (4.17) Xℓ (t + h) = e−ψ(λℓ )h Xℓ (t) + Aℓ σℓ,h Uℓ (t), H is given by (4.6) and U (t) is given by (4.14). where σℓ,h := σℓ,h ℓ Remark. In particular, the equation (4.17) implies for ℓ ∈ N0 and t > 0, p Xℓ (t) = e−ψ(λℓ )t Xℓ (0) + Aℓ σℓ,t Uℓ (0). (4.18) The following theorem gives an estimate for the mean square approximation errors for X(t) in time, which depends on the Hurst index H of the fBm BH (t). Theorem 4.9. Let X(t) be the solution in (4.5) to the equation (1.1), where the angular power spectrum Cℓ for the initial random field T0 and the variances Aℓ for the fBm BH (t) P∞ satisfy ℓ=0 (2ℓ + 1)(Cℓ + (1 + ψ(λℓ ))2 Aℓ ) < ∞. Then, for t ≥ 0, as h → 0+, kX(t + h) − X(t)kL2 (Ω×S2 ) ≤ ChH , (4.19) where the constant C depends only on α, γ, t, Cℓ and Aℓ . Remark. Given t1 > 0, as h → 0+, the truncation error in (4.19) is uniformly bounded on [t1 , +∞): sup kX(t + h) − X(t)kL2 (Ω×S2 ) ≤ ChH , t≥t1 where the constant C depends only on α, γ, t1 , Cℓ and Aℓ . The mean square approximation errors of the truncated solutions XL (t) have the same convergence rate hH as X(t), as we state below. The proof is similar to that of Theorem 4.9. Corollary 4.10. Under the conditions of Theorem 4.9, for t1 > 0, as h → 0+: sup t≥t1 ,L∈N0 kXL (t + h) − XL (t)kL2 (Ω×S2 ) ≤ ChH , where the constant C depends only on α, γ, t1 , Cℓ and Aℓ . 12 For H = 1/2 and t > 0, the convergence order of the upper bound in (4.19) can be improved to h, as we state in the following corollary. The proof is similar to that of Theorem 4.9 but needs to use Proposition 4.4 (i). Corollary solution in (4.5) to the equation (1.1) with H = 1/2, P 4.11. Let X(t) be the α+γ A ) < ∞. Let t > 0 and h > 0. Then, where ∞ (2ℓ + 1)(C + (ℓ + 1) ℓ ℓ ℓ=0 kX(t + h) − X(t)kL2 (Ω×S2 ) ≤ Ch, (4.20) where the constant C depends only on α, γ, t, Cℓ and Aℓ . 5. Numerical examples In this section, we show some numerical examples for the solution X(t) of the fractional SPDE (1.1). Using a 2-weakly isotropic Gaussian random field as the initial condition, we illustrate the convergence rates of the truncation errors and the mean square approximation errors of the Karhunen-Loève approximations XL (t) of the solution X(t). We show the evolutions of the solution of the equation (1.1) with CMB (cosmic microwave background) map as the initial random field. 5.1. Gaussian random field as initial condition d Let T0 be the 2-weakly isotropic Gaussian random field whose Fourier coefficient (T 0 )ℓm ′ follows the normal distribution N (0, Cℓ ) for each pair of (ℓ, m), where the variances  C0 , ℓ = 0, ′ (5.1) Cℓ := Cℓ /2, ℓ ≥ 1, with Cℓ := 1/(1 + ℓ)2r+2 , r > 1, see (4.1) and (4.2). The initial condition of the equation (1.1) is u(t0 , x) given by (4.3). The fBm is given by (3.2) with variances Aℓ := 1/(1 + ℓ)2r+2 , r > 1. (5.2) By [33, Section 4], the random fields T0 with angular power spectrum Cℓ in (5.1) and with variances Aℓ in (5.2) at t ≥ 0 are in Sobolev space Wr2 (S2 ) P-a. s., and thus can be represented by a continuous function on S2 almost surely. This enables numerical implementation. To obtain numerical results, we use XL0 (t) with L0 = 1000 as a substitution of the solution X(t) in Theorem 4.2 to the equation (1.1). The truncated expansion XL (t) given in Definition 4.6 is computed using the fast spherical Fourier transform [30, 47], evaluated at N = 12, 582, 912 HEALPix (Hierarchical Equal Area isoLatitude Pixezation) points1 on S2 , the partition by which is equal-area, see [23]. Then the (squared) mean L2 -errors are BH (t) 1 http://healpix.sourceforge.net 13 evaluated by h i 2 XL (t) − X(t) L2 (S2 )  Z 2 XL (t, x) − X(t, x) dµ(x) =E S2 " # N 2 1 X ≈E XL (t, xi ) − X(t, xi ) N kXL (t) − X(t)k2L2 (Ω×S2 ) = E ≈ 1 b NN i=1 b N N XX n=1 i=1 2 XL (t, ω bn , xi ) − X(t, ω bn , xi ) , where the third line discretizes the integral on S2 by the HEALPix points xi with equal b realizations. weights 1/N , and the last line approximates the expectation by the mean of N In a similar way, we can estimate the mean square approximation error between XL (t + h) and XL (t) for t ≥ 0 and h > 0. For each realization and given time t, the fractional stochastic integrals in (4.8) in the expansion of XL (t) in (4.12) are simulated as independent, normally distributed random variables with means zero and variances Aℓ in (4.6). b realizations Using the fast spherical Fourier transform, the computational steps for N   √ b of XL (t) evaluated at N points are O N N log N . The simulations were carried out on a desktop computer with Intel Core i7-6700 CPU @ 3.47GHz with 32GB RAM under the Matlab R2016b environment. b = 100 realizations of the truncated KarhunenFigure 1a shows the mean L2 -errors of N Loève solution XL (t) with degree L up to 800 from the approximated solution XL0 (t), of the fractional SPDE (1.1) with the Brownian motion B1/2 (t), for r = 1.5 and 2.5 and (α, γ) = (0.8, 0.8) at t = t0 = 10−5 . b = 100 realizations of the truncated KarhunenFigure 1b shows the mean L2 -errors of N Loève expansion XL (t) with degree L up to 800 from the approximated solution XL0 (t), of the fractional SPDE with the fractional Brownian motion BH (t) with Hurst index H = 0.8, for r = 1.5 and 2.5 and (α, γ) = (0.5, 0.5) at t = t0 = 10−5 . b = 100 The green and yellow points in each picture in Figure 1 show the L2 -errors of N realizations of XL (t). For each L = 1, . . . , 1000, the sample means of the L2 -errors for r = 1.5 and 2.5 are shown by the red triangle and the brown hexagon respectively. In the log-log plot, the blue and cyan straight lines which show the least squares fitting of the mean L2 -errors give the numerical estimates of convergence rates for the approximation of XL (t) to XL0 (t). The results show that the convergence rate of the mean L2 -error of XL (t) is close to the theoretical rate L−r (r = 1.5 and 2.5) for each triple of (H, α, γ) = (0.5, 0.8, 0.8) and (0.8, 0.5, 0.5). This indicates that the Hurst index H for the fBm BH (t) and the index α, γ for the fractional diffusion operator ψ(−∆S2 ) have no impact on the convergence rate of the L2 -error of the truncated solution. b = 100 realizations of the Figure 2 shows the mean square approximation errors of N truncated Karhunen-Loève expansion XL (t + h) from XL (t) with degree L = 1000 of the fractional SPDE with the fractional Brownian motion BH (t) with Hurst index H = 0.5 and H = 0.9, for r = 1.5 and (α, γ) = (0.8, 0.8) at t = t0 = 10−5 and time increment h ranging from 10−7 to 10−1 . The green points in each picture in Figure 2 show the (sample) mean square approxib = 100 realizations of XL (t + h). The blue straight line which shows the mation errors of N least squares fitting of the mean square approximation errors gives the numerical estimate of the convergence rate for the approximation of XL (t + h) to XL (t) in time increment h. 14 10 0 10 0 10 -1 10 -1 10 -2 10 -2 10 -3 10 -3 -4 10 -4 10 -5 10 -5 10 -6 10 -6 10 -7 10 -7 -8 10 -8 10 10 10 -9 10 0 10 1 10 2 10 -9 10 0 10 3 (a) H = 0.5, α = 0.8, γ = 0.8 10 1 10 2 10 3 (b) H = 0.8, α = 0.5, γ = 0.5 Figure 1: (a)–(b) show the mean truncated L2 -errors of the Karhunen-Loève approximations XL (t) with degree L up to 800 at t = t0 = 10−5 , for (H, α, γ) = (0.5, 0.8, 0.8) and (H, α, γ) = (0.8, 0.5, 0.5) respectively. The X-axis is the degree L and the Y -axis indicates the L2 -errors. 10 -1 10 -1 10 -2 10 -2 10 -3 10 -3 10 -4 10 -4 10 -5 10 -5 10 -6 10 -6 10 -7 10 -7 10 -6 10 -5 10 -4 10 -3 10 -2 10 -7 10 -7 10 -1 (a) H = 0.5, α = 0.8, γ = 0.8 10 -6 10 -5 10 -4 10 -3 10 -2 10 -1 (b) H = 0.9, α = 0.8, γ = 0.8 Figure 2: (a)–(b) show the mean square approximation errors of the Karhunen-Loève approximations XL (t) with degree L = 1000 and (α, γ) = (0.8, 0.8) at t = t0 = 10−5 , for Hurst index H = 0.5 and 0.9 respectively. The X-axis is the time increments h ranging from 10−7 to 10−1 . For H = 0.9, Figure 2b shows that the convergence rate of the mean square approximation errors of XL (t + h) is close to the theoretical rate hH . For H = 0.5, Figure 2a shows that the convergence rate of the mean square approximation errors of XL (t + h) is close to the rate h as Corollary 4.11 suggests. The variance of the mean square approximation errors for H = 0.5 is larger than for H = 0.9 for given h. This illustrates that the Hurst index H for the fBm affects the smoothness of the evolution of the solution of the fractional SPDE (1.1) with respect to time t. Figures 3a and 3b illustrate realizations of the truncated solutions XL0 (t) and XL (t) with L0 = 1000 and L = 800 at t = t0 = 10−5 , evaluated at N = 12, 582, 912 HEALPix points. Figure 3c shows the corresponding pointwise errors between XL0 (t) and XL (t). It shows that the truncated solution XL (t) has good approximation to the solution X(t) and the pointwise errors which are almost uniform on S2 are very small compared to the values of XL (t). To understand further the interaction between this effect from the Hurst index H of fBm and the parameters (α, γ) from the diffusion operator, we generate realizations of X1000 (t) at time t = t0 = 10−5 for the cases (H, α, γ) = (0.9, 2, −2), (0.9, 1.5, −0.5) and 15 (a) XL0 , L0 = 1000 (b) XL , L = 800 (c) Errors XL − XL0 Figure 3: (a) and (b) show realizations of the truncated Karhunen-Loève expansion XL (t) with degree L = 800 for the solution of the fractional SPDE, where (α, γ) = (0.5, 0.5) and t = t0 = 10−5 . (c) shows the pointwise errors of (b) from (a). (a) X1000 (t), α = 2, γ = −2 (b) X1000 (t), α = 1.5, γ = −0.5 (c) X1000 (t), α = 1, γ = −0.5 Figure 4: (a), (b) and (c) show realizations of the truncated Karhunen-Loève expansion X1000 (t) of the solution of the fractional SPDE for (α, γ) = (2, −2), (1.5, −0.5) and (1, −0.5), where H = 0.9 and t = t0 = 10−5 . (0.9, 1, −0.5). These paths are displayed in Figure 4. We observe that these random fields have fluctuations (about the sample mean) of increasing size as α increases from 0.5 in Figure 3 to 1, 1.5 then 2 in Figure 4. In fact, the fluctuation is extreme when α + γ = 0. When α = 2, the density of the Riesz-Bessel distribution has sharper peaks and heavier tails as γ → −2. As explained in [5], the Lévy motion in the case α + γ = 0 is a compound Poisson process. The particles move through jumps, but none of the jumps is very large due to the parameter α = 2. Hence the distribution has finite moments of all orders. 5.2. CMB random field as initial condition The cosmic microwave background (CMB) is the radiation that was in equilibrium with the plasma of the early universe, decoupled at the time of recombination of atoms and free electrons. Since then, the electromagnetic wavelengths have been stretching with the expansion of the universe (for a description of the current standard cosmological model, see e.g. [15]). The inferred black-body temperature shows direction-dependent variations of up to 0.1%. The CMB map that is the sky temperature intensity of CMB radiation can be modelled as a realization of a random field T CMB on S2 . Study of the evolution of CMB field is critical to unveil important properties of the present and primordial universe [41, 43]. From the factors that are exponential in t in (4.5), it is apparent that within the normalized form of fractional SPDE that has been considered in (1.1), it is assumed that the variables X, x and t have already been rescaled to make them dimensionless. Now e for which the we consider the case that the variable X is replaced by temperature X dimensions of measurement have traditionally been written as Θ (see e.g. Fulford and 16 Broadbridge [21]). In its dimensional form, the fractional SPDE is e x) + dX(t, 1 e x) dt = σ(dt)H B H (1, x) (−ℓ2s ∆S2 )α/2 (I − ℓ2s ∆S2 )γ/2 X(t, ts where ∆S2 has dimension [L]−2 , where [L] stands for the unit of length, necessitating the appearance of a length scale ℓs and a time scale ts , in order for each term on the left hand side to have dimensions of temperature. The right side also has dimension of temperature, since for this fractional Brownian motion of temperature, σ = ΘT H and the random function B H (1, x) has variance 1. In this work we are considering ℓs to be the radius of the sphere which is thereafter assumed 1. Then one may choose dimensionless time t∗ = t/ts e ∗ (t) = X(t)/ e es with X es = σtH and dimensionless temperature X X s , so that the dimensionless variables satisfy the normalized equation (1.1) with a normalized (σ ∗ = 1) random forcing term. However, in physical descriptions it is sometimes convenient to choose other scales such as the mean CMB for temperature and the current age of the universe for time. In that case, the exponential factor exp(−ψ(λℓ )t/ts ) for decay of amplitudes in (4.5) would involve a time scale that is no longer set to be unity. We adopt the conformal time Z t dt′ , t≥0 η := η(t) := ′ 0 a(t ) to replace the cosmic time t in the equations, where a(t) is the scale factor of the universe at time t. By using η rather than t as the time coordinate of evolution in the fractional SPDE, the decrease of spectral amplitudes is in better agreement with current physical theory. We are concerned with the evolution of CMB before recombination that occurred at time η = η∗ . If the present time is set to be η0 = 1, then η∗ ≈ 2.735 × 10−5 . (We use 13.82 billion years, estimated by Planck 2015 results [46], as the age of the universe.) In the epoch of the radiation-dominated plasma universe, a(t) is proportional to t1/2 , and thus η is proportional to t1/2 , therefore proportional to a(t). Then, temperature varies in proportion to 1/t (e.g. refer to Weinberg [55]). Since the temperature is relatively uniform, all the amplitudes will vary approximately as 1/t, and the peaks in the power spectrum will vary as 1/t2 and thus in proportion to 1/η 4 (this does not take into account the motion of remnant acoustic waves). A large fraction of the radiation-dominated epoch passes by as η changes by 10−5 . In the following experiment, we examine the evolution by the fractional stochastic PDE for times a little beyond η∗ , as if the radiation energy remained dominant. The time scale ts can be estimated as follows. For η ≥ η∗ , let ∆η := η − η∗ . Using the CMB map (in Figure 5) at recombination time η∗ as the initial condition, the scale ts between the increment of conformal time ∆η and the evolution time t of the normalized equation (1.1) can be determined by matching the ratio of magnitudes of angular power e spectra of the evolutions X(∆η) = X(∆η/ts ) at ∆η = ∆η1 and ∆η2 and at degree ℓ, that is,  4 Cℓ (∆η2 /ts ) η1 . (5.3) = Cℓ (∆η1 /ts ) η2 d By (2.10) and the observation that exp −ψ(λℓ )(t + t0 ) (T 0 )ℓm Yℓ,m is the dominating term in (4.5), (5.3) can be approximated by   2 exp −ψ(λℓ )(∆η2 /ts + t0 ) aℓm (∆η2 /ts ) η1  = e−ψ(λℓ )(η2 −η1 )/ts , ≈ ≈ η2 aℓm (∆η1 /ts ) exp −ψ(λℓ )(∆η1 /ts + t0 ) where aℓm (t) is the Fourier coefficient of X(t) at degree (ℓ, m). This gives ts := ts (ℓ) ≈ (η2 − η1 )ψ(λℓ ) . 2 ln(η2 /η1 ) 17 (5.4) In the experiment, we use CMB data from Planck 2015 results, see [43]. The CMB data are located on S2 at HEALPix points as we used in Section 5.1. Figure 5 shows the CMB map at Nside = 1024 at 10 arcmin resolution with 12 × 10242 = 12, 582, 912 HEALPix points, see [44]. It is computed by SMICA, a component separation method for CMB data processing, see [9]. Figure 5: CMB map at 12, 582, 912 HEALPix points We use the angular power spectrum of CMB temperature intensities in Figure 5, obtained by Planck 2015 results [45], as the initial condition (the angular power spectrum of the initial Gaussian random field) of Cauchy problem (1.4). In the fractional SPDE (1.1), we take (α, γ, H) = (0.5, 0.5, 0.9) so that the fractional diffusion operator acts as the drifting term within an evolution equation that is wave-like. The long-tailed stochastic fluctuations take account of the turbulence within the hot plasma. For ℓ ≥ 0, let Dℓ := ℓ(ℓ + 1)Cℓ /(2π) be the scaled angular power spectrum. We take η1 = 1.001η∗ ≈ 2.743 × 10−5 and η2 = 1.1η∗ ≈ 3.014 × 10−5 , and then the first (highest) humps (at ℓ = 219) of the scaled angular power spectra Dℓ (∆η1 /ts ) and Dℓ (∆η2 /ts ) are expected to be 99.6% and 68.3% of that at recombination time η∗ respectively. The time scale can be determined by (5.4) taking ℓ = 219, then, ts = ts (219) ≈ 0.0032. The picture in Figure 6a shows a realization of the solution X1000 (∆η1 /ts ) at an early conformal time η1 = 1.001η∗ which is similar to the original CMB map in Figure 5. The picture of Figure 6b shows a realization of the solution X1000 (∆η2 /ts ) at η2 = 1.1η∗ . By Lemma 2.2, we estimate the angular power spectrum of solution X(t) by taking the mean of the squares of the Fourier coefficients aℓm (t) over integer orbital index m ∈ {−ℓ, −ℓ + 1, · · · , ℓ} and over N realizations: Cℓ (t) = ℓ N X ℓ X X   1 1 E |aℓm (t)|2 ≈ aℓm (t, ω bn ). 2ℓ + 1 N (2ℓ + 1) n=1 m=−ℓ m=−ℓ The reddish brown curve in Figure 7 shows the scaled angular power spectrum Dℓ , ℓ ≤ 1000, of CMB map at recombination time η∗ . The dots in orange around the reddish brown curve show the estimated the angular power spectrum Dℓ (∆η1 /ts ) of the solution X1000 (∆η1 /ts ) at evolution time ∆η1 = 0.001η∗ from the recombination time η∗ , by taking the sample mean of N = 100 realizations. It is observed that Dℓ (0.001η∗ /ts ) changes little from those of CMB at η∗ . The dots in blue show the estimated angular power spectrum Dℓ (∆η2 /ts ) of the solution X1000 (∆η2 /ts ) at ∆η2 = 0.1η∗ from η∗ . The first hump of Dℓ (0.1η∗ /ts ) (which appears at ℓ = 210) is about 69.8% of that at the recombination time. This is consistent with the theoretical estimation 68.3%. 18 (a) X1000 (∆η1 /ts ), η1 = 1.001η∗ (b) X1000 (∆η2 /ts ), η2 = 1.1η∗ Figure 6: (a)–(b) show realizations of the truncated Karhunen-Loève expansion XL (∆η/ts ) with degree L = 1000 at η = 1.001η∗ ≈ 2.743×10−5 and 1.1η∗ ≈ 3.014×10−5 for the solution of the fractional SPDE with Hurst index H = 0.9, and the CMB angular power spectrum Cℓ at recombination time η∗ ≈ 2.735 × 10−5 as the angular power spectrum for T0 in the initial condition, where (α, γ) = (0.5, 0.5), t0 = 10−7 and time scale ts ≈ 0.0032. Figure 7 also shows the estimated angular power spectrum for one realization of X1000 (∆η/ts ) at η = η1 and η2 in light blue and red points. They have large noises around the sample means of Dℓ (in orange and blue) when degree ℓ ≤ 400. 7000 6000 5000 4000 3000 2000 1000 0 2 200 400 600 800 1000 Figure 7: Scaled angular power spectrum Dℓ for CMB data at η∗ ≈ 2.735 × 10−5 , and sample means of Dℓ over N = 100 realizations at η1 = 1.001η∗ ≈ 2.743 × 10−5 (in orange) and η2 = 1.1η∗ ≈ 3.014 × 10−5 (in blue), and estimated Dℓ of one realization of X1000 (∆η/ts ) at η = η1 (in light blue) and η2 (in red) Figures 7 and 6 illustrate that the solution of the fractional SPDE (1.1) can be used to explore a possible forward evolution of CMB. Cosmological data typically have correlations over space-like separations, an imprint of quantum fluctuations and rapid inflation immediately after the big bang [25], followed by acoustic waves through the primordial ball of plasma. Fields at two points with space-like separation cannot be simultaneously modified by evolution processes that obey the currently applicable laws of relativity. Therefore it is inappropriate to apply Brownian motion 19 and standard diffusion models, with consequent unbounded propagation speeds, over cosmological distances. Although the phenomenological fractional SPDE models considered here are not relativistically invariant, they are a relatively simple device of maintaining long-range correlations. Acknowledgements This research was supported under the Australian Research Council’s Discovery Project DP160101366 and was supported in part by the La Trobe University DRP Grant in Mathematical and Computing Sciences. We are grateful for the use of data from the Planck/ESA mission, downloaded from the Planck Legacy Archive. Some of the results in this paper have been derived using the HEALPix [23]. This research includes extensive computations using the Linux computational cluster Raijin of the National Computational Infrastructure (NCI), which is supported by the Australian Government and La Trobe University. The authors would thank Zdravko Botev for his helpful discussion on simulations of fractional Brownian motions. The authors also thank Ming Li for helpful discussion. References [1] R. J. Adler (1981). The Geometry of Random Fields. John Wiley & Sons, Ltd., Chichester. [2] R. Andreev and A. Lang (2014). Kolmogorov-Chentsov theorem and differentiability of random fields on manifolds. Potential Anal., 41(3), 761–769. [3] J. M. Angulo, M. Y. Kelbert, N. N. Leonenko, and M. D. Ruiz-Medina (2008). Spatiotemporal random fields associated with stochastic fractional helmholtz and heat equations. Stoch. Environ. Res. Risk Assess., 22(1), 3–13. [4] V. V. Anh, N. N. Leonenko, and M. D. Ruiz-Medina (2016). Fractional-in-time and multifractional-in-space stochastic partial differential equations. Fract. Calc. Appl. Anal., 19(6), 1434–1459. [5] V. V. Anh and R. McVinish (2004). The Riesz-Bessel fractional diffusion equation. Appl. Math. Optim., 49(3), 241–264. [6] A. Beskos, J. Dureau, and K. Kalogeropoulos (2015). Bayesian inference for partially observed stochastic differential equations driven by fractional Brownian motion. Biometrika, 102(4), 809–827. [7] F. Biagini, Y. Hu, B. Øksendal, and T. Zhang (2008). Stochastic Calculus for Fractional Brownian Motion and Applications. Springer-Verlag London, Ltd., London. [8] D. R. Brillinger (1997). A particle migrating randomly on a sphere. J. Theoret. Probab., 10(2), 429–443. [9] J.-F. Cardoso, M. Le Jeune, J. Delabrouille, M. Betoule, and G. Patanchon (2008). Component separation with flexible models — Application to multichannel astrophysical observations. IEEE J. Sel. Top. Signal Process., 2(5), 735–746. [10] S. Castruccio and M. L. Stein (2013). Global space-time models for climate ensembles. Ann. Appl. Stat., 7(3), 1593–1611. [11] P. Cheridito, H. Kawaguchi, and M. Maejima (2003). Fractional Ornstein-Uhlenbeck processes. Electron. J. Probab., 8(3), 1–14. 20 [12] F. Dai and Y. Xu (2013). Approximation theory and harmonic analysis on spheres and balls. Springer, New York. [13] R. Dautray and J.-L. Lions (1990). Mathematical Analysis and Numerical Methods for Science and Technology. Vol. 3. Spectral Theory and Applications. Springer-Verlag, Berlin. [14] NIST Digital Library of Mathematical Functions. http://dlmf.nist.gov/, Release 1.0.9 of 2014-08-29. Online companion to [40]. [15] S. Dodelson (2003). Modern Cosmology. Academic press. [16] M. D’Ovidio (2014). Coordinates changed random fields on the sphere. J. Stat. Phys., 154(4), 1153–1176. [17] M. D’Ovidio, N. Leonenko, and E. Orsingher (2016). Fractional spherical random fields. Statist. Probab. Lett., 116, 146–156. [18] T. E. Duncan, J. Jakubowski, and B. Pasik-Duncan (2006). Stochastic integration for fractional Brownian motion in a Hilbert space. Stoch. Dyn., 6(1), 53–75. [19] T. E. Duncan, B. Pasik-Duncan, and B. Maslowski (2002). Fractional Brownian motion and stochastic equations in Hilbert spaces. Stoch. Dyn., 2(2), 225–250. [20] R. Durrer (2008). The Cosmic Microwave Background. Cambridge University Press, New York. [21] G. R. Fulford and P. Broadbridge (2002). Industrial Mathematics: Case Studies in the Diffusion of Heat and Matter. Cambridge University Press. [22] Q. T. L. Gia, I. H. Sloan, Y. G. Wang, and R. S. Womersley (2017). Needlet approximation for isotropic random fields on the sphere. J. Approx. Theory, 216, 86 – 116. [23] K. M. Górski, E. Hivon, A. J. Banday, B. D. Wandelt, F. K. Hansen, M. Reinecke, and M. Bartelmann (2005). HEALPix: A framework for high-resolution discretization and fast analysis of data distributed on the sphere. Astrophys. J., 622(2), 759. [24] W. Grecksch and V. V. Anh (1999). A parabolic stochastic differential equation with fractional Brownian motion input. Statist. Probab. Lett., 41(4), 337–346. [25] A. H. Guth (1997). The Inflationary Universe: The Quest for a New Theory of Cosmic Origins. Basic Books. [26] D. T. Hristopulos (2003). Permissibility of fractal exponents and models of bandlimited two-point functions for fGn and fBm random fields. Stoch. Environ. Res. Risk Assess., 17(3), 191–216. [27] Y. Hu, Y. Liu, and D. Nualart (2016). Rate of convergence and asymptotic error distribution of Euler approximation schemes for fractional diffusions. Ann. Appl. Probab., 26(2), 1147–1207. [28] Y. Inahama (2013). Laplace approximation for rough differential equation driven by fractional Brownian motion. Ann. Probab., 41(1), 170–205. [29] A. I. Kamzolov (1982). The best approximation of classes of functions Wαp (Sn ) by polynomials in spherical harmonics. Mat. Zametki, 32(3), 285–293, 425. 21 [30] J. Keiner, S. Kunis, and D. Potts (2007). Efficient reconstruction of functions on the sphere from scattered data. J. Fourier Anal. Appl., 13(4), 435–458. [31] D. P. Kroese and Z. I. Botev (2015). Spatial process simulation. In Stochastic geometry, spatial statistics and random fields, volume 2120 of Lecture Notes in Math., pages 369– 404. Springer, Cham. [32] M. Lachièze-Rey and E. Gunzig (1999). The Cosmological Background Radiation. Cambridge University Press, New York. [33] A. Lang and C. Schwab (2015). Isotropic Gaussian random fields on the sphere: Regularity, fast simulation and stochastic partial differential equations. Ann. Appl. Probab., 25(6), 3047–3094. [34] S. J. Lin (1995). Stochastic analysis of fractional Brownian motions. Stochastics Stochastics Rep., 55(1-2), 121–140. [35] T. J. Lyons (1998). Differential equations driven by rough signals. Iberoamericana, 14(2), 215–310. Rev. Mat. [36] D. Marinucci and G. Peccati (2011). Random Fields on the Sphere. Representation, Limit Theorems and Cosmological Applications. Cambridge University Press, Cambridge. [37] J. Mémin, Y. Mishura, and E. Valkeila (2001). Inequalities for the moments of Wiener integrals with respect to a fractional Brownian motion. Statist. Probab. Lett., 51(2), 197–206. [38] C. Müller (1966). Spherical Harmonics. Springer-Verlag, Berlin-New York. [39] B. Øksendal (2003). Stochastic Differential Equations. An Introduction with Applications. Universitext. Springer-Verlag, Berlin, sixth edition. [40] F. W. J. Olver, D. W. Lozier, R. F. Boisvert, and C. W. Clark, editors (2010). NIST Handbook of Mathematical Functions. Cambridge University Press, New York, NY. Print companion to [14]. [41] E. Pierpaoli, D. Scott, and M. White (2000). How flat is the universe? 287(5461), 2171–2172. Science, [42] V. Pipiras and M. S. Taqqu (2000). Integration questions related to fractional Brownian motion. Probab. Theory Related Fields, 118(2), 251–291. [43] Planck Collaboration and Adam, R. et al. (2016). Planck 2015 results - I. Overview of products and scientific results. Astron. Astrophys., 594, A1. [44] Planck Collaboration and Adam, R. et al. (2016). Planck 2015 results - IX. Diffuse component separation: CMB maps. Astron. Astrophys., 594, A9. [45] Planck Collaboration and Aghanim, N. et al. (2016). Planck 2015 results - XI. CMB power spectra, likelihoods, and robustness of parameters. Astron. Astrophys., 594, A11. [46] Planck Collaboration and Ade, P. A. R. et al. (2016). Planck 2015 results - xiii. cosmological parameters. Astron. Astrophys., 594:A13. [47] V. Rokhlin and M. Tygert (2006). Fast algorithms for spherical harmonic expansions. SIAM J. Sci. Comput., 27(6), 1903–1928. 22 [48] J. A. Rubiño Martín, R. Rebolo, and E. Mediavilla (2013). The Cosmic Microwave Background: From Quantum Fluctuations to the Present Universe. Cambridge University Press, Cambridge. [49] W. Rudin (1950). Uniqueness theory for Laplace series. Trans. Amer. Math. Soc., 68, 287–303. [50] E. M. Stein (1970). Singular integrals and differentiability properties of functions. Princeton University Press, Princeton, N.J.. [51] M. L. Stein (2007). Spatial variation of total column ozone on a global scale. Ann. Appl. Stat., 1(1), 191–210. [52] M. L. Stein, J. Chen, and M. Anitescu (2013). Stochastic approximation of score functions for Gaussian processes. Ann. Appl. Stat., 7(2), 1162–1191. [53] G. Szegő (1975). Orthogonal Polynomials. American Mathematical Society, Providence, R.I.. [54] K. Wang and L. Li (2006). Harmonic Analysis and Approximation on the Unit Sphere. Science Press, Beijing. [55] S. Weinberg (2008). Cosmology. Oxford University Press. Appendix A. Proofs Proof of Section 3 Proof of Proposition 3.4. By Definition 3.3, Parseval’s identity for the orthonormal basis Yℓ,m and [37, Theorem 1.1], " Z "Z # # ℓ ∞ X 2 2 t t X H E g(u) dBH (u) E (u) g(u) dBℓm = s L2 (S2 ) s ℓ=0 m=−ℓ ≤ CH Z s t |g(u)| 1 H thus completing the proof. du 2H X ∞ (2ℓ + 1)Aℓ , ℓ=0 Proofs of Section 4 Proof of Proposition 4.1. For t ≥ 0, x, y ∈ S2 , by (4.3), E [u(t, x)u(t, y)] # "∞ ℓ ∞ ℓ′ X X X X d d e−ψ(λℓ )t (T e−ψ(λℓ′ )t (T =E 0 )ℓm Yℓ,m (x) 0 )ℓ′ m′ Yℓ′ ,m′ (y) ℓ=0 m=−ℓ = ∞ ∞ X X ℓ X ℓ′ =0 m′ =−ℓ′ ℓ′ X ℓ=0 ℓ′ =0 m=−ℓ m′ =−ℓ′ i h d d e−ψ(λℓ )t e−ψ(λℓ′ )t E (T 0 )ℓm (T0 )ℓ′ m′ Yℓ,m (x)Yℓ′ ,m′ (y). Since T0 is a 2-weakly isotropic Gaussian random field, by Lemma 2.2, E [u(t, x)u(t, y)] = = ℓ ∞ X X e−2ψ(λℓ )t Cℓ′ Yℓ,m (x)Yℓ,m (y) ℓ=0 m=−ℓ ∞ X e−2ψ(λℓ )t Cℓ′ (2ℓ ℓ=0 23 + 1)Pℓ (x · y), where the second equality uses the addition theorem in (2.4). This means that the covariance E [u(t, x)u(t, y)] is a zonal function and is thus rotationally invariant. Thus, u(t, ·) is a 2-weakly isotropic Gaussian random field on S2 . On the other hand, for ℓ, ℓ′ ∈ N0 , m, = −ℓ, . . . , ℓ and m′ = −ℓ′ , . . . , ℓ′ , by the 2-weak isotropy of T0 , Lemma 2.2 and (4.3), i i h h d d d u(t) d ′ ′ = e−ψ(λℓ )t e−ψ(λℓ′ )t E (T E u(t) ) (T ) 0 ℓm 0 ℓ′ m′ ℓm ℓm = e−2ψ(λℓ )t Cℓ′ δℓℓ′ δmm′ , thus proving (4.4). Proof of Theorem 4.2. One can rewrite the equation (1.1) as Z t ψ(−∆S2 )X(u) du + BH (t). X(t) = u(t0 ) − 0 Then by Definition 3.2, ∞ X ℓ X ℓ=0 m=−ℓ = hX(t), Yℓ,m iYℓ,m ∞ X ℓ  X ℓ=0 m=−ℓ = ℓ  ∞ X X ℓ=0 m=−ℓ hu(t0 ), Yℓ,m i − Z 0 t hX(u), Yℓ,m iψ(−∆S2 ) du + hu(t0 ), Yℓ,m i − ψ(λℓ ) Z t hX(u), Yℓ,m i du + 0  H (t) Bℓm  H (t) Bℓm Yℓ,m (A.1) Yℓ,m. By the uniqueness of the spherical harmonic representation, see e.g. [49], solving (A.1) is equivalent to solving the equations Z t H (t) hX(t), Yℓ,m i = hu(t0 ), Yℓ,m i − ψ(λℓ ) hX(u), Yℓ,m i du + Bℓm 0 for m = −ℓ, . . . , ℓ, ℓ ∈ N0 . Using the variation of parameters, we can solve this integral equation (of t) path-wise to obtain, for m = −ℓ, . . . , ℓ, ℓ ∈ N0 , Z t H −ψ(λℓ )t (u), e−ψ(λℓ )(t−u) dBℓm hX(t), Yℓ,m i = e hu(t0 ), Yℓ,m i + 0 see e.g. [11, 33]. Using (3.2), X(t) = e ℓ=0 d e−ψ(λℓ )(t+t0 ) (T 0 )ℓm Yℓ,m −ψ(λℓ )t ℓ=0 m=−ℓ = Z ∞ X ℓ  X ∞  X ℓ X m=−ℓ + p Aℓ Z hu(t0 ), Yℓ,m i + t 0 0 t  H e−ψ(λℓ )(t−u) dBℓm (u) Yℓ,m 1 e−ψ(λℓ )(t−u) dβℓ0 (u) Yℓ,0 Z t ℓ √ X 1 + 2 (u) ReYℓ,m e−ψ(λℓ )(t−u) dβℓm 0 m=1 + Z t −ψ(λℓ )(t−u) e 0 2 (u) ImYℓ,m dβℓm where the second equality uses (4.3), which completes the proof. 24   , Proof of Proposition 4.3. For H = 1/2, Itô’s isometry, see e.g. [39, Lemma 3.1.5] and [33], gives "Z # Z t  2 t 2 −ψ(λℓ )(t−u) i −ψ(λℓ )(t−u) E e dβℓm (u) =E e du s = Z s t e−2ψ(λℓ )(t−u) du s 1 − e−2ψ(λℓ )(t−s) 2ψ(λℓ ) 2 H = σℓ,t−s . = For 1/2 < H < 1, by [37, Eq. 1.3], "Z # 2 t E s (A.2) i (u) e−ψ(λℓ )(t−u) dβℓm = H(2H − 1) Z tZ s t e−ψ(λℓ )(2t−u−v) |u − v|2H−2 du dv s s+t Z x−2s  Z Z 2t Z 2t−x e−ψ(λℓ )(2t−x) y 2H−2 dy dx e−ψ(λℓ )(2t−x) y 2H−2 dy dx + = H(2H − 1) s+t 0 2s 0  Z s+t Z 2t −ψ(λℓ )(2t−x) 2H−1 −ψ(λℓ )(2t−x) 2H−1 e (2t − x) dx e (x − 2s) dx + =H s+t 2s  Z t−s Z t−s −ψ(λℓ )u 2H−1 −ψ(λℓ )(2t−2s−u) 2H−1 e u du e u du + =H 0 0   Z 1 Z 1 2H −ψ(λℓ )(t−s)u 2H−1 −2ψ(λℓ )(t−s) ψ(λℓ )(t−s)u 2H−1 = H(t − s) e u du e e u du + 0 0   = HΓ(2H)(t − s)2H e−2ψ(λℓ )(t−s) γ ∗ (2H, −ψ(λℓ )(t − s)) + γ ∗ (2H, ψ(λℓ )(t − s)) , (A.3) where the second equality uses integration by substitution x = u + v and y = u − v. By e.g. [42, p. 253], (A.2) and (A.3), the fractional stochastic integral in (4.9) is a 2 H Gaussian random variable with mean zero and variance σℓ,t−s given by (4.6) (and (4.7)) for H ∈ [1/2, 1). The upper bound in (4.10) is by [37, Theorem 1.1]: "Z # 2 2 =E σℓ,t−s ≤ CH t s Z i (u) e−ψ(λℓ )(t−u) dβℓm t e−ψ(λℓ )(t−u) s ≤ CH (t − s)2H , 1 H du 2H thus completing the proof. Proof of Proposition 4.4. We √ first consider for H = 1/2. For ℓ = 0, the statement immediately follows from σ0,t = t. For ℓ ≥ 1, it follows from (4.7) that s  p p 1 1 − e−2ψ(λℓ )(t+h) − 1 − e−2ψ(λℓ )t . (A.4) |σℓ,t+h − σℓ,t | = 2ψ(λℓ ) 25 When t = 0, the formula (A.4) with the mean-value theorem gives as h → 0+ that there exists h1 ∈ (0, h) such that s p 1 ≤ e−ψ(λℓ )h1 h1/2 ≤ h1/2 . |σℓ,t+h − σℓ,t | = 1 − e−2ψ(λℓ )h 2ψ(λℓ ) In a similar way, when t > 0 and h → 0+, there exists t1 ∈ (t, t + h) such that s s ψ(λℓ ) ψ(λℓ ) |σℓ,t+h − σℓ,t | = e−2ψ(λℓ )t h. e−2ψ(λℓ )t1 h ≤ −2ψ(λ )t 1 ℓ 2(1 − e 2(1 − e−2ψ(λℓ )t ) ) For 1/2 < H < 1, Z t+h 0 i (u) e−ψ(λℓ )(t+h−u) dβℓm Z Z t −ψ(λℓ )h −ψ(λℓ )(t−u) i =e e dβℓm (u) + 0 t+h t i e−ψ(λℓ )(t+h−u) dβℓm (u). This with the triangle inequality for L2 (Ω) gives |σℓ,t+h − σℓ,t | Z t+h i = (u) e−ψ(λℓ )(t+h−u) dβℓm ≤ = Z 0 t+h 0  i (u) − e−ψ(λℓ )(t+h−u) dβℓm Z t 0 t 0 Z t t+h Z 0 t 0 i (u) e−ψ(λℓ )(t−u) dβℓm L2 (Ω) i (u) e−ψ(λℓ )(t−u) dβℓm Z Z t i e−ψ(λℓ )h − 1 (u) + e−ψ(λℓ )(t−u) dβℓm ≤ 1 − e−ψ(λℓ )h + L2 (Ω) − Z L2 (Ω) t+h t i e−ψ(λℓ )(t+h−u) dβℓm (u) L2 (Ω) i (u) e−ψ(λℓ )(t−u) dβℓm L2 (Ω) i (u) e−ψ(λℓ )(t+h−u) dβℓm . L2 (Ω) This with (4.10) and the mean-value theorem gives that as h → 0+, there exists h2 ∈ (0, h) such that    |σℓ,t+h − σℓ,t | ≤ CH ψ(λℓ )e−ψ(λℓ )h2 h tH + hH ≤ CH ψ(λℓ )h1−H tH + 1 hH , thus completing the proof. Proof of Theorem 4.7. The proof views the solution at given time t as a random field on the sphere and uses an estimate of the convergence rate of the truncation errors of a 2-weakly isotropic Gaussian random field on S2 . P e1 (t) := ∞ X1,ℓ (t) and X e2 (t) := P∞ X2,ℓ (t). Proposition 4.3 with [36, TheLet X ℓ=0 ℓ=0 e2 (t) is a 2-weakly isotropic Gaussian random field with orem 5.13] shows that for t ≥ 0, X 2 } angular power spectrum {Aℓ σℓ,t ℓ∈N0 . By (4.7) and (2.3) for H = 1/2 and by (4.10) for 1/2 < H < 1, ∞ ∞ X X 2 2r+1 Aℓ σℓ,t ℓ ≤ Cα,γ,t Aℓ (1 + ℓ)2r+1 < ∞. ℓ=0 ℓ=0 26 e2 (t) ∈ Wr (S2 ) P-a. s. Then, [33, Propositions 5.2] gives This and [22, Corollary 4.4] imply X 2 e2 (t) − X where the constant C = Cr r Var h L X X2,ℓ (t) L2 (Ω×S2 ) ℓ=0 e2 (t) X Wr2 (S2 ) i ≤ CL−r , (A.5) depends on a constant Cr and the stan- e2 (t), where Cr depends only on r. dard deviation of the Sobolev norm of X On the other hand, e1 (t) − X L X X1,ℓ (t) ℓ=0 L2 (Ω×S2 ) ∞ X = ℓ X ℓ=L+1 m=−ℓ −ψ(λL )t ≤e e−ψ(λℓ )t hu(t0 ), Yℓ,m iYℓ,m L2 (Ω×S2 ) ku(t0 )kL2 (Ω×S2 ) ≤ CL−r ku(t0 )kL2 (Ω×S2 ) , (A.6) where the second line uses that ψ(λℓ ) is increasing with respect to ℓ, see (2.2), and in the last inequality, the constant C depends only on α, γ and t, and we used (2.3). This with (A.5) gives (4.13). e2 (t) which is driven Remark. In the proof of Theorem 4.7, the L2 -error in (A.5) for X H by the fBm B (t) is the dominating error term. The constant C in (A.5) depends on the e2 (t). This implies that Theorem 4.7 only needs standard deviation of the Sobolev norm of X the condition on the convergence rate of the variances Aℓ of the fBm (but does not need the condition on the initial random field T0 ). The constant C in (A.6) can be estimated by C ≥ max L≥1 Lr eψ(λL )t . This implies ′ ′ C ≥ e−C (C ′ /t)C , where C ′ := r/(α + γ) and we used (2.3). This shows that when time t → 0+, the constant C in (A.6) is not negligible. Proof of Lemma 4.8. For t ≥ 0, h > 0, by (4.12), Xℓ (t + h) = e−ψ(λℓ )h Xℓ (t) p Z + Aℓ t+h t 1 (u) Yℓ,0 e−ψ(λℓ )(t+h−u) dβℓ0 Z ℓ √ X + 2 m=1 + t+h t Z 1 e−ψ(λℓ )(t+h−u) dβℓm (u) ReYℓ,m t+h t 2 (u) ImYℓ,m e−ψ(λℓ )(t+h−u) dβℓm By Proposition 4.3, for m = −ℓ, . . . , ℓ, i = 1, 2, Z t t+h i 2 e−ψ(λℓ )(t+h−u) dβℓm (u) ∼ N (0, σℓ,h ), 27  . (A.7) 2 is given by (4.6). Then (A.7) can be written as where σℓ,h Xℓ (t + h) = e−ψ(λℓ )h Xℓ (t)  p 1 (t) Yℓ0 + Aℓ σℓ,h Uℓ0 ℓ √ X  2 1 + 2 (t) ImYℓ,m , (t) ReYℓ,m + Uℓm Uℓm m=1 1 (t), U 2 (t))|m = −ℓ, . . . , ℓ, ℓ ∈ N } is a sequence of independent and standard where {(Uℓm 0 ℓm normally distributed random variables. This and (4.14) give (4.17). Proof of Theorem 4.9. By (4.18) and (4.7), Then, p  Xℓ (t + h) − Xℓ (t) = e−ψ(λℓ )(t+h) − e−ψ(λℓ )t Xℓ (0) + Aℓ (σℓ,t+h − σℓ,t )Uℓ (0). X(t + h) − X(t) ∞ X  Xℓ (t + h) − Xℓ (t) = ℓ=0 = ∞ X ℓ=0 ∞ X p  e−ψ(λℓ )(t+h) − e−ψ(λℓ )t Xℓ (0) + (σℓ,t+h − σℓ,t ) Aℓ Uℓ (0). ℓ=0 Taking the squared L2 (S2 )-norms of both sides of this equation with Parseval’s identity gives X(t + h) − X(t) = ∞ X ℓ X ℓ=0 m=−ℓ + e−ψ(λℓ )(t+h) − e−ψ(λℓ )t ∞ X ℓ X ℓ=0 m=−ℓ ≤ h2 ≤ h2 2 L2 (S2 ) 2 [ u(t 0 )ℓm (σℓ,t+h − σℓ,t )2 Aℓ U[ ℓ (0)ℓm ℓ ∞ X X [ e−2ψ(λℓ )t2 u(t 0 )ℓm 2 2 + Ch2H ℓ X ℓ ∞ X X (1 + ψ(λℓ ))2 Aℓ U[ ℓ (0)ℓm 2 ℓ=0 m=−ℓ ℓ=0 m=−ℓ ∞ X 2 [ u(t 0 )ℓm ℓ=0 m=−ℓ 2 + Ch2H ∞ X ℓ X 2 (1 + ψ(λℓ ))2 Aℓ U[ ℓ (0)ℓm , (A.8) ℓ=0 m=−ℓ where the first inequality uses Corollary 4.5 and the mean value theorem for the function f (t) := e−ψ(λℓ )t and t2 is a real number in (t, t + h). By (A.8), (4.15), (2.3) and Propositions 4.1 and 4.4, the squared mean quadratic variation of X(t + h) from X(t) is, as h → 0+, h i 2 E X(t + h) − X(t) L2 (S2 ) X ℓ ∞ X ℓ ∞ X i h i X h 2 2 2 [ [ (1 + ψ(λ )) A E U (0) + E u(t ) ≤ Ch2H 0 ℓm ℓ ℓ ℓ ℓm ℓ=0 m=−ℓ ℓ=0 m=−ℓ ∞ X  2H (2ℓ + 1) Cℓ + (1 + ψ(λℓ ))2 Aℓ ≤ Ch ℓ=0 2H = Ch , 28 where the constant C in the last line depends only on α, γ, t, Cℓ and Aℓ . This completes the proof. 29
10math.ST
On Competitive Algorithms for Approximations of Top-k-Position Monitoring of Distributed Streams arXiv:1601.04448v3 [cs.DS] 27 Oct 2016 Alexander Mäcker Manuel Malatyali Friedhelm Meyer auf der Heide Heinz Nixdorf Institute & Computer Science Department Paderborn University, Germany {amaecker, malatya, fmadh}@hni.upb.de Abstract Consider the continuous distributed monitoring model in which n distributed nodes, receiving individual data streams, are connected to a designated server. The server is asked to continuously monitor a function defined over the values observed across all streams while minimizing the communication. We study a variant in which the server is equipped with a broadcast channel and is supposed to keep track of an approximation of the set of nodes currently observing the k largest values. Such an approximate set is exact except for some imprecision in an ε-neighborhood of the k-th largest value. This approximation of the Top-k-Position Monitoring Problem is of interest in cases where marginal changes (e.g. due to noise) in observed values can be ignored so that monitoring an approximation is sufficient and can reduce communication. This paper extends our results from [6], where we have developed a filter-based online algorithm for the (exact) Top-k-Position Monitoring Problem. There we have presented a competitive analysis of our algorithm against an offline adversary that also is restricted to filter-based algorithms. Our new algorithms as well as their analyses use new methods. We analyze their competitiveness against adversaries that use both exact and approximate filter-based algorithms, and observe severe differences between the respective powers of these adversaries. 1 Introduction We consider a setting in which n distributed nodes are connected to a central server. Each node continuously observes a data stream and the server is asked to keep track of the value of some function defined over all streams. In order to fulfill this task, nodes can communicate to the server, while the server can employ a broadcast channel to send a message to all nodes. In an earlier paper [6], we introduced and studied a problem called Top-k-Position Monitoring in which, at any time t, the server is interested in monitoring the k nodes that are observing the largest values at this particular time t. As a motivating example, picture a scenario in which a central load balancer within a local cluster of webservers is interested in keeping track of those nodes which are facing the highest loads. We proposed an algorithm based on the notion of filters and analyzed its competitiveness with respect to an optimal filter-based offline algorithm. Filters are assigned by the server and are used as a means to indicate the nodes when they can resign to send updates; this particularly reduces communication when observed values are “similar” to the values observed in the previous time steps. In this paper, we broaden the problem and investigate the monitoring of an approximation of the Top-k-Positions. We study the problem of ε-Top-k-Position Monitoring, in which the server is supposed to maintain a subset of k nodes such that all nodes observing “clearly larger” values than the node which observed the k-th largest value are within this set and no node observing a “clearly smaller” value belongs to this set. Here, smaller/larger is meant to be understood with respect to ε and the k-th largest value observed. A detailed definition is given in Sect. 2. Relaxing the problem in this direction can reduce communication while, in many cases, marginal or insignificant changes (e.g. due to noise) This work was partially supported by the German Research Foundation (DFG) within the Priority Program “Algorithms for Big Data” (SPP 1736) and by the EU within FET project MULTIPLEX under contract no. 317532. 1 in observed values can be ignored and justify the sufficiency of an approximation. Examples are situations where lots of nodes observe values oscillating around the k-th largest value and where this observation is not of any qualitative relevance for the server. We design and analyze algorithms for ε-Top-k-Position Monitoring and, although we use these very tools of filters and competitive analysis [6], the imprecision/approximation requires fundamentally different online strategies for defining filters in order to obtain efficient solutions. 1.1 Our Contribution In this paper we investigate a class of algorithms that are based on using filters and study their efficiency in terms of competitive analysis. As a first technical contribution we analyze an algorithm (Sect. 3) which allows the server to decide the logical disjunction of the (binary) values observed by the distributed nodes. It uses a logarithmic number of rounds and a constant number of messages on expectation. As a by-product, using this algorithm, the result on the competitiveness of the filter-based online algorithm in [6] can be reduced from O(k log n + log ∆ log n) to O(k log n + log ∆), for observed values from {0, 1, . . . , ∆}. Second, we also propose an online algorithm (Sect. 4) that is allowed to introduce an error of ε ∈ (0, 1/2] in the output and compare it to an offline algorithm that solves the exact Top-k-Position Monitoring problem. We show that this algorithm is O(k log n + log log ∆ + log 1ε )-competitive. Note that this imprecision allows to bring the log ∆ in the upper bound down to log log ∆ for any constant ε. We also investigate the setting in which also the offline algorithm is allowed to have an error in the output (Sect. 5). We first show that these results are not comparable to previous results; we prove a lower bound on the competitiveness of Ω(n/k). Our third and main technical contribution is an algorithm with a competitiveness of O(n2 log(ε∆) + n log2 (ε∆) + log log ∆ + log 1ε ) if the online and the offline algorithm may use an error of ε. However, if we slightly decrease the allowed error for the offline algorithm, the lower bound on the competitiveness of Ω(n/k) still holds, while the upper bound is reduced to O(n + k log n + log log ∆ + log 1ε ). 1.2 Related Work Efficient computation of functions on big datasets in terms of streams has turned out to be an important topic of research with applications in network traffic analysis, text mining or databases (e.g. [9] and [7]). The Continuous Monitoring Model, which we consider in this paper, was introduced by Cormode et al. [2] to model systems comprised of a server and n nodes observing distributed data streams. The primary goal addressed within this model is the continuous computation of a function depending on the information available across all n data streams up to the current time at a dedicated server. Subject to this main concern, the minimization of the overall number of messages exchanged between the nodes and the server usually determines the efficiency of a streaming algorithm. We refer to this model and enhance it by a broadcast channel as proposed by Cormode et al. in [3]. An important class of problems investigated in literature are threshold computations where the server is supposed to decide whether the current function value has reached some given threshold τ . For monotone functions such as monitoring the number of distinct values or the sum over all values, exact characterizations in the deterministic case are known [2, 3]. However, non-monotone functions, e.g., the entropy [1], turned out to be much more complex to handle. A general approach to reduce the communication when monitoring distributed streams is proposed in [12]. Zhang et al. introduce the notion of filters, which are also an integral part of our algorithms. They consider the problem of continuous skyline maintenance, in which a server is supposed to continuously maintain the skyline of dynamic objects. As they aim at minimizing the communication overhead between the server and the objects, they use a filter method that helps in avoiding the transmission of updates in case these updates cannot influence the skyline. More precisely, the objects are points of a d-dimensional space and filters are hyper-rectangles assigned by the server to the objects such that as long as these points are within the assigned hyper-rectangle, updates need not be communicated to the server. Despite its online nature, by now streaming algorithms are barely studied in terms of competitiveness. In their work [11], Yi and Zhang were the first to study streaming algorithms with respect to their competitiveness and recently this approach was also applied in a few papers ([5, 10, 6, 4]). In their model [11], there is one node and one server and the goal is to keep the server informed about the current value of a function f : Z+ → Zd that is observed by the node and changes its value over time, while minimizing the number of messages. Yi and Zhang present an algorithm that 2 is O(d2 log(d · δ))-competitive if the last value received by the server might deviate by δ from the current value of f . Recently, Tang et al. [10] extended this work by Yi and Zhang for the two-party setting to the distributed case. They consider a model in which the server is supposed to track the current value of a (one-dimensional) function that is defined over a set of n functions observed at the distributed nodes. Among other things, they propose an algorithm for the case of a tree-topology in which the distributed nodes are the leaves of a tree connecting them to the server. They show that on any instance I their algorithm incurs communication cost that is by a factor of O(hmax log δ), where hmax represents the maximimum length of a path in the tree, larger than those of the best solution obtained by an online algorithm on I. Following the idea of studying competitive algorithms for monitoring streams and the notion of filters, Lam et al. [5] present an algorithm for online dominance tracking of distributed streams. In this problem a server always has to be informed about the dominance relationship between n distributed nodes each observing an online stream of d-dimensional values. Their algorithm is based on the idea of filters and they show that a mid-point strategy, which sets filters to be the mid-point between neighboring nodes, is O(d log U )-competitive with respect to the number of messages sent in comparison to an offline algorithm that sets filters optimally. While we loosely motivated our search for approximate solutions by noise in the introduction, in other problems noise is a major concern and explicitly addressed. For example, consider streaming algorithms for estimating statistical parameters like frequency moments [13]. In such problems, certain elements from the universe may appear in different forms due to noise and thus, should actually be treated as the same element. 2 Preliminaries In our setting there are n distributed nodes {1, . . . , n}. Each node i receives a continuous data stream (vi1 , vi2 , vi3 . . .), ′ which can be exclusively observed by node i. At time t, vit ∈ N is observed and no vit , t′ > t, is known. We omit the index t if it is clear from the context. Following the model in [3], we allow that between any two consecutive time steps, a communication protocol exchanging messages between the server and the nodes may take place. The communication protocol is allowed to use an amount of rounds which is polylogarithmic in n and max1≤i≤n (vit ). The nodes can communicate to the server while the server can communicate to single nodes or utilize a broadcast channel to communicate a message that is received by all nodes at the same time. These communication methods incur unit communication cost per message, we assume instant delivery, and a message at time t is allowed to have a size at most logarithmic in n and max1≤i≤n (vit ). Problem Description Consider the Top-k-Position Monitoring problem [6], in which the server is asked to keep track of the set of nodes currently holding the k largest values. We relax this definition and study an approximate variant of the problem in which this set is exact except for nodes in a small neighborhood around the k-th largest value. We denote by π(k, t) the node which observes the k-th largest value at time t and denote by top-k := {i ∈ {1, . . . , k} : π(i, t)} the nodes observing the k largest values. Given an error 0 < ε < 1, for a time t we denote 1 t by E(t) := ( 1−ε vπ(k,t) , ∞] the range of values that are clearly larger than the k-th largest value and by A(t) := 1 t t [(1 − ε)vπ(k,t) , 1−ε vπ(k,t) ] the ε-neighborhood around the k-th largest value. Furthermore, we denote by K(t) := {i : vit ∈ A(t)} the nodes in the ε-neighborhood around the k-th largest value. Then, at any time t, the server is supposed to know the nodes F (t) = FE (t) ∪ FA (t) = {i1 , . . . , ik } according to the following properties: 1. FE (t) = {i : vit ∈ E(t)} and 2. FA (t) ⊆ K(t) = {i : vit ∈ A(t)}, such that |FA (t)| = k − |FE (t)| holds. Denote by ∆ the maximal value observed by some node (which may not be known beforehand). We use F1 = F (t) if t is clear from the context, F2 = {1, . . . , n} \ F (t), and call F ∗ the output of an optimal offline algorithm. If the k-th t and the (k + 1)-st largest value differ by more than ε vπ(k,t) , F (t) coincides with the set in the (exact) Top-k-Position Monitoring problem and hence, F (t) is unique. We denote by σ(t) := |K(t)| the number of nodes at time t which are in the ε-neighborhood of the k-th largest value and σ := maxt σ(t). Note that |K(t)| = 1 implies that F (t) is unique. Furthermore for solving the exact Top-k-Position Monitoring problem we assume that the values are distinct (at least by using the nodes’ identifiers to break ties in case the same value is observed by several nodes). 3 2.1 Filter-Based Algorithms & Competitive Analysis A set of filters is a collection of intervals, one assigned to each node, such that as long as the observed values at each node are within its respective interval, the output F (t) need not change. For the problem at hand, this general idea of filters translates to the following definition. Definition 2.1. [6] For a fixed time t, a set of filters is defined as an n-tuple of intervals (F1t , . . . , Fnt ), Fi ⊆ N ∪ {∞} and vi ∈ Fi , such that as long as the value of node i only changes within its interval (i.e. vi ∈ Fi ), the value of the output F need not change. Observe that each pair of filters (Fi , Fj ) of nodes i ∈ F (t) and j ∈ / F (t) must be disjoint except for a small overlapping. This observation can be stated formally as follows. Observation 2.2. For a fixed time t, an n-tuple of intervals is a set of filters if and only if for all pairs i ∈ F (t) and j∈ / F (t) the following holds: vi ∈ Fi = [ℓi , ui ], vj ∈ Fj = [ℓj , uj ] and ℓi ≥ (1 − ε)uj . In our model, we assume that nodes are assigned such filters by the server. If a node observes a value that is larger than the upper bound of its filter, we say the node violates its filter from below. A violation from above is defined analogously. If such a violation occurs, the node may report it and its current value to the server. In contrast to [6], we allow the server to assign “invalid” filters, i.e., there are affected nodes that directly observe a filter-violation. However, for such an algorithm to be correct, we demand that the intervals assigned to the nodes at the end of the protocol at time t and thus, before observations at time t + 1, constitute a (valid) set of filters. We call such an algorithm filter-based. Note that the fact that we allow invalid filters (in contrast to [6]) simplifies the presentation of the algorithms in the following. However, using a constant overhead the protocols can be changed such that only (valid) filters are sent to the nodes. Competitiveness To analyze the quality of our online algorithms, we use analysis based on competitiveness and compare the communication induced by the algorithms to that of an adversary’s offline algorithm. Similar to [5] and [6], we consider adversaries that are restricted to use filter-based offline algorithms and hence, OPT is lower bounded by the number of filter updates. However, we compare our algorithms against several adversaries which differ in terms of whether their offline algorithm solves the exact Top-k-Position Monitoring Problem or ε-Top-k-Position Monitoring. The adversaries are assumed to be adaptive, i.e., values observed by a node are given by an adversary who knows the algorithm’s code, the current state of each node and the server and the results of random experiments. An online algorithm is said to have a competitiveness of c if the number of messages is at most by a factor of c larger than that of the adversary’s offline algorithm. 2.2 Observations and Lemmas Define for some fixed set S ⊆ {1, . . . , n} the minimum of the values observed by nodes in S during a time period [t, t′ ] as M INS (t, t′ ) and the maximum of the values observed during the same period as M AXS (t, t′ ). Definition 2.3. Let t, t′ be given times with t′ ≥ t. For a subset of nodes S ⊆ {1, . . . , n} the values M AXS (t, t′ ) := ∗ maxt≤t∗ ≤t′ maxi∈S (vit ) and M IN S (t, t′ ) are defined analogously. Observe that it is sufficient for an optimal offline algorithm to only make use of two different filters F1 and F2 . Proposition 2.4. Without loss of generality, we may assume that an optimal offline algorithm only uses two different filters at any time. Proof. Let [t, t′ ] be an interval during which OP T does not communicate. We fix its output F1∗ and define F2∗ := {1, . . . , n} \ F1∗ . If OP T only uses two different filters throughout the interval, we are done. Otherwise, using F1∗ as output throughout the interval [t, t′ ] and filters F1 = [M INF1∗ (t, t′ ), ∞] and F2 = [0, M AXF2∗ (t, t′ )], which must be feasible due to the assumption that OP T originally assigned filters that lead to no communication, leads to no communication within the considered interval. The following lemma generalizes a lemma in [6] to ε-Top-k-Position Monitoring. Assuming the optimal offline algorithm did not change the set of filters during a time period [t, t′ ], the minimum value observed by nodes in F1∗ can only be slightly smaller than the maximum value observed by nodes in F2∗ . 4 Lemma 2.5. If OP T uses the same set of filters F1 , F2 during [t, t′ ], then it holds M IN F1∗ (t, t′ ) ≥ (1−ε) M AXF2∗ (t, t′ ). Proof. Assume to the contrary that OP T uses the same set of filters throughout the interval [t, t′ ] and outputs F1∗ , but M INF1∗ (t, t′ ) < (1 − ε)M AXF2∗ (t, t′ ) holds. Then there are two nodes, i ∈ F1∗ and j ∈ / F1∗ , and two times t2 t1 ′ ′ ′ t1 , t2 ∈ [t, t ], such that vi = M INF1∗ (t, t ) and vj = M AXF2∗ (t, t ). Due to the definition of a set of filters and the fact that OP T has not communicated during [t, t′ ], OP T must have set the filter for node i to [s1 , ∞], s1 ≤ vit1 , and for node j to [−∞, s2 ], s2 ≥ vjt2 . This is a contradiction to the definition of a set of filters and Observation 2.2. At last a result from [6] is restated in order to calculate the (exact) top-k set for one time step. Lemma 2.6. [6] There is an algorithm that computes the node holding the largest value using O(log n) messages on expectation. 3 Auxiliary Problem: Existence In our competitive algorithms designed and analyzed in the following, we will frequently make use of a protocol for a subproblem which we call E XISTENCE: Assume all nodes observe only binary values, i.e. ∀i ∈ {1, . . . , n} : vi ∈ {0, 1}. The server is asked to decide the logical disjunction for one fixed time step t. It is known that for n nodes each holding a bit vector of length m the communication complexity to decide the bit-wise disjunction is Ω(nm) in the server model [8]. Observe that in our model 1 message is sufficient to decide the problem assuming the nodes have a unique identifier between 1 and n and the protocol uses n rounds. We prove that it is sufficient to use a constant amount of messages on expectation and logarithmic number of rounds. Note that the algorithm in the following lemma is a Las Vegas algorithm, i.e. the algorithm is always correct and the number of messages needed is based on a random process. Lemma 3.1. There is an algorithm E XISTENCE P ROTOCOL that uses O(1) messages on expectation to solve the problem E XISTENCE. Proof. Initially all nodes are active. All nodes i deactivate themselves, if vi = 0 holds, that is, these nodes do not take part in the following process. In each round r = 0, 1, . . . , log n the active nodes send messages independently at random with probability pr := 2r /n. Consequently, if the last round γ = log n is reached, all active nodes i with vi = 1 send a message with probability 1. As soon as at least one message was sent or the γ-th round ends, the protocol is terminated and the server can decide E XISTENCE. Next, we analyze the above protocol and show that the bound on the expected number of messages is fulfilled. Let X be the random variable for the number of messages used by the protocol and b be the number of nodes i with vi = 1. Note that the expected number of messages sent in round r is b·pr and the probability that no node has sent a Qr−1 b message before is k=0 (1 − pk ) . Observing that the function f (r) = b · pr (1 − pr−1 )b has only one extreme point and 0 ≤ f (r) < 2 for r ∈ [0, log n], it is easy to verify that the series can be upper bounded by simple integration: E[X] ≤ b log(n) X b2r r−1 Y b 2k + 1− n n n r=1 k=0 log(n) b X b2r  2r−1 1− ≤1+ n n r=1 b Z log(n) r  b2 2r−1 ≤1+ 1− dr + 2 n n 0 5 b #log n  2r−1 b r (2 − 2n) 1 − ≤3 + (b + 1)n ln(2) n " 0 1 ≤3 + · n ln(2)  b b !  2log n−1 20−1 (2 − 2n) 1 − + 2n 1 − n n "  b b #  1 1 1 (n − 2n) 1 − + 2n 1 − ≤3 + n ln(2) 2 2n " # b  1 1 1 ≤3 + (−n) b + 2n 1 − n ln(2) 2 2n !  b 1 1 1 2 1− − b ≤3 + ln(2) 2n 2   1 1 2 ≤3 + ≤6 . 2− b ≤3+ ln(2) 2 ln(2) log n This protocol can be used for a variety of subtasks, e.g. validating that all nodes are within their filters, identifying that there is some filter-violation or whether there are nodes that have a higher value than a certain threshold. Corollary 3.2. Given a time t. There is an algorithm which decides whether there are nodes which observed a filter-violation using O(1) messages on expectation. Proof. For the distributed nodes to report filter-violations we use an approach based on the E XISTENCE P ROTOCOL to reduce the number of messages sent in case several nodes observe filter-violations at the same time. The nodes apply the E XISTENCE P ROTOCOL as follows: Each node that is still within its filter applies the protocol using a 0 as its value and each node that observes a filter-violation uses a 1. Note that by this approach the server definitely gets informed if there is some filter-violation and otherwise no communication takes place. The E XISTENCE P ROTOCOL can be used in combination with the relaxed definition of filters to strengthen the result for Top-k-Position Monitoring from O(k log n + log ∆ log n) to O(k log n + log ∆). We first introduce a generic framework and then show how to achieve this bound. A generic approach Throughout the paper, several of our algorithms feature similar structural properties in the sense that they can be defined within a common framework. Hence, we now define a generic approach to describe the calculation and communication of filters, which we then refine later. The general idea is to only use two different filters that are basically defined by one value separating nodes in F (t) from the remaining nodes. Whenever a filter-violation is reported, this value is recalculated and used to set filters properly. The approach proceeds in rounds. In the first round we define an initial interval L0 . In the r-th round, based on interval Lr , we compute a value m that is broadcasted and is used to set the filters to [0, m] and [m, ∞]. As soon as node i reports a filter-violation observing the value vi , the coordinator redefines the interval Lr+1 := Lr ∩ [0, vi ] if the violation is from above and Lr+1 := Lr ∩ [vi , ∞] otherwise. The approach finishes as soon as some (predefined) condition is satisfied. Corollary 3.3. There is an algorithm that is O(k log n + log ∆)-competitive for (exact) Top-k-Position Monitoring. Proof. Our algorithm proceeds in phases that are designed such that we can show that an optimal algorithm needs to communicate at least once during a phase and additionally, we can upper bound the number of messages sent by the online algorithm according to the bound on the competitiveness. We apply the generic approach with parameters described as follows. The initial interval is defined as L0 := [ℓ, u], t t where ℓ = vπ(k+1,t) , u = vπ(k,t) . This can be done by determining the values of the nodes holding the k + 1 largest values using O(k log n) messages on expectation. In the r-th round, based on interval Lr , we compute the midpoint of 6 Lr as the value m which is broadcasted and used to set the filters. As soon as a filter-violation is reported, the generic framework is applied. In case Lr is empty the phase ends. Note that the distance between u and ℓ gets halved every time a node violates its filter leading to O(log(u0 −ℓ0 )) = O(log ∆) messages on expectation per phase. Also, it is not hard to see that during a phase OP T has communicated at least once and hence, we obtain the claimed bound on the competitiveness. 4 Competing against an Exact Adversary In this section, we propose an algorithm based on the strategy to choose the nodes holding the k largest values as an output and use this set as long as it is feasible. It will turn out that this algorithm is suitable in two scenarios: First, it performs well against an adversary who solves the Top-k-Position Monitoring problem (cf. Theorem 4.5); second, we can use it in situations in which an adversary who is allowed to introduce some error and cannot exploit this error because the observed data leads to a unique output (cf. Sect. 5). In particular, we develop an algorithm started at t that computes the output set F1 := F (t) using the protocol from Lemma 2.6 and for all consecutive times witnesses whether F1 is correct or not. Recall that while computing the set F (t) from scratch (cf. Lemma 2.6) is expensive in terms of communication, witnessing its correctness in consecutive rounds is cheap since it suffices to observe filter-violations (cf. Definition 2.1 and Corollary 3.2). The algorithm tries to find a value m which partitions F1 from F2 according to the generic framework, such that for all nodes i ∈ F1 it holds vi ≥ m and for all nodes i ∈ F2 it holds vi ≤ m. We call such a value m certificate. Guessing OPT’s Filters In the following we consider a time period [t, t′′ ] during which the output F (t) need not change. Consider a time t′ ∈ [t, t′′ ]. The online strategy to choose a certificate at this time contingents on the size of some interval L∗ from which an offline algorithm must have chosen the lower bound ℓ∗ of the upper filter at time t such that the filters are valid throughout [t, t′ ]. The algorithm T OP -K-P ROTOCOL keeps track of (an approximation of) L∗ at time t′ denoted by L = [ℓ, u] for which L∗ ⊆ L holds. The online algorithm tries to improve the guess where OPT must have set filters by gradually reducing the size of interval L (while maintaining the invariant L∗ ⊆ L) at times it observes filter-violations. t t = M AXF2 (t, t) and are = M INF1 (t, t) and ℓ := vπ(k+1,t) Initially u and ℓ are defined as follows: u := vπ(k,t) redefined over time. Although defining the certificate as the midpoint of L = [ℓ, u] intuitively seems to be the best way to choose m, the algorithm is based on four consecutive phases, each defining a different strategy. In detail, the first phase is executed as long as the property log log u > log log ℓ + 1 (P1) holds. In this phase, m is defined as ℓ + 22 after r filter-violations observed. If the property r log log u ≤ log log ℓ + 1 ∧ u > 4ℓ (P2) holds, the value m is chosen to be 2mid where mid is the midpoint of [log ℓ, log u]. Observe that 2mid ∈ L = [ℓ, u] holds. The third phase is executed if property u≤4ℓ∧u> 1 ℓ 1−ε (P3) holds and employs the intuitive approach of choosing m as the midpoint of L. The last phase contains the remaining case of 1 ℓ (P4) u≤ 1−ε and is simply executed until the next filter-violation is observed using the filters F1 = [ℓ, ∞] and F2 = [0, u]. In the following we propose three algorithms A1 , A2 , and A3 which are executed if the respective property hold and analyze the correctness and the amount of messages needed. 7 Lemma 4.1. Given time t, an output F (t), and an interval L = [ℓ, u] for which (P1) holds, there is an algorithm A1 that witnesses the correctness of F (t) until a time t′ at which it outputs L′ = [ℓ′ , u′ ] for which (P1) does not hold. The algorithm uses O(log log ∆) messages on expectation. Proof. The algorithm A1 applies the generic framework and defines the value m, the server broadcasts, as m := r ℓ0 + 22 , where ℓ0 is the initial value of ℓ. If log log u′ − log log ℓ′ ≤ 1 holds, the algorithm terminates and outputs L′ = [ℓ′ , u′ ] with ℓ′ and u′ defined as the redefinition of ℓ and u respectively. To analyze the amount of messages needed and express it in terms of ∆, observe that in the worst case the server only observes filter-violations from nodes i ∈ F2 . In case there is a filter-violation from above, i.e. a node i ∈ F1 reports a filter-violation, the condition log log u′ − log log ℓ′ ≤ 1 holds. At least in round r = log log(u − ℓ), which is by definition upper bounded by log log ∆, the algorithm terminates. If F (t) is not valid at time t′ , there are nodes i1 ∈ F1 , i2 ∈ F2 and time points t1 , t2 (t1 = t′ ∨ t2 = t′ ) for which t1 vi1 < vit22 holds. Thus, A1 observed a filter-violation by either i1 or i2 followed by a sequence alternating between filter-violations and filter-updates. At some point (but still at time t′ ) log log u′ −log log ℓ′ ≤ 1 holds and the algorithm outputs (ℓ′ , u′ ), proving A1 ’s correctness for time t′ . Lemma 4.2. For a given F (t) and a given interval L = [ℓ, u] for which (P2) holds, there is an algorithm A2 that witnesses the correctness of F (t) until a time t′ at which it outputs L′ = [ℓ′ , u′ ] for which (P2) does not hold. The algorithm uses O(1) messages on expectation. Proof. We apply the generic approach and choose the value m to be broadcasted by 2mid , where mid is the midpoint of [log ℓ, log u]. To analyze the amount of messages needed, bound L = [ℓ, u] in terms of values that are double exponential in a a+2 2. To this end, let a ∈ N be the largest number such that ℓ ≥ 22 holds. Now observe since (P2) holds, u ≤ 22 follows. Since the algorithm chooses the midpoint of the interval [log ℓ, log u] in order to get m and halves this interval after every filter-violation, one can upper thenumberiof rounds by analyzing how often the interval [log ℓ, log u] h bound a a+3 = [2a , 8 ∗ 2a ] can be halved at most a constant number gets halved. This is [log ℓ, log u] ⊆ log 22 , log 22 of times, until it contains only one value, which implies that 4 · ℓ > u holds. Lemma 4.3. For a given F (t) and a given interval L = [ℓ, u] for which (P3) holds, there is an algorithm A3 that witnesses the correctness of F (t) until a time t′ at which it outputs L′ = [ℓ′ , u′ ] for which (P3) does not hold. The algorithm uses O(log 1/ε) messages on expectation. Proof. The algorithm applies the generic framework and uses the midpoint strategy starting with the interval L0 :=  [ℓ, u]. Observe that it takes at most O log 1ε redefinitions of L to have the final size, no matter whether the algorithm observes only filter-violations from nodes i ∈ F (t) or i ∈ / F (t). This together with the use of the E XISTENCE P RO TOCOL for handling filter-violations yields the needed number of messages on expectation. The correctness follows similarly as shown for Lemma 4.1. Now we propose an algorithm started at a time t which computes the output F (t) and witnesses its correctness until some (not predefined) time t′ at which the T OP -K-P ROTOCOL terminates using a combination of the algorithms stated above. Precisely the T OP -K-P ROTOCOL is defined as follows: Algorithm T OP -K-P ROTOCOL t 1. Compute the nodes holding the (k + 1) largest values and define ℓ := vk+1 , u := vkt and F (t). 2. If (P1) holds, call A1 with the arguments F (t) and L = [ℓ, u]. At the time t′ at which A1 outputs L′ = [ℓ′ , u′ ] set ℓ := ℓ′ and u := u′ . 3. If (P2) holds, call A2 with the arguments F (t) and L = [ℓ, u]. At the time t′ at which A2 outputs L′ = [ℓ′ , u′ ] set ℓ := ℓ′ and u := u′ . 4. If (P3) holds, call A3 with the arguments F (t) and L = [ℓ, u]. At the time t′ at which A3 outputs L′ = [ℓ′ , u′ ] set ℓ := ℓ′ and u := u′ . 8 5. If u ≥ ℓ and u ≤ 1 (1−ε) ℓ holds, set the filters to F1 := [ℓ, ∞], F2 := [0, u]. At the time t′ at which node i ∈ F2 ′ reports a filter-violation from below define ℓ := vit . In case node i ∈ F1 reports a filter-violation from above, ′ define u := vit . 6. Terminate and output (ℓ, u). Lemma 4.4. Consider a time t. The algorithm T OP -K-P ROTOCOL computes the top-k set and witnesses its correctness until a time t′ at which it outputs L = [ℓ, u], where ℓ ≤ M AX F2 (t, t′ ), M INF1 (t, t′ ) ≤ u, and ℓ > u holds (i.e. L is empty). The algorithm uses O(k log n + log log ∆ + log 1ε ) messages on expectation. Proof. We first argue on the correctness of T OP -K-P ROTOCOL and afterwards shortly analyze the number of messages used. The algorithm computes in step 1. a correct output F1 at time t by using the algorithm from Lemma 2.6 for k times. In consecutive time steps t′ > t the correctness of T OP -K-P ROTOCOL follows from the correctness of algorithms A1 , A2 , and A3 in steps 2. - 4. For the correctness of step 5. observe that by setting the filters to F1 = [ℓ, ∞] and 1 F2 = [0, u] and the fact that u ≤ 1−ε ℓ holds the filters are valid. Thus, as long as all nodes observe values which are inside their respective filters the output need not change. At the time step t′ the protocol terminates and outputs L = [ℓ, u] it holds u < ℓ. Thus, there are nodes i1 ∈ F1 and i2 ∈ F2 and time steps t1 , t2 ∈ [t, t′ ] with: vit11 ≤ u and vit22 ≥ ℓ, and thus, vit11 < vit22 . To argue on the number of messages observe that the first step can be executed using O(k log n) number of messages. At the time the condition of steps 2. - 5. are checked these steps can be performed using O(k log n) number of messages, by computing the nodes holding the k + 1 largest values. The algorithms A1 , A2 , and A3 are called at most once each thus the conditions are also checked at most once. After executing step 5. the algorithm terminates which leads to the result on the number of messages as stated above. Theorem 4.5. The algorithm T OP -K-P ROTOCOL has a competitiveness of O(k log n + log log ∆ + log 1ε ) allowing an error of ε compared to an optimal offline algorithm that solves the exact Top-k-Position Monitoring problem. Proof. The correctness of T OP -K-P ROTOCOL and the number of messages follow from Lemma 4.4. Now we argue that OPT had to communicate at least once in the interval [t, t′ ] during which T OP -K-P ROTOCOL was applied. If OPT communicated, the bound on the competitiveness directly follows. Now assume that OPT did not communicate in the interval [t, t′ ]. We claim that the interval L maintained during T OP -K-P ROTOCOL always satisfies the invariant L∗ ⊆ L. If this claim is true, we directly obtain a contradiction to the fact that OPT did not communicate because of the following reasons. On the one hand, because OPT has to monitor the exact Top-k-Positions, OPT chooses the same set of nodes F ∗ = F1 which was chosen by the online algorithm. On the other hand, at the time t′ the algorithm T OP -K-P ROTOCOL terminates, u′ < ℓ′ holds. Thus, the interval L′ is empty and since L∗ ⊆ L′ holds, it follows that L∗ is empty and hence, OPT must have communicated. We now prove the claim. Recall that T OP -K-P ROTOCOL is started with an interval L that fulfills L∗ ⊆ L by definition. To show that L∗ ⊆ L holds during the entire interval [t, t′ ], it suffices to argue that each of the previous algorithms makes sure that when started with an interval L such that L∗ ⊆ L, it outputs L′ with L∗ ⊆ L′ . Our following reasoning is generic and can be applied to the previous algorithms. Consider the cases in which filterviolations are observed and hence the interval L is modified: If a filter-violation from below happened at a time t1 > t, there is a node i ∈ F2 with a value vit1 > ℓ′ and thus, ℓ∗ > ℓ′ holds. If a filter-violation from above happened ′ at a time t′ , there is a node i ∈ F1 with a value vit < u′ and thus, u∗ < u′ holds. This case-distinction leads to the result, that L∗ has to be a subset of [ℓ′ , u′ ]. 5 Competing against an Approximate Adversary In this section, we study the case in which the adversary is allowed to use an approximate filter-based offline algorithm, i.e. one that solves ε-Top-k-Position Monitoring. Not surprisingly, it turns out that it is much more challenging for online than for offline algorithms to cope with or exploit the allowed error in the output. This fact is formalized in the lower bound in Theorem 5.1, which is larger than previous upper bounds for the exact problem. However, we also propose two online algorithms that are competitive against offline algorithms that are allowed to have the same error ε and a smaller error ε′ ≤ 2ε , respectively. 9 5.1 Lower Bound for Competitive Algorithms We show a lower bound on the competitiveness proving any online algorithm has to communicate at least (σ − k) times in contrast to an offline algorithm which only uses k + 1 messages. Recall that the adversary generates the data streams and can see the filters communicated by the server. Note that as long as the online and the offline algorithm are allowed to make use of an error ε ∈ (0, 1) the lower bound holds, even if the errors are different. Theorem 5.1. Any filter-based online algorithm which solves the ε-Top-k-Position Monitoring problem and is allowed to make use of an error of ε ∈ (0, 1) has a competitiveness of Ω(σ/k) compared to an optimal offline algorithm which is allowed to use a (potentially different) error of ε′ ∈ (0, 1). Proof. Consider an instance in which the observed values of σ ∈ [k + 1, n] nodes are equal to some value y0 (the remaining n−σ nodes observe smaller values) at time t = 0 and the following adversary: In time step r = 0, 1, . . . , n− k, the adversary decides to change the value of one node i with vir = y0 to be vir+1 = y1 < (1 − ε) · y0 such that a filter-violation occurs. Observe that such a value y1 exists if ε < 1 holds and a node i always exists since otherwise the filters assigned by the online algorithm cannot be feasible. Hence, the number of messages sent by the online algorithm until time step n − k is at least n − k. In contrast, the offline algorithm knows the n − k nodes whose values change over time and hence, can set the filters such that no filter-violation happens. The offline algorithm sets two different filters: One filter F1 = [y0 , ∞] for those k nodes which have a value of y0 at time step n − k using k messages and one filter F2 = [0, y0 ] for the remaining n − k nodes using one broadcast message. By essentially repeating these ideas, the input stream can be extended to an arbitrary length, obtaining the lower bound as stated. 5.2 Upper Bounds for Competitive Algorithms Now we propose an algorithm D ENSE P ROTOCOL and analyze the competitiveness against an optimal offline algorithm in the setting that both algorithms are allowed to use an error of ε. The algorithm D ENSE P ROTOCOL is started a time t. For sake of simplicity we assume that the k-th and the t t (k + 1)-st node observe the same value z, that is z := vπ(k,t) = vπ(k+1,t) . However, if this does not hold we can t t define the filters to be F1 = [vπ(k+1,t) , ∞] and F2 = [0, vπ(k,t) ] until a filter-violation is observed at some time t′ t using O(k log n) messages on expectation. If the filter-violation occurred from below define z := vπ(k,t) and if a t filter-violation from above is observed define z := vπ(k+1,t) . The high-level idea of D ENSE P ROTOCOL is similar to the T OP -K-P ROTOCOL to compute a guess L on the lower endpoint of the filter of the output F ∗ of OPT (assuming OPT did not communicate during [t, t′ ]) for which the invariant ℓ∗ ∈ L∗ ⊆ Lr holds. The goal of D ENSE P ROTOCOL is to halve the interval L while maintaining ℓ∗ ∈ L until L = ∅ and thus show that no value exists which could be used by OPT. To this end, the algorithm partitions the nodes into three sets. Intuitively speaking, the first set which we call V1 contains those nodes which have to be part of the optimal output, V3 those nodes that cannot be part of any optimal output and V2 the remaining nodes. The sets change over time as follows. Initially V1t contains those nodes that 1 observes a value vit > 1−ε z. Since the algorithm may discover at a time t′ > t that some node i has to be moved to ′ ′ V1t +1 which also contains all nodes from previous rounds, i.e. V1t ⊆ V1t +1 . On the other hand V3t initially contains the nodes which observed a value vit < (1 − ε)z. Here also the algorithm may discover at a time t′ > t that some ′ node i has to be moved to V3t +1 which (similar to V1 ) contains nodes from previous rounds. At the time t the set V2t simply contains the remaining nodes {1, . . . , n} \ (V1t ∪ V3t ) and its cardinality will only decrease over time. In the following we make use of sets S1 and S2 to indicate that nodes in V2 may be moved to V1 or V3 depending on the values observed by the remaining nodes in V2 . Nodes in S1 observed a value larger than z but still not that large to decide to move it to V1 and similarly nodes in S2 observed smaller values than z but not that small to move it to V3 . Next we propose the algorithm D ENSE P ROTOCOL in which we make use of an algorithm S UB P ROTOCOL for the scenario in which some node i exists that is in S1 and in S2 . At a time at which the S UB P ROTOCOL terminates it outputs that ℓ∗ has to be in the lower half of L or in the upper half of L thus, the interval L gets halved (which initiates the next round) or moves one node from V2 to V1 or V3 . Intuitively speaking S UB P ROTOCOL is designed such that, if OPT did not communicate during [t, t′ ], where t is the time the D ENSE P ROTOCOL is started and t′ is the current time step, the movement of one node i ∈ V2 to V1 or V3 implies that i has necessarily to be part of F ∗ or not. For now we assume the algorithm S UB P ROTOCOL to work correctly as a black box using SU B(n, |L|) number of messages. Note that in case Lr contains one value and gets halved, the interval Lr+1 is defined to be empty. In case the algorithm observes multiple nodes reporting a filter-violation the server processes one violation at a time in an arbitrary ′ 10 order. Since the server may define new filters after processing a violation one of the multiple filter-violations may be not relevant any longer, thus the server simply ignores it. Algorithm: D ENSE P ROTOCOL t 1. Define z := vkt = vk+1 and the following sets: 1 z}, V1 := {i ∈ {1, . . . , n} | vit > 1−ε t V3 := {i ∈ {1, . . . , n} | vi < (1 − ε)z}, V2 := {1, . . . , n} \ (V1 ∪ V3 ). Define an interval L0 := [(1 − ε)z, z] and define sets S1 , S2 of nodes which are initially empty and use S to denote S1 ∪ S2 . Set r := 0 indicating the round. 2. The following rules are applied for (some) round r: 1 Let ℓr be the midpoint of Lr and ur := 1−ε ℓr For a node i the filter is defined as follows: If i ∈ V1 , Fi := [ℓr , ∞]; 1 If i ∈ V2 ∩ S1 , Fi := [ℓr , 1−ε z]. if i ∈ V2 \ S, Fi := [ℓr , ur ]; If i ∈ V2 ∩ S2 , Fi := [(1 − ε)z, ur ]. if i ∈ V3 , Fi := [0, ur ]. The output F (t) is defined as V1 ∪ (S1 \ S2 ) and k − |V1 ∪ (S1 \ S2 )| many nodes from V2 \ S2 . 3. Wait until time t′ , at which some node i reports a filter-violation: a. If i ∈ V1 , then set Lr+1 to be the lower half of Lr and define S2 := ∅. b. If i ∈ (V2 \ S) violates its filter from below then b.1. If the server observed strictly more than k nodes with larger values than ur then set Lr+1 to be the upper half of Lr and define S1 := ∅. b.2. else add i to S1 and update i’s filter. c. If i ∈ S1 \ S2 violates its filter then c.1. If i violates its filter from below then move i from S1 and V2 to V1 and update i’s filter. c.2. else add i to S2 and call S UB P ROTOCOL. d. If the server observed k nodes with values vi > ur and n − k nodes with values vi < ℓr then call T OP -K-P ROTOCOL e. If Lr+1 was set if is empty, end the protocol, otherwise increment r, update ur , ℓr , all filters using the rules in 2., and goto step 3. — And their symmetric cases — a’. If i ∈ V3 then set Lr+1 to be the upper half of Lr and define S1 := ∅. b’. If i ∈ (V2 \ S) violates its filter from above then b’.1. If the server observed strictly more than n − k nodes with smaller values than ℓr then set Lr+1 to the lower half of Lr and define S2 := ∅. b’.2. else add i to S2 . c’. If i ∈ S2 \ S1 violates its filter then c’.1. If i violates its filter from above then delete i from S2 , delete i from V2 , and add i to V3 . c’.2. else add i to S1 and call S UB P ROTOCOL. We analyze the correctness of the protocol in the following lemma and the number of messages used in Lemma 5.3. We prove that OPT communicated at least once in Lemma 5.7. Lemma 5.2. The protocol D ENSE P ROTOCOL computes a correct output F (t′ ) at any time t′ . 11 Proof. By definition the output consists of nodes from V1 , S1 and (arbitrary) nodes from V2 \ S2 (cf. step 2.). Observe that by definition of the filters of the nodes in these subsets, the minimum of all lower endpoints of the filters is ℓr following the rules in step 2. Also observe that the maximum of all upper endpoints of the filters of the remaining 1 ℓr holds, the values observed by nodes i ∈ F1 are (lower) bounded by ℓr nodes is ur . Since by definition ur = 1−ε and nodes i ∈ F2 are (upper) bounded by ur , thus the overlap of the filters is valid. Now we argue that there are at least k nodes in the set V1 ∪ S1 ∪ V2 \ S2 . To this end, assume to the contrary that t′ is the first time step at which strictly less than k nodes are in the union of these sets. Now observe that the cases in the D ENSE P ROTOCOL in which nodes are deleted from one of V1 , S1 or V2 \ S2 are 3.c.1., 3.c.2., and 3.b’.2.. Observe that in step 3.c.1. the algorithm moves i from S1 and V2 to V1 and thus i is again part of the output and does not change the cardinality. In step 3.c.2. the node i is added to S2 and S UB P ROTOCOL is called afterwards. At this time t′ node i is (again) part of the output of S UB P ROTOCOL and thus there are sufficiently many nodes to choose as an output which is a contradiction to the assumption. In the remaining case 3.b’.2. D ENSE P ROTOCOL adds i to S2 . However, since at time t′ strictly less than k nodes are in V1 ∪ S1 ∪ (V2 \ S2 ), there are strictly more than n − k nodes in S2 ∪ V3 and thus, the algorithm would execute step 3.b’.1. instead. This leads to a contradiction to the assumption. By these arguments the correctness follows. Lemma 5.3. The protocol D ENSE P ROTOCOL uses at most O(k log n + σ log(εvk ) + (σ + log(εvk )) · SU B(σ, |L|)) messages on expectation. Proof. Initially the algorithm computes the top-k set and probes all nodes which are in the ε-neighborhood of the node observing the k-th largest value, using O(k log n + σ) messages on expectation. During each round r each node can only violate its filter at most constant times without starting the next round r + 1 or leading to a call of S UB P ROTOCOL based on the following simple arguments: All nodes i in V1 or V3 directly start the next round r + 1 after a filter-violation. Now fix a node i ∈ V2 and observe that if it is not contained in S1 and S2 it is added to S1 if a filter-violation from below or to S2 if a filter-violation from above is observed. At the time this node i observes a filter-violation in the same direction (i.e. from below if it is in S1 and from above if it is in S2 ) it is added to V1 or V3 . In these cases the next filter-violation will start the next round. The last case that remains is that it is added to both sets, S1 and S2 . Observe that the S UB P ROTOCOL is called and starts the next round or decides on one node (which may be different from the fixed node i) to be moved to V1 or V3 . Observe that at most σ + 1 nodes can perform filter-violations without starting the next round since each node from V1 or V3 directly starts the next round and the number of nodes in V2 is bounded by σ. Furthermore observe that after each round the interval L is halved thus, after at most log |L0 | + 1 rounds the set Lr is empty. ′ Now focus on the S UB P ROTOCOL which also halves L after termination or decides on one node i ∈ V2t to be ′ ′ moved to V1t +1 or V3t +1 . Thus, it can be called at most σ + log(εvk ) times, leading to the result as stated above. The S UB P ROTOCOL We propose an algorithm which is dedicated for the case in the execution of D ENSE P ROTO COL that one node i was added to S1 and to S2 . ∈ V2 \ S reported a filter-violation from below and from above and thus gets added to S1 and to S2 (in an arbitrary order). In detail, it has observed a value which is larger than ur and a value which is smaller than ℓr . As a short remark, if i ∈ F ∗ would hold, then ℓ∗ ≤ ℓr follows and on the other hand if i ∈ / F ∗ holds, then ℓ∗ ≥ ℓr follows, but ∗ in D ENSE P ROTOCOL cannot decide i ∈ F in steps 3.c.2. or 3.c’.2. Algorithm: S UB P ROTOCOL 1. Define an interval L′0 := Lr ∩ [(1 − ε)z, ℓr ], S1′ := S1 , and S2′ := ∅. Set r′ := 0 indicating the round. 2. The following rules are applied for (some) round r′ : 1 ′ ℓr ′ . Let ℓ′r be the midpoint of L′r′ and u′r′ := 1−ε For a node i the filter is defined as follows: If i ∈ V1 , Fi′ := Fi ; 1 If i ∈ V2 ∩ (S1′ \ S2′ ), Fi′ := [ℓr , 1−ε z]. 1 ′ ′ ′ := ′ [ℓr′ , 1−ε z]; If i ∈ V2 ∩ S1 ∩ S2 , Fi if i ∈ V2 \ S ′ , Fi′ := [ℓr , u′r′ ]. if i ∈ V2 ∩ (S2′ \ S1′ ), Fi′ := [(1 − ε)z, u′r′ ]; if i ∈ V3 , Fi′ := [0, u′r′ ]; 12 The output F (t) is defined as V1 ∪ (S1′ \ S2′ ) ∪ (S1′ ∩ S2′ ) and sufficiently many nodes from V2 \ S2′ . 3. Wait until time t′ , at which node i reports a filter-violation: a. If i ∈ V1 , then terminate S UB P ROTOCOL and set Lr+1 to be the lower half of Lr . b. If i ∈ (V2 \ S ′ ) violates its filter from below b.1. If the server observed strictly more than k nodes with larger values than ur then – set L′r′ +1 to be the upper half of L′r′ and redefine S1′ := S1 . – If L′r′ +1 is defined to the empty set then terminate S UB P ROTOCOL and define the last node i which was in S1′ ∩ S2′ and observed a filter-violation from above to be moved to V3 . If such a node does not exist the node i ∈ S1 ∩ S2 moves to V3 . b.2. Else add i to S1′ . c. If i ∈ S1′ \ S2′ violates its filter c.1. If i violates its filter from below then move i from V2 and S1′ to V1 . c.2. Else add i to S2′ and update i’th filter. d. If i ∈ S1′ ∩ S2′ violates its filter d.1. If i violates from below then move i to V1 terminate the S UB P ROTOCOL. d.2. else – define L′r′ +1 to be the lower half of L′r′ and redefine S2′ := ∅. – If L′r′ +1 is defined to be the empty set then terminate S UB P ROTOCOL and move i to V3 . e. If the server observed k nodes with values vi > ur and n − k nodes with values vi < ℓr then call T OP -K-P ROTOCOL f. If L′r′ +1 was set increment r′ , update u′r′ , ℓ′r′ , all filters using the rules in 2., and goto step 3. — And their symmetric cases — a’. If i ∈ V3 , then – set L′r′ +1 to be the upper half of L′r′ and redefine S1′ := S1 . – If L′r′ +1 is defined to the empty set then terminate S UB P ROTOCOL and define the last node i which was in S1′ ∩ S2′ and observed a filter-violation from above to be moved to V3 . If such a node does not exist the node i ∈ S1 ∩ S2 moves to V3 . b’. If i ∈ (V2 \ S ′ ) violates its filter from above b’.1. If the server observed strictly more than n − k nodes with a value less than ℓr , then terminate S UB P ROTOCOL and set Lr+1 to be the lower half of Lr . b’.2. else add i to S2′ . c’. If i ∈ S2′ \ S1′ c’.1. If i violates its filter from above then move i from V2 and S2′ to V3 . c’.2. else add i to S1′ and update i’th filter. Lemma 5.4. The protocol S UB P ROTOCOL computes a correct output F (t′ ) at any time t′ at which a node i ∈ S1 ∩ S2 exists. Proof. By definition the output consists of nodes from V1 , S1′ \ S2′ , S1′ ∩ S2′ and (arbitrary) nodes from V2 \ S2′ (cf. step 2.). Observe that by definition of the filters of the nodes in these subsets, the minimum of all lower endpoints of the filters is ℓ′r′ (in case the node is in S1 and in S2 ) following the rules in step 2. Also observe that the maximum of all upper endpoints of the filters of the remaining nodes (in subsets V2 \ S ′ , S2′ \ S1′ or V3 ) is u′r′ . Since by definition 1 ′ u′r′ = 1−ε ℓr′ holds, the values observed by nodes i ∈ F1 are (lower) bounded by ℓ′r′ and nodes i ∈ F2 are (upper) bounded by u′r′ thus, the overlap of the filters is valid. Now we argue that there are at least k nodes in the sets V1 , S1 \ S2 , S1 ∩ S2 , and V2 \ S2 . To this end, simply assume to the contrary that at a time t′ there are strictly less than k nodes in the union of the sets. It follows that at 13 this time t′ , the algorithm has observed that there are strictly more than n − k nodes with a value smaller than ℓ′r′ . Thus, the algorithm would continue (compare case b’.1.) with a lower value of ℓr or, in case the interval Lr is empty, terminates (which is a contradiction). By these arguments the correctness follows. Lemma 5.5. The protocol S UB P ROTOCOL uses at most O(σ log |L|) messages on expectation. Proof. During each round r′ each node can only violate its filter at most constant times without starting the next round r′ + 1 based on the following simple arguments: All nodes i in V1 or V3 directly start the next round r′ + 1 after a filter-violation. Now fix a node i ∈ V2 and observe that if it is not contained in S1′ and S2′ it is added to S1′ if a filter-violation from below or to S2′ if a filter-violation from above is observed. At the time this node i observes a filter-violation in the same direction (i.e. from below if it is in S1′ and from above if it is in S2′ ) it is added to V1 or V3 . In these cases the next filter-violation will start the next round. The last case that remains is that it is added to both sets, S1′ and S2′ . Observe that T OP -K-P ROTOCOL terminates if i ∈ S1′ ∩ S2′ violates its filter from below (and moves itoV1 ). Otherwise i violates its filter from above S UB P ROTOCOL starts the next round r′ + 1. Observe that at most σ + 1 nodes can perform filter-violations without starting the next round since each node from V1 or V3 directly starts the next round (r + 1 from the D ENSE P ROTOCOL or r′ + 1 this protocol) and the number of nodes in V2 is bounded by σ. Furthermore observe that after each round the interval L′ , the guess of OPTs lower endpoint of the upper filter, is halved. The range of L′ is upper bounded by the range of L thus, after at most log |L| + 1 rounds the set L′ is empty. Lemma 5.6. Given a time point t at which S UB P ROTOCOL is started. At the time t′ which S UB P ROTOCOL terminates, there is one node i that is moved from V2 to V1 or V3 or the interval Lr (from D ENSE P ROTOCOL) is halved correctly. Proof. Focus on the cases in which L′ is halved or there is a decision on a node i to move to V1 or V3 (cf. cases 3.b.1., 3.d.1. 3.d.2., 3.a’., and 3.c’.1.). In step 3.b.1. the server observed at the time t′ a filter-violation from i ∈ V2 \ S ′ and there are (strictly) more than k nodes observed with a larger value than u′r′ . Observe that in this case for all subsets S with k elements there exists one node i ∈ / S which observed a value vi ≥ u′r′ , thus no matter which set is chosen by OPT, for the upper 1 ′ ∗ ℓr′ holds, it follows ℓ∗ ≥ ℓ′r′ . Furthermore if bound u for nodes i ∈ / F ∗ it holds: u∗ ≥ u′r′ , and since u′r′ = 1−ε ′ ′ ′ Lr′ +1 was defined as the empty set, and a node i ∈ S1 ∩ S2 exists, observe that i gets a value vi ≤ ℓ′r′ and since in this case u∗ ≥ u′r′ holds, i ∈ / F ∗ follows. If such a node i does not exist during the execution of S UB P ROTOCOL, the node i ∈ S1 ∩ S2 which initiated the S UB P ROTOCOL can be decided to move to V3 since during the execution of S UB P ROTOCOL the interval L′ is only halved to the upper half, thus i ∈ S1 ∩ S2 observed a value vi < ℓr = ℓ′r′ and since u∗ ≥ u′r′ holds, this i ∈ / F ∗ follows. 1 z and thus has to be part of F ∗ . In step 3.d.1. the node i observed a value vi which is larger than 1−ε ′ In step 3.d.2. the node i observed a value vi < ℓr′ . If during the execution of S UB P ROTOCOL the set L′ was defined as the upper half at least once then there was a node j ∈ V3 or strictly more than k nodes which observed a larger value than u′r′ . It follows, that this i cannot be part of F ∗ . In case during the execution of S UB P ROTOCOL the set L′ is alway defined to the lower half, then ℓ′r′ is the lower end of L and since node i observed a value strictly smaller than ℓ′r′ it cannot be part of F ∗ . The arguments for case 3.a’. are similar to 3.b.1. For the remaining case 3.c’.1. simply observe that i observed a smaller value than (1 − ε)z thus i cannot be part of F ∗ follows. First, focus on the steps in which L is halved and observe that steps 3.a. and 3.b’.1. are the same cases as in the D ENSE P ROTOCOL. Lemma 5.7. Given a time point t at which D ENSE P ROTOCOL is started. Let t′ be the time point at which D ENSE P ROTOCOL terminates. During the time interval [t, t′ ] OPT communicated at least once. Proof. We prove that OPT communicated by arguing that ℓ∗ , the lower endpoint of the upper filter, i.e. the filter for the output F ∗ , is in the guess Lr at each round r (ℓ∗ ∈ L∗ ⊆ Lr ). Hence we show that although if we halve the interval Lr , the invariant ℓ∗ ∈ L∗ ⊆ Lr is maintained all the time of the execution of D ENSE P ROTOCOL and possible calls of S UB P ROTOCOL. 14 In the following we assume to the contrary that OPT did not communicate throughout the interval [t, t′ ]. We first argue for the execution of D ENSE P ROTOCOL and assume that the invariant by calls of S UB P ROTOCOL hold by Lemma 5.6. First focus on the D ENSE P ROTOCOL, which halves the interval Lr in steps 3.a., 3.b.1., 3.a’., and 3.b’.1.: In step 3.a. in which a node i ∈ V1 violates its filter from above and observes a value vi < ℓr , it holds: i ∈ F ∗ thus, ℓ∗ < ℓr follows. In step 3.b.1. there are (strictly) more than k nodes with a larger value than ur . It follows that for all subsets S (with k elements) there is one node i ∈ / S observing a value larger than ur and thus, ℓ∗ ≥ (1 − ε)ur = ℓr holds. The case 3.a’. (which is symmetric to 3.a.) is executed if a node i ∈ V3 observed a filter-violation (vi > ur ) which implies that the upper endpoint u∗ of filter F2 is larger than vi and thus, ℓ∗ ≥ (1 − ε)ur = ℓr . In step 3.b’.1. (which is symmetric to 3.b.1.) there are (strictly) more than n − k nodes with a smaller value than ℓr . It follows that for all subsets S (with k elements) there is one node i ∈ S observing a value smaller than ℓr and thus, ℓ∗ ≤ ℓr holds. Theorem 5.8. There is an online algorithm for ε-Top-k-Position Monitoring which is O(σ 2 log(εvk ) + σ log2 (εvk ) + log log ∆ + log 1ε )-competitive against an optimal offline algorithm which may use an error of ε. Proof. The algorithm works as follows. At time t at which the algorithm is started, the algorithm probes the nodes t t holding the k + 1 largest values. If vπ(k+1,t) < (1 − ε)vπ(k,t) holds, the algorithm T OP -K-P ROTOCOL is called. Otherwise the algorithm D ENSE P ROTOCOL is executed. After termination of the respective call, the procedure starts over again. Observe that if the condition holds, there is only one unique output and thus, the T OP -K-P ROTOCOL monitors the Top-k-Positions satisfiying the bound on the competitiveness as stated in Theorem 4.5. If the condition does not hold, t there is at least one value in the ε-neighborhood of vπ(k,t) and thus, the D ENSE P ROTOCOL monitors the approximated Top-k-Positions as analyzed in this section. The number of messages used is simply obtained by adding the number of messages used by the respective algorithms as stated above. To obtain the upper bounds stated at the beginning, we upper bound σ by n and vk by ∆: O(n2 log(ε∆) + n log2 (ε∆)+log log ∆+log 1ε ). Note that for constant ε we obtain a slightly simpler bound of O(n2 log ∆+n log2 ∆) on the competitiveness. Corollary 5.9. There is an online algorithm for ε-Top-k-Position Monitoring which is O(σ + k log n + log log ∆ + log 1ε )-competitive against an optimal offline algorithm which may use an error of ε′ ≤ 2ε . Proof. The algorithm works as follows. At the initial time step t the algorithm probes the nodes holding the k + 1 t t largest values. If vπ(k+1,t) < (1 − ε)vπ(k,t) holds the algorithm T OP -K-P ROTOCOL is called. Otherwise the online algorithm simulates the first round of the D ENSE P ROTOCOL, that is nodes are partitioned into V1 , V2 , and V3 and the filters are defined as proposed (cf step 2. of D ENSE P ROTOCOL). Here all nodes with values 1 larger than 1−ε (1 − 2ε )z are directly added to V1 instead of adding to S1 , and nodes observing values smaller than ε (1 − 2 )z are added to V3 . Furthermore, if a filter-violation from some node i ∈ V2 is observed, it is directly moved (deleted from V2 and added) to V1 in case it violates from below, and added to V3 if violated from above. Whenever a node from V1 (or from V3 ) violates its filter the algorithm terminates. Additionally if (strictly) more than k nodes are in V1 the algorithm is terminated or if (strictly) less than k nodes are in V1 ∪ V2 . If exactly k nodes are in V1 and n − k nodes are in V3 the T OP -K-P ROTOCOL is executed. For the following argumentation on the competitiveness we focus on the case that T OP -K-P ROTOCOL was not called since the analysis of T OP -K-P ROTOCOL holds here. Observe that OPT (with an error of ε′ ) had to communicate based on the following observation: Let t′ be the time at which the algorithm terminates. Assume to the contrary that  OPT did not communicate during ′ [t, t ]. In case node i ∈ V1 observes a filter-violation from above, vi < (1 − 2ε )z and ε′ ≤ 2ε , OPT had to set ℓ∗ ≤ vi and u∗ ≥ z, which leads to a contradiction to the definition of filters. In case node i ∈ V3 observes a filter-violation  1 from below, vi > 1−ε (1 − 2ε )z and ε′ ≤ 2ε , OPT had to set u∗ ≥ vi and ℓ∗ ≤ z, which leads to a contradiction to the definition of filters. The fact that OPT had to communicate in the remaining cases follows by the same arguments. Since all cases lead to a contradiction, the bound on the competitiveness as stated above follows. 15 References [1] Arackaparambil, C., Brody, J., Chakrabarti, A.: Functional Monitoring without Monotonicity. In: Proceedings of the 36th International Colloquium on Automata, Languages and Programming, pp. 95–106. Springer, Berlin (2009) [2] Cormode, G.: The Continuous Distributed Monitoring Model. ACM SIGMOD Record 42.1, pp. 5–14. (2013) [3] Cormode, G., Muthukrishnan, S., Ke, Y.: Algorithms for Distributed Functional Monitoring. ACM Transactions on Algorithms 7, 21 (2011) [4] Giannakopoulos Y., Koutsoupias, E.: Competitive Analysis of Maintaining Frequent Items of a Stream. Theoretical Computer Science 562, pp. 23–32. (2105) [5] Lam, T.W., Liu, C.-M., Ting, H.-F.: Online Tracking of the Dominance Relationship of Distributed Multidimensional Data. In: Proceedings of the 8th International Workshop on Approximation and Online Algorithms, pp. 178–189. Springer, (2011) [6] Mäcker, A., Malatyali, M., Meyer auf der Heide, F.: Online Top-k-Position Monitoring of Distributed Data Streams. In: Proceedings of the 29th International Parallel and Distributed Processing Symposium, pp. 357–364. IEEE, (2015) [7] Muthukrishnan, S.: Data Streams: Algorithms and Applications. Now Publishers Inc, (2005) [8] Phillips, J., Verbin, E., Zhang, Q.: Lower Bounds for Number-in-Hand Multiparty Communication Complexity, Made Easy. In: Proceedings of the 23rd Annual ACM-SIAM Symposium on Discrete Algorithms, pp. 386–501. SIAM (2012) [9] Sanders, P., Schlag, S., Müller, I.: Communication Efficient Algorithms for Fundamental Big Data Problems. In: Proceedings of the IEEE International Conference on Big Data, pp. 15–23. IEEE, Silicon Valley (2013) [10] Tang M., Li F., Tao Y.: Distributed Online Tracking. In: Proceedings of the 2015 ACM SIGMOD International Conference on Management of Data, pp. 2047–2061. ACM, (2015) [11] Yi, K., Zhang, Q.: Multidimensional Online Tracking. ACM Transactions on Algorithms 8, 12 (2012) [12] Zhang, Z., Cheng, R., Papadias, D. and Tung, A.K.H.: Minimizing the Communication Cost for Continuous Skyline Maintenance. In: Proceedings of the ACM SIGMOD International Conference on Management of data, pp. 495–508. ACM, New York (2009) [13] Zhang, Q.: Communication-Efficient Computation on Distributed Noisy Datasets. In: Proceedings of the 27th ACM Symposium on Parallelism in Algorithms and Architectures, pp. 313–322. ACM, (2015) 16
8cs.DS
A Machine-Independent Debugger—Revisited David R. Hanson Microsoft Research [email protected] January 1999 Technical Report MSR-TR-99-4 Abstract Most debuggers are notoriously machine-dependent, but some recent research prototypes achieve varying degrees of machine-independence with novel designs. Cdb, a simple source-level debugger for C, is completely independent of its target architecture. This independence is achieved by embedding symbol tables and debugging code in the target program, which costs both time and space. This paper describes a revised design and implementation of cdb that reduces the space cost by nearly one-half and the time cost by 13% by storing symbol tables in external files. A symbol table is defined by a 31-line grammar in the Abstract Syntax Description Language (ASDL). ASDL is a domainspecific language for specifying tree data structures. The ASDL tools accept an ASDL grammar and generate code to construct, read, and write these data structures. Using ASDL automates implementing parts of the debugger, and the grammar documents the symbol table concisely. Using ASDL also suggested simplifications to the interface between the debugger and the target program. Perhaps most important, ASDL emphasizes that symbol tables are data structures, not file formats. Many of the pitfalls of working with low-level file formats can be avoided by focusing instead on high-level data structures and automating the implementation details. Microsoft Research Microsoft Corporation One Microsoft Way Redmond, WA 98052 http://www.research.microsoft.com/ A Machine-Independent Debugger—Revisited Introduction Historically, debuggers have been considered notoriously machine-dependent programs. Most debuggers in wide use today, e.g. the GNU debugger gdb [1] and Microsoft’s Visual C++ debugger, do indeed depend heavily on a specific operating system or on a specific platform or compiler. There are, however, a few machine-independent debuggers; recent examples include ldb [2] and cdb [3], both of which are source-level debuggers for C. Retargetable debuggers occupy a vast design space, because there are numerous axes of machine dependence. Debuggers can depend on machine architectures, operating systems, compilers, and linkers, and perhaps even userinterfaces. There are many ways to trade retargetability for functionality and efficiency, and different debuggers make different choices. For example, gdb provides a rich debugging repertoire and uses platform-specific symboltable formats at the cost of requiring a substantial amount of platform-specific code. Ldb is easier to port to a different architecture, but it uses its own symbol-table format and thus requires cooperation from compilers. Cdb explores perhaps the extreme reaches of this design space: It is nearly completely independent of architectures and operating systems, but it achieves this independence by loading a small amount of code with the target program and by having the compiler emit a non-standard (but machine-independent) symbol table. While these costs are non-trivial, cdb does illustrate how focusing on retargetability can simply a debugger dramatically. This paper describes a new version of cdb that occupies another point in the debugger design space—with a twist. The major change in this version is that the symbol table is stored in a separate file instead of being embedded in the program executable file. Storing debugging information externally is increasingly common, because doing so makes it easier to store more information about the target program. For example, versions 5 and 6 of Microsoft’s Visual C++ write debugging information to ‘program database’ files. The twist is that the contents of the external symbol table are defined by a grammar written in the Abstract Syntax Description Language (ASDL) [4], and the ASDL tools generate the code that constructs, reads, and writes these symbol tables from this grammar. The resulting debugger is thus smaller and more reliable, because a significant amount of its code is generated automatically from a compact specification. ASDL is part of the National Compiler Infrastructure project, which seeks to reduce the costs of computer systems research by developing tools that make it easier and quicker to build high-quality, modular compilers. ASDL was designed for specifying the tree data structures often found in compiler intermediate representations, but it can specify tree data structures for any application, such as symbol tables for debuggers. Using ASDL with cdb suggests that ASDL is more widely applicable than originally envisioned. Background A nub is the central feature of cdb’s original and revised designs. As depicted in Figure 1, all communication between the target program and the debugger goes through the nub. The nub is a small amount of code loaded with the target; the debugger can be either in the same address space as the target, or in a separate address space. The latter configuration is the common one, because it protects the debugger from corruption by the target program. target nub debugger Figure 1. Nub-based debugger design. Interface Interaction with the nub is defined by a small interface summarized in Figure 2. This interface is intentionally frugal because, while the interface itself is machine-independent, its implementations are not; an implementation for a spe- 1 cific platform might depend on everything—small interfaces permit small implementations. For example, the nub used with cdb depends only the compiler (lcc [5]) and operating system (several Unix variants and Windows NT/95/98) and is less than 260 lines of C. The nub can be—and has been—used with other debuggers for other languages [6]. typedef struct { char file[32]; unsigned short x, y } Nub_coord_T; typedef struct { char name[32]; Nub_coord_T src; char *fp; void *context; } Nub_state_T; typedef void (*Nub_callback_T)(Nub_state_T state); extern void _Nub_init(Nub_callback_T startup, Nub_callback_T fault); extern void _Nub_src(Nub_coord_T src, void apply(int i, const Nub_coord_T *src, void *cl), void *cl); extern Nub_callback_T _Nub_set(Nub_coord_T src, Nub_callback_T onbreak); extern Nub_callback_T _Nub_remove(Nub_coord_T src); extern int _Nub_fetch(int space, const void *address, void *buf, int nbytes); extern int _Nub_store(int space, void *address, const void *buf, int nbytes); extern int _Nub_frame(int n, Nub_state_T *state); Figure 2. The nub interface. The two data types and seven functions listed in Figure 2 permit a debugger to control a target and to read and write data from a target. The nub is mainly a conduit for opaque data; for example, it knows nothing about specific symbol-table formats, but provides simple mechanisms for reading them. _Nub_init is called by the start-up code and initializes the nub; its arguments are pointers to callback functions that are called by the nub to initialize the debugger and to trap to the debugger when a fault occurs. As detailed below the type Nub_state_T describes the state of a stopped target, which occurs at start-up, breakpoints, and faults. _Nub_set, _Nub_remove, and _Nub_src collaborate to implement breakpoints. Stopping points define program locations at which breakpoints can be set in terms of ‘source coordinates’ specified by the type Nub_coord_T. A coordinate consists of a file name, a line number (y) and a character number in that line (x). The set of allowable stopping points depends on the language and the compiler; unlike most debuggers, which limit breakpoints to lines, cdb and lcc permit breakpoints to be set at any expression. _Nub_src enumerates the stopping points, calling the debugger-supplied apply function for each point, _Nub_set sets a breakpoint, and _Nub_remove removes one. When a breakpoint occurs, the breakpoint handler passed to _Nub_set as onbreak is called with a Nub_state_T value that describes the current state of the target. _Nub_fetch and _Nub_store read and write bytes from the target’s address spaces and return the number of bytes actually read and written. The target can have many abstract address spaces; one usually refers to the target’s memory, while others refer to metadata about the target, including its symbol table. The compiler, debugger, and nub implementation define the conventions about address spaces; the nub interface specifies only a way to access those spaces. Finally, _Nub_frame traverses the target’s call stack; the top stack frame is numbered 0 and increasing numbers identify frames higher up the call chain. _Nub_frame moves to frame n and fills the Nub_state_T value with the state information describing that frame. The fp and context fields are opaque pointers that describe the target’s state; these values are typically passed to _Nub_fetch to fetch symbol-table entries and the values of variables, for example. Implementation The nub interface does not demand a machine-independent implementation. It is possible, for example, to provide an implementation that is specific to one architecture, operating system, and compilation environment. Cdb represents a different design choice: It sacrifices time and space for machine independence, and it runs on both UNIX and Windows platforms. Currently, it depends on the lcc compiler [5], because only that compiler emits the appropriate 2 symbol tables and other debugging information, but those details are themselves compiler independent. Reference 3 gives the complete details of the implementation. There are three major components to the cdb implementation: The nub, the compiler module that emits symbol tables and other debugging information, and the debugger itself, cdb. The debugger is a simple, command-line oriented debugger for C programs compiled by lcc. Programmers can set and remove breakpoints, examine the values of variables by name, and peruse the call stack. Cdb uses the nub interface to control the target program. The compiler emits symbol tables as initialized C data structures, so their form is machine independent. The debugger reads these symbol tables by calling _Nub_fetch with an address space value that identifies the symbol table. Symbol-table entries include type and address information, so, given a symbol-table entry for a variable, cdb can fetch and display the values of the variable. Symbols are organized in an inverted tree according to scope; given a symbol, it and its ancestors are visible. The compiler emits an array that identifies potential breakpoints, which the nub uses to implement _Nub_set, _Nub_remove, and _Nub_src. The compiler also emits code at each potential breakpoint that is essentially equivalent to the C expression (__module__V44b309d0.coordinates[n].i < 0 && _Nub_bp(n, tail), expr) where __module__V44b309d0 is a generated name and coordinates is the array of breakpoint data, n is the stopping point number, tail is a pointer to the symbol-table entry for the last symbol in the scope in which the breakpoint appears, and expr is the C expression at the breakpoint. If the breakpoint is set, the i field of the array element is negative and _Nub_bp is invoked, which in turn calls the debugger’s breakpoint callback function. Lcc injects this code in its intermediate representation, so the implementation is machine independent. To implement _Nub_frame, lcc emits code to build a ‘shadow stack’ embedded in the normal call stack. This is accomplished by defining a local variable with a structure type for the shadow stack frame layout, and emitting code to link and unlink this frame at procedure entry and exit. There’s no separate memory allocation involved, because the shadow stack frame is allocated along with other locals at procedure entry. The nub uses these frames to build Nub_state_T values, which are passed to the breakpoint and fault callback functions. Again, lcc emits these data and its associated code in its machine-independent intermediate representation. Compared to other debuggers with similar capabilities, the cdb implementation is tiny: About 600 lines of C were added to lcc, and the nub, its associated communications functions, and cdb itself total about 1,500 lines (see Table 3, below). Of these, only the 31-line linking script, which sews together symbol tables from separately compiled modules, is potentially machine dependent; however, the same script has been used on all platforms to date. Revised Design Cdb’s machine-independence costs roughly a factor of 3–4 in both time and space. The symbol-table (including breakpoint data) and injected breakpoint code account for most of the space cost, and executing the injected breakpoint code accounts for most of the time cost. For example, when compiling itself with debugging on a SPARC, lcc emits about 749KB of symbol-table data and 1,347KB of injected code. Much of the symbol-table data can be stored independently from the running code; the only important components are the addresses of the global variables and procedures. Thus, in the revised design, most of the symbol table is written to an external file. Newer compilers have adopted similar schemes; for example, Microsoft’s Visual C++ most recent releases write symbol-table data to program database files. This approach can free the compiler from cramped, archaic symbol-table formats, and it makes symbol-table data available to other programs, such as sourcecode browsers. Figure 3 illustrates this revised design. The nub interface remains unchanged, which is an important aspect of this design. Of course, the implementation is changed to accommodate external symbol-table files. The revised nub is divided into two components: The component that controls the target and accesses its address space is loaded with the target, as in the original design. The component that deals with the symbol table is loaded with the debugger, because, for the most part, this component deals only with the external symbol table. This revision is unnoticed by the debugger, because it sees the nub only through the unchanged nub interface. Figure 3 shows the two-process configuration, because it illustrates the two components of the nub most clearly. The situation is the same in the single-process configuration, but all four parts—target, debugger, and the two nub components—appear in the same address space. 3 target debugger symbol table nub (client) nub (server) RPC channel Figure 3. Revised design, in two-process mode. Revising cdb to use an external symbol table requires a precise definition of the external representation, and functions to construct, read, and write the data. ASDL [4] automates much of this effort and asdlGen, the one of the ASDL tools, generates most of the necessary code. Implementation As in the original implementation, lcc injects debugging code at the intermediate-representation level, but the injected code in the revised implementation is simpler, as detailed below. Instead of emitting symbol tables as initialized data structures embedded in the target program, lcc uses the ASDL-generated code to build the symbol table and write it to an external file. The entire ASDL grammar is listed in Figure 4. The line numbers are for explanatory purposes only. ASDL is a domain-specific language for specifying tree data structures, and it’s simple enough that it can be described easily by examples. An ASDL grammar is much like the definition of an algebraic data type. It consists of a sequence of ASDL productions that define an ASDL type by listing its constructor, the fields associated with each constructor, and the fields associated with all constructors for that type, which are called attributes. For example, lines 19–31 define 12 constructors for the ASDL type named ‘type’, and the integer attributes size and align, which are common to all 12 constructors. The ASDL type int is a built-in type for integers. This ASDL type represents C data types. The first four constructors (lines 19–22) define simple constructors for the basic C types; these constructors have no constructor-specific fields, only the common attributes. Lcc emits instances of these constructors for all of the C basic types. For example, on a 32-bit machine, the C type ‘int’ is represented with an instance of INT with a size and align both equal to 4, and an INT with a size and align equal to 1 represents the C type ‘char’. The other basic C types are similarly represented. Line 23 defines the constructor for C pointer types; it has one integer field (type) that identifies the referent type. ASDL grammars define trees, not graphs, so instances of ASDL types that are used more than once must be referenced indirectly. As described below, this ASDL grammar associates integers with instances of ASDL types that represent C types and C symbols. The constructors for arrays (line 27), functions (line 28), and qualified types (lines 29 and 30) also have integer fields that identify their referent types. Line 24 defines ENUM, the constructor for C enumeration types. Its first field (tag) is an identifier, which is a built-in ASDL type, for the enumeration’s C type tag. The second field (ids) is a sequence of enum types; the asterisk denotes a sequence. Line 18 defines enum as a record type with fields for the enumeration identifier and its associated value. Structures and unions are defined similarly in lines 25 and 26. Both constructors carry the structure or union tag and a sequence of field records, which give the name, type, location of each C structure or union field. Bit fields are identified by nonzero values for bitsize and lsb. Function types (line 28) include a type for the return value (type) and a sequence of integers that identify the formal parameter types (formals). AsdlGen generates all of the code necessary for constructing instances of the types defined in the grammar. To build an ASDL tree for a C type, lcc simply traverses its internal representation for the type and calls the appropriate generated functions. For example, given the C type declaration enum color {RED=1,GREEN,BLUE}; lcc executes the equivalent of the following statement, assuming that enumeration types are implemented with 4byte integers. type = sym_ENUM(4, 4, FRORU  Seq_seq(sym_enum( 5('   sym_enum( *5((1  sym_enum( %/8(  18// 4  1 module sym { 2 3 module = (identifier file,int uname,int nuids, item* items,int globals,spoint* spoints) 4 spoint = (coordinate src,int tail) 5 6 7 item 8 coordinate = Symbol(symbol symbol) | Type(type type) attributes(int uid) = (identifier file,int x,int y) 9 10 11 12 13 14 15 16 symbol = STATIC(int index) | GLOBAL(int index) | TYPEDEF | LOCAL(int offset) | PARAM(int offset) | ENUMCONST(int value) attributes(identifier id,int uid,int module, coordinate src,int type,int uplink) 17 field = (identifier id,int type,int offset,int bitsize,int lsb) 18 enum = (identifier id,int value) 19 20 21 22 23 24 25 26 27 28 29 30 31 32 type = INT | UNSIGNED | FLOAT | VOID | POINTER(int type) | ENUM(identifier tag,enum* ids) | STRUCT(identifier tag,field* fields) | UNION(identifier tag,field* fields) | ARRAY(int type,int nelems) | FUNCTION(int type,int* formals) | CONST(int type) | VOLATILE(int type) attributes(int size,int align) } Figure 4. ASDL grammar for the symbol table. The actual code in lcc is nearly as simple as this example suggests; a single 75-line procedure handles all 12 constructors. AsdlGen can generate code in C, C++, Java, ML, or Haskell, so clients can be written in whatever language best suits the application. Cdb is written in C. Symbol Tables Lcc builds instances of the ASDL type symbol (Figure 4, lines 9–16) for each visible identifier. The constructors correspond to the different kinds of identifiers that appear in C programs. All symbols include the attributes defined in lines 15 and 16. The id field holds the symbol name itself, the uid field gives the symbol’s unique identifying integer, uid for short, type holds the uid for the symbol’s type, and src gives the location in the source program where the symbol is defined. As shown in line 8, a coordinate is a record that holds a file name (file), a line number (y), and a character number in that line (x). The uplink field holds the uid for the previous symbol in the current scope or the last symbol in the enclosing scope. These fields form an inverted tree; given a symbol in this tree, that identifier and its ancestors comprise the set of visible identifiers in the compilation unit. Figure 5 shows the declaration fragments of a target program, wf.c, and the corresponding tree of symbols. The arrows represent the uplink fields. For instance, if the target stops somewhere in the body of getword, the debugger will determine that the symbol for c identifies the set of visible symbols, which is given by following the arrows: c s buf words main tprint getword isletter 5 static int isletter(int c) { … } static int getword(char *buf) { char *s; int c; … } void tprint(struct node *tree) { … } static struct node *words = NULL; int main(int argc, char *argv[]) {char buf[40]; … } isletter getword main tprint words c buf tree s c argc argv buf Figure 5. Sample program wf.c and its symbol table tree. The module attribute is a unique integer name for the compilation unit in which the identifier appears. Global and static variables (GLOBAL and STATIC, lines 9 and 10) include the indices in the array of addresses described below, locals and parameters (LOCAL and PARAM, lines 12 and 13) include their offsets from the shadow stack frame, and enumeration constants (ENUMCONST, line 14) include the associate values. Lcc wraps all of the symbol-table data into an instance of the ASDL type module defined in lines 2 and 3. This record starts with fields that give the file name of the compilation unit (file) and a unique integer name for the unit (uname) generated by lcc. This integer name is also used to generate the name of the external symbol-table file to which lcc writes the module using the procedure generated by asdlGen from the ASDL grammar. A module also includes a sequence of item instances, which associate a symbol or type with a uid (lines 5– 7), and the uid of the last global or static variable (the global field). For example, the global field in the module for the code in Figure 5 would contain the uid for words. The global fields are used for traversing all globals and statics in all compilation units during symbol-table searches. The external symbol table contains everything about program identifiers except the addresses of globals (including functions), which are unknown until link time. Lcc emits into the target program an instance of the C type struct module { unsigned int uname; void **addresses; }; where uname is initialized to the integer name for the compilation unit and addresses is initialized to an array of addresses of the global identifiers defined in the unit. For example, lcc emits into read-only memory the equivalent of the following C fragments for Figure 5’s wf.c. const struct module _module_V49499895 = { 0x49499895; &L93; }; const void *L93[] = { &words, main, tprint, getword, isletter }; The variable _module_V494999f8 includes the module’s unique integer name. At link-time, a script scans all object files for names of this form and generates an initialized array of pointers to the module structures; for example, if wf.c is compiled with lookup.c and the resulting object files are linked together, the linking script generates the following code. extern struct module _module_V49499895, _module_V494999f8; const struct module *_Nub_modules[] = { &_module_V49499895; &_module_V494999f8; 0 }; char _Nub_bpflags[37]; 6 The object file for this code is compiled and loaded with the target program along with the nub. _Nub_modules gives the nub access to all of the module structures and thus to the files holding the symbol tables for all of the separately compiled C source files. The debugger uses _Nub_fetch to read the module structures and the address arrays. _Nub_bpflags is described in the next section. Breakpoints The last field in a module, spoints (Figure 4, line 3), is a sequence of spoint records (line 4) that maps stopping points, which are the sequence element indices, to source coordinates and gives the uid for the symbol-table ‘tail’ for each stopping point. These data are used to implement _Nub_set, _Nub_remove, and _Nub_src and to supply the uid for the appropriate symbol when a breakpoint occurs. Cdb can set breakpoints at any individual expression and on the entry and exit points of compound statements. For example, the italicized superscripts in Figure 6 identify the stopping points in getword. Notice that it’s possible to set a breakpoint on the right operand of the short-circuit AND operator, &&. 8 static int getword(char *buf) { char *s; int c; 9 10 while ( (c = getchar()) != -1 && isletter(c) == 0) 11 ; 12 13 14 for ( s = buf; (c = isletter(c)) != 0; c = getchar()) 15 *s++ = c; 16 *s = 0; 17 if ( s > buf) 18 return 1; 19 return 0; } Figure 6. Stopping points. The compiler emits code at each stopping point that is essentially equivalent to the C expression (_Nub_bpflags[n] != 0 && _Nub_bp(n), expr) where expr is the C expression at the stopping point n. For example, lcc emits if ( (_Nub_bpflags[17] != 0 && _Nub_bp(17), s > buf) ) for the if statement containing stopping point 17 in Figure 6. _Nub_set plants a breakpoint at a given source coordinate by searching the spoints sequence for the coordinate; if it’s found, _Nub_set writes a one to the corresponding index in _Nub_bpflags. _Nub_remove clears an element in _Nub_bpflags. _Nub_set and _Nub_remove are implemented in the server (debugger) side of the nub, and they use _Nub_store with a distinguished address space identifier to write _Nub_bpflags, which is in the client (target) side of the nub. When a breakpoint occurs, _Nub_bp uses the stopping point number to initialize the fields of the Nub_state_T value it passes to the debugger’s call back function. The stopping point number leads to the source coordinate for the stopping point, the name of the function in which that point appears, and the uid of symbol that represents the set of visible identifiers at that point. This uid is used to set the context field in the Nub_state_T value to the appropriate symbol. The fp field is set to the appropriate shadow stack frame, as described below. A given stopping point, say 17, can appear in every separately compiled module. Thus, _Nub_bp can be called at a non-existent breakpoint. The client-side nub passes this event on to the server-side nub, which simply dismisses extraneous breakpoints. This scheme simplifies the client-side nub at the cost of recognizing these occasional extraneous events. It also permits the module with the most stopping points to determine the size of _Nub_bpflags, which is generated at link-time. In the original cdb implementation, each separately compiled module included an array whose length was the number of stopping points in that module. Stack Frames The nub must understand stack frames just enough to implement _Nub_frame and to provide an appropriate context for addressing parameters and locals. It does not, however, have to provide access to the machine-dependent 7 details of the stack, because the interface provides no way to access or to use them. As in the original implementation, the revised implementation uses a shadow stack embedded in the normal call stack, but the revised frames are simpler and smaller. At function entry, the compiler generates a local variable by simulating the following declaration where tos is a generated name. struct sframe { struct sframe *up, *down; int func; int module; int ip; } tos; There’s no separate allocation required for tos; it’s allocated along with other locals during function entry. Lcc also emits code to initialize the fields; e.g., for getword, it emits: tos.down = tos.func = tos.module _Nub_tos = _Nub_tos; 2; = 0x49499895; &tos; The nub’s private global _Nub_tos always points to the top frame on the shadow stack. The down field points to the previous shadow stack frame, the func field is the uid of the function, and the module field is the unique integer name for the compilation unit. The ip field is set the stopping point number when a breakpoint occurs and just before calls. The up field points up the shadow stack and is used only by _Nub_frame, which initializes this field only when necessary. Lcc also emits code at calls to set the ip field and at returns to pop the shadow stack by assigning tos.down to _Nub_tos. Given a shadow stack frame, _Nub_bp builds a Nub_state_T value, as described above. The offsets stored in PARAM and LOCAL symbol values (see Figure 4, lines 12 and 13) are offsets from the shadow stack frame. All of these computations are done at the intermediate-code level, and are they independent of the target machine. They do, however, depend on some of the details of lcc’s code generator architecture; for example, the offsets are computed by accessing code-generator data structures. Overhead The original version of cdb achieved its machine independence at a cost of a factor of 3–4 in both space and time. The revised version reduces the space cost by nearly one-half and the time cost by about 13% without compromising machine independence. Table 1 lists the sizes in kilobytes of the code, initialized data, and uninitialized data segments for four variants of lcc version 4.1 and the sizes of the executable files themselves. The first three rows reproduce the measurements from the original version of cdb described in Reference 3. (These numbers are different than those shown in Reference 3 because the platform used in gathering the original measurements is no longer available and the original table used lcc version 3.5.) The fourth row lists the measurements for the revised version. All of the measurements in this section were taken on an SPARC Ultra 1/170 running SunOS 5.5.1 (Solaris 2.5.1) with 128MB of memory. Table 1. Sizes in kilobytes of lcc executables. Code segment, KB 504 504 2,065 1,651 Initialized data, KB 28 28 563 29 Uninitialized data, KB 37 37 37 39 File size, KB 559 1,249 2,662 1,717 lcc variant No debugging data SunOS-specific debugger data Original cdb debugging data and code Revised cdb debugging data and code 1,002 281 External symbol-table files Compressed external symbol table files In each row, the sum of the first three columns reveals the space overhead when subtracted from the sum for the first row; for example, the space overhead in the original version is 2,065+563+37–(504+28+37) = 2,096KB. Table 2 lists the sizes of the symbol-table portion of this overhead for both the original and revised versions. Of the 8 2,096KB in the original version, symbol-table data account for 749KB, so the injected debugging code accounts for the other 1,347KB. For the revised version, the space overhead is 1,150KB, of which about 8KB is debugging data and 1,142KB is injected code. Of course, most of the symbol-table data in the revised version is written to external files; as shown in the last two lines Table 1 these files hold 1,002KB of data uncompressed. These data compress well using generalpurpose compressors: zip, for example, compresses the 1,002KB of data into a 281KB zip file. Table 2. Sizes of debugging data structures. Original, bytes 220,078 226,772 209,996 109,236 396 392 766,870 Revised, bytes 4,008 3,966 Data structure File names and identifiers Symbols Types Source coordinates Modules Pointers to file names Address vectors Breakpoint flags 8,238 Total 264 The display below gives the execution time in seconds for each of the variants of lcc listed in Table 1 to compile lcc 4.1, which amounts to 55,000+ lines of C after preprocessing. These times do not include preprocessing, assembly or linking. 14.5 secs. 13.7 37.3 32.2 No debugging data Solaris-specific debugging data Original cdb debugging data and code Revised cdb debugging data and code As the last two lines indicate, lcc emits the revised symbol-table data a bit faster than it emits the original symboltables. When lcc emits the revised data, it’s writing almost as much data as in the original implementation, but the data is written to external files instead of to the generated assembly-language files. It’s a bit faster to write the external files because the writers generated by asdlGen are simpler than the assembly-language emitters in lcc. Discussion Table 3 lists the source files for both the original and revised versions of cdb, gives their sizes in non-blank lines of source code, and summarizes their purposes. Almost every file in the revised version is shorter, because the ASDL-defined symbol tables are simpler. It’s easier to emit these symbol tables, so the revised stab.c, the symbol-table emitter in lcc, is shorter; it’s easier to process these tables in response to debugger commands, so cdb.c, the debugger proper, is shorter. Symbol-table interrogation (in symtab.c) requires a few more lines because, given a symbol, a search is required to find the module in which it is defined. The nub is longer because splitting it into two parts (nub.c and nub2.c) required some additional code to coordinate the interaction between them. These line counts do not include the code generated by asdlGen from the ASDL grammar. The 31-line ASDL grammar generates about 1,320 lines of C declarations and function definitions. This code is approximately what would be required if the ASDL-generated constructors, readers, writers were written by hand. The external file format used by ASDL is independent of both language and platform, so the symbol tables can be read and written by other tools written in different ASDL-supported languages. The savings that were realized by using ASDL would thus increase if the ASDL grammar were used to generate code in other languages. For example, if a source-code browser were written in Java, it would use the 1,557 lines of Java generated from sym.asdl. 9 Table 3. Source code for original and revised implementations. Original 31 565 249 191 202 794 80 15 2,127 Revised 39 Module prelink.sh Purpose linking script, per platform 412 125 135 164 155 52 stab.c nub.c nub2.c client.c server.c comm.c symbol-table and breakpoint code emitter the nub debugger side of the revised nub target side of the two-process nub debugger side of the two-process nub common communication code 682 124 cdb.c symtab.c symstub.c cdb’s user interface and command processor symbol-table and type management symtab stubs for single-process debugger 31 sym.asdl ASDL grammar 1,919 Total The nub interface was designed to be as simple as possible, but the experience with ASDL suggests a further simplification: The nub interface does not need high-level source coordinates. Debuggers must have a way to specify the locations for breakpoints, but a low-level mechanism is sufficient. In the revised design, the debugger side of the nub uses the symbol tables to map source coordinates to stopping-point numbers. The debugger could do this mapping directly, and the nub interface could be simplified to use only stopping-point numbers. Indeed, these numbers can be whatever is most convenient for the compiler and the nub implementation and thus could be treated as opaque integers in the interface. In implementations like cdb, they would be indices; in other implementations, they could be addresses or byte offsets from procedure entry points. Simplifying the nub interface would make room for other, more important, additions, such as support for single stepping [3]. Most systems view symbol tables as file formats and document them as such in torturously detailed specifications. (Similar comments apply to object code.) These arcane and archaic formats are nearly impervious to change. For example, most debuggers can set breakpoints only on lines, because the symbol-table format provides information only about lines even though the syntax of most languages is not line-oriented and includes operations that have embedded flow of control. This trend continues: Java’s class files are described as a file format, and class files include metadata that maps locations to line numbers [7]. Using ASDL emphasizes that symbol tables are data structures, not file formats. ASDL grammars provide concise, abstract documentation for these data structures that focuses on their content, not their persistent format, and generating the code for readers and writers automates an error-prone aspect of system implementation and copes with change more gracefully. References 1. 2. 3. 4. 5. 6. 7. R. M. Stallman and R. H. Pesch, ‘Using GDB: A guide to the GNU source-level debugger, GDB version 4.0’, Technical Report, Free Software Foundation, Cambridge, MA, July 1991. N. Ramsey and D. R. Hanson, ‘A retargetable debugger’, Proceedings of the SIGPLAN’92 Conference on Programming Language Design and Implementation, SIGPLAN Notices, 27(7), 22–31 (1992). D. R. Hanson and M. Raghavachari, ‘A machine-independent debugger’, Software—Practice and Experience, 26(11), 1277– 1299 (1996) D. C. Wang, A. W. Appel, J. L. Korn, and C. S. Serra, ‘The Zephyr abstract syntax description language’, Proceedings of the Conference on Domain-Specific Languages, Santa Barbara, CA, Oct. 1997, pp. 213–227. C W. Fraser and D. R. Hanson, A Retargetable C Compiler: Design and Implementation, Addison Wesley, Menlo Park, CA, 1995. D. R. Hanson and J. L. Korn, ‘A simple and extensible graphical debugger’, Proceedings of the Winter USENIX Technical Conference, Anaheim, CA, Jan. 1997, pp. 173–184. T. Lindholm and F. Yellin, The Java Virtual Machine Specification, Addison Wesley, Reading, MA, 1997. 10
6cs.PL
Interpretable and Pedagogical Examples Smitha Milli 1 Pieter Abbeel 1 Igor Mordatch 2 arXiv:1711.00694v2 [cs.AI] 14 Feb 2018 Abstract Teachers intentionally pick the most informative examples to show their students. However, if the teacher and student are neural networks, the examples that the teacher network learns to give, although effective at teaching the student, are typically uninterpretable. We show that training the student and teacher iteratively, rather than jointly, can produce interpretable teaching strategies. We evaluate interpretability by (1) measuring the similarity of the teacher’s emergent strategies to intuitive strategies in each domain and (2) conducting human experiments to evaluate how effective the teacher’s strategies are at teaching humans. We show that the teacher network learns to select or generate interpretable, pedagogical examples to teach rule-based, probabilistic, boolean, and hierarchical concepts. 1. Introduction Human teachers give informative examples to help their students learn concepts faster and more accurately (Shafto et al., 2014; Shafto & Goodman, 2008; Buchsbaum et al., 2011). For example, suppose a teacher is trying to teach different types of animals to a student. To teach what a “dog” is they would not show the student only images of dalmatians. Instead, they would show different types of dogs, so the student generalizes the word “dog” to all types of dogs, rather than merely dalmatians. Teaching through examples can be seen as a form of communication between a teacher and a student. Recent work on learning emergent communication protocols in deeplearning based agents has been successful at solving a variety of tasks (Foerster et al., 2016; Sukhbaatar et al., 2016; Mordatch & Abbeel, 2017; Das et al., 2017; Lazaridou et al., 2016). Unfortunately, the protocols learned by the agents are usually uninterpretable to humans (Kottur et al., 2017). Interpretability is important for a variety of reasons (Caruana et al., 2017; Doshi-Velez & Kim, 2017), including safety, 1 UC Berkeley 2 OpenAI. Correspondence to: Smitha Milli <[email protected]>. trust, and in this case, potential for use in communication with humans. We hypothesize that one reason the emergent protocols are uninterpretable is because the agents are typically optimized jointly. Consider how this would play out with a teacher network T that selects or generates examples to give to a student network S. If T and S are optimized jointly, then T and S essentially become an encoder and decoder that can learn any arbitrary encoding. T could encode “dog” through a picture of a giraffe and encode “siamese cat” through a picture of a hippo. The examples chosen by T, although effective at teaching S, are unintuitive since S does not learn in the way we expect. On the other hand, picking diverse dog images to communicate the concept of “dog” is an intuitive strategy because it is the effective way to teach given how we implicitly assume a student would interpret the examples. Thus, we believe that S having an interpretable learning strategy is key to the emergence of an interpretable teaching strategy. This raises the question of whether there is an alternative to jointly optimizing T and S, in which S maintains an interpretable learning strategy, and leads T to learn an interpretable teaching strategy. We would ideally like such an alternative to be domain-agnostic. Drawing on inspiration from the cognitive science work on rational pedagogy (see Section 2.1), we propose a simple change: 1. Train S on random examples 2. Train T to pick examples for this fixed S In Step 1, S learns an interpretable strategy that exploits a natural mapping between concepts and examples, which leads T to learn an interpretable teaching strategy in Step 2. What do we mean by interpretable? There is no universally agreed upon definition of interpretability (Doshi-Velez & Kim, 2017; Weller, 2017; Lipton, 2016). Rather than simply picking one definition, we operationalize interpretability using the following two metrics in the hopes of more robustly capturing what we mean by interpretable: 1. Evaluating how similar T’s strategy is to intuitive human-designed strategies (Section 5) Interpretable and Pedagogical Examples 2. Evaluating how effective T’s strategy is at teaching humans (Section 6) We find that, according to these metrics, T learns to give interpretable, pedagogical examples to teach rule-based, probabilistic, boolean, and hierarchical concepts. 2. Related Work 2.1. Rational pedagogy What does it mean to rationally teach and learn through examples? One suggestion is that a rational teacher chooses the examples that are most likely to make the student infer the correct concept. A rational student can then update their prior belief of the concept given the examples and the fact that the examples were chosen by a cooperative teacher. Shafto et al formalize this intuition in a recursive Bayesian model of human pedagogical reasoning (Shafto & Goodman, 2008; Shafto et al., 2012; 2014). In their model the probability a teacher selects an example e to teach a concept c is a soft maximization (with parameter α) over what the student’s posterior probability of c will be. The student can then update their posterior accordingly. This leads to two recursive equations: Pteacher (e|c) ∝ (Pstudent (c|e))α Pstudent (c|e) ∝ Pteacher (e|c)P (c) (1) (2) Note that in general there are many possible solutions to this set of dependent equations. A sufficient condition for a unique solution is an initial distribution for Pteacher (e|c). Shafto et al suggest that a natural initial distribution for the teacher is a uniform distribution over examples consistent with the concept. They empirically show that the fixed point that results from this initial distribution matches human teaching strategies. In our work, we initialize the teacher distribution in the way suggested by Shafto et al. We optimize in two steps: (1) train the student on this initial distribution of examples (2) optimize the teacher for this fixed student. This approach is analogous to doing one iteration of Equation 2 and then one iteration of Equation 1. We find that one iteration is sufficient for producing interpretable strategies. 2.2. Communication protocol learning. Teaching via examples can be seen as communication between a teacher to a student via examples. Much recent work has focused on learning emergent communication protocols in deep-learning based agents (Foerster et al., 2016; Sukhbaatar et al., 2016). However, these emergent protocols tend to be uninterpretable (Kottur et al., 2017). A number of techniques have been suggested to encourage interpretability, such as limiting symbol vocabulary size (Mordatch & Abbeel, 2017), limiting memorization capabilities of the speaker (Kottur et al., 2017), or introducing auxiliary tasks such as image labelling based on supervision data (Lazaridou et al., 2016). Despite these modifications, the protocols can still be difficult to interpret. Moreover, it is unclear how modifications like limiting vocabulary size apply when communication is in the form of examples because usually examples are already a fixed length (e.g coordinates in a plane) or constrained to be selected from a set of possible examples. So, there must be other reasons that humans come up with interpretable protocols in these settings, but neural networks do not. We suggest that one reason may be that these communication protocols are typically learned through joint optimization of all agents (Foerster et al., 2016; Sukhbaatar et al., 2016; Mordatch & Abbeel, 2017; Kottur et al., 2017; Lazaridou et al., 2016), and evaluate how changing from a joint optimization to an iterative one can improve interpretability. 2.3. Interpretability in machine teaching. One problem studied in the machine teaching literature is finding a student-teacher pair such that the student can learn a set of concepts when given examples from the teacher (Jackson & Tomkins, 1992; Balbach & Zeugmann, 2009). However, it is difficult to formalize this problem in a way that avoids contrived solutions known as “coding tricks.” Although the community has not agreed on a single definition of what a coding trick is, it refers to a solution in which the teacher and student simply “collude” on a pre-specified protocol for encoding the concept through examples. Many additional constraints to the problem have been proposed to try to rule out coding tricks. These additional constraints include requiring the student to be able to learn through any superset of the teacher’s examples (Goldman & Mathias, 1996), requiring the learned protocols to work for any ordering of the concepts or examples (Zilles et al., 2011), requiring the student to learn all concepts plus their images under primitive recursive operators (Ott & Stephan, 2002), and giving incompatible hypothesis spaces to the student and teacher (Angluin & Kriķis, 1997). The prior work has mainly been theoretically driven. The papers provide a definition for what it means to avoid collusion and then aim to find student-teacher pairs that provably satisfy the proposed definition. Our work takes a more experimental approach. We provide two criteria for interpretability and then empirically evaluate how modifying the optimization procedure affects these two criteria. Interpretable and Pedagogical Examples S ĉ 1 e ··· S T 2 ee ĉ T ··· ··· Algorithm 2 Best Response (BR) Optimization S ĉ K e L T c Figure 1. A visualization of the interaction between T and S. At each step T takes in the true concept and S’s last estimate of the concept and outputs an example for S. Then S outputs its new estimate of the concept. Algorithm 1 Joint Optimization Require: p(C): distribution over concepts while not converged do Sample c1 , . . . cn ∼ p(C) for each ci do Initialize ĉi,0 = 0 for k ∈ {1, ..., K} do ek = T(ci , ĉi,k−1 |θT ) ĉi,k = S(ek |θS ) end for end for P P θS = θS − n1 ∇θS Pi Pk L(ci , ĉi,k ) θT = θT − n1 ∇θT i k L(ci , ĉi,k ) end while 3. Approach We consider a set of possible concepts C and examples E. For example, C may be different animals like cats, dogs, parrots, etc and E may be images of those animals. The prior p(e|c) is a distribution over non-pedagogically selected examples of the concept. For example, if C is the set of all animals, then p(e|c) could be a uniform distribution over images of a given animal. A student S : E 7→ C takes in a running sequence of K examples and at each step outputs a guess ĉ for the concept the sequence of examples corresponds to. A teacher T : C × C 7→ E takes in the target concept to teach and S’s current guess of the concept and outputs the next example for the student at each step. When the set of examples is continuous T outputs the examples directly. When E is discrete we use the Gumbel-Softmax trick (Jang et al., 2016) to have T generate a sample from E. The performance of both S and T is evaluated by a loss function L : C × C 7→ R that takes in the true concept and S’s output after K examples (although in some tasks we found it useful to sum the losses over all S’s outputs). In our Require: p(C): distribution over concepts Train student on random examples: while not converged do Sample c1 , . . . cn ∼ p(C) for each ci do for k ∈ {1, ..., K} do ek ∼ p(·|ci ) ĉi,k = S(ek |θS ) end for end for P P θS = θS − n1 ∇θS i k L(ci , ĉi,k ) end while Train teacher best response to student: while not converged do Sample c1 , . . . cn ∼ p(C) for each ci do Initialize ĉi,0 = 0 for k ∈ {1, ..., K} do ek = T(ci , ĉi,k−1 |θT ) ĉi,k = S(ek |θS ) end for end for P P θT = θT − n1 ∇θT i k L(ci , ĉi,k ) end while work, both S and T are modeled with deep recurrent neural networks parameterized by θS and θT , respectively. Recurrent memory allows the student and teacher to effectively operate over sequences of examples. T and S are illustrated graphically in Figure 1. In the recent work on learning deep communication protocols, the standard way to optimize S and T would be to optimize them jointly, similar to the training procedure of an autoencoder (Algorithm 1). However, joint optimization allows S and T to form an arbitrary, uninterpretable encoding of the concept via examples. We compare joint optimization to an alternative approach we call a best response (BR) optimization (Algorithm 2), which iteratively trains S and T in two steps: 1. Train S on concept examples e1 , . . . eK ∼ p(·|c) coming from prior example distribution. 2. Train T to select or generate examples for the fixed S from Step 1. The intuition behind separating the optimization into two steps is that if S learns an interpretable learning strategy in Step 1, then T will be forced to learn an interpretable teaching strategy in Step 2. 1 The reason we expect S to learn an 1 We also explored doing additional best responses, but this did Interpretable and Pedagogical Examples “interpretable” strategy in Step 1 is that it allows S to learn a strategy that exploits the natural mapping between concepts and examples. For example, suppose the concept space is the set of all rectangles and p(e|c) is a uniform distribution over points within a rectangle (the task in Section 5.1). In Step 1, S learns to only guess rectangles that contain all the given examples. Because S expects examples to be within the rectangle, then in Step 2, T learns to only give examples that are within the rectangle, without explicitly being constrained to do so. So, T learns to picks the most informative examples that are still within the rectangle, which are the corners of the rectangle. 4. Tasks The purpose of our experiments is to examine what kind of emergent teaching strategies T learns and whether or not they are interpretable. However, there are many definitions of interpretability in the literature (Doshi-Velez & Kim, 2017; Weller, 2017; Lipton, 2016). Rather than selecting just one, we evaluate interpretability in two ways, hoping that together these evaluations more robustly capture what we mean by interpretability. We evaluate interpretability by: 1. Evaluating how similar T’s strategies are to intuitive human-designed strategies in each task 2. Evaluating the effectiveness of T’s strategy at teaching humans. We created a variety of tasks for evaluation that capture a range of different types of concepts (rule-based, probabilistic, boolean, and hierarchical concepts). In this section we provide a brief description of the tasks and why we chose them. Section 5 evaluates our method with respect to the first interpretability criteria, while Section 6 addresses the second interpretability criteria. Rule-based concepts. We first aimed to replicate a common task in the rational pedagogy literature in cognitive science, known as the rectangle game (Shafto & Goodman, 2008). In the variant of the rectangle game that we consider, there is a rectangle that is known to the teacher but unknown to the student. The student’s goal is to infer the boundary of the rectangle from examples of points within the rectangle. The intuitive strategy that human teachers tend to use is to pick opposite corners of the rectangle (Shafto et al., 2012; 2014). We find that T learns to match this strategy. Probabilistic concepts. It is often difficult to define naturally-occurring concepts via rules. For example, it not increase interpretability compared to just one best response. In addition, we explored optimizing S and T jointly after pre-training S with Step 1, but this did not lead to more interpretable protocols than directly training jointly. is unclear how to define what a bird is via logical rules. Moreover, some examples of a concept can seem more prototypical than others (e.g sparrow vs peacock) (Rosch & Mervis, 1975), and this is not captured by simply modeling the concept as a set of rules that must be satisfied. An alternative approach models concept learning as estimating the probability density of the concept (Anderson, 1991; Ashby & Alfonso-Reese, 1995; Fried & Holyoak, 1984; Griffiths et al., 2008). (Shafto et al., 2014) investigate teaching and learning unimodal distributions. But often a concept (e.g lamp) can have multiple subtypes (e.g. desk lamp and floor lamp). So, we investigate how T teaches a bimodal distribution. The bimodal distribution is parameterized as a mixture of two Gaussian distributions and S’s goal is to learn the location of the modes. T learns the intuitive strategy of giving examples at the two modes. Boolean concepts. An object can have many properties, but only a few of them may be relevant for deciding whether the object belongs to a concept or not. For example, a circle is a circle whether it has a radius of 5 centimeters or 100 meters. The purpose of this task is to see what strategy T learns to quickly teach S which properties are relevant to a concept. The possible examples we consider are images that vary based on four properties: size (small, medium, large), color (red, blue, green), shape (square vs circle), and border (solid vs none). Figure 7 shows possible example images. Only one to three of these properties define a concept. For example, if the concept is red circles, then red circles of any size or border fit the concept. T learns the intuitive strategy of picking two examples whose only common properties are the ones required by the concept, allowing S to learn that the other properties are not relevant for membership in the concept. Hierarchical concepts. Human-defined concepts are often hierarchical, e.g. animal taxonomies. Humans are sensitive to taxonomical structure when learning how to generalize to a concept from an example (Xu & Tenenbaum, 2007). The purpose of this task is to test how T learns to teach when the concepts form a hierarchical structure. We create hierarchical concepts by pruning subtrees from Imagenet. T’s goal is to teach S nodes from any level in the hierarchy, but can only give images from leaf nodes. T learns the intuitive strategy of picking two examples whose lowest common ancestor is the concept node, allowing S to generalize to the correct level in the hierarchy. Interpretable and Pedagogical Examples Joint Teacher Figure 2. Rule-based concepts. The black rectangle is the ground-truth concept and the blue dashed rectangle is student’s output after each example. Left: The joint optimization has no clear interpretable strategy. Right: Under BR optimization T learns to give opposite corners of the rectangle. T generates examples continuously as a two-dimensional vector. Distance to Intuitive Strategy 16 12 8 4 0 Random Teacher Joint Figure 3. Rule-based concepts. T’s examples are closer to oppposite corners of the rectangles than randomly generated or jointly trained examples. 5. Evaluation: Strategy Similarity First, we evaluate interpretability by evaluating how similar the strategy T learns is to an intuitive, human-designed strategy for each task. 5.1. Rule-based concepts A concept (rectangle) is encoded as a length four vector c ∈ [−10, 10]4 of the minimum x, minimum y, maximum x, and maximum y of the rectangle. p(e|c) is a uniform distribution over points in the rectangle. Examples are twodimensional vectors that encode the x and y coordinate of a point. The loss between the true concept c and S’s output c0 is L(c, ĉ) = ||c − ĉ||22 and is only calculated on S’s last output. S is first trained against ten examples generated from p(e|c). Then T is trained to teach S in two examples. Figure 2 shows an example of T’s choices and S’s guess of the concept after each example given. Under both BR and joint optimization S is able to infer the concept in two examples. However, in joint optimization it is not clear how T’s examples relate to the ground-truth rectangle (black) or what policy the student (orange) has for inferring the rectangle. On the other hand, in the BR case T outputs points close to opposite corners of the rectangle, and S expands its estimate of the rectangle to fit the examples the teacher gives. Figure 3 measures the distance between the random, best response (teacher), and joint strategy to the intuitive strategy of giving corners averaged over concepts. Specifically, let e = (e1 , e2 ) be the two examples given and S(c) be the set of tuples of opposite corners of c. The distance measures how close these two examples are to a pair of opposite corners and is defined as d(e, c) = mins∈S(c) ||e1 − s1 ||2 + ||e2 − s2 ||2 . T’s examples are much closer to opposite corners than either the random or joint strategy. 5.2. Probabilistic concepts A concept is encoded as two-dimensional vector c = (µ1 , µ2 ) ∈ [0, 20]2 where µ1 and µ2 are the locations of the two modes and µ1 < µ2 . p(e|c) = 0.5N (µ1 , 1) + 0.5N (µ2 , 1) is a mixture of two Gaussians. The loss between the true concept c and S’s output ĉ is L(c, ĉ) = ||c − ĉ||22 . S is first trained against five examples generated from p(e|c). Then T is trained to teach S in two examples. T generates examples continuously as a one-dimensional vector. Interpretable and Pedagogical Examples True modes Random Joint Teacher Joint Figure 4. Probabilistic concepts. T picks examples at different modes more consistently than the random policy, which picks examples near the same mode half of the time. Example are visualized by length of lines. Distance to Intuitive Strategy 8 Random Teacher 6 4 2 0 Random Teacher Joint Figure 6. Boolean concepts. Examples for the concept “red”. Left: The concept “red with border” and “red” are consistent with the random examples. Right: Only the true concept “red” is consistent with T’s examples. Figure 5. Probabilistic concepts. T’s examples are closer to the two modes than randomly generated or jointly trained examples. Figure 4 shows an example of the choices of the random, teacher, and joint strategy. While the random strategy sometimes picks two examples closer to one mode, T is more consistent about picking examples at two of the modes (as indicated by Figure 5). It is unclear how to interpret the choices from the joint strategy. 5.3. Boolean concepts Examples are images of size 25 x 25 x 3. Concepts are ten-dimensional binary vectors where each dimension represents a possible value of a property (size, color, shape, border). The value of one in the vector indicates that the relevant property (e.g. color) must take on that value (e.g. red) in order to be considered a part of the concept. p(e|c) is a uniform distribution over positive examples of the concept. The loss between the true concept c and S’s output ĉ is L(c, ĉ) = ||c − ĉ||22 . S is first trained on five examples generated from p(e|c). In both BR and joint optimization, we trained S with a curriculum starting with concepts defined by three properties, then two, and then one. T is trained to teach S with two examples. In this experiment, T se- Figure 7. Boolean concepts. Possible example images. 100% % Matching Intuitive Strategy T learns the intuitive strategy of giving the two modes as the examples. Figure 5 measures the distance to the intuitive strategy by the distance, ||e − c||2 , between the examples, e, and the true modes, c. Both e and c are sorted when calculating the distance. T learns to match the intuitive strategy better than the random or joint strategy. 50% 0% Random Teacher Joint Figure 8. Boolean concepts. T matches the intuitive strategy 87% of the time, compared to 36% for random, and 0% for joint. lects an example from a discrete set of all images. We use the Gumbel-Softmax estimator (Jang et al., 2016) to select discrete examples from final layer of T in a differentiable manner. T learns the intuitive strategy of picking two examples whose only common properties are the ones required by the concept, so that S can rule out the auxiliary properties. For example, Figure 6 shows T’s examples for the concept Interpretable and Pedagogical Examples Ape Great ape … Orangutan Chimpanzee … Gorilla Lesser ape Siamang Gibbon Figure 9. Hierarchical concepts. An example subtree. T’s strategy is to give two nodes whose lowest common ancestor is the target concept. For example, to teach ape T could choose to give an orangutan image and a siamang image. Random Teacher Joint T learns the intuitive strategy of picking examples from two leaf nodes such that the lowest common ancestor (LCA) of the leaf nodes is the concept node. This strategy encodes the intuition that to teach someone the concept “dog” you wouldn’t only show them images of dalmations. Instead you would show examples of different types of dogs, so they generalize to a higher level in the taxonomy. For example, to teach what an ape is T could select an image of an orangutan and a siamang because the lowest common ancestor of the two is the ape concept (Figure 9). Figure 10 shows T’s correspondence to the intuitive strategy on the interior nodes of three example subtrees of Imagenet: apes, parrots, and felines. These subtrees have 16, 19, and 57 possible concepts respectively. T learns to follow the LCA strategy 100% of the time, whereas the highest the jointly trained strategy ever gets is 20%. 100% % Matching Intuitive Strategy to embed each image into a 2048 length vector. p(e|c) is a uniform distribution over the possible examples for the concept. L(c, ĉ) is the softmax cross entropy loss between the true concept c and S’s output ĉ. S is first trained on five examples generated from p(e|c). T then learns to teach S with two examples. As in 5.3, the final layer of T uses the Gumbel-Softmax estimator to sample an example image. 75% 50% 25% 6. Evaluation: Teaching Humans 0% Primates Felines Parrots Figure 10. Hierarchical concepts. T learns to perfectly match the intuitive strategy for hierarchical concepts, but the joint optimization matches the intuitive strategy less than random examples. of red. T selects a large red square with no border and then a small red circle with a border. The only property the two shapes have in common is red, so the concept must only consist of red. Indeed, 87% of T’s examples only have the required properties in common, compared to 36% of random examples, and 0% of jointly trained examples (Figure 8). 5.4. Hierarchical concepts We create a set of hierarchical concepts by pruning a subtree from Imagenet. Each node in the subtree is a concept and is encoded as a one-hot vector. We randomly select 10 images of each leaf node. The possible examples for a leaf node are any of its ten images. The possible examples for an interior node are images from any of its descendant leaves. For example, in the hierarchy of apes shown in Figure 9, the possible examples for the “lesser apes” concept are images of siamangs or gibbons. We use a pretrained ResNet-50 model (He et al., 2015) In the previous section, we evaluated interpretability by measuring how similar T’s strategy was to a qualitatively intuitive strategy for each task. In this section, we revisit two of the tasks and provide an additional measure of interpretability by evaluating how effective T’s strategy is at teaching humans. 6.1. Probabilistic concepts We ran experiments to see how well T could teach humans the bimodal distributions task from Section 5.2. 60 subjects were recruited on Amazon Mehcanical Turk. They were tested on the ten concepts with modes in E = {4, 8, 12, 16, 20}. 30 subjects were shown two examples generated from p(e|c) for each concept and the other 30 subjects were shown two examples generated by T for each concept. The subjects were then given five test lines of lengths in E and asked to rate on a scale of one to five how likely they think the line is a part of the concept. For each concept there were two lines with very high probability of being in the concept and three lines with very low probability of being in the concept. A subject is said to have gotten the concept correct if they gave the high-probability lines a rating greater than three and the low-probability lines a rating less than or equal to three. The subjects given examples from the teacher had an average accuracy of 18%, compared to 8% with random examples. Interpretable and Pedagogical Examples p < 0.001 20% 0% Random Teacher Figure 11. Probabilistic concepts. Humans learned the correct distribution over concepts better than humans given random examples. 100% Accuracy 100% posed of one property and five composed of two properties. p < 0.001 We recruited 80 subjects on Amazon Mechanical Turk and showed 40 of them two random positive examples of the ten concepts and the other 40 of them two examples chosen by the teacher. They were then asked to classify four new 50% images as either a part of the concept or not. The four new images always had two positive examples and two negative examples for the concept. As shown in Figure 12, the group that received examples from T performed better with a mean accuracy of 76%, compared to a mean accuracy of 0% 71% for those that received random examples. This difRandom Teacher ference was highly significant with p < 0.001, calculated using the same procedure described in Section 6.1 from (Jaeger, 2008). Accuracy Accuracy 40% p < 0.001 7. Discussion What leads the protocols that humans learn to be so different from the protocols that deep learning models learn? One explanation is that humans have limitations that deep learning models do not. 50% 0% Random Teacher Figure 12. Boolean concepts. Humans learned to classify test images better through examples from T. In addition, the teacher group had a much higher standard deviation than the random group, 19% compared to 6%. The maximum accuracy in the teacher group was 70%, but just 20% in the random group. The difference between groups was highly significant with p < 0.001, calculated using a likelihood-ratio test on an ordinary logit model as described in (Jaeger, 2008). Although the teacher group did better, neither group had a high mean accuracy. The task is difficult because a subject needs to get the entire distribution correct to be counted as a correct answer. But another possible reason for poor performance is people may have had the wrong hypothesis about the structure of concepts. It seems as though many subjects hypothesized that the structure of the concept space was unimodal, rather than bimodal, thus believing that lines with a length in between the two shown to them were very likely to be a part of the concept. An interesting open research question is how to ensure that the human has the correct model of the concept space. 6.2. Boolean concepts To evaluate human learning of boolean concepts (the task from Section 5.3), we sampled ten test concepts, five com- We investigated the impact of one limitation: humans cannot jointly optimize among themselves. We found that switching to an iterative optimization in which (1) the student network is trained against examples coming from a nonpedagogical distribution and then (2) the teacher network is trained against this fixed student leads to more interpretable teaching protocols. The intuition behind the approach is that (1) leads the student to learn an interpretable learning strategy, which then constrains the teacher to learn an interpretable teaching strategy in (2). But this is just one of many possible limitations. For example, one reason we believe human students did not learn concepts as well as the student network (Section 6) is that humans had a different prior over concepts. In the probabilistic concepts task, humans seemed to believe that the lines came from a unimodal, rather than bimodal, distribution. In the boolean concepts task, humans tended to overemphasize color as a property. It is unrealistic to assume that a teacher and student have a perfectly matching prior over concepts or perfect models of each other. An important open question is which of these limitations are fundamental for the emergence of interpretable teaching protocols. While we carried out our experiments in the setting of teaching via examples, another direction for future work is investigating how an iterative optimization procedure works in more complex teaching settings (say teaching through demonstrations) and in communication tasks more broadly. Overall, we hope that our work presents a first step towards understanding the gap between the interpretability of machine agents and human agents. Interpretable and Pedagogical Examples References Anderson, John R. The adaptive nature of human categorization. Psychological Review, 98(3):409, 1991. Angluin, Dana and Kriķis, Mārtiņš. Teachers, learners and black boxes. In Proceedings of the tenth annual conference on Computational learning theory, pp. 285–297. ACM, 1997. Ashby, F Gregory and Alfonso-Reese, Leola A. Categorization as probability density estimation. Journal of mathematical psychology, 39(2):216–233, 1995. Balbach, Frank J and Zeugmann, Thomas. Recent developments in algorithmic teaching. LATA, 9:1–18, 2009. Buchsbaum, Daphna, Gopnik, Alison, Griffiths, Thomas L, and Shafto, Patrick. Childrens imitation of causal action sequences is influenced by statistical and pedagogical evidence. Cognition, 120(3):331–340, 2011. Jackson, Jeffrey and Tomkins, Andrew. A computational model of teaching. In Proceedings of the fifth annual workshop on Computational learning theory, pp. 319– 326. ACM, 1992. Jaeger, T Florian. Categorical data analysis: Away from anovas (transformation or not) and towards logit mixed models. Journal of memory and language, 59(4):434– 446, 2008. Jang, Eric, Gu, Shixiang, and Poole, Ben. Categorical reparameterization with gumbel-softmax. arXiv preprint arXiv:1611.01144, 2016. Kottur, Satwik, Moura, José MF, Lee, Stefan, and Batra, Dhruv. Natural language does not emerge’naturally’in multi-agent dialog. arXiv preprint arXiv:1706.08502, 2017. Caruana, Rich, Herlands, William, Simard, Patrice, Wilson, Andrew Gordon, and Yosinski, Jason. Proceedings of nips 2017 symposium on interpretable machine learning. arXiv preprint arXiv:1711.09889, 2017. Lazaridou, Angeliki, Peysakhovich, Alexander, and Baroni, Marco. Multi-agent cooperation and the emergence of (natural) language. arXiv preprint arXiv:1612.07182, 2016. Das, Abhishek, Kottur, Satwik, Moura, José MF, Lee, Stefan, and Batra, Dhruv. Learning cooperative visual dialog agents with deep reinforcement learning. arXiv preprint arXiv:1703.06585, 2017. Lipton, Zachary C. The mythos of model interpretability. arXiv preprint arXiv:1606.03490, 2016. Doshi-Velez, Finale and Kim, Been. Towards a rigorous science of interpretable machine learning. arXiv preprint arXiv:1702.08608, 2017. Foerster, Jakob, Assael, Yannis, de Freitas, Nando, and Whiteson, Shimon. Learning to communicate with deep multi-agent reinforcement learning. In Advances in Neural Information Processing Systems, pp. 2137–2145, 2016. Fried, Lisbeth S and Holyoak, Keith J. Induction of category distributions: A framework for classification learning. Journal of Experimental Psychology: Learning, Memory, and Cognition, 10(2):234, 1984. Goldman, Sally A and Mathias, H David. Teaching a smarter learner. Journal of Computer and System Sciences, 52(2): 255–267, 1996. Griffiths, Thomas L, Sanborn, Adam N, Canini, Kevin R, and Navarro, Daniel J. Categorization as nonparametric bayesian density estimation. The probabilistic mind: Prospects for Bayesian cognitive science, pp. 303–328, 2008. He, Kaiming, Zhang, Xiangyu, Ren, Shaoqing, and Sun, Jian. Deep residual learning for image recognition. arXiv preprint arXiv:1512.03385, 2015. Mordatch, Igor and Abbeel, Pieter. Emergence of grounded compositional language in multi-agent populations. arXiv preprint arXiv:1703.04908, 2017. Ott, Matthias and Stephan, Frank. Avoiding coding tricks by hyperrobust learning. Theoretical Computer Science, 284(1):161–180, 2002. Rosch, Eleanor and Mervis, Carolyn B. Family resemblances: Studies in the internal structure of categories. Cognitive psychology, 7(4):573–605, 1975. Shafto, Patrick and Goodman, Noah. Teaching games: Statistical sampling assumptions for learning in pedagogical situations. In Proceedings of the 30th annual conference of the Cognitive Science Society, pp. 1632–1637. Cognitive Science Society Austin, TX, 2008. Shafto, Patrick, Goodman, Noah D, and Frank, Michael C. Learning from others: The consequences of psychological reasoning for human learning. Perspectives on Psychological Science, 7(4):341–351, 2012. Shafto, Patrick, Goodman, Noah D, and Griffiths, Thomas L. A rational account of pedagogical reasoning: Teaching by, and learning from, examples. Cognitive psychology, 71:55–89, 2014. Interpretable and Pedagogical Examples Sukhbaatar, Sainbayar, Szlam, Arthur, and Fergus, Rob. Learning multiagent communication with backpropagation. In Advances in Neural Information Processing Systems 29: Annual Conference on Neural Information Processing Systems 2016, December 5-10, 2016, Barcelona, Spain, pp. 2244–2252, 2016. Weller, Adrian. Challenges for transparency. arXiv preprint arXiv:1708.01870, 2017. Xu, Fei and Tenenbaum, Joshua B. Word learning as bayesian inference. Psychological review, 114(2):245, 2007. Zilles, Sandra, Lange, Steffen, Holte, Robert, and Zinkevich, Martin. Models of cooperative teaching and learning. Journal of Machine Learning Research, 12(Feb):349–384, 2011.
2cs.AI
Overgroups of exterior powers of an elementary group. I. Levels and normalizers arXiv:1801.07918v1 [math.GR] 24 Jan 2018 ROMAN LUBKOV AND ILIA NEKRASOV Abstract. In the present paper we prove the first part in the standard description of groups H lying Vm Vm between E(n, R) and GL( n ) (R). We study structure of the group E(n, R) and its relative analog m   n E m , R, A . In the considering case n > 3m, the description is explained by classical notion of level : for every such H we find unique ideal A of the ring R. V Motivated by the problem, we prove the coincidence ofV the following groups: normalizer of m E(n, R), V Vm Vm E(n, R) into m SLn (R), and a group m GLn (R). This result SLn (R), transporter of normalizer of Vm mainly follows from the found explicit equations for the algebraic group scheme GLn ( ). 1. Introduction The present paper is devoted to the solution of the following general problem. General Problem. Let R be an arbitrary commutative associative ring with 1 and invertible 2, and let Φ be a reduced irreducible root system. For the Chevalley–Demazure scheme G(Φ, ) 6 GLM ( ) and its arbitrary representation ρ : G(Φ, ) −→ GLN ( ) describe all overgroups H of the corresponding elementary group EG (Φ, ) in the representation ρ: EG,ρ (Φ, R) 6 H 6 GLN (R). The conjectural answer, standard overgroup description, in a general case is formulated as follows. For any overgroup H of the elementary group there exists a net of ideals A of the ring R such that  EG,ρ (Φ, R) · E(N, R, A) 6 H 6 NGLN (R) EG,ρ (Φ, R) · E(N, R, A) , (GA ) where E(N, R, A) is a relative elementary subgroup for a net A. In the special case of a trivial net, i.e. A = {A}, overgroups H of the group EG (Φ, R) can be parametrized by the ideals A of the ring R:  EG,ρ (Φ, R) · E(N, R, A) 6 H 6 NGLN (R) EG,ρ (Φ, R) · E(N, R, A) , (GA ) where E(N, R, A) is a relative elementary subgroup equals E(n, A)E(n,R) . Moreover, the group EEG,ρ (Φ, R) = EG,ρ (Φ, R) · E(N, R, A) is conjecturally perfect. And at the same time, the normalizer of the right-hand side is congruence subgroup for the corresponding level A. The essential step in the prove of the right-hand side inclusion in (GA ) is an alternative descrip tion of the normalizer NGLN ( ) EG,ρ (Φ, ) . This group conjecturally coincides with a transporter TranGLN ( ) (EG,ρ (Φ, ), Gρ (Φ, )), a normalizer NGLN (Gρ (Φ, )) and the extended Chevalley–Demazure scheme Gρ (Φ, ). The problem was solved in the following cases: • for symplectic, orthogonal, and unitary groups by Nikolai Vavilov and Victor Petrov in [1, 2, 3, 4] and by You Hong, Xing Tao Wang and Cheng Shao Hong in [5, 6, 7, 8]; • for exceptional groups of Lie type E6 , E7 , E8 , F4 by Nikolai Vavilov and Alexander Luzgarev in [9, 10, 11, 12]; 1991 Mathematics Subject Classification. 20G35. Key words and phrases. General linear group, elementary group, overgroup, fundumentional representation. The constructions from the proof of Theorems 1 and 2 (Subsections 4.1–4.5) are done by the first author and supported by the Russian Science Foundation, grant №17-11-01261. The constructions from the proof of Theorem 3 (Subsections 4.6–4.8) are done by the second author and supported by the Russian Science Foundation, grant №16-11-10200. 1 2 ROMAN LUBKOV AND ILIA NEKRASOV • for tensor product of general linear groups GLm ⊗ GLn the problem was partially solved by Alexey Ananievskii, Nikolai Vavilov, and Sergey Sinchuk in the joint paper [13]. We highly recommend the surveys [14, 15, 16], which contain necessary preliminaries, complete history, and known results of the problem. In the present paper we consider the case of the m-th fundamental representation of a simply connected group of type An−1 , i.e. the scheme Gρ (Φ, ) equals the [Zariski] closure of the affine group scheme SLn ( ) in the representation with the highest weight ̟m . In our case, corresponding extended Chevalley group scheme coincides with the m-th fundamental representation of the general linear group scheme GLn ( ). We deal only with a case of a trivial net, i.e. an unique parameterizing ideal A. As shown below (Propositions 5 and 1), this restricts our consideration to the case n > 3m. In this case, the general Vm answer has the following form. Let H be a subgroup in GLN (R) containing E(n, R). Then there exists a unique ideal A P R such that  Vm Vm E(n, R) · E(N, R, A) 6 H 6 NGLN (R) E(n, R) · E(N, R, A) . (∗) The present paper is organized as follows. In the next Section 2 we formulate all main results of the paper with only necessary major comments. In Section 3 we set notation that is used in the rest of the paper. The last lengthy Section 4 contains all complete proofs. In this section we firstly present the level computation for the particular case of the exterior square (Subsection 4.1), and then develop the technique for aVgeneral exterior power (Subsections 4.2–4.3). Subsections 4.6–4.8 contain the presentation m of the scheme GLn ( ) as a stabilizer. Also the paper contain an Appendix devoted to translation of the former technique for computing explicit equations defining group schemes into Representation Theory language. Acknowledgment. We would like to express our sincere gratitude to our scientific adviser Nikolai Vavilov for formulating the problem and constant support, without which this paper would never have been written. Also authors are grateful to Alexei Stepanov for careful reading of our original manuscript and for numerous remarks and corrections. 2. Main results Fundamental representations for the general linear group GLn , as well as for the special linear group SLn , are ones with the highest weights ̟m for m = 1, . . . , n. The representation with the highest weight ̟n degenerates in the case of SLn . The explicit description of these representations uses exterior powers of vector spaces. V In more details, for commutative ring R by m Rn we denote m-th exterior power of the free module Rn . We can consider a natural transformation the exterior power Vm : GLn → GL( n ) m Vm which action extends the action of the group of points GLn (R) on the module Rn . The elementary group E(n, R) is a subgroup of the group of points GLn (R), so its exterior power Vm Vm E(n, R) is well defined subgroup of the group of points GL n (R). More user–friendly description of Vm elements of the elementary group E(n, R) will be presented in the Subsections 4.1 and 4.2. Vm Let H be an arbitrary overgroup of the elementary group E(n, R): Vm E(n, R) 6 H 6 GL( n ) (R). m Vm For any unequal weights I, J ∈ [n], which are indices for matrix entries of elements from GL( n ) (R), by m AI,J we denote the following set AI,J := {ξ ∈ R | tI,J (ξ) ∈ H} ⊆ R. It turns out that this sets are ideals indeed and coincide for all pairs of weights I 6= J. Proposition 1. All sets AI,J coincide for n > 3m. Overgroups of exterior powers of an elementary group. I. Levels and normalizers 3 In the uncosidered case n3 ≤ m ≤ n the description of overgroups can not be done by parametrization only by single ideal. Moreover, as could be seen from further calculations we need from 1 to m ideals for the complete parametrization of overgroups. In the general case this [partially ordered] set of ideals forms the a net of ideals (due to Zenon Borevich). Note that in the case of not-unique ideal parametrization, even the notion of relative elementary group is far more complex and depends on the Chevalley group (for instance, see [13]), let alone formulations of the Main Theorems. The set A := AI,J is called a level of an overgroup H. Description of the overgroups goes in the following way. Theorem 1 (Level Computation). Let R be a commutative ring and n, m be a natural numbers with a V constraint n > 3m. For an arbitrary overgroup H of the group m E(n, R) there exists unique ideal A of the ring R such that Vm E(n, R) · E(N, R, A) 6 H. Namely, if a transvection tI,J (ξ) belongs to the group H, then ξ ∈ A. Vm The left–hand side subgroup is denoted by E E(n, R, A). We emphasize that this group is perfect (Lemma 7). MotivatedV by the expected relations (∗), we find an alternative description of the normalizer m NGLN (R) (E E(n, R, A)). For this we introduce the canonical projection ρA : R −→ R/A mapping λ ∈ R to λ̄ = λ + A ∈ R/I. Applying the projection to all entries of a matrix, we get the reduction homomorphism ρA : GLn (R) −→ GLn (R/A) a 7→ a = (ai,j ) Eventually, we have the following explicit congruence description. Theorem 2. Let n > 3m. For any ideal A P R we have Vm NGLN (R) (E E(n, R, A)) = ρ−1 A ( Vm GLn (R/A)) . For formulating the last Theorem, we recall that for two arbitrary subgroups E and F of a group G a transporter of the group E into the group F is the following set TranG (E, F ) = {g ∈ G | E g 6 F }, In a special case of subgroups E 6 F the last definition can be rephrased by using commutators: TranG (E, F ) = {g ∈ G | [g, E] 6 F }. The final Theorem describes a normalizer of the elementary group Vm transporter and as the group GLn (R). Vm E(n, R) simultaneously as a Theorem 3. Let R be a commutative ring, and let n > 4. Then Vm NGLN (R) ( Vm Vm E(n, R)) = NGLN (R) ( SLn (R)) = TranGLN (R) ( E(n, R)), Vm SLn (R)) = Vm GLn (R). The most significant step in the proof of this Theorem is the inclusion Vm TranGLN (R) ( E(n, R), Vm SL(n, R)) 6 Vm GLn (R). Standard proof uses the invariant form defining the group Gρ (Φ, R) as a stabilizer. However, in our case this forms exist only in some infrequent cases, unlike the classical ones of • general orthogonal group GOn ( ), • general symplectic group GSpn ( ), • groups of Lie type E6 For the remaining cases we consider (skew–symmetric or symmetric) polynomial ideals coming from coordinate ring of Grassmannians Gr(m, n) (Propositions 7, 8 for the case n 6= 2m and Proposition 11 for the exceptional case n = 2m). 4 ROMAN LUBKOV AND ILIA NEKRASOV 3. Principal notation Our notation is for the most part fairly standard in Chevalley group theory and coincides with the notation in [1, 2, 3, 17]. We recall all necessary notion to read the present paper independently. First, let G be an arbitrary group. By a commutator of two elements we always understand the leftnormed commutator [x, y] = xyx−1 y −1 , where x, y ∈ G. Multiple commutators are also left-normed; in particular, [x, y, z] = [[x, y], z]. By x y = xyx−1 we denote the left conjugates of y by x. Similarly, by y x = x−1 yx we denote the right conjugates of y by x. In the sequel, we will use the Hall–Witt identity: [x, y −1 , z −1 ]x · [z, x−1 , y −1 ]z · [y, z −1 , x−1 ]y = e. For a subset X ⊆ G, we denote by hXi the subgroup it generates. The notation H 6 G means that H is a subgroup in G, while the notation H P G means that H is a normal subgroup in G. For H 6 G, we denote by hXiH the smallest subgroup in G containing X and normalized by H. For two groups F, H 6 G, we denote by [F, H] their mutual commutator: [F, H] = h[f, g], where f ∈ F, h ∈ Hi. Also, we need some elementary ring theory notation. Let R be a arbitrary associative ring with 1. By default, it is assumed to be commutative. By a ideal I of the ring R we understand the two-sided ideal and this is denoted by I P R. As usual, let R∗ be the multiplicative group of the ring R. Let M (m, n, R) be the R-bimodule of (m × n)-matrices with entries in R, and let M (n, R) = M (n, n, R) be the full matrix ring of degree n over R. By GLn (R) = M(n, R)∗ we denote the general linear group while SLn (R) is the special linear group of degree n over R. As usual, ai,j denotes the entry of a matrix a at the position (i, j), where 1 6 i, j 6 n. Further, e denotes the identity matrix and ei,j denotes a standard matrix unit, i.e. the matrix that has 1 at the position (i, j) and zeros elsewhere. By ti,j (ξ) we denote an elementary transvection, i.e. a matrix of the form ti,j (ξ) = e + ξei,j , 1 6 i 6= j 6 n, ξ ∈ R. In the sequel, we use (without any special reference) standard relations [17] among elementary transvections such as (1) the additivity: ti,j (ξ)ti,j (ζ) = ti,j (ξ + ζ). (2) the Chevalley commutator formula:   e, [ti,j (ξ), th,k (ζ)] = ti,k (ξζ),   th,j (−ζξ), if j 6= h, i 6= k, if j = h, i 6= k, if j 6= h, i = k. Now, let I be an ideal in R. Denote by E(n, I) the subgroup of GLn (R) generated by all elementary transvections of level I: E(n, I) = hti,j (ξ), 1 6 i 6= j 6 n, ξ ∈ Ii. In the most important case I = R, the group E(n, R) generated by all elementary transvections is called the (absolute) elementary group: E(n, R) = hti,j (ξ), 1 6 i 6= j 6 n, ξ ∈ Ri. It is well known (due to Andrei Suslin [18]) that elementary group is normal in the general linear group GLn (R) for n > 3. The normality is crucial for the further considerations, so we suppose that n > 3. In the sequel, the (relative) elementary group E(n, R, I) is of great importance. Recall that the group E(n, R, I) is the normal closure of E(n, I) in E(n, R): E(n, R, I) = hti,j (ξ), 1 6 i 6= j 6 n, ξ ∈ IiE(n,R) . This group E(n, R, I) is normal in GLn (R) if n > 3. This fact, first proved in [18], is cited as Suslin’s theorem. Moreover, if n > 3, then the group E(n, R, I) is generated by transvections of the form zi,j (ξ, ζ) = tj,i (ζ)ti,j (ξ)tj,i (−ζ), 1 6 i 6= j 6 n, ξ ∈ I, ζ ∈ R. This fact was proved by Vaserstein and Suslin [19] and, in context of Chevalley groups, by Tits [20]. Overgroups of exterior powers of an elementary group. I. Levels and normalizers 5 V By [n] we denote a set {1, 2, . . . , n} and by m [n] we denote an exterior power of the set [n]. Elements Vm of the [n] are unordered1 subsets I ⊆ [n] of cardinality m without repeating entries: Vm [n] = {(i1 , i2 , . . . , im ) | ij ∈ [n], ij 6= il }. Vm For a matrix a ∈ GLn (R) and for sets I, J from [n], define a minor MIJ (a) of the matrix a as follows. J MI (a) equals the determinant of a submatrixformed by rows from the set I and columns from the set J. n By N we denote the binomial coefficient m . This number always equals the rank of the ambient group GL. For this reason, in the sequel, we will not mention the dependence of the N on m, exterior power. 4. Proofs & Computations In this section we present all proofs of Main Theorems without skipping any technical details. Primarily we consider a case of the exterior square of the group scheme GLn . There are two reasons for this. Firstly, for n = 4 Nikolai Vavilov and Victor Petrov completed the standard description of overgroups2. Secondly, proofs of all statements in the arbitrary exterior power case are technically more complex analogues for the proofs of the present section. At the same time, simpler proofs present all basic ideas of the general case. 4.1. Exterior square of elementary groups. Let Rn be a right R–module with the basis {e1 , . . . , en }. Consider the standard action of the group GLn (R) on Rn . Define an exterior square of R–module as follows. The basis of this module is all exterior products ei ∧ ej , 1 6 i 6= j 6 n and ei ∧ ej = −ej ∧ ei . V V Denote the exterior square of Rn by 2 (Rn ). Now, we define an action of the group GLn (R) on 2 (Rn ). Firstly, we define this action on basic elements by the rule g(ei ∧ ej ) := (gei ) ∧ (gej ) for any g ∈ GLn (R) and 1 6 i 6= j 6 n. V 2 n Secondly, we extend this action  by linearity to the whole module (R ). Finally, using this action we V2 define a subgroup GLn (R) of the general linear group GLN (R). In the other words, let us consider the Cauchy–Binet homomorphism V2 : GLn (R) −→ GLN (R), V2 V2 taking each matrix x ∈ GLn (R) to the matrix (x)V∈ GLN (R). Elements of (x) ∈ GLN (R) are all 2 GLn (R) is an image of the general linear group second order minors of the matrix x. Then the group V2 under the Cauchy–Binet homomorphism. It is natural to index elements of the matrix (x) by pair of V2 elements of the set [n]:   V2 V2 (x) (i1 ,i2 ),(j1 ,j2 ) = Mij11,i,j22 (x) = xi1 ,j1 · xi2 ,j2 − xi1 ,j2 · xi2 ,j1 . (x) I,J = The following lemma is needed for the sequel; this fact is a corollary of Suslin’s theorem. Lemma 1. The image of the elementary group is normal in the image of the general linear group under the exterior square homomorphism: V2 Consider the structure of the group  V2 the very definition of GLn (R) . V2 E(n, R) P V2 (GLn (R)). E(n, R) in details. The following proposition can be obtained by Proposition 2. Let ti,j (ξ) be an elementary transvection. For n > 3 the transvection presented as the following product: V2 ti,j (ξ) = i−1 Y k=1 for any 1 6 i < j 6 n. tki,kj (ξ) · j−1 Y l=i+1 til,lj (−ξ) · n Y tim,jm (ξ) V2 ti,j (ξ) can be (1) m=j+1 1In the sequel, we arrange them in ascending order. 2The restriction of the exterior square map V2 : GL (R) −→ GL (R) to the group E(4, R) is an isomorphism onto the 4 6 elementary orthogonal group EO(6, R) [1]. 6 ROMAN LUBKOV AND ILIA NEKRASOV Remark. For i > j similar equality holds: V2 ti,j (ξ) = j−1 Y tki,kj (ξ) · k=1 i−1 Y tli,jl (−ξ) · l=j+1 n Y (1′ ) tim,jm (ξ) m=i+1 Remark. A commutator of any two transvections from the right-hand sides of formulas (1) and (1′ ) equals 1. V2 Therefore the commutator with the transvection ti,j (ξ) is equal to 1 as well. V2 It follows from the proposition that ti,j (ξ) ∈ En−2 (N, R), where a set EM (N, R) consists of products of M or less elementary transvections. V2 Let H be any overgroup of the exterior square of the elementary group E(n, R): V2 Consider any different indices I, J ∈ V2 E(n, R) 6 H 6 GLN (R). [n]. By AI,J denote the set AI,J := {ξ ∈ R | tI,J (ξ) ∈ H} ⊆ R. Let tI,J (ξ) be any elementary transvection. Define the height of tI,J (ξ) (generally, of the pair (I, J)) as the cardinality of I ∩ J: ht(tI,J (ξ)) = ht(I, J) = |I ∩ J|. This combinatorial characteristic of transvections is useful in simplifying commutator calculations. The height splits up all sets AI,J into two classes: the one with ht(I, J) = 0 and the one with ht(I, J) = 1. In fact, this classes are equal for n > 6. The set A := AI,J is called the level of the overgroup H. Note that for n = 4 the level is unique, that follows from [1]. Lemma 2. Under a constraint n > 6 every set AI,J is an ideal in the ring R. Moreover, for any I 6= J and K 6= L the ideals AI,J and AK,L coincide. Proof. Complete proof is presented in the Section 4.4, Proposition 5. Here we only give calculations for the case (n, m) = (4, 2). The reason is that this calculations in a transparent way present the general idea. (1) Firstly, take any ξ ∈ A12,34 , i.e. t12,34 (ξ) ∈ H. Then [t12,34 (ξ), V2 t4,2 (ζ)] = t14,23 (−ξζ 2 )t14,34 (−ζξ)t12,23 (−ξζ) ∈ H. It remains to provide this calculation with −ζ and to product two right-hand sides; then we obtain t14,23 (−2ξζ 2 ) ∈ H. By the condition 2 ∈ R∗ , this means that A12,34 ⊆ A14,23 . It follows that AI,J ⊆ AK,L for I ∪ J = K ∪ L = {1234}. (2) Secondly, take any ξ ∈ A12,34 , then [t12,34 (ξ), V2 t4,5 (ζ)] = t12,35 (ξζ). Consequently, AI,J ⊆ AK,L for ht(I, J) = ht(K, L) = 0. V2 (3) Thirdly, let ξ ∈ A12,13 , then [t12,13 (ξ), t1,4 (ζ)] = t12,34 (−ξζ) ∈ H. Consider two commutators of V2 V2 the last transvection with t4,1 (ζ1 ) and t4,1 (−ζ1 ) respectively. We obtain that t24,13 (ζ12 ξζ) ∈ H and also t12,13 (−ξζζ1 )t24,34 (ζ1 ξζ) ∈ H. Hence t24,34 (ζ1 ξζ) ∈ H. This means that AI,J ⊆ AK,L for any ht(I, J) = ht(K, L) = 1. (4) Now, take any ξ ∈ A12,23 , then [t12,23 (ξ), V2 t4,2 (ζ)] = t14,23 (−ζξ). Thus AI,J ⊆ AK,L for ht(I, J) = 1, ht(K, L) = 0. V2 (5) Finally, let ξ ∈ A12,34 . Like in (1), consider the commutator t12,34 (ξ) with t4,2 (ζ). We obtain that t14,23 (−2ξζ 2 ) ∈ H and also t14,34 (−ζξ)t12,23 (−ξζ) ∈ H. By the same argument, we can provide V this calculations with the transvection t45,16 (ξ) and 2 t6,4 (ζ1 ). We get that t56,14 (−2ζ12 ξ) ∈ H and t45,14 (ξζ1 )t56,16 (ζ1 ξ) ∈ H. To finish the proof, it remains to commutate last two products. Then t45,34 (−ξ 2 ζ1 ζ) ∈ H, or AI,J ⊆ AK,L for ht(I, J) = 0, ht(K, L) = 1.  Overgroups of exterior powers of an elementary group. I. Levels and normalizers 7 The following lemma is crucial for the rest. It is devoted to the alternative description of the relative elementary group. Lemma 3. Let n > 6. For any ideal A P R, we have V2 E(N, A) E(n,R) = E(N, R, A), where by definition E(N, R, A) = E(N, A)E(N,R) . Proof. The inclusion 6 is trivial. By Vaserstein–Suslin’s lemma [19], the group E(N, R, A) generated by elements of the form zij,hk (ξ, ζ) = zI,J (ξ, ζ) = tJ,I (ζ) tI,J (ξ) tJ,I (−ζ), ξ ∈ A, ζ ∈ R. Hence to prove the reverse inclusion, it suffices to check that for any ξ ∈ A, ζ ∈ R, the matrix zij,hk (ξ, ζ) V2 belongs to F := E(N, A) E(n,R) . Let us consider two cases: • Suppose that there exists one pair of the same indices. Without loss of generality, we can assume that i = k. Then this inclusion is obvious: zij,hi (ξ, ζ) = thi,ij (ζ) tij,hi (ξ) = V2 th,j (ζ) tij,hi (ξ) ∈ F. • Thus, we are left with the inclusion zij,hk (ξ, ζ) ∈ F with different indices i, j , h , k. Firstly, we express tij,hk (ξ) as a commutator of elementary transvections: zij,hk (ξ, ζ) = thk,ij (ζ) tij,hk (ξ) = thk,ij (ζ) [tij,jh (ξ), tjh,hk (1)]. Conjugating the arguments of the commutator by thk,ij (ζ), we get zij,hk (ξ, ζ) = [tij,jh(ξ)thk,jh (ζξ), tjh,ij (−ζ)tjh,hk (1)] =: [ab, cd]. Next, we decompose the right-hand side with the help of the formula [ab, cd] = a [b, c] · ac [b, d] · [a, c] · c [a, d], and observe that the exponent a belongs to E(N, A) so can be ignored. Now a direct calculation, based upon the Chevalley commutator formula, shows that [b, c] = [thk,jh(ζξ), tjh,ij (−ζ)] = thk,ij (−ζ 2 ξ) ∈ E(N, A); c [b, d] = tjh,ij (−ζ) [thk,jh(ζξ), tjh,hk (1)] = = thk,ik (−ξζ 2 (1 + ξζ))tjh,ik (−ξζ 2 ) · [a, c] = [tij,jh(ξ), tjh,ij (−ζ)] = [tij,jh (ξ), c V2 V2 th,i (ζ) [thk,jh(ξζ), V2 tj,k (−1)]; th,i (−ζ)]; [a, d] = tjh,ij (−ζ) [tij,jh(ξ), tjh,hk (1)] = 2 = tjh,ik (ξζ )tij,ik (−ξζ) · V2 th,i (ζ) [tij,jh(ξ), V2 tj,k (−1)], where all factors on the right-hand side belong to F .  Remark. The attentive reader can remark that this calculations are almost completely coincide with the calculations for the orthogonal and symplectic cases [1, 2, 3]. In the special case (n, m) = (4, 2) calculations V2 are the same due to the isomorphism E(4, R) ∼ = EO(6, R). Amazingly that this argument proves similar proposition in the case of general exterior power (see Section 4.4, Lemma 6). Corollary 1. Let A be an arbitrary ideal of R; then V2 E(n, R) · E(N, R, A) = V2 E(n, R) · E(N, A). Summarizing the above two lemmas, we get the following crucial result. 8 ROMAN LUBKOV AND ILIA NEKRASOV Theorem 4 (Level Computation). Let n > 6, let H be a subgroup in GLN (R) containing Then there exists a unique largest ideal A P R such that V2 V2 E(n, R). E(n, R) · E(N, R, A) 6 H. Namely, if tI,J (ξ) ∈ H for some I and J, then ξ ∈ A. V2 Lemma 3 asserts precisely that E(n, R) · E(N, R, A) is generated as a subgroup by transvections ti,j (ζ), ζ ∈ R, and by elementary transvections tij,hk (ξ), ξ ∈ A, of the level A. As always, we assume that n > 5 and 2 ∈ R∗ . In the rest of the section, we prove the perfectness of the bottom restriction subgroup from the last Theorem. V2 Lemma 4. Let n > 6. The group V2 E(n, R) · E(N, R, A) is perfect for any ideal A P R. V2 Proof. It suffices to verify that all generators of the group E(n, R) · E(N, R, A) lie in its commutator subgroup, which we denote by F . V • For the transvections 2 ti,j (ζ) this follows from the Cauchy–Binet homomorphism:  V2 V2 V2 V2 ti,h (ζ), th,j (1) . ti,j (ζ) = ([ti,h (ζ), th,j (1)]) = • On the other hand, for the transvections tij,hk (ξ) with different indices i, j , h , k and ξ ∈ A this is obvious:   V2 tij,hk (ξ) = [tij,jh (ξ), tjh,hk (1)] = tij,jh(ξ), tj,k (±1) ∈ F. If there exists a pair of the same indices, then   V2 tij,hi (ξ) = [tij,ik (ξ), tik,hi (1)] = tij,ik (ξ), tk,h(±1) ∈ F.  4.2. Exterior powers of elementary groups. In this section we generalize all previous statements to the case of an arbitrary exterior power functor. Let us define m-th exterior power of the R–module Rn as follows. The basis of this module is all exterior products ei1 ∧ . . . ∧ eim , where 1 6 i1 < . . . < im 6 n, such that eσ(i1 ) ∧ . . . ∧ eσ(im ) = sgn(σ) ei1 ∧ . . . ∧ eim Vm for any permutation σ in the symmetric group Sm . Denote V the exterior power of Rn by (Rn ). Now, we m define an action of the group GLn (R) on basis elements of (Rn ) by the rule g(ei1 ∧ . . . ∧ eim ) := (gei1 ) ∧ . . . ∧ (geim ). Vm By linearity we can extend the action to the whole module (Rn ). V m In other words, we can consider the Cauchy–Binet homomorphism : GLn (R) −→ GL( n ) (R) taking m Vm Vm each matrix x ∈ GLn (R) to the matrix (x) ∈ GLN (R). Elements of (x) ∈ GLN (R) are all m-order Vm minors of the matrix x. More precisely, it is natural to index the entries of matrix (x) by pairs of Vm elements of the set [n]:   V2 V2 ,...,jm (x) I,J = (x) (i1 ,...,im ),(j1 ,...,jm ) = Mij11,...,i (x). m Vm Vm GLn , while the whole set [n]m is a weight set [n] is a set of weights for the group scheme Note that for the group scheme GL( n ) . m  Vm Then a group GLn (R) by definition is an image of the general linear group under the Cauchy–Binet homomorphism. We cannot but emphasize the difference between the groups3  V Vm SLn (R) < m SLn (R) < SL( n ) (R). m The first one is obtained as group-theoretic image of the [abstract] group SLn (R) under the Cauchy– Binet homomorphism, while the second one is a group of R-points of the categorical image of the group scheme SLn under the natural transformation corresponding to the previous Cauchy–Binet homomorphism. And as can be seen by dimension computation both last groups do not equal to the ambient group 3The same strict inclusions are still true with change SL to GL. Overgroups of exterior powers of an elementary group. I. Levels and normalizers 9 SL( n ) (R). We refer the reader to [21] for more precise results about the difference between the last three m groups. Vdim(V )−m Vm ∼ V )∗ for an arbitrary free R-module We assume that n > 2m due to an isomorphism V∗V =( Vm m V . As in Section 4.1, E(n, R) is a normal subgroup of (GLn (R)) by Suslin’s lemma. For the further computations we calculate an exterior power of an elementary transvection in the following proposition. The proof is a straightforward by the very definition of the [classical] Binet–Cauchy homomorphism. Proposition 3. Let ti,j (ξ) be an elementary transvection, let L be a naturally ordered subset of [n] of the cardinality m − 1. Numbers i, j does not belong to L. Denote by sgn(L, i, j) the sign of the permutation (L, i, j)4 . Then for n > 3 we have Y Vm ti,j (ξ) = tL∪i,L∪j (sgn(L, i, j)ξ) (m) |L|=m−1 i,j ∈L / for any 1 6 i < j 6 n. n−2 Vm It follows from the proposition that ti,j (ξ) ∈ E(m−1) (N, R), where by definition every element of the set EM (N, R) is a product of M or less elementary transvections. 4.3. Elementary calculations technique. In the case of general exterior power m, the calculations with elementary transvections are huge. This subsection is intended to impose theory upon this calculations. In the next section we are interested in the exact description of V the group H ∩ E(N, R). General m strategyV for such V description is the following. From the inclusion E(n, R) 6 H for any tI,J (ξ) ∈ Vm m m H and ti,j (ζ) ∈ E(n, R) we see that [tI,J (ξ), ti,j (ζ)] ∈ H. Thereby if we commute the elementary V transvection tI,J (ξ) ∈ H with elements from m E(n, R) we obtain other transvections from the intersection H ∩ E(N, R). For example, from the formula (m) it follows that [t135,124 (ξ), [t135,124 (ξ), [t135,124 (ξ), V3 V3 V3 t7,6 (ζ)] = 1, t4,6 (ζ)] = [t135,124 (ξ), t124,126 (ζ)] = t135,126 (ξζ), t4,3 (ζ)] = [t135,124 (ξ), t124,123 (ζ)t145,135 (ζ)] = t135,123 (ξζ)t145,123 (ξζ 2 )t145,124 (−ζξ). Generalization of this calculations is the following result; proof goes by straightforward calculations. Proposition 4. Up to action of  the symmetric group, there exist three types of commutator with a fixed n ,R : transvection tI,J (ξ) ∈ E m Vm (1) [tI,J (ξ), tj,i (ζ)] = 1 if both i 6∈ I and j 6∈ J hold; Vm ˜ ˜ (2) [tI,J (ξ), tj,i (ζ)] = tI, ˜ J˜(±ζξ) if either i ∈ I or j ∈ J holds. And then I = I\i ∪ j or J = J\j ∪ i respectively; (3) If both i ∈ I and j ∈ J hold; then we have more complicated equality: [tI,J (ξ), Vm 2 tj,i (ζ)] = tI,J ˜ J˜(±ζ ξ). ˜ (±ζξ) · tI,J˜(±ζξ) · tI, The rule of the commutator calculations from the last proposition can be translated into the language of the weight diagrams: Weight diagrams tutorial. V (1) Let G(An−1 , ) be a Chevalley–Demazure group scheme, and let (I, J) ∈ m [n]2 be a pair of xα (ξ) for a different weights for the m-th exterior power of G(An−1 , ). Consider anyVunipotent V m m root α of the root system An−1 , i.e. xα (ξ) equals an elementary transvection ti,j (ξ) ∈ E(n, R); 5 (2) By Ar(α) denote all paths on the weight diagram of this representation corresponding to the root α; (3) Then there exist three different items corresponding to the cases of Proposition 4: 4 I.e. the permutation 1 2 ... n−1 n n+1 . L i j 5Recall that we consider the representation with the highest weight ̟ . m 10 ROMAN LUBKOV AND ILIA NEKRASOV • sets of the initial and terminal vertices of paths from Ar(α) do not contain the vertex (I, J); • the vertex (I, J) is initial or terminal for a one path from Ar(α); • the vertex (I, J) is simultaneously initial and terminal for some path6 from Ar(α). V (4) Finally, consider the commutator of the transvection tI,J (ξ) and the element m ti,j (ζ). It equals a product of transvections. This transvections correspond to the paths from the previous item. The transvection arguments are monomials in ξ and ζ. Namely, in the second case the argument equals ±ξζ and in the third case it equals ±ξζ 2 . In Figure 1(a) we present all three cases from item (3) for m = 2 and α = α2 : • (I, J) = (14, 15), • (I, J) = (13, 35), • (I, J) = (13, 24), Similarly, for the case V2 then [t14,15 (ξ), t2,3 (ζ)] = 1; V2 then [t13,35 (ξ), t2,3 (ζ)] = t12,35 (−ξζ); V2 then [t13,24 (ξ), t2,3 (ζ)] = t12,24 (−ξζ)t12,34 (ξζ 2 )t13,34 (ζξ). m = 3 the elementary calculations can be seen directly from the Figure 1(b). 2 12 • 4 $ 13 • 14 15 • 123 • • & 124 ❊❊ 125 • 24 134 • • 2 34 • 2 35 • 4 234  ❊❊ ❊ ▲▲▲ ▲▲ 145 25 • • ▼▼ ▼▼▼ ▼▼ 136 • ▲▲ • ❊ ❊❊ & 135 • 23 126 • ❊ 4❊ • ❊ ❊ &  • •✾ ✾✾ ✾✾ ✾ 236 235 •✾ •❈ ❈ ❈❈ ❈❈ ❈❈ 146 ✾✾ ✾✾ ✾ 245 156 • 246 • • ❊ ❊ ❊❊ 4  345 • 45 •  4 256 • 346 • ❊ ❊ ❊❊ 4  356 • 456 • (a) (b) Figure 1. Weight diagrams for (a): (A4 , ̟2 ), α = α2 and (b): (A5 , ̟3 ), α = α4 4.4. Level computation. Recall that the desired parametrization is given by an explicit juxtaposition for any overgroup H its level, an ideal A of the ring R. We compute this ideal A in the present section. As earlier, without loss of generality, we can assume that n > 2m. The first step toward the level description is the following observation. Proposition 5. If |I ∩ J| = |K ∩ L|, then sets AI,J and AK,L coincide. Actually, AI,J are ideals of R. But first, we prove a weaker statement. Lemma 5. Let I, J, K, L be different elements of the set then the sets AI,J and AK,L coincide. Vm [n], such that |I ∩ J| = |K ∩ L| = 0. If n > 2m, Proof of the lemma. First of all, the sets AI,J coincide when the set I ∪ J is fixed. This fact can be proved by the third type commutation due to Proposition 4 with ζ and −ζ. If ξ ∈ AI,J we get a transvection 6From root systems geometry any vertex can be initial or terminal for not more than one α-path. Overgroups of exterior powers of an elementary group. I. Levels and normalizers 11 tI,J (ξ) ∈ H. Then the following two products belong to H: [tI,J (ξ), [tI,J (ξ), Vm Vm 2 tj,i (ζ)] = tI,J ˜ (±ζξ) · tI,J˜(±ζξ) · tI, ˜ J˜(±ζ ξ) 2 tj,i (−ζ)] = tI,J ˜ (∓ζξ) · tI,J˜(∓ζξ) · tI, ˜ J˜(±ζ ξ). 2 This implies that the product of two factors on the right-hand side tI, ˜ J˜(±2ζ ξ) belongs to H. The reader can easily prove that by the second type commutation we can change the set I ∪ J. For example, a set I1 ∪ J1 = {1, 2, 3, 4, 5, 6} can be replaced by a set I2 ∪ J2 = {1, 2, 3, 4, 5, 7} as follows [t123,456 (ξ), V3 t6,7 (ζ)] = t123,457 (ξζ).  Proof of Proposition 5. Arguing as above, we see that the sets AI,J and AK,L coincide in the case I ∩ J = K ∩ L, where n1 = n − |I ∩ J| > 2 · m − 2 · |I ∩ J| = 2 · m1 . In the general case, we can prove the statement by both the second and the third types commutation. Let us give an example of this calculation withVreplacing the set I ∩ J = {1, 2} by the set {1, 5} 3 Let t123,124 (ξ) ∈ H. So we have [t123,124 (ξ), t2,5 (ζ)] = t123,145 (−ξζ) ∈ H. We commute this transvecV3 tion with the element t5,2 (ζ1 ). Then the transvection t135,124 (−ζ12 ξζ) belongs to H as well as the product t123,124 (ξζζ1 ) · t135,145 (−ζ1 ξζ) ∈ H. From the last inclusion we can see that t135,145 (−ζ1 ξζ) ∈ H and I ∩ J = {1, 5}.  Let tI,J (ξ) be any elementary transvection. Define the height of tI,J (ξ) (more abstractly, of the pair (I, J)) as a cardinality of a set I ∩ J: ht(tI,J (ξ)) = ht(I, J) = |I ∩ J|. Then Proposition 5 can be rephrased as follows. Sets AI,J and AK,L coincide for the same heights: AI,J = AK,L = A|I∩J| . Suppose that height of (I, J) is larger than height of (K, L), then using Proposition 4, we get AI,J ⊆ AK,L Summarizing the above arguments, we have the height grading: A0 ⊇ A1 ⊇ A2 ⊇ · · · ⊇ Am−2 ⊇ Am−1 . The following result prove the coincidence of all sets {Ak }k=0...m−1 . Proposition 1. The sets Ak coincide for n > 3m. More accurately, the inverse inclusion Ak ⊆ Ak+1 takes place if n > 3m − 2k. Proof. The statement can be proved by the double third type commutation as follows. Let ξ ∈ AVk , i.e. a m transvection tI,J (ξ) ∈ H for ht(tI,J (ξ)) = k. By the third type commutation with a transvection tj,i (ζ) we have tI,J ˜ (±ζξ) · tI,J˜(±ζξ) ∈ H. Let us consider the analogous commutator with a specifically chosen Vm transvections tI1 ,J1 (ξ) ∈ H and tj1 ,i1 (ζ1 ). The final step is to commute the last products. The choice of transvections goes in the way that the final commutator (initially of the form [ab, cd]) has a form as simple as possible, e.g. equals an elementary transvection. Let us give a particular example of such calculations for the case m = 4. This calculation could be easily generalized. The first three steps below correspond to the inclusions A0 ⊆ A1 , A1 ⊆ A2 and A2 ⊆ A3 respectively. We emphasize that the idea of the proof of all three steps is completely identical. The difference has to do only with a choice of the appropriate indices. This choice is possible in a general case due to the condition n > 3m. We replace the numbers 10, 11, 12 with the letters α, β, γ in the interest of readability. V4 (1) Take any ξ ∈ A0 . Let us consider the commutator [t1234,5678 (ξ), t8,4 (ζ)]. Then t1234,4567 (−ξζ) · t1238,5678 (−ζξ) ∈ H. Similarly, t49αβ,1234 (ξζ1 ) · t9αβγ,123γ (ζ1 ξ) ∈ H V4 for the commutator [t49αβ,123γ (ξ), tγ,4 (ζ1 )]. It remains to commute the last two products. Therefore the transvection t49αβ,4567 (ξ 2 ζ1 ζ) belongs to H. As a result, A0 ⊆ A1 . 12 ROMAN LUBKOV AND ILIA NEKRASOV (2) Take any ξ ∈ A1 . Let us consider the commutator [t1234,1567 (ξ), V4 t7,4 (ζ)]. Then t1234,1456 (ξζ) · t1237,1567 (−ζξ) ∈ H. and t1489,1234 (ξζ1 ) · t189α,123α (−ζ1 ξ) ∈ H V4 for the commutator [t1489,123α (ξ), tα,4 (ζ1 )]. Again, it remains to commute the last two products. Therefore the transvection t1489,1456 (−ξ 2 ζ1 ζ) lies in H. So, A1 ⊆ A2 . V4 (3) Take any ξ ∈ A2 and consider the commutator [t1234,1256 (ξ), t6,4 (ζ)]. Then t1234,1245 (−ξζ) · t1236,1256 (−ζξ) ∈ H. and t1248,1234 (ξζ1 ) · t1278,1237 (−ζ1 ξ) ∈ H V4 for the commutator [t1248,1237 (ξ), t7,4 (ζ1 )]. After commuting the last two products we see that t1248,1245 (ξ 2 ζ1 ζ) ∈ H. Then A2 ⊆ A3 .  As always, the set A = AI,J is called the level of the overgroup H. For level computation we need an alternative description of the relative elementary group. Lemma 6. Let n > 3m. For any ideal A P R, we have Vm E(N, A) where by definition E(N, R, A) = E(n,R) = E(N, R, A), E(N, A)E(N,R) . Proof. Clearly, the left-hand side is contained in the right-hand side. The proof of the inverse inclusion goes by induction on a height of (I, J). By Vaserstein–Suslin’s Vm lemma [19], it suffices to check that for any ξ ∈ A, ζ ∈ R, the matrix zI,J (ξ, ζ) belongs to F := E(N, A) E(n,R) . In the base case |I ∩ J| = m − 1, the inclusion is obvious: Vm zI,J (ξ, ζ) · tI,J (−ξ) = [tJ,I (ζ), tI,J (ξ)] = [ tj1 ,i1 (ζ), tI,J (ξ)] ∈ F. Now, let us consider the general case |I ∩ J| = p, i.e. I = k1 . . . kp i1 . . . iq and J = k1 . . . kp j1 . . . jq . For the following calculations we need two more sets V := k1 . . . kp i1 . . . iq−1 jq and W := k1 . . . kp j1 . . . jq−1 iq . Firstly, we express tI,J (ξ) as a commutator of elementary transvections, zI,J (ξ, ζ) =tJ,I (ζ) tI,J (ξ) =tJ,I (ζ) [tI,V (ξ), tV,J (1)]. Conjugating the arguments of the commutator by tJ,I (ζ), we get [tJ,V (ζξ)tI,V (ξ), tV,I (−ζ)tV,J (1)] =: [ab, cd]. Next, we decompose the right-hand side with the help of the formula [ab, cd] = a [b, c] · ac [b, d] · [a, c] · c [a, d], and observe that the exponent a belongs to E(N, A) so can be ignored. Now a direct calculation, based upon the Chevalley commutator formula, shows that [b, c] = [tI,V (ξ), tV,I (−ζ)] ∈ F (by the induction step for a height m − 1); c [b, d] =tV,I (−ζ) [tI,V (ξ), tV,J (1)] = tV,W (ξζ 2 )tI,W (−ξζ) · Vm tjq ,iq (−ζ) tI,J (ξ); 2 [a, c] = [tJ,V (ζξ), tV,I (−ζ)] = tJ,I (−ζ ξ); c 2 [a, d] =tV,I (−ζ) [tJ,V (ζξ), tV,J (1)] = 2 = tJ,W (−ξζ (1 + ξζ))tV,W (−ξζ ) · Vm tjq ,iq (−ζ) tJ,V (ξζ) · Vm tjq ,iq (−ζ) zJ,V (−ζξ, 1) ∈ F, (by the induction step for a height p + 1) where all factors on the right-hand side belong to F .  Overgroups of exterior powers of an elementary group. I. Levels and normalizers 13 Remark. Since we do not use the coincidental elements of I and J, we also can prove this Lemma by induction on |I\J| = |J\I| = 1/2 · |I△J|. Then we can assume that m is any arbitrarily large number (mentally, m = ∞). Corollary 2. Let A be an arbitrary ideal of the ring R; then Vm E(n, R) · E(N, R, A) = Vm E(n, R) · E(N, A). Summarizing the above two lemmas, we get the following crucial result. Theorem 1 (Level Computation). Let n > 3m, let H be a subgroup in GLN (R) containing Then there exists a unique largest ideal A P R such that Vm Vm E(n, R). E(n, R) · E(N, R, A) 6 H. Namely, if tI,J (ξ) ∈ H for some I и J, then ξ ∈ A. 4.5. Normalizer of E for an overgroup H. Vm E(n, R, A). In this section we describe the normalizer of the bottom constraint Lemma 7. Let n > 3m. The group E A P R. Vm E(n, R, A) := Vm E(n, R) · E(N, R, A) is perfect for any ideal V Proof. As in Section 4.1, it suffices to verify that all generators of the group m E(n, R) · E(N, R, A) lie in its commutator subgroup, which will be denoted by F . The proof goes in two steps. Vm • For the transvections ti,j (ζ) this follows from the Cauchy–Binet homomorphism: Vm ti,j (ζ) = Vm ([ti,h (ζ), th,j (1)]) = [ Vm ti,h (ζ), Vm th,j (1)] . • For the linear transvections tI,J (ξ) this can be done as follows. Suppose that I ∩ J = K = k1 . . . kp , where 0 6 p 6 m − 1, i.e. I = k1 . . . kp i1 . . . iq and J = k1 . . . kp j1 . . . jq . As in Lemma 6, we define a set V = k1 . . . kp j1 . . . jq−1 iq . And then   Vm tI,J (ξ) = [tI,V (ξ), tV,J (1)] = tI,V (ξ), tiq ,jq (±1) , so we get the required.  Let, as above, A P R, and let R/A be the factor-ring of R modulo A. Denote by ρA : R −→ R/A the canonical projection sending λ ∈ R to λ̄ = λ + A ∈ R/I. Applying the projection to all entries of a matrix, we get the reduction homomorphism ρA : GLn (R) −→ GLn (R/A) a 7→ a = (ai,j ) The kernel of the homomorphism ρA , GLn (R, A), is called the principal congruence-subgroup in GLn (R) of the level A. Now, let C(n, R) be the center of the group GLn (R), consisting of the scalar matrices λe, λ ∈ R∗ . The full preimage of the center of GLn (R/A), denoted by C(n, R, A), is called the full congruence-subgroup of the level A. The group C(n, R, A) consists of all matrices congruent to a scalar matrix modulo A. We Vm further concentrate on a study of the full preimage of the group GLn (R/A): C Vm Vm GLn (R, A) = ρ−1 A ( GLn (R/A)) . A key point in reduction modulo an ideal calculations is the following standard commutator formula, proved by Leonid Vaserstein [22] and Zenon Borevich and Nikolai Vavilov [23]. [E(n, R), C(n, R, A)] = E(n, R, A) for commutative ring R and n > 3. Finally, we are ready to state the level reduction result. Theorem 2. Let n > 3m. For any ideal A P R we have NGLN (R) (E Vm E(n, R, A)) = C Vm GLn (R, A). 14 ROMAN LUBKOV AND ILIA NEKRASOV Proof. In the proof by N we mean NGLN (R) . Since E(N, R, A) and GLN (R, A) are normal subgroups in GLN (R), we see that N( E |V = Vm m E(n, R, A) ) 6 N (E {z } Vm E(n, R, A) GLN (R, A)) = C Vm GLn (R, A). (1) E(n,R) E(N,R,A) Note that the last equality is due to normalizer functoriality:  Vm Vm Vm Vm GLn (R/A)) . E(n, R/A))) = ρ−1 E(n, R/A)) = ρ−1 N (E E(n, R, A) GLN (R, A)) = N ρ−1 A ( A (N ( A ( In particular, using (1), we get [C Vm GLn (R, A), E Vm E(n, R, A)] 6 E Vm Vm E(n, R, A) GLN (R, A). (2) On the other hand, it is completely clear that E E(n, R, A) is normal in the right-hand side subgroup. Indeed, it is easy to prove the following stronger inclusion: Vm [ GLn (R) GLN (R, A), E Vm E(n, R, A)] 6 E Vm E(n, R, A). (3) To check this, we consider a commutator of the form [xy, hg], x∈ Vm GLn (R), y ∈ GLN (R, A), h ∈ Vm E(n, R), g ∈ E(N, R, A). Then [xy, hg] = x [y, h] · [x, h] · h [xy, g]. We need prove that all factors on the right-hand side belong to Vm Vm E E(n, R, A). Right away, the second factor lies in the group E E(n, R, A). For the first commutator, we should consider the following inclusions: Vm Vm i hVm Vm Vm Vm GLn (R) GLn (R) E(n, R, A). [GLN (R, A), E(n, R)] 6 GLN (R, A), GLn (R) E(n, R) 6 E {z } | {z } | V =GLN (R,A) = m E(n,R) Vm The element h ∈ E(n, R), so we ignore it in conjugation. The third commutator lies in E due to the following inclusion. Vm [ Vm E(n, R, A) GLn (R) GLN (R, A), E(N, R, A)] 6 [GLN (R), E(N, R, A)] = E(N, R, A). Now if we recall (2) and (3), we get [C Vm GLn (R, A), E Vm E(n, R, A), E Vm E(n, R, A)] 6 E Vm E(n, R, A). (4) To invoke the Hall—Witt identity, we need a slightly more precise version of the last inclusion: [[C Vm GLn (R, A), E Vm E(n, R, A)] , [C Vm GLn (R, A), E Vm E(n, R, A)]] 6 E Vm E(n, R, A). (5) Observe that by formula (2) we have already checked that the left-hand side is generated by the commutators of the form [uv, [z, y]], where u, y ∈ E Vm E(n, R, A), v ∈ GLN (R, A), z ∈ C G(n, R, A). However, [uv, [z, y]] = u [v, [z, y]] · [u, [z, y]], Vm By formula (4) the second commutator belongs to E E(n, R, A), whereas by (5) the first is an element of [GLN (R, A), E(N, R)] 6 E(N, R, A). Vm Now we are ready to finish the proof. By the previous lemma, the group E E(n, R, A) Vis perfect, and Vm Vm m thus, it suffices to show that [z, [x, y]] ∈ E E(n, R, A) for all x, y ∈ E E(n, R, A), z ∈ C GLn (R, A). Indeed, the Hall—Witt identity yields [z, [x, y]] = xz [[z −1 , x−1 ], y] · xy [[y −1 , z], x−1 ], Vm where the second commutator belongs to E E(n, R, A) by (4). Removing the conjugation by x ∈ Vm E E(n, R, A) in the first commutator and carrying the conjugation by z inside the commutator, we see Vm that it only remains to prove the relation [[x−1 , z], [z, y]y] ∈ E E(n, R, A). Indeed, [[x−1 , z], [z, y]y] = [[x−1 , z], [z, y]] · [z,y] [[x−1 , z], y], Overgroups of exterior powers of an elementary group. I. Levels and normalizers 15 V where both commutators on the right–hand side belong to E m E(n, R, A) by formulas (4) and (5), and moreover, the conjugating element [z, y] in the second commutator is an element of the group Vm Vm E E(n, R, A) GLN (R, A), and thus by (3), normalizes E E(n, R, A).  4.6. Exterior powers of GLn (R) as stabilizers. As always, we assume that n > 2m and 2 ∈ R∗ . Further on, by a stabilizer of a set of (symmetric or skew–symmetric) polynomials we mean a stabilizer of the induced polynomial GLn –representation. Note that a stabilizer of one polynomial f (x) contains 7 similarities, i.e. maps that preserve f (x) up to a multiplier Vm λ : g ◦ f (x) = f (g · x) = λ(g) · f (x). GLn (R) as a stabilizer group for some set of The goal of this section is to present the group (symmetric or skew-symmetric) polynomials. The following classical theorem can be found in [24, Chapter 2, Sections 5–7] V n ∈ N. In this case, this Proposition 6. The group8 m GLn (R) has an invariant form only in the case m form is unique: P n ) xI · · · · · xI n for even m; • fn,m (x) = sgn(I1 , . . . , I m 1 m P n • fn,m (x) = sgn(I1 , . . . , I m ) xI1 ∧ · · · ∧ xI n for odd m, m where the summations in both cases are going over all unordered partitions of the set [n] into m-element subsets. V n ∈ N, we can expect that the group m GLn (R) coincides with a stabilizer of the In the special case m corresponding form. This is almost true and the following theorem gives the precise answer. n Proposition 7. We assume that m ∈ N. Then (1) in the case n = 2m with mV> 3 we have Stab(fn,m (x)) = GOn (R) or GSpn (R) depending on a parity of m. So in this case mVGLn (R) is a subgroup of orthogonal or symplectic group respectively; (2) for all other cases the group m GLn (R) coincides with a stabilizer group Stab(fn,m (x)) of the form fn,m (x); All stabilizers are considered as subgroups of a general linear group GLN (R). Remark. In the case (n, m) = (4, 2), the stabilizer group equals GO6 (R), but it also coincides with V2 GL4 (R). V Proof. Recall that we already know that in all cases the group m GLn (R) is a subgroup of Stab(fn,m (x)) by Theorem 6. So we have to analyze the reverse inclusion. The idea of a proof is to use the classification result of maximal subgroups in classical groups; we refer to classical book [25, Table 1]. n case V is a free m –dimensional R–module, X is the group VmUsing notation from this book, in our V GLn (R). Then among overgroups of m GLn (R) can be only orthogonal or symplectic groups in a V case m > 3. Moreover, for m = 2 we know that 2 GLn (R) is maximal by the case I6 from Table 1 of [25]. n > 3, by a direct calculation we can see that orthogonal or symplectic group is not But in the case m contained in the corresponding stabilizer group. On the contrary, in the case n = 2m the form f2m,m (x) is equivalent to f (y) = m X y−i · yi i=1 for coordinates y−m , . . . , y−1 , y1 , . . . , ym . By definition, the stabilizer of the last one is orthogonal or symplectic group depending on the parity of m.  7This multiplier λ(g) is a one-dimensional representation of the group GL (R), and thus, λ(g) is a power of the determinant n λ = det⊗l : g 7→ detl (g). From the last, it follows that this multiplier equals 1 for SLn –form of the group. 8Equivalent formulation is the following: in decomposition of a module Symk (Vm V n ) into irreducibles there are oneV V dimensional representations if and only if n is divisible by m and m is even, the same is true for k ( m V n ) and odd m. 16 ROMAN LUBKOV AND ILIA NEKRASOV n For the case m 6∈ N, we assume that n = lm + r for some l, r ∈ N and consider an ideal In,m generated by forms fm·l,m(x) for all choices of m · l–element sets inside [n]. It is easy to prove that such ideals are representations of SLn (R) (or GLn (R)) with the highest weights ̟m·l , and its are freely generated by n the forms. So rank equals m·l . Then as a generalization of the first case, we have an analogous result presented in the following theorem. V Proposition 8. In the case when m does not divide n, the group m GLn (R) is a stabilizer of the ideal In,m . Proof. In the same way from [25, Table 1], we can see that there are no exceptional embeddings in these cases.  Summing up, we have introduced (symmetric or skew–symmetric) polynomial ideals for every values of n > 2. Further on, we denote this ideal by In,m . (n, m) with a condition m 4.7. Normalizer Theorem. Theorem 3. Let R be a commutative ring, and let n > 4. Then Vm NGLN (R) ( Vm E(n, R)) = NGLN (R) ( Vm Vm SLn (R)) = TranGLN (R) ( Vm E(n, R)), Vm SLn (R)) = Vm GLn (R). Proof. Clearly, VGLn (R) 6 NGLN (R) ( VSLn (R)) by the very definition of the extended Chevalley group. Vm m m By [26], we have GL (R) 6 N ( E(n, R)). On the other hand, both N ( E(n, R)) and n GLN (R) GLN (R) Vm Vm Vm NGLN (R) ( SLn (R)) are obviously contained in TranGLN (R) ( VE(n, R)), VSLn (R)). Thus, to finish m m the proof of the theorem, it suffices to check that TranGLN (R) ( E(n, R)), SLn (R)) is contained in Vm n GLn (R). This inclusion is proved in the case m 6= 2 in Proposition 9, and in the case n = 2m in Proposition 13. Proposition 9. In the case n m 6= 2, we have the inclusion Vm TranGLN (R) ( E(n, R), Vm SLn (R)) 6 Vm GLn (R). Remark. The bizarre, at first glance, choice of ideals for stabilizer representation for group entirely motivated (classically and presently) by the following proof. Vm Vm Vm GLn (R) is Vm Proof of Proposition 9. We take any g ∈ TranGLN (R) ( E(n, R), GLn (R)) and h ∈ E(n, R), a := P g −1 ghg . Then by In,m we denote a set {f (g ◦ x) : f (x) ∈ In,m }, where (g ◦ x)J = gJK xK is an action of K g the linear operator g on coordinates {xI }I∈Vm [n] . The set In,m is a translation of the ideal In,m . g It is easy to prove that In,m is an E(n, R)–invariant ideal. Also we emphasize that the ideal In,m was chosen9 as a unique ideal for the corresponding k such that V V V in decomposition of Symk ( m V n ) or k ( m V n ) into irreducible modules (1) In,m has multiplicity 1, i.e. there are no isomorphic to In,m modules in the decomposition; (2) dimension of the In,m is the smallest in the decomposition10. V V V The last ingredient we need is that the decomposition of Symk ( m V n ) or k ( m V n ) into E(n, R)– invariant modules coincides with the one for GLn (R). This is a corollary of the general idea that elementary subgroup EG of any Chevalley–Demazure group scheme G is dense. More precisely, [27, Theorem 3.6] says that stabilizer of any irreducible SLn (R) submodule in the decomposition is a closed subscheme in the general linear group. But element of the general linear group over a ring R belongs to R-points of the closed subscheme if and only if it is true for every localization RM of a ring R over maximal ideal M . Over any local ring RM elementary group coincides with RM -points of Chevalley–Demazure group scheme G. From this follows that every irreducible submodule for the group SLn (R) is irreducible for E(n, R) as well. Therefore the decompositions coincide. g VmFinally, we see that In,m should be equal to In,m because of the properties (1) and (2). So g ∈ GLn (R), this case is done.  9It is important, that n is not less than product “degree of polynomials” × “exterior power”. 10For the case n ∈ N, this is a corollary of the uniqueness of stabilizing form. For the case m λ the uniqueness and hook length formula for dimension of representation V . n m 6∈ N, this is a corollary of Overgroups of exterior powers of an elementary group. I. Levels and normalizers This completes the proof of the theorem. 17  Remark. The last proof in the case of 1-dimensional representation, i.e. of invariant form, is simpler. We present it below. V V V n ∈ N, let g ∈ TranGLN (R) ( m E(n, R), m SLn (R)), h ∈ m E(n, R). Then a := ghg −1 ∈ For the case m Vm SLn (R), and thus fn,m (ax) = fn,m(x) for all x. Substituting gy for x, we get fn,m(ghy) = fn,m (gy).   Next, let the map map F take each v = v1 , . . . , v( n ) to fn,m(gv). Then by our assumption m F (hy) = F (y). V Hence, the form F is invariant under the action of the elementary group m E(n, R). Therefore, F (y) = c · fn,m (y). Since this argument is true for g −1 , we obtain that the constant c is invertible. It follows that fn,m (gy) = c · fn,m (y), i.e. g ∈ Vm GLn (R). 4.8. Stabilizers in the exceptional case n = 2m. As we know from Proposition 7.1, in the special Vm V2 Vm case n = 2m the minimal-dimensional GLn -subrepresentation of Sym2 ( V n ) (or ( V n )) is stabilized by the whole orthogonal (orVsymplectic) group. So this representation can not be used for stabilizer representation for the group m GLn (R).V V2 Vm m However, the decomposition of Sym2 ( V n ) (or ( V n )) into irreducibles is classically known (see [28, Exercise I.8.9]). Proposition 10. We have the following decomposition into irreducible GLn (R)–modules M Vm V λl , Sym2 ( V n ) ∼ = l=0,2,4,... V2 Vm ( V )∼ = n M V λl , l=1,3,... where λl is a Young diagram with two columns of size n + l and n − l and in both cases summations are going up to n. The problem is that not one-dimensional subrepresentations are not free R-modules11, and , moreover, explicit generators are not known. So it is not clear how to use them separately for our goals. Nevertheless, we have the following stabilizer presentation. Proposition 11. With fixed L m and n, for any nonempty Vm set I ⊂ {2, 3, 4, 5, . . . , n − 1} stabilizer of the λ i GLn (R). ideal generated by summands i∈I V coincides with Proof goes exactly the same way as in Proposition 7 using classification from [25, Table 1]. The only thing worth to mention that the dimension of the representations V λl can be found by Hook Length Formula. So we get stabilization representation for all possible values of (n, m), i.e. m > 2, n > 4. Before the last statement, we should recall some classical results about coordinate ring of Grassmannian. Proposition 12. A coordinate ring of a Grassmann variety Grm (Cn ) over C as a GLn (C)-module isomorphic to infinite sum: m m m C ⊕ (Cn )(1 ) ⊕ (Cn )(2·1 ) ⊕ (Cn )(3·1 ) ⊕ . . . . That is, from the last theorem with a fact that Grassmannian as a scheme (over Z) is an intersection of quadrics given by the generalized Plücker identities, we can deduce the following result. Corollary 3. In notation of Proposition 10, the degree 2 homogeneousL component of the ideal generated V λl . by generalized Plücker identities is isomorphic as GLn (R)–module to l=2,4,... The same result with changing Plücker polynomials to corresponding skew–symmetric polynomials is true. 11Its combinatorial structure is complicated enough even over C 18 ROMAN LUBKOV AND ILIA NEKRASOV Finally, we get the analog of Proposition 9 in the exceptional case. Vm Proposition 13. We have the inclusion TranGLN (R) ( E(2m, R), Vm SL2m (R)) 6 Vm GL2m (R). Proof. As always, m > 3. Then we can literally repeat the proof of Proposition 9, with the exception of the following step. We use Corollary 3 with ( {1, 3, 5, . . . } for even m, I= {2, 4, 6, . . . } for odd m. In other words, we take the full set of generelized Plücker identities in symmetric or exterior square whenever m is odd or even in order not to take quadratic form stabilizing by orthogonal or symplectic group. g Then the ideal I2m,m might coincide with I2m,m or be subrepresentation (it is E(n, R) so is SLn (R)– invariant) of I2m,m . But the lastVcase correspond to the case of Corollary 3 with smaller set I. So an  element g in any case belongs to m GL2m (R). Appendix A. Extended Chevalley–Demazure schemes: equivariant equations In this Appendix we state an algorithm for obtaining equations determining Chevalley–Demazure schemes. There are several attempts to get determining equations. For instance, Vladimir Popov in [29] has found complete list of equations for connected affine algebraic groups. However, we are mainly interested in equations agreed with algebraic group structure, equivariant equations. Such sets of equations were presented for different Chevalley groups in series of papers [1, 2, 3, 11, 12]; the unifying principle for these results we present below. Let Φ be a reduced irreducible root system, let Gsc (Φ, ) be a corresponding simply connected Chevalle– Demazure scheme (over Z), and ρ be a representation of Gsc (Φ, ). We also consider the corresponding extended Chevalley–Demazure scheme Gsc (Φ, ), which plays the same role with respect to Gsc (Φ, ) as the general linear group GLn plays with respect to the special linear group SLn . Recall that extended groups in adjoint representation were constructed in the original paper [30] by Claude Chevalley. It is somewhat more tricky to construct extended groups in simply connected. The reason is unlike the adjoint case one have to increase the dimension of the maximal torus. A general construction was proposed by Stephen Berman and Robert V. Moody in [31]. The representation ρ can be extend to the representation of the extended Chevalley–Demazure scheme. For simplicity, we denote this extended representation ρ as well. By Gρ (Φ, ) we denote the scheme–theoretic image of the scheme Gsc (Φ, ) in the representation ρ: ρ : Gsc (Φ, ) → GLdim ρ ( ). Then we can state the general problem. General Problem. For an extended Chevalle-Demazure scheme in representation ρ to find the complete set of equations defining this scheme as an affine algebraic set. For an arbitrary ring R let us consider symmetric algebra SymR (Vρ ) ∼ = R[x1 , . . . , xdim ρ ]. There is a natural action of GL(Vρ ) on this algebra, so there is an action of the group Gρ (Φ, R). We decompose this polynomial space into irreducible components under the last action of the extended Chevalley–Demazure scheme M Vρλ . SymR (Vρ ) ∼ = λ The last means precisely that for each λ there is a map φρ,λ : Gρ (Φ, ) → GL(Vρλ ). Let k be a natural number such that a map   ψρ,k : GL(Vρ ) ֒→ GL Symk (Vρ ) Overgroups of exterior powers of an elementary group. I. Levels and normalizers 19 is an embedding. By the classification of maximal overgroups of classical groups, except for the cases from [25, Table 1], we see that the image of Gρ (Φ, ) under the embedding ψρ,k is a stabilizer of a polynomial ideal hVρλ i  ψρ,k (GL(Vρ )) ∩ GL(Vρλ ) = ψρ,k Gρ (Φ, ) . The last equality gives us the desired list of equations for the scheme since both factors on the left-hand side can be described by polynomial equations. We note that the equations for GL(Vρλ ) 6 GL(Symk Vρ ) could be very simple by the appropriate choice of a suitable subrepresentation. For instance, this is true for a one-dimensional space Vρλ , which is nothing than a Gρ (Φ, )-invariant form12. Vk Let us remark that this argument is true for the functor instead of Symk . We present several examples of this general idea below: (1) The Chevalley group SOn in the natural representation has an invariant form (see [1, 2]) x21 + · · · + x2n . Let P be a linear space generated by this form. The extended Chevalley group, GOn , is by definition a stabilizer of P . In other words, GOn (R) = { g ∈ GLn (R) : g ◦ (x21 + · · · + x2n ) = λ(g) · (x21 + · · · + x2n ) for λ(g) ∈ R∗ }. (2) The Chevalley group Sp2n in the natural representation has an invariant form (see [3]): xn y−n + xn−1 y−n+1 + · · · + x1 y−1 − x−1 y1 − · · · − x−n yn . And, again, the extended group is a stabilizer (up to similarities) of this form. (3) In [11] Nikolai Vavilov and Alexander Luzgarev consider the Chevalley group of type E6 in representation with the highest weight ̟1 . They construct the invariant cubic form Q: X Q(x) = sgn(λ, µ, ν)xλ xµ xν , λ,µ,ν where the sum is taken over all unordered triads {λ, µ, ν} ∈ Θ0 . The extended Chevalley group of type E6 is a stabilizer of the linear space generated by Q. (4) Similarly, in [12] Nikolai Vavilov and Alexander Luzgarev have considered the Chevalley group of type E7 in representation with the highest weight ̟1 . They construct a four-linear form f and a bilinear form h such that the extended Chevalley group is an intersection of the stabilizers of these forms. References [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] N. Vavilov and V. Petrov. Overgroups of EO(2l, R). J. Math. Sci. (N. Y.), 116(1):2917–2925, 2003. N. Vavilov and V. Petrov. Overgroups of EO(n, R). St.Petersburg Math. J., 19(2):167–195, 2008. N. Vavilov and V. Petrov. Overgroups of Ep(2l, R). St.Petersburg Math. J., 15(4):515–543, 2004. V. A. Petrov. Overgroups of unitary groups. K-Theory, 29:77–108, 2003. You Hong. Overgroups of symplectic group in linear group over commutative rings. J. Algebra, 282(1):23–32, 2004. Hong You. Overgroups of classical groups over commutative ring in linear group. Science in China A: Mathematics, 49(5):626–638, 2006. Hong You. Overgroups of classical groups in linear group over Banach algebras. J. Algebra, 304:1004–1013, 2006. Xing Tao Wang and Cheng Shao Hong. Overgroups of the elementary unitary group in linear group over commutative rings. J. Algebra, 320(3):1255 – 1260, 2008. A. Yu. Luzgarev. On overgroups of E(E6 , R) and E(E7 , R) in their minimal representations. J. Math. Sci. (N. Y.), 134(6):2558–2571, 2004. A. Yu. Luzgarev. Overgroups of F4 in E6 over commutative rings. St.Petersburg Math. J., 20:955–981, 2009. N. A. Vavilov and A. Yu. Luzgarev. Normalizer of the Chevalley group of type E6 . St.Petersburg Math. J., 19(5):699–718, 2008. N. A. Vavilov and A. Yu. Luzgarev. Normalizer of the Chevalley group of type E7 . St.Petersburg Math. J., 27(6):899–921, 2016. A. S. Ananevskii, N. A. Vavilov, and S. S. Sinchuk. Overgroups of E(l, R) ⊗ E(m, R) I. Levels and normalizers. St.Petersburg Math. J., 23(5):819–849, 2012. 12As always, we consider invariance of a form up to similarities. 20 ROMAN LUBKOV AND ILIA NEKRASOV [14] N. A. Vavilov. On subgroups of split classical groups. Proc. Steklov. Inst. Math., 183:27–41, 1990. [15] N. A. Vavilov. Intermediate subgroups in Chevalley groups. London Math. Soc. Lecture Note Ser., 207:233–280, 1995. [16] N. A. Vavilov and A. V. Stepanov. Overgroups of semisimple groups. Vestn. Samar. Gos. Univ. Estestvennonauchn. Ser., (3):51–95, 2008. [17] A. V. Stepanov and N. A. Vavilov. Decomposition of transvections: Theme with variations. K-Theory, 19(2):109–153, 2000. [18] A. A. Suslin. On the structure of the special linear group over polynomial rings. Math. USSR. Izvestija, 11:221–238, 1977. [19] L. N. Vaserstein and A. A. Suslin. Serre’s problem on projective modules over polynomial rings, and algebraic K-theory. Math. USSR. Izvestija, 10(5):937–1001, 1976. [20] J. Tits. Systemes générateurs de groupes de congruences. C. R. Acad. Sci., Paris, Sér. A, 283:693–695, 1976. [21] N. A. Vavilov and E. Ya. Perelman. Polyvector representations of GLn . Zapiski nauchnyh seminarov POMI, 338:69–97, 2006. [22] L. N. Vaserstein. On the normal subgroups of GLn over a ring. Lecture Notes in Math., 854:456–465, 1981. [23] Z. I. Borevich and N. A. Vavilov. The distribution of subgroups in the general linear group over a commutative ring. Proc. Steklov. Inst. Math., 165:27–46, 1985. [24] J. A. Dieudonne and J. B. Carrell. Invariant theory, old and new. Acad. Press, 1971. [25] G.M. Seitz. The Maximal Subgroups of Classical Algebraic Groups. American Mathematical Society: Memoirs of the American Mathematical Society. American Mathematical Society, 1987. [26] V. Petrov and A. Stavrova. Elementary subgroups in isotropic reductive groups. St.Petersburg Math. J., 20(4):625–644, 2009. [27] M. Demazure and P. Gabriel. Groupes algébriques: Par Michel Demazure et Pierre Gabriel. Avec un appendice Corps de classes local par Michiel Hazewinkel. Groupes algébriques. Elsevier, 1970. [28] I.G. Macdonald. Symmetric Functions and Hall Polynomials. Oxford classic texts in the physical sciences. Clarendon Press, 1998. [29] Vladimir L. Popov. On the equations defining affine algebraic groups. Pacific Journal of Mathematics, 279(1–2):423–446, 2015. [30] C. Chevalley. Sur certains groupes simples. Tohoku Math. J., 7:14–66, 1955. [31] S. Berman and R. Moody. Extensions of Chevalley groups. Israel J. Math., 22(1):42–51, 1975. (Roman Lubkov) Department of Mathematics and Mechanics, St. Petersburg State University E-mail address: [email protected] (Ilia Nekrasov) Chebyshev Laboratory, St. Petersburg State University E-mail address: [email protected]
4math.GR
Connecting Network Science and Information Theory Henrique F. de Arruda,1, ∗ Filipi N. Silva,2 Cesar H. Comin,2 Diego R. Amancio,1 and Luciano da F. Costa2 1 arXiv:1704.03091v2 [cs.IT] 21 May 2017 Institute of Mathematics and Computer Science, University of São Paulo, São Carlos, SP, Brazil. 2 São Carlos Institute of Physics, University of São Paulo, São Carlos, SP, Brazil A framework integrating information theory and network science is proposed, giving rise to a potentially new area. By incorporating and integrating concepts such as complexity, coding, topological projections and network dynamics, the proposed network-based framework paves the way not only to extending traditional information science, but also to modeling, characterizing and analyzing a broad class of real-world problems, from language communication to DNA coding. Basically, an original network is supposed to be transmitted, with or without compaction, through a sequence of symbols or time-series obtained by sampling its topology by some network dynamics, such as random walks. We show that the degree of compression is ultimately related to the ability to predict the frequency of symbols based on the topology of the original network and the adopted dynamics. The potential of the proposed approach is illustrated with respect to the efficiency of transmitting several types of topologies by using a variety of random walks. Several interesting results are obtained, including the behavior of the Barabási-Albert model oscillating between high and low performance depending on the considered dynamics, and the distinct performances obtained for two geographical models. I. INTRODUCTION A great deal of efforts in science and technology has been focused on the study of information theory [1] and network science [2, 3], two seemingly independent realms. In information theory, basically, probabilities are assigned to symbols and used to derive important results, such as minimum bandwidth and minimal sampling rates. On the other hand, in network science [2], focus is given to understanding the intricate topology of complex networks, and its relationship with various types of dynamics. Interestingly, these two different perspectives — broadly related to time series compaction and studies of topology/dynamics complexity — can be shown to ultimately be intertwined and complementary one another. For instance, information theory has been used to define causal relationships between nodes [4, 5], characterize networks according to their compressibility [6], define topological similarity [7], map time-series to networks [8], quantify the diversity of ecological networks [9], and characterize network dynamics [10]. A systematic integration of information theory and network science so as to provide a unified scientific approach, constitutes the main purpose of the current article. The basic idea is to understand a sequence of symbols or time series as a projection of an original network, e.g. obtained by some sampling dynamics (such as random walks), transmitted, and then reconstructed with some accuracy. This basic framework is illustrated in Fig. 1. Underlying such an approach is the hypothesis that every time series or sequence of symbols is produced by some discrete system, which can be represented as a complex network. So, these generated series and sequences ∗ Electronic address: [email protected] inherit, to a great extent, the properties of the generating networks. The second underlying hypothesis of the present work is that interaction between such complex network systems has to proceed through communication channels, which necessarily have limited bandwidth and/or are noisy. So, it becomes important to devise and consider methods for more effective/robust transmission of the networks, such as using compression, which is the main original motivation behind information theory. At the same time, these series of symbols are a byproduct of the interaction between the topology and the dynamics unfolding in the original network. Therefore, the proposed approach transfer the design of effective communication methodologies from looking only at the time series to the network level. The potential of such an integration is broad, as several important problems can be naturally conceptualized and represented according to the proposed framework. Possible applications include, but are not limited to: the transformation from thoughts into language, encompassing the whole of literature in the process, the creation and reception of artistic pieces such as in music, routing in transportation and computing systems, optimal data allocation in distributed computing, teaching and planning of syllabuses, economics and financial indices, the codification of proteins and genes into linear chains, and even WWW surfing and the flow of consciousness. An interesting aspect shared by all such cases is that the linearization of a higher dimensional structure (a network) derives from imposed constraints such as finite bandwidth channel, storage systems, etc. By the way, intermediate representations with dimensions higher than one (time series) are also possible and naturally incorporated in the proposed theory. In addition, the efficiency of coding by projections and respective transmission are related to the complexity of the original network, therefore emphasizing another critical issue shared by infor- 2 D A, B, C, C A, B, E, A A, B, C, B, B, A, D E. E A, B, C, A, B, E, A, B, C, D, B, E, B, B, A, E. . ,E ,A D, ,B ,B C, ,E B, ,C A, ,B E, ,B ,A ,A B, D, A, B, C A ,D ,B ,E ,F , ,C ,B ,C A, B . ,E A B, B, E, B, ,A ,E A, B, C, D, F, H, E, H, F, B, J, G, D, F, E, B, A, I, F, C, … H, I ,B ,B . ,E E. ,C (a) B, E, B, B, A, ,A ,A ,B I E, A, B, C, D, ,B A, B, C, A, B, J ,F G ,D ,B ,E F H D, B, E, B (b) C A B E F H I FIG. 2: The integration of network science and information theory can be used to address systems involving several interactions of the type represented in Fig. 1, with applications in ares such as opinion spreading. D G J (c) FIG. 1: Overall framework underlying the integration between network science and information theory. A network (a) is sampled by a given dynamics D and a respective time series corresponding to a sequence of symbols (b) is obtained and transmitted. The receiver of the latter can then try to recover the original network (c). If desired, the transmission can be optimized, e.g. by using compaction. mation theory and network science. Though we have so far been restricted to point-to-point communication, the proposed framework also extends naturally to larger systems involving many such pairwise interactions, such as illustrated in Fig. 2. Several real-world systems can be represented and studied by using such a framework, such as opinion spreading and evolution of scientific ideas. In such cases, each of the large nodes in Fig. 2 would correspond to an agent transmitting its beliefs, originally represented by the networks inside the nodes, through time series along a network with a particular topology. Optimization of the transmission can be achieved by compacting the time-series. In information theory, this is typically achieved by using the frequency of symbols as a means to derive optimal code words. For instance, Huffman coding [11] provides a means to achieve lossless, optimal symbol-by-symbol coding of time series, considering the probability of each symbol. In the here proposed framework, optimization implies in accurate prediction of symbols by considering the topology of the network and the probing dynamics, instead of only the sequence of symbols. For instance, in the case of symbols taken individually from an undirected graph by using a traditional random walk, it is known that the frequency of each symbol can be perfectly predicted from the respective node degrees [12]. The precision of such a predic- tion can be expressed in terms of the Pearson correlation coefficient between the frequency of visits and degrees (or other topological property). Because of its ability to characterize how much the dynamics is affected by the topological features of the network, such a measurement is henceforth called steering coefficient of the topology over the dynamics, being henceforth represented as S. All in all, the efficiency of coding given a specific network and dynamics will probably depend on the value of the steering coefficient, which can vary largely among different network topologies and dynamics. The present work illustrates and explores the potential of the proposed framework with respect to synthetic networks, which allows the consideration of several topologies and different sampling dynamics. Through such a procedure, we can investigate interesting questions such as: (i) how does the ability to predict the frequency of symbols impact the transmission?; (ii) how do the topological features of different graph models affect the performance?; (iii) how do the considered types of dynamics compare regarding the time of exploration?. These questions are tackled by considering as objective the recovery of the original graph with a given accuracy. II. METHODOLOGY Adopted dynamics In order to investigate the proposed framework, we adopted four random walk dynamics and used them to generate respective sequences of symbols. The considered dynamics are: the random walk (RW) [13], a variation in which the transition probabilities are biased toward nodes with higher degree (RWD) [14], another variation in which the inverse of the node degree is considered (RWID) [14], and the true self-avoiding random walk 3 (TSAW) [15, 16]. In a traditional RW dynamics, the next node to be taken by an agent is selected uniformly among its neighboring nodes. In a degree-biased random walk, the probability pij that the agent goes from node i to node j depends on the degree of each neighboring node. Here we consider a dependence of the form kjα pij = P α , kl (1) l ∈ Γi where Γi is the set of nodes connected to node i. When α = 1 we have the RWD dynamics, while α = −1 results in the RWID case. An interesting property of the RW dynamics is that, on undirected networks, as the generated sequence increases, the frequencies of visits to nodes as inferred from the current number of times each node has been visited, become directly proportional to the node degree [12]. For the degree-biased case, the steady state probabilities of a degree-biased random walk can be written as [17] P α α kj ki j∈Γi Pi = P P α α . (2) kl kh h l∈Γh In case the degrees of the neighbors of node i can be approximated as the average degree of the network (which happens, for instance, for narrow degree distributions), P α the numerator of Equation 2 can be written as kj ≈ j∈Γi k̄ α ki , leading to Pi ≈ k̄ α ki kiα kiα+1 P = ¯ . k̄ α kh khα N k α+1 (3) h This means that the probabilities become related to the degree taken to α + 1. In the TSAW, the memory of the path already taken by the agent is kept and considered for determining its next step. Here, we opted to consider the frequency of edges in contrast to the frequency of nodes [16]. In this way, edges already visited many times by the agent are avoided. Thus, the probability pij that the agent moves through a certain edge e at its immediate neighborhood N e is pij = γ −fe P −f , γ j (4) j ∈ Ne where γ is a parameter of the dynamics and fe is the frequency of visits to edge e. Note that self-avoiding behaviour is achieved for γ > 1. The TSAW dynamics can be expected to be usually faster to cover a network compared to the RW since unvisited connections are prioritized [16]. For large number of iterations, the dynamics tends to behave like a diffusion, i.e. similarly to the RW dynamics [15, 15]. In the analysis we set γ = 2. Complex network models Six network models were used to investigate the proposed framework, namely the Erdős-Rényi (ER) [18], Barabási-Albert (BA) [19], Watts-Strogatz (WS) [20], Waxman (WAX) [21], random geometric (GEO) [22] and Knitted (KN) [23] models. Given its nature, the latter model is used only on experiments involving directed networks. The ER model generates small-world networks having a binomial degree distribution [2], which means that all nodes in the network have similar degree. In contrast, networks generated by the BA model have a power-law degree distribution [19], implying that a few nodes, called hubs [3], possess large degree while most of the nodes in the network have low degree. The WS model can be used to generate networks having the small-world property while also possessing large clustering coefficient values [20]. We adopt a variation of this model where instead of a ring one starts with a lattice network and edges are rewired with probability p. We consider two rewiring probability values for the WS model: p = 0.01 (WS1) and p = 0.005 (WS2). In the GEO model, nodes are randomly placed, with uniform probability, in a twodimensional space and pairs of nodes are connected if their distance is smaller than a given value. The WAX model begins with the same node placement procedure as in the GEO model, but pairs of nodes are connected according to a probability that decays exponentially with the distance between the nodes. Networks generated by the GEO and WAX models tend to have large diameter. KN networks are formed by treading paths. Initially, a set of unconnected nodes is created. Then, a sequence of distinct nodes is randomly selected and visited until a stop criterium is reached. Adjacent nodes in the sequence are connected through respective directed links. The process can be repeated many times until a desired average degree is reached. KN networks are peculiar among the considered models because it can be understood as being generated by a random walk. Such networks can be used for modeling co-occurrence networks in texts and other real-world situations involving sequential, uninterrupted visits to nodes [24–27]. The network models presented above, with the exception of KN networks, correspond to undirected networks. In this study we also considered directed networks. In order to convert the original network into a directed one, we assigned directions to the edges. First, we defined a parameter r, called reciprocity, which is the probability of an edge to have both directions (i.e., be reciprocal). For each original edge, a random number n in the range [0, 1] was generated with uniform probability. If n ≤ r, the original edge was split into two edges (in and out); otherwise, a single direction was randomly selected with equal probability. In addition, only the largest strongly connected component of the network was considered, so as to avoid the random walker to become trapped. So, in order to keep the original size of the network as much as possible while incorporating a considerable degree of 4 directionality, we set r = 0.6. Huffman algorithm In digital media, a message can be encoded as a set of organized symbols, which are stored by using a fixed number of bits. For example, texts are formed of symbols which can be represented as characters of 8 bits. In order to store or transmit messages in an effective way, several lossless compression algorithms have been proposed in the literature [28]. The Huffman code is a particular data compression algorithm, based on information theory [1]. This method generates a dictionary of bit sequences employed to represent each symbol in a message. The compression is achieved by associating shorter bit sequences to more frequent symbols and longer sequences to symbols that appears more rarely in the message. To do so, the Huffman algorithm uses a binary tree, whose leaves represent symbols. Starting from the root, every edge is associated to a bit. Typically, left and right children are associated to the bits 0 and 1, respectively. The symbol code associated to each leaf node is then obtained by concatenating, from root to leaves, all edge values from the root. Such structure is used as a dictionary to encode the original message. In a similar fashion, the dictionary is used to decode the message. Network reconstruction As the generated time series reaches the receiver, it is used to progressively reconstruct the original network being transmitted. This can be easily achieved by starting with a disconnected set of symbols and adding each new received edge, defined by a pair of subsequent symbols in the time series, to the network. We expect the reconstruction to depend on: i) the size of the time series; ii) the considered dynamics; iii) the network topology. In the case of the considered random walks, perfect reconstruction is expected after a sufficient period of time. III. RESULTS AND DISCUSSION The main question to be investigated experimentally regards how effectively each of the network models can be recovered from a respectively generated time series, in presence or not of compression. For every type of network, each of the considered random walks is applied in order to probe the respective topology by visiting, sequentially, the nodes. A respective time series is generated in the process from which, at each time instant, a reconstruction of the original is obtained by considering the edges and nodes already transmitted. Therefore, the efficiency of the transmission can be quantified in terms of the time series length (which is proportional to the transmission time) required for reconstruction of 90% of the original network (measured in terms of number of edges). This critical time is henceforth referred to as T90 . The effect of compressing the time series by using the frequency of visits to nodes predicted by the respecC tive degrees, referred to as T90 , is also considered, giving rise to another series of experiments. Furthermore, we also calculated the long term transmission rate, defined as RL = TLC /TL , where TL is a sufficiently large time (a total of one million symbols was used in the reported experiments). In principle, a combination of topology and dynamics that allows large compression ratio should lead to faster reconstruction. Fig. 3 shows the parallel coordinates obtained for the undirected network models. A total of 30 simulations was performed for each model and dynamics, and 30 network realizations were used for each network model. The considered networks had approximately 1000 nodes and average degree near 8. The overall best transmission times were obtained for the TSAW random walk. The BA implied a substantially higher value of T90 for the RWD dynamics (Fig. 3(a)). This is probably a consequence of the fact that, in this dynamics, the moving agent tends to alternate between hubs, overlooking nodes with small degree. As shown in Fig. 3(b), similar results were obtained C when considering compressed times, T90 , although in this C case the values of T90 for the RWD dynamics in the BA model are not as prominent as those obtained for T90 . The results for the WAX and GEO models differed significantly, with the former being transmitted much more effectively. This result is surprising because both these models share a geographical nature, in the sense that nodes that are spatially close one another tend to be connected. Also shown in Fig. 3 is the steering coefficient (S90 ). Similar values were obtained for the RW, RWD and TSAW dynamics. In the RWID case, the degree is not a good predictor of the frequency of visits, as indicated in Eq. 3, which leads to low S90 . The WS1 and WS2 models usually led to low steering coefficient values. This probably happens because most nodes in these networks have the same degree, and therefore they also possess similar frequency of visits. The BA model always resulted in the largest steering coefficient. Such an effect is possibly a consequence of the power-law nature of the degree distribution, in which nodes with small degree tend to be scarcely visited while the opposite happens for nodes with large degree. A more in-depth discussion about the encoding efficiency is presented in Section S1 of the supplementary material, where we compare the compression achieved when estimating the symbol probabilities using the nodes degrees with those achieved when using individual messages to estimate the probabilities. Remarkably, in most cases we found that predicting the symbol probabilities from the network (instead of from the sequence of symbols) yielded better compaction. The long term steering coefficient values (SL ) are shown in Fig. 3(d). The TSAW dynamics led to the 5 (a) T90 GEO RW TSAW RWD RWID (b) T C90 GEO RW TSAW RWD RWID WAX 90k 90k 90k 90k WAX 65k BA 80k 80k 80k 80k WS1 60k 60k 60k 60k WS1 70k 70k 70k 70k WS2 55k 55k 55k 55k WS2 60k 60k 60k 60k 50k 50k 50k 50k 50k 50k 50k 50k 45k 45k 45k 45k ER (c) S90 BA RW ER WAX GEO WS1 TSAW RWD RWID 0.80 0.80 0.80 0.80 0.60 0.60 0.60 0.60 0.40 0.40 0.40 0.40 0.20 0.20 0.20 0.20 0.0 0.0 0.0 0.0 WS2 (e) R90 BA WAX GEO ER WS1 WS2 ER BA (d) SL BA RW ER WAX GEO WS1 WS2 RW TSAW RWD RWID 1.40 1.40 1.40 1.40 1.30 1.30 1.30 1.30 1.20 1.20 1.20 1.20 1.10 1.10 1.10 1.10 1.00 1.00 1.00 1.00 (f) RL BA WAX GEO ER WS1 WS2 65k 65k 65k TSAW RWD RWID 0.50 0.50 0.50 0.50 0.0 0.0 0.0 0.0 -0.50 -0.50 -0.50 -0.50 RW TSAW RWD RWID 1.40 1.40 1.40 1.40 1.30 1.30 1.30 1.30 1.20 1.20 1.20 1.20 1.10 1.10 1.10 1.10 1.00 1.00 1.00 1.00 FIG. 3: Transmission and compaction average values and standard deviations obtained for undirected networks for diverse types of random walks. (a) Time to transmit 90% of the network (T90 ); (b) Time to transmit 90% of the network with Huffman C compression (T90 ); (c) Steering coefficient attained after exploring 90% of the network (S90 ); (d) Steering coefficient for longer term exploration (SL ); (e) Compression ratio for 90% exploration (R90 ), and (f) Compression ratio obtained after a large number of iterations (RL ). highest SL values, followed closely by the RWD. A variety of behavior were observed for RWID, all of them yielding SL values smaller than those obtained for the other dynamics. Fig. 3(e,f) shows the compression ratio for 90% of network recovery, R90 , and for long term exploration, RL , obtained for the several network models and dynamics. Similar results were obtained for most cases, except for the BA model in the RW, TSAW and RWD cases, which yielded better compression rates. Interestingly, the GEO and WAX, which had produced substantially different compression and transmission times in the previous experiment, implied similar compression ratios. The experimental results for the directed cases are shown in Fig. 4. In this experiment we have the inclusion of the KN model (intrinsically directed), which always led to low reconstruction times in all cases. The better transmission obtained for the KN networks is possibly related to the process of network construction, which can be understood as a kind of random walk. This type of network has two key aspects: (i) for every node, the inward degree (kin ) is equal to the outward degree (kout ) and (ii) the reciprocity is smaller than the other considered networks. In Section S2 of the supplementary material we compare the transmission times of KN networks with those obtained for networks generated by a directed ER model (thus having reciprocity close to zero) and a configuration model [2] having the constraint kin = kout . The results indicate that these two aspects are responsible for the better transmission of KN networks. Returning C to Fig. 4, the results were again similar for T90 and T90 , with the exception of the BA model. This model has large T90 for the RWD dynamics. Overall, the values of S90 showed similar trends as in the undirected case. The long term steering coefficients, SL , resulted smaller than for the undirected cases, with exception of the BA model, which was similar to that case. The compression ratios R90 and RL obtained for the directed networks are shown in Fig. 4(e,f). These results are generally similar to those obtained for undirected networks. IV. CONCLUSIONS The areas of information theory and complex networks have been developed in a mostly independent way. However, as argued in the present work, these two areas present several shared and complementary elements which, when integrated, can be used to model, characterize and analyze a broad range of important real-world problems ranging from spoken/written language to DNA sequences. A formal framework, leading to a potentially new area, has been reported, involving the transmission of an original network, by using a sampling dynamics such as random walks, which produces a sequence of sym- 6 (a) T90 GEO RW TSAW RWD RWID (b) T C90 GEO 180k 180k 180k 180k 160k 160k 160k 160k ER 140k 140k 140k 140k WS2 WS2 120k 120k 120k 120k WAX 100k 100k 100k 100k BA WS1 WAX KN (c) S90 BA RW TSAW RWD RWID RW WS1 ER KN BA (d) SL BA TSAW RWD RWID 120k 120k 120k 120k 110k 110k 110k 110k 100k 100k 100k 100k 90k 90k 90k 90k RW TSAW RWD RWID KN 0.80 0.80 0.80 0.80 KN 0.80 0.80 0.80 0.80 ER 0.60 0.60 0.60 0.60 ER 0.60 0.60 0.60 0.60 WAX 0.40 0.40 0.40 0.40 WAX 0.40 0.40 0.40 0.40 0.20 0.20 0.20 0.20 GEO 0.20 0.20 0.20 0.20 0.0 0.0 0.0 0.0 WS1 0.0 0.0 0.0 0.0 WS2 -0.20 -0.20 -0.20 -0.20 GEO WS1 WS2 (e) R90 BA WAX KN GEO WS1 WS2 ER RW TSAW RWD RWID 1.40 1.40 1.40 1.40 1.30 1.30 1.30 1.30 1.20 1.20 1.20 1.20 1.10 1.10 1.10 1.10 1.00 1.00 1.00 1.00 (f) RL BA WAX KN GEO WS1 WS2 ER RW TSAW RWD RWID 1.40 1.40 1.40 1.40 1.30 1.30 1.30 1.30 1.20 1.20 1.20 1.20 1.10 1.10 1.10 1.10 1.00 1.00 1.00 1.00 FIG. 4: Transmission and compaction average values and standard deviations obtained for directed networks for diverse types of random walks. (a) Time to transmit 90% of the network (T90 ); (b) Time to transmit 90% of the network with Huffman C compression (T90 ); (c) Steering coefficient attained after exploring 90% of the network (S90 ); (d) Steering coefficient for longer term exploration (SL ); (e) Compression ratio for 90% exploration (R90 ), and (f) Compression ratio obtained after a large number of iterations (RL ). bols or time series that can be used by a receiver to reconstruct the original network. More effective transmission demands compaction of the time series which, we argue, is directly related to the topology of the original network. We also show that the critical issue of compaction is directly related to one of the central paradigms in network science, namely the relationship between topology and dynamics, more specifically regarding the ability to predict the frequency of symbols from the very topology of the original network. Interestingly, the quality of such a prediction depends on the interplay between the topology of the original network and the adopted dynamics. most all cases, led to the best performance in the case of directed networks. In addition, the two adopted geographical networks, namely WAX and GEO, despite their seemingly analogous spatial organization, yielded rather different results in the case of undirected networks. It is particularly interesting to observe that the BA model, which is topologically very complex (non-uniform degree distribution), led to the best overall compaction in most cases, except the RWID. This is because the power law degree distribution implies in asymmetric distribution of frequency of symbols, and therefore, more effective Huffman coding. Interestingly, the proposed basic framework can be directly extended to model more sophisticate systems involving several pairs of transmitter-receivers, which are themselves organized as complex networks. In addition to proposing the systematic integration between network science and information theory, we also illustrated a typical problem that can be tackled in this area, namely the efficiency of transmission of several types of networks by using different kinds of random walks. A number of interesting results has been reported. First, we confirmed that different network topologies and dynamics can lead, irrespectively of compaction, to rather distinct performances. Interestingly, the BA model exhibited a markedly distinct behavior, oscillating between the best and worst performances, depending on the probing random walk. On the other hand, the KN model, in al- Given the generality of the proposed framework with respect to theoretical and practical aspects, the prospects for future works are particularly wide and a more complete list of possibilities would be beyond the scope of this work. Some particularly promising application venues include the modeling of opinion spreading, syllabuses planning, and language evolution. Also, it would be interesting to consider noisy transmission, as well as higher order statistical coding of symbols. Regarding network topology, it would be particularly interesting to investigate how modular structure can impact the transmission. Other types of dynamics can be also considered, especially those related to neuronal signal propagation. 7 Acknowledgements The authors acknowledge financial support from Capes-Brazil, São Paulo Research Foundation (FAPESP) [1] T. M. Cover and J. A. Thomas, Elements of Information Theory (Wiley Series in Telecommunications and Signal Processing) (Wiley-Interscience, 2006). [2] M. Newman, Networks: An Introduction (Oxford University Press, Inc., New York, NY, USA, 2010). [3] A.-L. Barabási, Network science (Cambridge University Press, 2016). [4] J. Borge-Holthoefer, N. Perra, B. Gonçalves, S. González-Bailón, A. Arenas, Y. Moreno, and A. Vespignani, Science advances 2, e1501158 (2016). [5] J. Sun, D. Taylor, and E. M. Bollt, SIAM Journal on Applied Dynamical Systems 14, 73 (2015). [6] S. E. Ahnert, Scientific reports 4 (2014). [7] M. De Domenico and J. Biamonte, Physical Review X 6, 041062 (2016). [8] L. Lacasa, V. Nicosia, and V. Latora, arXiv preprint arXiv:1408.0925 (2014). [9] R. Ulanowicz, Treatise on Estuarine and Coastal Science pp. 35–57 (2011). [10] M. Andjelković, N. Gupte, and B. Tadić, Physical Review E 91, 052817 (2015). [11] T. H. Cormen, C. Stein, R. L. Rivest, and C. E. Leiserson, Introduction to Algorithms (McGraw-Hill Higher Education, 2001), 2nd ed. [12] L. F. Costa, O. Sporns, L. Antiqueira, M. G. V. Nunes, and O. N. Oliveira Jr., Applied Physics Letters 91, 054107 (2007). [13] L. Lovász, Random walks on graphs: a survey, vol. 1 of Combinatorics, Paul Erdos is Eighty (Janos Bolyai Mathematical Society, Hungary, 1993). [14] M. Bonaventura, V. Nicosia, and V. Latora, Physical Review E 89, 012803 (2014). [15] D. J. Amit, G. Parisi, and L. Peliti, Physical Review B 27, 1635 (1983). [16] Y. Kim, S. Park, and S.-H. Yook, Physical Review E 94, 042309 (2016). [17] J. Gómez-Gardeñes and V. Latora, Phys. Rev. E 78, 065102 (2008). [18] P. ErdŐs and A. Rényi, Publications of the Mathematical Institute of the Hungarian Academy of Sciences 5, 17 (1960). [19] A.-L. Barabási and R. Albert, Science 286, 509 (1999). [20] D. Watts and S. Strogatz, nature 393, 440 (1998). [21] B. M. Waxman, Selected Areas in Communications, IEEE Journal on 6, 1617 (1988). [22] J. Dall and M. Christensen, Physical Review E 66, 016121 (2002). [23] L. F. Costa, arXiv/abs: 0711.2736 (2007). [24] A. Cohen, W. Hersh, C. Dubay, and K. Spackman, BMC Bioinformatics 6, 103 (2005). [25] H. Liu and J. Cong, Chinese Science Bulletin 58, 1139 (2013). [26] D. R. Amancio, Journal of Statistical Mechanics: Theory and Experiment 2015, P03005 (2015). [27] D. R. Amancio, O. N. Oliveira Jr., and L. F. Costa, EPL (grant no. 2016/19069-9, 2015/08003-4, 2015/18942-8, 2014/20830-0 and 2011/50761-2), CNPq-Brazil (grant no. 307333/2013-2) and NAP-PRP-USP. (Europhysics Letters) 98, 18002 (2012). [28] D. Salomon and G. Motta, Handbook of Data Compression (Springer Publishing Company, Incorporated, 2009), 5th ed. 8 Supplementary material S1. Efficiency of network encoding As noted in the main text, the steering coefficient (S) indicates how well the symbol probabilities of the transmitted message can be predicted from some network topological property. A combination of network and dynamics possessing large S should lead to a good prediction of the statistics of the message. In order to verify if this is indeed the case, we compared the compression ratios achieved when exploring 90% of the network (R90 ) with those obtained when using one of the transmitted messages to estimate the symbol probabilities of a whole S set of messages being transmitted (R90 ). The results for the undirected networks are shown in Fig. S1. It is clear that estimating the probabilities using the topology of the system always resulted in better compression ratios than the single message approach. Also, observe that the GEO S model displays a large variance of R90 values. This is caused by the large diameter of this network, which leads to substantial parts not being visited by the walker when the symbol probabilities are being estimated. This leads to low compression ratios for messages starting around nodes that were not visited during the probability estimation, while larger compression ratios are obtained for messages starting closer to the original message used for constructing the symbol dictionary. S The comparison between R90 and R90 obtained for directed networks is shown in Fig. S2. In this case, similar values were obtained for both quantities. This is likely due to the slower random walk exploration of edges al- lowed by the directed networks. This, in turn, leads to better estimation of the node probabilities, since the walker is more likely to reach nodes that would not be visited otherwise if the network were undirected. S2. Better exploration times of knitted networks In order to understand why the simulations executed in Knitted networks (KN) resulted in better exploration times, we compare the results of this model with a set of ER networks having distinct reciprocity values and different restrictions regarding the in-degree (kin ) and outdegree (kout ) of each node. First, networks were created with a range of reciprocity values, which are approximately 0.0, 0.4 and 0.9. The methodology used for changing the reciprocity of the networks is described in Section II of the main text. The four random walk dynamics considered in the main text were applied to the C networks. The obtained exploration times (T90 and T90 ), steering coefficients (S90 and SL ) and compression ratios (R90 and RL ) are shown in Fig. S3. Note that T90 and C T90 increase with the reciprocity. Furthermore, Fig. S3 also shows the results for ER networks built so that the reciprocity is close to zero and kin is equal to kout for each node (ERE). For all the considered random walks, C the exploration times T90 and T90 of the KN networks were mostly similar to those obtained for ERE networks. Therefore, we believe that the main characteristics leading to an efficient exploration in KN networks are the low reciprocity and the fact that, by construction, kin is equal to kout for almost all nodes. 9 FIG. S1: Comparison between compression ratios obtained when using the networks degrees to generate the dictionary (R90 ) S and when one of the transmitted messages is used for the dictionary creation (R90 ). The plots are respective to the (a) traditional, (b) degree-biased (c) inverse degree-biased and (d) self-avoiding random walk dynamics taking place on undirected networks. 10 FIG. S2: Comparison between compression ratios obtained when using the networks degrees to generate the dictionary (R90 ) S and when one of the transmitted messages is used for the dictionary creation (R90 ). The plots are respective to the (a) traditional, (b) degree-biased (c) inverse degree-biased and (d) self-avoiding random walk dynamics taking place on directed networks. 11 (a) T90 ER-0.0 RW ER-0.9 ER-0.4 TSAW RWD RWID 100k 100k 100k 100k 95k 95k 95k 95k KN KN 90k RW ERE ER-0.9 ER-0.4 90k TSAW 90k RWD 90k RWID 0.80 0.80 0.80 0.80 0.60 0.60 0.60 0.60 0.40 0.40 0.40 0.40 0.20 0.20 0.20 0.20 ER-0.0 (e) R90 ERE RW TSAW RWD RWID 1.02 1.02 1.02 ER-0.9 1.01 1.01 1.01 1.01 ER-0.4 1.00 1.00 1.00 1.00 ER-0.0 RW ER-0.4 ER-0.9 TSAW RWD RWID 100k 100k 100k 100k 95k 95k 95k 95k ERE 90k 90k 90k 90k (d) SL KN RW ERE ER-0.9 ER-0.4 TSAW RWD RWID 0.80 0.80 0.80 0.80 0.60 0.60 0.60 0.60 0.40 0.40 0.40 0.40 0.20 0.20 0.20 0.20 ER-0.0 1.02 KN ER-0.0 KN ERE (c) S90 (b) T C90 (f) RL ERE RW TSAW RWD RWID 1.02 1.02 1.02 1.02 ER-0.9 1.01 1.01 1.01 1.01 ER-0.4 1.00 1.00 1.00 1.00 KN ER-0.0 FIG. S3: Transmission and compaction average values and standard deviations obtained for variations of the ER model and for KN networks. Shown are the values for ER networks having distinct reciprocities (indicated as ER − 0.0, ER − 0.4 and ER − 0.9), and networks where kin = kout (ERE). (a) Time to transmit 90% of the network (T90 ); (b) Time to transmit 90% C of the network with Huffman compression (T90 ); (c) Steering coefficient attained after exploring 90% of the network (S90 ); (d) Steering coefficient for longer term exploration (SL ); (e) Compression ratio for 90% exploration (R90 ), and (f) Compression ratio obtained after a large number of iterations (RL ).
7cs.IT
1 Channel Diagonalization for Cloud Radio Access arXiv:1802.01807v2 [cs.IT] 25 Feb 2018 Liang Liu, Member, IEEE, Pratik Patil, and Wei Yu, Fellow, IEEE Abstract—The diagonalization of a conventional multiple-input multiple-output (MIMO) channel into parallel and independent subchannels via singular value decomposition (SVD) is a fundamental strategy that allows the MIMO channel capacity to be achieved using scalar channel codes. This letter establishes a similar channel diagonalization result for the uplink and the downlink of a cloud radio access network (C-RAN), in which a central processor (CP) is connected to a remote radio head (RRH) serving a single user via rate-limit digital fronthaul carrying the compressed baseband signal. Specifically, we show that the diagonalization of the MIMO channel between the RRH and the user via SVD and the subsequent independent and parallel quantization of scalar signals and channel coding in each of the subchannels is optimal. This letter establishes this fact using the majorization theory. Further, an uplink-downlink duality for the multiple-antenna C-RAN is identified for this single-user case. Index Terms—Channel decomposition, cloud radio-access network (C-RAN), uplink-downlink duality I. I NTRODUCTION A fundamental result in multiple-input multiple-output (MIMO) communication is that the diagonalization of a Gaussian vector channel y = Hx + z via singular value decomposition (SVD), H = U H ΛH V H H , leads to an optimal transmission and reception strategy. The use of the singular vectors V H as the precoders, the singular vectors U H as the receive beamformers, and the use of error-correcting codes designed for single-input single-output (SISO) additive white Gaussian noise (AWGN) channel over the independent and parallel subchannels can achieve the capacity of the overall Gaussian vector channel [1]. Moreover, if the uplink and downlink channels are reciprocals of each other, because the singular values of H and H H are the same, the capacities of the uplink and downlink channels are also the same. This letter investigates the uplink and downlink of a cloud radio-access network (C-RAN) [2] consisting of a cloud-based central processor (CP), a remote radio head (RRH), and one user. The RRH is connected to the CP via a finite-capacity digital link. In the uplink, the RRH compresses the received baseband analog signal and sends the compressed signal to the CP for demodulation and decoding. In the downlink, the CP pre-computes the desired analog transmit signal and sends a compressed version to the RRH for transmission. For such a C-RAN, we ask the question of whether the natural strategy of first diagonalizing the MIMO channel into parallel scalar channels followed by independently compressing the scalar signal and coding over each of the subchannels is optimal. This letter answers the question in the affirmative by utilizing the majorization theory [3]. The answer is nontrivial because it involves a joint optimization of transmission and quantization under finite fronthaul. As a consequence of the optimality of channel diagonalization, an uplink-downlink duality is established for the single-RRH single-user C-RAN. We note that although a main future benefit of C-RAN stems from multiple-RRH cooperation for interference mitigation, the single-RRH single-user C-RAN considered here is already of interest, because the processing of baseband signals in the cloud provides computational offloading benefit [4] even without RRH cooperation. This paper considers C-RAN with a single user. The single-user C-RAN model considered in this letter can also be thought of as corresponding to one subcarrier of an orthogonal frequency-division multiple-access (OFDMA) C-RAN system, in which users are separated via orthogonal subcarriers, free of co-channel interference [5]. II. U PLINK AND D OWNLINK C-RAN M ODEL Consider the uplink and downlink C-RAN model consisting of one CP, one RRH and one user, as shown in Fig. 1. The RRH is equipped with NR > 1 antennas; the user is equipped with NU > 1 antennas. In the uplink, the channel from the user to the RRH is denoted by H ∈ CNR ×NU ; in the dual downlink, the channel from the RRH to the user is given by H H by reciprocity. Without loss of generality, we assume that the rank of H is min(NR , NU ). The transmit power constraint is denoted by P for both the uplink and the downlink. It is assumed that the RRH is connected to the CP via a (noiseless) digital fronthaul link of capacity C. This letter considers compression-based strategies for relaying information between the CP and the RRH via the fronthaul link for both uplink and downlink [6], [7]. Although from a capacity perspective a RRH capable of decoding and encoding can potentially outperform compression in our setting, the compression strategy significantly simplifies the computational requirements at the RRH. For this reason, the practical implementations of C-RAN in 5G cellular systems are likely to involve compression over the fronthaul [4]. A. Uplink C-RAN The uplink discrete-time baseband channel is modeled as Manuscript received November 24, 2017; revised January 30, 2018; accepted February 5, 2018. This work was supported by Natural Sciences and Engineering Research Council (NSERC) of Canada. The associate editor coordinating the review of this paper and approving it for publication was Dr. Tarchi. (Corresponding author: Liang Liu.) Liang Liu, Pratik Patil, and Wei Yu are with the Department of Electrical and Computer Engineering, University of Toronto (email:[email protected], {ppatil,weiyu}@comm.utoronto.ca). y ul = Hxul + z ul , (1) where it is assumed that the user transmits a Gaussian signal with covariance S ul , i.e., xul ∼ CN (0, S ul ), and z ul ∼ CN (0, σ 2 I) denotes the noise at the RRH. The total transmit power of the user across all the antennas is tr(S ul ). The RRH 2 Fig. 1. System models of single-user multi-antenna C-RAN in the uplink (left) and the downlink (right). compresses its received signal and sends the compressed signal to the CP. This quantization process can be modeled as ỹ ul = y ul + eul , . Qul I(x̃dl ; xdl ) = log2 (3) I(x ; ỹ ) = log2 (4) With a transmit power constraint P and fronthaul constraint C, the maximum achievable uplink rate for the user is the optimal value of the following optimization problem [6]: ul HS H (P1) : maximize S ul ,Qul log2 subject to H ul . (7) H H S̃ H + H H Qdl H + σ 2 I dl H H Qdl H + σ 2 I . (8) With the same transmit power constraint P and fronthaul constraint C as in the uplink, the maximum achievable downlink rate for the user is the optimal value of the following optimization problem [7]: dl . Qul + σ 2 I Qdl dl dl HS ul H H + Qul + σ 2 I ul |S̃ + Qdl | The achievable rate of the user is I(x̃ ; y ) = log2 HS ul H H + Qul + σ 2 I The achievable rate for the user, accounting for the quantization noise, can now be expressed as ul dl (2) where it is assumed that the quantization noise has a Gaussian distribution with covariance Qul , i.e., eul ∼ CN (0, Qul ). Based on the rate-distortion theory [8], the fronthaul rate needed for transmitting ỹ ul can be expressed as I(y ul ; ỹ ul ) = log2 By rate-distortion theory, the fronthaul rate for transmitting x̃dl can be expressed as H H S̃ H + H H Qdl H + σ 2 I (P2) : maximize dl ˜ dl S ,Q log2 H H Qdl H + σ 2 I dl subject to log2 |S̃ + Qdl | Qdl ≤ C,  dl  tr S̃ + Qdl ≤ P. 2 +Q +σ I Qul + σ 2 I III. O PTIMALITY OF C HANNEL D IAGONALIZATION HS ul H H + Qul + σ 2 I This letter shows that the SVD diagonalization of the channel is optimal for both the uplink and the downlink C-RAN by providing optimal solutions to problems (P1) and (P2). Define the SVD of H as H = U H ΛH V H H, where ΛH ∈ CNR ×NU is a rectangular diagonal matrix with D = rank(H) = min(NR , NU ) diagonal elements denoted by h1 , · · · , hD , with |h1 | ≥ · · · ≥ |hD |, and U H ∈ CNR ×NR and V H ∈ CNU ×NU are unitary matrices. Theorem 1: The optimal solution to problem (P1) has the following form: log2 Qul ≤ C,   tr S ul ≤ P. B. Downlink C-RAN The downlink discrete-time baseband channel is modeled as y dl = H H xdl + z dl , (5) where xdl denotes the transmit signal of the RRH, and z dl ∼ CN (0, σ 2 I) denotes the AWGN at the user. The transmit signal xdl is a compressed version of the beamformed signal, assumed to be Gaussian distributed as dl x̃dl ∼ CN (0, S̃ ). The compression process is modeled as xdl = x̃dl + edl , (6) where the compression noise is also assumed to be Gaussian, i.e., edl ∼ CN (0, Qdl ). The total transmit power of the RRH dl across all the antennas can now be expressed as tr(S̃ +Qdl ). S ∗,ul = V H ΛS ul V H H, ∗,ul Q = U H ΛQul U H H, (9) (10) ul = diag(pul where ΛS ul = 1 , · · · , pNU ) and ΛQul ul ul diag(q1 , · · · , qNR ) are diagonal matrices with non-negative ul ul ul diagonal elements pul 1 , · · · , pNU and q1 , · · · , qNR . Theorem 2: The optimal solution to problem (P2) has the following form: S̃ ∗,dl ∗,dl Q = U H ΛS̃ dl U H H, (11) U H ΛQdl U H H, (12) = 3 dl where ΛS̃ dl = diag(p̃dl = 1 , · · · , p̃NR ) and ΛQdl dl dl diag(q1 , · · · , qNR ) are diagonal matrices with non-negative dl dl dl diagonal elements p̃dl 1 , · · · , p̃NR and q1 , · · · , qNR . It is well-known that to maximize the capacity of the vector point-to-point channel, the optimal strategy is to set the precoder and receiver beamformer as singular vectors in V H and U H so as to diagonalize the channel H [1]. Theorems 1 and 2 imply that under the assumption of compression-based strategies for C-RAN, the optimal transmit and receive scheme is also to diagonalize the vector channel into D = rank(H) parallel sub-channels such that a simple quantization of scalars together with scalar AWGN codes on each subchannel is optimal. The proofs are based on majorization theory [3] and dl dl are deferred to the next section. Here, hd , (pul d , p̃d + qd ), ul dl and (qd , qd ) are the channel strength, transmit power, and quantization noise level of the uplink/downlink subchannel d. The optimality of channel diagonalization allows us to establish an uplink-downlink duality relationship for the multiantenna single-user single-RRH C-RAN. Based on Theorems 1 and 2, the maximizations of the uplink and downlink rates for C-RAN, i.e., (P1) and (P2), reduce to the following scalar optimization problems. For the uplink, we have:   D X |hd |2 pul d maximize log2 1 + ul (13) ul qd + σ 2 {pul d ,qd } d=1   D ul 2 X |hd |2 pul d + qd + σ ≤ C, subject to log2 qdul d=1 D X pul d ≤ P, dl {p̃dl d ,qd } subject to |hd |2 p̃dl d 2 q dl + σ 2 |h | d d d=1  dl  D X p̃d + qddl log2 ≤ C, qddl d=1 D X  (14) dl (p̃dl d + qd ) ≤ P. d=1 Although the above problems (13) and (14) are not convex, there is an interesting duality between the two. For the SISO C-RAN, the duality has been shown in [9, Theorem 1]. Specifically, consider the case of D = 1, the maximum uplink achievable rate is     |h|2 P + σ 2 |h|2 pul , (15) = log2 log2 1 + ul q + σ2 σ 2 + 2−C |h|2 P where we have used the relationships pul = P and  2 ul  |h| p + q ul + σ 2 log2 = C. q ul By applying this result to each subchannel d, it can be shown that the optimal value of the problem (13) must be the same as that of the problem (14). Theorem 3: Consider a C-RAN model implementing compression-based strategies in both the uplink and the downlink, where both the user and RRH are equipped with multiple antennas. Any rate that is achievable in the uplink is achievable with the same sum-power and fronthaul capacity constraint in the downlink, and vice versa. The above result can be thought of as a generalization of celebrated uplink-downlink duality (e.g. [10]) to the C-RAN, but restricted to the single-RRH single-user case. IV. P ROOFS VIA L OGARITHMIC M AJORIZATION A. Proof of Theorem 1 First by [11, Theorem 2], we can recast problem (P1) as maximize R subject to R ≤ log2 I + HS ul H H (Qul + σ 2 I)−1 , R,Sul ,Qul (19) Qul + σ 2 I R + log2 Qul ≤ C,   tr S ul ≤ P. d=1 and for the downlink, we have:  D X maximize log2 1 + it can be shown that the maximum downlink achievable rate is exactly the same as the uplink:     |h|2 P + σ 2 |h|2 p̃dl . (18) = log2 log2 1 + 2 dl |h| q + σ 2 σ 2 + 2−C |h|2 P Define the SVD of Φ = HS ul H H and Qul as Φ = ul U Φ ΛΦ U H = U Qul ΛQul U H Φ and Q Qul , respectively, for some ΛΦ = diag(λΦ,1 , · · · , λΦ,NR ) with λΦ,1 ≥ · · · ≥ λΦ,NR , and ΛQul = diag(λU ul ,1 , · · · , λU ul ,NR ) with λU ul ,1 ≤ · · · ≤ λU ul ,NR . Note that the optimization variables of problem (19) are changed to R, Φ (instead of S ul ), and Qul . Consider the first constraint in problem (19). Given any matrix A, define γ ↓ (A) and γ ↑ (A) as the vectors consisting of all the eigenvalues of A in decreasing and increasing order, respectively. According to [3, 9.H.1.d], γ(Φ(Qul + σ 2 I)−1 ) is logarithmically majorized by γ ↓ (Φ) ◦ γ ↓ ((Qul + σ 2 I)−1 ) (see [12, Definition 1.4]), where ◦ represents the elementwise Moreover, it can be shown that f (x) = PN product. 2 log (σ +x n ) is a Schur-geometrically-convex function 2 n=1 of x = [x1 , · · · , xN ]T (see [12, Definition 1.5]). Since the diagonal elements of ΛΦ , (ΛQul + σ 2 I)−1 are all arranged in deceasing order, we thus have log2 I + HS ul H H (Qul + σ 2 I)−1 (16) Likewise in the downlink D = 1 case, utilizing the relationships p̃dl + q dl = P and   dl p̃ + q dl = C, (17) log2 q dl = log2 I + Φ(Qul + σ 2 I)−1 = log2 |σ 2 I + diag(γ(Φ(Qul + σ 2 I)−1 ))| ≤ log2 |σ 2 I + diag(γ ↓ (Φ) ◦ γ ↓ ((Qul + σ 2 I)−1 ))| = log2 |σ 2 I + ΛΦ (ΛQul + σ 2 I)−1 |, where the equality holds if and only if U Qul = U Φ . (20) 4 Next, consider the second constraint in problem (19). It can be observed that it does not depend on U Φ and U Qul . Finally, consider the third constraint in problem (19). Define H the truncated SVD of H as H = Ū H Λ̄H V̄ H , where Ū H and V̄ H consist of the first D = min(NR , NU ) columns of U H H H and V H with Ū H Ū H = V̄ H V̄ H = I, and Λ̄H ∈ CD×D is the block-submatrix of ΛH with indices taken from 1 H to D. Since Φ = HS ul H H , we have V̄ H S ul V̄ H = −1 −1 H Λ̄H Ū H ΦŪ H Λ̄H . It then follows that   (a) H tr S ul ≥ tr(S ul V̄ H V̄ H )   −2 H = tr ΦŪ H Λ̄H Ū H   −1 H UH , = tr ΦU H (ΛH ΛH H) maximize US dl ,ΛS dl subject to H H 2 log2 |U S dl ΛS dl U H S dl U H ΛH ΛH U H + σ I| dl log2 |ΛS dl | ≤ C + log2 |Q̄ |, tr(ΛS dl ) ≤ P. (24) Note that the diagonal elements of ΛS dl and ΛH ΛH H are arranged in decreasing order. Similar to (20), we have H H 2 log2 |U S dl ΛS dl U H S dl U H ΛH ΛH U H + σ I| 2 ≤ log2 |ΛS dl ΛH ΛH H + σ I|, (25) (21) where (a) is from [10, Appendix A]. Since the diagonal −1 elements of (ΛH ΛH are arranged in increasing order, H) according to [3, 9.H.1.h], we have     −1 H −1 tr ΦŪ H (ΛH ΛH Ū H ≥ tr ΛΦ (ΛH ΛH H) H) NR X λΦ,d = . |hd |2 dl dl dl diag(pdl 1 , · · · , pNR ) with p1 ≥ · · · ≥ pNR . Then, problem (23) reduces to the following problem: (22) d=1 Note that if hd = 0, for d = D + 1, · · · , NR , we have λΦ,d = λ 0 and |hΦ,d 2 is understood to be zero. Combining (21) and d| (22), it follows that the transmit power is lower-bounded by PNR 2 λ /|h | . Observe that if U Φ = U H , or equivalently, Φ,d d d=1 the SVD of S is in the form of (9), the above lower bound on PN R λΦ,d /|hd |2 . transmit power is achieved, i.e., tr(S ul ) = d=1 Further, regardless of the choice of U Φ , the upper bound of log2 I + HS ul H H (Qul + σ 2 I)−1 given in (20) can be achieved as long as the optimal U Qul is set to be U Φ . As a consequence, the optimal solution is to set U Φ as U H , i.e., (9), since it makes the transmit power the lowest, and to set U Qul = U Φ = U H to achieve the maximum value of log2 I + HS ul H H (Qul + σ 2 I)−1 . This makes the feasible set of R, ΛS ul , and ΛQul in problem (19) the largest, which results in the best objective value. Theorem 1 is thus proved. where the equality holds Next, given any S dl dl Q = U Qdl ΛQdl U H Qdl , dl with q1dl ≤ · · · ≤ qN . R following problem: minimize UQdl ,ΛQdl subject to if and only if U S dl = U H . dl = S̄ , we optimize Qdl . Define dl where ΛQdl = diag(q1dl , · · · , qN ) R Then, problem (23) reduces to the H H 2 log2 |U H ΛH ΛH H U H U Qdl ΛQdl U Qdl + σ I| dl log2 |ΛQdl | ≥ log2 |S̄ | − C. (26) According to [13, III.6.14], γ ↓ (HH H ) ◦ γ ↑ (Qdl ) is logarithmically majorized by γ(HH H Qdl ). Then, we have H H 2 log2 |U H ΛH ΛH H U H U S dl ΛQdl U S dl + σ I| 2 ≥ log2 |ΛH ΛH H ΛQdl + σ I|, (27) where the equality holds if and only if U Qdl = U H . Combining (25) and (27), Theorem 2 is thus proved. V. C ONCLUSION This letter shows that for the single-RRH single-user multiantenna C-RAN, where the compression-based strategies are employed to relay information between the RRH and the CP, for both the uplink and the downlink, the optimal strategy is to perform the channel SVD-based linear precoding and receive beamforming to diagonalize the MIMO channel into parallel SISO subchannels then perform compression and channel coding on each subchannel independently. This result leads to an uplink-downlink duality for the single-user C-RAN. B. Proof of Theorem 2 dl For convenience, define S dl = S̃ + Qdl as the covariance matrix of the transmit signal xdl . Problem (P2) reduces to: H H S dl H + σ 2 I maximize log2 subject to ≤ C, Qdl   tr S dl ≤ P. Sdl ,Qdl H H Qdl H + σ 2 I (23) S dl log2 dl First, given any Qdl = Q̄ , we optimize over S dl . Define the SVD of S dl = U S dl ΛS dl U H S dl , where ΛS dl = R EFERENCES [1] G. G. Raleigh and J. M. Cioffi, “Spatio-temporal coding for wireless communications,” IEEE Tran. Commun., vol. 46, no. 3, pp. 357-366, Mar. 1998. [2] O. Simeone, A. Maeder, M. Peng, O. Sahin, and W. Yu, “Cloud radio access network: virtualizing wireless access for dense heterogeneous systems,” J. Commun. and Networks, vol. 18, no. 2, pp. 135-149, Apr. 2016. [3] A. W. Marshall and I. Olkin, Inequalities: Theory of Majorization and Its Applications. New York: Academic, 1979. [4] A. Checko, H. L. Christiansen, Y. Yan, L. Scolari, G. Kardaras, M. S. Berger, and L. Dittmann, “Cloud RAN for mobile networks—A technology overview,” IEEE Commun. Surveys Tuts., vol. 17, no. 1, pp. 405-426, 2015. [5] L. Liu, S. Bi, and R. Zhang, “Joint power control and fronthaul rate allocation for throughput maximization in OFDMA-based cloud radio access network,” IEEE Trans. Commun., vol. 63, no. 11, pp. 4097-4110, Nov. 2015. 5 [6] Y. Zhou and W. Yu, “Optimized backhaul compression for uplink cloud radio access network,” IEEE J. Sel. Areas Commun., vol. 32, no. 6, pp. 1295-1307, June 2014. [7] S. H. Park, O. Simeone, O. Sahin and S. Shamai, ”Joint precoding and multivariate backhaul compression for the downlink of cloud radio access networks,” IEEE Trans. Signal Process., vol. 61, no. 22, pp. 5646-5658, Nov. 2013. [8] A. E. Gamal and Y.-H. Kim, Network information theory, Cambridge University Press, 2011. [9] L. Liu, P. Patil, and W. Yu, “An uplink-downlink duality for cloud radio access network,” in Proc. IEEE Int. Symp. Inf. Theory (ISIT), pp. 16061610, Barcelona, Spain, July, 2016. [10] S. Vishwanath, N. Jindal, and A. Goldsmith,“Duality, achievable rates and sum rate capacity of Gaussian MIMO broadcast channels,” IEEE Trans. Inf. Theory, vol. 49, pp. 2658-2668, Oct. 2003. [11] Y. Zhou, Y. Xu, J. Chen, and W. Yu, “Optimality of Gaussian fronthaul compression for uplink MIMO cloud radio access networks”, in Proc. IEEE Int. Symp. Inf. Theory (ISIT), pp. 2241-2245, June 2015. [12] K. Guan, “Some properties of a class of symmetric functions,” J. Math. Anal. and Appl., vol. 336, pp. 70-80, 2007. [13] R. Bhatia, Matrix Analysis, Grad. Texts in Math. 169, Springer-Verlag, New York,1997.
7cs.IT
Local Asymptotic Normality for Shape and Periodicity in the Drift arXiv:1610.04093v2 [math.ST] 16 Jan 2017 of a Time Inhomogeneous Diffusion∗ Simon Holbach† January 17, 2017 Abstract We consider a one-dimensional diffusion whose drift contains a deterministic periodic signal with unknown periodicity T and carrying some unknown d-dimensional shape parameter ϑ. We prove Local Asymptotic Normality (LAN) jointly in ϑ and T for the statistical experiment arising from continuous observation of this diffusion. The local scale turns out to be n−1/2 for the shape parameter and n−3/2 for the periodicity which generalizes known results about LAN when either ϑ or T is assumed to be known. Keywords: local asymptotic normality, parametric signal estimation, periodic diffusion AMS 2010 subject classification: 62F12, 60J60 1 Introduction The center of our study is a one-dimensional diffusion ξ following the stochastic differential equation (1) dξt = [S(ϑ,T ) (t) + b(ξt )]dt + σ(ξt )dWt , t ∈ [0, ∞), where W is a one-dimensional Standard Brownian Motion, b, σ : R → R are measurable drift and volatility functions and S(ϑ,T ) : R → R is a continuous signal that is parametrized by its periodicity T and a d-dimensional shape parameter ϑ. Taking b ≡ 0, σ ≡ 1 leads to the classical ’signal in white noise’ model, which arises in a wide variety of fields including communication, radiolocation, seismic signal processing or computer-aided diagnosis ∗ † The final publication is available at Springer via http://dx.doi.org/10.1007/s11203-017-9157-5. Institut für Mathematik, Johannes Gutenberg-Universität Mainz, Staudingerweg 9, 55099 Mainz, Germany, e-mail: [email protected] 1 and has been the subject of extensive study. For this special case, Ibragimov and Khasminskii ([10]) proved LAN with rate n−3/2 for a smooth signal with known ϑ and discussed asymptotic efficiency for certain estimators. Golubev extended their approach with L2 -methods in order to estimate T at the same rate for unknown shape, which in turn was the basis for Castillo, Lévy-Leduc and Matias ([1]) for nonparametric estimation of the shape under unknown T . For our more general diffusion (1), we will stay within the confines of parametric estimation. Our main assumptions are some L2 -smoothness of the signal with respect to the parameters and positive Harris recurrence of the grid chain (ξnT )n∈N . We prove LAN for the sequence of statistical experiments corresponding to continuous observation of ξ over large time intervals with unknown ϑ and T . Höpfner and Kutoyants have solved this problem both for known T with unknown ϑ ([6]) and for known ϑ with unknown T ([8]). Our result extends both of these and allows for application to simultaneous estimation of shape and periodicity, as under LAN we can use Hájek’s Convolution Theorem and the Local Asymptotic Minimax Theorem in order to establish optimality for estimators, when the rescaled estimation errors are stochastically asymptotically equivalent to the central statistic of the experiment (see [14], [2], [13] or [5] for a detailed presentation of the relevant theory). 2 Precise Assumptions and Results Now we will give and explain the exact setting in which we would like to work in this paper. Let Θ ⊂ Rd be an open set. First, consider the following basic hypotheses: (H1) For each (ϑ, T ) ∈ Θ × (0, ∞), the equation (1) has a unique strong solution. (H2) σ is bounded away from zero. We write P(ϑ,T ) for the law on C([0, ∞)) under which the canonical process (ηt )t≥0 is the solution of (1) issued from some fixed and deterministic starting point ξ0 ∈ R with the parameters (ϑ, T ) ∈ Θ × (0, ∞). We define Ft := σ(ηs | 0 ≤ s ≤ t+) := \ r>t σ(ηs | 0 ≤ s ≤ r), the σ-algebra generated by observation of η up to time t+, t ≥ 0. Note that the drift coefficient of (1) depends on time and on the parameter (ϑ, T ) ∈ Θ × (0, ∞), while the diffusion coefficient depends on neither. Therefore we can use [5, Theorem 6.10] to calculate the log-likelihood-ratio (ϑ̃,T̃ )/(ϑ,T ) Λt := log dP(ϑ̃,T̃ ) |Ft dP(ϑ,T ) |Ft ! = Z 0 t S(ϑ̃,T̃ ) (s) − S(ϑ,T ) (s) σ(ηs ) 1 dWs − 2 Z t S(ϑ̃,T̃ ) (s) − S(ϑ,T ) (s) σ(ηs ) 0 Our goal is to prove local asymptotic normality for the sequence of experiments given by  o n C([0, ∞)), Fn , P(ϑ,T ) |Fn (ϑ, T ) ∈ Θ × (0, ∞) , n ∈ N, and to that end we will now give more precise smoothness assumptions on the deterministic signal. 2 !2 ds. (S1) For each ϑ ∈ Θ, we have a 1-periodic function Sϑ ∈ C 2 ([0, ∞)). (S2) S· (s) ∈ C 1 (Θ) for each s ∈ [0, ∞). (S3) ∇ϑ Sϑ (·) ∈ (L2loc (0, ∞))d for each ϑ ∈ Θ. (S4) The mapping S : Θ × (0, ∞) → L2loc (0, ∞), (ϑ, T ) 7→ S(ϑ,T ) := Sϑ is L2loc -differentiable with derivative  Ṡ : Θ × (0, ∞) → (L2loc (0, ∞))d+1 , (ϑ, T ) 7→ Ṡ(ϑ,T ) in the sense that for every t > 0 and (ϑ, T ) ∈ Θ × (0, ∞) we have Z 0 t   S(ϑ,T ) (s) − S(ϑ̃,T̃ ) (s) − ((ϑ, T ) − (ϑ̃, T̃ ))⊤ Ṡ(ϑ,T ) (s) (ϑ, T ) − (ϑ̃, T̃ ) · T ∂ϑ1 S(ϑ,T ) .. .    :=    ∂ϑd S(ϑ,T )  ∂T S(ϑ,T )         2  ds → 0, as (ϑ̃, T̃ ) → (ϑ, T ). (S5) Ṡ is L2loc -continuous in the sense that for all t > 0 and (ϑ, T ) ∈ Θ × (0, ∞) we have Z t 2 Ṡ(ϑ,T ) (s) − Ṡ(ϑ̃,T̃ ) (s) ds → 0, as (ϑ̃, T̃ ) → (ϑ, T ). 0 (S6) The mapping (0, ∞) ∋ T 7→ ∇ϑ S(ϑ,T ) ∈ (L2loc (0, ∞))d satisfies the following local Hölder condition: For each ϑ ∈ Θ and T > 0 there are α ∈ (0, 2] and β ∈ [0, 1 + 3α/2) such that for suitable ε > 0 and t0 ≥ 0 Z t 2 α ∇ϑ S(ϑ,T ) (s) − ∇ϑ S(ϑ,T̃ ) (s) ds ≤ Ctβ T − T̃ t0 for all t > t0 , T̃ ∈ (T − ε, T + ε) and some constant C that does not depend on T̃ or t. Remark 2.1. 1.) We observe that if (S1) - (S3) hold and Ṡ(ϑ,T ) (s) is continuous (and thus also locally bounded) in ϑ, T and s, (S4) and (S5) are immediate by dominated convergence. Note that in general, (S1) - (S3) do not require that for example ∂ϑ1 S(ϑ,T ) (s) is continuous (or even locally bounded) in T or s. 2.) If for every ϑ ∈ Θ, T > 0 and t > 0 there are δ = δ(ϑ, T ) ∈ (0, 1] and C(ϑ, t) ≤ cst tζ with ζ ∈ [0, δ/2) such that the mapping [0, ∞) ∋ s 7→ ∇ϑ Sϑ (s) is Hölder-δ-continuous on [0, t] with Hölder-constant C(ϑ, t), we get that for sufficiently small ε > 0 and for all T̃ ∈ (T − ε, T + ε) Z 0 t 2   s 2 s − ∇ϑ Sϑ ds T T̃ 0 Z t  2δ(ϑ,T ) s s t − ds ≤ sup C ϑ, ′ T T T ′ ∈(T −ε,T +ε) 0 T̃  2δ  2ζ Z t T̃ − T t   ≤ cst s2δ ds, T −ε (T − ε)2 0 ∇ϑ S(ϑ,T̃ ) (s) − ∇ϑ S(ϑ,T ) (s) ds = Z t ∇ϑ Sϑ 3 which implies the Hölder condition (S6) with α = 2δ and β = 2(δ + ζ) + 1 ∈ [0, 1 + 3α/2). 3.) As a consequence of the two preceding remarks, all of the hypotheses (S1) - (S6) are fulfilled if the mapping Θ × [0, ∞) ∋ (ϑ, s) 7→ Sϑ (s) is in Cb2 (Θ × [0, ∞)). Existence and boundedness of ∂s ∇ϑ Sϑ (s) ensure that we can choose δ = 1 and ζ = 0 above. 4.) Let Sϑ (s) = f (ϑ, ϕ(s)) with ϕ ∈ C 2 ([0, ∞)) 1-periodic and f ∈ C 1,2 (Θ × R). In particular, we have (S1) (S3). Write ∇f = (f1 , . . . , fd+1 ). Since     Ṡ(ϑ,T ) (s) =     f1 ϑ, ϕ .. . fd+1 s T fd ϑ, ϕ Ts  ϑ, ϕ Ts ϕ′    s T  −s T2         is obviously continuous in ϑ, T and s, so we also have (S4) and (S5). Moreover we see that the Hölder property in 2.) is fulfilled if and only if it is fulfilled by the mapping [0, ∞) ∋ s 7→ (f1 , . . . , fd )(ϑ, s). So in that case all of the hypotheses (S1) - (S6) hold. 5.) A special case of the preceding example is a product structure Sϑ (s) = g(ϑ)ϕ(s) with ϕ ∈ C 2 ([0, ∞)) 1-periodic and g ∈ C 1 (Θ). As for all s, s̃ ∈ [0, ∞) we have |∇ϑ Sϑ (s) − ∇ϑ Sϑ (s̃)| ≤ |∇g(ϑ)| kϕ′ k∞ |s − s̃| , no further conditions are needed to ensure the Hölder property in 2.) to hold with δ = 1 and ζ = 0. 6.) Choosing ϕ(s) = sin(2kπs) or ϕ(s) = cos(2kπs) with k ∈ N0 in the above example and observing that our hypotheses are stable under linear combinations, we see that all of them are fulfilled for signals of the form S(ϑ,T ) (s) =     l  X 2kπs 2kπs + hk (ϑ) cos gk (ϑ) sin T T k=1 with l ∈ N0 and gk , hk ∈ C 1 (Θ) for all k ∈ {1, . . . , l}. Let us now fix (ϑ, T ) ∈ Θ × (0, ∞). As a consequence of the periodic structure in the drift term of the diffusion   (ϑ,T ) (1), its transition semi-group Ps,t under P(ϑ,T ) has the property 0≤s<t (ϑ,T ) (ϑ,T ) Ps+kT,t+kT = Ps,t for all t > s ≥ 0 and k ∈ N. (ϑ,T ) Thus the grid chain (ξkT )k∈N0 is a time homogeneous Markov chain with one-step transition kernel P0,T . We suppose: (H3) The grid chain under P(ϑ,T ) is positive recurrent in the sense of Harris with invariant probability measure µ(ϑ,T ) . 4 Verifiable criteria for this condition can be found e.g. in [9], a specific example will be given at the end of this article. The ergodicity assumption (H3) allows us to make use of certain variants of classical Limit Theorems (see [7], [8]), which we will need for Lemma 2.5 below. With [7, Lemma 2.1] in mind, we define the measure (ϑ,T ) ν (ϑ,T ) (ds) = µ(ϑ,T ) P0,sT (σ −2 )ds (2) on B((0, 1)), which is finite, as µ(ϑ,T ) is finite and σ is bounded away from zero by (H2). We write h·, ·iν (ϑ,T ) for the standard inner product in L2 (ν (ϑ,T ) ). For each t ≥ 0 define the symmetric (d + 1) × (d + 1)-dimensional block matrix     t2 ′ t ∂ϑi Sϑ , ∂ϑj Sϑ ν (ϑ,T ) i,j=1,...,d − 2T S , S i h∂ ϑi ϑ 2 ϑ ν (ϑ,T ) i=1,...,d  (3) F(ϑ,T ) (t) :=  . t3 ′ ′ hS , S i ··· (ϑ,T ) 4 ϑ ϑ ν 3T Its derivative with respect to t,     ′ −2 S , S i S −tT h∂ S , ∂ ∂ (ϑ,T ) ϑ ϑ ϑ ϑ ϑ ϑ (ϑ,T ) i j i ϑ ν ′ ν i=1,...,d  i,j=1,...,d  F(ϑ,T ) (t) = ··· t2 T −4 hSϑ′ , Sϑ′ iν (ϑ,T )     ⊤ ∇ S ∇ S ϑ ϑ ϑ ϑ    = ν (ϑ,T )   −2 ′ −2 ′ −tT Sϑ −tT Sϑ is obviously symmetric and nonnegative-definite. We suppose that ′ (S7) F(ϑ,T ) (t) is invertible for all t > 0. Note that (S7) is equivalent to linear independence of ∂ϑ1 Sϑ , . . . , ∂ϑd Sϑ , Sϑ′ in L2 (ν (ϑ,T ) ). Example 2.2. 1.) Let σ ≡ 1, then ν (ϑ,T ) is just Lebesgue’s measure. Considering once again signals of the form S(ϑ,T ) (s) =     l  X 2kπs 2kπs gk (ϑ) sin + hk (ϑ) cos T T k=1 1 with l ∈ N0 and gk , hk ∈ C (Θ) for all k ∈ {1, . . . , l}, an elementary calculation yields    (i) (j) (i) (j) 1 Pl   g (ϑ)g (ϑ) + h (ϑ)h (ϑ) , (i, j) ∈ {1, . . . , d}2 ,  2 k=1 k k k k       P ′ (j) (t) = −πtT −2 lk=1 k gk (ϑ)h(j) F(ϑ,T (ϑ) − g (ϑ)h (ϑ) , i = d + 1, j ∈ {1, . . . , d}, ) k k k  i,j    2π 2 t2 T −4 Pl k 2 g (ϑ)2 + h (ϑ)2  , i = j = d + 1, k=1 k k where a superscript (i) indicates partial derivation with respect to ϑi . Note that in the case that either the coefficients of the sin-terms or those of the cos-terms vanish identically, this matrix is invertible if and only if   ′ (t) > 0 and ∂ϑ1 Sϑ , . . . , ∂ϑd Sϑ are linearly independent in L2 (ν). In particular this is ensured if F(ϑ,T ) d+1,d+1 l = d and if for all k, i ∈ {1, . . . , d} we have hk ≡ 0 and (i) gk (ϑ) 6= 0 for i = k (i) and gk (ϑ) = 0 else. A simple example would be gk (ϑ) = ϑk . 5 2.) Similarly, if the signal is of the form S(ϑ,T ) (s) = d X ϑk ϕk k=1 s T , where ϕ1 , . . . , ϕd are orthonormal in L2 (ν (ϑ,T ) ), we have  P   d −2 ϑj ϕi , ϕ′j ν (ϑ,T ) 1 d×d −tT j=1 ′ i=1,...,d  ,  F(ϑ,T ) (t) = Pd ′ ′ 2 −4 ··· t T i,j=1 ϑi ϑj ϕi , ϕj ν (ϑ,T ) which is invertible whenever d X ϑi ϑj ϕ′i , ϕ′j ν (ϑ,T ) d  X ϑj ϕi , ϕ′j 6= ν (ϑ,T ) i,j=1 i,j=1 2 . Theorem 2.3 (Local asymptotic normality). Fix (ϑ, T ) ∈ Θ × (0, ∞) and grant all of the hypotheses (H1) - (H3) and (S1) - (S7). Fix any bounded sequence (hn )n∈N ⊂ Rd+1 and set (ϑn , Tn ) := (ϑ, T ) + δn hn with the local scale Then we have LAN   δn := diag n−1/2 , . . . , n−1/2 , n−3/2 ∈ R(d+1)×(d+1) for all n ∈ N. 1 (ϑ,T ) n ,Tn )/(ϑ,T ) − h⊤ = h⊤ Λ(ϑ F (ϑ,T ) hn + oP(ϑ,T ) (1), n n ∆n 2 n n → ∞, with Fisher Information F (ϑ,T ) = F(ϑ,T ) (1) as introduced in (3) and score ) ∆(ϑ,T = δn n Z n 0 Ṡ(ϑ,T ) (s) dWs σ (ηs ) for all n ∈ N, such that weak convergence holds.    n→∞ ) (ϑ,T ) L ∆(ϑ,T −−−−→ N 0, F(ϑ,T ) P n Remark 2.4. The above theorem naturally extends to the case of a D-dimensional signal, all of whose components satisfy (S1) - (S6), that is present in the drift of a D-dimensional diffusion driven by an M -dimensional Brownian Motion, D, M ≥ 1. Assumption (H2) has to be replaced by uniform ellipticity of σσ ⊤ , where σ : RD → RD×M is the volatility matrix of the corresponding diffusion equation. Lemma 2.5 below and assumption (S7) also need to be restated accordingly. Notation becomes far more complex in this case, but the general line of the proof remains unaltered. Notational Convention: For the remainder of this article, (ϑ, T ) ∈ Θ × (0, ∞) will be fixed and we drop corresponding indices (for µ, ν, F, F ′ , . . .) whenever there is no risk of ambiguity. The proof of the Theorem makes use of the following Lemma, which is a simple consequence of Lemma 2.2 from [8] and which we state explicitly for the sake of convenience. The case k = 0 is not included in [8], but it follows easily with a simplified version of the same argument. The essential ingredient in this Lemma (and thus in Theorem 2.3) is a Strong Law of Large Numbers for certain functionals of path segments of Markov processes with the periodic ergodicity property (H3), see section 2 of [7]. 6 Lemma 2.5. Fix (ϑ, T ) ∈ Θ × (0, ∞) and assume (H1) - (H3). For any 1-periodic bounded measurable function f : [0, ∞) → R and k ∈ N0 we have (k + 1)t −(k+1) Z 0 t  f Ts t→∞ ds −−−→ ν[f ] s 2 σ (ηs ) k P(ϑ,T ) -almost surely. Proof of Theorem 2.3. 1.) The main idea is to introduce a time step size t > 0 into the log-likelihood and then   (ϑ ,T )/(ϑ,T ) for each n ∈ N interpret Λtnn n as a continuous time stochastic process. Splitting it into several t≥0 parts and applying the above Lemma together with tools from continuous time martingale theory will eventually lead to the desired quadratic expansion. Indeed, we write (ϑ ,T )/(ϑ,T ) Λtnn n 2 Z  S(ϑn ,Tn ) (s) − S(ϑ,T ) (s) 1 tn S(ϑn ,Tn ) (s) − S(ϑ,T ) (s) dWs − ds = σ(ηs ) 2 0 σ(ηs ) 0 ! Z tn Ṡ(ϑ,T ) (s) ⊤ dWs = (δn hn ) σ(ηs ) 0 ! Z tn Ṡ(ϑ,T ) (s)Ṡ(ϑ,T ) (s)⊤ 1 ⊤ − (δn hn ) ds (δn hn ) 2 σ 2 (ηs ) 0 Z tn S(ϑn ,Tn ) (s) − S(ϑ,T ) (s) − (δn hn )⊤ Ṡ(ϑ,T ) (s) + dWs σ(ηs ) 0 !2 Z 1 tn S(ϑn ,Tn ) (s) − S(ϑ,T ) (s) − (δn hn )⊤ Ṡ(ϑ,T ) (s) ds − 2 0 σ(ηs )   Z tn S(ϑn ,Tn ) (s) − S(ϑ,T ) (s) − (δn hn )⊤ Ṡ(ϑ,T ) (s) (δn hn )⊤ Ṡ(ϑ,T ) (s) − ds σ 2 (ηs ) 0 1 ⊤ 1 =: h⊤ n ∆n (t) − hn Fn (t)hn + Rn (t) − Un (t) − Vn (t) 2 2 Z tn and in order to prove the Theorem, we have to study convergence in distribution of ∆n for n → ∞ and show almost sure convergence of Fn (1) to F = F (1). Finally, we show that Rn (t), Un (t) and Vn (t) converge to zero in probability under P(ϑ,T ) . 2.) For any fixed n ∈ N the process Mn := (∆n (t))t≥0 = δn Z 0 tn Ṡ(ϑ,T ) (s) dWs σ(ηs ) ! t≥0 is obviously an Rd+1 -valued local P(ϑ,T ) -martingale. In order to determine its weak limit for n → ∞ in the Skorohod space D([0, ∞); Rd+1 ), we first calculate its angle bracket. For i, j ∈ {1, . . . , d} we have Mni , Mnj t = 1 n Z 0 tn ∂ϑi S(ϑ,T ) (s)∂ϑj S(ϑ,T ) (s) 1 ds = t · σ 2 (ηs ) tn Z 0 tn ∂ϑi Sϑ s T  ∂ϑj Sϑ σ 2 (ηs ) s T  ds and due to the periodicity of Sϑ and by Lemma 2.5 with k = 0 this expression converges to tν[∂ϑi Sϑ ∂ϑj Sϑ ] = Fi,j (t) P(ϑ,T ) -almost surely for n → ∞, where we used the notation introduced in (2) and (3). The same argument 7 with k = 1 yields Mnj , Mnd+1 t = Mnd+1 , Mnj t tn ∂T S(ϑ,T ) (s)∂ϑj S(ϑ,T ) (s) ds σ 2 (ηs ) 0   Z tn Sϑ′ Ts ∂ϑj Sϑ Ts −t2 −2 = · 2(tn) ds s· 2T 2 σ 2 (ηs ) 0 2 n→∞ −t ν[Sϑ′ ∂ϑj Sϑ ] = Fd+1,j (t) = Fj,d+1 (t) −−−−→ 2T 2 = n−2 Z P(ϑ,T ) -almost surely and finally (with k = 2) Mnd+1 , Mnd+1 t = n−3 Z tn 0  ∂T S(ϑ,T ) (s) σ(ηs ) 2 ds = t3 · 3(tn)−3 3T 4 t3 −−−−→ ν[(Sϑ′ )2 ] = Fd+1,d+1 (t) 3T 4 Z 0 tn 2 Sϑ′ Ts ds σ 2 (ηs ) s2 · n→∞ P(ϑ,T ) -almost surely. In other words for all t ≥ 0 the quadratic variation hMn it converges P(ϑ,T ) -almost surely to the matrix F (t) as n → ∞ and the Martingale Convergence Theorem [12, Corollary VIII.3.24] implies weak convergence L →M Mn − (4) in D([0, ∞); Rd+1 ) to some limit martingale M = (M (t))t≥0 . By (S7), F ′ (t) is invertible and as it is symmetric and nonnegativep definite, it possesses a square root, i.e. there is some uniquely determined matrix A =: F ′ (t) ∈ R(d+1)×(d+1) with AA = F ′ (t). Thus the Representation Theorem [11, Theorem II.7.1] yields that M can be expressed as M (t) = Z tp F ′ (s)dBs , 0 t ≥ 0, with some (d + 1)-dimensional standard Brownian motion B. Together with (4) this also implies weak convergence   Z t     F ′ (s)ds = N (0, F (t)) L Mn (t) P(ϑ,T ) → L M (t) P(ϑ,T ) = N 0, 0 for all t ≥ 0. In particular we have weak convergence of ∆n = Mn (1) → N (0, F (1)) = N (0, F ). 3.) In the second step we have shown on the fly P(ϑ,T ) -almost sure convergence of Fn (1) = hMn i1 to hM i1 = F (1) for n → ∞. 4.) It remains to show convergence to 0 of the remainder terms Rn , Un and Vn introduced at the very beginning of this proof. Therefore, we consider the sequence Rn := (Rn (t))t≥0 = Z tn 0 S(ϑn ,Tn ) (s) − S(ϑ,T ) (s) − (δn hn )⊤ Ṡ(ϑ,T ) (s) dWs σ(ηs ) 8 ! , t≥0 n ∈ N, of local P(ϑ,T ) -martingales. Using that by (H2) the volatility σ is bounded away from 0, we estimate !2 Z tn S(ϑn ,Tn ) (s) − S(ϑ,T ) (s) − (δn hn )⊤ Ṡ(ϑ,T ) (s) hRn it = Un (t) = ds σ(ηs ) 0  Z tn 2 3 ≤ S(ϑn ,Tn ) (s) − S(ϑ,Tn ) (s) − (ϑn − ϑ)⊤ ∇ϑ S(ϑ,Tn ) (s) ds inf σ 2 0 Z tn 2 (ϑn − ϑ)⊤ (∇ϑ S(ϑ,Tn ) − ∇ϑ S(ϑ,T ) (s)) ds + 0  Z tn 2 S(ϑ,Tn ) (s) − S(ϑ,T ) (s) − (Tn − T )∂T S(ϑ,T ) (s) ds + 0 3 =: (An + Bn + Cn ). inf σ 2 Let H := supn∈N |hn |. For sufficiently large n ∈ N we have Tn ∈ [T /2, 2T ] and thus  Z Tn  2 tn S(ϑn ,Tn ) (s) − S(ϑ,Tn ) (s) − (ϑn − ϑ)⊤ ∇ϑ S(ϑ,Tn ) (s) ds +1 An ≤ Tn 0 !2   Z Tn S(ϑn ,Tn ) (s) − S(ϑ,Tn ) (s) − (ϑn − ϑ)⊤ ∇ϑ S(ϑ,Tn ) (s) tn 2 ds + 1 |ϑn − ϑ| = Tn |ϑn − ϑ| 0 !2   Z 2T S(ϑn ,Tn ) (s) − S(ϑ,Tn ) (s) − (ϑn − ϑ)⊤ ∇ϑ S(ϑ,Tn ) (s) tn 2 −1 ds, +1 H n ≤ T /2 |ϑn − ϑ| 0 where the leading factor is obviously bounded and the integral tends to 0 because of the L2 -continuity condition (S5). Next, using the Hölder condition (S6), we have for sufficiently large n ∈ N Z tn 2 2 Bn ≤ |ϑn − ϑ| ∇ϑ S(ϑ,Tn ) (s) − ∇ϑ S(ϑ,T ) (s) ds 0 Z t0  2 α 2 −1 ≤H n ∇ϑ S(ϑ,Tn ) (s) − ∇ϑ S(ϑ,T ) (s) ds + C(tn)β |Tn − T | ≤ H 2 n−1 Z 0 0 t0 2 Ṡ(ϑ,Tn ) (s) − Ṡ(ϑ,T ) (s) ds + CH 2+α tβ nβ−(1+3α/2) . The particular conditions on α and β make the second summand vanish for n → ∞, while the first summand converges to 0 because of (S5). In order to estimate Cn , we make explicit use of the C 2 -property (S1), which is readily translated into the condition that the mapping (0, ∞) ∋ T 7→ S(ϑ,T ) (s) is twice continuously differentiable for any s ∈ (0, ∞). Consequently, for every s ∈ (0, ∞) Taylor expansion provides a ̺ = ̺(s, ϑ, T, Tn , hn ) between T and Tn such that for sufficiently large n ∈ N 1 (Tn − T )2 ∂T T S(ϑ,T ) (s)|T =̺ 2     2s ′ s 1  d+1 −3/2 2 s2 ′′ s h n + 3 Sϑ S = 2 n ̺4 ϑ ̺ ̺ ̺   kSϑ′′ k∞ 2 kSϑ′ k∞ 1 2 −3 2 ≤ H n s +s 2 (T − n−3/2 H)4 (T − n−3/2 H)3 S(ϑ,Tn ) (s) − S(ϑ,T ) (s) − (Tn − T )∂T S(ϑ,T ) = ≤ c̃n−3 (s2 + s) 9 for some positive constant c̃ (not depending on s or n) and thus 2 −6 Cn ≤ c̃ n Z 0 tn n→∞ (s2 + s)2 ds −−−−→ 0. So far, we have shown that the sequence of random variables (Un (t))n∈N is bounded by a deterministic sequence which goes to zero as n → ∞. Via the Burkholder-Davis-Gundy inequality this yields   n→∞ 2 (ϑ,T ) E sup |Rn (s)| ≤ 4E(ϑ,T ) [hRn it ] = 4E(ϑ,T ) [Un (t)] −−−−→ 0, s≤t so Rn (t) vanishes in probability under P(ϑ,T ) for n → ∞. Finally, the same is true for the last remainder variable Vn (t), as by Cauchy-Schwarz 2 |Vn (t)|2 ≤ Un (t)h⊤ n Fn (t)hn ≤ Un (t)H |Fn (t)| . Taking t = 1 completes the proof. Remark 2.6. If the shape parameter ϑ is assumed to be known, our Theorem includes [8, Theorem 1.1] as a special case (only (H1) - (H3) and (S1) are actually needed in this situation). If on the other hand, the periodicity is known and the only parameter of interest is ϑ, then our Theorem leads to the same conclusion as [6, Theorem 2.1] (note that other than in our Theorem, here Score and Fisher Information are written at a time scale given by multiples of the known periodicity T ). There, the L2 -smoothness conditions on the signal are formulated under what is the measure ν (ϑ,T ) in our notation, which under (H2) makes them slightly weaker than (S4) - (S6). However, if (H2) holds (which is more or less the only verifiable condition for ν (ϑ,T ) to be finite, as supposed in [6] anyway) the most obvious way to verify these is using that ν (ϑ,T ) is thus bounded from above by a constant multiple of Lebesgue’s measure, so the difference of the assumptions is just of a very theoretical nature. The key to bringing these results together in the above Theorem is the Hölder condition (S6), which is crucial for dealing with the term Bn in step 3.) of the proof. This is the only instant where (in contrast to the terms An and Cn ) we have to impose more than just ’joint smoothness’, but a more specific relation of the interplay between T and ϑ. It should also be noted that (H2) is essential for this step, as it removes any randomness from the terms we effectively deal with. Otherwise even if we would reformulate (S4) (S6) in L2 (ν (ϑ,T ) ), we could not treat this term with Lemma 2.5 due to the occurrence of different periodicities in the integrand. Example 2.7. Consider the case b(x) = −βx for some β > 0, σ(·) ≡ σ > 0 constant, i.e. ξ is a mean-reverting Ornstein-Uhlenbeck process with mean-reversion speed β and time-dependent meanreversion level β −1 S(ϑ,T ) (t). For the sake of simplicity, let us assume that σ = 1. By [7, Example 2.3], the periodic ergodicity assumption (H3) is fulfilled and we see that ν is simply Lebesgue’s measure. In [3] the authors think of β as another unknown parameter, while they assume the periodicity T to be fixed and known. In order to apply our results, we suppose that both β and T are fixed and known, while ϑ is to be estimated. 10 The signal the authors consider is then the second one introduced in Example 2.2. In this setting, we see that the Fisher Information F is just the unit matrix and the Score is given by Z n  ∆n = n−1/2 . ϕi (s)dWs 0 i=1,...,d √ Proposition 4.1 of [3] implies that the rescaled estimation error n(ϑ̂n −ϑ) of the maximum likelihood estimator ϑ̂n is exactly the central statistic Zn = F −1 ∆n = ∆n . Combining this with our Theorem 2.3, we see that in √ the sense of the Local Asymptotic Minimax Theorem ([5, Theorem 7.12]) ϑ̂n is in fact optimal with rate n (cf. [3, Theorem 2]). Example 2.8. More generally, for σ ≡ 1 and any measurable b : R → R the process X = (Xt )t≥0 defined by Z t Xt := ξt − b(ξs )ds, 0 is obviously a solution to the ’signal in white noise’ equation (5) dXt = S(ϑ,T ) (t)dt + dWt , t ∈ [0, ∞). We will now discuss some known results about this equation. Note that even if ξ satisfies the ergodicity assumption (H3), X does not. Ibragimov and Khasminskii treat the case where ϑ is fixed and known and T is to be estimated (see [10, p. 209-211]). They show asymptotic normality and efficiency for the maximum likelihood and Bayesian estimators with a normalization factor that coincides asymptotically with (δn )−1 d+1,d+1 (Fd+1,d+1 ) −1/2 , when translated into our notation (note that they use a different parametrization: ’our T ’ takes the place of ’their θ−1 ’, explaining the different constants appearing). So both rate and limit variance are the right ones in the sense of the Local Asymptotic Minimax Theorem. Golubev ([4], or see [1] for a more detailed probabilistic explanation) gives an estimator for T under unknown infinite-dimensional ϑ (the vector of the Fourier-coefficients of the signal) which he proves to be asymptotically normal and efficient, where the normalization factor is (when translated into our notation) given by n 3/2  1 12T 4 Z 1 0 (Sϑ′ (s))2 ds 1/2 = (δn )−1 d+1,d+1  1 Fd+1,d+1 4 −1/2 . So while the rate is indeed δn , the limit variance for Golubev’s estimator apparently differs from the optimal value by a factor of 4. This is due to the fact that he studies a slightly different model in which the driving Brownian motion is two-sided and the process is observed over time intervals [−n/2, n/2] and not [0, n]. This can be interpreted as two independent ’signal in white noise’ models X (1) , X (2) each being observed over the interval [0, n/2], where X (1) follows (5) and X (2) follows (5) with the signal replaced by the same signal run backwards in time. Obviously, X (1) and X (2) both generate the same Fisher Information Fd+1,d+1 (1/2), using the notation of the proof of Theorem 2.3. As a consequence of the independence structure, the Fisher Information in the experiment arising from observation of (X (1) , X (2) ) indeed turns out to be 2 · Fd+1,d+1 (1/2) = 2 · (1/2)3 Fd+1,d+1 (1) = 11 1 Fd+1,d+1 . 4 References [1] I. Castillo, C. Lévy-Leduc, C. Matias: Exact Adaptive Estimation of the Shape of a Periodic Function with Unknown Period Corrupted by White Noise. In: Math. Methods Statist. No. 15 (2006), pp. 1-30. [2] R. Davies: Asymptotic Inference When the Amount of Information Is Random. In: Proc. of the Berkeley Symposium in Honour of J. Neyman and J. Kiefer Vol. II, Wadsworth, 1985. [3] H. Dehling, B. Franke, T. Kott: Drift Estimation for a Periodic Mean Reversion Process. In: Stat Inference Stoch Process No. 13 (2010), pp. 175-192. [4] G. Golubev: Estimating the Period of a Signal of Unknown Shape Corrupted by White Noise. In: Problems in Inform. Transmission No. 24 (1988), pp. 38-52. [5] R. Höpfner: Asymptotic Statistics with a View to Stochastic Processes. de Gruyter, 2014. [6] R. Höpfner, Y. Kutoyants: On LAN for Parametrized Continuous Periodic Signals in a Time Inhomogeneous Diffusion. In: Statistics & Decisions No. 27 (2009), pp. 309-326. [7] R. Höpfner, Y. Kutoyants: Estimating Discontinuous Periodic Signals in a Time Inhomogeneous Diffusion. In: Stat Inference Stoch Process No. 13 (2010), pp. 193-230. [8] R. Höpfner, Y. Kutoyants: Estimating a Periodicity Parameter in the Drift of a Time Inhomogeneous Diffusion. In: Mathematical Methods of Statistics No. 20 (2011), pp. 58-74. [9] R. Höpfner, E. Löcherbach: On some ergodicity properties for time inhomogeneous Markov processes with T -periodic semigroup. arXiv:1012.4916 [math.PR] [10] I.A. Ibragimov, R.Z. Khasminskii: Statistical Estimation. Springer, 1981. [11] N. Ikeda, S. Watanabe: Stochastic Differential Equations and Diffusion Processes. North-Holland Library, 2nd edition, 1989. [12] J. Jacod, A. Shiryaev: Limit Theorems for Stochastic Processes. Springer, 2nd edition, 2002. [13] Y. Kutoyants: Statistical Inference for Ergodic Diffusion Processes. Springer, 2004. [14] L. LeCam, G. Yang: Asymptotics in Statistics. Some Basic Concepts. Springer, 1990. 12
10math.ST
arXiv:1802.06190v1 [math.ST] 17 Feb 2018 Tests about R multivariate simple linear models José A. Dı́az-Garcı́a ∗ Universidad Autónoma de Chihuahua Facultad de Zootecnia y Ecologı́a Periférico Francisco R. Almada Km 1, Zootecnia 33820 Chihuahua, Chihuahua, México E-mail: [email protected] Oscar Alejandro Martı́nez-Jaime Universidad de Guanajuato Departamento de Agronomı́a División Ciencias de la Vida, Campus Irapuato-Salamanca Ex-Hacienda ”El Copal”, Km. 9; carretera Irapuato-Silao 36500 Irapuato, Guanajuato, México E-mail: [email protected] Abstract Hypothesis about the parallelism of the regression lines in R multivariate simple linear models are studied in this paper. Tests on common intercept and sets of lines intersected at a fixed value, are also developed. An application in an agricultural entomology context is provided. 1 Introduction There a number of research studies involving the behavior of a dependent variable Y as a function of one independent variable X. Sometimes the experiment accepts a simple linear model and usually this model is proposed for different experimental or observational situations. Then the following situations can emerge: the simple linear models have the same intercept; or these lines are parallel; or given a particular value of the independent variable X, say x0 , the lines are intersected in such value. We illustrate these situations through the following examples: Example 1.1. Several diets are used to feed goats in order to determine the effect for losing or gaining weight. Three goat breeds are used, and for each breed the relationship between the gain or loss of weight in pounds per goat Y and the amount of diet in pounds ingested for each goat X is given by y1j = α1 + β1 x1j + ǫ1j y2k = α2 + β2 x2k + ǫ2k y3r = α3 + β3 x3r + ǫ3r , ∗ Corresponding author Key words. Matrix multivariate elliptical distributions, multivariate linear model, likelihood ratio test, union-intersection criterion. 2000 Mathematical Subject Classification. 62J05; 62H15; 62H10 1 j = 1, 2, . . . , n1 , k = 1, 2, . . . , n2 , r = 1, 2, . . . , n3 , ns ≥ 2, s = 1, 2, 3. The investigator claims for a parallelism of the lines, that is, if β1 = β2 = β3 (if the increase in the average weight of each goat per unit of diet is the same for all breeds). Or the researcher can ask for equality in the intercepts, that is, if α1 = α2 = α3 (if the average weight of each goat breed is the same when all breeds are fed with the same diet). Example 1.2. An essay is carried out to study the relationship of the age X and the cholesterol content in blood Y of individuals between 40 and 55 years of age. In this situation, a simple linear model is assumed, but in the essay is considered female and male individuals, then, it is proposed that a model for each sex is more appropriate. The models are y1j = α1 + β1 x1j + ǫ1j , for famales, and y2k = α2 + β2 x2k + ǫ2k , for males; j = 1, 2, . . . , n1 , k = 1, 2, . . . , n2 , ns ≥ 2, s = 1, 2. The investigator wants to know if α1 + β1 x0 = α2 + β2 x0 (if at age x0 the cholesterol content in blood is the same for female and male individuals). However, more realistic situations ask for the behavior of more than one dependent variable y′ = (y1 , . . . , yR ) as a function of an independent variable X. In the statistical modeling of such situations, the multivariate simple linear model appears as an interesting alternative. In a wider context, the research can ask the same preceding hypothesis about the parallelism of a set of lines, or the same intercept, or a common given intersection point. Some preliminary results about matrix algebra, matrix multivariate distributions and general multivariate linear model are showed, see Section 2. By using likelihood rate and union-intersection principles, Section 3 derive the multivariate statistics versions for the above mentioned hypotheses: same intercept, parallelism and intersection in a known point. Also, these results are extended to the elliptical case when the x’s are fixed or random. Section 4 applies the developed theory in the context of agricultural entomology . 2 Preliminary results A detailed discussion of the univariate linear model and related topics may be found in Graybill (1976) and Draper and Smith (1981) and for the multivariate linear model see Rencher (1995) and Seber (1984), among many others. For completeness, we shall introduce some notations, although in general we adhere to standard notation forms. 2.1 Notation, matrix algebra and matrix multivariate distribution. For our purposes: if A ∈ ℜn×m denotes a matrix, this is, A have n rows and m columns, then A′ ∈ ℜm×n denotes its transpose matrix, and if A ∈ ℜn×n has an inverse, it shall be denoted by A−1 ∈ ℜn×n . An identity matrix shall be denoted by I ∈ ℜn×n , to specified the size of the identity, we will use In . A null matrix shall be denoted as 0 ∈ ℜn×m . A vector of ones shall be denoted by 1 ∈ ℜn . For all matrix A ∈ ℜn×m exist A− ∈ ℜm×n which is termed Moore-Penrose inverse. Similarly given A ∈ ℜn×m exist Ac ∈ ℜm×n such that AAc A = A, Ac is termed conditional inverse. It is said A ∈ ℜn×n is symmetric matrix if A = A′ and if all their eigenvalues are positive the matrix A is said to be positive definite, which shall be denoted as A > 0. If A ∈ ℜn×m is writing in terms of its m columns, A = (A1 , A2 , . . . , Am ), Aj ∈ ℜn , j = 1, 2 . . . , m, vec(A) ∈ ℜnm denotes the vectorization of A, moreover, vec′ (A) = (vec(A))′ = (A′1 , A′2 , . . . , A′m ). Let A ∈ ℜr×s and 2 B ∈ ℜn×m , then A ⊗ B ∈ ℜsn×rm denotes its Kronecker product. Given a null matrix A ∈ ℜn×n with diagonal elements aii 6= 0 for at least one i, this shall be denoted by n A = diag(a 22 , . . . , ann ). Given a ∈ ℜ , a vector, its Euclidean norm shall be defined as √ 11 , ap 2 2 ′ 2 ||a|| = a a = a1 + a2 + · · · + an . If a random matrix Y ∈ ℜn×m has a matrix multivariate normal distribution with matrix mean E(X) = µ ∈ ℜn×m and covariance matrix Cov(vec Y′ ) = Θ ⊗ Σ, Θ = Θ′ ∈ ℜn×n and Σ = Σ′ ∈ ℜm×m this fact shall be denoted as Y ∼ Nn×m (µ, Θ ⊗ Σ). Observe that, if A ∈ ℜn×r , B ∈ ℜm×s and C ∈ ℜr×s matrices of constants, A′ YB + C ∼ Nr×s (A′ µB + C, A′ ΘA ⊗ B′ ΣB). (1) Finally, consider that Y ∼ Nn×m (µ, Θ ⊗ Σ) then the random matrix V = Y′ Θ−1 Y has a noncentral Wishart distribution with n degrees of freedom and non-centrality parameter matrix Ω = Σ−1 µ′ Θ−1 µ/2. This fact shall be denoted as V ∼ Wm (n, Σ, Ω). Observe that if µ = 0, then Ω = 0, and V is said to have a central Wishart distribution and Wm (n, Σ, 0) ≡ Wm (n, Σ), see Srivastava and Khatri (1979) and Muirhead (2005). 2.2 General multivariate linear model Consider the general multivariate linear model Y = Xβ + ǫ (2) where: Y ∈ ℜn×q is the matrix of the observed values; β ∈ ℜp×q is the parameter matrix; X ∈ ℜn×p is the design matrix or the regression matrix of rank r ≤ p and n > p + q; ǫ ∈ ℜn×q is the error matrix which has a matrix multivariate normal distribution, specifically ǫ ∼ Nn×q (0, In ⊗ Σ), see Muirhead (2005, p.430) and Σ ∈ ℜq×q , Σ > 0. For this model, we want to test the hypothesis H0 : CβM = 0 versus Ha : CβM 6= 0 (3) where C ∈ ℜνH ×p of rank νH ≤ r and M ∈ ℜq×g of rank g ≤ q. As in the univariate case, the matrix C concerns to the hypothesis among the elements of the parameter matrix columns, while the matrix M allows hypothesis among the different response parameters. The matrix M plays a role in profile analysis, for example; in ordinary hypothesis testing it assumes the identity matrix, namely, M = Ip . Let SH be the matrix of sums of squares and sums of products due to the hypothesis and let SE be the matrix of sums of squares and sums of products due to the error. These are defined as ′ e e SH = (CβM) (C(X′ X)c C′ )−1 (CβM) (4) ′ ′ c SE = M Y (In − XX )YM, e = Xc Y. Note that, under the null hypothesis, SH has a g-dimensional respectively; where β noncentral Wishart distribution with νH degrees of freedom and parameter matrix M′ ΣM i.e. SH ∼ Wg (νH , M′ ΣM); similarly SE has a g-dimensional Wishart distribution with νE degrees of freedom and parameter matrix M′ ΣM, i.e. SE ∼ Wg (νE , M′ ΣM); specifically, νH and νE denote the degrees of freedom of the hypothesis and the error, respectively. All the results given below are true for M 6= Iq , just compute SH and SE from (4) and replace q by g. Now, let λ1 , · · · , λs be the s = min(νH , g) non null eigenvalues of the matrix SH S−1 E such that 0 < λs < · · · < λ1 < ∞ and let θ1 , · · · , θs be the s non null eigenvalues of the matrix SH (SH + SE )−1 with 0 < θs < · · · < θ1 < 1; here we note λi = θi /(1 − θi ) and θi = λi /(1 + λi ), i = 1, · · · , s. Various authors have proposed a number of different criteria for testing the hypothesis (3). But it is known, that all the tests can be expressed in terms 3 of the eigenvalues λ′ s or θ′ s, see for example Kres (1983). The likelihood ratio test statistics termed Wilks’s Λ, given next, is one of such statistic. The likelihood ratio test of size α of H0 : CβM = 0 against Ha : CβM 6= 0 reject if Λ ≤ Λα,q,νH ,νE , where s Λ= s Y Y 1 1 |SE | = = . |SE + SH | i=1 (1 + λi ) i=1 (1 − θi ) (5) Exact critical values of Λα,q,νH ,νE can be found in Rencher (1995, Table A.9) or Kres (1983, Table 1). 3 Test about R multivariate simple linear models Consider the following R multivariate simple linear models Yr = Xr B r + ǫr (6) Yr ∈ ℜnr ×q , XrP∈ ℜnr ×2 such that its rank is 2; B r ∈ ℜ2×q , nr > 2 and nr > q + 2 for all R r = 1, 2, . . . , R; r=1 nr = N and ǫr ∼ Nnr ×q (0, Inr ⊗ Σ), with Σ > 0; where   1 xr1    ′   1 xr2  αr1 αr2 · · · αrq αr   Br = = , Xr =  . ..  = (1nr xr ) . ′ βr βr1 βr2 · · · βrq1  .. .  1 xrnr We are interested in the following hypotheses i) H0 : β1 = β 2 = · · · = β R , that is, the set of lines are parallel; ii) H0 : α1 = α2 = · · · = αR , that is, the set of lines have a common vector intercept; iii) H0 : α1 + β 1 x0 = α2 + β 2 x0 = · · · = αR + β R x0 , (x0 known), that is, the set of lines intersect at the x value x0 which is specified in advance. First observe that the R multivariate simple linear models can be written as a general multivariate linear model, Y = XB + E, such that    Y =  N×q Y1 Y2 .. . YR       , X =   N×2R  X1 0 .. . 0 0 X2 .. . 0 Namely, E ∼ NN ×q (0, IN R ⊗ Σ). Thus  ′ X1 X1 0 ··· ′  X 0 X 2 2 ···  X′ X =  .. .. ..  . . . 0 0 0 0 .. . XR ··· ··· .. . ··· ···      , B =   2R×q  0 0 .. . X′R XR    ,  and by Graybill (1976, Theorem 1.3.1, p. 19)  (X′1 X1 )−1 0 ′ −1  X 0 (X 2 2)  (X′ X)−1 =  .. ..  . . 0 0 4  B1 B2 .. . BR    X′ Y =         , E =   N×q  X′1 Y1 X′2 Y2 .. . X′R YR ··· ··· .. . 0 0 .. . ··· (X′R XR )−1    .     ,  E1 E2 .. . ER    .  Therefore by Muirhead (2005, Theorem 10.1.1, p. 430), see also Rencher (1995, equation 10.46, p. 339),    (X′1 X1 )−1 0 ··· 0 X′1 Y1    X′2 Y2  0 (X′2 X2 )−1 · · · 0    ′ −1 ′ b B = (X X) X Y =    .. .. .. .. ..     . . . . . ′ ′ −1 XR YR 0 0 · · · (XR XR )     X− (X′1 X1 )−1 X′1 Y1 1 Y1 ′ −1 ′  (X2 X2 ) X2 Y2   X−     2 Y2  = = , .. ..     . . X− R YR (X′R XR )−1 X′R YR that is, Br = (X′r Xr )−1 X′r Yr = X− r Yr and SE = = b ′ X′ Y)′ (Y − B b ′ X′ Y) = (Y − B R X r=1 R X r=1 Yr Yr −  q×q Yr′ Inr − Xr X− . r Yr ∈ ℜ R X B′r X′r Yr r=1 (7) Hence by Muirhead (2005, Theorem 10.1.2, p. and Khatri (1979, equa  431) and Srivastava −1 ′ b tion 6.3.8, p. 171) we have that B ∼ N2R×q B, (X X) ⊗ Σ . Note that  b  B1     b  B2  b r = 0· · ·I2 · · ·0 B b = 0· · ·I2 · · ·0  B  . , ..  1 ··· r ··· R 1 ··· r ··· R  bR B   b r is b r ∼ N2×q Br , (X′ Xr )−1 ⊗ Σ and SE ∼ Wq (N − 2R, Σ). Observe that B thus, B r computed from the data for the rth model and SE is computed by pooling the estimators of SE from each model SEr . Generalising the results in Graybill (1976, Example 6.2.1, pp. 177-178) and using matrix notation in the multivariate case, we have ′    b x̄r ! Ȳr − β r ′  br α  !′  br = , ′ ′ = B ′ xr /n 1 − 1 I Y   r n n b r n r r r βr  2 ′ k Inr − 1nr 1nr /nr xr k where Ȳr = Yr′ 1nr /nr and x̄r = x′r 1nr /nr , r = 1, 2, . . . , R. And SE = R X SEr , r=1 where  SEr = Yr′ Inr − 1nr 1′nr /nr Yr   Yr′ Inr − 1nr 1′nr /nr xr x′r Inr − 1nr 1′nr /nr Yr  − . k Inr − 1nr 1′nr /nr xr k2 5 Theorem 3.1. Given the R multivariate simple linear models (6) and known constants a and b, the likelihood ratio test of size α of H0 : aα1 + bβ1 = aα2 + bβ2 = · · · = aαR + bβR versus H1 : at least ane equality is an inequality, is given by Λ= Where SE = R X r=1 SH =  |SE | |SE + SH | (8) Yr′ (Inr − Xr X− r )Yr , (9)   ′  D1/2 Z IR − D1/2 1R 1′R D1/2 /1′R D1R D1/2 Z , (10) where D = diag(d11 , d22 , . . . , dRR ), drr and  nr k Inr − 1nr 1′nr /nr xr k2 = k(axr − b1nr )k2   b′ α   1′ b2   α Z= . a    .. b ′R α We reject H0 if        + b     b′ β 1 b′ β 2 .. . ′ b βR     ∈ ℜR×q .   Λ ≤ Λα,1,νH ,νE , where νH = (R − 1), νE = N − 2R. Proof. This theorem is a special case of the results obtained for testing the hypotheses (3) and it can be proved by selecting the proper C and M matrices into Equation (4) 1 . Alternatively we extend the proof in Graybill (1976, Theorem 8.6.1, p. 288) for an univariate case into the multivariate case. The result follows from (5), we just need to define explicit matrices of sums of squares and products SE and SH . First define the random vectors b , r = 1, 2, . . . , R, where a and b are known constants to be define later. b r + bβ zr = aα r   b r ∼ N2×q Br , (X′ Xr )−1 ⊗ Σ , we have Hence, given that B r 1 In our case taking, M  a  0  C= .  .. 0   b = aαr + bβ . b r + bβ E(zr ) = E aα r r = Iq and b 0 . .. 0 −a a . .. 0 −b b . .. 0 0 −a . .. 0 0 −b . .. 0 ··· ··· .. . ··· into to Equation 4, the desired result is obtained. 6 0 0 . .. a 0 0 . .. b 0 0 . .. −a 0 0 . .. −b     ∈ ℜR−1×2R ,  Also note that, b ′r zr = B thus Cov(zr ) = = = = = =  = Therefore −1 (a, b) (X′r Xr ) = b , b r + bβ = aα r −1 drr ⊗ Σ = d−1 rr Σ = (a, b)  a b    a b′ Cov(zr ) = Cov vec B r b ! !  ′ a ′ b Cov ⊗ Iq vec Br b      a −1 ′ ((a, b) ⊗ Iq ) (Xr Xr ) ⊗ Σ ⊗ Iq b   a −1 ⊗Σ (a, b) (X′r Xr ) b With d−1 rr  k1nr k2 x′r 1nr 1  a b  1′nr xr kxr k2  −1  nr k Inr − 1nr 1′nr /nr xr k a b (a, b) 2 k′ (axr − b1nr )k2  , nr k Inr − 1nr 1′nr /nr xr k2   kxr k2 −x′r 1nr and −1   b ∼ Nq aαr + bβ , d−1 Σ . b r + bβ zr = aα r r rr Now, consider the random matrix Z defined by   ′    ′  b1 α z1   b ′2   z′2        α   + b a Z= . =   .    ..    ..   z′R b ′R α Thus −1′nr xr nr       E(Z) = a     α′1 α′2 .. . α′R      +b   b′ β 1 b′ β 2 .. . ′ b βR β′1 β′2 .. . β ′R     ∈ ℜR×q        Cov(vec Z′ ) = Cov((z′1 , z′2 , . . . z′R )′ ) = D−1 ⊗ Σ, where D = diag(d11 , d22 , . . . , dRR ). Thus   b′ α   1′ b2   α a Z ∼ NR×q     .. .  b ′R α       +b    7 b′ β 1 b′ β 2 .. . b′ β R      −1   , D ⊗ Σ ,     a b  furthermore   b′ α   1′  b2  1/2   α  D1/2 Z ∼ NR×q  . D a    ..  b ′R α         + b     b′ β 1 b′ β 2 .. . ′ b βR        , IR ⊗ Σ .      Consider the constant matrix IR − D1/2 1R 1′R D1/2 /1′R D1R , which is symmetric and idempotent. Then    ′  SH = D1/2 Z IR − D1/2 1R 1′R D1/2 /1′R D1R D1/2 Z , moreover, SH has a Wishart distribution and is independently distributed of SE (see Equation (7)), where SH ∼ Wq (R − 1, Σ, Ω) and SE ∼ Wq (N − 2R, Σ); in addition, Ω=   ′  1 −1  1/2 IR − D1/2 1R 1′R D1/2 /1′R D1R D1/2 E(Z) D E(Z) Σ 2 and observe that Ω = 0 if an only if aα1 + bβ1 = aα2 + bβ2 = · · · = aαR + bβ R . Which is the desired result. As we mentioned before, different test statistics have been proposed for verifying the hypothesis (3). Next we propose three of them in our particular case. Theorem 3.2. Given the R multivariate simple linear models (6) and known constants a and b, the union-intersection test, Pillai test and Lawley-Hotelling test of size α of H0 : aα1 + bβ1 = aα2 + bβ2 = · · · = aαR + bβR versus H1 : at least ane equality is an inequality, are given respectively by 1. θ1 = λ1 1 + λ1 (11) which is termed Roy’s largest root test. Where λ1 is the maximum eigenvalue of −1 SH SE , where SH and SE are given by (10) and (9), respectively. We reject H0 if θ ≥ θα,s,m,h . Exact critical values of θα,s,m,h are found in Rencher (1995, Table A.10) or Kres (1983, Tables 2, 4 and 5). 2. V (s) = tr[SH (SE + SH )−1 ] = s X i=1 This way we reject H0 if s X λi θi = 1 + λi i=1 (12) (s) V (s) ≥ Vα,s,m,h , (s) where the exact critical values of Vα,s,m,h are found in Rencher (1995, Table A.11) or Kres (1983, Table 7). 8 3. U (s) = tr[SH S−1 E ] = s X λi = i=1 We reject H0 if s X i=1 θi . 1 − θi (13) (s) U (s) ≥ Uα,s,m,h . (s) The upper percentage points, Uα,s,m,h , are given in Kres (1983, Table 6). The parameters s, m and h are defined as where νH s = min(1, νH ), m = (|1 − νH | − 1)/2, h = (νE − 2)/2. PR = (R − 1), νE = N − 2R and N = r=1 nr . As a special case of Theorem 3.1 (and Theorem 3.2), we obtain the test of the hypotheses i), ii) and iii) established above. Theorem 3.3. Consider the R multivariate simple linear models (6). The likelihood ratio test of size α of tests of hypotheses i), ii) and iii) are given as follows: The test of H0 vs. H1 is this: Reject H0 if and only if Λ= |SE | ≤ Λα,1,νH ,νE , |SE + SH | where SE = R X r=1 SH =  Yr′ (Inr − Xr X− r )Yr , (14)   ′  D1/2 Z IR − D1/2 1R 1′R D1/2 /1′R D1R D1/2 Z , (15) i) With H0 : α1 = α2 = · · · = αR (R set of lines with the same vector intercept) vs. H1 : αi = αj for at least one i 6= j, i, j = 1, 2, . . . , R. Where D = diag(d11 , d22 , . . . , dRR ),  nr k Inr − 1nr 1′nr /nr xr k2 drr = kxr k2 and    Z=  b ′1 α b ′2 α .. . b ′R α     ∈ ℜR×q .  ii) H0 : β 1 = β2 = · · · = β R (R set of lines are parallel) vs. H1 : βi = β j for at least one i 6= j, i, j = 1, 2, . . . , R. With D = diag(d11 , d22 , . . . , dRR ),  drr = k Inr − 1nr 1′nr /nr xr k2 and    Z=   b′ β 1 b′ β 2 .. . b′ β R 9     ∈ ℜR×q .   iii) H0 : α1 + β 1 x0 = α2 + β2 x0 = · · · = αR + β R x0 (all R set of lines intersect at x = x0 , known) vs. H1 at least one equality is an inequality (all R set of lines do not intersect at x = x0 ). Where D = diag(d11 , d22 , . . . , dRR ),  nr k Inr − 1nr 1′nr /nr xr k2 drr = k(xr − x0 1nr )k2 and    Z=   Where νH = (R − 1), νE = N − 2R. b ′ x0 b ′1 + β α 1 b ′ x0 b ′2 + β α 2 .. . ′ b x0 b ′R + β α R     ∈ ℜR×q .   Proof. This is a simple consequence of Theorem 3.1. To test that a set of R lines have the same vector intercept, take a = 1 and b = 0; to test whether set of R lines are parallel, we set a = 0 and b = 1, and to test that a set of R lines intersect at x = x0 , we set a = 1 and b = x0 . 3.1 Test about R multivariate simple linear model under matrix multivariate elliptical model In order to consider phenomena and experiments under more flexible and robust conditions than the usual normality, various works have appeared in the statistical literature since the 80’s. Those efforts has been collected in various books and papers which are consolidated in the so termed generalised multivariate analysis or multivariate statistics analysis under elliptically contoured distributions, see Gupta and Varga (1993) y Fang and Zhang (1990), among other authors. These new techniques generalize the classical matrix multivariate normal distribution by a robust family of matrix multivariate distributions with elliptical contours. Recall that Y ∈ ℜn×m has a matrix multivariate elliptically contoured distribution if its density with respect to the Lebesgue measure is given by: dFY (Y) = 1 |Σ|n/2 |Θ|m/2    h tr (Y − µ)′ Θ−1 (Y − µ)Σ−1 (dY), where µ ∈ ℜn×m , Σ ∈ ℜm×m , Θ ∈ ℜn×n , Σ > 0 and Θ > 0 and (dY) is the Lebesgue The function h : ℜ → [0, ∞) is termed the generator function and satisfies Rmeasure. ∞ mn−1 2 u h(u )du < ∞. Such a distribution is denoted by Y ∼ En×m (µ, Θ ⊗ Σ, h), 0 Gupta and Varga (1993). Observe that this class of matrix multivariate distributions includes normal, contaminated normal, Pearson type II and VI, Kotz, logistic, power exponential, and so on; these distributions have tails that are weighted more or less, and/or they have greater or smaller degree of kurtosis than the normal distribution. Among other properties of this family of distributions, the invariance of some test statistics under this family of distributions stands out, that is, some test statistics have the same distribution under normality as under the whole family of elliptically contoured distributions, see theorems 5.3.3 and 5.3.4 of Gupta and Varga (1993, pp. 185-186). Therefore, the distributions of Wilks, Roy, Lawley-Hotelling and Pillai test statistics are invariant under the whole family of elliptically contoured distributions, see Gupta and Varga (1993, pp. 297-299). 10 Finally, note that, in multivariate linear model, it was assumed that the x’s were fixed. However, in many applications, the x’s are random variables. Then, as in the normal case, see Rencher (1995, Section 10.8, p. 358), if we assume that (y1 , y2 , . . . , yq , x) has a multivariate elliptically contoured distribution, then all estimations and tests have the same formulation as in the fixed-x, case. Thus there is no essential difference in our procedures between the fixed-x case and the random-x case. 4 Application The rosebush (Rosa sp. L.) is the ornamental species of major importance in the State of Mexico, Mexico, being the red spider (Tetranychus urticae Koch) (Acari: Tetranychidae) its main entomological problem, the control has been based almost exclusively using acaricide, which has caused this plague to acquire resistance in a short time. In order to counteract this problem in part, an experiment was carried out using the variety of red petals Vega in two greenhouses located in the Ejido2 ”Los Morales”, in Tenancingo, State of Mexico, Mexico, from October 2008 to August 2009. In a greenhouse, chemical control was applied exclusively, while in the other, combined control (chemical and biological) was used, where applications of acaricide were reduced and releases of two predatory mites were made: Phytoseiulus persimilis Athias-Henriot and Neoseiulus californicus McGregor (Acari: Phytoseiidae). The red spider infestations decrease the length of the stem (Y1 ) and the size of the floral button (Y2 ), preponderant characteristics so that the final product reaches the best commercial value, so that a total of 15 stems were measured randomly and weekly from each greenhouse, their respective floral button, to quantify their length and diameter in centimeters, respectively, for a total of 15 weeks (X), see Preciado-Ramı́rez (2014). The measurements of the variables were carried out from January to April 2009 and the application of the treatments was initiated in week 44 of 2008. The investigator considers3 that a multivariate simple linear model for the results of each greenhouse is the appropriate model to relate the two dependent variables Y1 and Y2 in terms of the independent variable X. The corresponding multivariate simple linear models are Yr = Xr βr + ǫr , r = 1, 2 ǫr ∼ Enr ×2 (0, Inr ⊗ Σ), Σ ∈ ℜ2×2 , Σ > 0, with n1 = 15, and n2 = 15 and    ′  αr1 αr2 αr βr = = β′r βr1 βr2 The researcher ask for the following hypotheses testing. i) H01 : β 1 = β2 , that is, the set of lines are parallel (if the average stem length and the average floral button diameter of each sample of roses per week are the same under the two methods of pest control); ii) H02 : α1 = α2 , that is, the set of lines have a common vector intercept (if the average stem length and the average floral button diameter of each sample roses in week zero are the same under the two methods of pest control). The results of the experiment are presented in the next Table 1. 2A piece of land farmed communally, pasture land, other uncultivated lands, and the fundo legal, or town site, under a system supported by the state. 3 In the original work, the analysis was made based on univariate statistical techniques only. 11 Table 1: Experimental results of length of the stem (cms) and the diameter of the floral button (cms) of Vega rose variety. Biological control X Y1 Y2 1 67.32 4.87 2 68.92 4.89 3 69.33 5.07 4 71.66 5.19 5 72.26 5.26 6 76.55 5.73 7 81.41 5.82 8 82.71 6.09 9 83.09 6.15 10 83.59 6.17 11 83.91 6.24 12 84.67 6.30 13 85.34 6.33 14 87.41 6.61 15 88.21 6.62 Chemical control X Y1 Y2 1 55.74 4.82 2 58.63 4.97 3 61.14 5.01 4 62.46 5.06 5 62.96 5.13 6 64.55 5.22 7 66.87 5.28 8 67.93 5.34 9 68.38 5.37 10 68.88 5.39 11 69.76 5.40 12 71.31 5.42 13 72.98 5.54 14 74.33 5.65 15 76.44 5.74 Thus the matrices β1 , β 2 and SE are given by     66.521429 4.75238095 56.416286 4.83647619 β1 = , β2 = 1.571321 0.13378571 1.300964 0.05660714 and SE = Moreover,  65.625451 3.9069754 3.906975 0.3025506   10.233018 2.9212089 2.921209 0.8339145  . i) from Theorem 3.3 ii) we have SH = , and Table 2: Four criteria to proof H01 : β1 = β 2 Criteria Wilksa Roy Pillai Lawley-Hotelling Statistic 0.1159631 0.8840369 0.8840369 7.62343 α Critical value 0.860199 0.775 0.775 4.225201b a Remember that for this tests, the decision rule is: statistics ≤ critical value b Using an F approximation, see equation (6.26) in Rencher (1995, p.166, 1995). Thus, from Table 2, there is no doubt that the four criterions reject the null hypothesis H01 : β 1 = β2 for α = 0.05. 12 ii) Similarly, from Theorem 3.3i), the matrix SH is given by   172.934851 −1.43916793 SH = . −1.439168 0.01197679 and Table 3: Four criteria to proof H02 : α1 = α2 Criteria Wilksa Roy Pillai Lawley-Hotelling Statistic 0.06658425 0.9334158 0.9334158 14.01857 α Critical value 0.860199 0.808619 0.808619 4.225201b a Remember that for this tests, the decision rule is: statistics ≤ critical value b Using an F approximation, see equation (6.26) in Rencher (1995, p.166, 1995). cms Biological control Biological control 65 5.5 70 cms 75 6.0 80 85 6.5 From Table 3 we can conclude that under the four criterions of test the hypothesis H02 : α1 = α2 is rejected for a level of significance of α = 0.05. Chemical control 55 5.0 60 Chemical control 2 4 6 8 10 12 14 2 4 6 Weeks 8 10 12 14 Weeks (a) Length of the stem (b) Diameter of the floral button Figure 1: Observations and adjusted values Given that R = 2, we can easily check graphically the conclusions reached in the hypothesis testing. Figure 1 (b) shows the intersection of lines for the floral button diameters, which explains the rejection of parallelism hypothesis. However, Figure 1(a) shows parallel lines, which certainly implies that the average length of stem for each sample per week is the same for both pest control. Similarly, Figure 1(a) depicts very different intercepts associated to the length of the stem, explaining the rejecting of the hypothesis for equal intercepts. Also, Figure 1(b) shows equal intercepts, which implies that the average floral button diameter for each sample in week zero is the same for both pest control. The thesis Preciado-Ramı́rez (2014) concludes that the biological control method reduces infestation of the pest and as a consequence both the stem length and the button size are increased. This aspect promotes a higher sale price, but this result was not incorporated in the addressed work. Our analysis confirms these conclusions, but in a robust way that include all the variables simultaneously. 13 5 Conclusions As a consequence of Subsection 3.1 the three hypotheses testing of this paper are valid under the complete family of elliptically contoured distribution, i.e. in any practical circumstance we can assume that our information have a matrix multivariate elliptically contoured distribution instead of considering the usual non realistic normality. References N. R. Draper and H. Smith, Applied regression analysis, 2nd edition. Wiley, New York, 1981. K. T. Fang and Y. T. Zhang, Generalized Multivariate Analysis, Science Press, SpringerVerlag, Beijing, 1990. F. A. Graybill, Theory and Application of the Linear Model, Wadsworth & Brooks/Cole, Advances Books and Softwere, Pacific Grove, California, 1976. A. K. Gupta and T. Varga, Elliptically Contoured Models in Statistics, Kluwer Academic Publishers, Dordrecht, 1993. H. Kres, Statistical Tables for Multivariate Analysis, Springer-Verlag, New York, 1983. D. F. Morrison, Multivariate Sattistical Methods, 4th Revision Edition Duxbury Advances Series, London, 2003. R. J. Muirhead, Aspects of Multivariate Statistical Theory, John Wiley & Sons, New York, 2005. M. R. Preciado-Ramı́rez, Validation of Phytoseiulus persimilis Athias-Henriot and Neoseiulus californicus for control of Tetranychus urticae Koch in the cultivation of roses in greenhouses. Thesis of Agronomical Engineering. University of Guanajuato. Irapuato, Guanajuato, Mexico, 2014. (In Spanish.) S. J. Press, Applied Multivariate Analysis: Using Bayesian and Frequentist Methods of Inference, Second Edition, Robert E. Krieger Publishing Company, Malabar, FL, 1982. A. C. Rencher, Methods of Multivariate Analysis, John Wiley & Sons, New York, 1995. S. N. Roy, Some Aspect of Multivariate Analysis, John Wiley & Sons, New York, 1957. G. A. F. Seber, Multivariate Observations. John Wiley & Sons, New York, 1984. M. S. Srivastava, and C. G. Khatri, An Introduction to Multivariate Analysis. North-Holland Publ., Amsterdam, 1979. 14
10math.ST